From 7dc8c81223d0f9f92753410ff860205cbc8008f2 Mon Sep 17 00:00:00 2001 From: sunli_tydic Date: Fri, 19 Dec 2025 21:41:14 +0800 Subject: [PATCH] =?UTF-8?q?ai=E8=A7=86=E9=A2=91=E4=B8=80=E6=9C=9F=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=8F=90=E4=BA=A4-ai=E5=8A=9F=E8=83=BD=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Course/courseForm.vue | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/components/Course/courseForm.vue b/src/components/Course/courseForm.vue index fed1ddcb..d2540ced 100644 --- a/src/components/Course/courseForm.vue +++ b/src/components/Course/courseForm.vue @@ -158,7 +158,8 @@ placeholder="请尽量填写课程简介,用于列表中显示,可以让用户更容易了解课程信息"> - + +
@@ -367,7 +368,7 @@ - +
@@ -611,6 +612,7 @@ export default { orgId: null, name: '' }, + aiPermission: false, // ai播放器权限 aiSetTip: '是否将课程进行AI处理', //提示信息 aiAbstractTip: '一键提炼课程视频核心要点,助力学员课前高效掌握重点,快速筛选学习资源', // 提示信息 aiDraftTip: '分段展示视频内容并精准同步时间轴,实现视频进度与文稿双向定位,学习内容触手可及', //提示信息 @@ -652,6 +654,8 @@ export default { }, mounted() { this.getDictIds(); + // ai播放器相关 + this.getAiPermission(); let extendFlag=this.$route.query.f; //是否是管理端过来的 this.extendRefId=this.$route.query.refId; this.extendRefType=this.$route.query.refType; @@ -686,6 +690,16 @@ export default { this.isPermission = this.dicts.includes(orgId); console.log("--- 监听结束 this.isPermission = ",this.isPermission) }, + getAiPermission() { + apiCourse.listByUser({}).then(res => { + console.log('res', res); + if(res.code === 200){ + let index = res.data.findIndex(item => item.permissionCode === 'KjbAiSetCode'); + this.aiPermission = index !== -1; + console.log('index', index, this.aiPermission); + } + }) + }, // 关键字的更改 changeKeywords(option){ if(option.target.value){ @@ -1008,6 +1022,9 @@ export default { // ai播放器相关 // 初始化ai数据 initAiData() { + if (!this.aiPermission) { + return; + } // 如果ai设置为空则给默认值 - 会看成新增状态 if(this.courseInfo.aiSet === null || this.courseInfo.aiSet === '' || this.courseInfo.aiSet === undefined){ this.courseInfo.isAddAI = 1; //暂时是否是新增