Bladeren bron

Merge branch 'master' of http://182.92.126.35:3000/hrx/mky-vent-base

lxh 1 week geleden
bovenliggende
commit
1103248bef

+ 1 - 1
src/utils/ventutil.ts

@@ -275,5 +275,5 @@ export function deviceCameraInit(cameraAddrs, player: HTMLElement, webRtcServerL
  */
 export const get: typeof _.get = (o, p, defaultValue = '-') => {
   const d = _.get(o, p, defaultValue);
-  return !d ? defaultValue : d;
+  return d == undefined ? defaultValue : d;
 };

+ 19 - 19
src/views/vent/gas/gasAssessment/gasAssessment.data.ts

@@ -169,7 +169,7 @@ export const gasMonitor = [
   {
     title: '原始瓦斯含量',
     code: 'originalGasContent',
-    unit: 'm³/t',
+    unit: 'm³',
   },
   {
     title: '工作面瓦斯储量',
@@ -196,7 +196,7 @@ export const gasUnitBase = [
   {
     title: '瓦斯储量',
     code: 'T2',
-    unit: 'm³/t',
+    unit: 'm³',
   },
   {
     title: '钻孔施工长度',
@@ -206,7 +206,7 @@ export const gasUnitBase = [
   {
     title: '单元瓦斯含量',
     code: 'gasC',
-    unit: 'm³/t',
+    unit: 'm³',
   },
   {
     title: '单元原始瓦斯压力',
@@ -228,17 +228,17 @@ export const gasUnitMonitor = [
   {
     title: '瓦斯总储量',
     code: 'T0',
-    unit: 'm³/t',
+    unit: 'm³',
   },
   {
     title: '抽采达标量',
     code: 'T1',
-    unit: 'm³/t',
+    unit: 'm³',
   },
   {
     title: '累计抽采纯量',
     code: 'T2',
-    unit: 'm³/t',
+    unit: 'm³',
   },
   {
     title: '当前抽采率',
@@ -375,15 +375,15 @@ export const gasParamData = [
 
 export const currentGasMonitor = [
   {
-    title: '原始瓦斯含量 (m³/t)',
+    title: '原始瓦斯含量 (m³)',
     code: 'gasOriginalMass',
   },
   {
-    title: '残余瓦斯含量 (m³/t)',
+    title: '残余瓦斯含量 (m³)',
     code: 'gasRemnantMass',
   },
   {
-    title: '残存瓦斯含量 (m³/t)',
+    title: '残存瓦斯含量 (m³)',
     code: 'gasSurviveMass',
   },
   {
@@ -649,7 +649,7 @@ export const gasUnitHlOption: ModuleDataChart = {
   readFrom: '',
   legend: { show: false },
   xAxis: [{ show: true }],
-  yAxis: [{ show: true, name: '混量(m³/t)', position: 'left' }],
+  yAxis: [{ show: true, name: '混量(m³)', position: 'left' }],
   series: [{ readFrom: 'history', xprop: 'time', yprop: 'val', label: '单元瓦斯混量' }],
 };
 
@@ -689,7 +689,7 @@ export const gasUnitClOption: ModuleDataChart = {
   readFrom: '',
   legend: { show: false },
   xAxis: [{ show: true }],
-  yAxis: [{ show: true, name: '纯量(m³/t)', position: 'left' }],
+  yAxis: [{ show: true, name: '纯量(m³)', position: 'left' }],
   series: [{ readFrom: 'history', xprop: 'time', yprop: 'val', label: '单元瓦斯纯量', color: '#FAC858' }],
 };
 
@@ -727,9 +727,9 @@ export const mockGasUnitClData = {
 export const gasUnitOption = [
   {
     legend: '瓦斯浓度',
-    seriesName: '(m³/t)',
+    seriesName: '(m³)',
     ymax: 10000,
-    yname: 'm³/t',
+    yname: 'm³',
     linetype: 'line',
     yaxispos: 'left',
     color: '#37BCF2',
@@ -1307,12 +1307,12 @@ export const unitBaseInfo = [
   {
     title: '煤炭储量',
     code: 'T1',
-    unit: 'm³/t',
+    unit: 'm³',
   },
   {
     title: '瓦斯储量',
     code: 'T2',
-    unit: 'm³/t',
+    unit: 'm³',
   },
   {
     title: '钻孔施工长度',
@@ -1322,7 +1322,7 @@ export const unitBaseInfo = [
   {
     title: '单元瓦斯含量',
     code: 'gasC',
-    unit: 'm³/t',
+    unit: 'm³',
   },
   {
     title: '单元原始瓦斯压力',
@@ -1345,17 +1345,17 @@ export const unitMonitor = [
   {
     title: '瓦斯总储量',
     code: 'T0',
-    unit: 'm³/t',
+    unit: 'm³',
   },
   {
     title: '抽采达标量',
     code: 'T1',
-    unit: 'm³/t',
+    unit: 'm³',
   },
   {
     title: '累计抽采纯量',
     code: 'T2',
-    unit: 'm³/t',
+    unit: 'm³',
   },
   {
     title: '当前抽采率',

+ 52 - 26
src/views/vent/gas/gasZk/index.vue

@@ -12,18 +12,25 @@
         </a-spin>
       </div>
       <div class="right-box">
+        <div class="status">
+          <div class="icon"></div>
+          <div class="status-content">
+            <span class="conten">{{ get(resData, 'curStatus') }}</span>
+            <span>钻杆状态</span>
+          </div>
+        </div>
         <div class="count">
           <div class="icon"></div>
           <div class="count-content">
-            <span class="conten">{{ usedCount }}</span>
+            <span class="conten">{{ get(resData, 'usedCount') }}</span>
             <span>钻孔计数</span>
           </div>
         </div>
-        <div class="status">
+        <div class="count">
           <div class="icon"></div>
-          <div class="status-content">
-            <span class="conten">{{ curStatus }}</span>
-            <span>钻杆状态</span>
+          <div class="count-content">
+            <span class="conten">{{ get(resData, 'usedPercent') ? Number(get(resData, 'usedPercent')).toFixed(2) + '%' : '-' }}</span>
+            <span>钻孔剩余</span>
           </div>
         </div>
       </div>
@@ -37,15 +44,16 @@
   import customHeader from '/@/components/vent/customHeader.vue';
   import { useGlobSetting } from '/@/hooks/setting';
   import Player, { I18N } from 'xgplayer';
-  import ZH from 'xgplayer/es/lang/zh-cn';
   import Mp4Plugin from 'xgplayer-mp4';
+  import { get } from '@/utils/ventutil';
 
   const globSetting = useGlobSetting();
   const baseApiUrl = globSetting.domainUrl;
   const videoPlayTime = ref(0); //视频开始播放时间
-  const curStatus = ref(''); //当前状态
-  const usedCount = ref(''); //钻孔计数
-  const videoUrl = ref('');
+  // const curStatus = ref(''); //当前状态
+  // const usedCount = ref(''); //钻孔计数
+  // const videoUrl = ref('');
+  const resData = ref({});
   const video = ref();
   const loadding = ref(true);
   let timer: IntervalHandle; //定时器
@@ -59,9 +67,10 @@
         const res = await getGasZkStatus({
           playTime: videoPlayTime.value,
         });
+        resData.value = res;
         // 更新数据
-        usedCount.value = res.usedCount;
-        curStatus.value = res.curStatus;
+        // usedCount.value = res.usedCount;
+        // curStatus.value = res.curStatus;
         startPolling();
       } catch (error) {
         console.error('请求失败,停止轮询', error);
@@ -91,7 +100,7 @@
       autoplay: true,
       loop: true,
       // fluid: false,
-      isLive: true,
+      isLive: false,
       playsinline: false,
       screenShot: false,
       // closeVideoClick: true,
@@ -99,9 +108,6 @@
       // closePauseVideoFocus: true,
       // closePlayVideoFocus: true,
       // topBarAutoHide: false,
-      customConfig: {
-        isClickPlayBack: false,
-      },
       controls: false,
       // ignores: ['time', 'start', 'definition', 'error', 'fullscreen', 'i18n', 'loading', 'mobile', 'pc', 'play', 'poster', 'progress', 'replay', 'volume', 'loading', 'pc', 'fullscreen', 'error', 'definition'],
       mp4plugin: {
@@ -109,22 +115,42 @@
         // minBufferLength: 10,
       },
     });
-    player.on('play', async () => {
+
+    player.on('complete', async () => {
+      player.play();
       try {
-        loadding.value = false;
-        videoPlayTime.value = await getVideoPlayTime();
-        // 第一次请求
-        const res = await getGasZkStatus({
-          playTime: videoPlayTime.value,
-        });
-        usedCount.value = res.usedCount;
-        curStatus.value = res.curStatus;
-        // 启动轮询
-        startPolling();
+        if (loadding.value) {
+          loadding.value = false;
+          videoPlayTime.value = await getVideoPlayTime();
+          // 第一次请求
+          const res = await getGasZkStatus({
+            playTime: videoPlayTime.value,
+          });
+          resData.value = res;
+          // 启动轮询
+          startPolling();
+        }
       } catch (error) {
         console.error('初始化失败', error);
       }
     });
+    // player.on('play', async () => {
+    //   try {
+    //     if (loadding.value) {
+    //       loadding.value = false;
+    //       videoPlayTime.value = await getVideoPlayTime();
+    //       // 第一次请求
+    //       const res = await getGasZkStatus({
+    //         playTime: videoPlayTime.value,
+    //       });
+    //       resData.value = res;
+    //       // 启动轮询
+    //       startPolling();
+    //     }
+    //   } catch (error) {
+    //     console.error('初始化失败', error);
+    //   }
+    // });
   };
 
   onMounted(async () => {

+ 195 - 208
src/views/vent/monitorManager/balancePressMonitor/components/balancePressHome.vue

@@ -78,8 +78,8 @@
             <template #container>
               <div class="overflow-y-auto max-h-300px">
                 <template v-for="monitor in safetyMonitorData" :key="monitor.deviceId">
-                  <div class="parameter-title group-parameter-title">
-                    <SvgIcon class="icon" size="14" name="fiber-title" />
+                  <div class="parameter-title group-parameter-title"
+                    ><SvgIcon class="icon" size="14" name="fiber-title" />
                     <span>{{ monitor.strinstallpos }}</span>
                   </div>
                   <div class="input-box">
@@ -99,8 +99,8 @@
             <template #container>
               <div class="overflow-y-auto max-h-400px">
                 <template v-for="monitor in windowMonitorData" :key="monitor.deviceId">
-                  <div class="parameter-title group-parameter-title">
-                    <SvgIcon class="icon" size="14" name="fiber-title" />
+                  <div class="parameter-title group-parameter-title"
+                    ><SvgIcon class="icon" size="14" name="fiber-title" />
                     <span>风窗:{{ monitor.strinstallpos }}</span>
                   </div>
                   <div class="input-box">
@@ -112,8 +112,8 @@
                   </div>
                 </template>
                 <template v-for="monitor in fanlocalMonitorData" :key="monitor.deviceId">
-                  <div class="parameter-title group-parameter-title">
-                    <SvgIcon class="icon" size="14" name="fiber-title" />
+                  <div class="parameter-title group-parameter-title"
+                    ><SvgIcon class="icon" size="14" name="fiber-title" />
                     <span>局扇:{{ monitor.strinstallpos }}</span>
                   </div>
                   <div class="input-box">
@@ -133,234 +133,221 @@
   </a-spin>
 </template>
 <script setup lang="ts">
-import { onBeforeMount, ref, onMounted, onUnmounted, reactive, defineProps, watch } from 'vue';
-import ventBox1 from '/@/components/vent/ventBox1.vue';
-import { SvgIcon } from '/@/components/Icon';
-import { mountedThree, destroy, setModelType, updateText, play } from '../balancePress.threejs';
-import { settingParam1, settingParam2, settingParam3, windowParam, localFanParam, monitorParam, windrectParam } from '../balancePress.data';
-import { list, submit, subList } from '../balancePress.api';
-import { message } from 'ant-design-vue';
-import { get } from 'lodash-es';
+  import { onBeforeMount, ref, onMounted, onUnmounted, reactive, defineProps, watch } from 'vue';
+  import ventBox1 from '/@/components/vent/ventBox1.vue';
+  import { SvgIcon } from '/@/components/Icon';
+  import { mountedThree, destroy, setModelType, updateText, play } from '../balancePress.threejs';
+  import { settingParam1, settingParam2, settingParam3, windowParam, localFanParam, monitorParam, windrectParam } from '../balancePress.data';
+  import { list, submit, subList } from '../balancePress.api';
+  import { message } from 'ant-design-vue';
+  import { get } from 'lodash-es';
 
-const props = defineProps({
-  deviceId: {
-    type: String,
-    require: true,
-  },
-});
+  const props = defineProps({
+    deviceId: {
+      type: String,
+      require: true,
+    },
+  });
 
-const loading = ref(false);
+  const loading = ref(false);
 
-// 默认初始是第一行
-const isAutoControl = ref('1');
+  // 默认初始是第一行
+  const isAutoControl = ref('1');
 
-// 监测数据
-const selectData = reactive({
-  frontRearDP: '-',
-  sourcePressure: '-',
-  fault: '-',
-});
+  // 监测数据
+  const selectData = reactive({
+    frontRearDP: '-',
+    sourcePressure: '-',
+    fault: '-',
+  });
 
-const changeType = (isAutoControl) => {
-  isAutoControl;
-  //
-};
-const formData = ref({
-  coMaxStart: 0,
-  o2MinStart: 0,
-  coRiseStart: 0,
-  o2DownStart: 0,
-  windowAreaSetGrad: 0,
-  windowSetTime: 0,
-  windowMinArea: 0,
-  windowAreaDef: 0,
-  setMinTime: 0,
-  coEnd: 0,
-  coTimeEnd: 0,
-  o2End: 0,
-  o2TimeEnd: 0,
-});
-const safetyMonitorData = ref<any[]>([]);
-const fanlocalMonitorData = ref<any[]>([]);
-const windowMonitorData = ref<any[]>([]);
-const windrectMonitorData = ref<any[]>([]);
+  const changeType = (isAutoControl) => {
+    isAutoControl;
+    //
+  };
 
-// https获取监测数据
-let timer: any = null;
-function getMonitor(flag?) {
-  if (Object.prototype.toString.call(timer) === '[object Null]') {
-    timer = setTimeout(
-      async () => {
-        if (props.deviceId) {
-          const data = await getDataSource(props.deviceId);
-          Object.assign(selectData, data);
-          updateText(selectData);
-        }
-        if (timer) {
-          timer = null;
-        }
-        await getMonitor();
-        loading.value = false;
-      },
-      flag ? 0 : 1000
-    );
+  // https获取监测数据
+  let timer: any = null;
+  function getMonitor(flag?) {
+    if (Object.prototype.toString.call(timer) === '[object Null]') {
+      timer = setTimeout(
+        async () => {
+          if (props.deviceId) {
+            const data = await getDataSource(props.deviceId);
+            Object.assign(selectData, data);
+            updateText(selectData);
+          }
+          if (timer) {
+            timer = null;
+          }
+          await getMonitor();
+          loading.value = false;
+        },
+        flag ? 0 : 1000
+      );
+    }
   }
-}
-
-
 
-async function getDataSource(systemID) {
-  const res = await list({ devicetype: 'sys', systemID });
-  const result = res.msgTxt;
-  safetyMonitorData.value = [];
-  fanlocalMonitorData.value = [];
-  windowMonitorData.value = [];
-  windrectMonitorData.value = [];
-  result.forEach((item) => {
-    if (item.type.startsWith('safetymonitor') || item.type.startsWith('avgpressure_lowoxygen')) {
-      safetyMonitorData.value.push(...item.datalist);
-    }
-    if (item.type.startsWith('fanlocal')) {
-      item.datalist.forEach((e) => {
-        const f1Run = e.readData.Fan1StartStatus == '1';
-        e.FanfHz = f1Run ? e.readData.Fan1_Frequency : e.readData.Fan2_Frequency;
-        e.FanRun = f1Run ? '1#风机' : '2#风机';
-      });
-      fanlocalMonitorData.value.push(...item.datalist);
-    }
-    if (item.type.startsWith('window')) {
-      windowMonitorData.value.push(...item.datalist);
-    }
-    if (item.type.startsWith('windrect')) {
-      windrectMonitorData.value.push(...item.datalist);
-    }
-  });
-}
+  const safetyMonitorData = ref<any[]>([]);
+  const fanlocalMonitorData = ref<any[]>([]);
+  const windowMonitorData = ref<any[]>([]);
+  const windrectMonitorData = ref<any[]>([]);
 
-// 喷粉操作
-async function onSubmit() {
-  let res = await submit(formData.value)
-  if (res.code == 500) {
-    message.success(res.message);
-  } else {
-    initParamList()
-    message.success('提交成功');
+  async function getDataSource(systemID) {
+    const res = await list({ devicetype: 'sys', systemID });
+    const result = res.msgTxt;
+    safetyMonitorData.value = [];
+    fanlocalMonitorData.value = [];
+    windowMonitorData.value = [];
+    windrectMonitorData.value = [];
+    result.forEach((item) => {
+      if (item.type.startsWith('safetymonitor') || item.type.startsWith('avgpressure_lowoxygen')) {
+        safetyMonitorData.value.push(...item.datalist);
+      }
+      if (item.type.startsWith('fanlocal')) {
+        item.datalist.forEach((e) => {
+          const f1Run = e.readData.Fan1StartStatus == '1';
+          e.FanfHz = f1Run ? e.readData.Fan1_Frequency : e.readData.Fan2_Frequency;
+          e.FanRun = f1Run ? '1#风机' : '2#风机';
+        });
+        fanlocalMonitorData.value.push(...item.datalist);
+      }
+      if (item.type.startsWith('window')) {
+        windowMonitorData.value.push(...item.datalist);
+      }
+      if (item.type.startsWith('windrect')) {
+        windrectMonitorData.value.push(...item.datalist);
+      }
+    });
   }
-}
 
-//获取低氧参数监测返显列表
-async function initParamList() {
-  let res = await subList()
-  if (res && res.records.length != 0) {
-    formData.value = res.records[0]
+  // 喷粉操作
+  async function onSubmit() {
+    let res = await submit(formData.value);
+    if (res.code == 500) {
+      message.success(res.message);
+    } else {
+      initParamList();
+      message.success('提交成功');
+    }
   }
-}
 
-watch(
-  () => props.deviceId,
-  (newVal, oldVal) => {
-    if (newVal && oldVal != undefined) {
-      setModelType('balancePressBase');
+  //获取低氧参数监测返显列表
+  async function initParamList() {
+    let res = await subList();
+    if (res && res.records.length != 0) {
+      formData.value = res.records[0];
     }
-    loading.value = true;
-    //     loading.value = true;
   }
-);
 
+  watch(
+    () => props.deviceId,
+    (newVal, oldVal) => {
+      if (newVal && oldVal != undefined) {
+        setModelType('balancePressBase');
+      }
+      loading.value = true;
+    }
+  );
 
+  const formData = ref({
+    coMaxStart: 0,
+    o2MinStart: 0,
+    coRiseStart: 0,
+    o2DownStart: 0,
+    windowAreaSetGrad: 0,
+    windowSetTime: 0,
+    windowMinArea: 0,
+    windowAreaDef: 0,
+    setMinTime: 0,
+    coEnd: 0,
+    coTimeEnd: 0,
+    o2End: 0,
+    o2TimeEnd: 0,
+  });
 
-onBeforeMount(() => { });
+  onBeforeMount(() => {});
 
-onMounted(() => {
-  loading.value = true;
-  mountedThree().then(async () => {
-    await setModelType('balancePressTun'); //balancePressBase
-    loading.value = false;
-    timer = null;
-    await initParamList()
-    await getMonitor(true);
-    play('startSmoke', 'top', 30, 'open', 0);
+  onMounted(() => {
+    loading.value = true;
+    mountedThree().then(async () => {
+      await setModelType('balancePressTun'); //balancePressBase
+      loading.value = false;
+      timer = null;
+      await initParamList();
+      await getMonitor(true);
+      play('startSmoke', 'top', 30, 'open', 0);
+    });
   });
-});
 
-onUnmounted(() => {
-  destroy();
-  if (timer) {
-    clearTimeout(timer);
-  }
-});
+  onUnmounted(() => {
+    destroy();
+    if (timer) {
+      clearTimeout(timer);
+    }
+  });
 </script>
 <style lang="less" scoped>
-@import '/@/design/vent/modal.less';
-@import '../../comment/less/workFace.less';
-@ventSpace: zxm;
-
-.monitor-container {
-  margin-top: 60px;
-}
-
-.lr {
-  width: 340px !important;
-}
-
-.auto-control {
-  padding: 10px 8px;
-  margin: 0 4px 4px 4px;
-  border-radius: 4px;
-  border: 1px solid #ffffff05;
-  background-image: linear-gradient(to left, #39deff15, #3977e500, #39deff15);
-}
-
-.divider-line {
-  position: relative;
-  color: aqua;
-  padding-left: 20px;
-  font-size: 14px;
-
-  &::before {
-    position: absolute;
-    content: '';
-    display: block;
-    top: 10px;
-    left: 0;
-    height: 1px;
-    width: 15px;
-    background-color: #ffffff33;
+  @import '/@/design/vent/modal.less';
+  @import '../../comment/less/workFace.less';
+  @ventSpace: zxm;
+  .monitor-container {
+    margin-top: 60px;
   }
-
-  &::after {
-    position: absolute;
-    content: '';
-    display: block;
-    top: 10px;
-    right: 0;
-    height: 1px;
-    width: calc(100% - 85px);
-    background-color: #ffffff33;
+  .lr {
+    width: 340px !important;
   }
-}
-
-.input-value {
-  width: 120px !important;
-}
-
-.unit {
-  text-align: right;
-}
-
-.btn-box {
-  margin: 10px 4px;
-
-  .btn1 {
-    padding: 4px 0;
+  .auto-control {
+    padding: 10px 8px;
+    margin: 0 4px 4px 4px;
+    border-radius: 4px;
+    border: 1px solid #ffffff05;
+    background-image: linear-gradient(to left, #39deff15, #3977e500, #39deff15);
+  }
+  .divider-line {
+    position: relative;
+    color: aqua;
+    padding-left: 20px;
+    font-size: 14px;
+    &::before {
+      position: absolute;
+      content: '';
+      display: block;
+      top: 10px;
+      left: 0;
+      height: 1px;
+      width: 15px;
+      background-color: #ffffff33;
+    }
+    &::after {
+      position: absolute;
+      content: '';
+      display: block;
+      top: 10px;
+      right: 0;
+      height: 1px;
+      width: calc(100% - 85px);
+      background-color: #ffffff33;
+    }
+  }
+  .input-value {
+    width: 120px !important;
+  }
+  .unit {
+    text-align: right;
+  }
+  .btn-box {
+    margin: 10px 4px;
+    .btn1 {
+      padding: 4px 0;
+    }
   }
-}
 
-:deep(.@{ventSpace}-tabs-tabpane-active) {
-  overflow: auto;
-}
+  :deep(.@{ventSpace}-tabs-tabpane-active) {
+    overflow: auto;
+  }
 
-:deep(.@{ventSpace}-input-number) {
-  border-color: #ffffff88 !important;
-}
+  :deep(.@{ventSpace}-input-number) {
+    border-color: #ffffff88 !important;
+  }
 </style>

+ 15 - 7
src/views/vent/monitorManager/windowMonitor/components/modal.vue

@@ -5,48 +5,56 @@
         <ExclamationCircleFilled style="color: #ffb700; font-size: 30px" />
         <div class="warning-text">您是否要进行{{ title }}操作?</div>
       </div>
-      <template v-if="type == '1' || type == '2' || type.startsWith('sameSetValue') || type.startsWith('middleSetValue')">
+      <template
+        v-if="type == '1' || type == '2' || type.startsWith('sameSetValue') || type.startsWith('middleSetValue') || type.startsWith('rearSetValue')"
+      >
         <div class="vent-flex-row input-box">
           <div class="label">{{ title.includes('角度') ? '风窗角度:' : '风窗面积:' }}</div>
           <a-input-number size="small" placeholder="0" :min="0" v-model:value="data" />
         </div>
       </template>
-      <template v-if="type == '7'">
+      <template v-else-if="type == '7'">
         <div class="vent-flex-row input-box">
           <div class="label">风窗目标风量(m³/min):</div>
           <a-input-number size="small" placeholder="0" :min="0" v-model:value="data" />
         </div>
       </template>
-      <template v-if="type == '8'">
+      <template v-else-if="type == '8'">
         <div class="vent-flex-row input-box">
           <div class="label">风窗目标风量(m³/min):</div>
           <a-input-number size="small" placeholder="0" :min="0" v-model:value="data" />
         </div>
       </template>
-      <template v-if="type == 'ldkzStart'">
+      <template v-else-if="type == 'ldkzStart'">
         <div class="vent-flex-row input-box">
           <div class="label">瓦斯超限浓度(%):</div>
           <a-input-number size="small" placeholder="0" :min="0" v-model:value="data" />
         </div>
       </template>
-      <template v-if="type.startsWith('frontSetValue')">
+      <template v-else-if="type.startsWith('frontSetValue')">
         <div class="vent-flex-row input-box">
           <div class="label">风窗角度:</div>
           <a-input-number size="small" placeholder="0" :min="0" v-model:value="data" />
         </div>
       </template>
-      <template v-if="type.startsWith('air')">
+      <template v-else-if="type.startsWith('air')">
         <div class="vent-flex-row input-box">
           <div class="label">风窗过风量(m³/min):</div>
           <a-input-number size="small" placeholder="0" :min="0" v-model:value="data" />
         </div>
       </template>
-      <template v-if="type.startsWith('COTest')">
+      <template v-else-if="type.startsWith('COTest')">
         <div class="vent-flex-row input-box">
           <div class="label">一氧化碳(ppm):</div>
           <a-input-number size="small" placeholder="0" :min="0" v-model:value="data" />
         </div>
       </template>
+      <template v-else>
+        <div class="vent-flex-row input-box">
+          <div class="label">{{ title }}:</div>
+          <a-input-number size="small" placeholder="0" :min="0" v-model:value="data" />
+        </div>
+      </template>
       <div v-if="!globalConfig?.simulatedPassword" class="vent-flex-row input-box">
         <div class="label">操作密码:</div>
         <a-input size="small" type="password" v-model:value="passWord" />

+ 6 - 1
src/views/vent/monitorManager/windowMonitor/index.vue

@@ -50,7 +50,7 @@
           <div v-if="hasPermission('window:showAngleArea')" class="button-box" @click="setAngle(1)">设定风窗面积</div>
         </div>
         <div v-if="hasPermission('window:sameSet')" class="button-box" @click="setControl('sameSetValue', '风窗面积设置')">设定风窗面积</div>
-        <div v-if="hasPermission('window:COTest')" class="button-box" @click="setControl('COTest', 'CO调控预测')">CO调控预测</div>
+        <div class="button-box" @click="setControl('COTest', 'CO调控预测')">CO调控预测</div>
       </div>
       <div class="top-right row">
         <div v-if="hasPermission('window:zhldkz')" class="button-box" @click="setControl('autoRun', '开启自主调控')">开启自主调控</div>
@@ -569,10 +569,15 @@
             content: `一氧化碳超限,可能存在火灾隐患,是否开启${selectData.value.strinstallpos},使有毒烟气短路?`,
             onOk: () => {
               message.success('指令已下发成功!');
+              handleCancel();
             },
             onCancel: () => handleCancel(),
           });
           return;
+        } else {
+          message.success('一氧化碳在正常范围内,无需操作!');
+          handleCancel();
+          return;
         }
       } else {
         data.paramcode = handlerState;