|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import React,{ Component } from "react";
|
|
|
|
|
import { Modal,Checkbox,Upload,Button,Icon,message} from "antd";
|
|
|
|
|
import { Modal,Checkbox,Upload,Button,Icon,message,notification} from "antd";
|
|
|
|
|
import { WordsBtn,getUrl, getUploadActionUrl} from 'educoder';
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import Modals from '../../modals/Modals';
|
|
|
|
@ -110,6 +110,7 @@ class AccessoryModal extends Component{
|
|
|
|
|
this.props.Cancel()
|
|
|
|
|
}
|
|
|
|
|
Saves=()=>{
|
|
|
|
|
|
|
|
|
|
let id=this.props.categoryid;
|
|
|
|
|
let {fileList,description} =this.state;
|
|
|
|
|
|
|
|
|
@ -131,10 +132,12 @@ class AccessoryModal extends Component{
|
|
|
|
|
description:description,
|
|
|
|
|
attachment_ids:newfileList
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
console.log(result)
|
|
|
|
|
if(result !== undefined){
|
|
|
|
|
this.props.setupdate()
|
|
|
|
|
this.props.showNotification('提交成功')
|
|
|
|
|
|
|
|
|
|
if(result.data.status===0){
|
|
|
|
|
debugger
|
|
|
|
|
this.props.Cancel()
|
|
|
|
|
this.props.setupdate()
|
|
|
|
|
|
|
|
|
|
// this.setState({
|
|
|
|
|
// Modalstype:true,
|
|
|
|
|
// Modalstopval:result.data.message,
|
|
|
|
@ -142,9 +145,16 @@ class AccessoryModal extends Component{
|
|
|
|
|
// loadtype:true
|
|
|
|
|
// })
|
|
|
|
|
this.ModalCancelModalCancel()
|
|
|
|
|
|
|
|
|
|
notification.open({
|
|
|
|
|
message: '提示',
|
|
|
|
|
description:
|
|
|
|
|
'提交成功'
|
|
|
|
|
});
|
|
|
|
|
if(this.props.seeworks!=undefined){
|
|
|
|
|
this.props.history.push(this.props.seeworks);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
|
|
|
|
@ -170,10 +180,12 @@ class AccessoryModal extends Component{
|
|
|
|
|
description:description,
|
|
|
|
|
attachment_ids:newfileList
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
console.log(result)
|
|
|
|
|
|
|
|
|
|
if(result.data.status===0){
|
|
|
|
|
debugger
|
|
|
|
|
this.props.Cancel()
|
|
|
|
|
this.props.setupdate()
|
|
|
|
|
this.props.showNotification('提交成功')
|
|
|
|
|
|
|
|
|
|
// this.setState({
|
|
|
|
|
// Modalstype:true,
|
|
|
|
|
// Modalstopval:result.data.message,
|
|
|
|
@ -182,9 +194,15 @@ class AccessoryModal extends Component{
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
this.ModalCancelModalCancel()
|
|
|
|
|
notification.open({
|
|
|
|
|
message: '提示',
|
|
|
|
|
description:
|
|
|
|
|
'提交成功'
|
|
|
|
|
});
|
|
|
|
|
if(this.props.seeworks!=undefined){
|
|
|
|
|
this.props.history.push(this.props.seeworks);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
|
|
|
|
|