add:空调群控系统修改 / 素材引入 / 部分样式调节

This commit is contained in:
chenpingsen
2024-08-21 14:46:06 +08:00
parent 6cb09f631b
commit 7153a81c63
17 changed files with 396 additions and 193 deletions

View File

@@ -231,7 +231,7 @@
</template>
<script setup lang="ts">
import { ref, computed, onMounted, watch } from 'vue';
import { ref, computed, onMounted } from 'vue';
import { DownOutlined, UpOutlined, StopOutlined } from '@ant-design/icons-vue';
import { message, Modal } from 'ant-design-vue';
// 请求
@@ -289,16 +289,6 @@
},
});
watch(
() => props.treeData,
(newValue) => {
// 重新为照明回路赋值
// buttons2.value = newValue[0].childList;
},
{
deep: true,
},
);
/** 向上传递方法
* @method changeArea 用于控制俯视图的选中状态
* @method reset 用于重置按钮区
@@ -412,6 +402,10 @@
treePid: '',
childList: [],
});
// 依托父组件传值,重置回路
const setButtons2 = (data: any) => {
buttons2.value = data;
};
// 照明回路的按钮切换
const changeLine = (button: any) => {
// 根据按钮状态,展示禁用/启用按钮文本
@@ -839,6 +833,8 @@
changeLine,
// 重置当前选择
refresh,
// 由父组件反向刷新当前选中的回路
setButtons2,
});
</script>
<style lang="less" scoped>

View File

@@ -370,6 +370,10 @@
http.get(url, { projectId: state.projectId, siteId: state.siteId }).then((res) => {
const data = res.data;
treeData.value = data[0].childList;
// 反向刷新
try {
tabs1Ref.value.setButtons2(treeData.value[0].childList);
} catch {}
});
};