From 336e0a9421e050b3f129997008059ce2c6911e9c Mon Sep 17 00:00:00 2001 From: "jialong.yu" Date: Fri, 21 Jan 2022 17:32:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E9=A1=B9=E7=9B=AE->=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E6=9F=90=E4=B8=AA=E9=A1=B9=E7=9B=AE=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=8C=85=E5=90=AB=E5=9C=A8=E8=AF=BE=E7=A8=8B=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/api.js | 1 + src/views/serve/projectAdd.vue | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/utils/api.js b/src/utils/api.js index 67e0964..650dd50 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -110,6 +110,7 @@ export default { delCourse: `${host}/nakadai/nakadai/curriculum/delCourse`, //单个、批量删除课程 isShelves: `${host}/nakadai/nakadai/curriculum/isShelves`, //上下架课程 getInternalProjectBySystemId: `${host}/occupationlab/projectManage/getInternalProjectBySystemId`, //根据系统id、项目权限获取系统内置项目 + checkConfig: `${host}/nakadai/nakadai/curriculum/checkConfig`, // 课程章节管理 addChapter: `${host}/nakadai/curriculum/chapter/addChapter`, //添加章节 editChapter: `${host}/nakadai/curriculum/chapter/editChapter`, //修改章节 diff --git a/src/views/serve/projectAdd.vue b/src/views/serve/projectAdd.vue index b67b42a..8ee8b78 100644 --- a/src/views/serve/projectAdd.vue +++ b/src/views/serve/projectAdd.vue @@ -248,6 +248,7 @@ export default { isDel: 0 // 是否删除(0、未删除 1、已删除 默认0) }, projectJudgmentData: [], //实验任务(项目判分点) + oriPer: '', // 原始项目权限,用于保存的时候对比是否有修改该值,如果有,要调另一个接口查询提示 selectedProjectJudgment: [], // 选中的项目判分点 dialogVisible: false, // 选择判分点对话框 @@ -350,6 +351,7 @@ export default { let { projectManage, projectJudgmentVos } = res; this.projectManage = projectManage; this.projectJudgmentData = projectJudgmentVos; + this.oriPer = projectManage.permissions this.projectJudgmentData.forEach((e, i) => { e.sort = i + 1; }); @@ -475,7 +477,14 @@ export default { updateProject(params) { // 更新项目 this.$post(`${this.api.updateProjectManage}`, params).then(res => { if (res.status === 200) { - this.$message.success("更新实验项目成功"); + // 中台创建的项目,并且更改了项目权限,就需要调这个接口 + if (!params.projectManage.founder && this.oriPer !== params.projectManage.permissions) { + this.$get(`${this.api.checkConfig}?projectId=${this.projectId}`).then(res => { + this.$message.success(res.message === 'success' ? '更新实验项目成功' : res.message) + }).catch(err => {}) + } else { + this.$message.success('更新实验项目成功') + } this.$router.back(); } }).catch(err => {