mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-16 22:36:43 +08:00
ai视频一期功能提交-ai功能新增权限判断
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
import ajax from '@/utils/xajax.js'
|
import ajax from '@/utils/xajax.js'
|
||||||
|
import ajax2 from '../unionAjax.js';
|
||||||
/**
|
/**
|
||||||
* 保存课程基本信息,新增和更新都是此方式
|
* 保存课程基本信息,新增和更新都是此方式
|
||||||
* @param {Object} data
|
* @param {Object} data
|
||||||
@@ -445,6 +445,9 @@ const ids=function (data){
|
|||||||
const benchAiSet=function(data){
|
const benchAiSet=function(data){
|
||||||
return ajax.postJson('/xboe/m/course/manage/benchAiSet',data);
|
return ajax.postJson('/xboe/m/course/manage/benchAiSet',data);
|
||||||
}
|
}
|
||||||
|
const listByUser=function(data){
|
||||||
|
return ajax2.get('/manageApi/admin/thirdApi/permission/listByUser?permissionType=PAGE');
|
||||||
|
}
|
||||||
export default {
|
export default {
|
||||||
saveBase,
|
saveBase,
|
||||||
submitCourse,
|
submitCourse,
|
||||||
@@ -488,6 +491,7 @@ export default {
|
|||||||
exportCourse,
|
exportCourse,
|
||||||
queryCrowd,
|
queryCrowd,
|
||||||
ids,
|
ids,
|
||||||
benchAiSet
|
benchAiSet,
|
||||||
|
listByUser,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,15 +68,15 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<!-- <el-button icon="el-icon-folder" type="primary" size="small">导出</el-button> -->
|
<!-- <el-button icon="el-icon-folder" type="primary" size="small">导出</el-button> -->
|
||||||
<el-button class="Create-coures" type="primary" @click="addNewCourse()" icon="el-icon-plus">新建课程</el-button>
|
<el-button class="Create-coures" type="primary" @click="addNewCourse()" icon="el-icon-plus">新建课程</el-button>
|
||||||
<el-button type="primary" @click="setLanguage()" icon="el-icon-connection" :disabled="selectedCourses.length === 0">设置语种</el-button>
|
<el-button v-if="aiPermission" type="primary" @click="setLanguage()" icon="el-icon-connection" :disabled="selectedCourses.length === 0">设置语种</el-button>
|
||||||
<el-button type="primary" @click="enableAI()" icon="el-icon-switch-button" :disabled="selectedCourses.length === 0">开启AI处理</el-button>
|
<el-button v-if="aiPermission" type="primary" @click="enableAI()" icon="el-icon-switch-button" :disabled="selectedCourses.length === 0">开启AI处理</el-button>
|
||||||
</el-col >
|
</el-col >
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-right:30px;">
|
<div style="margin-right:30px;">
|
||||||
<!-- ai播放器相关 -->
|
<!-- ai播放器相关 -->
|
||||||
<el-table style="margin:10px 32px 10px 22px;" :data="pageData" border stripe @selection-change="handleSelectionChange">
|
<el-table style="margin:10px 32px 10px 22px;" :data="pageData" border stripe @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55"></el-table-column>
|
<el-table-column v-if="aiPermission" type="selection" width="55"></el-table-column>
|
||||||
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||||
<el-table-column v-if="forChoose" label="选择" width="80">
|
<el-table-column v-if="forChoose" label="选择" width="80">
|
||||||
<template slot-scope="scope" v-if="scope.row.published">
|
<template slot-scope="scope" v-if="scope.row.published">
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
<template slot-scope="scope" class="btn-gl">
|
<template slot-scope="scope" class="btn-gl">
|
||||||
<!-- 20240621 修改scope.row.isPermission = fasle 时不展示操作按钮-->
|
<!-- 20240621 修改scope.row.isPermission = fasle 时不展示操作按钮-->
|
||||||
<!-- ai播放器相关 -->
|
<!-- ai播放器相关 -->
|
||||||
<el-button v-if="scope.row.isPermission && scope.row.status != 2" type="text" size="mini" @click="setAI(scope.row)">AI设置</el-button>
|
<el-button v-if="aiPermission && scope.row.isPermission && scope.row.status != 2" type="text" size="mini" @click="setAI(scope.row)">AI设置</el-button>
|
||||||
<el-button type="text" size="mini" v-if="scope.row.isPermission && scope.row.status == 5 && !scope.row.published" @click="releaseData(scope.row)">发布</el-button>
|
<el-button type="text" size="mini" v-if="scope.row.isPermission && scope.row.status == 5 && !scope.row.published" @click="releaseData(scope.row)">发布</el-button>
|
||||||
<el-button v-if="scope.row.isPermission && pageManage && scope.row.published" @click="showStudent(scope.row)" type="text" size="mini">学员</el-button>
|
<el-button v-if="scope.row.isPermission && pageManage && scope.row.published" @click="showStudent(scope.row)" type="text" size="mini">学员</el-button>
|
||||||
<el-button v-if="scope.row.isPermission && !forChoose && scope.row.published" @click="showManageStudy(scope.row)" type="text" size="mini">管理</el-button>
|
<el-button v-if="scope.row.isPermission && !forChoose && scope.row.published" @click="showManageStudy(scope.row)" type="text" size="mini">管理</el-button>
|
||||||
@@ -631,6 +631,7 @@ export default {
|
|||||||
extendRefId:'',
|
extendRefId:'',
|
||||||
extendRefType:'',
|
extendRefType:'',
|
||||||
// ai播放器相关
|
// ai播放器相关
|
||||||
|
aiPermission: false,
|
||||||
selectedCourses: [], //已选课程
|
selectedCourses: [], //已选课程
|
||||||
languageSetting: { // 设置语种弹框
|
languageSetting: { // 设置语种弹框
|
||||||
dlgShow: false,
|
dlgShow: false,
|
||||||
@@ -659,6 +660,8 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
// ai播放器相关
|
||||||
|
this.getAiPermission();
|
||||||
this.getAudiences()
|
this.getAudiences()
|
||||||
let chooseFlag=this.$route.query.f;
|
let chooseFlag=this.$route.query.f;
|
||||||
this.extendRefId=this.$route.query.refId;
|
this.extendRefId=this.$route.query.refId;
|
||||||
@@ -1285,6 +1288,16 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user