|
@@ -83,6 +83,7 @@
|
|
|
<el-button type="primary" @click="setTime" v-if="steps == 2"
|
|
|
>跳过</el-button
|
|
|
>
|
|
|
+ <el-button type="primary" @click="saveRace(1)">保存</el-button>
|
|
|
<el-button type="primary" @click="lastSteps" v-if="steps != 1"
|
|
|
>上一步</el-button
|
|
|
>
|
|
@@ -199,11 +200,12 @@ export default {
|
|
|
dialogVisible: false,
|
|
|
dialogVisible1: false,
|
|
|
dialogVisible2: false,
|
|
|
+ isNoDia: 0,
|
|
|
isJump: 0,
|
|
|
raceInfo: {
|
|
|
title: "",
|
|
|
type: [],
|
|
|
- typeOtherName:"",
|
|
|
+ typeOtherName: "",
|
|
|
cover: [],
|
|
|
autor: [],
|
|
|
tableData: [],
|
|
@@ -409,7 +411,7 @@ export default {
|
|
|
// this.dialogVisible1 = true;
|
|
|
// this.steps++;
|
|
|
// }
|
|
|
- this.isAddOrUpRace1(3);
|
|
|
+ // this.isAddOrUpRace1(3);
|
|
|
},
|
|
|
lastSteps() {
|
|
|
this.steps--;
|
|
@@ -484,6 +486,15 @@ export default {
|
|
|
// this.$message.error("课程分类不能为空");
|
|
|
}
|
|
|
},
|
|
|
+ saveRace(noDia) {
|
|
|
+ this.isNoDia = noDia;
|
|
|
+ if (this.aid == "" || this.aid == undefined) {
|
|
|
+ this.isAddOrUpRace(0);
|
|
|
+ // this.addRace();
|
|
|
+ } else {
|
|
|
+ this.updateRace();
|
|
|
+ }
|
|
|
+ },
|
|
|
isAddOrUpRace1(t) {
|
|
|
this.isJump = t;
|
|
|
if (this.aid == "" || this.aid == undefined) {
|
|
@@ -513,18 +524,34 @@ export default {
|
|
|
.then((res) => {
|
|
|
this.aid = res.data.courseId;
|
|
|
if (this.isJump == 0) {
|
|
|
- this.$message({
|
|
|
- message: "新增成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- this.dialogVisible = true;
|
|
|
+ if (this.isNoDia == 0) {
|
|
|
+ this.dialogVisible = true;
|
|
|
+ this.$message({
|
|
|
+ message: "新增成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: "保存成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.isNoDia = 0;
|
|
|
+ }
|
|
|
} else if (this.isJump == 1) {
|
|
|
- this.$message({
|
|
|
- message: "新增成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- this.goTo("/eventCenter?steps=" + "2");
|
|
|
- this.dialogVisible1 = false;
|
|
|
+ if (this.isNoDia == 0) {
|
|
|
+ this.$message({
|
|
|
+ message: "新增成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.goTo("/eventCenter?steps=" + "2");
|
|
|
+ this.dialogVisible1 = false;
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: "保存成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.isNoDia = 0;
|
|
|
+ }
|
|
|
} else {
|
|
|
console.log("下一步");
|
|
|
}
|
|
@@ -555,18 +582,34 @@ export default {
|
|
|
.post(this.$store.state.api + "updateRace", params)
|
|
|
.then((res) => {
|
|
|
if (this.isJump == 0) {
|
|
|
- this.$message({
|
|
|
- message: "修改成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- this.dialogVisible = true;
|
|
|
+ if (this.isNoDia == 0) {
|
|
|
+ this.dialogVisible = true;
|
|
|
+ this.$message({
|
|
|
+ message: "修改成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: "保存成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.isNoDia = 0;
|
|
|
+ }
|
|
|
} else if (this.isJump == 1) {
|
|
|
- this.$message({
|
|
|
- message: "修改成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- this.goTo("/eventCenter?steps=" + "2");
|
|
|
- this.dialogVisible1 = false;
|
|
|
+ if (this.isNoDia == 0) {
|
|
|
+ this.$message({
|
|
|
+ message: "修改成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.goTo("/eventCenter?steps=" + "2");
|
|
|
+ this.dialogVisible1 = false;
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: "保存成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.isNoDia = 0;
|
|
|
+ }
|
|
|
} else {
|
|
|
console.log("下一步");
|
|
|
}
|