Bläddra i källkod

1. 风门远程就地控制调整
2. 局部风机历史组件切换
3. 测风控制消息提示

hongrunxia 9 månader sedan
förälder
incheckning
d1106b8590

+ 1 - 0
src/design/vent/modal.less

@@ -231,6 +231,7 @@
     .row {
       color: #fff;
       display: flex;
+      align-items: center;
     }
     .top-left {
       width: 400px;

+ 2 - 2
src/layouts/default/sider/bottomSideder.vue

@@ -152,8 +152,8 @@
 
       onMounted(async () => {
         menuModules.value = await getMenus();
-        debugger;
-        currentParentRoute.value = menuModules.value[0];
+        const index = menuModules.value.findIndex((menu) => menu.children && menu.children.length > 0);
+        currentParentRoute.value = menuModules.value[index];
       });
       return {
         menuModules,

+ 1 - 1
src/views/vent/comment/history/HistoryTable.vue

@@ -109,7 +109,7 @@
     )
       .then(({ records, total, current }) => {
         // 表格的列需要默认情况下需要和设备列表联动
-        defaultColumns.forEach((col) => {
+        defaultColumns.filter((col) => {
           col.dataIndex = `${formData.deviceid}${col.dataIndex}`;
         });
         setColumns(defaultColumns);

+ 99 - 30
src/views/vent/monitorManager/comment/DeviceEcharts.vue

@@ -1,35 +1,74 @@
 <template>
   <div class="charts-container">
-    <a-select ref="select" v-model:value="chartsType" size="small"
-      style="position: absolute; z-index: 99; top: 2px; left: 2px; width: 98px">
+    <a-select ref="select" v-model:value="chartsType" size="small" style="position: absolute; z-index: 99; top: 2px; left: 2px; width: 98px">
       <a-select-option value="listMonitor">实时监测</a-select-option>
       <a-select-option value="detail">详情监测</a-select-option>
       <a-select-option value="history">历史记录</a-select-option>
     </a-select>
 
     <div class="charts-box" v-if="chartsType === 'listMonitor'" style="position: absolute; top: 20px">
-      <BarAndLine :chartsColumnsType="chartsColumnsType" :xAxisPropType="xAxisPropType" :dataSource="dataSource"
-        height="100%" chartsType="listMonitor" :option="echartsOption" :chartsColumns="chartsColumns" />
+      <BarAndLine
+        :chartsColumnsType="chartsColumnsType"
+        :xAxisPropType="xAxisPropType"
+        :dataSource="dataSource"
+        height="100%"
+        chartsType="listMonitor"
+        :option="echartsOption"
+        :chartsColumns="chartsColumns"
+      />
     </div>
     <div class="charts-box" v-else-if="chartsType === 'detail' && deviceListApi">
-      <Select :options="options" :fieldNames="{ label: 'strname', value: 'deviceID' }" v-model:value="deviceId"
-        placeholder="请选择查看的设备" size="small"
-        style="position: absolute; z-index: 99; left: 102px; width: 150px; top: 2px" />
-      <BarAndLine :chartsColumnsType="chartsColumnsType" :xAxisPropType="resultXAxisPropType"
-        :dataSource="detailDataSource" height="100%" :option="echartsOption2" chartsType="detail"
-        :chartsColumns="chartsColumns" />
+      <Select
+        :options="options"
+        :fieldNames="{ label: 'strname', value: 'deviceID' }"
+        v-model:value="deviceId"
+        placeholder="请选择查看的设备"
+        size="small"
+        style="position: absolute; z-index: 99; left: 102px; width: 150px; top: 2px"
+      />
+      <BarAndLine
+        :chartsColumnsType="chartsColumnsType"
+        :xAxisPropType="resultXAxisPropType"
+        :dataSource="detailDataSource"
+        height="100%"
+        :option="echartsOption2"
+        chartsType="detail"
+        :chartsColumns="chartsColumns"
+      />
     </div>
     <div class="charts-box" v-else-if="chartsType === 'history'">
-      <Select :options="options" :fieldNames="{ label: 'strname', value: 'deviceID' }" v-model:value="deviceId"
-        placeholder="请选择查看的设备" size="small"
-        style="position: absolute; z-index: 99; left: 102px; width: 150px; top: 2px" />
+      <Select
+        :options="options"
+        :fieldNames="{ label: 'strname', value: 'deviceID' }"
+        v-model:value="deviceId"
+        placeholder="请选择查看的设备"
+        size="small"
+        style="position: absolute; z-index: 99; left: 102px; width: 150px; top: 2px"
+      />
       <template v-if="globalConfig.History_Type == 'vent'">
-        <a-date-picker v-model:value="historyParams.ttime_begin" valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始日期"
-          size="small" :showTime="true" style="position: absolute; z-index: 99; left: 254px; width: 170px; top: 2px" />
-        <a-date-picker v-model:value="historyParams.ttime_end" valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束日期"
-          size="small" :showTime="true" style="position: absolute; z-index: 99; left: 426px; width: 170px; top: 2px" />
-        <a-select ref="select" v-model:value="historyParams.skip" placeholder="请选择间隔时间" size="small"
-          style="position: absolute; z-index: 99; top: 2px; left: 598px; width: 150px">
+        <a-date-picker
+          v-model:value="historyParams.ttime_begin"
+          valueFormat="YYYY-MM-DD HH:mm:ss"
+          placeholder="请选择开始日期"
+          size="small"
+          :showTime="true"
+          style="position: absolute; z-index: 99; left: 254px; width: 170px; top: 2px"
+        />
+        <a-date-picker
+          v-model:value="historyParams.ttime_end"
+          valueFormat="YYYY-MM-DD HH:mm:ss"
+          placeholder="请选择结束日期"
+          size="small"
+          :showTime="true"
+          style="position: absolute; z-index: 99; left: 426px; width: 170px; top: 2px"
+        />
+        <a-select
+          ref="select"
+          v-model:value="historyParams.skip"
+          placeholder="请选择间隔时间"
+          size="small"
+          style="position: absolute; z-index: 99; top: 2px; left: 598px; width: 150px"
+        >
           <a-select-option value="1">1秒</a-select-option>
           <a-select-option value="2">5秒</a-select-option>
           <a-select-option value="3">10秒</a-select-option>
@@ -41,12 +80,29 @@
         </a-select>
       </template>
       <template v-else>
-        <a-date-picker v-model:value="historyParams.startTime" valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="开始时间"
-          size="small" :showTime="true" style="position: absolute; z-index: 99; left: 254px; width: 170px; top: 2px" />
-        <a-date-picker v-model:value="historyParams.endTime" valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="结束时间"
-          size="small" :showTime="true" style="position: absolute; z-index: 99; left: 426px; width: 170px; top: 2px" />
-        <a-select ref="select" v-model:value="historyParams.interval" placeholder="请选择间隔时间" size="small"
-          style="position: absolute; z-index: 99; top: 2px; left: 598px; width: 150px">
+        <a-date-picker
+          v-model:value="historyParams.startTime"
+          valueFormat="YYYY-MM-DD HH:mm:ss"
+          placeholder="开始时间"
+          size="small"
+          :showTime="true"
+          style="position: absolute; z-index: 99; left: 254px; width: 170px; top: 2px"
+        />
+        <a-date-picker
+          v-model:value="historyParams.endTime"
+          valueFormat="YYYY-MM-DD HH:mm:ss"
+          placeholder="结束时间"
+          size="small"
+          :showTime="true"
+          style="position: absolute; z-index: 99; left: 426px; width: 170px; top: 2px"
+        />
+        <a-select
+          ref="select"
+          v-model:value="historyParams.interval"
+          placeholder="请选择间隔时间"
+          size="small"
+          style="position: absolute; z-index: 99; top: 2px; left: 598px; width: 150px"
+        >
           <a-select-option value="1s">1秒</a-select-option>
           <a-select-option value="5s">5秒</a-select-option>
           <a-select-option value="10s">10秒</a-select-option>
@@ -57,11 +113,24 @@
           <a-select-option value="1h">1小时</a-select-option>
         </a-select>
       </template>
-      <Pagination size="small" v-model:current="currentPage" v-model:page-size="pageSize" :total="total"
-        :show-total="(total) => `共 ${total} 条`" style="position: absolute; z-index: 99; top: 2px; right: 30px" />
-      <BarAndLine :chartsColumnsType="chartsColumnsType" :xAxisPropType="resultXAxisPropType"
-        :dataSource="resultDataSource" height="100%" :option="echartsOption1" chartsType="history"
-        style="margin-top: 20px" :chartsColumns="chartsColumns" />
+      <Pagination
+        size="small"
+        v-model:current="currentPage"
+        v-model:page-size="pageSize"
+        :total="total"
+        :show-total="(total) => `共 ${total} 条`"
+        style="position: absolute; z-index: 99; top: 2px; right: 30px"
+      />
+      <BarAndLine
+        :chartsColumnsType="chartsColumnsType"
+        :xAxisPropType="resultXAxisPropType"
+        :dataSource="resultDataSource"
+        height="100%"
+        :option="echartsOption1"
+        chartsType="history"
+        style="margin-top: 20px"
+        :chartsColumns="chartsColumns"
+      />
     </div>
   </div>
 </template>

+ 0 - 3
src/views/vent/monitorManager/comment/HistoryTable.vue

@@ -216,9 +216,6 @@
       stationType.value = deviceOptions.value[0]['stationtype'];
     }
     await getForm().setFieldsValue({ gdeviceid: props.deviceId ? props.deviceId : deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '' });
-    // nextTick(async () => {
-    //   await getDataSource();
-    // });
   }
 
   async function getDataSource() {

+ 322 - 309
src/views/vent/monitorManager/deviceMonitor/components/device/modal/bundle.modal.vue

@@ -1,10 +1,21 @@
 <template>
-  <BasicModal v-bind="$attrs" @register="register" :title="`束管监测详情 ${currentTime}`" width="1200px" @ok="handleOk"
-    @cancel="handleCancel" wrapClassName="bundle-modal">
+  <BasicModal
+    v-bind="$attrs"
+    @register="register"
+    :title="`束管监测详情 ${currentTime}`"
+    width="1200px"
+    @ok="handleOk"
+    @cancel="handleCancel"
+    wrapClassName="bundle-modal"
+  >
     <div class="fiber-modal">
       <div class="modal-left">
-        <div v-for="device in deviceList" class="link-item"
-          :class="{ 'active-device-title': device.deviceID === activeDeviceID }" :key="device.deviceID">
+        <div
+          v-for="device in deviceList"
+          class="link-item"
+          :class="{ 'active-device-title': device.deviceID === activeDeviceID }"
+          :key="device.deviceID"
+        >
           <span class="" @click="selectDevice(device.deviceID)">{{ device.strinstallpos }}</span>
         </div>
       </div>
@@ -17,8 +28,7 @@
             </div>
             <div class="item-container">
               <div class="title">一氧化碳</div>
-              <div class="value">{{ posMonitor.coval !== undefined && posMonitor.coval !== null ? posMonitor.coval : '-'
-                }} <span>ppm</span> </div>
+              <div class="value">{{ posMonitor.coval !== undefined && posMonitor.coval !== null ? posMonitor.coval : '-' }} <span>ppm</span> </div>
             </div>
           </div>
           <div class="top-item">
@@ -27,8 +37,7 @@
             </div>
             <div class="item-container">
               <div class="title">二氧化碳</div>
-              <div class="value">{{ posMonitor.co2val !== undefined && posMonitor.co2val !== null ? posMonitor.co2val :
-                '-' }} <span>%</span></div>
+              <div class="value">{{ posMonitor.co2val !== undefined && posMonitor.co2val !== null ? posMonitor.co2val : '-' }} <span>%</span></div>
             </div>
           </div>
           <div class="top-item">
@@ -37,8 +46,7 @@
             </div>
             <div class="item-container">
               <div class="title">甲烷</div>
-              <div class="value">{{ posMonitor.gasval !== undefined && posMonitor.gasval !== null ? posMonitor.gasval :
-                '-' }} <span>%</span></div>
+              <div class="value">{{ posMonitor.gasval !== undefined && posMonitor.gasval !== null ? posMonitor.gasval : '-' }} <span>%</span></div>
             </div>
           </div>
           <div class="top-item">
@@ -47,8 +55,7 @@
             </div>
             <div class="item-container">
               <div class="title">乙烯</div>
-              <div class="value">{{ posMonitor.ch2val !== undefined && posMonitor.ch2val !== null ? posMonitor.ch2val :
-                '-' }} <span>ppm</span></div>
+              <div class="value">{{ posMonitor.ch2val !== undefined && posMonitor.ch2val !== null ? posMonitor.ch2val : '-' }} <span>ppm</span></div>
             </div>
           </div>
           <div class="top-item">
@@ -57,8 +64,7 @@
             </div>
             <div class="item-container">
               <div class="title">乙炔</div>
-              <div class="value">{{ posMonitor.chval !== undefined && posMonitor.chval !== null ? posMonitor.chval : '-'
-                }} <span>ppm</span></div>
+              <div class="value">{{ posMonitor.chval !== undefined && posMonitor.chval !== null ? posMonitor.chval : '-' }} <span>ppm</span></div>
             </div>
           </div>
           <div class="top-item">
@@ -67,8 +73,7 @@
             </div>
             <div class="item-container">
               <div class="title">氧气</div>
-              <div class="value">{{ posMonitor.o2val !== undefined && posMonitor.o2val !== null ? posMonitor.o2val : '-'
-                }} <span>%</span></div>
+              <div class="value">{{ posMonitor.o2val !== undefined && posMonitor.o2val !== null ? posMonitor.o2val : '-' }} <span>%</span></div>
             </div>
           </div>
           <div class="top-item warning-box">
@@ -91,15 +96,24 @@
           </div>
         </div>
         <div class="right-bottom">
-          <span class="base-title">设备监测曲线&nbsp; <span style="color:red">{{ posMonitor['netStatus'] != 1 ? '(设备未连接)' : ''
-              }}</span></span>
+          <span class="base-title"
+            >设备监测曲线&nbsp; <span style="color: red">{{ posMonitor['netStatus'] != 1 ? '(设备未连接)' : '' }}</span></span
+          >
           <div class="echarts-box">
-            <BarAndLine class="echarts-line" xAxisPropType="ttime" :dataSource="historyList" height="100%" width="65%"
-              :chartsColumns="chartsColumns" :option="echatsOption" chartsType="listMonitor" />
+            <BarAndLine
+              class="echarts-line"
+              xAxisPropType="ttime"
+              :dataSource="historyList"
+              height="100%"
+              width="65%"
+              :chartsColumns="chartsColumns"
+              :option="echatsOption"
+              chartsType="listMonitor"
+            />
 
             <!-- 爆炸三角形 -->
-            <div style="width:35%;height:100%; margin: 0px auto">
-              <blastDelta :posMonitor="posMonitor"></blastDelta>
+            <div style="width: 35%; height: 100%; margin: 0px auto">
+              <blastDelta :posMonitor="posMonitor" />
             </div>
           </div>
         </div>
@@ -108,356 +122,355 @@
   </BasicModal>
 </template>
 <script lang="ts">
-import { defineComponent, ref, watch, shallowRef, onMounted } from 'vue';
-import { BasicModal, useModalInner } from '/@/components/Modal';
-import BarAndLine from '/@/components/chart/BarAndLine.vue';
-import blastDelta from './blastDelta.vue'
-import { SvgIcon } from '/@/components/Icon';
-import dayjs from 'dayjs';
-import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
-import { chartsColumnList } from '../device.data';
-import { listdays } from '../device.api';
-
-
-export default defineComponent({
-  components: { BasicModal, BarAndLine, SvgIcon, blastDelta },
-  props: {
-    dataSource: { type: Array },
-    activeID: { type: String },
-  },
-  setup(props) {
-    const currentTime = ref(dayjs().format('YYYY-MM-DD HH:mm:ss'));
-    const modelRef = ref({});
-    const loading = ref(true);
-    const activeDeviceID = ref('');
-    const deviceList = ref<any[]>([]);
-    const historyList = ref<any[]>([]);
-    const posList = ref<any[]>([]);
-    const posMonitor = shallowRef({});
-
-    const echatsOption = {
-      grid: {
-        top: '29%',
-        left: '3',
-        right: '45',
-        bottom: '3%',
-        containLabel: true,
-      },
-      toolbox: {
-        feature: {},
-      },
-    };
-
-    const chartsColumnArr = getTableHeaderColumns('bundletube_chart');
-    const chartsColumns = chartsColumnArr.length > 0 ? chartsColumnArr : chartsColumnList;
-
-    const [register, { setModalProps, closeModal }] = useModalInner();
-
-    function handleVisibleChange(visible) {
-      if (visible) {
+  import { defineComponent, ref, watch, shallowRef, onMounted } from 'vue';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import BarAndLine from '/@/components/chart/BarAndLine.vue';
+  import blastDelta from './blastDelta.vue';
+  import { SvgIcon } from '/@/components/Icon';
+  import dayjs from 'dayjs';
+  import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
+  import { chartsColumnList } from '../device.data';
+  import { listdays } from '../device.api';
+
+  export default defineComponent({
+    components: { BasicModal, BarAndLine, SvgIcon, blastDelta },
+    props: {
+      dataSource: { type: Array },
+      activeID: { type: String },
+    },
+    setup(props) {
+      const currentTime = ref(dayjs().format('YYYY-MM-DD HH:mm:ss'));
+      const modelRef = ref({});
+      const loading = ref(true);
+      const activeDeviceID = ref('');
+      const deviceList = ref<any[]>([]);
+      const historyList = ref<any[]>([]);
+      const posList = ref<any[]>([]);
+      const posMonitor = shallowRef({});
+
+      const echatsOption = {
+        grid: {
+          top: '29%',
+          left: '3',
+          right: '45',
+          bottom: '3%',
+          containLabel: true,
+        },
+        toolbox: {
+          feature: {},
+        },
+      };
+
+      const chartsColumnArr = getTableHeaderColumns('bundletube_chart');
+      const chartsColumns = chartsColumnArr.length > 0 ? chartsColumnArr : chartsColumnList;
+
+      const [register, { setModalProps, closeModal }] = useModalInner();
+
+      function handleVisibleChange(visible) {
+        if (visible) {
+          loading.value = true;
+          setModalProps({ loading: true, confirmLoading: true });
+
+          setTimeout(() => {
+            loading.value = false;
+            setModalProps({ loading: false, confirmLoading: false });
+          }, 1000);
+        }
+      }
+
+      // 选择监测
+      function selectDevice(id) {
         loading.value = true;
+        getListdays();
         setModalProps({ loading: true, confirmLoading: true });
-
         setTimeout(() => {
           loading.value = false;
+          activeDeviceID.value = id;
           setModalProps({ loading: false, confirmLoading: false });
-        }, 1000);
+        }, 300);
       }
-    }
-
-    // 选择监测
-    function selectDevice(id) {
-      loading.value = true;
-      getListdays()
-      setModalProps({ loading: true, confirmLoading: true });
-      setTimeout(() => {
-        loading.value = false;
-        activeDeviceID.value = id;
-        setModalProps({ loading: false, confirmLoading: false });
-      }, 300);
-    }
-
-    function handleOk(e) {
-      e.preventDefault();
-      closeModal();
-    }
 
-    function handleCancel(e) {
-      e.preventDefault();
-      closeModal();
-    }
+      function handleOk(e) {
+        e.preventDefault();
+        closeModal();
+      }
 
-    //获取历史数据
-    async function getListdays() {
-      const ttime_begin = dayjs(new Date().getTime() - (3 * 24 * 60 * 60 * 1000)).format('YYYY-MM-DD hh:mm:ss');
-      const ttime_end = dayjs(new Date().getTime()).format('YYYY-MM-DD hh:mm:ss')
-      const pageNo=1
-      const pageSize=100
-      const skip=8
-      const strtype='bundletube_auto'
-      activeDeviceID
-      let res=await listdays({ttime_begin,ttime_end,pageNo,pageSize,skip,strtype,gdeviceid:activeDeviceID.value})
-      console.log(res,'束管历史数据')
-      let data=res.datalist.records
-      if(data.length!=0){
-        data.forEach(el=>{
-            Object.assign(el,el.readData)
-        })
-        historyList.value=data
-    }
-  }
+      function handleCancel(e) {
+        e.preventDefault();
+        closeModal();
+      }
 
-    watch([() => props.dataSource, () => props.activeID], ([newDataSource, newActiveID], [oldDataSource, oldActiveID]) => {
-      // if (newActiveID != oldActiveID) {
-      //   activeDeviceID.value = newActiveID as string;
-      // }
-      activeDeviceID.value = activeDeviceID.value ? activeDeviceID.value : newActiveID;
-      deviceList.value = newDataSource?.filter((item: any, index) => {
-        if ((!activeDeviceID.value && index == 0) || item.deviceID === activeDeviceID.value) {
-          // activeDeviceID.value = item.deviceID;
-          posMonitor.value = Object.assign(item, item.readData);
-          getListdays()
+      //获取历史数据
+      async function getListdays() {
+        const ttime_begin = dayjs(new Date().getTime() - 3 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD hh:mm:ss');
+        const ttime_end = dayjs(new Date().getTime()).format('YYYY-MM-DD hh:mm:ss');
+        const pageNo = 1;
+        const pageSize = 100;
+        const skip = 8;
+        const strtype = 'bundletube_auto';
+        activeDeviceID;
+        let res = await listdays({ ttime_begin, ttime_end, pageNo, pageSize, skip, strtype, gdeviceid: activeDeviceID.value });
+        console.log(res, '束管历史数据');
+        let data = res.datalist.records;
+        if (data.length != 0) {
+          data.forEach((el) => {
+            Object.assign(el, el.readData);
+          });
+          historyList.value = data;
         }
-        item.readTime = item.readTime?.substring(11);
-        return item;
+      }
+
+      watch([() => props.dataSource, () => props.activeID], ([newDataSource, newActiveID], [oldDataSource, oldActiveID]) => {
+        // if (newActiveID != oldActiveID) {
+        //   activeDeviceID.value = newActiveID as string;
+        // }
+        activeDeviceID.value = activeDeviceID.value ? activeDeviceID.value : newActiveID;
+        deviceList.value = newDataSource?.filter((item: any, index) => {
+          if ((!activeDeviceID.value && index == 0) || item.deviceID === activeDeviceID.value) {
+            // activeDeviceID.value = item.deviceID;
+            posMonitor.value = Object.assign(item, item.readData);
+            getListdays();
+          }
+          item.readTime = item.readTime?.substring(11);
+          return item;
+        });
       });
-    });
-    return {
-      register,
-      model: modelRef,
-      currentTime,
-      handleVisibleChange,
-      selectDevice,
-      handleOk,
-      handleCancel,
-      deviceList,
-      historyList,
-      activeDeviceID,
-      posMonitor,
-      echatsOption,
-      posList,
-      chartsColumns,
-    };
-  },
-});
+      return {
+        register,
+        model: modelRef,
+        currentTime,
+        handleVisibleChange,
+        selectDevice,
+        handleOk,
+        handleCancel,
+        deviceList,
+        historyList,
+        activeDeviceID,
+        posMonitor,
+        echatsOption,
+        posList,
+        chartsColumns,
+      };
+    },
+  });
 </script>
 <style lang="less">
-.bundle-modal {
-  .zxm-modal {
-    top: 30px !important;
+  .bundle-modal {
+    .zxm-modal {
+      top: 30px !important;
+    }
   }
-}
 </style>
 
 <style lang="less" scoped>
-.fiber-modal {
-  width: 100%;
-  height: 650px;
-  display: flex;
-  flex-direction: row;
-  justify-content: space-between;
-
-  .modal-left {
-    width: 200px;
-    height: 100%;
-    overflow-y: auto;
-    background: #ffffff11;
-    padding: 5px;
-    border-radius: 5px;
-
-    .active-device-title {
-      color: aqua;
-    }
+  .fiber-modal {
+    width: 100%;
+    height: 650px;
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+
+    .modal-left {
+      width: 200px;
+      height: 100%;
+      overflow-y: auto;
+      background: #ffffff11;
+      padding: 5px;
+      border-radius: 5px;
+
+      .active-device-title {
+        color: aqua;
+      }
 
-    .link-item {
-      position: relative;
-      cursor: pointer;
-      line-height: 30px;
-      padding-left: 30px;
+      .link-item {
+        position: relative;
+        cursor: pointer;
+        line-height: 30px;
+        padding-left: 30px;
 
-      span:hover {
-        color: #89ffff;
-      }
+        span:hover {
+          color: #89ffff;
+        }
 
-      &::after {
-        content: '';
-        position: absolute;
-        display: block;
-        width: 8px;
-        height: 8px;
-        top: 12px;
-        left: 10px;
-        transform: rotateZ(45deg) skew(10deg, 10deg);
-        background: #45d3fd;
+        &::after {
+          content: '';
+          position: absolute;
+          display: block;
+          width: 8px;
+          height: 8px;
+          top: 12px;
+          left: 10px;
+          transform: rotateZ(45deg) skew(10deg, 10deg);
+          background: #45d3fd;
+        }
       }
     }
-  }
 
-  .modal-right {
-    width: calc(100% - 220px);
-    overflow-y: auto;
-
-    .base-title {
-      line-height: 32px;
-      position: relative;
-      padding-left: 20px;
-
-      &::after {
-        content: '';
-        position: absolute;
-        display: block;
-        width: 4px;
-        height: 12px;
-        top: 4px;
-        left: 10px;
-        background: #45d3fd;
-        border-radius: 4px;
-      }
-    }
+    .modal-right {
+      width: calc(100% - 220px);
+      overflow-y: auto;
+
+      .base-title {
+        line-height: 32px;
+        position: relative;
+        padding-left: 20px;
 
-    .right-top {
-      display: flex;
-      flex-direction: row;
-      justify-content: space-between;
-      flex-wrap: wrap;
-      margin-bottom: 10px;
+        &::after {
+          content: '';
+          position: absolute;
+          display: block;
+          width: 4px;
+          height: 12px;
+          top: 4px;
+          left: 10px;
+          background: #45d3fd;
+          border-radius: 4px;
+        }
+      }
 
-      .top-item {
-        width: 220px;
-        height: 100px;
+      .right-top {
         display: flex;
         flex-direction: row;
-        justify-content: center;
-        border: 1px solid rgba(25, 237, 255, 0.4);
-        box-shadow: inset 0 0 10px rgba(0, 197, 255, 0.6);
-        background: rgba(0, 0, 0, 0.06666666666666667);
-        padding-top: 20px;
-        margin: 10px 0;
-
-        .icon {
-          margin-right: 10px;
-          margin-top: 5px;
-          color: #fdb146;
-        }
+        justify-content: space-between;
+        flex-wrap: wrap;
+        margin-bottom: 10px;
 
-        .item-container {
-          width: 110px;
+        .top-item {
+          width: 220px;
+          height: 100px;
           display: flex;
-          flex-direction: column;
+          flex-direction: row;
           justify-content: center;
-
-          div {
-            text-align: center;
+          border: 1px solid rgba(25, 237, 255, 0.4);
+          box-shadow: inset 0 0 10px rgba(0, 197, 255, 0.6);
+          background: rgba(0, 0, 0, 0.06666666666666667);
+          padding-top: 20px;
+          margin: 10px 0;
+
+          .icon {
+            margin-right: 10px;
+            margin-top: 5px;
+            color: #fdb146;
           }
 
-          .title {
-            font-size: 18px;
-          }
+          .item-container {
+            width: 110px;
+            display: flex;
+            flex-direction: column;
+            justify-content: center;
 
-          .value {
-            text-shadow: 0 0 25px #00fbfe;
-            background: linear-gradient(0deg, #45d3fd, #45d3fd, #61ddb1, #61ddb1);
-            font-style: normal;
-            background-size: cover;
-            font-family: electronicFont;
-            font-size: 30px;
-            -webkit-background-clip: text;
-            background-clip: text;
-            -webkit-text-fill-color: transparent;
-            position: relative;
-            top: -8px;
-
-            span {
-              font-family: Arial, Helvetica, sans-serif;
+            div {
+              text-align: center;
+            }
+
+            .title {
               font-size: 18px;
-              color: aliceblue;
+            }
+
+            .value {
+              text-shadow: 0 0 25px #00fbfe;
+              background: linear-gradient(0deg, #45d3fd, #45d3fd, #61ddb1, #61ddb1);
+              font-style: normal;
+              background-size: cover;
+              font-family: electronicFont;
+              font-size: 30px;
+              -webkit-background-clip: text;
+              background-clip: text;
+              -webkit-text-fill-color: transparent;
+              position: relative;
+              top: -8px;
+
+              span {
+                font-family: Arial, Helvetica, sans-serif;
+                font-size: 18px;
+                color: aliceblue;
+              }
             }
           }
         }
-      }
 
-      .warning-box {
-        padding-top: 0px;
+        .warning-box {
+          padding-top: 0px;
 
-        .icon {
-          margin-top: 20px;
+          .icon {
+            margin-top: 20px;
 
-          :deep(.icon-style) {
-            width: auto;
-            color: #fdb146;
+            :deep(.icon-style) {
+              width: auto;
+              color: #fdb146;
+            }
           }
-        }
 
-        .warning-value {
-          font-size: 18px;
-          color: #61ddb1;
+          .warning-value {
+            font-size: 18px;
+            color: #61ddb1;
+          }
         }
       }
-    }
 
-    .right-center {
-      margin-top: 20px;
-      display: flex;
-      flex-direction: row;
-      justify-content: space-between;
+      .right-center {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
 
-      .table-box {
-        position: relative;
-        width: 500px;
-        height: 250px;
-      }
+        .table-box {
+          position: relative;
+          width: 500px;
+          height: 250px;
+        }
 
-      .warning-box {
-        width: calc(100% - 520px);
+        .warning-box {
+          width: calc(100% - 520px);
 
-        .warning-container {
-          width: 100%;
-          height: convert;
-          background: #009acd00;
+          .warning-container {
+            width: 100%;
+            height: convert;
+            background: #009acd00;
 
-          :deep(.dv-scroll-board) {
-            .row-item {
-              height: 40px !important;
-              line-height: 40px !important;
-            }
+            :deep(.dv-scroll-board) {
+              .row-item {
+                height: 40px !important;
+                line-height: 40px !important;
+              }
 
-            .header-item {
-              border-top: 1px solid #91e9fe !important;
-              border-bottom: 1px solid #91e9fe !important;
+              .header-item {
+                border-top: 1px solid #91e9fe !important;
+                border-bottom: 1px solid #91e9fe !important;
+              }
             }
           }
         }
       }
-    }
 
-    .right-bottom {
-      margin-top: 20px;
+      .right-bottom {
+        margin-top: 20px;
 
-      .echarts-box {
-        width: 100%;
-        height: 320px;
-        position: relative;
-        display: flex;
-        justify-content: space-between;
+        .echarts-box {
+          width: 100%;
+          height: 320px;
+          position: relative;
+          display: flex;
+          justify-content: space-between;
 
-        .echarts-line {
-          width: calc(100% + 80px);
-          position: absolute;
+          .echarts-line {
+            width: calc(100% + 80px);
+            position: absolute;
+          }
         }
       }
     }
   }
-}
 
-:deep(.zxm-table-body) {
-  border: 1px solid rgba(57, 232, 255, 0.2) !important;
+  :deep(.zxm-table-body) {
+    border: 1px solid rgba(57, 232, 255, 0.2) !important;
 
-  .zxm-table-tbody>tr>td {
-    border: none !important;
+    .zxm-table-tbody > tr > td {
+      border: none !important;
+    }
   }
-}
 
-:deep(.zxm-table-cell) {
-  border-right: none !important;
-}
+  :deep(.zxm-table-cell) {
+    border-right: none !important;
+  }
 </style>

+ 5 - 5
src/views/vent/monitorManager/fanLocalMonitor/index.vue

@@ -297,7 +297,7 @@
           </a-tab-pane>
           <a-tab-pane key="3" tab="历史数据">
             <div class="tab-item" v-if="activeKey === '3'">
-              <!-- <HistoryTable :columns-type="`${selectData.deviceType}`" :device-type="`${devicekide}`" designScope="fanlocal-history" :scroll="scroll">
+              <HistoryTable :columns-type="`${selectData.deviceType}`" :device-type="`${devicekide}`" designScope="fanlocal-history" :scroll="scroll">
                 <template #filterCell="{ column, record }">
                   <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == '0' ? 'green' : 'red'">{{
                     record.warnFlag == '0' ? '正常' : '报警'
@@ -307,8 +307,8 @@
                   }}</a-tag>
                   <div v-if="record.nwindownum == 1 && column.dataIndex === 'rearArea'">/</div>
                 </template>
-              </HistoryTable> -->
-              <HistoryTable class="w-100% h-100% mt-100px" :device-code="`${devicekide}`" :scroll="scroll" dict-code="fanlocal_dict" />
+              </HistoryTable>
+              <!-- <HistoryTable class="w-100% h-100% mt-100px" :device-code="`${devicekide}`" :scroll="scroll" dict-code="fanlocal_dict" /> -->
             </div>
           </a-tab-pane>
           <a-tab-pane key="4" tab="报警历史">
@@ -471,8 +471,8 @@
   import { onBeforeMount, ref, watch, onMounted, nextTick, toRaw, reactive, onUnmounted, inject, unref } from 'vue';
   import BarSingle from '../../../../components/chart/BarSingle.vue';
   import GroupMonitorTable from '../comment/GroupMonitorTable.vue';
-  // import HistoryTable from '../comment/HistoryTable.vue';
-  import HistoryTable from '/@/views/vent/comment/history/HistoryTable.vue';
+  import HistoryTable from '../comment/HistoryTable.vue';
+  // import HistoryTable from '/@/views/vent/comment/history/HistoryTable.vue';
   import AlarmHistoryTable from '../comment/AlarmHistoryTable.vue';
   import HandlerHistoryTable from '../comment/HandlerHistoryTable.vue';
   import DeviceBaseInfo from '../comment/components/DeviceBaseInfo.vue';

+ 19 - 24
src/views/vent/monitorManager/gateMonitor/index.vue

@@ -34,23 +34,23 @@
       </div>
       <!-- 控制模式 -->
       <div class="top-right row">
-        <div class="control-type row" v-if="selectData.contrlMod == 'loopCtrl'">
+        <div class="vent-flex-m row" v-if="selectData.contrlMod == 'loopCtrl'">
           <div class="control-title">控制模式:</div>
-          <a-radio-group v-model:value="selectData.autoRoManual" @change="playAnimation(7)">
+          <a-radio-group v-model:value="selectData.autoRoManual">
             <template v-for="(item, index) in modelList" :key="index">
               <a-radio :value="item.value" :disabled="true">{{ item.text }}</a-radio>
             </template>
           </a-radio-group>
           <div class="button-box" @click="playAnimation(7)">切换模式</div>
         </div>
-        <div class="control-type row" v-else>
+        <div class="vent-flex-m row" v-else>
           <div class="control-title">控制模式:</div>
-          <a-radio-group v-model:value="selectData.autoRoManual" @change="playAnimation(7)">
+          <a-radio-group v-model:value="selectData.autoRoManual">
             <template v-for="(item, index) in modelList" :key="index">
-              <a-radio :value="item.value">{{ item.text }}</a-radio>
+              <a-radio :value="item.value" :disabled="true">{{ item.text }}</a-radio>
             </template>
           </a-radio-group>
-          <div v-if="hasPermission('btn:remote')" class="button-box" @click="playAnimation(7)">切换模式</div>
+          <div class="button-box" v-for="(item, index) in modelList" @click="playAnimation(7, item.value)" :key="index">{{ item.text }}</div>
         </div>
 
         <!-- <div class="run-type row">
@@ -281,7 +281,6 @@
 
 <script setup lang="ts">
   import { onBeforeUnmount, onUnmounted, onMounted, ref, reactive, nextTick, inject } from 'vue';
-  import DeviceEcharts from '../comment/DeviceEcharts.vue';
   import MonitorTable from '../comment/MonitorTable.vue';
   import HistoryTable from '../comment/HistoryTable.vue';
   import AlarmHistoryTable from '../comment/AlarmHistoryTable.vue';
@@ -308,7 +307,7 @@
 
   const { currentRoute } = useRouter();
   const MonitorDataTable = ref();
-
+  let contrlValue = '';
   const playerRef = ref();
 
   const activeKey = ref('1'); // tab
@@ -409,6 +408,7 @@
               }
             }
             Object.assign(selectData, dataSource.value[selectRowIndex.value]);
+
             addMonitorText(selectData);
             monitorAnimation(selectData);
             if (timer) {
@@ -460,8 +460,9 @@
   }
 
   // 播放动画
-  function playAnimation(handlerState) {
+  function playAnimation(handlerState, data: any = null) {
     debugger;
+    const value = data;
     switch (handlerState) {
       case 1: // 打开前门
         if (selectData.frontGateOpen == '0' && selectData.frontGateClose == '1') {
@@ -556,30 +557,22 @@
     if (globalConfig?.simulatedPassword) {
       handleOK('', handlerState + '');
     }
+    contrlValue = value;
   }
 
   function handleOK(passWord, handlerState) {
-    // if (passWord !== '123456') {
-    //   message.warning('密码不正确,请重新输入');
-    //   return;
-    // }
-
-    // if (isOpenRunning && (handlerState == 2 || handlerState == 1 || handlerState == 5 || handlerState == 6)) {
-    //   return;
-    // }
-
-    // if (isOpenRunning && (handlerState == 3 || handlerState == 4 || handlerState == 5 || handlerState == 6)) {
-    //   return;
-    // }
+    if (passWord == '') {
+      message.warning('请输入密码');
+      return;
+    }
     if (isOpenRunning) {
       return;
     }
-
     const data = {
       deviceid: selectData.deviceID,
       devicetype: selectData.deviceType,
       paramcode: '',
-      value: null,
+      value: contrlValue,
       password: passWord || globalConfig?.simulatedPassword,
       masterComputer: selectData.masterComputer,
     };
@@ -663,7 +656,7 @@
         break;
       case '7': // 远程与就地
         data.paramcode = 'autoRoManualControl';
-        data.value = selectData.contrlMod != 'loopCtrl' ? selectData.autoRoManual : '';
+        data.value = selectData.contrlMod != 'loopCtrl' ? contrlValue : '';
         selectData.autoRoManual = null;
     }
 
@@ -677,6 +670,8 @@
           } else {
             message.success('指令已下发成功!');
           }
+        } else {
+          message.error(res.message);
         }
       });
     }

+ 0 - 2
src/views/vent/monitorManager/windrectMonitor/index.vue

@@ -642,7 +642,6 @@
   }
 
   function controlDevice(passWord, type) {
-    debugger;
     try {
       if (type == 'sing') {
         testWind({ ids: [selectData.deviceID], maxnum: runNum.value, password: passWord || globalConfig?.simulatedPassword }).then((res) => {
@@ -659,7 +658,6 @@
         });
       } else if (type == 'multiple') {
         const ids = toRaw(modalTable.value.selectedRowKeys);
-        debugger;
         testWind({ ids: ids, maxnum: runNum.value, password: passWord || globalConfig?.simulatedPassword }).then((res) => {
           if (res.success) {
             if (globalConfig.History_Type == 'remote') {

+ 1 - 1
vite.config.ts

@@ -130,7 +130,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
       },
       exclude: [
         //升级vite4后,需要排除online依赖
-        // '@jeecg/online',
+        '@jeecg/online',
       ],
       // 提前预加载依赖,缩短首屏访问时间
       include: [