|
@@ -7,19 +7,71 @@
|
|
|
<div class="lr left-box">
|
|
|
<div class="left-container">
|
|
|
<div class="monitor-box">
|
|
|
- <ventBox1 :class="{'vent-margin-t-10': key != 1} " v-for="key in 4" :key="key">
|
|
|
+ <ventBox1>
|
|
|
<template #title>
|
|
|
- <div>{{ key }}#抽采泵</div>
|
|
|
+ <div>抽采泵</div>
|
|
|
</template>
|
|
|
<template #container>
|
|
|
- <div class="state-item" v-for="(data, index) in pumpMonitorData" :key="index">
|
|
|
- <div class="item-col">
|
|
|
- <span class="state-title">{{ Object.values(data)[0] }} :</span>
|
|
|
- <span class="state-val">-</span>
|
|
|
+ <div v-for="key in 2" :key="key">
|
|
|
+ <div class="parameter-title group-parameter-title"><SvgIcon class="icon" size="14" name="pulp-title"/><span>{{ key }}#抽采泵</span></div>
|
|
|
+ <div class="input-box">
|
|
|
+ <div v-for="(item, index) in pumpMonitorData" class="input-item" :key="index">
|
|
|
+ <div class="title">{{ item.title }}:</div>
|
|
|
+ <template v-if="item.type !== 'sign'">
|
|
|
+ <div class="value">{{ selectData && selectData[item.code.replace('CentrifugalPump', `CentrifugalPump${key}`)] ? formatNum(selectData[item.code.replace('CentrifugalPump', `CentrifugalPump${key}`)]) : '-' }}</div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div class="value">
|
|
|
+ <span :class="{ 'signal-round': true, 'signal-round-run': selectData[item.code.replace('CentrifugalPump', `CentrifugalPump${key}`)], 'signal-round-gry': !selectData[item.code.replace('CentrifugalPump', `CentrifugalPump${key}`)] }"></span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="item-col">
|
|
|
- <span class="state-title">{{ Object.values(data)[1] }} :</span>
|
|
|
- <span class="state-val">-</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </ventBox1>
|
|
|
+ <ventBox1 class="vent-margin-t-10">
|
|
|
+ <template #title>
|
|
|
+ <div>注水泵</div>
|
|
|
+ </template>
|
|
|
+ <template #container>
|
|
|
+ <div v-for="key in 2" :key="key">
|
|
|
+ <div class="parameter-title group-parameter-title"><SvgIcon class="icon" size="14" name="pulp-title"/><span>{{ key }}#注水泵</span></div>
|
|
|
+ <div class="input-box">
|
|
|
+ <div v-for="(item, index) in waterPumpData" class="input-item" :key="index">
|
|
|
+ <div class="title">{{ item.title }}:</div>
|
|
|
+ <template v-if="item.type !== 'sign'">
|
|
|
+ <div class="value">{{ selectData && selectData[item.code.replace('WaterfloodPump', `WaterfloodPump${key}`)] ? formatNum(selectData[item.code.replace('WaterfloodPump', `WaterfloodPump${key}`)]) : '-' }}</div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div class="value">
|
|
|
+ <span :class="{ 'signal-round': true, 'signal-round-run': selectData[item.code.replace('WaterfloodPump', `WaterfloodPump${key}`)], 'signal-round-gry': !selectData[item.code.replace('WaterfloodPump', `WaterfloodPump${key}`)] }"></span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </ventBox1>
|
|
|
+ <ventBox1 class="vent-margin-t-10">
|
|
|
+ <template #title>
|
|
|
+ <div>排水泵</div>
|
|
|
+ </template>
|
|
|
+ <template #container>
|
|
|
+ <div v-for="key in 2" :key="key">
|
|
|
+ <div class="parameter-title group-parameter-title"><SvgIcon class="icon" size="14" name="pulp-title"/><span>{{ key }}#排水泵</span></div>
|
|
|
+ <div class="input-box">
|
|
|
+ <div v-for="(item, index) in dewateringPumpData" class="input-item" :key="index">
|
|
|
+ <div class="title">{{ item.title }}:</div>
|
|
|
+ <template v-if="item.type !== 'sign'">
|
|
|
+ <div class="value">{{ selectData && selectData[item.code.replace('DewateringPump', `DewateringPump${key}`)] ? formatNum(selectData[item.code.replace('DewateringPump', `DewateringPump${key}`)]) : '-' }}</div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div class="value">
|
|
|
+ <span :class="{ 'signal-round': true, 'signal-round-run': selectData[item.code.replace('DewateringPump', `DewateringPump${key}`)], 'signal-round-gry': !selectData[item.code.replace('DewateringPump', `DewateringPump${key}`)] }"></span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -29,107 +81,57 @@
|
|
|
</div>
|
|
|
<div class="lr right-box">
|
|
|
<div class="item-box sensor-container">
|
|
|
- <ventBox1>
|
|
|
+ <ventBox1 class="vent-margin-t-10">
|
|
|
<template #title>
|
|
|
- <div>泵站环境监测</div>
|
|
|
+ <div>泵站远程集中控制</div>
|
|
|
</template>
|
|
|
<template #container>
|
|
|
- <div class="vent-flex-row environment-monitor">
|
|
|
- <div class="item">
|
|
|
- <div class="title">环境甲烷浓度(%)</div>
|
|
|
- <div class="num">
|
|
|
- 1.53
|
|
|
- </div>
|
|
|
+ <div class="top-btn">
|
|
|
+ <div class="btn-group">
|
|
|
+ <a-button class="btn-item" type="primary" @click="handlerFn('zfw')">总复位</a-button>
|
|
|
+ <a-button class="btn-item" type="default" disabled @click="handlerFn('change')">一键切换</a-button>
|
|
|
</div>
|
|
|
- <div class="item">
|
|
|
- <div class="title">泵站环境温度(℃)</div>
|
|
|
- <div class="num">
|
|
|
- 23.3
|
|
|
- </div>
|
|
|
+ <div class="btn-group">
|
|
|
+ <a-button style="width: calc(100% - 16px); padding: 0 8px;" type="primary" @click="openModal">瓦斯泵控制</a-button>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="vent-flex-row-between pool-box">
|
|
|
- <div class="vent-column-center vent-margin-l-10">
|
|
|
- <div class="num">383mm</div>
|
|
|
- <div class="">液压</div>
|
|
|
- </div>
|
|
|
- <div class="center">高位水池</div>
|
|
|
- <div class="vent-column-center vent-margin-r-10">
|
|
|
- <div class=" num">16.5℃</div>
|
|
|
- <div class="">液温</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="vent-flex-row-between pool-box">
|
|
|
- <div class="vent-column-center vent-margin-l-10">
|
|
|
- <div class="num">383mm</div>
|
|
|
- <div class="">液压</div>
|
|
|
- </div>
|
|
|
- <div class="center">低位水池</div>
|
|
|
- <div class="vent-column-center vent-margin-r-10">
|
|
|
- <div class="num">16.5℃</div>
|
|
|
- <div class="">液温</div>
|
|
|
+ <div>
|
|
|
+ <div class="control-item">
|
|
|
+ <div class="control-title">控制模式:</div>
|
|
|
+ <a-radio-group v-model:value="selectData['ykjdqh']" @change="changeCtr">
|
|
|
+ <a-radio :value="1">就地</a-radio>
|
|
|
+ <a-radio :value="2">远程</a-radio>
|
|
|
+ </a-radio-group>
|
|
|
+ </div>
|
|
|
+ <div class="control-item">
|
|
|
+ <div class="control-title">检修模式:</div>
|
|
|
+ <a-radio-group v-model:value="selectData['jxmsqh']" @change="changeMode">
|
|
|
+ <a-radio :value="1">开启</a-radio>
|
|
|
+ <a-radio :value="2">关闭</a-radio>
|
|
|
+ </a-radio-group>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</ventBox1>
|
|
|
<ventBox1 class="vent-margin-t-10">
|
|
|
<template #title>
|
|
|
- <div>泵站远程集中控制</div>
|
|
|
+ <div>阀门运行状态</div>
|
|
|
</template>
|
|
|
<template #container>
|
|
|
- <div class="parameter-title group-parameter-title"><SvgIcon class="icon" size="14" name="pulp-title"/><span>抽放泵控制</span></div>
|
|
|
-
|
|
|
- <div class="control-group">
|
|
|
- <div class="control-item" v-for="(pump, index) in pumpCtrl" :key="index">
|
|
|
- <div class="control-item-title">{{ pump.title }}</div>
|
|
|
- <div class="control-item-state">
|
|
|
- <a-switch v-model="selectData[pump.code]" size="small" checked-children="开启"
|
|
|
- un-checked-children="关闭"
|
|
|
- @change="handlerDevice(pump.code, selectData[pump.code])">
|
|
|
- </a-switch>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div class="state-header">
|
|
|
+ <div class="header-item" v-for="(header, index) in stateHeader" :key="index">{{ header }}</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <div class="parameter-title group-parameter-title"><SvgIcon class="icon" size="14" name="pulp-title"/><span>水泵控制</span></div>
|
|
|
- <div class="control-group">
|
|
|
- <div class="control-item" v-for="(pump, index) in waterPumpCtrl" :key="index">
|
|
|
- <div class="control-item-title">{{ pump.title }}</div>
|
|
|
- <div class="control-item-state">
|
|
|
- <a-switch v-model="selectData[pump.code]" size="small" checked-children="开启"
|
|
|
- un-checked-children="关闭"
|
|
|
- @change="handlerDevice(pump.code, selectData[pump.code])">
|
|
|
- </a-switch>
|
|
|
+ <div class="">
|
|
|
+ <div v-for="key in 2" :key="key">
|
|
|
+ <div class="device-row" v-for="(valveType, index) in valveCtrlType" :key="index">
|
|
|
+ <div class="state" >#{{ key }}{{ valveType.title }}</div>
|
|
|
+ <div class="state" v-for="(state, i) in valveState" :key="i" >
|
|
|
+ <span v-if="state.code == '_CtrlMode'">{{ selectData[`CentrifugalPump${key}_${valveType.code}${key}${state.code}`] ? selectData[`CentrifugalPump${key}_${valveType.code}${key}${state.code}`] : '-' }}</span>
|
|
|
+ <span v-else :class="{ 'signal-round': true, 'signal-round-run': selectData[`CentrifugalPump${key}_${valveType.code}${key}${state.code}`] == '1', 'signal-round-gry': !selectData[`CentrifugalPump${key}_${valveType.code}${key}${state.code}`] }"></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="parameter-title group-parameter-title"><SvgIcon class="icon" size="14" name="pulp-title"/><span>气阀控制</span></div>
|
|
|
- <div class="vent-flex-row environment-monitor">
|
|
|
- <div class="item">
|
|
|
- <div class="title">高负压配汽阀开度</div>
|
|
|
- <div class="num">
|
|
|
- 30%
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="item">
|
|
|
- <div class="title">低负压配汽阀开度</div>
|
|
|
- <div class="num">
|
|
|
- 30%
|
|
|
- </div>
|
|
|
- </div>
|
|
|
</div>
|
|
|
- <div class="control-group">
|
|
|
- <div class="control-item" v-for="(pump, index) in airValveCtrl" :key="index">
|
|
|
- <div class="control-item-title">{{ pump.title }}</div>
|
|
|
- <div class="control-item-state">
|
|
|
- <a-switch v-model="selectData[pump.code]" size="small" checked-children="开启"
|
|
|
- un-checked-children="关闭"
|
|
|
- @change="handlerDevice(pump.code, selectData[pump.code])">
|
|
|
- </a-switch>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
</template>
|
|
|
</ventBox1>
|
|
|
</div>
|
|
@@ -138,7 +140,9 @@
|
|
|
</div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+ <DetailModal @register="register" :deviceType="deviceType" :deviceId="deviceId"/>
|
|
|
+ <PasswordModal :modal-is-show="passwordModalIsShow" modal-title="密码检验" :modal-type="handlerType" @handle-ok="handleOK"
|
|
|
+ @handle-cancel="handleCancel"/>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
@@ -146,10 +150,15 @@
|
|
|
import { onBeforeMount, ref, onMounted, onUnmounted, reactive, defineProps, watch } from 'vue';
|
|
|
import ventBox1 from '/@/components/vent/ventBox1.vue'
|
|
|
import { mountedThree, destroy, setModelType } from '../gasPump.threejs';
|
|
|
-import { pumpMonitorData, pumpCtrl, waterPumpCtrl, airValveCtrl } from '../gasPump.data'
|
|
|
+import { stateHeader, valveState, pumpMonitorData, waterPumpData, dewateringPumpData, pumpCtrlType, valveCtrlType, valveCtrl, PumpCtrlItems, pumpCtrl } from '../gasPump.data'
|
|
|
import { list } from '../gasPump.api';
|
|
|
import { SvgIcon } from '/@/components/Icon'
|
|
|
-import LivePlayer from '@liveqing/liveplayer-v3';
|
|
|
+import { formatNum } from '/@/utils/ventutil'
|
|
|
+import DetailModal from './DetailModal.vue'
|
|
|
+import { useModal } from '/@/components/Modal';
|
|
|
+import { deviceControlApi } from '/@/api/vent/index';
|
|
|
+import PasswordModal from '../../comment/components/PasswordModal.vue'
|
|
|
+import { message } from 'ant-design-vue';
|
|
|
|
|
|
const props = defineProps({
|
|
|
deviceId: {
|
|
@@ -161,9 +170,11 @@ const props = defineProps({
|
|
|
require: true
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
+const [register, { openModal }] = useModal()
|
|
|
const loading = ref(false);
|
|
|
-
|
|
|
+const tabActiveKey = ref(1)
|
|
|
+const passwordModalIsShow = ref(false)
|
|
|
+const handlerType = ref('')
|
|
|
// 默认初始是第一行
|
|
|
|
|
|
|
|
@@ -184,7 +195,9 @@ const selectData = reactive({
|
|
|
inValve3: false,
|
|
|
outValve3: false,
|
|
|
inValve4: false,
|
|
|
- outValve4: false
|
|
|
+ outValve4: false,
|
|
|
+ jxmsqh: '1',
|
|
|
+ ykjdqh: '1',
|
|
|
});
|
|
|
|
|
|
const flvURL1 = () => {
|
|
@@ -212,45 +225,94 @@ function getMonitor(flag?) {
|
|
|
|
|
|
async function getDataSource(systemID) {
|
|
|
const res = await list({ devicetype: props.deviceType, ids: systemID });
|
|
|
- const result = res.msgTxt;
|
|
|
- result.forEach(item => {
|
|
|
+ const result = res.msgTxt[0]['datalist'][0];
|
|
|
+ Object.assign(result, result['readData'])
|
|
|
+ return result
|
|
|
+}
|
|
|
|
|
|
-
|
|
|
- })
|
|
|
+function handler(passWord, paramcode) {
|
|
|
+ let value = null
|
|
|
+ if(paramcode == 'ykjdqh'){
|
|
|
+ value = selectData['ykjdqh'] == '1' ? '2' : '1'
|
|
|
+ }
|
|
|
+ if (paramcode == 'jxmsqh') {
|
|
|
+ value = selectData['jxmsqh'] == '1' ? '2' : '1'
|
|
|
+ }
|
|
|
+ const data = {
|
|
|
+ deviceid: selectData.deviceID,
|
|
|
+ devicetype: selectData.deviceType,
|
|
|
+ paramcode: paramcode,
|
|
|
+ password: passWord,
|
|
|
+ value: value,
|
|
|
+ };
|
|
|
+ deviceControlApi(data).then((res) => {
|
|
|
+ message.success('控制成功成功!');
|
|
|
+ }).catch((err) => {
|
|
|
+ message.success('控制异常');
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
-// 喷粉操作
|
|
|
-function handlerDevice(code, data) {
|
|
|
- code;
|
|
|
- data
|
|
|
+function changeCtr(e) {
|
|
|
+ if(e.target.value == 1){
|
|
|
+ // 就地
|
|
|
+ handlerType.value = 'jxmsqh'
|
|
|
+ }else if(e.target.value == 2) {
|
|
|
+ // 远程
|
|
|
+ handlerType.value = 'jxmsqh'
|
|
|
+ }
|
|
|
+ passwordModalIsShow.value = true;
|
|
|
}
|
|
|
|
|
|
-watch(() => props.deviceId, () => {
|
|
|
- if(props.deviceType == 'pump_over'){
|
|
|
- setModelType('gasPump')
|
|
|
- }else if(props.deviceType == 'pump_under') {
|
|
|
- setModelType('gasPumpUnder')
|
|
|
+function changeMode(e) {
|
|
|
+ if (e.target.value == 1) {
|
|
|
+ // 检修开
|
|
|
+ handlerType.value = 'ykjdqh'
|
|
|
+ } else if (e.target.value == 2) {
|
|
|
+ // 检修关
|
|
|
+ handlerType.value = 'ykjdqh'
|
|
|
}
|
|
|
+ passwordModalIsShow.value = true;
|
|
|
+}
|
|
|
+
|
|
|
+function handlerFn(paramcode){
|
|
|
+ handlerType.value = paramcode
|
|
|
+ passwordModalIsShow.value = true;
|
|
|
+}
|
|
|
+
|
|
|
+function handleOK(passWord, handlerState) {
|
|
|
+ handler(passWord, handlerState)
|
|
|
+ passwordModalIsShow.value = false;
|
|
|
+ handlerType.value = ''
|
|
|
+}
|
|
|
+
|
|
|
+function handleCancel() {
|
|
|
+ passwordModalIsShow.value = false;
|
|
|
+ handlerType.value = ''
|
|
|
+};
|
|
|
+
|
|
|
+// 喷粉操作
|
|
|
+function handlerDevice(code, data) {
|
|
|
|
|
|
- loading.value = true
|
|
|
+}
|
|
|
+
|
|
|
+watch(() => props.deviceType, () => {
|
|
|
+ // if(props.deviceType == 'pump_over'){
|
|
|
+ // setModelType('gasPump')
|
|
|
+ // }else if(props.deviceType == 'pump_under') {
|
|
|
+ // setModelType('gasPumpUnder')
|
|
|
+ // }
|
|
|
})
|
|
|
|
|
|
onBeforeMount(() => {
|
|
|
|
|
|
});
|
|
|
|
|
|
-onMounted(() => {
|
|
|
- loading.value = true;
|
|
|
- mountedThree().then(async () => {
|
|
|
- await setModelType('gasPump');
|
|
|
- loading.value = false;
|
|
|
- timer = null
|
|
|
- await getMonitor(true)
|
|
|
- });
|
|
|
+onMounted(async() => {
|
|
|
+ timer = null
|
|
|
+ await getMonitor(true)
|
|
|
});
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
- destroy();
|
|
|
if (timer) {
|
|
|
clearTimeout(timer);
|
|
|
timer = undefined;
|
|
@@ -364,7 +426,63 @@ onUnmounted(() => {
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+.input-box{
|
|
|
+ width: calc(100%);
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row !important;
|
|
|
+ flex-wrap: wrap !important;
|
|
|
+ .input-item{
|
|
|
+ width: calc(50% - 8px);
|
|
|
+ padding: 0 2px;
|
|
|
+
|
|
|
+ &:nth-child(2n){
|
|
|
+ margin-left: 4px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.btn-group{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+ .btn-item{
|
|
|
+ width: 82px;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+}
|
|
|
+.top-btn{
|
|
|
+ .btn-group{
|
|
|
+ margin-bottom: 8px;
|
|
|
+ .btn-item{
|
|
|
+ width: calc(50% - 16px);
|
|
|
+ margin: 0 4px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .control-item{
|
|
|
+ margin-left: 10px;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ display: flex;
|
|
|
+ .control-title{
|
|
|
+ width: 150px;
|
|
|
+ color: #73e8fe;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.state-header{
|
|
|
+ display: flex;
|
|
|
+ color: #73e8fe;
|
|
|
+ .header-item{
|
|
|
+ width: 25%;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+}
|
|
|
+.device-row{
|
|
|
+ display: flex;
|
|
|
+ margin-top: 10px;
|
|
|
+ .state{
|
|
|
+ width: 25%;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 13px;
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
:deep(.@{ventSpace}-tabs-tabpane-active) {
|
|
|
overflow: auto;
|