|
@@ -16,7 +16,7 @@
|
|
|
</div>
|
|
|
<div>填写基本信息</div>
|
|
|
</div>
|
|
|
- <div v-show="cidType === 0" class="secondNo">
|
|
|
+ <div v-show="cidttt === 0" class="secondNo">
|
|
|
<div v-if="steps == 2" class="newSteps second" @click="navSteps(2)">
|
|
|
<div style="margin: 5px 10px 0 0; width: 2rem">
|
|
|
<img src="../../../assets/icon/second.png" alt />
|
|
@@ -1672,6 +1672,7 @@ export default {
|
|
|
inputShow: true,
|
|
|
toolIndex: 0,
|
|
|
cidType: 0,
|
|
|
+ cidttt:1,
|
|
|
answerQ: "",
|
|
|
grade: [],
|
|
|
courseUserid: "",
|
|
@@ -1859,7 +1860,7 @@ export default {
|
|
|
this.org
|
|
|
);
|
|
|
} else {
|
|
|
- if (this.cidType == 0) {
|
|
|
+ if (this.cidttt == 0) {
|
|
|
this.steps--;
|
|
|
if (this.steps == 1) {
|
|
|
setTimeout(() => {
|
|
@@ -1881,7 +1882,7 @@ export default {
|
|
|
this.$message.error("请将信息填写完整");
|
|
|
return;
|
|
|
}
|
|
|
- if (this.cidType == 0) {
|
|
|
+ if (this.cidttt == 0) {
|
|
|
if (this.steps == 1) {
|
|
|
if (this.cid == "" || this.cid == undefined) {
|
|
|
this.addWork();
|
|
@@ -1910,6 +1911,57 @@ export default {
|
|
|
this.checkEva(this.checkId);
|
|
|
}, 1000);
|
|
|
}
|
|
|
+ if (s == 4 && this.cidType == 0) {
|
|
|
+ this.$message.error("请将信息填写完整");
|
|
|
+ return;
|
|
|
+ } else if (s == 4) {
|
|
|
+ let cPan = 1;
|
|
|
+ for (var i = 0; i < this.unitJson.length; i++) {
|
|
|
+ for (
|
|
|
+ var j = 0;
|
|
|
+ j < this.unitJson[i].chapterInfo[0].taskJson.length;
|
|
|
+ j++
|
|
|
+ ) {
|
|
|
+ if (
|
|
|
+ !this.unitJson[i].chapterInfo[0].taskJson[j].task
|
|
|
+ ) {
|
|
|
+ this.$message.error("请填写任务名称");
|
|
|
+ cPan = 2
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ !this.unitJson[i].chapterInfo[0].taskJson[j].people
|
|
|
+ ) {
|
|
|
+ this.$message.error("请填写负责人");
|
|
|
+ cPan = 2
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ !this.unitJson[i].chapterInfo[0].taskJson[j].time
|
|
|
+ ) {
|
|
|
+ this.$message.error("请填写任务完成时间");
|
|
|
+ cPan = 2
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
|
|
|
+ this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
|
|
|
+ i
|
|
|
+ ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
|
|
|
+ return ele.value != "";
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (cPan == 2) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.userid != this.courseUserid) {
|
|
|
+ this.updateWork2();
|
|
|
+ } else {
|
|
|
+ this.updateWork();
|
|
|
+ }
|
|
|
+ this.steps = 4;
|
|
|
+ }
|
|
|
} else {
|
|
|
if (this.steps == 1) {
|
|
|
if (this.cid == "" || this.cid == undefined) {
|
|
@@ -1992,7 +2044,7 @@ export default {
|
|
|
this.$refs.stepBox.scrollTop = 0;
|
|
|
},
|
|
|
nextSteps() {
|
|
|
- if (this.cidType == 1) {
|
|
|
+ if (this.cidttt == 1) {
|
|
|
if (this.steps == 1) {
|
|
|
if (this.courseName != "") {
|
|
|
this.steps = 3;
|
|
@@ -2091,6 +2143,13 @@ export default {
|
|
|
this.steps++;
|
|
|
}
|
|
|
}
|
|
|
+ } else if (this.steps == 4) {
|
|
|
+ if (this.userid != this.courseUserid) {
|
|
|
+ this.updateWork2();
|
|
|
+ } else {
|
|
|
+ this.updateWork();
|
|
|
+ }
|
|
|
+ this.steps++
|
|
|
}
|
|
|
}
|
|
|
this.$refs.stepBox.scrollTop = 0;
|
|
@@ -3002,6 +3061,7 @@ export default {
|
|
|
this.cid = res.data.courseId;
|
|
|
this.courseUserid = this.userid;
|
|
|
this.islogin = true;
|
|
|
+ this.selectCourseDetail();
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
this.$message.error("网络不佳");
|
|
@@ -3154,7 +3214,7 @@ export default {
|
|
|
.post(this.$store.state.api + "updateStudentWorkNew2", params)
|
|
|
.then((res) => {
|
|
|
if (this.steps != 1 && this.steps != 2 && this.steps != 3 && this.steps != 4) {
|
|
|
- if (this.cidType == 1) {
|
|
|
+ if (this.cidttt == 1) {
|
|
|
this.$message({
|
|
|
message: "修改成功",
|
|
|
type: "success",
|
|
@@ -4135,6 +4195,7 @@ export default {
|
|
|
selectCourseDetail() {
|
|
|
if (this.cid == "" || this.cid == undefined) {
|
|
|
console.log("这是新增项目");
|
|
|
+ this.cidttt = 0
|
|
|
} else {
|
|
|
this.cidType = 1;
|
|
|
let params = {
|
|
@@ -4226,7 +4287,7 @@ export default {
|
|
|
.get(this.$store.state.api + "select_student_course_detail", params)
|
|
|
.then((res) => {
|
|
|
console.log(res.data[2]);
|
|
|
- let unitJson = JSON.parse(JSON.stringify(this.unitJson))
|
|
|
+ let unitJson = this.unitJson
|
|
|
let works = res.data[2]
|
|
|
for (var i = 0; i < unitJson.length; i++) {
|
|
|
let task = unitJson[i].chapterInfo[0].taskJson
|
|
@@ -4245,7 +4306,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- this.unitJson = unitJson
|
|
|
this.timer = setTimeout(() => {
|
|
|
this.seleteCourseUpdate();
|
|
|
}, 1000);
|