mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
合并分支
This commit is contained in:
@@ -132,8 +132,10 @@
|
||||
<el-option v-for="item in tagList" :key="item.id" :label="item.name" :value="item.name"> </el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item v-if="!weike.onlyRequired" label="关键字">
|
||||
<el-input v-model="courseInfo.keywords" maxlength="100" show-word-limit placeholder="请输入关键字(限100字以内)"></el-input>
|
||||
<el-form-item v-if="!weike.onlyRequired" label="关键字">
|
||||
<!-- <el-input v-model="courseInfo.keywords" maxlength="100" show-word-limit placeholder="请输入关键字(限100字以内)"></el-input> -->
|
||||
<el-input v-model.trim="keywords" maxlength="100" @keyup.enter.native="changeKeywords" placeholder="请输入关键字"></el-input>
|
||||
<el-tag v-for="(tag,index) in tips" size="small" :key="index" closable type="info" @close="closeKeywordsTag(tag,index)">{{ tag }}</el-tag>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="!weike.onlyRequired" label="观看设置">
|
||||
<el-radio style="margin-right: 10px;" v-model="courseInfo.device" :label="1">PC端可见</el-radio>
|
||||
@@ -251,6 +253,12 @@
|
||||
</el-select> -->
|
||||
<choice :teacherValue="teacherValues" @getTeacherList="getTeacherList"></choice>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字">
|
||||
<el-input v-model.trim="keywords" maxlength="100" @keyup.enter.native="changeKeywords" placeholder="请输入关键字"></el-input>
|
||||
<el-tag v-for="(tag,index) in tips" size="small" :key="index" closable type="info" @close="closeKeywordsTag(tag,index)">
|
||||
{{ tag }}
|
||||
</el-tag>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="资源归属" required>
|
||||
@@ -421,6 +429,8 @@ export default {
|
||||
components: { weikeContent, catalogCourseware, imageUpload, WxEditor, catalogSort,agreement,filecloud,choice,chooseOrg},
|
||||
data() {
|
||||
return {
|
||||
keywords:'',//关键字的定义
|
||||
tips:[],
|
||||
addOrder:1,
|
||||
checked:false,
|
||||
courseInfoFormCheckedShow:false,
|
||||
@@ -571,6 +581,17 @@ export default {
|
||||
this.loadUserGroup();
|
||||
},
|
||||
methods: {
|
||||
// 关键字的更改
|
||||
changeKeywords(option){
|
||||
if(option.target.value){
|
||||
this.tips.push(option.target.value)
|
||||
}
|
||||
this.keywords = ''
|
||||
},
|
||||
//关闭关键字
|
||||
closeKeywordsTag(item,index){
|
||||
this.tips.splice(index, 1);
|
||||
},
|
||||
showChooseOrg(){
|
||||
this.$refs.refChooseOrg.dlgShow = true;
|
||||
},
|
||||
@@ -744,6 +765,8 @@ export default {
|
||||
this.teacherValues = [];
|
||||
this.courseCrowds=[];
|
||||
this.courseCoverurl = '';
|
||||
// 关键字的清空
|
||||
this.tips=[];
|
||||
|
||||
if (!editData) {
|
||||
//console.log("新建课程?");
|
||||
@@ -862,6 +885,7 @@ export default {
|
||||
this.courseCoverurl = '';
|
||||
this.courseInfo.coverImg = '';
|
||||
},
|
||||
//获取课程信息
|
||||
async getDetail(id) {
|
||||
this.curCourseId = id;
|
||||
this.orgName='';
|
||||
@@ -873,6 +897,10 @@ export default {
|
||||
if(result.course.visible==''){
|
||||
result.course.visible=true;
|
||||
}
|
||||
// 给关键字赋值
|
||||
if(result.course.keywords){
|
||||
this.tips = result.course.keywords.split(',') || []
|
||||
}
|
||||
this.courseInfo = result.course;
|
||||
this.checked = false;
|
||||
this.contentInfo.list = result.contents;
|
||||
@@ -1156,6 +1184,7 @@ export default {
|
||||
if (this.showTags.length > 0) {
|
||||
this.courseInfo.tags = this.showTags.join();
|
||||
}
|
||||
this.courseInfo.keywords = this.tips.join(',') || ''
|
||||
//检查输入是否合法
|
||||
//if(!this.requireSaveCourse){
|
||||
// this.curStepIndex=2;//转到第二步处理
|
||||
|
||||
Reference in New Issue
Block a user