|
@@ -1,7 +1,6 @@
|
|
|
<template>
|
|
|
<div class="zl-box">
|
|
|
<div class="zl-container-box">
|
|
|
- <!-- <customHeader >网络实时解算</customHeader> -->
|
|
|
<div class="top-box">
|
|
|
<transition
|
|
|
enter-active-class="animate__animated animate__slideInLeft"
|
|
@@ -97,7 +96,13 @@
|
|
|
<div class="item-top-title">传感器实时数据</div>
|
|
|
<BorderBox1 class="table-box border-bg" backgroundColor="#00bfff15">
|
|
|
<div class="table-container">
|
|
|
- <a-table :columns="sensorColumns" :data-source="pageData.sensorDataList" :pagination="false" size="small" />
|
|
|
+ <a-table :columns="sensorColumns" :data-source="pageData.sensorDataList" :pagination="false" size="small" >
|
|
|
+ <template #bodyCell="{ column, record }">
|
|
|
+ <div v-if="column.dataIndex == 'action'">
|
|
|
+ <a @click="goLocation(record.deviceID, record)">定位</a>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
</div>
|
|
|
</BorderBox1>
|
|
|
</div>
|
|
@@ -111,6 +116,9 @@
|
|
|
<span class="signal-round"
|
|
|
:class="{ 'signal-round-red': record['level'] == 1, 'signal-round-orange': record['level'] == 2, 'signal-round-yellow': record['level'] == 3 }"></span>
|
|
|
</div>
|
|
|
+ <div v-if="column.dataIndex == 'action'">
|
|
|
+ <a @click="goLocation(record.deviceID, record)">定位</a>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</a-table>
|
|
|
</div>
|
|
@@ -149,7 +157,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="table-container">
|
|
|
- <a-table :columns="columns" :data-source="tableDate" :pagination="false" size="small" />
|
|
|
+ <a-table :columns="columns" :data-source="tableDate" :pagination="false" size="small" >
|
|
|
+ <template #bodyCell="{ column, record }">
|
|
|
+ <div v-if="column.dataIndex == 'action'">
|
|
|
+ <a @click="goLocation(record.deviceID, record)">定位</a>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
</div>
|
|
|
</BorderBox11>
|
|
|
</div>
|
|
@@ -222,7 +236,7 @@ import { BorderBox11, BorderBox1, ScrollBoard as DvScrollBoard } from '@kjgl77/d
|
|
|
import { sensorColumns, networkColumns, warningColumns, deviceTab, SensorType, NetworkType, windowColumns, gateColumns, WindowType, GateType, solveTimesData } from './network.data'
|
|
|
import dayjs from 'dayjs'
|
|
|
import { formatNum } from '/@/utils/ventutil'
|
|
|
-import customHeader from '/@/components/vent/customHeader.vue';
|
|
|
+import { getActions } from '/@/qiankun/state';
|
|
|
|
|
|
|
|
|
const emit = defineEmits(['changePageType'])
|
|
@@ -234,7 +248,7 @@ const props = defineProps({
|
|
|
})
|
|
|
|
|
|
let count = 0;
|
|
|
-
|
|
|
+const actions = getActions();
|
|
|
const pageData = reactive({
|
|
|
currentTime: dayjs(new Date().getTime() + count).format('YYYY-MM-DD HH:mm:ss'),
|
|
|
totalEnterNum: '-',
|
|
@@ -324,8 +338,9 @@ function analyzePageResult(resultData){
|
|
|
for (const key in solutionresult['tuns']) {
|
|
|
const item = solutionresult['tuns'][key]
|
|
|
const obj = {
|
|
|
- nTunID: key,
|
|
|
+ nTunID: item['nTunID'],
|
|
|
strName: item['strName'],
|
|
|
+ deviceID: item['nTunID'],
|
|
|
dHFric: item['dHFric'] != null ? item['dHFric'].toFixed(2) : '-', //摩擦阻力
|
|
|
dHLocal: item['dHNature'] != null ? item['dHNature'].toFixed(2) : '-', //局部阻力
|
|
|
dHNature: item['dHNature'] != null ? item['dHNature'].toFixed(2) : '-', //自然风压
|
|
@@ -340,7 +355,8 @@ function analyzePageResult(resultData){
|
|
|
for (const key in solutionresult['gates']) {
|
|
|
const item = solutionresult['gates'][key]
|
|
|
const obj = {
|
|
|
- nGateID: key,
|
|
|
+ nGateID: item['nGateID'],
|
|
|
+ deviceID: item['nGateID'],
|
|
|
strName: item['strName'],
|
|
|
data_dHDiff: item['data_dHDiff'] != null ? item['data_dHDiff'].toFixed(2) : '-', //风门压差
|
|
|
data_dQ_min: item['data_dQ_min'] != null ? item['data_dQ_min'].toFixed(2) : '-', //风门漏风量
|
|
@@ -353,8 +369,9 @@ function analyzePageResult(resultData){
|
|
|
for (const key in solutionresult['windows']) {
|
|
|
const item = solutionresult['windows'][key]
|
|
|
const obj = {
|
|
|
- nWindowID: key,
|
|
|
+ nWindowID: item['nWindowID'],
|
|
|
strName: item['strName'],
|
|
|
+ deviceID: item['nWindowID'],
|
|
|
data_dHDiff: item['data_dHDiff'] != null ? item['data_dHDiff'].toFixed(2) : '-', //风门压差
|
|
|
data_dQ_min: item['data_dQ_min'] != null ? item['data_dQ_min'].toFixed(2) : '-', //风门漏风量
|
|
|
data_dQ_s: item['data_dQ_s'] != null ? item['data_dQ_s'].toFixed(2) : '-', //风门漏风量
|
|
@@ -371,6 +388,7 @@ function analyzePageResult(resultData){
|
|
|
resultData['monitors'].forEach((item => {
|
|
|
item = {
|
|
|
strinstallpos: item.strinstallpos,
|
|
|
+ deviceID: item['deviceID'],
|
|
|
va: item['readData']['va'] != null ? Number(item['readData']['va']).toFixed(2) : '-',
|
|
|
m3: item['readData']['m3'] != null ? formatNum(Number(item['readData']['m3'])) : '-',
|
|
|
}
|
|
@@ -414,6 +432,11 @@ function setTable(code) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+function goLocation(id: string, record:any) {
|
|
|
+ console.log(id, record)
|
|
|
+ actions.setGlobalState({ locationId: id, locationObj: null, pageObj: null });
|
|
|
+}
|
|
|
+
|
|
|
watch(() => props.pageResult, (newData) => {
|
|
|
analyzePageResult(newData)
|
|
|
})
|