Commit be93511f authored by liuyang's avatar liuyang

课程添加用户标签

parent eebf9728
...@@ -147,6 +147,9 @@ ...@@ -147,6 +147,9 @@
<a-radio value="SPECIFY"> <a-radio value="SPECIFY">
指定企业 指定企业
</a-radio> </a-radio>
<a-radio value="USER_TAG">
标签可见
</a-radio>
</a-radio-group> </a-radio-group>
</a-form-model-item> </a-form-model-item>
...@@ -158,6 +161,14 @@ ...@@ -158,6 +161,14 @@
</a-select> </a-select>
</a-form-model-item> </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 }"> <a-form-item :wrapper-col="{ span: 24 }">
<div class="btn-div"> <div class="btn-div">
<a-button type="primary" @click="onSave" :disabled="isReadOnly"> <a-button type="primary" @click="onSave" :disabled="isReadOnly">
...@@ -246,6 +257,8 @@ import { ...@@ -246,6 +257,8 @@ import {
fetchList as fetchEnterprise fetchList as fetchEnterprise
} from "@/api/biz/enterprise"; } from "@/api/biz/enterprise";
import {fetchList as fetchUserTagList} from "@/api/admin/user_tag";
export default { export default {
// 创建完毕 // 创建完毕
created() { created() {
...@@ -270,6 +283,13 @@ export default { ...@@ -270,6 +283,13 @@ export default {
}).then((res) => { }).then((res) => {
this.enterprise = res.data; this.enterprise = res.data;
}); });
fetchUserTagList({
pageIndex: 1,
pageSize: 10000
}).then(res => {
this.userTagList = res.data;
})
fetchTagList({ fetchTagList({
pageIndex: 1, pageIndex: 1,
...@@ -461,6 +481,7 @@ export default { ...@@ -461,6 +481,7 @@ export default {
allowOrgIds: [], allowOrgIds: [],
tagIds: [], tagIds: [],
tagNames: [], tagNames: [],
userTagIds: '',
}, },
//上传封面时的进度条 //上传封面时的进度条
loading: false, loading: false,
...@@ -476,6 +497,8 @@ export default { ...@@ -476,6 +497,8 @@ export default {
pageSize: 10, pageSize: 10,
}, },
detailPicList: [], detailPicList: [],
userTagList: [],
selectedUserTagIds: []
}; };
}, },
methods: { methods: {
...@@ -563,6 +586,11 @@ export default { ...@@ -563,6 +586,11 @@ export default {
handleEnterpriseChange(value) { handleEnterpriseChange(value) {
this.step1FormModel.allowOrgIds = value; this.step1FormModel.allowOrgIds = value;
}, },
handleUserTagChange(value){
this.selectedUserTagIds = value;
this.step1FormModel.userTagIds = value.join(',');
// console.log(this.step1FormModel.userTagIds);
},
handleSeriesSearch(value) { handleSeriesSearch(value) {
this.fetchSeriesData(value, (data) => { this.fetchSeriesData(value, (data) => {
const _items = []; const _items = [];
...@@ -617,6 +645,7 @@ export default { ...@@ -617,6 +645,7 @@ export default {
} }
}, },
handleTagChange(values) { handleTagChange(values) {
// console.log(value)
this.selectedTags = values; this.selectedTags = values;
}, },
handleTeacherChange(value) { handleTeacherChange(value) {
...@@ -645,6 +674,7 @@ export default { ...@@ -645,6 +674,7 @@ export default {
validPeriod, validPeriod,
vipPrice, vipPrice,
tagIds, tagIds,
userTagIds,
} = this.step1FormModel; } = this.step1FormModel;
//验证 //验证
if (!name) { if (!name) {
...@@ -724,6 +754,7 @@ export default { ...@@ -724,6 +754,7 @@ export default {
chaperList, chaperList,
tagIds, tagIds,
attachmenIds: [], attachmenIds: [],
userTagIds,
}; };
if (this.currentSeries) { if (this.currentSeries) {
course.seriesId = this.currentSeries.key; course.seriesId = this.currentSeries.key;
...@@ -754,6 +785,7 @@ export default { ...@@ -754,6 +785,7 @@ export default {
}) })
course.detail = urlList.join(',') course.detail = urlList.join(',')
} }
saveCourse(course).then((res) => { saveCourse(course).then((res) => {
if (res.resp_code === 200) { if (res.resp_code === 200) {
this.$message.success("课程保存成功"); this.$message.success("课程保存成功");
...@@ -831,6 +863,15 @@ export default { ...@@ -831,6 +863,15 @@ export default {
}); });
}); });
this.videoSeries = _videoSeries; 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 { } else {
this.$message.info(res.resp_msg); this.$message.info(res.resp_msg);
} }
......
...@@ -3,7 +3,8 @@ ...@@ -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 * 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' 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