add:照明系统/通风系统 交互改动

This commit is contained in:
chenpingsen
2024-08-20 14:13:40 +08:00
parent 400839e865
commit 2d40e8d26d
17 changed files with 446 additions and 207 deletions

View File

@@ -56,14 +56,15 @@
ref="tabs1Ref"
@reset="reset"
@reload="reload"
@changeArea="changeArea"
@reset-all="resetDrawer"
@change-area="changeArea"
:treeData="treeData" />
</a-tab-pane>
<a-tab-pane key="2" tab="计划列表" force-render>
<tabs2 />
<tabs2 ref="tabs2Ref" @reset-all="resetDrawer" />
</a-tab-pane>
<a-tab-pane key="3" tab="日志">
<tabs3 />
<tabs3 ref="tabs3Ref" @reset-all="resetDrawer" />
</a-tab-pane>
</a-tabs>
</a-drawer>
@@ -269,8 +270,29 @@
const toggleDrawer = () => {
visible.value = !visible.value;
};
// 当其中一个tab产生了数据修改可以调用该方法重置所有tab
const resetDrawer = () => {
// 设备点阵重置
getBulbs();
// tab1重置
reload();
tabs1Ref.value.refresh();
// tab2 tab3 可能未加载
try {
// tab2重置
tabs2Ref.value.reset();
} catch {}
try {
// tab3重置
tabs3Ref.value.reset();
} catch {}
};
// 抽屉tab1组件的引用
const tabs1Ref = ref();
// 抽屉tab2组件的引用
const tabs2Ref = ref();
// 抽屉tab3组件的引用
const tabs3Ref = ref();
</script>
<style lang="less" scoped>
@import './index.less';