修复部分问题
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user