Commit 170e1969 by 无尘

fix: 修改人群可见范围

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