|
@@ -154,10 +154,10 @@
|
|
|
<div class="item-container">
|
|
|
<div class="tab">
|
|
|
<div class="tab-item" :class="{ 'tab-item-active-r': warningMonitorRowIndex === 0 }" @click="selectDevice('warningMonitorRowIndex', 0)"
|
|
|
- >主机</div
|
|
|
+ >1#风机</div
|
|
|
>
|
|
|
<div class="tab-item" :class="{ 'tab-item-active-r': warningMonitorRowIndex === 1 }" @click="selectDevice('warningMonitorRowIndex', 1)"
|
|
|
- >备机</div
|
|
|
+ >2#风机</div
|
|
|
>
|
|
|
</div>
|
|
|
<div class="container-group">
|
|
@@ -191,10 +191,10 @@
|
|
|
<div class="item-container">
|
|
|
<div class="tab">
|
|
|
<div class="tab-item" :class="{ 'tab-item-active-r': dataMonitorRowIndex == 0 }" @click="selectDevice('dataMonitorRowIndex', 0)"
|
|
|
- >主机</div
|
|
|
+ >1#风机</div
|
|
|
>
|
|
|
<div class="tab-item" :class="{ 'tab-item-active-r': dataMonitorRowIndex == 1 }" @click="selectDevice('dataMonitorRowIndex', 1)"
|
|
|
- >备机</div
|
|
|
+ >2#风机</div
|
|
|
>
|
|
|
</div>
|
|
|
<div class="container-group container-group-l">
|
|
@@ -322,14 +322,14 @@
|
|
|
<div class="" v-if="controlType == 'startSmoke'">
|
|
|
<!-- 互斥控制 -->
|
|
|
<div class="startSmoke-select">
|
|
|
- <div class="label">主机:</div>
|
|
|
+ <div class="label">1#风机</div>
|
|
|
<a-radio-group v-model:value="mainWindIsShow1" @change="changeMotor" name="localWind1">
|
|
|
<a-radio value="open">开启</a-radio>
|
|
|
<a-radio value="stop">停止</a-radio>
|
|
|
</a-radio-group>
|
|
|
</div>
|
|
|
<div class="startSmoke-select">
|
|
|
- <div class="label">备机:</div>
|
|
|
+ <div class="label">2#风机</div>
|
|
|
<a-radio-group v-model:value="mainWindIsShow2" @change="changeMotor" name="localWind2">
|
|
|
<a-radio value="open">开启</a-radio>
|
|
|
<a-radio value="stop">停止</a-radio>
|
|
@@ -339,13 +339,13 @@
|
|
|
<div class="" v-if="controlType == 'startFan'">
|
|
|
<!-- 不互斥控制 -->
|
|
|
<div class="startSmoke-select">
|
|
|
- <div class="label">主机:</div>
|
|
|
+ <div class="label">1#风机:</div>
|
|
|
<div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1Open')">开启</div>
|
|
|
<div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1Stop')">停止</div>
|
|
|
<div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1Reset')">复位</div>
|
|
|
</div>
|
|
|
<div class="startSmoke-select">
|
|
|
- <div class="label">备机:</div>
|
|
|
+ <div class="label">1#风机:</div>
|
|
|
<div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2Open')">开启</div>
|
|
|
<div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2Stop')">停止</div>
|
|
|
<div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2Reset')">复位</div>
|
|
@@ -353,11 +353,11 @@
|
|
|
</div>
|
|
|
<!-- 调频 -->
|
|
|
<div class="vent-flex-row input-box" v-if="controlType == 'Fan1Frequency'">
|
|
|
- <div class="label">主风机运行频率(Hz):</div>
|
|
|
+ <div class="label">1#机运行频率(Hz):</div>
|
|
|
<a-input-number size="small" v-model:value="fan1FrequencyVal" :min="20" :max="50" :step="0.1" />
|
|
|
</div>
|
|
|
<div class="vent-flex-row input-box" v-if="controlType == 'Fan2Frequency'">
|
|
|
- <div class="label">备风机运行频率(Hz):</div>
|
|
|
+ <div class="label">2#机运行频率(Hz):</div>
|
|
|
<a-input-number size="small" v-model:value="fan2FrequencyVal" :min="20" :max="50" :step="0.1" />
|
|
|
</div>
|
|
|
<div class="vent-flex-row input-box" v-if="controlType == 'FanFrequency'">
|
|
@@ -495,22 +495,22 @@
|
|
|
},
|
|
|
{
|
|
|
key: 'fan1ToFan2',
|
|
|
- value: '主机倒备机',
|
|
|
+ value: '1#倒2#',
|
|
|
permission: 'btn:ctrlFan1ToFan2',
|
|
|
},
|
|
|
{
|
|
|
key: 'fan2ToFan1',
|
|
|
- value: '备机倒主机',
|
|
|
+ value: '2#倒1#',
|
|
|
permission: 'btn:ctrlFan2ToFan1',
|
|
|
},
|
|
|
{
|
|
|
key: 'Fan1Frequency',
|
|
|
- value: '主机调频',
|
|
|
+ value: '1#调频',
|
|
|
permission: 'btn:frequency',
|
|
|
},
|
|
|
{
|
|
|
key: 'Fan2Frequency',
|
|
|
- value: '备机调频',
|
|
|
+ value: '2#调频',
|
|
|
permission: 'btn:frequency',
|
|
|
},
|
|
|
{
|
|
@@ -676,13 +676,15 @@
|
|
|
const leftColumns = ref<BasicColumn[]>([]);
|
|
|
const devicekide = ref('');
|
|
|
const deviceType = ref(selectData.deviceType);
|
|
|
+ const deviceId = ref('');
|
|
|
const headElHeight = ref(0);
|
|
|
let btnClick = ref(true); // 判断按钮是否可点
|
|
|
|
|
|
//报表导出
|
|
|
// let editID = ref<any>('');
|
|
|
// let fileType = ref('');
|
|
|
-
|
|
|
+ // https获取监测数据
|
|
|
+ let timer: null | NodeJS.Timeout | undefined = null;
|
|
|
const { getCamera, removeCamera } = useCamera();
|
|
|
|
|
|
watch(deviceType, (type) => {
|
|
@@ -702,8 +704,15 @@
|
|
|
};
|
|
|
|
|
|
const activeBtn = ref('fanLocal-ssjc');
|
|
|
- function changeActive(activeValue) {
|
|
|
+ async function changeActive(activeValue) {
|
|
|
activeBtn.value = activeValue;
|
|
|
+ if (activeBtn.value !== 'fanLocal-ssjc') {
|
|
|
+ timer = undefined;
|
|
|
+ clearTimeout(timer);
|
|
|
+ } else {
|
|
|
+ timer = null;
|
|
|
+ await getMonitor(true);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
const selectDevice = (key, val) => {
|
|
@@ -725,12 +734,16 @@
|
|
|
//
|
|
|
async function getDataSource() {
|
|
|
if (devicekide.value) {
|
|
|
- const res = await list({ devicetype: devicekide.value, pagetype: 'normal' });
|
|
|
+ const res = await list({ devicetype: devicekide.value, systemID: deviceId.value || null, pagetype: 'normal' });
|
|
|
// const res = await list({ devicetype: 'fanlocal', pagetype: 'normal' });
|
|
|
if (res.msgTxt && res.msgTxt[0] && res.msgTxt[0].datalist && res.msgTxt[0].datalist.length > 0) {
|
|
|
const dataArr = res.msgTxt[0].datalist || [];
|
|
|
dataSource.value = [];
|
|
|
- dataArr.forEach((data) => {
|
|
|
+ selectRowIndex.value = dataArr.findIndex((item) => item.deviceID === deviceId.value);
|
|
|
+ debugger;
|
|
|
+ if (selectRowIndex.value > -1) {
|
|
|
+ if (!deviceType.value) deviceType.value = dataArr[selectRowIndex.value]['deviceType'];
|
|
|
+ let data = dataArr[selectRowIndex.value];
|
|
|
const readData = data.readData;
|
|
|
data = Object.assign(data, readData);
|
|
|
if (data['Fan1StartStatus'] && data['Fan1StartStatus'] === '1.0') data['Fan1StartStatus'] = '1';
|
|
@@ -749,7 +762,7 @@
|
|
|
// if (data['m3']) data['ductOutletAirVolume_merge'] = data['m3'];
|
|
|
// if (data['m3']) data['inletAirVolume_merge'] = (Number(data['m3']) * 1.08).toFixed(2);
|
|
|
// }
|
|
|
- dataSource.value.push(data);
|
|
|
+ Object.assign(selectData, data);
|
|
|
if (selectRowIndex.value > -1) {
|
|
|
let echartsData = dataArr[selectRowIndex.value]['history'] || [];
|
|
|
echartsData = echartsData.filter((item) => {
|
|
@@ -766,7 +779,7 @@
|
|
|
});
|
|
|
historyList.value = echartsData;
|
|
|
}
|
|
|
- });
|
|
|
+ }
|
|
|
} else {
|
|
|
return (dataSource.value = []);
|
|
|
}
|
|
@@ -775,25 +788,25 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // https获取监测数据
|
|
|
- let timer: null | NodeJS.Timeout = null;
|
|
|
async function getMonitor(flag?) {
|
|
|
if (Object.prototype.toString.call(timer) === '[object Null]') {
|
|
|
timer = await setTimeout(
|
|
|
async () => {
|
|
|
// debugger;
|
|
|
+ // for (const key in selectData) {
|
|
|
+ // selectData[key] = '';
|
|
|
+ // }
|
|
|
await getDataSource();
|
|
|
- for (const key in selectData) {
|
|
|
- selectData[key] = '';
|
|
|
- }
|
|
|
- if (dataSource.value.length > 0 && dataSource.value[selectRowIndex.value]) {
|
|
|
- deviceType.value = dataSource.value[selectRowIndex.value]['deviceType'];
|
|
|
- if (dataSource.value.length > 0 && dataSource.value[selectRowIndex.value]) {
|
|
|
- Object.assign(selectData, dataSource.value[selectRowIndex.value]);
|
|
|
- }
|
|
|
- playSmoke(selectData);
|
|
|
- addText(selectData);
|
|
|
- }
|
|
|
+
|
|
|
+ // if (dataSource.value.length > 0 && dataSource.value[selectRowIndex.value]) {
|
|
|
+ // deviceType.value = dataSource.value[selectRowIndex.value]['deviceType'];
|
|
|
+ // if (dataSource.value.length > 0 && dataSource.value[selectRowIndex.value]) {
|
|
|
+ // Object.assign(selectData, dataSource.value[selectRowIndex.value]);
|
|
|
+ // }
|
|
|
+
|
|
|
+ // }
|
|
|
+ playSmoke(selectData);
|
|
|
+ addText(selectData);
|
|
|
// historySource.value = selectData.history;
|
|
|
if (timer) {
|
|
|
timer = null;
|
|
@@ -1175,9 +1188,13 @@
|
|
|
getDeviceBaseList();
|
|
|
});
|
|
|
|
|
|
- onMounted(() => {
|
|
|
+ onMounted(async () => {
|
|
|
const { query } = unref(currentRoute);
|
|
|
- if (query['deviceType']) devicekide.value = query['deviceType'] as string;
|
|
|
+ if (query['deviceType']) {
|
|
|
+ devicekide.value = query['deviceType'] as string;
|
|
|
+ deviceId.value = query['id'] as string;
|
|
|
+ }
|
|
|
+
|
|
|
mountedThree(player1.value).then(async () => {
|
|
|
await getMonitor(true);
|
|
|
nextTick(async () => {
|
|
@@ -1185,7 +1202,7 @@
|
|
|
addCssText();
|
|
|
});
|
|
|
});
|
|
|
-
|
|
|
+ await getCamera(deviceId.value, playerRef.value);
|
|
|
document.body.addEventListener('mousedown', addPlayVideo, false);
|
|
|
});
|
|
|
|