|
@@ -11,12 +11,16 @@
|
|
|
<div class="scene-box">
|
|
<div class="scene-box">
|
|
|
<div class="top-box" v-if="!loading">
|
|
<div class="top-box" v-if="!loading">
|
|
|
<div class="top-center row">
|
|
<div class="top-center row">
|
|
|
- <div class="vent-flex-row" id="fanLocalSelectDom" v-if="!globalConfig?.simulatedPassword && getDictItemsByCode('fanlocaltype')">
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="vent-flex-row"
|
|
|
|
|
+ id="fanLocalSelectDom"
|
|
|
|
|
+ v-if="!globalConfig?.simulatedPassword && getDictItemsByCode(CONSTS.DICT_CODE_FANLOCALTYPE)"
|
|
|
|
|
+ >
|
|
|
<span style="color: var(--vent-font-color); margin-left: 5px">风机类型:</span>
|
|
<span style="color: var(--vent-font-color); margin-left: 5px">风机类型:</span>
|
|
|
<JDictSelectTag
|
|
<JDictSelectTag
|
|
|
style="width: 180px"
|
|
style="width: 180px"
|
|
|
- v-model:value="devicekide"
|
|
|
|
|
- dictCode="fanlocaltype"
|
|
|
|
|
|
|
+ v-model:value="devicekind"
|
|
|
|
|
+ :dictCode="CONSTS.DICT_CODE_FANLOCALTYPE"
|
|
|
:showChooseOption="false"
|
|
:showChooseOption="false"
|
|
|
:getPopupContainer="getPopupContainer"
|
|
:getPopupContainer="getPopupContainer"
|
|
|
@change="changeDeviceKind"
|
|
@change="changeDeviceKind"
|
|
@@ -60,7 +64,7 @@
|
|
|
fanTitles[0]
|
|
fanTitles[0]
|
|
|
}}</div>
|
|
}}</div>
|
|
|
<div
|
|
<div
|
|
|
- v-if="selectData && ((selectData['install_kind'] && !selectData['install_kind'].endsWith('_1')) || !selectData['install_kind'])"
|
|
|
|
|
|
|
+ v-if="isShowStandbyFan"
|
|
|
class="tab-item"
|
|
class="tab-item"
|
|
|
:class="{ 'tab-item-active-r': warningMonitorRowIndex === 1 }"
|
|
:class="{ 'tab-item-active-r': warningMonitorRowIndex === 1 }"
|
|
|
@click="selectDevice('warningMonitorRowIndex', 1)"
|
|
@click="selectDevice('warningMonitorRowIndex', 1)"
|
|
@@ -77,12 +81,8 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="item-name">{{ data.title }}</div>
|
|
<div class="item-name">{{ data.title }}</div>
|
|
|
<div v-if="data.dataIndex.startsWith('Fan')">
|
|
<div v-if="data.dataIndex.startsWith('Fan')">
|
|
|
- <div class="item-value" v-if="warningMonitorRowIndex == 0">{{
|
|
|
|
|
- selectData[data.dataIndex.replace('Fan', 'Fan1')] ? selectData[data.dataIndex.replace('Fan', 'Fan1')] : '-'
|
|
|
|
|
- }}</div>
|
|
|
|
|
- <div class="item-value" v-if="warningMonitorRowIndex == 1">{{
|
|
|
|
|
- selectData[data.dataIndex.replace('Fan', 'Fan2')] ? selectData[data.dataIndex.replace('Fan', 'Fan2')] : '-'
|
|
|
|
|
- }}</div>
|
|
|
|
|
|
|
+ <div class="item-value" v-if="warningMonitorRowIndex == 0">{{ getFanValue(data.dataIndex, 'Fan1') }}</div>
|
|
|
|
|
+ <div class="item-value" v-if="warningMonitorRowIndex == 1">{{ getFanValue(data.dataIndex, 'Fan2') }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-else>
|
|
<div v-else>
|
|
|
<div class="item-value">{{ selectData[data.dataIndex] ? selectData[data.dataIndex] : '-' }}</div>
|
|
<div class="item-value">{{ selectData[data.dataIndex] ? selectData[data.dataIndex] : '-' }}</div>
|
|
@@ -91,7 +91,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="container-group" v-if="hasPermission('fanLocal:pjfx')">
|
|
|
|
|
|
|
+ <div class="container-group" v-if="hasPermission(CONSTS.PERMISSIONS.FAN_LOCAL_PJFX)">
|
|
|
<div class="warning-header">
|
|
<div class="warning-header">
|
|
|
<div class="header-item">
|
|
<div class="header-item">
|
|
|
<div class="header-title">评价分析</div>
|
|
<div class="header-title">评价分析</div>
|
|
@@ -131,7 +131,7 @@
|
|
|
fanTitles[0]
|
|
fanTitles[0]
|
|
|
}}</div>
|
|
}}</div>
|
|
|
<div
|
|
<div
|
|
|
- v-if="selectData && ((selectData['install_kind'] && !selectData['install_kind'].endsWith('_1')) || !selectData['install_kind'])"
|
|
|
|
|
|
|
+ v-if="isShowStandbyFan"
|
|
|
class="tab-item"
|
|
class="tab-item"
|
|
|
:class="{ 'tab-item-active-r': dataMonitorRowIndex == 1 }"
|
|
:class="{ 'tab-item-active-r': dataMonitorRowIndex == 1 }"
|
|
|
@click="selectDevice('dataMonitorRowIndex', 1)"
|
|
@click="selectDevice('dataMonitorRowIndex', 1)"
|
|
@@ -149,12 +149,8 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="item-name">{{ state.title }}</div>
|
|
<div class="item-name">{{ state.title }}</div>
|
|
|
<div v-if="state.dataIndex.startsWith('Fan')">
|
|
<div v-if="state.dataIndex.startsWith('Fan')">
|
|
|
- <div class="item-value" v-if="dataMonitorRowIndex == 0">{{
|
|
|
|
|
- selectData[state.dataIndex.replace('Fan', 'Fan1')] ? selectData[state.dataIndex.replace('Fan', 'Fan1')] : '-'
|
|
|
|
|
- }}</div>
|
|
|
|
|
- <div class="item-value" v-if="dataMonitorRowIndex == 1">{{
|
|
|
|
|
- selectData[state.dataIndex.replace('Fan', 'Fan2')] ? selectData[state.dataIndex.replace('Fan', 'Fan2')] : '-'
|
|
|
|
|
- }}</div>
|
|
|
|
|
|
|
+ <div class="item-value" v-if="dataMonitorRowIndex == 0">{{ getFanValue(state.dataIndex, 'Fan1') }}</div>
|
|
|
|
|
+ <div class="item-value" v-if="dataMonitorRowIndex == 1">{{ getFanValue(state.dataIndex, 'Fan2') }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-else>
|
|
<div v-else>
|
|
|
<div class="item-value">{{ selectData[state.dataIndex] ? selectData[state.dataIndex] : '-' }} </div>
|
|
<div class="item-value">{{ selectData[state.dataIndex] ? selectData[state.dataIndex] : '-' }} </div>
|
|
@@ -182,38 +178,36 @@
|
|
|
<div
|
|
<div
|
|
|
class="signal-round"
|
|
class="signal-round"
|
|
|
:class="{
|
|
:class="{
|
|
|
- 'signal-round-run': selectData[state.dataIndex.replace('Fan', 'Fan1')] == '0',
|
|
|
|
|
|
|
+ 'signal-round-run': getFanValue(state.dataIndex, 'Fan1') == '0',
|
|
|
'signal-round-warning':
|
|
'signal-round-warning':
|
|
|
- selectData[state.dataIndex.replace('Fan', 'Fan1')] !== undefined &&
|
|
|
|
|
- selectData[state.dataIndex.replace('Fan', 'Fan1')] == '1',
|
|
|
|
|
- 'signal-round-gry': selectData[state.dataIndex.replace('Fan', 'Fan1')] === undefined,
|
|
|
|
|
|
|
+ getFanValue(state.dataIndex, 'Fan1') !== undefined && getFanValue(state.dataIndex, 'Fan1') == '1',
|
|
|
|
|
+ 'signal-round-gry': getFanValue(state.dataIndex, 'Fan1') === undefined,
|
|
|
}"
|
|
}"
|
|
|
></div>
|
|
></div>
|
|
|
<div class="vent-margin-l-8">{{
|
|
<div class="vent-margin-l-8">{{
|
|
|
- selectData[state.dataIndex.replace('Fan', 'Fan1')] === undefined
|
|
|
|
|
|
|
+ getFanValue(state.dataIndex, 'Fan1') === undefined
|
|
|
? '无状态'
|
|
? '无状态'
|
|
|
- : selectData[state.dataIndex.replace('Fan', 'Fan1')] == '0'
|
|
|
|
|
- ? '正常'
|
|
|
|
|
- : '异常'
|
|
|
|
|
|
|
+ : getFanValue(state.dataIndex, 'Fan1') == '0'
|
|
|
|
|
+ ? '正常'
|
|
|
|
|
+ : '异常'
|
|
|
}}</div>
|
|
}}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="signal-item" v-if="warningMonitorRowIndex == 1">
|
|
<div class="signal-item" v-if="warningMonitorRowIndex == 1">
|
|
|
<div
|
|
<div
|
|
|
class="signal-round"
|
|
class="signal-round"
|
|
|
:class="{
|
|
:class="{
|
|
|
- 'signal-round-run': selectData[state.dataIndex.replace('Fan', 'Fan2')] == '0',
|
|
|
|
|
|
|
+ 'signal-round-run': getFanValue(state.dataIndex, 'Fan2') == '0',
|
|
|
'signal-round-warning':
|
|
'signal-round-warning':
|
|
|
- selectData[state.dataIndex.replace('Fan', 'Fan2')] != undefined &&
|
|
|
|
|
- selectData[state.dataIndex.replace('Fan', 'Fan2')] == '1',
|
|
|
|
|
- 'signal-round-gry': selectData[state.dataIndex.replace('Fan', 'Fan2')] == undefined,
|
|
|
|
|
|
|
+ getFanValue(state.dataIndex, 'Fan2') != undefined && getFanValue(state.dataIndex, 'Fan2') == '1',
|
|
|
|
|
+ 'signal-round-gry': getFanValue(state.dataIndex, 'Fan2') == undefined,
|
|
|
}"
|
|
}"
|
|
|
></div>
|
|
></div>
|
|
|
<div class="vent-margin-l-8">{{
|
|
<div class="vent-margin-l-8">{{
|
|
|
- selectData[state.dataIndex.replace('Fan', 'Fan2')] == undefined
|
|
|
|
|
|
|
+ getFanValue(state.dataIndex, 'Fan2') == undefined
|
|
|
? '无状态'
|
|
? '无状态'
|
|
|
- : selectData[state.dataIndex.replace('Fan', 'Fan2')] == '0'
|
|
|
|
|
- ? '正常'
|
|
|
|
|
- : '异常'
|
|
|
|
|
|
|
+ : getFanValue(state.dataIndex, 'Fan2') == '0'
|
|
|
|
|
+ ? '正常'
|
|
|
|
|
+ : '异常'
|
|
|
}}</div>
|
|
}}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -271,13 +265,13 @@
|
|
|
<template v-if="globalConfig.History_Type == 'remote'">
|
|
<template v-if="globalConfig.History_Type == 'remote'">
|
|
|
<HistoryTable
|
|
<HistoryTable
|
|
|
:columns-type="`${selectData.deviceType}`"
|
|
:columns-type="`${selectData.deviceType}`"
|
|
|
- :device-type="`${devicekide}`"
|
|
|
|
|
|
|
+ :device-type="`${devicekind}`"
|
|
|
designScope="fanlocal-history"
|
|
designScope="fanlocal-history"
|
|
|
:scroll="scroll"
|
|
:scroll="scroll"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
- <HistoryTable class="w-100% h-100%" :device-code="`${devicekide}`" :scroll="scroll" dict-code="fanlocal_dict" />
|
|
|
|
|
|
|
+ <HistoryTable class="w-100% h-100%" :device-code="`${devicekind}`" :scroll="scroll" dict-code="fanlocal_dict" />
|
|
|
</template>
|
|
</template>
|
|
|
</div>
|
|
</div>
|
|
|
</a-tab-pane>
|
|
</a-tab-pane>
|
|
@@ -298,14 +292,14 @@
|
|
|
</a-tab-pane>
|
|
</a-tab-pane>
|
|
|
<a-tab-pane key="4" tab="报警历史">
|
|
<a-tab-pane key="4" tab="报警历史">
|
|
|
<div class="tab-item" v-if="activeKey === '4'">
|
|
<div class="tab-item" v-if="activeKey === '4'">
|
|
|
- <AlarmHistoryTable columns-type="alarm" :device-type="`${devicekide}`" designScope="alarm-history" :scroll="scroll" />
|
|
|
|
|
|
|
+ <AlarmHistoryTable columns-type="alarm" :device-type="`${devicekind}`" designScope="alarm-history" :scroll="scroll" />
|
|
|
</div>
|
|
</div>
|
|
|
</a-tab-pane>
|
|
</a-tab-pane>
|
|
|
<a-tab-pane key="5" tab="操作历史">
|
|
<a-tab-pane key="5" tab="操作历史">
|
|
|
<div class="tab-item" v-if="activeKey === '5'">
|
|
<div class="tab-item" v-if="activeKey === '5'">
|
|
|
<HandlerHistoryTable
|
|
<HandlerHistoryTable
|
|
|
columns-type="operator_history"
|
|
columns-type="operator_history"
|
|
|
- :device-type="`${devicekide}`"
|
|
|
|
|
|
|
+ :device-type="`${devicekind}`"
|
|
|
:device-list-api="baseList"
|
|
:device-list-api="baseList"
|
|
|
designScope="alarm-history"
|
|
designScope="alarm-history"
|
|
|
:scroll="scroll"
|
|
:scroll="scroll"
|
|
@@ -358,7 +352,7 @@
|
|
|
</a-tab-pane>
|
|
</a-tab-pane>
|
|
|
</a-tabs>
|
|
</a-tabs>
|
|
|
<a-button
|
|
<a-button
|
|
|
- v-if="hasPermission('btn:reportDown')"
|
|
|
|
|
|
|
+ v-if="hasPermission(CONSTS.PERMISSIONS.BTN_REPORT_DOWN)"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
size="small"
|
|
size="small"
|
|
|
preIcon="ant-design:download-outlined"
|
|
preIcon="ant-design:download-outlined"
|
|
@@ -399,10 +393,7 @@
|
|
|
<a-radio value="stop">停止</a-radio>
|
|
<a-radio value="stop">停止</a-radio>
|
|
|
</a-radio-group>
|
|
</a-radio-group>
|
|
|
</div>
|
|
</div>
|
|
|
- <div
|
|
|
|
|
- v-if="selectData && ((selectData['install_kind'] && !selectData['install_kind'].endsWith('_1')) || !selectData['install_kind'])"
|
|
|
|
|
- class="startSmoke-select"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <div v-if="isShowStandbyFan" class="startSmoke-select">
|
|
|
<div class="label">备机:</div>
|
|
<div class="label">备机:</div>
|
|
|
<a-radio-group v-model:value="mainWindIsShow2" @change="changeMotor" name="localWind2">
|
|
<a-radio-group v-model:value="mainWindIsShow2" @change="changeMotor" name="localWind2">
|
|
|
<a-radio value="open">开启</a-radio>
|
|
<a-radio value="open">开启</a-radio>
|
|
@@ -418,10 +409,7 @@
|
|
|
<div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1Stop')">停止</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 :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1Reset')">复位</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div
|
|
|
|
|
- v-if="selectData && ((selectData['install_kind'] && !selectData['install_kind'].endsWith('_1')) || !selectData['install_kind'])"
|
|
|
|
|
- class="startSmoke-select"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <div v-if="isShowStandbyFan" class="startSmoke-select">
|
|
|
<div class="label">备机:</div>
|
|
<div class="label">备机:</div>
|
|
|
<div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2Open')">开启</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('Fan2Stop')">停止</div>
|
|
@@ -434,10 +422,7 @@
|
|
|
<div class="label">主机:</div>
|
|
<div class="label">主机:</div>
|
|
|
<div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1remote')">远程/就地切换</div>
|
|
<div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1remote')">远程/就地切换</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div
|
|
|
|
|
- v-if="selectData && ((selectData['install_kind'] && !selectData['install_kind'].endsWith('_1')) || !selectData['install_kind'])"
|
|
|
|
|
- class="startSmoke-select"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <div v-if="isShowStandbyFan" class="startSmoke-select">
|
|
|
<div class="label">备机:</div>
|
|
<div class="label">备机:</div>
|
|
|
<div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2remote')">远程/就地切换</div>
|
|
<div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2remote')">远程/就地切换</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -445,17 +430,36 @@
|
|
|
<!-- 调频 -->
|
|
<!-- 调频 -->
|
|
|
<div class="vent-flex-row input-box" v-if="controlType == 'Fan1Frequency'">
|
|
<div class="vent-flex-row input-box" v-if="controlType == 'Fan1Frequency'">
|
|
|
<div class="label">主风机运行频率(Hz):</div>
|
|
<div class="label">主风机运行频率(Hz):</div>
|
|
|
- <a-input-number size="small" v-model:value="fan1FrequencyVal" :min="20" :max="50" :step="0.1" />
|
|
|
|
|
|
|
+ <a-input-number
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ v-model:value="fan1FrequencyVal"
|
|
|
|
|
+ :min="CONSTS.FAN_FREQ_MIN"
|
|
|
|
|
+ :max="CONSTS.FAN_FREQ_MAX"
|
|
|
|
|
+ :step="CONSTS.FAN_FREQ_STEP"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
<div class="vent-flex-row input-box" v-if="controlType == 'Fan2Frequency'">
|
|
<div class="vent-flex-row input-box" v-if="controlType == 'Fan2Frequency'">
|
|
|
<div class="label">备风机运行频率(Hz):</div>
|
|
<div class="label">备风机运行频率(Hz):</div>
|
|
|
- <a-input-number size="small" v-model:value="fan2FrequencyVal" :min="20" :max="50" :step="0.1" />
|
|
|
|
|
|
|
+ <!-- 优化:使用常量替代硬编码 -->
|
|
|
|
|
+ <a-input-number
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ v-model:value="fan2FrequencyVal"
|
|
|
|
|
+ :min="CONSTS.FAN_FREQ_MIN"
|
|
|
|
|
+ :max="CONSTS.FAN_FREQ_MAX"
|
|
|
|
|
+ :step="CONSTS.FAN_FREQ_STEP"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
<div class="vent-flex-row input-box" v-if="controlType == 'FanFrequency'">
|
|
<div class="vent-flex-row input-box" v-if="controlType == 'FanFrequency'">
|
|
|
<div class="label">风机运行频率(Hz):</div>
|
|
<div class="label">风机运行频率(Hz):</div>
|
|
|
- <a-input-number size="small" v-model:value="fan1FrequencyVal" :min="20" :max="50" :step="0.1" />
|
|
|
|
|
|
|
+ <!-- 优化:使用常量替代硬编码 -->
|
|
|
|
|
+ <a-input-number
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ v-model:value="fan1FrequencyVal"
|
|
|
|
|
+ :min="CONSTS.FAN_FREQ_MIN"
|
|
|
|
|
+ :max="CONSTS.FAN_FREQ_MAX"
|
|
|
|
|
+ :step="CONSTS.FAN_FREQ_STEP"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
<div class="vent-flex-row input-box" v-if="controlType == 'disAirAlarm'">
|
|
<div class="vent-flex-row input-box" v-if="controlType == 'disAirAlarm'">
|
|
|
<div class="label">漏风率(%):</div>
|
|
<div class="label">漏风率(%):</div>
|
|
|
<a-input-number size="small" v-model:value="frequencyVal" :min="0" :max="50" :step="0.1" />
|
|
<a-input-number size="small" v-model:value="frequencyVal" :min="0" :max="50" :step="0.1" />
|
|
@@ -542,7 +546,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
- import { ExclamationCircleFilled, ArrowRightOutlined, VideoCameraOutlined } from '@ant-design/icons-vue';
|
|
|
|
|
|
|
+ import { ExclamationCircleFilled, VideoCameraOutlined } from '@ant-design/icons-vue';
|
|
|
import {
|
|
import {
|
|
|
onBeforeMount,
|
|
onBeforeMount,
|
|
|
ref,
|
|
ref,
|
|
@@ -558,8 +562,8 @@
|
|
|
shallowReactive,
|
|
shallowReactive,
|
|
|
shallowRef,
|
|
shallowRef,
|
|
|
onBeforeUnmount,
|
|
onBeforeUnmount,
|
|
|
|
|
+ readonly,
|
|
|
} from 'vue';
|
|
} from 'vue';
|
|
|
- // import BarSingle from '../../../../components/chart/BarSingle.vue';
|
|
|
|
|
import FanDeviceEcharts from '../comment/FanDeviceEcharts.vue';
|
|
import FanDeviceEcharts from '../comment/FanDeviceEcharts.vue';
|
|
|
import BarAndLine from '../../../../components/chart/BarAndLine.vue';
|
|
import BarAndLine from '../../../../components/chart/BarAndLine.vue';
|
|
|
import GroupMonitorTable from '../comment/GroupMonitorTable.vue';
|
|
import GroupMonitorTable from '../comment/GroupMonitorTable.vue';
|
|
@@ -594,6 +598,37 @@
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
import { cloneDeep } from 'lodash-es';
|
|
import { cloneDeep } from 'lodash-es';
|
|
|
|
|
|
|
|
|
|
+ // 优化:提取硬编码为模块级常量
|
|
|
|
|
+ const CONSTS = {
|
|
|
|
|
+ // 频率相关常量
|
|
|
|
|
+ FAN_FREQ_MIN: 20,
|
|
|
|
|
+ FAN_FREQ_MAX: 50,
|
|
|
|
|
+ FAN_FREQ_STEP: 0.1,
|
|
|
|
|
+ // 瓦斯报警值常量
|
|
|
|
|
+ GAS_WARNING_VAL_DEFAULT: 0.6,
|
|
|
|
|
+ GAS_WARNING_VAL1_DEFAULT: 0.8,
|
|
|
|
|
+ // 设备类型/字典常量
|
|
|
|
|
+ DEVICE_TYPE_FANLOCAL: 'fanlocal',
|
|
|
|
|
+ DICT_CODE_FANLOCALTYPE: 'fanlocaltype',
|
|
|
|
|
+ // 风机名称常量
|
|
|
|
|
+ FAN_NAME_MAIN: '主机',
|
|
|
|
|
+ FAN_NAME_STANDBY: '备机',
|
|
|
|
|
+ // 滚动高度默认值
|
|
|
|
|
+ SCROLL_Y_DEFAULT: 180,
|
|
|
|
|
+ // 权限码常量(统一管理,避免拼写错误)
|
|
|
|
|
+ PERMISSIONS: {
|
|
|
|
|
+ FAN_LOCAL_PJFX: 'fanLocal:pjfx',
|
|
|
|
|
+ FAN_LOCAL_SHOW_CAMERA: 'fanlocal:showCamera',
|
|
|
|
|
+ BTN_REPORT_DOWN: 'btn:reportDown',
|
|
|
|
|
+ } as const,
|
|
|
|
|
+ } as const;
|
|
|
|
|
+
|
|
|
|
|
+ /** 列配置项 */
|
|
|
|
|
+ interface FanColumnItem {
|
|
|
|
|
+ title: string;
|
|
|
|
|
+ value?: string | number;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
const globalConfig = inject('globalConfig');
|
|
const globalConfig = inject('globalConfig');
|
|
|
const HistoryTable =
|
|
const HistoryTable =
|
|
|
globalConfig.History_Type == 'remote'
|
|
globalConfig.History_Type == 'remote'
|
|
@@ -610,12 +645,12 @@
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
const { createConfirm } = useMessage();
|
|
const { createConfirm } = useMessage();
|
|
|
const globSetting = useGlobSetting();
|
|
const globSetting = useGlobSetting();
|
|
|
- const showPlay = ref(hasPermission('fanlocal:showCamera') ? true : false);
|
|
|
|
|
|
|
+ const showPlay = ref(hasPermission(CONSTS.PERMISSIONS.FAN_LOCAL_SHOW_CAMERA) ? true : false);
|
|
|
const computedStyle = computed(() => {
|
|
const computedStyle = computed(() => {
|
|
|
- const hasMatchingPermission = hasPermission('fanLocal:pjfx');
|
|
|
|
|
|
|
+ const hasMatchingPermission = hasPermission(CONSTS.PERMISSIONS.FAN_LOCAL_PJFX);
|
|
|
return hasMatchingPermission ? 'max-height: 200px' : '';
|
|
return hasMatchingPermission ? 'max-height: 200px' : '';
|
|
|
});
|
|
});
|
|
|
- const fanTitles = globSetting.sysOrgCode === 'zmhjhzmy' ? ['1#风机', '2#风机'] : ['主机', '备机'];
|
|
|
|
|
|
|
+ const fanTitles = globSetting.sysOrgCode === 'zmhjhzmy' ? ['1#风机', '2#风机'] : [CONSTS.FAN_NAME_MAIN, CONSTS.FAN_NAME_STANDBY];
|
|
|
const modalTypeArr = reactive({
|
|
const modalTypeArr = reactive({
|
|
|
leftBtnArr: [
|
|
leftBtnArr: [
|
|
|
{
|
|
{
|
|
@@ -759,7 +794,7 @@
|
|
|
},
|
|
},
|
|
|
],
|
|
],
|
|
|
});
|
|
});
|
|
|
- const sensorList = ref<any[]>([
|
|
|
|
|
|
|
+ const sensorList = readonly([
|
|
|
{
|
|
{
|
|
|
value: '1',
|
|
value: '1',
|
|
|
label: 'T1',
|
|
label: 'T1',
|
|
@@ -772,14 +807,14 @@
|
|
|
value: '3',
|
|
value: '3',
|
|
|
label: 'T3',
|
|
label: 'T3',
|
|
|
},
|
|
},
|
|
|
- ]);
|
|
|
|
|
|
|
+ ] as const);
|
|
|
|
|
|
|
|
const scroll = reactive({
|
|
const scroll = reactive({
|
|
|
- y: 180,
|
|
|
|
|
|
|
+ y: CONSTS.SCROLL_Y_DEFAULT,
|
|
|
});
|
|
});
|
|
|
- const deviceTypeDicts = getDictItemsByCode('fanlocaltype');
|
|
|
|
|
- const gasWarningVal = ref(0.6); // 瓦斯最大报警值
|
|
|
|
|
- const gasWarningVal1 = ref(0.8); // 瓦斯最大报警值
|
|
|
|
|
|
|
+ const deviceTypeDicts = getDictItemsByCode(CONSTS.DICT_CODE_FANLOCALTYPE);
|
|
|
|
|
+ const gasWarningVal = ref(CONSTS.GAS_WARNING_VAL_DEFAULT);
|
|
|
|
|
+ const gasWarningVal1 = ref(CONSTS.GAS_WARNING_VAL1_DEFAULT);
|
|
|
const playerRef = ref();
|
|
const playerRef = ref();
|
|
|
const MonitorDataTable = ref();
|
|
const MonitorDataTable = ref();
|
|
|
const modalSensor = ref(null);
|
|
const modalSensor = ref(null);
|
|
@@ -809,7 +844,7 @@
|
|
|
// 设备数据
|
|
// 设备数据
|
|
|
const controlType = ref('');
|
|
const controlType = ref('');
|
|
|
const modalType = ref('');
|
|
const modalType = ref('');
|
|
|
- const mainModelType = ref('fanLocal');
|
|
|
|
|
|
|
+ const mainModelType = ref(CONSTS.DEVICE_TYPE_FANLOCAL);
|
|
|
// 监测数据
|
|
// 监测数据
|
|
|
const initData = {
|
|
const initData = {
|
|
|
deviceID: '',
|
|
deviceID: '',
|
|
@@ -834,17 +869,17 @@
|
|
|
const currentDeviceData = ref({});
|
|
const currentDeviceData = ref({});
|
|
|
const rightColumns = ref<BasicColumn[]>([]);
|
|
const rightColumns = ref<BasicColumn[]>([]);
|
|
|
const leftColumns = ref<BasicColumn[]>([]);
|
|
const leftColumns = ref<BasicColumn[]>([]);
|
|
|
- const leftColumns1 = ref<any[]>([
|
|
|
|
|
|
|
+ const leftColumns1 = ref<FanColumnItem[]>([
|
|
|
{ title: '供风充足评价', value: '' },
|
|
{ title: '供风充足评价', value: '' },
|
|
|
{ title: '回风流超限评价', value: '' },
|
|
{ title: '回风流超限评价', value: '' },
|
|
|
{ title: '风筒漏风率评价', value: '' },
|
|
{ title: '风筒漏风率评价', value: '' },
|
|
|
]);
|
|
]);
|
|
|
- const leftColumns2 = ref<any[]>([
|
|
|
|
|
|
|
+ const leftColumns2 = ref<FanColumnItem[]>([
|
|
|
{ title: '供风充足评价', value: '充足' },
|
|
{ title: '供风充足评价', value: '充足' },
|
|
|
{ title: '回风流超限评价', value: '正常' },
|
|
{ title: '回风流超限评价', value: '正常' },
|
|
|
{ title: '风筒漏风率评价', value: '正常' },
|
|
{ title: '风筒漏风率评价', value: '正常' },
|
|
|
]);
|
|
]);
|
|
|
- const devicekide = ref(deviceTypeDicts && deviceTypeDicts.length > 0 ? deviceTypeDicts[0]['value'] : 'fanlocal');
|
|
|
|
|
|
|
+ const devicekind = ref(deviceTypeDicts && deviceTypeDicts.length > 0 ? deviceTypeDicts[0]['value'] : CONSTS.DEVICE_TYPE_FANLOCAL);
|
|
|
const deviceType = ref(selectData.deviceType);
|
|
const deviceType = ref(selectData.deviceType);
|
|
|
const headElHeight = ref(0);
|
|
const headElHeight = ref(0);
|
|
|
let btnClick = ref(true); // 判断按钮是否可点
|
|
let btnClick = ref(true); // 判断按钮是否可点
|
|
@@ -898,7 +933,7 @@
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const changeDeviceKind = (e) => {
|
|
const changeDeviceKind = (e) => {
|
|
|
- devicekide.value = e;
|
|
|
|
|
|
|
+ devicekind.value = e;
|
|
|
loading.value = true;
|
|
loading.value = true;
|
|
|
selectRowIndex.value = -1;
|
|
selectRowIndex.value = -1;
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
@@ -932,6 +967,20 @@
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ // 优化:封装主备机数据取值方法,避免模板重复逻辑
|
|
|
|
|
+ const getFanValue = (dataIndex: string, fanType: 'Fan1' | 'Fan2') => {
|
|
|
|
|
+ if (!selectData) return '-';
|
|
|
|
|
+ const targetKey = dataIndex.startsWith('Fan') ? dataIndex.replace('Fan', fanType) : dataIndex;
|
|
|
|
|
+ return selectData[targetKey] ?? '-';
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 优化:重复判断抽离为计算属性,利用缓存减少重复计算
|
|
|
|
|
+ const isShowStandbyFan = computed(() => {
|
|
|
|
|
+ if (!selectData) return false;
|
|
|
|
|
+ const installKind = selectData.install_kind;
|
|
|
|
|
+ return installKind ? !installKind.endsWith('_1') : true;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
//报表导出点击
|
|
//报表导出点击
|
|
|
async function reportDown() {
|
|
async function reportDown() {
|
|
|
openModal1();
|
|
openModal1();
|
|
@@ -950,7 +999,7 @@
|
|
|
openModal();
|
|
openModal();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- function goDetailDevice(link需风量DeviceCode) {
|
|
|
|
|
|
|
+ function goDetailDevice(linkDeviceCode) {
|
|
|
let linkDeviceId = '';
|
|
let linkDeviceId = '';
|
|
|
if (linkDeviceCode.startsWith('window')) {
|
|
if (linkDeviceCode.startsWith('window')) {
|
|
|
linkDeviceId = linkDeviceInfo.value[linkDeviceCode] ? linkDeviceInfo.value[linkDeviceCode]['id'] : '';
|
|
linkDeviceId = linkDeviceInfo.value[linkDeviceCode] ? linkDeviceInfo.value[linkDeviceCode]['id'] : '';
|
|
@@ -960,8 +1009,8 @@
|
|
|
|
|
|
|
|
//
|
|
//
|
|
|
async function getDataSource() {
|
|
async function getDataSource() {
|
|
|
- if (devicekide.value) {
|
|
|
|
|
- const res = await list({ devicetype: devicekide.value, pagetype: 'normal' });
|
|
|
|
|
|
|
+ if (devicekind.value) {
|
|
|
|
|
+ const res = await list({ devicetype: devicekind.value, pagetype: 'normal' });
|
|
|
// const res = await list({ devicetype: 'fanlocal', 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) {
|
|
if (res.msgTxt && res.msgTxt[0] && res.msgTxt[0].datalist && res.msgTxt[0].datalist.length > 0) {
|
|
|
const dataArr = res.msgTxt[0].datalist || [];
|
|
const dataArr = res.msgTxt[0].datalist || [];
|
|
@@ -1053,7 +1102,6 @@
|
|
|
if (Object.prototype.toString.call(timer) === '[object Null]') {
|
|
if (Object.prototype.toString.call(timer) === '[object Null]') {
|
|
|
timer = await setTimeout(
|
|
timer = await setTimeout(
|
|
|
async () => {
|
|
async () => {
|
|
|
- // debugger;
|
|
|
|
|
await getDataSource();
|
|
await getDataSource();
|
|
|
if (dataSource.value.length > 0 && selectRowIndex.value == -1 && MonitorDataTable.value) {
|
|
if (dataSource.value.length > 0 && selectRowIndex.value == -1 && MonitorDataTable.value) {
|
|
|
// 初始打开页面
|
|
// 初始打开页面
|
|
@@ -1071,7 +1119,7 @@
|
|
|
if (dataSource.value.length > 0 && dataSource.value[selectRowIndex.value]) {
|
|
if (dataSource.value.length > 0 && dataSource.value[selectRowIndex.value]) {
|
|
|
Object.assign(selectData, dataSource.value[selectRowIndex.value]);
|
|
Object.assign(selectData, dataSource.value[selectRowIndex.value]);
|
|
|
}
|
|
}
|
|
|
- selectData['modalTyoe'] == selectData['install_kind'];
|
|
|
|
|
|
|
+ selectData['modalTyoe'] = selectData['install_kind'];
|
|
|
playSmoke(selectData);
|
|
playSmoke(selectData);
|
|
|
modelRef.value?.animate?.(selectData);
|
|
modelRef.value?.animate?.(selectData);
|
|
|
addText(selectData, fanDualArray.value);
|
|
addText(selectData, fanDualArray.value);
|
|
@@ -1162,7 +1210,7 @@
|
|
|
function showModal(obj) {
|
|
function showModal(obj) {
|
|
|
if (!btnClick.value) return;
|
|
if (!btnClick.value) return;
|
|
|
if (obj.key == 'kkjc') {
|
|
if (obj.key == 'kkjc') {
|
|
|
- gasWarningVal.value = 0.6;
|
|
|
|
|
|
|
+ gasWarningVal.value = CONSTS.GAS_WARNING_VAL_DEFAULT;
|
|
|
// 工况辅助决策
|
|
// 工况辅助决策
|
|
|
openAssistance(true, {});
|
|
openAssistance(true, {});
|
|
|
return;
|
|
return;
|
|
@@ -1612,7 +1660,7 @@
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
const { query } = unref(currentRoute);
|
|
const { query } = unref(currentRoute);
|
|
|
- if (query['deviceType']) devicekide.value = query['deviceType'] as string;
|
|
|
|
|
|
|
+ if (query['deviceType']) devicekind.value = query['deviceType'] as string;
|
|
|
if (globalConfig.is2DModel) {
|
|
if (globalConfig.is2DModel) {
|
|
|
getMonitor(true);
|
|
getMonitor(true);
|
|
|
} else {
|
|
} else {
|