课程管理-马上设置点击跳转后应该是打开内容设置的页面

dev
yujialong 3 years ago
parent efa41e4756
commit 89f080c9f5
  1. 24
      src/views/course/AddCurriculum.vue
  2. 5
      src/views/course/courseconfig.vue
  3. 1
      src/views/serve/projectAdd.vue

@ -262,6 +262,7 @@ export default {
headers: {
token: sessionStorage.getItem("token")
},
isDetail: Boolean(this.$route.query.isDetail),
form: {
cid: this.$route.query.cid,
curriculumName: "",
@ -362,7 +363,15 @@ export default {
},
methods: {
goback() {
this.$router.back();
if (this.isDetail) {
this.$router.back();
} else {
this.$confirm("确定返回?未更新的信息将不会保存。", "提示", {
type: "warning"
}).then(() => {
this.$router.back();
}).catch(() => {});
}
},
getInfoData() {
this.$post(`${this.api.curriculumDetail}?cid=${this.form.cid}`).then(res => {
@ -620,13 +629,20 @@ export default {
if (this.form.cid) {
this.$post(this.api.modifyCourse, this.form).then((res) => {
this.$message.success("编辑成功");
this.goback();
this.$router.back();
}).catch((res) => {
});
} else {
this.$post(this.api.createCurriculum, this.form).then((res) => {
this.$message.success("添加成功");
this.goback();
this.$confirm("课程创建成功,是否马上进行课程内容设置?", "提示", {
type: "success",
confirmButtonText: "马上设置",
cancelButtonText: "稍后操作"
}).then(() => {
this.$router.push(`/contentSettings?cid=${res.cid}`);
}).catch(() => {
this.$router.back();
});
}).catch((res) => {
});
}

@ -255,7 +255,7 @@ export default {
if (this.previewing) {
this.closeIframe();
} else {
this.$router.back();
this.$router.push("/curriculum");
}
},
iframeOnload() {
@ -336,9 +336,6 @@ export default {
this.keyword = "";
this.getTeacher();
},
goback() {
this.$router.push("course");
},
transferType(ext) {
if ("jpg,jpeg,png,gif,svg,psd".includes(ext)) return "图片";
if ("mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv".includes(ext)) return "视频";

@ -742,6 +742,7 @@ export default {
}
.main{
overflow: auto;
overflow-x: hidden;
height: calc(100vh - 152px );
}
</style>
Loading…
Cancel
Save