|
@@ -5,8 +5,8 @@
|
|
|
<MiniBoard :label="item.label" :value="headerData[item.prop]" :type="item.type" />
|
|
|
</Col>
|
|
|
<div class="ventilate-status-card">
|
|
|
- <CommonTitle label="回风井系统数量" :value="ventilatorCount" />
|
|
|
- <BasicTree class="ventilate-status-card__tree" :tree-data="treeData" :virtual="false" />
|
|
|
+ <!-- <CommonTitle label="回风井系统数量" :value="ventilatorCount" /> -->
|
|
|
+ <BasicTree class="ventilate-status-card__tree" :tree-data="treeData" :virtual="false" :expanded-keys="expandedKeys" />
|
|
|
</div>
|
|
|
</Row>
|
|
|
</template>
|
|
@@ -30,18 +30,21 @@
|
|
|
}
|
|
|
);
|
|
|
|
|
|
- const ventilatorCount = ref('0');
|
|
|
+ // const ventilatorCount = ref('0');
|
|
|
const headerData = shallowRef({});
|
|
|
const treeData = shallowRef<TreeProps['treeData']>([]);
|
|
|
+ const expandedKeys = ref<string[]>([]);
|
|
|
|
|
|
function fetchData() {
|
|
|
const info = props.data.ventInfo || DEFAULT_TEST_DATA.ventInfo;
|
|
|
const { prefix, suffix, prop, children } = VENTILATION_STATUS_TREE_CONFIG;
|
|
|
- ventilatorCount.value = info.fanMainList.length.toString();
|
|
|
+ // ventilatorCount.value = info.fanMainList.length.toString();
|
|
|
headerData.value = info;
|
|
|
+ expandedKeys.value = [];
|
|
|
|
|
|
// 处理树状图的数据
|
|
|
treeData.value = info.fanMainList.map((mainfan, i) => {
|
|
|
+ expandedKeys.value.push(i.toString());
|
|
|
return {
|
|
|
title: `${prefix}${mainfan[prop]}${suffix}`,
|
|
|
key: i.toString(),
|
|
@@ -82,7 +85,7 @@
|
|
|
// }
|
|
|
|
|
|
.ventilate-status-card__tree {
|
|
|
- height: 130px;
|
|
|
+ height: 1650px;
|
|
|
overflow: auto;
|
|
|
}
|
|
|
}
|