优化 监控中心 前端样式

This commit is contained in:
fks-yangshouda
2024-08-23 16:47:16 +08:00
parent 6362c00860
commit 68015eb31e
5 changed files with 70 additions and 12 deletions

View File

@@ -10,6 +10,7 @@
placeholder="请选择设备类型"
v-model:value="value"
style="width: 100%"
:treeDefaultExpandedKeys="firstKey"
:tree-line="treeLine && { showLeafIcon }"
:tree-data="treeData1"
@change="changeDeviceType" />
@@ -123,10 +124,14 @@
orgId.value = result;
const treeData1 = ref<TreeSelectProps['treeData']>([]);
const firstKey = ref<String[]>([]);
http.post(device.queryDeviceTree, { orgId: orgId.value }).then((res) => {
treeData1.value = formatTreeData(res.data);
debugger;
if (treeData1.value && treeData1.value.length > 0) {
firstKey.value = [treeData1.value[0].value];
}
// if (treeData1.value && treeData1.value.length > 0) {
// if (treeData1.value[0].children) {
// value.value = treeData1.value[0].children[0].value;
@@ -401,6 +406,7 @@
treeLoading,
select,
divWidth,
firstKey,
};
},
});