|
@@ -10596,7 +10596,7 @@ export default {
|
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- addWork() {
|
|
|
|
|
|
|
+ addWork(gotype) {
|
|
|
let cPan = 1;
|
|
let cPan = 1;
|
|
|
for (var i = 0; i < this.unitJson.length; i++) {
|
|
for (var i = 0; i < this.unitJson.length; i++) {
|
|
|
for (
|
|
for (
|
|
@@ -10677,21 +10677,27 @@ export default {
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
console.log(this.steps);
|
|
console.log(this.steps);
|
|
|
// if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
|
|
// if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
|
|
|
- this.$message({
|
|
|
|
|
- message: "新增成功",
|
|
|
|
|
- type: "success"
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if(gotype !== 2){
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "新增成功",
|
|
|
|
|
+ type: "success"
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
// }
|
|
// }
|
|
|
this.number = res.data.ordernumber;
|
|
this.number = res.data.ordernumber;
|
|
|
this.courseId = res.data.courseId;
|
|
this.courseId = res.data.courseId;
|
|
|
this.cid = res.data.courseId;
|
|
this.cid = res.data.courseId;
|
|
|
this.courseUserid = this.userid;
|
|
this.courseUserid = this.userid;
|
|
|
this.islogin = true;
|
|
this.islogin = true;
|
|
|
- this.steps = 4;
|
|
|
|
|
- this.addOp3('1', "", { courseid: this.courseId ,type: "course_easyMode_clickUpload" }, "success")
|
|
|
|
|
|
|
+ if(gotype !== 2){
|
|
|
|
|
+ this.steps = 4;
|
|
|
|
|
+ this.addOp3('1', "", { courseid: this.courseId ,type: "course_easyMode_clickUpload" }, "success")
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
.catch(err => {
|
|
.catch(err => {
|
|
|
- this.addOp3('1', "", { courseid: this.courseId ,type: "course_easyMode_clickUpload" }, err)
|
|
|
|
|
|
|
+ if(gotype !== 2){
|
|
|
|
|
+ this.addOp3('1', "", { courseid: this.courseId ,type: "course_easyMode_clickUpload" }, err)
|
|
|
|
|
+ }
|
|
|
this.$message.error("网络不佳");
|
|
this.$message.error("网络不佳");
|
|
|
console.error(err);
|
|
console.error(err);
|
|
|
});
|
|
});
|
|
@@ -10699,7 +10705,7 @@ export default {
|
|
|
goCourse() {
|
|
goCourse() {
|
|
|
window.topU.postMessage({ cid: this.courseId, type: "1" }, "*");
|
|
window.topU.postMessage({ cid: this.courseId, type: "1" }, "*");
|
|
|
},
|
|
},
|
|
|
- updateWork2() {
|
|
|
|
|
|
|
+ updateWork2(gotype) {
|
|
|
let _unitIndex = this.unitIndex;
|
|
let _unitIndex = this.unitIndex;
|
|
|
let cPan = 1;
|
|
let cPan = 1;
|
|
|
for (
|
|
for (
|
|
@@ -10736,20 +10742,24 @@ export default {
|
|
|
this.ajax
|
|
this.ajax
|
|
|
.post(this.$store.state.api + "updateWorkNew4", params)
|
|
.post(this.$store.state.api + "updateWorkNew4", params)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
- this.$message({
|
|
|
|
|
- message: "修改成功",
|
|
|
|
|
- type: "success"
|
|
|
|
|
- });
|
|
|
|
|
- this.courseId = this.cid;
|
|
|
|
|
- this.addOp3('1', "", { courseid: this.courseId ,type: "course_easyMode_clickUpload" }, "success")
|
|
|
|
|
|
|
+ if(gotype !== 2){
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "修改成功",
|
|
|
|
|
+ type: "success"
|
|
|
|
|
+ });
|
|
|
|
|
+ this.courseId = this.cid;
|
|
|
|
|
+ this.addOp3('1', "", { courseid: this.courseId ,type: "course_easyMode_clickUpload" }, "success")
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
.catch(err => {
|
|
.catch(err => {
|
|
|
- this.addOp3('1', "", { courseid: this.courseId ,type: "course_easyMode_clickUpload" }, err)
|
|
|
|
|
|
|
+ if(gotype !== 2){
|
|
|
|
|
+ this.addOp3('1', "", { courseid: this.courseId ,type: "course_easyMode_clickUpload" }, err)
|
|
|
|
|
+ }
|
|
|
this.$message.error("网络不佳");
|
|
this.$message.error("网络不佳");
|
|
|
console.error(err);
|
|
console.error(err);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- updateWork() {
|
|
|
|
|
|
|
+ updateWork(gotype) {
|
|
|
let cPan = 1;
|
|
let cPan = 1;
|
|
|
for (var i = 0; i < this.unitJson.length; i++) {
|
|
for (var i = 0; i < this.unitJson.length; i++) {
|
|
|
for (
|
|
for (
|
|
@@ -10829,25 +10839,32 @@ export default {
|
|
|
.post(this.$store.state.api + "updateWorkNew2", params)
|
|
.post(this.$store.state.api + "updateWorkNew2", params)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
// if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
|
|
// 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"
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if (gotype !== 2) {
|
|
|
|
|
+ if (this.cidType == 1) {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "修改成功",
|
|
|
|
|
+ type: "success"
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: "新增成功",
|
|
|
|
|
+ type: "success"
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
// }
|
|
// }
|
|
|
this.number = this.nbOrder;
|
|
this.number = this.nbOrder;
|
|
|
this.courseId = this.cid;
|
|
this.courseId = this.cid;
|
|
|
- this.steps = 4;
|
|
|
|
|
|
|
+ if(gotype !== 2){
|
|
|
|
|
+ this.steps = 4;
|
|
|
|
|
+ this.addOp3('1', "", { courseid: this.courseId ,type: "course_easyMode_clickUpload" }, "success")
|
|
|
|
|
+ }
|
|
|
this.addOp3('1', "", { courseid: this.courseId ,type: "course_easyMode_clickUpload" }, "success")
|
|
this.addOp3('1', "", { courseid: this.courseId ,type: "course_easyMode_clickUpload" }, "success")
|
|
|
})
|
|
})
|
|
|
.catch(err => {
|
|
.catch(err => {
|
|
|
- this.addOp3('1', "", { courseid: this.courseId ,type: "course_easyMode_clickUpload" }, err)
|
|
|
|
|
|
|
+ if(gotype !== 2){
|
|
|
|
|
+ this.addOp3('1', "", { courseid: this.courseId ,type: "course_easyMode_clickUpload" }, err)
|
|
|
|
|
+ }
|
|
|
this.$message.error("网络不佳");
|
|
this.$message.error("网络不佳");
|
|
|
console.error(err);
|
|
console.error(err);
|
|
|
});
|
|
});
|
|
@@ -13891,12 +13908,12 @@ export default {
|
|
|
},
|
|
},
|
|
|
saveCourse(){
|
|
saveCourse(){
|
|
|
if (this.cid == "" || this.cid == undefined) {
|
|
if (this.cid == "" || this.cid == undefined) {
|
|
|
- this.addWork();
|
|
|
|
|
|
|
+ this.addWork(2);
|
|
|
} else {
|
|
} else {
|
|
|
if (this.userid != this.courseUserid && this.role != "1") {
|
|
if (this.userid != this.courseUserid && this.role != "1") {
|
|
|
- this.updateWork2();
|
|
|
|
|
|
|
+ this.updateWork2(2);
|
|
|
} else {
|
|
} else {
|
|
|
- this.updateWork();
|
|
|
|
|
|
|
+ this.updateWork(2);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|