Browse Source

[Mod 000000] 风窗监测屏文字修改、设备监测组件逻辑修改

hongrunxia 2 tuần trước cách đây
mục cha
commit
a089110362

+ 266 - 266
src/views/vent/monitorManager/AllDeviceMonitor/index.vue

@@ -172,310 +172,310 @@
 </template>
 
 <script setup lang="ts">
-import { onBeforeUnmount, onUnmounted, onMounted, ref, reactive, nextTick, inject, unref } from 'vue';
-import MonitorTable from '../comment/MonitorTable.vue';
-import HistoryTable from '../comment/HistoryTable.vue';
-import AlarmHistoryTable from '../comment/AlarmHistoryTable.vue';
-import HandlerHistoryTable from '../comment/HandlerHistoryTable.vue';
-import HandleModal from './modal.vue';
-import DeviceBaseInfo from '../comment/components/DeviceBaseInfo.vue';
-import { deviceControlApi } from '/@/api/vent/index';
-import { message } from 'ant-design-vue';
-import { list, getTableList } from './deviceMonitor.api';
-import lodash from 'lodash';
-import { setDivHeight } from '/@/utils/event';
-import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
-import { useRouter } from 'vue-router';
-import { useModal } from '/@/components/Modal';
-import { useCamera } from '/@/hooks/system/useCamera';
-import { usePermission } from '/@/hooks/web/usePermission';
-import { getDictItems } from '/@/api/common/api';
+  import { onBeforeUnmount, onUnmounted, onMounted, ref, reactive, nextTick, inject, unref } from 'vue';
+  import MonitorTable from '../comment/MonitorTable.vue';
+  import HistoryTable from '../comment/HistoryTable.vue';
+  import AlarmHistoryTable from '../comment/AlarmHistoryTable.vue';
+  import HandlerHistoryTable from '../comment/HandlerHistoryTable.vue';
+  import HandleModal from './modal.vue';
+  import DeviceBaseInfo from '../comment/components/DeviceBaseInfo.vue';
+  import { deviceControlApi } from '/@/api/vent/index';
+  import { message } from 'ant-design-vue';
+  import { list, getTableList } from './deviceMonitor.api';
+  import lodash from 'lodash';
+  import { setDivHeight } from '/@/utils/event';
+  import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
+  import { useRouter } from 'vue-router';
+  import { useModal } from '/@/components/Modal';
+  import { useCamera } from '/@/hooks/system/useCamera';
+  import { usePermission } from '/@/hooks/web/usePermission';
+  import { getDictItems } from '/@/api/common/api';
 
-const { hasPermission } = usePermission();
+  const { hasPermission } = usePermission();
 
-const globalConfig = inject('globalConfig');
+  const globalConfig = inject('globalConfig');
 
-const { currentRoute } = useRouter();
-const MonitorDataTable = ref();
-let contrlValue = '';
-const playerRef = ref();
-const deviceType = ref('door');
-// const deviceType = ref('firedoor');
-const activeKey = ref('1'); // tab
+  const { currentRoute } = useRouter();
+  const MonitorDataTable = ref();
+  let contrlValue = '';
+  const playerRef = ref();
+  const deviceType = ref('door');
+  // const deviceType = ref('firedoor');
+  const activeKey = ref('1'); // tab
 
-const scroll = reactive({
-  y: 230,
-});
-const modelList = ref<{ text: string; value: string }[]>([]);
-const doorIsOpen = ref(false); //前门是否开启
-const modalIsShow = ref<boolean>(false); // 是否显示模态框
-const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
-const modalType = ref(''); // 模态框内容显示类型,设备操作类型
+  const scroll = reactive({
+    y: 230,
+  });
+  const modelList = ref<{ text: string; value: string }[]>([]);
+  const doorIsOpen = ref(false); //前门是否开启
+  const modalIsShow = ref<boolean>(false); // 是否显示模态框
+  const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
+  const modalType = ref(''); // 模态框内容显示类型,设备操作类型
 
-const selectRowIndex = ref(-1); // 选中行
-const dataSource = ref([]);
+  const selectRowIndex = ref(-1); // 选中行
+  const dataSource = ref([]);
 
-const deviceBaseList = ref([]); // 设备基本信息
-const [registerModal, { openModal, closeModal }] = useModal();
+  const deviceBaseList = ref([]); // 设备基本信息
+  const [registerModal, { openModal, closeModal }] = useModal();
 
-const { getCamera, removeCamera } = useCamera();
+  const { getCamera, removeCamera } = useCamera();
 
