Commit c06b0e7e by 无尘

fix: 修改场景人群

parent 57da2a42
......@@ -4,10 +4,10 @@
* @Author: 无尘
* @Date: 2020-08-28 10:31:09
* @LastEditors: 无尘
* @LastEditTime: 2020-09-04 16:18:44
* @LastEditTime: 2020-09-07 09:45:16
-->
<!--
<sync-crowd-dialog :brand-id="brandId" :total-num="totalNum" @refreshData="refreshData"></sync-crowd-dialog>
<sync-crowd-dialog :brand-id="brandId" :select-ids="selectIds" :total-num="totalNum" @refreshData="refreshData"></sync-crowd-dialog>
import syncCrowdDialog from '@/components/app/my-customer/sync-crowd-dialog.vue';
-->
<template>
......@@ -27,10 +27,10 @@
</div>
<div class="m-t-20">
<el-table class="select-table" v-loading="loadingPage" ref="multipleTable" height="500" :data="tableData" tooltip-effect="dark" :style="{ width: '100%' }" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column type="selection" :selectable="selectable" width="55"> </el-table-column>
<el-table-column prop="" label="人群名称" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.sceneCrowdName || '--' }}
{{selectIds.includes(scope.row.sceneCrowdId) ? '(已选择)':''}}{{ scope.row.sceneCrowdName || '--' }}
</template>
</el-table-column>
<el-table-column prop="" label="所属分类" show-overflow-tooltip>
......@@ -74,8 +74,14 @@ export default {
totalNum: {
type: [ String, Number ],
default: '0'
},
selectIds: {
type: Array,
default() {
return [];
}
},
},
data() {
return {
wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '',
......@@ -103,6 +109,21 @@ export default {
},
methods: {
/**
* @description: 禁用当前已选数据
* @param {Object} row
* @param {Number} index
* @return {Boolean}
* @author: 无尘
*/
selectable(row, index) {
const that = this;
if(that.selectIds.includes(row.sceneCrowdId)){
return false;
}else {
return true;
}
},
/**
* @description: 确定保存
* @param {String} form
* @returns {Boolean}
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-08-27 10:16:37
* @LastEditors: 无尘
* @LastEditTime: 2020-09-04 15:44:48
* @LastEditTime: 2020-09-07 09:48:06
-->
<template>
......@@ -64,7 +64,7 @@
</el-table>
</div>
</div>
<sync-crowd-dialog v-if="showSync" :total-num="totalNum" :brand-id="brandId" @refreshData="refreshData"></sync-crowd-dialog>
<sync-crowd-dialog v-if="showSync" :select-ids="selectIds" :total-num="totalNum" :brand-id="brandId" @refreshData="refreshData"></sync-crowd-dialog>
<edit-visiable v-if="showSelectStore" :brand-id="brandId" :set-item-id="setItemId" :set-type="'crowd'" :select-mode="selectMode" :range-data="rangeData" @refreshData="refreshData"></edit-visiable>
</div>
</template>
......@@ -106,7 +106,8 @@ export default {
showSelectStore: false, // 可见范围显示
selectMode: '', // 选择类型 0:所有; 1:分组; 2:门店
rangeData: [], // 选择的分组或门店
setItemId: '' // 选中的场景 id
setItemId: '', // 选中的场景 id
selectIds: [] // 已选的所以场景 id
};
},
// 生命周期 - 挂载完成(访问DOM元素)
......@@ -178,6 +179,7 @@ export default {
*/
toSync() {
const that = this;
that.selectIds = that.memberCrowdData.map(ele => ele.sceneCrowdId) || [];
that.showSync = true;
},
/**
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-08-27 10:16:37
* @LastEditors: 无尘
* @LastEditTime: 2020-09-04 10:10:29
* @LastEditTime: 2020-09-07 10:23:56
-->
<template>
<div class="common-app-right">
......@@ -85,7 +85,8 @@ export default {
shopOrder: that.customerShowData.shopOrder ? 1 : '0',
allowGuideMobile: that.customerShowData.allowGuideMobile ? 1 : '0',
allowGuideMessage: that.customerShowData.allowGuideMessage ? 1 : '0',
allowGuideOnlineChat: that.customerShowData.allowGuideOnlineChat ? 1 : '0'
allowGuideOnlineChat: that.customerShowData.allowGuideOnlineChat ? 1 : '0',
switchType: 1
};
saveCustomerSet(para)
.then(res => {
......
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