优化监控中心样式
This commit is contained in:
@@ -77,7 +77,7 @@
|
||||
grid: {
|
||||
top: 60, // 上内边距
|
||||
bottom: 40, // 下内边距
|
||||
left: 10, // 左内边距
|
||||
left: 50, // 左内边距
|
||||
right: 60, // 右内边距
|
||||
containLabel: true, // 自动调整 grid 以适应标签
|
||||
},
|
||||
@@ -85,7 +85,7 @@
|
||||
data: legendList,
|
||||
orient: 'horizontal',
|
||||
top: 30,
|
||||
right: 130,
|
||||
right: 55,
|
||||
icon: 'rect',
|
||||
},
|
||||
tooltip: {
|
||||
|
@@ -4,7 +4,7 @@
|
||||
:data-source="data"
|
||||
bordered
|
||||
:pagination="false"
|
||||
style="width: 99%; height: 75%"
|
||||
style="width: 99%; height: 75%; margin-left: 0.5%"
|
||||
:scroll="{ x: 2000, y: 450 }" />
|
||||
<a-pagination
|
||||
:total="total"
|
||||
|
@@ -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