-const tabChange = (activeKeyVal) => {
-  activeKey.value = activeKeyVal;
-  if (activeKeyVal == 1) {
-    nextTick(() => {
-      if (MonitorDataTable.value) MonitorDataTable.value.setSelectedRowKeys([selectData.deviceID]);
-    });
-  }
-};
+  const tabChange = (activeKeyVal) => {
+    activeKey.value = activeKeyVal;
+    if (activeKeyVal == 1) {
+      nextTick(() => {
+        if (MonitorDataTable.value) MonitorDataTable.value.setSelectedRowKeys([selectData.deviceID]);
+      });
+    }
+  };
 
-const initData = {
-  deviceID: '',
-  deviceType: '',
-  strname: '',
-  frontRearDP: '-', //压差
-  // sourcePressure: '-', //气源压力
-  runRoRecondition: null,
-  autoRoManual: null,
-  netStatus: '0', //通信状态
-  frontGateOpen: '0',
-  frontGateClose: '1',
-  rearGateOpen: '0',
-  rearGateClose: '1',
-  midGateOpen: '0',
-  midGateClose: '1',
-  fault: '气源压力超限',
-  masterComputer: 0,
-  frontGateOpenCtrl: false,
-  rearGateOpenCtrl: false,
-  cameras: [],
-};
+  const initData = {
+    deviceID: '',
+    deviceType: '',
+    strname: '',
+    frontRearDP: '-', //压差
+    // sourcePressure: '-', //气源压力
+    runRoRecondition: null,
+    autoRoManual: null,
+    netStatus: '0', //通信状态
+    frontGateOpen: '0',
+    frontGateClose: '1',
+    rearGateOpen: '0',
+    rearGateClose: '1',
+    midGateOpen: '0',
+    midGateClose: '1',
+    fault: '气源压力超限',
+    masterComputer: 0,
+    frontGateOpenCtrl: false,
+    rearGateOpenCtrl: false,
+    cameras: [],
+  };
 
-// 监测数据
-const selectData = reactive(lodash.cloneDeep(initData));
-function deviceEdit(e: Event, type: string, record) {
-  e.stopPropagation();
-  openModal(true, {
-    type,
-    deviceId: record['deviceID'],
-  });
-}
-// 获取设备基本信息列表
-function getDeviceBaseList() {
-  getTableList({ pageSize: 1000 }).then((res) => {
-    deviceBaseList.value = res.records;
-  });
-}
+  // 监测数据
+  const selectData = reactive(lodash.cloneDeep(initData));
+  function deviceEdit(e: Event, type: string, record) {
+    e.stopPropagation();
+    openModal(true, {
+      type,
+      deviceId: record['deviceID'],
+    });
+  }
+  // 获取设备基本信息列表
+  function getDeviceBaseList() {
+    getTableList({ pageSize: 1000 }).then((res) => {
+      deviceBaseList.value = res.records;
+    });
+  }
 
