fks-xuxinyue 3 weeks ago
parent
commit
0cb7edaa7e
  1. 4
      hx-ai-intelligent/src/view/equipmentManage/group/config.ts
  2. 13
      hx-ai-intelligent/src/view/monitor/deviceMonitor/tree/index.vue
  3. 19
      hx-ai-intelligent/src/view/monitor/energyMonitor/tree/index.vue
  4. 3
      hx-ai-intelligent/src/view/monitor/environmentMonitor/aggregateData/index.vue
  5. 47
      hx-ai-intelligent/src/view/monitor/environmentMonitor/averageData/index.vue
  6. 86
      hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/index.vue
  7. 11
      hx-ai-intelligent/src/view/monitor/environmentMonitor/index.vue

4
hx-ai-intelligent/src/view/equipmentManage/group/config.ts

@ -78,7 +78,7 @@ const tableCarbonKeyMap = [
{ {
title: '分组名称', title: '分组名称',
textNumber: 10, textNumber: 10,
dataIndex: 'pointName', dataIndex: 'groupName',
}, },
{ {
textNumber: 5, textNumber: 5,
@ -659,7 +659,7 @@ export const tableConfigCal = (
}, },
}, },
{ {
field: 'provider', field: 'groupName',
component: 'NsInput', component: 'NsInput',
componentProps: { componentProps: {
placeholder: '请输入分组名称', placeholder: '请输入分组名称',

13
hx-ai-intelligent/src/view/monitor/deviceMonitor/tree/index.vue

@ -36,7 +36,7 @@
:style="{ :style="{
top: '50px', top: '50px',
left: `${divWidth + 55}px`, left: `${divWidth + 55}px`,
zIndex: 9, zIndex: 4,
position: 'absolute', position: 'absolute',
width: `${divWidth}px`, width: `${divWidth}px`,
}" }"
@ -47,7 +47,7 @@
:style="{ :style="{
top: '50px', top: '50px',
left: `${divWidth * 2 + 65}px`, left: `${divWidth * 2 + 65}px`,
zIndex: 9, zIndex: 4,
position: 'absolute', position: 'absolute',
width: `${divWidth}px`, width: `${divWidth}px`,
}" }"
@ -61,7 +61,7 @@
:style="{ :style="{
top: '50px', top: '50px',
left: `${divWidth * 3 + 75}px`, left: `${divWidth * 3 + 75}px`,
zIndex: 9, zIndex: 4,
position: 'absolute', position: 'absolute',
width: `${divWidth}px`, width: `${divWidth}px`,
}" }"
@ -71,7 +71,7 @@
:style="{ :style="{
top: '50px', top: '50px',
left: `${divWidth * 4 + 85}px`, left: `${divWidth * 4 + 85}px`,
zIndex: 9, zIndex: 4,
position: 'absolute', position: 'absolute',
}" }"
@click="getSelect" @click="getSelect"
@ -228,8 +228,9 @@
const getDianWeiList = () => { const getDianWeiList = () => {
let deviceIds: any[] = []; let deviceIds: any[] = [];
if (checkedKeys.value && checkedKeys.value.length > 0) { if (checkedKeys.value && checkedKeys.value.length > 0) {
debugger;
checkedKeys.value.forEach((element) => { checkedKeys.value.forEach((element) => {
if (value.value != element) { if (value.value != element && value.value != '999999999') {
deviceIds.push(element); deviceIds.push(element);
} }
}); });
@ -287,7 +288,7 @@
let deviceIds: any[] = []; let deviceIds: any[] = [];
if (checkedKeys.value && checkedKeys.value.length > 0) { if (checkedKeys.value && checkedKeys.value.length > 0) {
checkedKeys.value.forEach((element) => { checkedKeys.value.forEach((element) => {
if (value.value != element) { if (value.value != element && value.value != '999999999') {
deviceIds.push(element); deviceIds.push(element);
} }
}); });

19
hx-ai-intelligent/src/view/monitor/energyMonitor/tree/index.vue

@ -40,6 +40,7 @@
v-model:expandedKeys="expandedKeys" v-model:expandedKeys="expandedKeys"
v-model:selectedKeys="selectedKeys" v-model:selectedKeys="selectedKeys"
v-model:checkedKeys="checkedKeys" v-model:checkedKeys="checkedKeys"
:checkStrictly="mode == '0' ? false : true"
:show-line="{ showLeafIcon: false }" :show-line="{ showLeafIcon: false }"
checkable checkable
:height="500" :height="500"
@ -71,7 +72,7 @@
:style="{ :style="{
top: '100px', top: '100px',
left: `${divWidth + 55}px`, left: `${divWidth + 55}px`,
zIndex: 9, zIndex: 4,
position: 'absolute', position: 'absolute',
width: `${divWidth}px`, width: `${divWidth}px`,
}" }"
@ -81,7 +82,7 @@
:style="{ :style="{
top: '100px', top: '100px',
left: `${divWidth * 2 + 65}px`, left: `${divWidth * 2 + 65}px`,
zIndex: 9, zIndex: 4,
position: 'absolute', position: 'absolute',
width: `${divWidth}px`, width: `${divWidth}px`,
}" }"
@ -94,7 +95,7 @@
:style="{ :style="{
top: '100px', top: '100px',
left: `${divWidth * 2 + 65}px`, left: `${divWidth * 2 + 65}px`,
zIndex: 9, zIndex: 4,
position: 'absolute', position: 'absolute',
width: `${divWidth}px`, width: `${divWidth}px`,
}" }"
@ -107,7 +108,7 @@
:style="{ :style="{
top: '100px', top: '100px',
left: `${divWidth * 3 + 75}px`, left: `${divWidth * 3 + 75}px`,
zIndex: 9, zIndex: 4,
position: 'absolute', position: 'absolute',
}" }"
@click="getSelect(null)" @click="getSelect(null)"
@ -276,6 +277,16 @@
if (key) { if (key) {
keyV = key; keyV = key;
} }
if (checkedKeys.value.length > 0) {
let keys = [];
for (let i = 0; i < checkedKeys.value.length; i++) {
if (checkedKeys.value[i] !== '999999999') {
keys.push(checkedKeys.value[i]);
}
}
checkedKeys.value = keys;
}
if (activeKey.value == '1') { if (activeKey.value == '1') {
if (checkedKeys.value.length == 0) { if (checkedKeys.value.length == 0) {
message.warning(mode.value == '0' ? '请先选择设备!' : '请先选择节点!'); message.warning(mode.value == '0' ? '请先选择设备!' : '请先选择节点!');

3
hx-ai-intelligent/src/view/monitor/environmentMonitor/aggregateData/index.vue

@ -53,6 +53,7 @@
<div v-for="(item, index) in ringData" :key="index"> <div v-for="(item, index) in ringData" :key="index">
{{ item.name }} : {{ item.value }} {{ item.unit }} {{ item.name }} : {{ item.value }} {{ item.unit }}
<a-progress <a-progress
:stroke-color="index == 0 ? '#4388FB' : '#55C3BB'"
:percent="(100 * item.value) / sum" :percent="(100 * item.value) / sum"
:show-info="false" :show-info="false"
:strokeWidth="15" /> :strokeWidth="15" />
@ -785,7 +786,7 @@
grid: { grid: {
height: '80%', height: '80%',
width: '85%', width: '85%',
top: '10%', top: '5%',
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',

47
hx-ai-intelligent/src/view/monitor/environmentMonitor/averageData/index.vue

@ -8,8 +8,7 @@
:data-source="pageData" :data-source="pageData"
bordered bordered
:pagination="false" :pagination="false"
style="height: 75%" :scroll="{ x: x }">
:scroll="{ x: x, y: 450 }">
<template #title> <template #title>
<div <div
style="display: flex; align-items: center; justify-content: space-between; width: 100%"> style="display: flex; align-items: center; justify-content: space-between; width: 100%">
@ -47,24 +46,30 @@
</div> </div>
</template> </template>
</a-table> </a-table>
<!-- <a-pagination
:current="queryParams.pageNum"
:total="total"
:show-total="(total, range) => ` 共 ${total} 条`"
:page-size="queryParams.pageSize"
style="display: flex; justify-content: right; margin-top: 16px; margin-right: 30px"
:show-size-changer="true"
:show-quick-jumper="true"
@change="onChange" /> -->
<a-pagination
:total="total"
size="small"
:show-total="(total, range) => `显示第${range[0]}到${range[1]}条记录 ,共${total} 条记录`"
show-size-changer
show-quick-jumper
@change="onChange"
style="
display: flex;
justify-content: right;
margin-top: 10px;
margin-right: 30px;
padding-bottom: 10px;
" />
</a-spin> </a-spin>
<a-pagination
:current="queryParams.pageNum"
:total="total"
:show-total="(total, range) => ` 共 ${total} 条`"
:page-size="queryParams.pageSize"
style="
display: flex;
position: absolute;
bottom: 20px;
right: 30px;
justify-content: right;
margin-top: 16px;
margin-right: 30px;
"
:show-size-changer="true"
:show-quick-jumper="true"
@change="onChange" />
</div> </div>
<!-- </a-spin> --> <!-- </a-spin> -->
</template> </template>
@ -245,7 +250,7 @@
::v-deep .ant-table.ant-table-bordered > .ant-table-title { ::v-deep .ant-table.ant-table-bordered > .ant-table-title {
border: none !important; border: none !important;
} }
::v-deep .ant-table-title + .ant-table-container table > thead > tr:first-child th:last-child { /* ::v-deep .ant-table-title + .ant-table-container table > thead > tr:first-child th:last-child {
display: none !important; display: none !important;
} } */
</style> </style>

86
hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/index.vue

@ -1,6 +1,6 @@
<!-- eslint-disable vue/multi-word-component-names --> <!-- eslint-disable vue/multi-word-component-names -->
<template> <template>
<div style="background: #ffffff; height: 95%; position: relative"> <div style="background: #ffffff; height: 95%; position: relative; overflow-y: auto">
<a-spin :spinning="loading" style="height: 100%"> <a-spin :spinning="loading" style="height: 100%">
<a-table <a-table
:columns="tableColumns" :columns="tableColumns"
@ -8,7 +8,7 @@
bordered bordered
:pagination="false" :pagination="false"
:height="500" :height="500"
:scroll="{ x: x, y: 440 }"> :scroll="{ x: x }">
<template #title> <template #title>
<div <div
style=" style="
@ -68,22 +68,15 @@
</div> </div>
</template> </template>
</a-table> </a-table>
<a-pagination
:total="total"
size="small"
:show-total="(total, range) => `显示第${range[0]}到${range[1]}条记录 ,共${total} 条记录`"
show-size-changer
show-quick-jumper
@change="onChange"
style="display: flex; justify-content: right; margin-top: 10px; margin-right: 30px" />
</a-spin> </a-spin>
<a-pagination
:total="total"
:show-total="(total, range) => ` 共 ${total} 条`"
show-size-changer
show-quick-jumper
@change="onChange"
style="
display: flex;
position: absolute;
bottom: 20px;
right: 30px;
justify-content: right;
margin-top: 10px;
margin-right: 30px;
" />
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -288,7 +281,7 @@
// //
const getTableList = () => { const getTableList = () => {
loading.value = true; loading.value = true;
tableColumns.value = []; tableColumns.value = tableColumnsA;
data.value = []; data.value = [];
total.value = 0; total.value = 0;
pageData.value = []; pageData.value = [];
@ -318,26 +311,31 @@
timeRate: frequencyValue.value, // timeRate: frequencyValue.value, //
}) })
.then((res) => { .then((res) => {
// if (res.retcode == 0) {
let headerList = res.data.headerList; //
let tableColumnsB = []; let headerList = res.data.headerList;
for (let i = 0; i < headerList.length; i++) { let tableColumnsB = [];
tableColumnsB.push({ for (let i = 0; i < headerList.length; i++) {
title: headerList[i], tableColumnsB.push({
dataIndex: headerList[i], title: headerList[i],
width: 60, dataIndex: headerList[i],
align: 'center', width: 60,
}); align: 'center',
} });
x.value = 360 + headerList.length * 60; }
let columnA: any[] = [...tableColumnsA]; x.value = 360 + headerList.length * 60;
columnA.push(...tableColumnsB); debugger;
tableColumns.value = columnA; let columnA: any[] = [...tableColumnsA];
columnA.push(...tableColumnsB);
tableColumns.value = columnA;
// //
data.value = res.data.data; data.value = res.data.data;
total.value = res.data.data.length; total.value = res.data.data.length;
onChange(1, 10); onChange(1, 10);
} else {
x.value = 360;
}
}) })
.finally(() => { .finally(() => {
loading.value = false; loading.value = false;
@ -349,10 +347,10 @@
.get(environmentMonitor.queryDeviceArea, { orgId: orgId.value, point: typeValue.value }) .get(environmentMonitor.queryDeviceArea, { orgId: orgId.value, point: typeValue.value })
.then((res) => { .then((res) => {
treeData2.value = res.data; treeData2.value = res.data;
if (treeData2.value && treeData2.value.length > 0) { // if (treeData2.value && treeData2.value.length > 0) {
quyuvalue.value = [treeData2.value[0].childList[0].id]; // quyuvalue.value = [treeData2.value[0].childList[0].id];
getTableList(); // getTableList();
} // }
}); });
}; };
// excel // excel
@ -360,6 +358,7 @@
exportExcel(tableColumns.value, data.value, '历史数据导出', true, 'location', 1, 3); exportExcel(tableColumns.value, data.value, '历史数据导出', true, 'location', 1, 3);
}; };
onMounted(async () => { onMounted(async () => {
tableColumns.value = tableColumnsA;
// //
let frequency = await getEnum({ params: { enumType: 'TimeFlagEnum' } }); let frequency = await getEnum({ params: { enumType: 'TimeFlagEnum' } });
frequencyOptions.value = frequency.data; frequencyOptions.value = frequency.data;
@ -378,6 +377,7 @@
} }
// //
await queryDeviceArea(); await queryDeviceArea();
getTableList();
}); });
// //
@ -403,7 +403,7 @@
::v-deep .ant-table.ant-table-bordered > .ant-table-title { ::v-deep .ant-table.ant-table-bordered > .ant-table-title {
border: none !important; border: none !important;
} }
::v-deep .ant-table-title + .ant-table-container table > thead > tr:first-child th:last-child { /* ::v-deep .ant-table-title + .ant-table-container table > thead > tr:first-child th:last-child {
display: none !important; display: none !important;
} } */
</style> </style>

11
hx-ai-intelligent/src/view/monitor/environmentMonitor/index.vue

@ -9,11 +9,8 @@
margin-top: 0.5%; margin-top: 0.5%;
padding-left: 1.5%; padding-left: 1.5%;
background: #ffffff; background: #ffffff;
font-family: 'PingFang SC';
font-size: 16px;
font-weight: 700;
letter-spacing: 1.33px; letter-spacing: 1.33px;
line-height: 21px;
"> ">
<a-tab-pane key="1" tab="综合数据" /> <a-tab-pane key="1" tab="综合数据" />
<a-tab-pane key="2" tab="历史数据" /> <a-tab-pane key="2" tab="历史数据" />
@ -29,8 +26,8 @@
</div> </div>
<aggregate-data ref="aggregateDataRef" v-if="activeKey == '1'" style="height: 85%" /> <aggregate-data ref="aggregateDataRef" v-if="activeKey == '1'" style="height: 85%" />
<history-data ref="historyDataRef" v-if="activeKey == '2'" /> <history-data ref="historyDataRef" v-if="activeKey == '2'" style="height: 90%" />
<average-data ref="averageDataRef" v-if="activeKey == '3'" /> <average-data ref="averageDataRef" v-if="activeKey == '3'" style="height: 85%" />
</div> </div>
<a-modal <a-modal
@ -451,8 +448,6 @@
<style lang="less" scoped> <style lang="less" scoped>
::v-deep .ant-tabs-tab { ::v-deep .ant-tabs-tab {
font-weight: 700; /* 选中标签的加粗 */ font-weight: 700; /* 选中标签的加粗 */
// font-size: 16px;
// letter-spacing: 1.33px;
color: #666666 !important; color: #666666 !important;
} }
::v-deep .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn { ::v-deep .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {

Loading…
Cancel
Save