Commit eccb97b3 by 无尘

fix: 修改同步人群选择

parent 08ac973d
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-08-28 10:31:09
* @LastEditors: 无尘
* @LastEditTime: 2020-09-09 11:09:15
* @LastEditTime: 2020-09-15 16:51:59
-->
<!--
<sync-crowd-dialog :brand-id="brandId" :select-ids="selectIds" :total-num="totalNum" @refreshData="refreshData"></sync-crowd-dialog>
......@@ -167,10 +167,23 @@ export default {
/**
* @description: 表格---多选
* @param {Array} val
* @returns {Boolean}
* @author: 无尘
*/
handleSelectionChange(val) {
const that = this;
// 1.选择的数量>可选数量
if (val && val.length > 20 - that.totalNum) {
val.splice(val.length - 1, 1);
const ids = val.map(ele => ele.sceneCrowdId);
that.tableData.forEach(row => {
if (ids.includes(row.sceneCrowdId)) {
that.$refs.multipleTable.toggleRowSelection(row);
}
});
that.multipleSelection = val;
return false;
}
that.multipleSelection = val;
},
/**
......
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