diff --git a/public/react/src/modules/user/usersInfo/InfosTopics.js b/public/react/src/modules/user/usersInfo/InfosTopics.js index 8f9c394a5..d90feed0f 100644 --- a/public/react/src/modules/user/usersInfo/InfosTopics.js +++ b/public/react/src/modules/user/usersInfo/InfosTopics.js @@ -107,6 +107,10 @@ class InfosTopics extends Component{ isSpin:false }) }); + }else{ + this.setState({ + isSpin:false + }) } } diff --git a/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js b/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js index e2c2208da..cfd85b260 100644 --- a/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js +++ b/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js @@ -18,7 +18,7 @@ class NewGtaskForms extends Component{ initValue = (data) => { - if (data.isEdit) { + const contentFileList = data.attachments.map(item => { return { id: item.id, @@ -47,9 +47,7 @@ class NewGtaskForms extends Component{ }); }) - } else { // new - } } @@ -109,19 +107,19 @@ class NewGtaskForms extends Component{ } handleSubmit = () => { + debugger let {contentFileList,min_num,max_num,base_on_project}=this.state; let {data}=this.props; let task_type=data.task_type let topicId=this.props.topicId - this.props.form.validateFieldsAndScroll((err, values) => { + this.props.form.validateFields((err, values) => { const mdContnet = this.contentMdRef.current.getValue().trim(); values.description = mdContnet; if (!err) { - if (this.state.isEdit) { let url="/task_banks/"+topicId+".json"; axios.put(url, { gtask_bank: { @@ -143,10 +141,6 @@ class NewGtaskForms extends Component{ console.log(error) }) - } else { - - } - } else { $("html").animate({ scrollTop: $('html').scrollTop() - 100 }) } @@ -222,7 +216,7 @@ class NewGtaskForms extends Component{ ` } -