|
@@ -15,7 +15,7 @@
|
|
|
</div>
|
|
|
<div>填写基本信息</div>
|
|
|
</div>
|
|
|
- <div v-show="cid == ''" class="secondNo">
|
|
|
+ <div v-show="cidType === 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 />
|
|
@@ -56,7 +56,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
|
|
|
- <div style="width: 100%; height: 100%; overflow: auto">
|
|
|
+ <div style="width: 100%; height: 100%; overflow: auto" ref="stepBox">
|
|
|
<div class="courseTop">
|
|
|
<div class="stepsNav">
|
|
|
<h3 class="info_title" v-if="steps == 1">课程内容填写</h3>
|
|
@@ -570,6 +570,7 @@
|
|
|
>
|
|
|
<div>
|
|
|
<div>
|
|
|
+ <div style="font-size: 22px;color: #8e8e8e;">任务{{ itemTaskIndex + 1 }}</div>
|
|
|
<div
|
|
|
class="chapter_contentbox"
|
|
|
style="
|
|
@@ -2193,7 +2194,6 @@
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
@click="addcheckList(askJson.askJson[index1])"
|
|
|
- v-if="askJson.askJson[index1].askItem < 4"
|
|
|
>添加</el-button
|
|
|
>
|
|
|
<el-button
|
|
@@ -2800,7 +2800,22 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
navSteps(s) {
|
|
|
+ if (this.courseName == "") {
|
|
|
+ this.$message.error("请将信息填写完整");
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (this.cidType == 0) {
|
|
|
+ if (this.steps == 1) {
|
|
|
+ if (this.cid == "" || this.cid == undefined) {
|
|
|
+ this.addWork();
|
|
|
+ } else {
|
|
|
+ if (this.userid != this.courseUserid) {
|
|
|
+ // this.updateWork2();
|
|
|
+ } else {
|
|
|
+ this.updateWork();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if (s == 1) {
|
|
|
this.steps = 1;
|
|
|
setTimeout(() => {
|
|
@@ -2819,6 +2834,17 @@ export default {
|
|
|
}, 1000);
|
|
|
}
|
|
|
} else {
|
|
|
+ if (this.steps == 1) {
|
|
|
+ if (this.cid == "" || this.cid == undefined) {
|
|
|
+ this.addWork();
|
|
|
+ } else {
|
|
|
+ if (this.userid != this.courseUserid) {
|
|
|
+ // this.updateWork2();
|
|
|
+ } else {
|
|
|
+ this.updateWork();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if (s == 1) {
|
|
|
this.steps = 1;
|
|
|
setTimeout(() => {
|
|
@@ -2834,6 +2860,7 @@ export default {
|
|
|
}, 1000);
|
|
|
}
|
|
|
}
|
|
|
+ this.$refs.stepBox.scrollTop = 0;
|
|
|
},
|
|
|
nextSteps() {
|
|
|
if (this.cidType == 1) {
|
|
@@ -2843,6 +2870,15 @@ export default {
|
|
|
setTimeout(() => {
|
|
|
this.checkEva(this.checkId);
|
|
|
}, 1000);
|
|
|
+ if (this.cid == "" || this.cid == undefined) {
|
|
|
+ this.addWork();
|
|
|
+ } else {
|
|
|
+ if (this.userid != this.courseUserid) {
|
|
|
+ // this.updateWork2();
|
|
|
+ } else {
|
|
|
+ this.updateWork();
|
|
|
+ }
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$message.error("请将信息填写完整");
|
|
|
return;
|
|
@@ -2873,6 +2909,15 @@ export default {
|
|
|
} else {
|
|
|
if (this.steps == 1) {
|
|
|
if (this.courseName != "") {
|
|
|
+ if (this.cid == "" || this.cid == undefined) {
|
|
|
+ this.addWork();
|
|
|
+ } else {
|
|
|
+ if (this.userid != this.courseUserid) {
|
|
|
+ // this.updateWork2();
|
|
|
+ } else {
|
|
|
+ this.updateWork();
|
|
|
+ }
|
|
|
+ }
|
|
|
this.steps++;
|
|
|
} else {
|
|
|
this.$message.error("请将信息填写完整");
|
|
@@ -2911,6 +2956,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ this.$refs.stepBox.scrollTop = 0;
|
|
|
},
|
|
|
unitSet(i) {
|
|
|
this.unitIndex = i;
|
|
@@ -3522,12 +3568,17 @@ export default {
|
|
|
this.ajax
|
|
|
.post(this.$store.state.api + "addWorkNew2", params)
|
|
|
.then((res) => {
|
|
|
- this.$message({
|
|
|
- message: "新增成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
+ console.log(this.steps);
|
|
|
+ if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
|
|
|
+ this.$message({
|
|
|
+ message: "新增成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ }
|
|
|
this.number = res.data.ordernumber;
|
|
|
this.courseId = res.data.courseId;
|
|
|
+ this.cid = res.data.courseId;
|
|
|
+ this.courseUserid = this.userid;
|
|
|
this.islogin = true;
|
|
|
})
|
|
|
.catch((err) => {
|
|
@@ -3647,7 +3698,17 @@ export default {
|
|
|
cid: this.cid,
|
|
|
title: this.courseName,
|
|
|
brief: this.courseText.replace(/%/g, "%25"),
|
|
|
- cover: this.cover.length > 0 ? JSON.stringify(this.cover) : "",
|
|
|
+ cover:
|
|
|
+ this.cover.length > 0
|
|
|
+ ? JSON.stringify(this.cover)
|
|
|
+ : JSON.stringify([
|
|
|
+ {
|
|
|
+ name: "noBanner.jpg",
|
|
|
+ url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/noBanner1656409780264.jpg",
|
|
|
+ uid: 1656409780264,
|
|
|
+ status: "success",
|
|
|
+ },
|
|
|
+ ]),
|
|
|
evaId: this.evalua,
|
|
|
astudent:
|
|
|
this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
|
|
@@ -3663,10 +3724,19 @@ export default {
|
|
|
this.ajax
|
|
|
.post(this.$store.state.api + "updateWorkNew2", params)
|
|
|
.then((res) => {
|
|
|
- this.$message({
|
|
|
- message: "修改成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
+ if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
|
|
|
+ if (this.cidType == 1) {
|
|
|
+ this.$message({
|
|
|
+ message: "修改成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: "新增成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
this.number = this.nbOrder;
|
|
|
this.courseId = this.cid;
|
|
|
})
|
|
@@ -4043,11 +4113,11 @@ export default {
|
|
|
this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
|
|
|
.toolChoose[toolIndex].askJson[0].checkList < 2
|
|
|
) {
|
|
|
- this.openTools(itemTaskIndex, 4, toolIndex)
|
|
|
- this.$message({
|
|
|
- message: "请填写完整问卷内容",
|
|
|
- type: "error",
|
|
|
- });
|
|
|
+ this.openTools(itemTaskIndex, 4, toolIndex);
|
|
|
+ // this.$message({
|
|
|
+ // message: "请填写完整问卷内容",
|
|
|
+ // type: "error",
|
|
|
+ // });
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
@@ -4058,11 +4128,11 @@ export default {
|
|
|
this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
|
|
|
.toolChoose[toolIndex].answerQ == ""
|
|
|
) {
|
|
|
- this.openTools(itemTaskIndex, 15, toolIndex)
|
|
|
- this.$message({
|
|
|
- message: "请填写问答内容",
|
|
|
- type: "error",
|
|
|
- });
|
|
|
+ this.openTools(itemTaskIndex, 15, toolIndex);
|
|
|
+ // this.$message({
|
|
|
+ // message: "请填写问答内容",
|
|
|
+ // type: "error",
|
|
|
+ // });
|
|
|
return;
|
|
|
}
|
|
|
}
|