-// https获取监测数据
-let timer: null | NodeJS.Timeout = null;
-async function getMonitor(flag?) {
-  if (Object.prototype.toString.call(timer) === '[object Null]') {
-    timer = await setTimeout(
-      async () => {
-        const res = await list({ devicetype: deviceType.value, pagetype: 'normal' });
-        if (res.msgTxt && res.msgTxt[0]) {
-          dataSource.value = res.msgTxt[0].datalist || [];
-          dataSource.value.forEach((data: any) => {
-            const readData = data.readData;
-            data = Object.assign(data, readData);
-          });
-          if (dataSource.value.length > 0 && selectRowIndex.value == -1 && MonitorDataTable.value) {
-            // 初始打开页面
-            if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) {
-              MonitorDataTable.value.setSelectedRowKeys([currentRoute.value['query']['id']]);
-            } else {
-              MonitorDataTable.value.setSelectedRowKeys([dataSource.value[0]['deviceID']]);
+  // https获取监测数据
+  let timer: null | NodeJS.Timeout = null;
+  async function getMonitor(flag?) {
+    if (Object.prototype.toString.call(timer) === '[object Null]') {
+      timer = await setTimeout(
+        async () => {
+          const res = await list({ devicetype: deviceType.value, pagetype: 'normal' });
+          if (res.msgTxt && res.msgTxt[0]) {
+            dataSource.value = res.msgTxt[0].datalist || [];
+            dataSource.value.forEach((data: any) => {
+              const readData = data.readData;
+              data = Object.assign(data, readData);
+            });
+            if (dataSource.value.length > 0 && selectRowIndex.value == -1 && MonitorDataTable.value) {
+              // 初始打开页面
+              if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) {
+                MonitorDataTable.value.setSelectedRowKeys([currentRoute.value['query']['id']]);
+              } else {
+                MonitorDataTable.value.setSelectedRowKeys([dataSource.value[0]['deviceID']]);
+              }
             }
+            Object.assign(selectData, dataSource.value[selectRowIndex.value]);
+            monitorAnimation(selectData);
+            if (timer) {
+              timer = null;
+            }
+            getMonitor();
           }
-          Object.assign(selectData, dataSource.value[selectRowIndex.value]);
-          monitorAnimation(selectData);
-          if (timer) {
-            timer = null;
-          }
-          getMonitor();
-        }
-      },
-      flag ? 0 : 1000
-    );
+        },
+        flag ? 0 : 1000
+      );
+    }
   }
-}
 
-// 切换检测数据
-async function getSelectRow(selectRow, index) {
-  if (!selectRow) return;
-  selectRowIndex.value = index;
-  const baseData: any = deviceBaseList.value.find((baseData: any) => baseData.id === selectRow.deviceID);
-  Object.assign(selectData, initData, selectRow, baseData);
-  doorDeviceState = 1; //记录设备状态,为了与下一次监测数据做比较
-  isdoorOpenRunning = true; //开关门动作是否在进行
-  await getCamera(selectRow.deviceID, playerRef.value);
-}
-
-function playAnimation(handlerState, data: any = null) {
-  const value = data;
-  switch (handlerState) {
-    case 1: // 打开前门
-      modalTitle.value = '打开';
-      modalType.value = '1';
-      modalIsShow.value = true;
-      break;
-    case 2: // 关闭前门
-      modalTitle.value = '关闭';
-      modalType.value = '2';
-      modalIsShow.value = true;
-      break;
-    case 7: // 控制模式切换
-      modalTitle.value = '控制模式切换';
-      modalType.value = '7';
-      modalIsShow.value = true;
-      break;
+  // 切换检测数据
+  async function getSelectRow(selectRow, index) {
+    if (!selectRow) return;
+    selectRowIndex.value = index;
+    const baseData: any = deviceBaseList.value.find((baseData: any) => baseData.id === selectRow.deviceID);
+    Object.assign(selectData, initData, selectRow, baseData);
+    doorDeviceState = 1; //记录设备状态,为了与下一次监测数据做比较
+    isdoorOpenRunning = true; //开关门动作是否在进行
+    await getCamera(selectRow.deviceID, playerRef.value);
   }
 
-  if (globalConfig?.simulatedPassword) {
-    handleOK('', handlerState + '');
-  }
-  contrlValue = value;
-}
+  function playAnimation(handlerState, data: any = null) {
+    const value = data;
+    switch (handlerState) {
+      case 1: // 打开前门
+        modalTitle.value = '打开';
+        modalType.value = '1';
+        modalIsShow.value = true;
+        break;
+      case 2: // 关闭前门
+        modalTitle.value = '关闭';
+        modalType.value = '2';
+        modalIsShow.value = true;
+        break;
+      case 7: // 控制模式切换
+        modalTitle.value = '控制模式切换';
+        modalType.value = '7';
+        modalIsShow.value = true;
+        break;
+    }
 
-function handleOK(passWord, handlerState) {
-  if (!passWord && !globalConfig?.simulatedPassword) {
-    message.warning('请输入密码');
-    return;
-  }
-  if (isOpenRunning) {
-    return;
-  }
-  const data = {
-    deviceid: selectData.deviceID,
-    devicetype: selectData.deviceType,
-    paramcode: '',
-    value: contrlValue,
-    password: passWord || globalConfig?.simulatedPassword,
-    masterComputer: selectData.masterComputer,
-  };
-  switch (handlerState) {
-    case '1': // 打开前门
-      if (selectData.doorOpen == '0' && selectData.doorClose == '1') {
-        data.paramcode = 'frontGateOpen_S';
-      }
-      break;
-    case '2': // 关闭前门
-      if (selectData.doorOpen == '1' && selectData.doorClose == '0') {
-        data.paramcode = 'frontGateClose_S';
-      }
-      break;
-    case '7': // 远程与就地
-      data.paramcode = 'autoRoManualControl';
-      data.value = selectData.contrlMod != 'loopCtrl' ? contrlValue : '';
-      selectData.autoRoManual = null;
+    if (globalConfig?.simulatedPassword) {
+      handleOK('', handlerState + '');
+    }
+    contrlValue = value;
   }
 
-  if (data.paramcode) {
-    deviceControlApi(data).then((res) => {
-      // 模拟时开启
-      if (res.success) {
-        modalIsShow.value = false;
-        if (globalConfig.History_Type == 'remote') {
-          message.success('指令已下发至生产管控平台成功!');
+  function handleOK(passWord, handlerState) {
+    if (!passWord && !globalConfig?.simulatedPassword) {
+      message.warning('请输入密码');
+      return;
+    }
+    if (isOpenRunning) {
+      return;
+    }
+    const data = {
+      deviceid: selectData.deviceID,
+      devicetype: selectData.deviceType,
+      paramcode: '',
+      value: contrlValue,
+      password: passWord || globalConfig?.simulatedPassword,
+      masterComputer: selectData.masterComputer,
+    };
+    switch (handlerState) {
+      case '1': // 打开前门
+        if (selectData.doorOpen == '0' && selectData.doorClose == '1') {
+          data.paramcode = 'frontGateOpen_S';
+        }
+        break;
+      case '2': // 关闭前门
+        if (selectData.doorOpen == '1' && selectData.doorClose == '0') {
+          data.paramcode = 'frontGateClose_S';
+        }
+        break;
+      case '7': // 远程与就地
+        data.paramcode = 'autoRoManualControl';
+        data.value = selectData.contrlMod != 'loopCtrl' ? contrlValue : '';
+        selectData.autoRoManual = null;
+    }
+
+    if (data.paramcode) {
+      deviceControlApi(data).then((res) => {
+        // 模拟时开启
+        if (res.success) {
+          modalIsShow.value = false;
+          if (globalConfig.History_Type == 'remote') {
+            message.success('指令已下发至生产管控平台成功!');
+          } else {
+            message.success('指令已下发成功!');
+          }
         } else {
-          message.success('指令已下发成功!');
+          message.error(res.message);
         }
-      } else {
-        message.error(res.message);
-      }
-    });
-  }
-}
-let isOpenRunning = false; //开关门动作是否在进行
-/** 开关门动画调用 */
-let isdoorOpenRunning = false; //开关门动作是否在进行
-// let isMidCloseRunning = false; //中间门动作是否在进行
-// 0 关闭 1 正在打开 2 打开 3正在关闭
-let doorDeviceState = 1; //记录设备状态,为了与下一次监测数据做比较
-function monitorAnimation(selectData) {
-  const timeScale = 0.005;
-  // 打开
-  if (selectData.frontGateOpen == '1' && !isdoorOpenRunning) {
-    isdoorOpenRunning = true;
-    if (doorDeviceState != 1) {
-      doorDeviceState = 1;
-      doorIsOpen.value = true;
+      });
     }
   }
-  // 关闭
-  if (selectData.frontGateOpen == '0' && isdoorOpenRunning) {
-    isdoorOpenRunning = false;
-    if (doorDeviceState != 0) {
-      doorDeviceState = 0;
-      doorIsOpen.value = false;
+  let isOpenRunning = false; //开关门动作是否在进行
+  /** 开关门动画调用 */
+  let isdoorOpenRunning = false; //开关门动作是否在进行
+  // let isMidCloseRunning = false; //中间门动作是否在进行
+  // 0 关闭 1 正在打开 2 打开 3正在关闭
+  let doorDeviceState = 1; //记录设备状态,为了与下一次监测数据做比较
+  function monitorAnimation(selectData) {
+    const timeScale = 0.005;
+    // 打开
+    if (selectData.frontGateOpen == '1' && !isdoorOpenRunning) {
+      isdoorOpenRunning = true;
+      if (doorDeviceState != 1) {
+        doorDeviceState = 1;
+        doorIsOpen.value = true;
+      }
+    }
+    // 关闭
+    if (selectData.frontGateOpen == '0' && isdoorOpenRunning) {
+      isdoorOpenRunning = false;
+      if (doorDeviceState != 0) {
+        doorDeviceState = 0;
+        doorIsOpen.value = false;
+      }
     }
   }
-}
 
-function handleCancel() {
-  modalIsShow.value = false;
-  modalTitle.value = '';
-  modalType.value = '';
-  selectData.autoRoManual = null;
-}
+  function handleCancel() {
+    modalIsShow.value = false;
+    modalTitle.value = '';
+    modalType.value = '';
+    selectData.autoRoManual = null;
+  }
 
-onMounted(async () => {
-  const { query } = unref(currentRoute);
-  if (query['deviceType']) deviceType.value = query['deviceType'] as string;
-  modelList.value = await getDictItems('fireDoorModel');
-});
+  onMounted(async () => {
+    const { query } = unref(currentRoute);
+    if (query['deviceType']) deviceType.value = query['deviceType'] as string;
+    modelList.value = await getDictItems('fireDoorModel');
+  });
 
-onBeforeUnmount(() => {
-  getDeviceBaseList();
-});
+  onBeforeUnmount(() => {
+    getDeviceBaseList();
+  });
 
-onUnmounted(() => {
-  removeCamera();
-  if (timer) {
-    clearTimeout(timer);
-    timer = undefined;
-  }
-});
+  onUnmounted(() => {
+    removeCamera();
+    if (timer) {
+      clearTimeout(timer);
+      timer = undefined;
+    }
+  });
 </script>
 ,
 <style lang="less" scoped>
-@import '/@/design/vent/modal.less';
-.scene-box {
-  .bottom-tabs-box {
-    height: 300px;
+  @import '/@/design/vent/modal.less';
+  .scene-box {
+    .bottom-tabs-box {
+      height: 300px;
+    }
   }
-}
-.button-box {
-  border: none !important;
-  height: 34px !important;
+  .button-box {
+    border: none !important;
+    height: 34px !important;
 
-  &:hover {
-    background: linear-gradient(#2cd1ff55, #1eb0ff55) !important;
-  }
+    &:hover {
+      background: linear-gradient(#2cd1ff55, #1eb0ff55) !important;
+    }
 
-  &::before {
-    height: 27px !important;
-    background: linear-gradient(#1fa6cb, #127cb5) !important;
-  }
+    &::before {
+      height: 27px !important;
+      background: linear-gradient(#1fa6cb, #127cb5) !important;
+    }
 
-  &::after {
-    top: 35px !important;
+    &::after {
+      top: 35px !important;
+    }
   }
-}
 
-:deep(.@{ventSpace}-tabs-tabpane-active) {
-  height: 100%;
-}
+  :deep(.@{ventSpace}-tabs-tabpane-active) {
+    height: 100%;
+  }
 
-::-webkit-scrollbar-thumb {
-  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
-  background: #4288a444;
-}
-:deep(.zxm-radio-disabled + span) {
-  color: #fff !important;
-}
-:deep(.zxm-radio-disabled .zxm-radio-inner::after) {
-  background-color: #127cb5 !important;
-}
+  ::-webkit-scrollbar-thumb {
+    -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
+    background: #4288a444;
+  }
+  :deep(.zxm-radio-disabled + span) {
+    color: #fff !important;
+  }
+  :deep(.zxm-radio-disabled .zxm-radio-inner::after) {
+    background-color: #127cb5 !important;
+  }
 </style>

+ 282 - 138
src/views/vent/monitorManager/safetyMonitor/HistoryTable.vue

@@ -238,165 +238,309 @@
   }
 
   // 列表页面公共参数、方法
-  const { tableContext, onExportXls } = useListPage({
-    tableProps: {
-      // api: list,
-      columns: props.columnsType ? columns : (props.columns as any[]),
-      canResize: true,
-      showTableSetting: false,
-      showActionColumn: false,
-      bordered: false,
-      size: 'small',
-      scroll: tableScroll,
-      showIndexColumn: true,
-      tableLayout: 'auto',
-      formConfig: {
-        labelAlign: 'left',
-        showAdvancedButton: false,
-        showSubmitButton: false,
-        showResetButton: false,
-        baseColProps: {
-          xs: 24,
-          sm: 24,
-          md: 24,
-          lg: 9,
-          xl: 7,
-          xxl: 4,
-        },
-        schemas: [
-          {
-            field: 'ttime_begin',
-            label: '开始时间',
-            component: 'DatePicker',
-            defaultValue: dayjs().startOf('date'),
-            required: true,
-            componentProps: {
-              showTime: true,
-              valueFormat: 'YYYY-MM-DD HH:mm:ss',
-              getPopupContainer: getAutoScrollContainer,
-            },
-            colProps: {
-              span: 4,
-            },
-          },
-          {
-            field: 'ttime_end',
-            label: '结束时间',
-            component: 'DatePicker',
-            defaultValue: dayjs(),
-            required: true,
-            componentProps: {
-              showTime: true,
-              valueFormat: 'YYYY-MM-DD HH:mm:ss',
-              getPopupContainer: getAutoScrollContainer,
-            },
-            colProps: {
-              span: 4,
-            },
-          },
-          {
-            label: '设备类型',
-            field: 'dataTypeName',
-            component: 'ApiSelect',
-            componentProps: {
-              api: safetyDeviceList.bind(null, { devicetype: 'safetymonitor', code: 'dataTypeName' }),
-              labelField: 'name',
-              valueField: 'code',
-              onChange: async (e, option) => {
-                console.log('1111', e, option);
-                dataTypeName.value = e;
-                await getDeviceList();
+  const { tableContext, onExportXls } = useListPage(
+    props.columnsType == 'safetymonitor'
+      ? {
+          tableProps: {
+            // api: list,
+            columns: props.columnsType ? columns : (props.columns as any[]),
+            canResize: true,
+            showTableSetting: false,
+            showActionColumn: false,
+            bordered: false,
+            size: 'small',
+            scroll: tableScroll,
+            showIndexColumn: true,
+            tableLayout: 'auto',
+            formConfig: {
+              labelAlign: 'left',
+              showAdvancedButton: false,
+              showSubmitButton: false,
+              showResetButton: false,
+              baseColProps: {
+                xs: 24,
+                sm: 24,
+                md: 24,
+                lg: 9,
+                xl: 7,
+                xxl: 4,
               },
-            },
-            colProps: {
-              span: 4,
-            },
-          },
-          {
-            label: '查询设备',
-            field: 'gdeviceid',
-            component: 'Select',
-            defaultValue: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '',
-            required: true,
-            componentProps: {
-              showSearch: true,
-              filterOption: (input: string, option: any) => {
-                return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
-              },
-              options: deviceOptions,
-              onChange: (e, option) => {
-                if (option && (option['strinstallpos'] || option['strtype'] || option['devicekind']))
-                  historyType.value = option['strtype'] || option['devicekind'];
-                if (option['strtype']) deviceTypeStr.value = option['strtype'];
-                stationType.value = option['stationtype'];
-                nextTick(async () => {
-                  await getDataSource();
-                });
-              },
-            },
-            colProps: {
-              span: 4,
-            },
-          },
-          {
-            label: '间隔时间',
-            field: 'skip',
-            component: 'Select',
-            defaultValue: '8',
-            componentProps: {
-              options: [
+              schemas: [
                 {
-                  label: '1秒',
-                  value: '1',
+                  field: 'ttime_begin',
+                  label: '开始时间',
+                  component: 'DatePicker',
+                  defaultValue: dayjs().startOf('date'),
+                  required: true,
+                  componentProps: {
+                    showTime: true,
+                    valueFormat: 'YYYY-MM-DD HH:mm:ss',
+                    getPopupContainer: getAutoScrollContainer,
+                  },
+                  colProps: {
+                    span: 4,
+                  },
                 },
                 {
-                  label: '5秒',
-                  value: '2',
+                  field: 'ttime_end',
+                  label: '结束时间',
+                  component: 'DatePicker',
+                  defaultValue: dayjs(),
+                  required: true,
+                  componentProps: {
+                    showTime: true,
+                    valueFormat: 'YYYY-MM-DD HH:mm:ss',
+                    getPopupContainer: getAutoScrollContainer,
+                  },
+                  colProps: {
+                    span: 4,
+                  },
                 },
                 {
-                  label: '10秒',
-                  value: '3',
+                  label: '设备类型',
+                  field: 'dataTypeName',
+                  component: 'ApiSelect',
+                  componentProps: {
+                    api: safetyDeviceList.bind(null, { devicetype: 'safetymonitor', code: 'dataTypeName' }),
+                    labelField: 'name',
+                    valueField: 'code',
+                    onChange: async (e, option) => {
+                      console.log('1111', e, option);
+                      dataTypeName.value = e;
+                      await getDeviceList();
+                    },
+                  },
+                  colProps: {
+                    span: 4,
+                  },
                 },
                 {
-                  label: '30秒',
-                  value: '4',
+                  label: '查询设备',
+                  field: 'gdeviceid',
+                  component: 'Select',
+                  defaultValue: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '',
+                  required: true,
+                  componentProps: {
+                    showSearch: true,
+                    filterOption: (input: string, option: any) => {
+                      return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
+                    },
+                    options: deviceOptions,
+                    onChange: (e, option) => {
+                      if (option && (option['strinstallpos'] || option['strtype'] || option['devicekind']))
+                        historyType.value = option['strtype'] || option['devicekind'];
+                      if (option['strtype']) deviceTypeStr.value = option['strtype'];
+                      stationType.value = option['stationtype'];
+                      nextTick(async () => {
+                        await getDataSource();
+                      });
+                    },
+                  },
+                  colProps: {
+                    span: 4,
+                  },
                 },
                 {
-                  label: '1分钟',
-                  value: '5',
+                  label: '间隔时间',
+                  field: 'skip',
+                  component: 'Select',
+                  defaultValue: '8',
+                  componentProps: {
+                    options: [
+                      {
+                        label: '1秒',
+                        value: '1',
+                      },
+                      {
+                        label: '5秒',
+                        value: '2',
+                      },
+                      {
+                        label: '10秒',
+                        value: '3',
+                      },
+                      {
+                        label: '30秒',
+                        value: '4',
+                      },
+                      {
+                        label: '1分钟',
+                        value: '5',
+                      },
+                      {
+                        label: '10分钟',
+                        value: '6',
+                      },
+                      {
+                        label: '30分钟',
+                        value: '7',
+                      },
+                      {
+                        label: '1小时',
+                        value: '8',
+                      },
+                    ],
+                  },
+                  colProps: {
+                    span: 4,
+                  },
+                },
+              ],
+            },
+            pagination: {
+              current: 1,
+              pageSize: 10,
+              pageSizeOptions: ['10', '30', '50', '100'],
+              showQuickJumper: false,
+            },
+          },
+          exportConfig: {
+            name: '历史列表',
+            url: getExportXlsUrl(),
+          },
+        }
+      : {
+          tableProps: {
+            // api: list,
+            columns: props.columnsType ? columns : (props.columns as any[]),
+            canResize: true,
+            showTableSetting: false,
+            showActionColumn: false,
+            bordered: false,
+            size: 'small',
+            scroll: tableScroll,
+            showIndexColumn: true,
+            tableLayout: 'auto',
+            formConfig: {
+              labelAlign: 'left',
+              showAdvancedButton: false,
+              showSubmitButton: false,
+              showResetButton: false,
+              baseColProps: {
+                xs: 24,
+                sm: 24,
+                md: 24,
+                lg: 9,
+                xl: 7,
+                xxl: 4,
+              },
+              schemas: [
+                {
+                  field: 'ttime_begin',
+                  label: '开始时间',
+                  component: 'DatePicker',
+                  defaultValue: dayjs().startOf('date'),
+                  required: true,
+                  componentProps: {
+                    showTime: true,
+                    valueFormat: 'YYYY-MM-DD HH:mm:ss',
+                    getPopupContainer: getAutoScrollContainer,
+                  },
+                  colProps: {
+                    span: 4,
+                  },
                 },
                 {
-                  label: '10分钟',
-                  value: '6',
+                  field: 'ttime_end',
+                  label: '结束时间',
+                  component: 'DatePicker',
+                  defaultValue: dayjs(),
+                  required: true,
+                  componentProps: {
+                    showTime: true,
+                    valueFormat: 'YYYY-MM-DD HH:mm:ss',
+                    getPopupContainer: getAutoScrollContainer,
+                  },
+                  colProps: {
+                    span: 4,
+                  },
                 },
                 {
-                  label: '30分钟',
-                  value: '7',
+                  label: '查询设备',
+                  field: 'gdeviceid',
+                  component: 'Select',
+                  defaultValue: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '',
+                  required: true,
+                  componentProps: {
+                    showSearch: true,
+                    filterOption: (input: string, option: any) => {
+                      return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
+                    },
+                    options: deviceOptions,
+                    onChange: (e, option) => {
+                      if (option && (option['strinstallpos'] || option['strtype'] || option['devicekind']))
+                        historyType.value = option['strtype'] || option['devicekind'];
+                      if (option['strtype']) deviceTypeStr.value = option['strtype'];
+                      stationType.value = option['stationtype'];
+                      nextTick(async () => {
+                        await getDataSource();
+                      });
+                    },
+                  },
+                  colProps: {
+                    span: 4,
+                  },
                 },
                 {
-                  label: '1小时',
-                  value: '8',
+                  label: '间隔时间',
+                  field: 'skip',
+                  component: 'Select',
+                  defaultValue: '8',
+                  componentProps: {
+                    options: [
+                      {
+                        label: '1秒',
+                        value: '1',
+                      },
+                      {
+                        label: '5秒',
+                        value: '2',
+                      },
+                      {
+                        label: '10秒',
+                        value: '3',
+                      },
+                      {
+                        label: '30秒',
+                        value: '4',
+                      },
+                      {
+                        label: '1分钟',
+                        value: '5',
+                      },
+                      {
+                        label: '10分钟',
+                        value: '6',
+                      },
+                      {
+                        label: '30分钟',
+                        value: '7',
+                      },
+                      {
+                        label: '1小时',
+                        value: '8',
+                      },
+                    ],
+                  },
+                  colProps: {
+                    span: 4,
+                  },
                 },
               ],
             },
-            colProps: {
-              span: 4,
+            pagination: {
+              current: 1,
+              pageSize: 10,
+              pageSizeOptions: ['10', '30', '50', '100'],
+              showQuickJumper: false,
             },
           },
-        ],
-      },
-      pagination: {
-        current: 1,
-        pageSize: 10,
-        pageSizeOptions: ['10', '30', '50', '100'],
-        showQuickJumper: false,
-      },
-    },
-    exportConfig: {
-      name: '历史列表',
-      url: getExportXlsUrl(),
-    },
-  });
+          exportConfig: {
+            name: '历史列表',
+            url: getExportXlsUrl(),
+          },
+        }
+  );
 
   //注册table数据
   const [registerTable, { reload, setLoading, getForm, setColumns, getPaginationRef, setPagination }] = tableContext;

+ 2 - 3
src/views/vent/monitorManager/safetyMonitor/index.vue

@@ -13,7 +13,7 @@
               :dataSource="dataSource"
               design-scope="device_monitor"
               :isShowPagination="false"
-              :isShowActionColumn="isHaveNoAction.includes(deviceType.split('_')[0]) ? false : true"
+              :isShowActionColumn="false"
               :is-show-select="false"
               :form-config="deviceType == 'safetymonitor' && sysOrgCode != 'zjtzqctmk' ? formConfig : undefined"
               title="设备监测"
@@ -49,10 +49,9 @@
               :dataSource="dataSource"
               design-scope="device_monitor"
               :isShowPagination="false"
-              :isShowActionColumn="isHaveNoAction.includes(deviceType.split('_')[0]) ? false : true"
+              :isShowActionColumn="false"
               :is-show-select="false"
               title="设备监测"
-              :form-config="deviceType == 'safetymonitor' && sysOrgCode != 'zjtzqctmk' ? formConfig : undefined"
               :scroll="{ y: 650 }"
               :defSort="defSort"
               sortDataIndex="strinstallpos"

+ 1 - 1
src/views/vent/monitorManager/safetyMonitor/safety.data.ts

@@ -223,4 +223,4 @@ export const chartsColumnsreal = [
     dataIndex: 'sourcePressure',
   },
 ];
-export const isHaveNoAction = ['safetymonitor', 'wasichoufang', 'atomizing'];
+export const isHaveNoAction = ['safetymonitor', 'wasichoufang', 'atomizing', ''];

+ 18 - 19
src/views/vent/monitorManager/windowMonitor/dandaoFcBd1.threejs.ts

@@ -48,7 +48,6 @@ class ddFc_4 {
     this.group?.scale.set(22, 22, 22);
     this.group?.position.set(-35, 25, 15);
   }
-
   addMonitorText(selectData) {
     if (!this.group) {
       return;
@@ -70,7 +69,7 @@ class ddFc_4 {
         y: 95,
       },
       {
-        text: `${selectData.OpenDegree ? '开度值(°)' : selectData.forntArea ? '过风面积(㎡)' : '过风面积(㎡)'}:`,
+        text: `最大面积(㎡):`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -78,11 +77,7 @@ class ddFc_4 {
         y: 145,
       },
       {
-        text: selectData.OpenDegree
-          ? Number(`${selectData.OpenDegree}`).toFixed(2)
-          : selectData.forntArea
-          ? Number(`${selectData.forntArea}`).toFixed(2)
-          : '-',
+        text: selectData.maxarea ? Number(`${selectData.maxarea}`).toFixed(2) : '-',
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -90,7 +85,7 @@ class ddFc_4 {
         y: 145,
       },
       {
-        text: `${selectData.frontRearDP ? '风窗压差(Pa)' : selectData.windSpeed ? '风速(m/s)' : '通信状态:'}:`,
+        text: `${selectData.OpenDegree ? '开度值(°)' : selectData.forntArea ? '过风面积(㎡)' : '过风面积(㎡)'}:`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -98,15 +93,11 @@ class ddFc_4 {
         y: 200,
       },
       {
-        text: `${
-          selectData.frontRearDP
-            ? selectData.frontRearDP
-            : selectData.windSpeed
-            ? selectData.windSpeed
-            : selectData.netStatus == '0'
-            ? '断开'
-            : '连接'
-        }`,
+        text: selectData.OpenDegree
+          ? Number(`${selectData.OpenDegree}`).toFixed(2)
+          : selectData.forntArea
+          ? Number(`${selectData.forntArea}`).toFixed(2)
+          : '-',
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -114,7 +105,7 @@ class ddFc_4 {
         y: 200,
       },
       {
-        text: `${selectData.fWindowM3 ? '过风量(m³/min)' : '风窗道数'}: `,
+        text: `${selectData.frontRearDP ? '风窗压差(Pa)' : selectData.windSpeed ? '风速(m/s)' : '通信状态:'}:`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -122,7 +113,15 @@ class ddFc_4 {
         y: 250,
       },
       {
-        text: `${selectData.fWindowM3 ? selectData.fWindowM3 : selectData.nwindownum}`,
+        text: `${
+          selectData.frontRearDP
+            ? selectData.frontRearDP
+            : selectData.windSpeed
+            ? selectData.windSpeed
+            : selectData.netStatus == '0'
+            ? '断开'
+            : '连接'
+        }`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',