Commit 1c24700f by 无尘

fix: 修改标签可见范围

parent 56eb820c
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-28 11:07:46 * @Date: 2020-08-28 11:07:46
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-04 14:55:32 * @LastEditTime: 2020-09-08 09:42:28
--> -->
<!-- <!--
<edit-visiable :brand-id="brandId" :set-item-id="setItemId" :set-type="setType" :select-mode="selectMode" :range-data="rangeData" @refreshData="refreshData"></edit-visiable> <edit-visiable :brand-id="brandId" :set-item-id="setItemId" :set-type="setType" :select-mode="selectMode" :range-data="rangeData" @refreshData="refreshData"></edit-visiable>
...@@ -166,7 +166,7 @@ export default { ...@@ -166,7 +166,7 @@ export default {
wxEnterpriseId: that.wxEnterpriseId, wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId, enterpriseId: that.brandId,
storeMode: String(that.formData.sendRange), storeMode: String(that.formData.sendRange),
bingRange: that.formData.bindStoreMode > 0 ? that.formData.bindStoreMode == 1 ? that.formData.selectList.map(ele=>ele.storeGroupId).join(',') : that.formData.selectList.map(ele=>ele.storeInfoId).join(',') : '', bingRange: that.formData.sendRange > 0 ? that.formData.sendRange == 1 ? that.formData.selectList.map(ele=>ele.storeGroupId).join(',') : that.formData.selectList.map(ele=>ele.storeInfoId).join(',') : '',
}; };
if (that.setType == 'crowd') { if (that.setType == 'crowd') {
params.sceneCrowdId = that.setItemId; params.sceneCrowdId = that.setItemId;
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-09-01 11:09:16 * @Date: 2020-09-01 11:09:16
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-07 17:47:41 * @LastEditTime: 2020-09-08 09:27:17
--> -->
<!-- <!--
<tag-classify-list :tag-list="tagList" :current-classify-id="currentClassifyId" :brand-id="brandId" @refreshClassify="refreshClassify" @changeClass="changeClass"></tag-classify-list> <tag-classify-list :tag-list="tagList" :current-classify-id="currentClassifyId" :brand-id="brandId" @refreshClassify="refreshClassify" @resetCurrentId="resetCurrentId" @changeClass="changeClass"></tag-classify-list>
import tagClassifyList from '@/components/app/my-customer/tag-classify-list.vue'; import tagClassifyList from '@/components/app/my-customer/tag-classify-list.vue';
--> -->
<template> <template>
...@@ -126,7 +126,12 @@ export default { ...@@ -126,7 +126,12 @@ export default {
}; };
delClassify(para) delClassify(para)
.then(res => { .then(res => {
that.$emit('refreshClassify'); // 这里要判断一下当前选中的分类和删除分类是不是同一个
if (categoryId == that.currentClassifyId) {
that.$emit('resetCurrentId');
}else {
that.$emit('refreshClassify');
}
if (res.code == '0000') { if (res.code == '0000') {
showMsg.showmsg('删除成功', 'success'); showMsg.showmsg('删除成功', 'success');
}else { }else {
......
...@@ -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-07 18:20:55 * @LastEditTime: 2020-09-08 09:29:21
--> -->
<template> <template>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div class="clerk-tag-add text-center m-b-10"> <div class="clerk-tag-add text-center m-b-10">
<el-button class="w-117" icon="el-icon-plus" @click="toAddCate">新建分类</el-button> <el-button class="w-117" icon="el-icon-plus" @click="toAddCate">新建分类</el-button>
</div> </div>
<tag-classify-list :tag-list="tagsClassifyData" :current-classify-id="currentClassify" :brand-id="brandId" @refreshClassify="refreshClassify" @changeClass="changeClass"></tag-classify-list> <tag-classify-list :tag-list="tagsClassifyData" :current-classify-id="currentClassify" :brand-id="brandId" @refreshClassify="refreshClassify" @changeClass="changeClass" @resetCurrentId="resetCurrentId"></tag-classify-list>
</div> </div>
<div class="clerk-tag-right p-20 border-box"> <div class="clerk-tag-right p-20 border-box">
<div class="clerk-tag-search"> <div class="clerk-tag-search">
...@@ -88,6 +88,7 @@ export default { ...@@ -88,6 +88,7 @@ export default {
return { return {
wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '', wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '',
currentClassify: '', currentClassify: '',
searchVal: '',
tagsClassifyData: [], tagsClassifyData: [],
tagsData: [], tagsData: [],
showTagDialog: false, // 标签 showTagDialog: false, // 标签
...@@ -197,6 +198,15 @@ export default { ...@@ -197,6 +198,15 @@ export default {
that.getClassifyList(); that.getClassifyList();
}, },
/** /**
* @description: 如果删除的分类是当前选中分类,就要重新设置当前选中分类
* @author: 无尘
*/
resetCurrentId() {
const that = this;
that.currentClassify = '';
that.getClassifyList();
},
/**
* @description: 添加标签 * @description: 添加标签
* @author: 无尘 * @author: 无尘
*/ */
......
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