Commit 170e1969 by 无尘

fix: 修改人群可见范围

parent de6110da
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-09-01 17:16:25 * @Date: 2020-09-01 17:16:25
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-08 15:12:15 * @LastEditTime: 2020-09-09 09:24:47
--> -->
<!-- <!--
...@@ -34,16 +34,16 @@ ...@@ -34,16 +34,16 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="标签值" prop="childList"> <el-form-item label="标签值" prop="tagValueDTOList">
<el-tag <el-tag
:key="index+'tag'" :key="index+'tag'"
v-for="(item, index) in form.childList" v-for="(item, index) in form.tagValueDTOList"
closable closable
:disable-transitions="false" :disable-transitions="false"
@close="handleDel(index)"> @close="handleDel(index)">
{{item.tagValue}} {{item.tagValue}}
</el-tag> </el-tag>
<div v-if="form.childList.length < 20" class="m-t-5 input-tag-div"> <div v-if="form.tagValueDTOList.length < 20" class="m-t-5 input-tag-div">
<el-input <el-input
class="input-new-tag" class="input-new-tag"
v-model="inputValue" v-model="inputValue"
...@@ -103,7 +103,7 @@ export default { ...@@ -103,7 +103,7 @@ export default {
tagName: '', tagName: '',
linkId: '', linkId: '',
categoryId: this.currentCategoryId, categoryId: this.currentCategoryId,
childList: [] tagValueDTOList: []
}, },
rules: { rules: {
tagName: [ tagName: [
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
categoryId: [ categoryId: [
{ required: true, message: '请选择所属分类', trigger: 'change' } { required: true, message: '请选择所属分类', trigger: 'change' }
], ],
childList: [ tagValueDTOList: [
{ type: 'array', required: true, message: '请添加标签值', trigger: 'change' } { type: 'array', required: true, message: '请添加标签值', trigger: 'change' }
], ],
}, },
...@@ -139,14 +139,14 @@ export default { ...@@ -139,14 +139,14 @@ export default {
* @author: 无尘 * @author: 无尘
*/ */
handleDel(index) { handleDel(index) {
this.form.childList.splice(index, 1); this.form.tagValueDTOList.splice(index, 1);
}, },
handleInputConfirm() { handleInputConfirm() {
const that = this; const that = this;
let inputValue = emojiToStr(that.inputValue); let inputValue = emojiToStr(that.inputValue);
if (inputValue) { if (inputValue) {
that.form.childList.push( that.form.tagValueDTOList.push(
{ {
tagValueId: '', tagValueId: '',
tagValue: inputValue tagValue: inputValue
...@@ -189,7 +189,7 @@ export default { ...@@ -189,7 +189,7 @@ export default {
tagId: that.form.tagId, tagId: that.form.tagId,
tagName: emojiToStr(that.form.tagName), tagName: emojiToStr(that.form.tagName),
linkId: that.form.linkId, linkId: that.form.linkId,
childList: JSON.stringify(that.form.childList), tagValueDTOList: JSON.stringify(that.form.tagValueDTOList),
categoryId: that.form.categoryId, categoryId: that.form.categoryId,
enterpriseId: that.brandId, enterpriseId: that.brandId,
wxEnterpriseId: that.wxEnterpriseId wxEnterpriseId: that.wxEnterpriseId
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-28 16:51:22 * @Date: 2020-08-28 16:51:22
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-08 18:09:06 * @LastEditTime: 2020-09-09 09:26:25
--> -->
<template> <template>
...@@ -271,8 +271,8 @@ export default { ...@@ -271,8 +271,8 @@ export default {
}; };
getTagVisiable(para) getTagVisiable(para)
.then(res => { .then(res => {
that.selectMode = res.result.storeMode; that.selectMode = String(res.result.storeMode);
that.rangeData = res.result.bindRange || {}; that.rangeData = res.result.bindRange ? JSON.parse(res.result.bindRange) : [];
that.setItemId = tagId; that.setItemId = tagId;
that.showTagVisiable = true; that.showTagVisiable = true;
}) })
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-27 10:16:37 * @Date: 2020-08-27 10:16:37
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-08 18:08:51 * @LastEditTime: 2020-09-09 09:27:34
--> -->
<template> <template>
...@@ -206,8 +206,8 @@ export default { ...@@ -206,8 +206,8 @@ export default {
}; };
getVisiable(para) getVisiable(para)
.then(res => { .then(res => {
that.selectMode = res.result.storeMode; that.selectMode = String(res.result.storeMode);
that.rangeData = res.result.bindRange || {}; that.rangeData = res.result.bindRange ? JSON.parse(res.result.bindRange) : [];
that.setItemId = sceneCrowdId; that.setItemId = sceneCrowdId;
that.showSelectStore = true; that.showSelectStore = true;
}) })
...@@ -310,7 +310,11 @@ export default { ...@@ -310,7 +310,11 @@ export default {
getGroupData(para) getGroupData(para)
.then(res => { .then(res => {
that.loading = false; that.loading = false;
that.memberCrowdData = res.result || []; if (!!res.result && !!res.result.length) {
that.memberCrowdData = that.sortTable(res.result);
}else {
that.memberCrowdData = [];
}
if (!that.searchVal && !that.classifyId && !!res.result && !!res.result.length) { if (!that.searchVal && !that.classifyId && !!res.result && !!res.result.length) {
that.totalNum = res.result.length; that.totalNum = res.result.length;
} }
...@@ -318,6 +322,18 @@ export default { ...@@ -318,6 +322,18 @@ export default {
.catch(function(error) { .catch(function(error) {
that.loading = false; that.loading = false;
}); });
},
/**
* @description: 排序
* @param {Array} arr
* @returns {Array}
* @author: 无尘
*/
sortTable(arr) {
arr.sort(function(a, b) {
return (a.sort - b.sort);
});
return arr;
} }
}, },
watch: { watch: {
......
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