|
@@ -7,18 +7,18 @@
|
|
|
style="width: 100%; height: 100%; position: absolute; pointer-events: none; overflow: hidden; z-index: 1; top: 0"
|
|
|
>
|
|
|
<div style="position: relative" v-if="selectData['modalTyoe']">
|
|
|
- <div class="elementTag" id="inputBox">
|
|
|
+ <div class="elementTag" id="inputBox1">
|
|
|
<div class="elementContent elementContent-r" v-if="selectData.DataPa && backMonitorIsShow">
|
|
|
<!-- <div class="element-item"><span class="data-title">风机气压(Pa):</span><span>{{ selectData.DataPa ? selectData.DataPa : '-' }}</span></div> -->
|
|
|
<div class="element-item"
|
|
|
- ><span class="data-title">风机负压(Pa):</span><span>{{ c }}</span></div
|
|
|
+ ><span class="data-title">风机负压(Pa):</span><span>{{ selectData.Fan2FanPre ? selectData.Fan2FanPre : '-' }}</span></div
|
|
|
>
|
|
|
<div class="element-item"
|
|
|
><span class="data-title">风机风量(m³/s):</span><span>{{ selectData.Fan2m3 ? selectData.Fan2m3 : '-' }}</span></div
|
|
|
>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="elementTag" id="inputBox1">
|
|
|
+ <div class="elementTag" id="inputBox">
|
|
|
<div class="elementContent elementContent-r" v-if="selectData.DataPa && frontMonitorIsShow">
|
|
|
<!-- <div class="element-item"><span class="data-title">风机全压(Pa):</span><span>{{ selectData.DataPa ? selectData.DataPa : '-' }}</span></div> -->
|
|
|
<div class="element-item"
|
|
@@ -807,25 +807,28 @@
|
|
|
const otherInfo = selectData.otherInfo;
|
|
|
let faultDevice, doorDevice;
|
|
|
if (otherInfo) {
|
|
|
- //
|
|
|
const linkDevices: { deviceType: string; deviceId: string }[] = JSON.parse(otherInfo);
|
|
|
- linkDevices.filter((item) => {
|
|
|
- if (item.deviceType == 'faultEqu') {
|
|
|
- faultDevice = item;
|
|
|
- } else if (item.deviceType == 'explosionproof') {
|
|
|
- doorDevice = item;
|
|
|
+ if (linkDevices instanceof Array) {
|
|
|
+ linkDevices.filter((item) => {
|
|
|
+ if (item.deviceType == 'faultEqu') {
|
|
|
+ faultDevice = item;
|
|
|
+ } else if (item.deviceType == 'explosionproof') {
|
|
|
+ doorDevice = item;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // const result = await pointMonitor({ ids: '1657545388451663006' });
|
|
|
+ // faultData.value = result['valueList'] || [];
|
|
|
+ if (faultDevice) {
|
|
|
+ const result = await pointMonitor({ ids: faultDevice.deviceId });
|
|
|
+ faultData.value = result['valueList'] || [];
|
|
|
}
|
|
|
- });
|
|
|
- }
|
|
|
- // const result = await pointMonitor({ ids: '1657545388451663006' });
|
|
|
- // faultData.value = result['valueList'] || [];
|
|
|
- if (faultDevice) {
|
|
|
- const result = await pointMonitor({ ids: faultDevice.deviceId });
|
|
|
- faultData.value = result['valueList'] || [];
|
|
|
- }
|
|
|
- if (doorDevice) {
|
|
|
- const result = await pointMonitor({ ids: doorDevice.deviceId });
|
|
|
- explosionDoorData.value = result['valueList'] || [];
|
|
|
+ if (doorDevice) {
|
|
|
+ const result = await pointMonitor({ ids: doorDevice.deviceId });
|
|
|
+ explosionDoorData.value = result['valueList'] || [];
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 这里处理绑定单设备id
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -1042,7 +1045,11 @@
|
|
|
|
|
|
const handerFn = (flag?) => {
|
|
|
if (modalType.value == 'startSmoke') {
|
|
|
- if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
|
|
|
+ if (
|
|
|
+ selectData['Fan1StartStatus'] == 1 &&
|
|
|
+ selectData['Fan2StartStatus'] == 0 &&
|
|
|
+ (selectData['Fan2OneStartCon'] === undefined || (selectData['Fan2OneStartCon'] !== undefined && selectData['Fan2OneStartCon'] == 1))
|
|
|
+ ) {
|
|
|
start('CtrlFan2Start')
|
|
|
.then(() => {
|
|
|
frontMonitorIsShow.value = false;
|
|
@@ -1051,7 +1058,11 @@
|
|
|
.catch((err) => {
|
|
|
createMessage.error(err.message);
|
|
|
});
|
|
|
- } else if (selectData['Fan1StartStatus'] == 0 && selectData['Fan2StartStatus'] == 1) {
|
|
|
+ } else if (
|
|
|
+ selectData['Fan1StartStatus'] == 0 &&
|
|
|
+ selectData['Fan2StartStatus'] == 1 &&
|
|
|
+ (selectData['Fan1OneStartCon'] === undefined || (selectData['Fan1OneStartCon'] !== undefined && selectData['Fan1OneStartCon'] == 1))
|
|
|
+ ) {
|
|
|
start('CtrlFan1Start')
|
|
|
.then(() => {
|
|
|
frontMonitorIsShow.value = true;
|
|
@@ -1066,91 +1077,159 @@
|
|
|
}
|
|
|
} else if (modalType.value == 'changeDirection') {
|
|
|
// 红柳林矿一键反风操作是倒机+反风,如主机运行,一件反风后,备机启动并风向与原来相反
|
|
|
- if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
|
|
|
- // 主机一键反风
|
|
|
- if (isSimulation) {
|
|
|
- const fan1Forward = selectData['Fan1FreqForwardRun'] == 1 ? 0 : 1;
|
|
|
- const fan1Reverse = fan1Forward == 0 ? 1 : 0;
|
|
|
- // 模拟
|
|
|
- start('CtrlFan1Reverse', { Fan1FreqForwardRun: fan1Forward, Fan1FreqReverseRun: fan1Reverse }, true).catch((err) => {
|
|
|
- createMessage.error(err.message);
|
|
|
- });
|
|
|
- } else {
|
|
|
- // 实际
|
|
|
- start('CtrlFan1Reverse').catch((err) => {
|
|
|
- createMessage.error(err.message);
|
|
|
- });
|
|
|
- }
|
|
|
- } else if (selectData['Fan2StartStatus'] == 1 && selectData['Fan1StartStatus'] == 0) {
|
|
|
- if (isSimulation) {
|
|
|
- const fan2Forward = selectData['Fan2FreqForwardRun'] == 1 ? 0 : 1;
|
|
|
- const fan2Reverse = fan2Forward == 0 ? 1 : 0;
|
|
|
- // 模拟
|
|
|
- start('CtrlFan2Reverse', { Fan2FreqForwardRun: fan2Forward, Fan2FreqReverseRun: fan2Reverse }, true).catch((err) => {
|
|
|
- createMessage.error(err.message);
|
|
|
- });
|
|
|
- } else {
|
|
|
- // 实际
|
|
|
- start('CtrlFan2Reverse').catch((err) => {
|
|
|
- createMessage.error(err.message);
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- } else if (selectData['Fan2StartStatus'] == 0 && selectData['Fan1StartStatus'] == 0) {
|
|
|
- } else if (modalType.value == 'changeSmoke') {
|
|
|
- //182模拟
|
|
|
- // 不听风倒机
|
|
|
- if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
|
|
|
- // 由主到备
|
|
|
- // 正启动
|
|
|
- if (selectData['Fan1FreqForwardRun'] && selectData['Fan1FreqForwardRun'] == 1) {
|
|
|
- console.log('一键1倒2正启动控制 ');
|
|
|
- start('CtrlFan1ToFan2Forward')
|
|
|
- .then(() => {
|
|
|
- frontMonitorIsShow.value = false;
|
|
|
- backMonitorIsShow.value = true;
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
+ // 先判断启动风机的风流方向
|
|
|
+ if (selectData['Fan1Reversal'] !== undefined) {
|
|
|
+ if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
|
|
|
+ //1号风机机正在运行
|
|
|
+ // 判断2号风机是否具备反风条件
|
|
|
+ if (selectData['Fan2OneFfCon'] == 1) {
|
|
|
+ // 2号风机下发反风指令
|
|
|
+ start('CtrlFan2Reverse').catch((err) => {
|
|
|
createMessage.error(err.message);
|
|
|
});
|
|
|
+ } else {
|
|
|
+ createMessage.error('2号风机不具备一键反风条件!');
|
|
|
+ }
|
|
|
+ } else if (selectData['Fan2StartStatus'] == 1 && selectData['Fan1StartStatus'] == 0) {
|
|
|
+ // 备机正在运行
|
|
|
+ if (selectData['Fan1OneFfCon'] == 1) {
|
|
|
+ // 备风机反转,主机即将正转启动
|
|
|
+ start('CtrlFan1Reverse')
|
|
|
+ .then(() => {
|
|
|
+ frontMonitorIsShow.value = true;
|
|
|
+ backMonitorIsShow.value = false;
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ createMessage.error(err.message);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ createMessage.error('1号风机不具备一键反风条件!');
|
|
|
+ }
|
|
|
}
|
|
|
- // 反启动
|
|
|
- if (selectData['Fan1FreqReverseRun'] && selectData['Fan1FreqReverseRun'] == 1) {
|
|
|
- console.log('一键1倒2反启动控制');
|
|
|
- start('CtrlFan1ToFan2Reverse')
|
|
|
- .then(() => {
|
|
|
- frontMonitorIsShow.value = false;
|
|
|
- backMonitorIsShow.value = true;
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
+ } else {
|
|
|
+ if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
|
|
|
+ // 主机一键反风
|
|
|
+ if (isSimulation) {
|
|
|
+ const fan1Forward = selectData['Fan1FreqForwardRun'] == 1 ? 0 : 1;
|
|
|
+ const fan1Reverse = fan1Forward == 0 ? 1 : 0;
|
|
|
+ // 模拟
|
|
|
+ start('CtrlFan1Reverse', { Fan1FreqForwardRun: fan1Forward, Fan1FreqReverseRun: fan1Reverse }, true).catch((err) => {
|
|
|
createMessage.error(err.message);
|
|
|
});
|
|
|
- }
|
|
|
- } else if (selectData['Fan2StartStatus'] == 1 && selectData['Fan1StartStatus'] == 0) {
|
|
|
- // 由备到主
|
|
|
- // 正启动
|
|
|
- if (selectData['Fan2FreqForwardRun'] && selectData['Fan2FreqForwardRun'] == 1) {
|
|
|
- console.log('一键2倒1正启动控制');
|
|
|
- start('CtrlFan2ToFan1Forward')
|
|
|
- .then(() => {
|
|
|
- frontMonitorIsShow.value = true;
|
|
|
- backMonitorIsShow.value = false;
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
+ } else {
|
|
|
+ // 实际
|
|
|
+ start('CtrlFan1Reverse').catch((err) => {
|
|
|
createMessage.error(err.message);
|
|
|
});
|
|
|
- }
|
|
|
- // 反启动
|
|
|
- if (selectData['Fan2FreqReverseRun'] && selectData['Fan2FreqReverseRun'] == 1) {
|
|
|
- console.log('一键2倒1反启动控制');
|
|
|
- start('CtrlFan2ToFan1Reverse')
|
|
|
- .then(() => {
|
|
|
- frontMonitorIsShow.value = true;
|
|
|
- backMonitorIsShow.value = false;
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
+ }
|
|
|
+ } else if (selectData['Fan2StartStatus'] == 1 && selectData['Fan1StartStatus'] == 0) {
|
|
|
+ if (isSimulation) {
|
|
|
+ const fan2Forward = selectData['Fan2FreqForwardRun'] == 1 ? 0 : 1;
|
|
|
+ const fan2Reverse = fan2Forward == 0 ? 1 : 0;
|
|
|
+ // 模拟
|
|
|
+ start('CtrlFan2Reverse', { Fan2FreqForwardRun: fan2Forward, Fan2FreqReverseRun: fan2Reverse }, true).catch((err) => {
|
|
|
createMessage.error(err.message);
|
|
|
});
|
|
|
+ } else {
|
|
|
+ // 实际
|
|
|
+ start('CtrlFan2Reverse').catch((err) => {
|
|
|
+ createMessage.error(err.message);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (modalType.value == 'changeSmoke') {
|
|
|
+ //182模拟
|
|
|
+ // 红柳林实际在倒机时有倒机条件,只有倒机条件具备时才可以倒机
|
|
|
+ // 不听风倒机
|
|
|
+ if (selectData['Fan1OneDjCon'] === undefined && selectData['Fan2OneDjCon'] === undefined) {
|
|
|
+ if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
|
|
|
+ // 由主到备
|
|
|
+ // 正启动
|
|
|
+ if (selectData['Fan1FreqForwardRun'] && selectData['Fan1FreqForwardRun'] == 1) {
|
|
|
+ console.log('一键1倒2正启动控制 ');
|
|
|
+ start('CtrlFan1ToFan2Forward')
|
|
|
+ .then(() => {
|
|
|
+ frontMonitorIsShow.value = false;
|
|
|
+ backMonitorIsShow.value = true;
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ createMessage.error(err.message);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // 反启动
|
|
|
+ if (selectData['Fan1FreqReverseRun'] && selectData['Fan1FreqReverseRun'] == 1) {
|
|
|
+ console.log('一键1倒2反启动控制');
|
|
|
+ start('CtrlFan1ToFan2Reverse')
|
|
|
+ .then(() => {
|
|
|
+ frontMonitorIsShow.value = false;
|
|
|
+ backMonitorIsShow.value = true;
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ createMessage.error(err.message);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else if (selectData['Fan2StartStatus'] == 1 && selectData['Fan1StartStatus'] == 0) {
|
|
|
+ // 由备到主
|
|
|
+ // 正启动
|
|
|
+ if (selectData['Fan2FreqForwardRun'] && selectData['Fan2FreqForwardRun'] == 1) {
|
|
|
+ console.log('一键2倒1正启动控制');
|
|
|
+ start('CtrlFan2ToFan1Forward')
|
|
|
+ .then(() => {
|
|
|
+ frontMonitorIsShow.value = true;
|
|
|
+ backMonitorIsShow.value = false;
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ createMessage.error(err.message);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // 反启动
|
|
|
+ if (selectData['Fan2FreqReverseRun'] && selectData['Fan2FreqReverseRun'] == 1) {
|
|
|
+ console.log('一键2倒1反启动控制');
|
|
|
+ start('CtrlFan2ToFan1Reverse')
|
|
|
+ .then(() => {
|
|
|
+ frontMonitorIsShow.value = true;
|
|
|
+ backMonitorIsShow.value = false;
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ createMessage.error(err.message);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 红柳林倒机
|
|
|
+ if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
|
|
|
+ if (selectData['Fan1OneDjCon'] == 1) {
|
|
|
+ start('CtrlFan1ToFan2')
|
|
|
+ .then(() => {
|
|
|
+ if (globalConfig.History_Type == 'remote') {
|
|
|
+ createMessage.success('指令已下发至生产管控平台成功!');
|
|
|
+ } else {
|
|
|
+ createMessage.success('指令已下发成功!');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ createMessage.error(err.message);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ createMessage.error('1号风机不具备倒机条件!');
|
|
|
+ }
|
|
|
+ } else if (selectData['Fan1StartStatus'] == 0 && selectData['Fan2StartStatus'] == 1) {
|
|
|
+ if (selectData['Fan2OneDjCon'] == 1) {
|
|
|
+ start('CtrlFan2ToFan1')
|
|
|
+ .then(() => {
|
|
|
+ if (globalConfig.History_Type == 'remote') {
|
|
|
+ createMessage.success('指令已下发至生产管控平台成功!');
|
|
|
+ } else {
|
|
|
+ createMessage.success('指令已下发成功!');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ createMessage.error(err.message);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ createMessage.error('1号风机不具备倒机条件!');
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} else if (modalType.value == 'changeSmoke1') {
|
|
@@ -1239,7 +1318,6 @@
|
|
|
createMessage.success('关锁成功');
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
// 开门 关门
|
|
|
if (flag === 'openGate') {
|
|
|
start('CtrlExplosionVentOpen').then(() => {
|
|
@@ -1253,13 +1331,53 @@
|
|
|
} else if (modalType.value === 'startFan') {
|
|
|
let paramcode = '';
|
|
|
if (flag === 'Fan1Open') {
|
|
|
- paramcode = 'CtrlFan1Start';
|
|
|
+ if (selectData['Fan1OneStartCon'] === undefined) {
|
|
|
+ paramcode = 'CtrlFan1Start';
|
|
|
+ } else {
|
|
|
+ // 风机有控制条件时
|
|
|
+ if (selectData['Fan1OneStartCon'] == 1) {
|
|
|
+ paramcode = 'CtrlFan1Start';
|
|
|
+ } else {
|
|
|
+ createMessage.error('1号风机不具备启动条件!');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
} else if (flag === 'Fan2Open') {
|
|
|
- paramcode = 'CtrlFan2Start';
|
|
|
+ if (selectData['Fan2OneStartCon'] === undefined) {
|
|
|
+ paramcode = 'CtrlFan2Start';
|
|
|
+ } else {
|
|
|
+ // 风机有控制条件时
|
|
|
+ if (selectData['Fan2OneStartCon'] == 1) {
|
|
|
+ paramcode = 'CtrlFan2Start';
|
|
|
+ } else {
|
|
|
+ createMessage.error('2号风机不具备启动条件!');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
} else if (flag === 'Fan1Stop') {
|
|
|
- paramcode = 'CtrlFan1Stop';
|
|
|
+ if (selectData['Fan1OneShutdownCon'] === undefined) {
|
|
|
+ paramcode = 'CtrlFan1Stop';
|
|
|
+ } else {
|
|
|
+ // 风机有控制条件时
|
|
|
+ if (selectData['Fan1OneShutdownCon'] == 1) {
|
|
|
+ paramcode = 'CtrlFan1Stop';
|
|
|
+ } else {
|
|
|
+ createMessage.error('1号风机不具备停机条件!');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
} else if (flag === 'Fan2Stop') {
|
|
|
- paramcode = 'CtrlFan2Stop';
|
|
|
+ if (selectData['Fan2OneShutdownCon'] === undefined) {
|
|
|
+ paramcode = 'CtrlFan2Stop';
|
|
|
+ } else {
|
|
|
+ // 风机有控制条件时
|
|
|
+ if (selectData['Fan2OneShutdownCon'] == 1) {
|
|
|
+ paramcode = 'CtrlFan2Stop';
|
|
|
+ } else {
|
|
|
+ createMessage.error('2号风机不具备停机条件!');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
} else if (flag === 'Fan1Reset') {
|
|
|
paramcode = 'CtrlFan1Reset';
|
|
|
} else if (flag === 'Fan2Reset') {
|
|
@@ -1273,8 +1391,6 @@
|
|
|
} else {
|
|
|
createMessage.success('指令已下发成功!');
|
|
|
}
|
|
|
- frontMonitorIsShow.value = false;
|
|
|
- backMonitorIsShow.value = true;
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
createMessage.error(err.message);
|