Commit 1980dc39 by 无尘

fix: 修改同步人群选择

parent a13042c5
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-08-28 10:31:09
* @LastEditors: 无尘
* @LastEditTime: 2020-09-15 16:51:59
* @LastEditTime: 2020-09-15 16:59:59
-->
<!--
<sync-crowd-dialog :brand-id="brandId" :select-ids="selectIds" :total-num="totalNum" @refreshData="refreshData"></sync-crowd-dialog>
......@@ -173,15 +173,15 @@ export default {
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);
const selNum = 20 - that.totalNum;
if (val && val.length > selNum) {
that.multipleSelection = val.slice(0, selNum);
const ids = that.multipleSelection.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