编辑项目->检查某个项目是否包含在课程配置中

dev_2022-03-03
jialong.yu 3 years ago
parent 4443263399
commit 336e0a9421
  1. 1
      src/utils/api.js
  2. 11
      src/views/serve/projectAdd.vue

@ -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`, //修改章节

@ -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 => {

Loading…
Cancel
Save