| | |
| | | <script setup> |
| | | import FlexBox from "@/components/FlexBox.vue"; |
| | | import {DArrowRight, CaretTop} from "@element-plus/icons-vue"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import HdwLight from "@/components/HdwLight.vue"; |
| | | import {watch} from "vue"; |
| | | import {ref, watch} from "vue"; |
| | | |
| | | import runMonitorModule from "@/views/airConditioning/js/runMonitorModule"; |
| | | const {runMonitorData, setRunMonitorData} = runMonitorModule(); |
| | |
| | | import airMonitorData from "@/views/airConditioning/js/airMonitorData"; |
| | | const {monitorData, airState} = airMonitorData(); |
| | | |
| | | import setAirParam from "@/views/airConditioning/components/setAirParam.vue"; |
| | | |
| | | import air from "@/assets/js/const/air"; |
| | | const airCmd = ref(air.cmd); |
| | | |
| | | import airControlModule from "@/views/airConditioning/js/airControlModule"; |
| | | |
| | | const { |
| | | airParam, |
| | | getParam, |
| | | } = airControlModule(); |
| | | const {startAir} = airControlModule(); |
| | | |
| | | const setParamVisible = ref(false); |
| | | |
| | | const showSetParamDialog = ()=>{ |
| | | setParamVisible.value = true; |
| | | }; |
| | | |
| | | const setParamClose = ()=>{ |
| | | setParamVisible.value = false; |
| | | }; |
| | | |
| | | const startAirByCmd = (opCmd)=>{ |
| | | ElMessageBox.confirm( |
| | | "确认进行控制", |
| | | "系统提示", |
| | | { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'info', |
| | | draggable: true, |
| | | } |
| | | ).then(()=>{ |
| | | startAir(opCmd); |
| | | }).catch(()=>{}); |
| | | |
| | | } |
| | | |
| | | watch(monitorData, (data)=>{ |
| | | setRunMonitorData(data); |
| | |
| | | <div class="state-item"> |
| | | <div class="state-text">异常状态</div> |
| | | <div class="light-container"> |
| | | <hdw-light :type="1"></hdw-light> |
| | | <hdw-light :type="1" :bl-bl="false"></hdw-light> |
| | | </div> |
| | | </div> |
| | | <div class="state-item"> |
| | |
| | | <div class="handle-tools"> |
| | | <div class="tools-btn-list"> |
| | | <div class="tools-btn-item"> |
| | | <el-button type="primary" @click="getParam">空调参数设置</el-button> |
| | | <el-button type="primary" @click="showSetParamDialog">空调参数设置</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="tools-btn-list"> |
| | | <div class="tools-btn-item"> |
| | | <el-button type="primary">启动空调值班</el-button> |
| | | <el-button type="primary" @click="startAirByCmd(airCmd.startWork)">启动空调工作</el-button> |
| | | </div> |
| | | <div class="tools-btn-item"> |
| | | <el-button type="warning">停止空调值班</el-button> |
| | | <el-button type="warning" @click="startAirByCmd(airCmd.stopWork)">停止空调工作</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="tools-btn-list"> |
| | | <div class="tools-btn-item"> |
| | | <el-button type="primary">启动空调消毒</el-button> |
| | | <el-button type="primary" @click="startAirByCmd(airCmd.startOnDuty)">启动空调值班</el-button> |
| | | </div> |
| | | <div class="tools-btn-item"> |
| | | <el-button type="warning">停止空调消毒</el-button> |
| | | <el-button type="warning" @click="startAirByCmd(airCmd.stopOnDuty)">停止空调值班</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="tools-btn-list"> |
| | | <div class="tools-btn-item"> |
| | | <el-button type="primary">启动空调排风</el-button> |
| | | <el-button type="primary" @click="startAirByCmd(airCmd.startDisinfect)">启动空调消毒</el-button> |
| | | </div> |
| | | <div class="tools-btn-item"> |
| | | <el-button type="warning">停止空调排风</el-button> |
| | | <el-button type="warning" @click="startAirByCmd(airCmd.stopDisinfect)">停止空调消毒</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="tools-btn-list"> |
| | | <div class="tools-btn-item"> |
| | | <el-button type="primary" @click="startAirByCmd(airCmd.startExhaustFan)">启动空调排风</el-button> |
| | | </div> |
| | | <div class="tools-btn-item"> |
| | | <el-button type="warning" @click="startAirByCmd(airCmd.stopExhaustFan)">停止空调排风</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-dialog |
| | | class="center-dialog" |
| | | title="空调参数设置" |
| | | width="auto" |
| | | v-model="setParamVisible" |
| | | align-center |
| | | :close-on-click-modal="false" |
| | | :modal-append-to-body="false"> |
| | | <set-air-param v-if="setParamVisible" @close="setParamClose"></set-air-param> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <style lang="less" scoped> |
| | | .header-wrapper { |
| | | color: @font-color-high-light; |
| | | font-weight: bold; |
| | | font-size: 14px; |
| | | font-size: 16px; |
| | | padding: 8px 16px; |
| | | box-sizing: border-box; |
| | | .title-text { |
| | |
| | | margin-top: 16px; |
| | | .input-box { |
| | | display: inline-block; |
| | | font-size: 14px; |
| | | font-size: 16px; |
| | | text-align: right; |
| | | color: #ffffff; |
| | | |
| | |
| | | display: inline-block; |
| | | text-align: center; |
| | | color: #00feff; |
| | | font-size: 14px; |
| | | font-size: 16px; |
| | | vertical-align: middle; |
| | | margin-right: 8px; |
| | | } |
| | |
| | | margin-top: 12px; |
| | | } |
| | | } |
| | | .state-text { |
| | | font-size: 16px; |
| | | } |
| | | </style> |