diff --git a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js
index 99b16a20f..936807111 100644
--- a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js
+++ b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js
@@ -179,7 +179,7 @@ class CommonWorkAppraise extends Component{
{/*
+
-
- { comment_scores.map(item => {
- return
- }) }
-
+
+
+
+
+
+ { comment_scores.map(item => {
+ return
+ }) }
+
)
}
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js
index 515149fb0..64539adbc 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js
@@ -27,6 +27,7 @@ class GraduationTasksedit extends Component{
tasktype:undefined,
name:"",
description:undefined,
+ shixunsreplace:false,
}
}
@@ -73,74 +74,7 @@ class GraduationTasksedit extends Component{
}
- handleSubmit=(e)=>{
-
- let {fileList}=this.state;
- let listid=[]
- let graduation_id=this.state.data.graduation_id;
- for(var list of fileList){
- if(list.response!=undefined){
- listid.push(list.response.id)
- }else{
- listid.push(list.uid)
- }
-
- }
-
- // console.log(listid)
- e.preventDefault();
- if(GraduationTasksedittype===true){
- this.props.form.validateFields((err, values) => {
-
- if (!err) {
-
- if(values.tasktype===undefined){
- this.scrollToAnchors("tasktypes");
- return
- }
- if(values.name===undefined){
- this.scrollToAnchors("nametypes");
- return
- }
-
- if(values.description===undefined){
- this.scrollToAnchors("descriptiontypes");
- return
- }else if(values.description.length>5000){
- this.scrollToAnchors("descriptiontypes");
- return
- }
-
-
- console.log('Received values of form: ', values);
- // console.log(fileList);
- let tasksid=this.props.match.params.category_id;
-
- let url="/graduation_tasks/"+tasksid+".json"
- axios.put(url, {
- task_type:parseInt(values.tasktype),
- name:values.name,
- description:values.description,
- attachment_ids:listid,
- }
- ).then((response) => {
- if(response.status===200) {
- // console.log(response)
- GraduationTasksedittype=false;
- // window.location.href="/courses/"+course_id+"/graduation/"+graduationId+"/graduation_tasks/"+category_id+"/questions";
- // this.goback()
- this.props.history.push("/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting");
- }
- }).catch((error) => {
- console.log(error)
- })
-
- }
- });
- }
-
- }
goback=()=>{
// let courseId=this.props.match.params.coursesId;
@@ -239,10 +173,100 @@ class GraduationTasksedit extends Component{
});
}
+ Commoninterface=(fileList)=>{
+ let listid=[]
+ let graduation_id=this.state.data.graduation_id;
+ for(var list of fileList){
+ if(list.response!=undefined){
+ listid.push(list.response.id)
+ }else{
+ listid.push(list.uid)
+ }
+
+ }
+
+ // console.log(listid)
+ // if(GraduationTasksedittype===true){
+ this.props.form.validateFields((err, values) => {
+
+ if (!err) {
+
+ if(values.tasktype===undefined){
+ this.scrollToAnchors("tasktypes");
+ return
+ }
+
+ if(values.name===undefined){
+ this.scrollToAnchors("nametypes");
+ return
+ }
+
+ if(values.description===undefined){
+ this.scrollToAnchors("descriptiontypes");
+ return
+ }else if(values.description.length>5000){
+ this.scrollToAnchors("descriptiontypes");
+ return
+ }
+
+
+ console.log('Received values of form: ', values);
+ // console.log(fileList);
+ let tasksid=this.props.match.params.category_id;
+
+ let url="/graduation_tasks/"+tasksid+".json"
+ axios.put(url, {
+ task_type:parseInt(values.tasktype),
+ name:values.name,
+ description:values.description,
+ attachment_ids:listid,
+ }
+ ).then((response) => {
+ if(response.status===200) {
+ // console.log(response)
+ // GraduationTasksedittype=false;
+ // window.location.href="/courses/"+course_id+"/graduation/"+graduationId+"/graduation_tasks/"+category_id+"/questions";
+ // this.goback()
+ this.props.history.push("/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting");
+ }
+ }).catch((error) => {
+ console.log(error)
+ })
+
+ }
+ });
+ // }
+ }
+ handleSubmit=(e)=>{
+
+ let {fileList}=this.state;
+ if(fileList.length===0){
+ this.setState({
+ shixunsreplace:true,
+ })
+ return
+ }
+
+ this.Commoninterface(fileList);
+ }
+ //确认
+ hidestartshixunsreplace = ()=>{
+ let {fileList}=this.state;
+
+ this.Commoninterface(fileList);
+
+
+ }
+ //取消
+ hidestartshixunsreplacetwo=()=>{
+ this.setState({
+ shixunsreplace:false,
+ })
+ }
render(){
const { getFieldDecorator } = this.props.form;
let {title_num,pageType,name,description,Loadtype,
- Modalstype,Modalstopval,ModalCancel,ModalSave} =this.state;
+ Modalstype,Modalstopval,ModalCancel,ModalSave,shixunsreplace} =this.state;
let {coursedata}=this.props;
let courseId=this.props.match.params.coursesId;
@@ -280,6 +304,24 @@ class GraduationTasksedit extends Component{
modalSave={ModalSave}
loadtype={Loadtype}
/>
+
+
+
+
@@ -302,8 +344,12 @@ class GraduationTasksedit extends Component{
返回
- {description===undefined?"":
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js
index 6b9a96108..9707f6017 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js
@@ -23,7 +23,8 @@ class GraduationTasksnew extends Component {
title_value: "",
fileList: [],
contents: [{val: "", id: 1}],
- type: true
+ type: true,
+ shixunsreplace:false,
}
}
@@ -47,15 +48,13 @@ class GraduationTasksnew extends Component {
})
}
+ Commoninterface =(fileList)=>{
- handleSubmit = (e) => {
- let {fileList} = this.state;
let listid = []
for (var list of fileList) {
listid.push(list.response.id)
}
- e.preventDefault();
if (GraduationTasksnewtype === true) {
this.props.form.validateFields((err, values) => {
if (!err) {
@@ -76,8 +75,8 @@ class GraduationTasksnew extends Component {
this.scrollToAnchors("descriptiontypes");
return
}
- console.log('Received values of form: ', values);
- console.log(fileList);
+ // console.log('Received values of form: ', values);
+ // console.log(fileList);
const course_id = this.props.match.params.coursesId;
let url = "/courses/" + course_id + "/graduation_tasks.json"
@@ -100,9 +99,9 @@ class GraduationTasksnew extends Component {
});
}
+ }
- }
goback = () => {
@@ -210,11 +209,38 @@ class GraduationTasksnew extends Component {
}
}
+ // 提交按钮
+ handleSubmit = (e) => {
+ let {fileList} = this.state;
+ if(fileList.length===0){
+ this.setState({
+ shixunsreplace:true,
+ })
+
+ return
+ }
+
+ this.Commoninterface(fileList);
+
+ }
+ //确认
+ hidestartshixunsreplace =()=>{
+ let {fileList} = this.state;
+
+ this.Commoninterface(fileList);
+ }
+ //取消
+ hidestartshixunsreplacetwo=()=>{
+ this.setState({
+ shixunsreplace:false,
+ })
+
+ }
render() {
const {getFieldDecorator} = this.props.form;
let {
coursename, coursesearch, title_num, title_value, pageType, fileList, contents, type,
- Modalstype, Modalstopval, ModalCancel, ModalSave
+ Modalstype, Modalstopval, ModalCancel, ModalSave,shixunsreplace
} = this.state;
let {coursedata} = this.props;
@@ -254,6 +280,24 @@ class GraduationTasksnew extends Component {
modalCancel={ModalCancel}
modalSave={ModalSave}
/>
+
+
+
+
@@ -273,8 +317,8 @@ class GraduationTasksnew extends Component {
-