|
@@ -41,7 +41,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="flex1 ov-hd d-flex flex-cln">
|
|
<div class="flex1 ov-hd d-flex flex-cln">
|
|
|
<div class="flex1 ov-hd">
|
|
<div class="flex1 ov-hd">
|
|
|
- <vxe-table ref="tableLeftRef" :loading="loading" border :data="list" height="100%" :column-config="{ resizable: true }" :row-config="{keyField: 'id',isCurrent: true, isHover: true}" :checkbox-config="{ checkRowKeys: checkRowKeys, highlight: true, range: true, trigger: 'row', reserve: true }">
|
|
|
|
|
|
|
+ <vxe-table ref="tableLeftRef" :loading="loading" border :cell-class-name="formatterCheckbox" :data="list" height="100%" :column-config="{ resizable: true }" :row-config="{keyField: 'id',isCurrent: true, isHover: true}" :checkbox-config="{ checkRowKeys: checkRowKeys, highlight: true, range: true, trigger: 'row', reserve: true }">
|
|
|
<vxe-column type="checkbox" width="60"></vxe-column>
|
|
<vxe-column type="checkbox" width="60"></vxe-column>
|
|
|
<!-- 序号 -->
|
|
<!-- 序号 -->
|
|
|
<vxe-column type="seq" width="60" title="序号" align="center" />
|
|
<vxe-column type="seq" width="60" title="序号" align="center" />
|
|
@@ -119,6 +119,11 @@ const getList = async () => {
|
|
|
const res = await itemsList(queryParams.value);
|
|
const res = await itemsList(queryParams.value);
|
|
|
if (!res || res.code !== 200) return;
|
|
if (!res || res.code !== 200) return;
|
|
|
list.value = res.rows;
|
|
list.value = res.rows;
|
|
|
|
|
+ res.rows.forEach((item: any) => {
|
|
|
|
|
+ if (targetList.value.some((target: any) => target.id === item.id)) {
|
|
|
|
|
+ tableLeftRef.value?.setCheckboxRow([item], true);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
total.value = res.total;
|
|
total.value = res.total;
|
|
|
loading.value = false;
|
|
loading.value = false;
|
|
|
};
|
|
};
|
|
@@ -199,6 +204,7 @@ const clearAll = () => {
|
|
|
targetList.value = [];
|
|
targetList.value = [];
|
|
|
};
|
|
};
|
|
|
const checkRowKeys = ref<any>([]);
|
|
const checkRowKeys = ref<any>([]);
|
|
|
|
|
+// const c
|
|
|
// 设置已选
|
|
// 设置已选
|
|
|
const setSelectItems = (val: any) => {
|
|
const setSelectItems = (val: any) => {
|
|
|
targetList.value = val;
|
|
targetList.value = val;
|