From 206f0e825d9dc051b1ad1f8b57777bae2b7a2dfa Mon Sep 17 00:00:00 2001 From: 670788339 <670788339@qq.com> Date: Sun, 20 Jul 2025 15:39:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=85=E5=86=85=E7=BD=91=E5=8F=AF=E8=A7=81-?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Course/courseForm.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/components/Course/courseForm.vue b/src/components/Course/courseForm.vue index 45e1cc62..83389e6b 100644 --- a/src/components/Course/courseForm.vue +++ b/src/components/Course/courseForm.vue @@ -491,6 +491,7 @@ export default { }, visibleShow:false, isPermission:false, + dicts:[], extendRefId:'', extendRefType:'', courseTeachers: [], //课程的老师 @@ -558,6 +559,7 @@ export default { handler(newVal) { //需要保存 this.requireSaveCourse = true; + this.checkOrgPermission(newVal.orgId); }, deep: true } @@ -584,6 +586,14 @@ export default { this.loadUserGroup(); }, methods: { + // 检查机构权限 + checkOrgPermission(orgId) { + if (!orgId) { + this.isPermission = false; + return; + } + this.isPermission = this.dicts.includes(orgId); + }, // 关键字的更改 changeKeywords(option){ if(option.target.value){ @@ -892,7 +902,8 @@ export default { async getDetail(id) { this.curCourseId = id; this.orgName=''; - let $this = this; + this.isPermission = false; + let $this = this; try { const { result, status } = await apiCourse.detail(id); if (status === 200) { @@ -910,6 +921,7 @@ export default { this.sectionInfo.list = result.sections; this.courseTeachers = result.teachers; //课程的老师信息 this.isPermission = result.teachers; //课程的老师信息 + this.dicts = result.dicts; //课程的老师信息 if(!this.courseInfo.orgId){ //根据课程创建者获取机构id