课程管理列表适应管理端的调整

This commit is contained in:
daihh
2023-03-04 14:39:16 +08:00
parent c33f71f64f
commit 9778a7f7ee
3 changed files with 54 additions and 7 deletions

View File

@@ -108,6 +108,9 @@
<el-form-item label="目标人群" required>
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
</el-form-item>
<el-form-item v-if="visibleShow" label="学员可见">
<el-checkbox v-model="courseInfo.visible"></el-checkbox>
</el-form-item>
<el-form-item label="受众" v-if="!weike.onlyRequired">
<el-select value-key="id" style="width: 100%;" v-model="courseCrowds" filterable multiple :clearable="false" @remove-tag="removeCrowd" placeholder="请选择">
<el-option v-for="item in userGroupList" :key="item.id" :disabled="item.disabled" :label="item.name" :value="item"></el-option>
@@ -256,7 +259,14 @@
</el-input>
</el-form-item>
<el-form-item label="目标人群" required>
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
<el-col :span="14">
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
</el-col>
<el-col :span="10">
<el-form-item v-if="visibleShow" label="学员可见">
<el-checkbox v-model="courseInfo.visible"></el-checkbox>
</el-form-item>
</el-col>
</el-form-item>
<el-form-item label="受众"><!--:disabled="item.disabled"-->
<el-select value-key="id" style="width: 100%;" v-model="courseCrowds" filterable multiple :clearable="false" @remove-tag="removeCrowd" placeholder="请选择">
@@ -463,7 +473,13 @@ export default {
status: 1,
summary: '',
overview: '',
visible:true,
refId:'',
refType:''
},
visibleShow:false,
extendRefId:'',
extendRefType:'',
courseTeachers: [], //课程的老师
courseCrowds:[],//课程的用户受众
curContent: { id: '', contentType: 0, csectionId: '', contentName: '', contentRefId: '' }, //当前编辑的内容
@@ -534,6 +550,12 @@ export default {
}
},
mounted() {
let extendFlag=this.$route.query.f; //是否是管理端过来的
this.extendRefId=this.$route.query.refId;
this.extendRefType=this.$route.query.refId;
if(extendFlag && extendFlag=='choose'){
this.visibleShow=true;
}
this.curStepIndex = 1; //回到第一步
this.btnLoading = false;
this.getResOwnerTree().then(rs => {
@@ -705,8 +727,13 @@ export default {
status: 1,
summary: '',
overview: '',
// checked:false,
visible:true,
refId:this.extendRefId,
refType:this.extendRefType
};
if(this.extendRefId){
this.courseInfo.visible=false;
}
this.contentInfo.list = [];
this.sectionInfo.list = [];
this.courseTeachers = [];
@@ -842,6 +869,9 @@ export default {
const { result, status } = await apiCourse.detail(id);
if (status === 200) {
//把数据附给三个对象
if(result.course.visible==''){
result.course.visible=true;
}
this.courseInfo = result.course;
this.checked = false;
this.contentInfo.list = result.contents;