|
|
@ -131,6 +131,8 @@ |
|
|
|
import { device, group } from '/@/api/deviceManage'; |
|
|
|
import { energyMonitor } from '/@/api/monitor'; |
|
|
|
import { dict, getEnum } from '/@/api'; |
|
|
|
// 全局变量 |
|
|
|
import { items } from '/@/store/item'; |
|
|
|
|
|
|
|
export default defineComponent({ |
|
|
|
// eslint-disable-next-line vue/multi-word-component-names |
|
|
@ -139,6 +141,9 @@ |
|
|
|
const select = ref<HTMLElement | null>(null); |
|
|
|
const divWidth = ref(0); // 用于存储 div 的宽度 |
|
|
|
|
|
|
|
// 全局变量 |
|
|
|
const state = items(); |
|
|
|
|
|
|
|
// 获取 div 的宽度 |
|
|
|
// const getDivWidth = () => { |
|
|
|
// if (select.value) { |
|
|
@ -311,6 +316,8 @@ |
|
|
|
}; |
|
|
|
|
|
|
|
const getSelectGraph = (key: any) => { |
|
|
|
// 开 |
|
|
|
state.setLoading(true); |
|
|
|
if (key) { |
|
|
|
activeKey.value = key; |
|
|
|
// if ( |
|
|
@ -407,9 +414,15 @@ |
|
|
|
pageData.graphTableColumns = []; |
|
|
|
pageData.graphGraphList = []; |
|
|
|
} |
|
|
|
}) |
|
|
|
.finally(() => { |
|
|
|
// 关 |
|
|
|
state.setLoading(false); |
|
|
|
}); |
|
|
|
}; |
|
|
|
const getSelectAnalyse = (key: any) => { |
|
|
|
// 开 |
|
|
|
state.setLoading(true); |
|
|
|
if (key) { |
|
|
|
activeKey.value = key; |
|
|
|
// if (pageData.analysisGraphList.length > 0 && pageData.analysisTableList.length > 0) { |
|
|
@ -480,6 +493,12 @@ |
|
|
|
pageData.analysisTableList = []; |
|
|
|
pageData.analysisGraphList = []; |
|
|
|
} |
|
|
|
}) |
|
|
|
.finally(() => { |
|
|
|
// 关 |
|
|
|
setTimeout(function () { |
|
|
|
state.setLoading(false); |
|
|
|
}, 2000); |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|