|
|
@ -24,8 +24,8 @@ |
|
|
|
<el-row :gutter="20" type="flex"> |
|
|
|
<el-row :gutter="20" type="flex"> |
|
|
|
<el-col :span="1" style="text-align:center;padding-top: 182px;width: 88px;" class="item-required">量化指标</el-col> |
|
|
|
<el-col :span="1" style="text-align:center;padding-top: 182px;width: 88px;" class="item-required">量化指标</el-col> |
|
|
|
<el-col :span="7"> |
|
|
|
<el-col :span="7"> |
|
|
|
<el-table ref="leftTable" :data="getFilterDataBySearchName" height="400" border highlight-current-row tooltip-effect="dark" @selection-change="leftSelectionChange"> |
|
|
|
<el-table ref="leftTable" :data="getFilterDataBySearchName" :row-key="getRowKey" height="400" border highlight-current-row tooltip-effect="dark" @selection-change="leftSelectionChange"> |
|
|
|
<el-table-column type="selection" width="55"></el-table-column> |
|
|
|
<el-table-column type="selection" :reserve-selection="true" width="55"></el-table-column> |
|
|
|
<el-table-column header-align="right" label="未选择 10/10"> |
|
|
|
<el-table-column header-align="right" label="未选择 10/10"> |
|
|
|
<el-table-column prop="name" label="名称" show-overflow-tooltip> |
|
|
|
<el-table-column prop="name" label="名称" show-overflow-tooltip> |
|
|
|
<template slot="header" slot-scope="scope"> |
|
|
|
<template slot="header" slot-scope="scope"> |
|
|
@ -192,25 +192,11 @@ |
|
|
|
console.info(error) |
|
|
|
console.info(error) |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
getRowKey (row) {// 指定一个key标识这一行的数据 |
|
|
|
|
|
|
|
return row.id //id为row的data属性之一,必须唯一且与tableData中保持一致 |
|
|
|
|
|
|
|
}, |
|
|
|
leftSelectionChange(selection) { |
|
|
|
leftSelectionChange(selection) { |
|
|
|
debugger; |
|
|
|
|
|
|
|
//ZqqTODO 待测试 |
|
|
|
|
|
|
|
this.leftSelectedRows = selection; |
|
|
|
this.leftSelectedRows = selection; |
|
|
|
let searchData = this.getFilterDataBySearchName; |
|
|
|
|
|
|
|
searchData.forEach(item => { |
|
|
|
|
|
|
|
if (selection.filter(itemTmp => {return itemTmp.id == item.id;}).length > 0) { |
|
|
|
|
|
|
|
item._checked = true; |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
item._checked = false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.leftDictTargetList.forEach(item2 => { |
|
|
|
|
|
|
|
for (let i = 0; i < searchData.length; i++) { |
|
|
|
|
|
|
|
if (searchData[i].id==item2.id){ |
|
|
|
|
|
|
|
item2._checked = searchData[i]._checked; //赋值为searchData[i]._checked,不能直接赋值true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
addToRight() { |
|
|
|
addToRight() { |
|
|
|
console.info("addToRight") |
|
|
|
console.info("addToRight") |
|
|
|