修复部分问题

This commit is contained in:
gxwebsoft
2023-06-05 16:50:04 +08:00
parent 6fcff7b0e1
commit 01a57c177e
17 changed files with 1355 additions and 273 deletions

View File

@@ -370,41 +370,6 @@
});
};
/* 查询 */
const query2 = () => {
loading.value = true;
listTowerModel()
.then((list) => {
loading.value = false;
data2List.value = list;
const eks: number[] = [];
list.forEach((d) => {
d.key = d.categoryId;
d.value = d.categoryId;
if (typeof d.categoryId === 'number') {
eks.push(d.categoryId);
}
});
expandedRowKeys.value = eks;
data2.value = toTreeData({
data: list,
idField: 'categoryId',
parentIdField: 'parentId'
});
if (list.length) {
if (typeof list[0].categoryId === 'number') {
selectedRowKeys.value = [list[0].categoryId];
}
} else {
selectedRowKeys.value = [];
}
})
.catch((e) => {
loading.value = false;
message.error(e.message);
});
};
/* 自定义行属性 */
const customRow = (record: Accessory) => {
return {
@@ -420,7 +385,6 @@
};
query();
query2();
</script>
<script lang="ts">