|
@@ -5,7 +5,7 @@
|
|
|
<div class="courseTop">
|
|
|
<div class="stepsNav">
|
|
|
<el-breadcrumb separator-class="el-icon-arrow-right">
|
|
|
- <el-breadcrumb-item :to="{
|
|
|
+ <el-breadcrumb-item v-if="!back" :to="{
|
|
|
path:
|
|
|
'/test?userid=' +
|
|
|
userid +
|
|
@@ -16,6 +16,17 @@
|
|
|
'&role=' +
|
|
|
role,
|
|
|
}">表单管理</el-breadcrumb-item>
|
|
|
+ <el-breadcrumb-item v-else-if="back=='sass'" :to="{
|
|
|
+ path:
|
|
|
+ '/sassPlatform?userid=' +
|
|
|
+ userid +
|
|
|
+ '&oid=' +
|
|
|
+ oid +
|
|
|
+ '&org=' +
|
|
|
+ org +
|
|
|
+ '&role=' +
|
|
|
+ role,
|
|
|
+ }">sass平台</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item>
|
|
|
<span style="color: rgb(15, 126, 255)">新建表单</span>
|
|
|
</el-breadcrumb-item>
|
|
@@ -59,6 +70,7 @@ export default {
|
|
|
org: this.$route.query.org,
|
|
|
role: this.$route.query.role,
|
|
|
cid: this.$route.query.cid,
|
|
|
+ back: this.$route.query.back,
|
|
|
steps: 2,
|
|
|
title: "",
|
|
|
testType: [],
|
|
@@ -92,7 +104,7 @@ export default {
|
|
|
// this.$message.error("请选择权限")
|
|
|
// this.steps = 1
|
|
|
// return
|
|
|
- // }
|
|
|
+ // }
|
|
|
if (this.cid) {
|
|
|
this.updateWork(this.look)
|
|
|
} else {
|
|
@@ -103,41 +115,16 @@ export default {
|
|
|
methods: {
|
|
|
retrunCourse() {
|
|
|
this
|
|
|
- .$confirm("是否保存已编辑内容?", "提示", {
|
|
|
- confirmButtonText: "保存",
|
|
|
- cancelButtonText: "不保存",
|
|
|
+ .$confirm("退出当前页面将不保存已编辑内容,是否确定返回", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
distinguishCancelAndClose: true,
|
|
|
type: "warning",
|
|
|
})
|
|
|
.then(() => {
|
|
|
- if (this.cid == "" || this.cid == undefined) {
|
|
|
- if (this.title == "") {
|
|
|
- this.$message.error("请补充填写课程名称");
|
|
|
- return;
|
|
|
- } else {
|
|
|
- this.addWork(5);
|
|
|
- }
|
|
|
- // else if(!this.juriList.length){
|
|
|
- // this.$message.error("请选择权限")
|
|
|
- // return
|
|
|
- // }
|
|
|
- } else {
|
|
|
- if (this.title == "") {
|
|
|
- this.$message.error("请补充填写课程名称");
|
|
|
- return;
|
|
|
- } else {
|
|
|
- this.updateWork(5);
|
|
|
- }
|
|
|
- // else if(!this.juriList.length){
|
|
|
- // this.$message.error("请选择权限")
|
|
|
- // return
|
|
|
- // }
|
|
|
- }
|
|
|
- })
|
|
|
- .catch((v) => {
|
|
|
- console.log(v)
|
|
|
- if (v == "cancel") {
|
|
|
- this.goTo(
|
|
|
+ console.log(this.back)
|
|
|
+ if(!this.back){
|
|
|
+ this.goTo(
|
|
|
"/test?userid=" +
|
|
|
this.userid +
|
|
|
"&oid=" +
|
|
@@ -147,7 +134,67 @@ export default {
|
|
|
"&role=" +
|
|
|
this.role
|
|
|
);
|
|
|
- }
|
|
|
+ }else if(this.back == 'sass'){
|
|
|
+ this.goTo(
|
|
|
+ "/sassPlatform?userid=" +
|
|
|
+ this.userid +
|
|
|
+ "&oid=" +
|
|
|
+ this.oid +
|
|
|
+ "&org=" +
|
|
|
+ this.org +
|
|
|
+ "&role=" +
|
|
|
+ this.role
|
|
|
+ );
|
|
|
+ }
|
|
|
+ // if (this.cid == "" || this.cid == undefined) {
|
|
|
+ // if (this.title == "") {
|
|
|
+ // this.$message.error("请补充填写课程名称");
|
|
|
+ // return;
|
|
|
+ // } else {
|
|
|
+ // this.addWork(5);
|
|
|
+ // }
|
|
|
+ // // else if(!this.juriList.length){
|
|
|
+ // // this.$message.error("请选择权限")
|
|
|
+ // // return
|
|
|
+ // // }
|
|
|
+ // } else {
|
|
|
+ // if (this.title == "") {
|
|
|
+ // this.$message.error("请补充填写课程名称");
|
|
|
+ // return;
|
|
|
+ // } else {
|
|
|
+ // this.updateWork(5);
|
|
|
+ // }
|
|
|
+ // // else if(!this.juriList.length){
|
|
|
+ // // this.$message.error("请选择权限")
|
|
|
+ // // return
|
|
|
+ // // }
|
|
|
+ // }
|
|
|
+ })
|
|
|
+ .catch((v) => {
|
|
|
+ console.log(v)
|
|
|
+ // if (v == "cancel" && !this.back) {
|
|
|
+ // this.goTo(
|
|
|
+ // "/test?userid=" +
|
|
|
+ // this.userid +
|
|
|
+ // "&oid=" +
|
|
|
+ // this.oid +
|
|
|
+ // "&org=" +
|
|
|
+ // this.org +
|
|
|
+ // "&role=" +
|
|
|
+ // this.role
|
|
|
+ // );
|
|
|
+ // }else if(this.back == 'sass'){
|
|
|
+ // this.goTo(
|
|
|
+ // "/sassPlatform?userid=" +
|
|
|
+ // this.userid +
|
|
|
+ // "&oid=" +
|
|
|
+ // this.oid +
|
|
|
+ // "&org=" +
|
|
|
+ // this.org +
|
|
|
+ // "&role=" +
|
|
|
+ // this.role
|
|
|
+ // );
|
|
|
+ // }
|
|
|
});
|
|
|
},
|
|
|
goTo(path) {
|
|
@@ -186,7 +233,8 @@ export default {
|
|
|
this.cid = res.data.courseId;
|
|
|
if (look == 5) {
|
|
|
this.$message.success("保存成功")
|
|
|
- this.goTo(
|
|
|
+ if(!this.back){
|
|
|
+ this.goTo(
|
|
|
"/test?userid=" +
|
|
|
this.userid +
|
|
|
"&oid=" +
|
|
@@ -196,6 +244,18 @@ export default {
|
|
|
"&role=" +
|
|
|
this.role
|
|
|
);
|
|
|
+ }else if(back == 'sass'){
|
|
|
+ this.goTo(
|
|
|
+ "/sassPlatform?userid=" +
|
|
|
+ this.userid +
|
|
|
+ "&oid=" +
|
|
|
+ this.oid +
|
|
|
+ "&org=" +
|
|
|
+ this.org +
|
|
|
+ "&role=" +
|
|
|
+ this.role
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
// setTimeout(() => {
|
|
|
// this.getData(2);
|
|
@@ -248,7 +308,8 @@ export default {
|
|
|
.then((res) => {
|
|
|
if (look == 3) {
|
|
|
this.$message.success("发布成功")
|
|
|
- this.goTo(
|
|
|
+ if(!this.back){
|
|
|
+ this.goTo(
|
|
|
"/test?userid=" +
|
|
|
this.userid +
|
|
|
"&oid=" +
|
|
@@ -258,13 +319,26 @@ export default {
|
|
|
"&role=" +
|
|
|
this.role
|
|
|
);
|
|
|
+ }else if(this.back == 'sass'){
|
|
|
+ this.goTo(
|
|
|
+ "/sassPlatform?userid=" +
|
|
|
+ this.userid +
|
|
|
+ "&oid=" +
|
|
|
+ this.oid +
|
|
|
+ "&org=" +
|
|
|
+ this.org +
|
|
|
+ "&role=" +
|
|
|
+ this.role
|
|
|
+ );
|
|
|
+ }
|
|
|
} else if (look == 4) {
|
|
|
this.$message.success("保存成功")
|
|
|
} else if (look == 1 || look == 2) {
|
|
|
// this.$message.success("保存成功")
|
|
|
} else if (look == 5) {
|
|
|
this.$message.success("保存成功")
|
|
|
- this.goTo(
|
|
|
+ if(!this.back){
|
|
|
+ this.goTo(
|
|
|
"/test?userid=" +
|
|
|
this.userid +
|
|
|
"&oid=" +
|
|
@@ -274,6 +348,18 @@ export default {
|
|
|
"&role=" +
|
|
|
this.role
|
|
|
);
|
|
|
+ }else if(this.back == 'sass'){
|
|
|
+ this.goTo(
|
|
|
+ "/sassPlatform?userid=" +
|
|
|
+ this.userid +
|
|
|
+ "&oid=" +
|
|
|
+ this.oid +
|
|
|
+ "&org=" +
|
|
|
+ this.org +
|
|
|
+ "&role=" +
|
|
|
+ this.role
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
setTimeout(() => {
|
|
|
this.getData(2);
|
|
@@ -469,4 +555,4 @@ export default {
|
|
|
padding: 0 20px;
|
|
|
color: unset;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|