Commit be93511f authored by liuyang's avatar liuyang

课程添加用户标签

parent eebf9728
......@@ -147,6 +147,9 @@
<a-radio value="SPECIFY">
指定企业
</a-radio>
<a-radio value="USER_TAG">
标签可见
</a-radio>
</a-radio-group>
</a-form-model-item>
......@@ -158,6 +161,14 @@
</a-select>
</a-form-model-item>
<a-form-model-item v-if="step1FormModel.allow === 'USER_TAG'" label="选择标签">
<a-select mode="multiple" placeholder="选择标签" v-model="selectedUserTagIds" @change="handleUserTagChange">
<a-select-option v-for="(t) in this.userTagList" :key="t.id">
{{ t.name }}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-item :wrapper-col="{ span: 24 }">
<div class="btn-div">
<a-button type="primary" @click="onSave" :disabled="isReadOnly">
......@@ -246,6 +257,8 @@ import {
fetchList as fetchEnterprise
} from "@/api/biz/enterprise";
import {fetchList as fetchUserTagList} from "@/api/admin/user_tag";
export default {
// 创建完毕
created() {
......@@ -270,6 +283,13 @@ export default {
}).then((res) => {
this.enterprise = res.data;
});
fetchUserTagList({
pageIndex: 1,
pageSize: 10000
}).then(res => {
this.userTagList = res.data;
})
fetchTagList({
pageIndex: 1,
......@@ -461,6 +481,7 @@ export default {
allowOrgIds: [],
tagIds: [],
tagNames: [],
userTagIds: '',
},
//上传封面时的进度条
loading: false,
......@@ -476,6 +497,8 @@ export default {
pageSize: 10,
},
detailPicList: [],
userTagList: [],
selectedUserTagIds: []
};
},
methods: {
......@@ -563,6 +586,11 @@ export default {
handleEnterpriseChange(value) {
this.step1FormModel.allowOrgIds = value;
},
handleUserTagChange(value){
this.selectedUserTagIds = value;
this.step1FormModel.userTagIds = value.join(',');
// console.log(this.step1FormModel.userTagIds);
},
handleSeriesSearch(value) {
this.fetchSeriesData(value, (data) => {
const _items = [];
......@@ -617,6 +645,7 @@ export default {
}
},
handleTagChange(values) {
// console.log(value)
this.selectedTags = values;
},
handleTeacherChange(value) {
......@@ -645,6 +674,7 @@ export default {
validPeriod,
vipPrice,
tagIds,
userTagIds,
} = this.step1FormModel;
//验证
if (!name) {
......@@ -724,6 +754,7 @@ export default {
chaperList,
tagIds,
attachmenIds: [],
userTagIds,
};
if (this.currentSeries) {
course.seriesId = this.currentSeries.key;
......@@ -754,6 +785,7 @@ export default {
})
course.detail = urlList.join(',')
}
saveCourse(course).then((res) => {
if (res.resp_code === 200) {
this.$message.success("课程保存成功");
......@@ -831,6 +863,15 @@ export default {
});
});
this.videoSeries = _videoSeries;
//用户标签
console.log(this.step1FormModel.allow)
if(this.step1FormModel.allow == 'USER_TAG'){
this.step1FormModel.userTagIds.split(',').forEach(item => {
this.selectedUserTagIds.push(parseInt(item));
})
}
} else {
this.$message.info(res.resp_msg);
}
......
......@@ -3,7 +3,8 @@
* https://cli.vuejs.org/zh/config/#%E7%9B%AE%E6%A0%87%E6%B5%8F%E8%A7%88%E5%99%A8
*
*/
const url = 'http://edu.qkdata.com:10081'
// const url = 'http://edu.qkdata.com:10081'
const url = 'http://localhost:9090'
// 基础路径,发布前修改这里,当前配置打包出来的资源都是相对路径
let publicPath = '/admin'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment