|
@@ -59,7 +59,11 @@
|
|
|
:raceProcess="raceProcess"
|
|
|
v-if="steps == 4"
|
|
|
></ProjectActpro>
|
|
|
- <ProjectExceva @upExc="updateProExc" :raceExceva="raceExceva" v-if="steps == 5"></ProjectExceva>
|
|
|
+ <ProjectExceva
|
|
|
+ @upExc="updateProExc"
|
|
|
+ :raceExceva="raceExceva"
|
|
|
+ v-if="steps == 5"
|
|
|
+ ></ProjectExceva>
|
|
|
<ProjectEffect
|
|
|
@upproEff="updateProEff"
|
|
|
:raceEffect="raceEffect"
|
|
@@ -83,7 +87,7 @@
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
@click="dialogVisible1 = true"
|
|
|
- v-if="steps != 1"
|
|
|
+ v-if="steps ==2"
|
|
|
>跳过</el-button
|
|
|
>
|
|
|
<el-button type="primary" @click="lastSteps" v-if="steps != 1"
|
|
@@ -235,7 +239,18 @@ export default {
|
|
|
this.steps = steps;
|
|
|
},
|
|
|
nextSteps() {
|
|
|
- this.steps++;
|
|
|
+ if (this.steps == 1) {
|
|
|
+ if (this.raceInfo.title == "") {
|
|
|
+ this.$message.error("请将信息填写完整");
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ this.steps++;
|
|
|
+ }
|
|
|
+ } else if(2 <= this.steps < 6) {
|
|
|
+ this.dialogVisible1 = true;
|
|
|
+ this.steps++;
|
|
|
+ }
|
|
|
+ this.isAddOrUpRace1(3);
|
|
|
},
|
|
|
lastSteps() {
|
|
|
this.steps--;
|
|
@@ -258,12 +273,20 @@ export default {
|
|
|
updateProEff(raceEff) {
|
|
|
this.raceEffect = raceEff;
|
|
|
},
|
|
|
- updateProExc(raceExc){
|
|
|
+ updateProExc(raceExc) {
|
|
|
this.raceExceva = raceExc;
|
|
|
},
|
|
|
isAddOrUpRace(t) {
|
|
|
this.isJump = t;
|
|
|
- if (this.aid == "") {
|
|
|
+ if (this.aid == "" || this.aid == undefined) {
|
|
|
+ this.addRace();
|
|
|
+ } else {
|
|
|
+ this.updateRace();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ isAddOrUpRace1(t) {
|
|
|
+ this.isJump = t;
|
|
|
+ if (this.aid == "" || this.aid == undefined) {
|
|
|
this.addRace();
|
|
|
} else {
|
|
|
this.updateRace();
|
|
@@ -276,8 +299,8 @@ export default {
|
|
|
info: JSON.stringify(this.raceInfo).replaceAll(/%/g, "%25"),
|
|
|
over: JSON.stringify(this.raceOverView).replaceAll(/%/g, "%25"),
|
|
|
pro: JSON.stringify(this.raceProcess).replaceAll(/%/g, "%25"),
|
|
|
- act:JSON.stringify(this.raceProcess).replaceAll(/%/g, "%25"),
|
|
|
- exc:JSON.stringify(this.raceExceva).replaceAll(/%/g, "%25"),
|
|
|
+ act: JSON.stringify(this.raceProcess).replaceAll(/%/g, "%25"),
|
|
|
+ exc: JSON.stringify(this.raceExceva).replaceAll(/%/g, "%25"),
|
|
|
courseType: JSON.stringify(this.raceInfo.type).replaceAll(
|
|
|
/%/g,
|
|
|
"%25"
|
|
@@ -288,17 +311,24 @@ export default {
|
|
|
this.ajax
|
|
|
.post(this.$store.state.api + "addRace", params)
|
|
|
.then((res) => {
|
|
|
- this.$message({
|
|
|
- message: "新增成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
+ this.aid = res.data.courseId;
|
|
|
if (this.isJump == 0) {
|
|
|
+ this.$message({
|
|
|
+ message: "新增成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
this.dialogVisible = true;
|
|
|
- } else {
|
|
|
+ } else if (this.isJump == 1) {
|
|
|
+ this.$message({
|
|
|
+ message: "新增成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
this.goTo(
|
|
|
"/eventCenter?userid=" + this.userid + "&oid=" + this.oid
|
|
|
);
|
|
|
this.dialogVisible1 = false;
|
|
|
+ } else {
|
|
|
+ console.log("下一步");
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
@@ -313,8 +343,8 @@ export default {
|
|
|
info: JSON.stringify(this.raceInfo).replaceAll(/%/g, "%25"),
|
|
|
over: JSON.stringify(this.raceOverView).replaceAll(/%/g, "%25"),
|
|
|
pro: JSON.stringify(this.raceProcess).replaceAll(/%/g, "%25"),
|
|
|
- act:JSON.stringify(this.raceProcess).replaceAll(/%/g, "%25"),
|
|
|
- exc:JSON.stringify(this.raceExceva).replaceAll(/%/g, "%25"),
|
|
|
+ act: JSON.stringify(this.raceProcess).replaceAll(/%/g, "%25"),
|
|
|
+ exc: JSON.stringify(this.raceExceva).replaceAll(/%/g, "%25"),
|
|
|
res: JSON.stringify(this.raceEffect).replaceAll(/%/g, "%25"),
|
|
|
courseType: JSON.stringify(this.raceInfo.type).replaceAll(
|
|
|
/%/g,
|
|
@@ -326,17 +356,23 @@ export default {
|
|
|
this.ajax
|
|
|
.post(this.$store.state.api + "updateRace", params)
|
|
|
.then((res) => {
|
|
|
- this.$message({
|
|
|
- message: "修改成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
if (this.isJump == 0) {
|
|
|
+ this.$message({
|
|
|
+ message: "新增成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
this.dialogVisible = true;
|
|
|
- } else {
|
|
|
+ } else if (this.isJump == 1) {
|
|
|
+ this.$message({
|
|
|
+ message: "新增成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
this.goTo(
|
|
|
"/eventCenter?userid=" + this.userid + "&oid=" + this.oid
|
|
|
);
|
|
|
this.dialogVisible1 = false;
|
|
|
+ } else {
|
|
|
+ console.log("下一步");
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
@@ -413,7 +449,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
.race_nav .active {
|
|
|
- background: #4a83d0;
|
|
|
+ background: #3d5ea1;
|
|
|
}
|
|
|
|
|
|
.race_body {
|