diff --git a/public/react/config/webpack.config.dev.js b/public/react/config/webpack.config.dev.js index d1092894a..b3c1cea5b 100644 --- a/public/react/config/webpack.config.dev.js +++ b/public/react/config/webpack.config.dev.js @@ -30,7 +30,7 @@ const env = getClientEnvironment(publicUrl); module.exports = { // You may want 'eval' instead if you prefer to see the compiled output in DevTools. // See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s - //devtool: "cheap-module-eval-source-map", + //devtool: "cheap-module-eval-source-map", // 开启调试 //devtool: "source-map", // 开启调试 // These are the "entry points" to our application. diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 24c69ab85..62d0bbef2 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -231,8 +231,19 @@ class GraduationTaskssettinglist extends Component{ funteachercomment=(list,key)=> { // console.log(e.target.value) let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search} = this.state; + if(this.state.teacher_comment!=null&&list.length>0){ + if(this.state.teacher_comment.length>0){ + list.map((item,key)=>{ + this.state.teacher_comment.map((k,y)=>{ + if(item===k){ + list.splice(key, 1) + } + }) + }) + } + } - let listype =list instanceof Array; + let listype =list instanceof Array; if(listype===false){ this.setState({ teacher_comment:null, @@ -246,14 +257,17 @@ class GraduationTaskssettinglist extends Component{ } - if(list.length===key){ - this.seacthdata(undefined, task_status, course_group, cross_comment, order, b_order, search,this.state.page); - this.props.getsonar(undefined, task_status, course_group, cross_comment, search) - }else{ - this.seacthdata(list[0], task_status, course_group, cross_comment, order, b_order, search,this.state.page); - this.props.getsonar(list[0], task_status, course_group, cross_comment, search) - } + this.seacthdata(list.length===0?undefined:list[0], task_status, course_group, cross_comment, order, b_order, search,this.state.page); + this.props.getsonar(list.length===0?undefined:list[0], task_status, course_group, cross_comment, search) + // if(list.length===key){ + // this.seacthdata(undefined, task_status, course_group, cross_comment, order, b_order, search,this.state.page); + // this.props.getsonar(undefined, task_status, course_group, cross_comment, search) + // }else{ + // this.seacthdata(list[0], task_status, course_group, cross_comment, order, b_order, search,this.state.page); + // this.props.getsonar(list[0], task_status, course_group, cross_comment, search) + // + // } } @@ -1348,7 +1362,7 @@ class GraduationTaskssettinglist extends Component{ 全部 - this.funteachercomment(e,taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.length)} style={{ paddingTop: '4px'}}> + this.funteachercomment(e,taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.length)} style={{ paddingTop: '4px'}}> {taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.map((item,key)=>{ return(