优化监控中心样式
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
style="width: 100%"
|
||||
:tree-line="treeLine && { showLeafIcon }"
|
||||
:tree-data="treeData1"
|
||||
allowClear
|
||||
@change="changeDeviceType" />
|
||||
|
||||
<a-spin :spinning="treeLoading">
|
||||
@@ -124,6 +123,18 @@
|
||||
|
||||
http.post(device.queryDeviceTree, { orgId: orgId.value }).then((res) => {
|
||||
treeData1.value = formatTreeData(res.data);
|
||||
|
||||
if (treeData1.value && treeData1.value.length > 0) {
|
||||
if (treeData1.value[0].children) {
|
||||
value.value = treeData1.value[0].children[0].value;
|
||||
changeDeviceType(treeData1.value[0].children[0].value, [
|
||||
treeData1.value[0].children[0].title,
|
||||
]);
|
||||
} else {
|
||||
value.value = treeData1.value[0].value;
|
||||
changeDeviceType(treeData1.value[0].value, [treeData1.value[0].title]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const formatTreeData = (data: any) => {
|
||||
@@ -207,10 +218,16 @@
|
||||
throw new Error('pageData is not provided');
|
||||
}
|
||||
const getDianWeiList = () => {
|
||||
let deviceIds: any[] = [];
|
||||
if (checkedKeys.value && checkedKeys.value.length > 0) {
|
||||
checkedKeys.value.forEach((element) => {
|
||||
if (value.value != element) {
|
||||
deviceIds.push(element);
|
||||
}
|
||||
});
|
||||
http
|
||||
.post(deviceMonitor.getDevicePointToMonitor, {
|
||||
deviceIds: checkedKeys.value,
|
||||
deviceIds: deviceIds,
|
||||
orgId: orgId.value,
|
||||
type: 0,
|
||||
})
|
||||
@@ -259,9 +276,17 @@
|
||||
startDate.value = year + '-' + month + '-' + day;
|
||||
endDate.value = year + '-' + month + '-' + day;
|
||||
}
|
||||
let deviceIds: any[] = [];
|
||||
if (checkedKeys.value && checkedKeys.value.length > 0) {
|
||||
checkedKeys.value.forEach((element) => {
|
||||
if (value.value != element) {
|
||||
deviceIds.push(element);
|
||||
}
|
||||
});
|
||||
}
|
||||
http
|
||||
.post(deviceMonitor.getDeviceGraph, {
|
||||
deviceIds: checkedKeys.value,
|
||||
deviceIds: deviceIds,
|
||||
devicePointCode: selectedValue.value,
|
||||
|
||||
endDate: endDate.value,
|
||||
@@ -323,7 +348,7 @@
|
||||
if (options2.value && options2.value.length > 0) {
|
||||
frequencyValue.value = options2.value[options2.value.length - 1].value;
|
||||
}
|
||||
changeDeviceType(null, null);
|
||||
// changeDeviceType(null, null);
|
||||
// getSelect();
|
||||
});
|
||||
// 在组件卸载时移除监听器
|
||||
|
Reference in New Issue
Block a user