|
@@ -68,40 +68,21 @@
|
|
|
:isShowPagination="true"
|
|
|
>
|
|
|
<template #filterCell="{ column, record }">
|
|
|
- <template v-if="record.frontGateOpenCtrl == 1 || record.frontGateOpenCtrl === true">
|
|
|
- <a-tag v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0" color="red"
|
|
|
- >正在打开</a-tag
|
|
|
- >
|
|
|
- <a-tag v-else-if="column.dataIndex === 'frontGateOpen'" color="processing">打开</a-tag>
|
|
|
- </template>
|
|
|
- <template v-else-if="record.frontGateOpenCtrl == 0 || record.frontGateOpenCtrl === false">
|
|
|
- <a-tag v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0" color="red"
|
|
|
- >正在关闭</a-tag
|
|
|
- >
|
|
|
- <a-tag v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 1" color="default"
|
|
|
- >关闭</a-tag
|
|
|
- >
|
|
|
- <a-tag v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 1 && record.frontGateClose == 0" color="default"
|
|
|
- >打开</a-tag
|
|
|
- >
|
|
|
- </template>
|
|
|
- <template v-if="record.rearGateOpenCtrl == 1 || record.rearGateOpenCtrl === true">
|
|
|
- <a-tag v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0" color="red"
|
|
|
- >正在打开</a-tag
|
|
|
- >
|
|
|
- <a-tag v-else-if="column.dataIndex === 'rearGateOpen'" color="processing">打开</a-tag>
|
|
|
- </template>
|
|
|
- <template v-else-if="record.rearGateOpenCtrl == 0 || record.rearGateOpenCtrl === false">
|
|
|
- <a-tag v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0" color="red"
|
|
|
- >正在关闭</a-tag
|
|
|
- >
|
|
|
- <a-tag v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 1" color="default"
|
|
|
- >关闭</a-tag
|
|
|
- >
|
|
|
- <a-tag v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 1 && record.rearGateClose == 0" color="default"
|
|
|
- >打开</a-tag
|
|
|
- >
|
|
|
- </template>
|
|
|
+ <a-tag v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0" color="red"
|
|
|
+ >正在运行</a-tag
|
|
|
+ >
|
|
|
+ <a-tag v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 1" color="default"
|
|
|
+ >关闭</a-tag
|
|
|
+ >
|
|
|
+ <a-tag v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 1 && record.frontGateClose == 0" color="#46C66F"
|
|
|
+ >打开</a-tag
|
|
|
+ >
|
|
|
+ <a-tag v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 1" color="default"
|
|
|
+ >关闭</a-tag
|
|
|
+ >
|
|
|
+ <a-tag v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 1 && record.rearGateClose == 0" color="default"
|
|
|
+ >打开</a-tag
|
|
|
+ >
|
|
|
<template v-if="column.dataIndex === 'ndoortype'">
|
|
|
<span v-if="record.ndoortype == 0">气动风门</span>
|
|
|
<span v-else color="default">液压风门</span>
|
|
@@ -560,96 +541,59 @@
|
|
|
let rearDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
|
|
|
function monitorAnimation(selectData) {
|
|
|
const timeScale = 0.003;
|
|
|
- if (selectData.frontGateOpenCtrl == 1 || selectData.frontGateOpenCtrl === true) {
|
|
|
- isFrontCloseRunning = false;
|
|
|
- if (selectData.frontGateOpen == 0 && selectData.frontGateClose == 0) {
|
|
|
- //打开前门1
|
|
|
-
|
|
|
- if (!isFrontOpenRunning) {
|
|
|
- frontDoorIsOpen.value = true;
|
|
|
- backDoorIsOpen.value = true;
|
|
|
- isFrontOpenRunning = true;
|
|
|
- play(1, timeScale);
|
|
|
- frontDeviceState = 1;
|
|
|
- }
|
|
|
- }
|
|
|
- if (selectData.frontGateOpen == 1 && selectData.frontGateClose == 0) {
|
|
|
- isFrontOpenRunning = false;
|
|
|
- if (frontDeviceState != 1) {
|
|
|
- import.meta.env.VITE_GLOB_IS_SIMULATE ? play(1, timeScale) : play(1);
|
|
|
- frontDeviceState = 1;
|
|
|
- frontDoorIsOpen.value = false;
|
|
|
- backDoorIsOpen.value = true;
|
|
|
- }
|
|
|
+
|
|
|
+ // if (selectData.frontGateOpen == 0 && selectData.frontGateClose == 0) {
|
|
|
+ // //正在运行
|
|
|
+ // // if (!isFrontOpenRunning) {
|
|
|
+ // // frontDoorIsOpen.value = true;
|
|
|
+ // // backDoorIsOpen.value = true;
|
|
|
+ // // isFrontOpenRunning = true;
|
|
|
+ // // play(1, timeScale);
|
|
|
+ // // frontDeviceState = 1;
|
|
|
+ // // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ if (selectData.frontGateOpen == 1 && selectData.frontGateClose == 0) {
|
|
|
+ isFrontOpenRunning = false;
|
|
|
+ if (frontDeviceState != 1) {
|
|
|
+ // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(1, timeScale) : play(1);
|
|
|
+ play(1, timeScale);
|
|
|
+ frontDeviceState = 1;
|
|
|
+ frontDoorIsOpen.value = false;
|
|
|
+ backDoorIsOpen.value = true;
|
|
|
}
|
|
|
- } else {
|
|
|
- if (selectData.frontGateOpen == 0 && selectData.frontGateClose == 0) {
|
|
|
- //关闭前门
|
|
|
- isFrontOpenRunning = false;
|
|
|
- if (!isFrontCloseRunning) {
|
|
|
- isFrontCloseRunning = true;
|
|
|
- play(2, timeScale);
|
|
|
- frontDeviceState = 2;
|
|
|
- frontDoorIsOpen.value = true;
|
|
|
- backDoorIsOpen.value = true;
|
|
|
- }
|
|
|
+ }
|
|
|
+ if (selectData.frontGateClose == 1 && selectData.frontGateOpen == 0) {
|
|
|
+ isFrontCloseRunning = false;
|
|
|
+ if (frontDeviceState == 1) {
|
|
|
+ // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(2, timeScale) : play(2);
|
|
|
+ play(2, timeScale);
|
|
|
+ frontDeviceState = 2;
|
|
|
+ frontDoorIsOpen.value = false;
|
|
|
+ // backDoorIsOpen.value = false
|
|
|
}
|
|
|
- if (selectData.frontGateClose == 1 && selectData.frontGateOpen == 0) {
|
|
|
- isFrontCloseRunning = false;
|
|
|
- if (frontDeviceState == 1) {
|
|
|
- import.meta.env.VITE_GLOB_IS_SIMULATE ? play(2, timeScale) : play(2);
|
|
|
- frontDeviceState = 2;
|
|
|
- frontDoorIsOpen.value = false;
|
|
|
- // backDoorIsOpen.value = false
|
|
|
- }
|
|
|
+ }
|
|
|
+ if (selectData.rearGateOpen == 1 && selectData.rearGateClose == 0) {
|
|
|
+ isRearOpenRunning = false;
|
|
|
+
|
|
|
+ if (rearDeviceState != 3) {
|
|
|
+ rearDeviceState = 3;
|
|
|
+ // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(3, timeScale) : play(3);
|
|
|
+ play(3, timeScale);
|
|
|
+ backDoorIsOpen.value = false;
|
|
|
+ frontDoorIsOpen.value = true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (selectData.rearGateOpenCtrl == 1 || selectData.rearGateOpenCtrl === true) {
|
|
|
+ if (selectData.rearGateClose == 1 && selectData.rearGateOpen == 0) {
|
|
|
isRearCloseRunning = false;
|
|
|
- if (selectData.rearGateOpen == 0 && selectData.rearGateClose == 0) {
|
|
|
- //打开后门
|
|
|
- if (!isRearOpenRunning) {
|
|
|
- isRearOpenRunning = true;
|
|
|
- play(3, timeScale);
|
|
|
- rearDeviceState = 3;
|
|
|
- frontDoorIsOpen.value = true;
|
|
|
- backDoorIsOpen.value = true;
|
|
|
- }
|
|
|
- }
|
|
|
- if (selectData.rearGateOpen == 1 && selectData.rearGateClose == 0) {
|
|
|
- isRearOpenRunning = false;
|
|
|
-
|
|
|
- if (rearDeviceState != 3) {
|
|
|
- rearDeviceState = 3;
|
|
|
- import.meta.env.VITE_GLOB_IS_SIMULATE ? play(3, timeScale) : play(3);
|
|
|
- backDoorIsOpen.value = false;
|
|
|
- frontDoorIsOpen.value = true;
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (selectData.rearGateOpen == 0 && selectData.rearGateClose == 0) {
|
|
|
- //关闭后门
|
|
|
- isRearOpenRunning = false;
|
|
|
- if (!isRearCloseRunning) {
|
|
|
- isRearCloseRunning = true;
|
|
|
- play(4, timeScale);
|
|
|
- rearDeviceState = 4;
|
|
|
- frontDoorIsOpen.value = true;
|
|
|
- backDoorIsOpen.value = true;
|
|
|
- }
|
|
|
- }
|
|
|
- if (selectData.rearGateClose == 1 && selectData.rearGateOpen == 0) {
|
|
|
- isRearCloseRunning = false;
|
|
|
- if (rearDeviceState == 3) {
|
|
|
- rearDeviceState = 4;
|
|
|
- import.meta.env.VITE_GLOB_IS_SIMULATE ? play(4, timeScale) : play(4);
|
|
|
- backDoorIsOpen.value = false;
|
|
|
- }
|
|
|
+ if (rearDeviceState == 3) {
|
|
|
+ rearDeviceState = 4;
|
|
|
+ // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(4, timeScale) : play(4);
|
|
|
+ play(4, timeScale);
|
|
|
+ backDoorIsOpen.value = false;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- // console.log('frontGateOpen:', selectData.frontGateOpen, ' frontGateClose:', selectData.frontGateClose, ' rearGateOpen:', selectData.rearGateOpen, ' rearGateClose:', selectData.rearGateClose, ' frontGateOpenCtrl:', selectData.frontGateOpenCtrl, ' rearGateOpenCtrl:', selectData.rearGateOpenCtrl)
|
|
|
}
|
|
|
|
|
|
function handleCancel() {
|