mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-15 05:46:43 +08:00
ai功能静态
This commit is contained in:
@@ -329,6 +329,45 @@
|
||||
placeholder="请尽量填写课程简介,用于列表中显示,可以让用户更容易了解课程信息">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="AI设置">
|
||||
<div>
|
||||
<div style="display: flex; align-items: center;gap: 10px;">
|
||||
<div style="display: flex; align-items: center;gap: 3px;">
|
||||
<el-tooltip class="item" effect="dark" content="是否将课程进行AI处理" placement="top">
|
||||
<i class="el-icon-question" style="margin-left: 5px; color: #909399; cursor: pointer;"></i>
|
||||
</el-tooltip>
|
||||
<span>AI处理状态:</span>
|
||||
</div>
|
||||
<el-switch v-model="courseInfo.aiSet" active-value="1" inactive-value="0"></el-switch>
|
||||
</div>
|
||||
<div v-show="courseInfo.aiSet==1">
|
||||
<el-row :gutter="20" style="margin: 10px 0;">
|
||||
<el-col :span="9" style="display: flex; align-items: center;gap: 10px;">
|
||||
<span>是否需要生成AI摘要:</span>
|
||||
<el-radio-group v-model="courseInfo.aiAbstract">
|
||||
<el-radio label="1">是</el-radio>
|
||||
<el-radio label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
<el-col :span="10" style="display: flex; align-items: center;gap: 10px;">
|
||||
<span>是否需要生成AI文稿:</span>
|
||||
<el-radio-group v-model="courseInfo.aiDraft">
|
||||
<el-radio label="1">是</el-radio>
|
||||
<el-radio label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" style="margin: 10px 0;">
|
||||
<el-col :span="20" style="display: flex; align-items: center;gap: 10px;">
|
||||
<span>请选择该课程所支持的语种:</span>
|
||||
<el-select v-model="courseInfo.languageCode" placeholder="请选择" multiple filterable style="width: 240px;">
|
||||
<el-option v-for="item in selectAllLang" :key="item.key" :label="item.label" :value="item.srclang"> </el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<!-- v-if="!weike.onlyRequired" -->
|
||||
<!-- <el-form-item label="课程描述">
|
||||
<WxEditor v-model="courseInfo.overview" :minHeight="50"></WxEditor>
|
||||
@@ -542,7 +581,7 @@ export default {
|
||||
this.getSceneData();
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['resOwnerMap', 'sysTypeMap','userInfo','identity']),
|
||||
...mapGetters(['resOwnerMap', 'sysTypeMap','userInfo','identity', 'selectAllLang']),
|
||||
catalogTree() {
|
||||
let treeList = [];
|
||||
let $this = this;
|
||||
@@ -951,6 +990,18 @@ export default {
|
||||
this.dicts = result.dicts; //课程的老师信息
|
||||
console.log("--- 编辑查看 this.isPermission = ",this.isPermission)
|
||||
console.log("--- 编辑查看 this.dicts = ",this.dicts)
|
||||
// 如果ai设置为空则给默认值 - 会看成新增状态
|
||||
if(this.courseInfo.aiSet === null || this.courseInfo.aiSet === '' || this.courseInfo.aiSet === undefined){
|
||||
this.courseInfo.isAddAI = '1'; //暂时是否是新增
|
||||
this.courseInfo.aiSet = '1';
|
||||
this.courseInfo.aiAbstract = '1';
|
||||
this.courseInfo.aiDraft = '1';
|
||||
this.courseInfo.aiTranslate = '1';
|
||||
this.courseInfo.languageCode = ['zh-CN', 'en-US'];
|
||||
} else {
|
||||
// 获取ai设置信息
|
||||
this.courseInfo.isAddAI = '0';
|
||||
}
|
||||
if(!this.courseInfo.orgId){
|
||||
//根据课程创建者获取机构id
|
||||
apiUser.getOrgSimpleByUserId(result.course.sysCreateAid).then(ors=>{
|
||||
|
||||
Reference in New Issue
Block a user