Browse Source

1. 预警看板调整

hongrunxia 6 months ago
parent
commit
f1bad425f0

+ 1 - 1
src/layouts/default/header/components/VoiceBroadcast.vue

@@ -24,7 +24,7 @@
           <div class="context-tab-item" :class="{ 'context-tab-item-active': activeKey == 2 }" @click="toSelectList(2)"> 已解决</div>
         </div>
         <div class="context-box">
-          <div v-if="broadcastList.length == 0" class="no-context">暂无内容</div>
+          <div v-if="(broadcastList && broadcastList.length == 0) || !broadcastList" class="no-context">暂无内容</div>
           <div
             class="context-detail"
             v-else

+ 4 - 2
src/layouts/default/header/index.vue

@@ -48,6 +48,8 @@
       <div class="right-position">
         <UserDropDown v-if="showUserDropdown" :theme="getHeaderTheme" />
       </div>
+      <VoiceBroadcast />
+      <LoginSelect ref="loginSelectRef" @success="loginSelectOk" />
     </div>
   </Header>
   <div
@@ -57,10 +59,10 @@
   >
     <div class="right-position">
       <UserDropDown v-if="showUserDropdown" :theme="getHeaderTheme" />
+      <VoiceBroadcast />
+      <LoginSelect ref="loginSelectRef" @success="loginSelectOk" />
     </div>
   </div>
-  <VoiceBroadcast />
-  <LoginSelect ref="loginSelectRef" @success="loginSelectOk" />
 </template>
 <script lang="ts">
   import { defineComponent, unref, computed, ref, onMounted, toRaw } from 'vue';

+ 10 - 5
src/views/vent/home/billboard/index.vue

@@ -97,7 +97,7 @@
             BaseCard,
             {
               title: el.orgname || '/',
-              onOpen: () => openHandler(el.ip),
+              onOpen: () => openHandler(el.ip, el.orgcode),
             },
             {
               default: () =>
@@ -136,13 +136,18 @@
     VentilationStatus: '/micro-vent-3dModal/dashboard/analysis',
     GasStatus: '/gas/warn/home',
     FireStatus: '/fire/warn/home',
-    Summary: '/monitorChannel/monitor-alarm-home',
+    Summary: '/monitorChannel/device-monitor/warningHistory',
   };
   // 页面跳转
-  function openHandler(ip: string) {
+  function openHandler(ip: string, orgcode) {
     // const url = `http://localhost:3100/login`;
-    const url = `http://${ip}:8092${routePathMap[props.billboardType]}`;
-    open(url);
+    if (props.billboardType == 'Summary') {
+      const newPage = router.resolve({ path: '/monitorChannel/device-monitor/warningHistory', query: { orgcode } });
+      window.open(newPage.href, '_blank');
+    } else {
+      const url = `http://${ip}:8092${routePathMap[props.billboardType]}`;
+      open(url);
+    }
   }
 
   // 返回首页

+ 8 - 2
src/views/vent/home/colliery/components/fan-monitor.vue

@@ -39,11 +39,13 @@
   import { SvgIcon } from '/@/components/Icon';
   import * as echarts from 'echarts';
   import { useGo } from '/@/hooks/web/usePage';
+  import { useGlobSetting } from '/@/hooks/setting';
   let props = defineProps({
     fandata: Array,
   });
   const emit = defineEmits(['goDetail']);
   const go = useGo();
+  const { sysOrgCode } = useGlobSetting();
   let searchValue = ref('');
   let fanList = reactive<any[]>([]);
   let fanTypeList = reactive<any[]>([]); //下拉列表
@@ -67,9 +69,13 @@
     if (selectData) {
       fjStatus.value =
         selectData.readData.Fan1StartStatus && selectData.readData.Fan1StartStatus == '1'
-          ? '主机'
+          ? sysOrgCode !== 'ymdnymdn'
+            ? '主机'
+            : '1#风机'
           : selectData.readData.Fan2StartStatus && selectData.readData.Fan2StartStatus == '1'
-          ? '备机'
+          ? sysOrgCode !== 'ymdnymdn'
+            ? '备机'
+            : '2#风机'
           : selectData.readData.Fan1StartStatus &&
             selectData.readData.Fan1StartStatus == '0' &&
             selectData.readData.Fan2StartStatus &&

+ 1 - 1
src/views/vent/monitorManager/comment/DeviceEcharts.vue

@@ -208,7 +208,7 @@
         grid: {
           top: '60px',
           left: '10px',
-          right: '5px',
+          right: '20px',
           bottom: '5%',
           containLabel: true,
         },

+ 16 - 7
src/views/vent/monitorManager/deviceMonitor/components/device/index.vue

@@ -511,6 +511,7 @@ async function getDeviceType(sysType?) {
   if (treeData.value?.length > 0) return;
   const result = await getDeviceTypeList({});
   if (result.length > 0) {
+    debugger;
     const dataSource = <TreeProps['treeData']>[];
     let key = '0';
     const getData = (resultList, dataSourceList, keyVal) => {
@@ -869,7 +870,9 @@ async function findTreeDataValue(obj) {
       if (item.children.length > 0) {
         findDeviceType(item.children, obj);
       }
+      debugger
       if (obj.deviceType && obj.deviceType.startsWith('sys_')) {
+        debugger;
         if (item.type == obj.deviceid) {
           deviceType.value = 'sys';
           systemID.value = obj.deviceid;
@@ -983,6 +986,12 @@ watch(
     }
     nextTick(() => {
       isRefresh.value = true;
+      debugger;
+      // if (pageObj && pageObj.pageType && pageObj.pageType.startsWith('sys_')) {
+      //   findTreeDataValue({ deviceid: systemID.value });
+      // } else {
+      //   findTreeDataValue({ deviceType: pageObj.pageType });
+      // }
       findTreeDataValue(pageObj);
     });
   },
@@ -992,17 +1001,17 @@ watch(
 onMounted(async () => {
   const pageObj = props.pageData;
   if (!pageObj) return;
-  if (pageObj.deviceid) {
-    await getDeviceType();
-    findTreeDataValue({ deviceid: pageObj.deviceid });
-  } else {
-    if (pageObj && pageObj.pageType && pageObj.pageType.startsWith('sys_')) {
+  if (pageObj && pageObj.pageType ) {
+    if(pageObj.pageType.startsWith('sys_')){
       await getDeviceType(pageObj.pageType);
-      findTreeDataValue({ deviceid: systemID.value });
-    } else {
+      findTreeDataValue({ deviceType: pageObj.pageType, deviceid: pageObj.deviceid });
+    }else{
       await getDeviceType();
       findTreeDataValue({ deviceType: pageObj.pageType });
     }
+  }else{
+    await getDeviceType();
+    findTreeDataValue({ deviceid: pageObj.deviceid });
   }
   // 定位
   const posShowData = pageObj.locationPlane;

+ 2 - 2
src/views/vent/monitorManager/deviceMonitor/index.vue

@@ -65,7 +65,7 @@
   );
 
   onMounted(() => {
-    const { type, deviceType, topage } = route.query;
+    const { type, deviceType, topage, deviceid } = route.query;
     deviceKind.value = deviceType as string;
     if (!topage) {
       isShow.value = true;
@@ -74,7 +74,7 @@
       } else if (type === 'tunMonitor') {
         routerParam.value = 'tunMonitor';
         if (deviceType) {
-          pageData.value = { pageType: deviceType };
+          pageData.value = { pageType: deviceType, deviceid };
         }
       } else {
         routerParam.value = 'home';

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

@@ -297,7 +297,7 @@
                   </div>
                 </div>
                 <template v-if="deviceType">
-                  <div v-for="(state, index) in leftColumns" :key="index">
+                  <div v-for="(state, index) in rightColumns" :key="index">
                     <template v-if="state.dataIndex.endsWith('_w')">
                       <div class="warning-item">
                         <div class="item-name"> <div class="icon"></div> {{ state.title }} </div>

+ 317 - 314
src/views/vent/monitorManager/warningMonitor/index.vue

@@ -26,359 +26,362 @@
 </template>
 
 <script lang="ts" name="system-user" setup>
-//ts语法
-import { watch, ref, defineExpose, inject, onMounted, reactive } from 'vue';
-import { BasicTable } from '/@/components/Table';
-import { useListPage } from '/@/hooks/system/useListPage';
-import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
-import { defHttp } from '/@/utils/http/axios';
-import dayjs from 'dayjs';
-import { getAutoScrollContainer } from '/@/utils/common/compUtils';
-import { list ,getEachMineWarnCountInfo} from './warning.api';
-import { useGlobSetting } from '/@/hooks/setting';
+  //ts语法
+  import { watch, ref, defineExpose, inject, onMounted, reactive } from 'vue';
+  import { BasicTable } from '/@/components/Table';
+  import { useListPage } from '/@/hooks/system/useListPage';
+  import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
+  import { defHttp } from '/@/utils/http/axios';
+  import dayjs from 'dayjs';
+  import { getAutoScrollContainer } from '/@/utils/common/compUtils';
+  import { list, getEachMineWarnCountInfo } from './warning.api';
+  import { useGlobSetting } from '/@/hooks/setting';
+  import { useRoute } from 'vue-router';
 
-const props = defineProps({
-  deviceListApi: {
-    type: Function,
-  },
-  designScope: {
-    type: String,
-  },
-  sysId: {
-    type: String,
-  },
-  list: {
-    type: Function,
-    default: (params) => defHttp.post({ url: '/ventanaly-company/company/index/getEachMineWarnLogList', params }),
-  },
-});
-
-let statisticsList = reactive<any[]>([
-  { title: '通风', valueT: 0, valueB: '' },
-  { title: '粉尘', valueT: 0, valueB: '' },
-  { title: '瓦斯', valueT: 0, valueB: '' },
-  { title: '火灾', valueT: 0, valueB: '' },
-  { title: '安全监测', valueT: 0, valueB: '' },
-])
-const alarmHistory = ref();
-const columns = getTableHeaderColumns('alarm_history');
+  const props = defineProps({
+    deviceListApi: {
+      type: Function,
+    },
+    designScope: {
+      type: String,
+    },
+    sysId: {
+      type: String,
+    },
+    list: {
+      type: Function,
+      default: (params) => defHttp.post({ url: '/ventanaly-company/company/index/getEachMineWarnLogList', params }),
+    },
+  });
+  const route = useRoute();
+  let orgcode = '';
+  let statisticsList = reactive<any[]>([
+    { title: '通风', valueT: 0, valueB: '' },
+    { title: '粉尘', valueT: 0, valueB: '' },
+    { title: '瓦斯', valueT: 0, valueB: '' },
+    { title: '火灾', valueT: 0, valueB: '' },
+    { title: '安全监测', valueT: 0, valueB: '' },
+  ]);
+  const alarmHistory = ref();
+  const columns = getTableHeaderColumns('alarm_history');
 
-// 列表页面公共参数、方法
-const { tableContext, onExportXls } = useListPage({
-  tableProps: {
-    api: list,
-    columns: columns,
-    canResize: true,
-    showTableSetting: false,
-    showActionColumn: false,
-    bordered: false,
-    size: 'small',
-    formConfig: {
-      labelAlign: 'left',
-      showAdvancedButton: false,
-      // autoAdvancedCol: 2,
-      schemas: [
-        {
-          label: '是否解决',
-          // field: 'isok',
-          field: 'isOk',
-          component: 'Select',
-          componentProps: {
-            options: [
-              {
-                label: '未解决',
-                value: '0',
-              },
-              {
-                label: '已解决',
-                value: '1',
-              },
-            ],
+  // 列表页面公共参数、方法
+  const { tableContext, onExportXls } = useListPage({
+    tableProps: {
+      api: list,
+      columns: columns,
+      canResize: true,
+      showTableSetting: false,
+      showActionColumn: false,
+      bordered: false,
+      size: 'small',
+      formConfig: {
+        labelAlign: 'left',
+        showAdvancedButton: false,
+        // autoAdvancedCol: 2,
+        schemas: [
+          {
+            label: '是否解决',
+            // field: 'isok',
+            field: 'isOk',
+            component: 'Select',
+            componentProps: {
+              options: [
+                {
+                  label: '未解决',
+                  value: '0',
+                },
+                {
+                  label: '已解决',
+                  value: '1',
+                },
+              ],
+            },
+            colProps: { span: 4 },
           },
-          colProps: { span: 4 },
-        },
-        {
-          label: '所属系统',
-          // field: 'kindtype',systemType
-          field: 'systemType',
-          component: 'Select',
-          componentProps: {
-            options: [
-              {
-                label: '通风',
-                value: 'ventS',
-              },
-              {
-                label: '防灭火',
-                value: 'fireS',
-              },
-              {
-                label: '防尘',
-                value: 'dustS',
-              },
-              {
-                label: '瓦斯',
-                value: 'gasS',
-              },
-            ],
+          {
+            label: '所属系统',
+            // field: 'kindtype',systemType
+            field: 'systemType',
+            component: 'Select',
+            componentProps: {
+              options: [
+                {
+                  label: '通风',
+                  value: 'ventS',
+                },
+                {
+                  label: '防灭火',
+                  value: 'fireS',
+                },
+                {
+                  label: '防尘',
+                  value: 'dustS',
+                },
+                {
+                  label: '瓦斯',
+                  value: 'gasS',
+                },
+              ],
+            },
+            colProps: { span: 4 },
           },
-          colProps: { span: 4 },
-        },
 
-        {
-          field: 'starttime',
-          label: '开始时间',
-          component: 'DatePicker',
-          defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
-          required: true,
-          componentProps: {
-            showTime: true,
-            valueFormat: 'YYYY-MM-DD HH:mm:ss',
-            getPopupContainer: getAutoScrollContainer,
-          },
-          colProps: {
-            span: 4,
+          {
+            field: 'starttime',
+            label: '开始时间',
+            component: 'DatePicker',
+            defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
+            required: true,
+            componentProps: {
+              showTime: true,
+              valueFormat: 'YYYY-MM-DD HH:mm:ss',
+              getPopupContainer: getAutoScrollContainer,
+            },
+            colProps: {
+              span: 4,
+            },
           },
-        },
-        {
-          field: 'endtime',
-          label: '结束时间',
-          component: 'DatePicker',
-          defaultValue: dayjs(),
-          required: true,
-          componentProps: {
-            showTime: true,
-            valueFormat: 'YYYY-MM-DD HH:mm:ss',
-            getPopupContainer: getAutoScrollContainer,
+          {
+            field: 'endtime',
+            label: '结束时间',
+            component: 'DatePicker',
+            defaultValue: dayjs(),
+            required: true,
+            componentProps: {
+              showTime: true,
+              valueFormat: 'YYYY-MM-DD HH:mm:ss',
+              getPopupContainer: getAutoScrollContainer,
+            },
+            colProps: {
+              span: 4,
+            },
           },
-          colProps: {
-            span: 4,
-          },
-        },
-      ],
-    },
-    fetchSetting: {
-      listField: 'records',
-    },
-    pagination: {
-      current: 1,
-      pageSize: 10,
-      pageSizeOptions: ['10', '30', '50', '100'],
+        ],
+      },
+      fetchSetting: {
+        listField: 'records',
+      },
+      pagination: {
+        current: 1,
+        pageSize: 10,
+        pageSizeOptions: ['10', '30', '50', '100'],
+      },
+      beforeFetch(params) {
+        const { sysOrgCode } = useGlobSetting();
+        params.orgcode = sysOrgCode;
+        params.type = 'alarmLog';
+        // params.devicetype = params.devicetype ? params.devicetype + '*' : '';
+        if (props.sysId) {
+          params.sysId = props.sysId;
+        }
+      },
     },
-    beforeFetch(params) {
-      const { sysOrgCode } = useGlobSetting();
-      params.orgcode=sysOrgCode
-      params.type='alarmLog'
-      // params.devicetype = params.devicetype ? params.devicetype + '*' : '';
-      if (props.sysId) {
-        params.sysId = props.sysId;
-      }
+    exportConfig: {
+      name: '预警历史列表',
+      url: '/safety/ventanalyAlarmLog/exportXls',
     },
-  },
-  exportConfig: {
-    name: '预警历史列表',
-    url: '/safety/ventanalyAlarmLog/exportXls',
-  },
-});
-//注册table数据
-const [registerTable, { reload, setLoading, getForm }] = tableContext;
+  });
+  //注册table数据
+  const [registerTable, { reload, setLoading, getForm }] = tableContext;
 
-//获取预警统计信息
-async function getEachMineWarnCountInfoList(){
-  const { sysOrgCode } = useGlobSetting();
-  let res=await getEachMineWarnCountInfo({orgcode:sysOrgCode})
-  statisticsList[0].valueT=res.ventSWarnInfo.totalNum || 0
-  statisticsList[0].valueB=res.ventSWarnInfo.maxWarnLevel || ''
-  statisticsList[1].valueT=res.dustSWarnInfo.totalNum || 0
-  statisticsList[1].valueB=res.dustSWarnInfo.maxWarnLevel || ''
-  statisticsList[2].valueT=res.gasSWarnInfo.totalNum || 0
-  statisticsList[2].valueB=res.gasSWarnInfo.maxWarnLevel || ''
-  statisticsList[3].valueT=res.fireSWarnInfo.totalNum || 0
-  statisticsList[3].valueB=res.fireSWarnInfo.maxWarnLevel || ''
-  statisticsList[4].valueT=res.synthesizeSWarnInfo.totalNum || 0
-  statisticsList[4].valueB=res.synthesizeSWarnInfo.maxWarnLevel || ''
-}
-onMounted(async () => {
-  getEachMineWarnCountInfoList()
- });
+  //获取预警统计信息
+  async function getEachMineWarnCountInfoList() {
+    const { sysOrgCode } = useGlobSetting();
+    let res = await getEachMineWarnCountInfo({ orgcode: orgcode ? orgcode : sysOrgCode });
+    statisticsList[0].valueT = res.ventSWarnInfo.totalNum || 0;
+    statisticsList[0].valueB = res.ventSWarnInfo.maxWarnLevel || '';
+    statisticsList[1].valueT = res.dustSWarnInfo.totalNum || 0;
+    statisticsList[1].valueB = res.dustSWarnInfo.maxWarnLevel || '';
+    statisticsList[2].valueT = res.gasSWarnInfo.totalNum || 0;
+    statisticsList[2].valueB = res.gasSWarnInfo.maxWarnLevel || '';
+    statisticsList[3].valueT = res.fireSWarnInfo.totalNum || 0;
+    statisticsList[3].valueB = res.fireSWarnInfo.maxWarnLevel || '';
+    statisticsList[4].valueT = res.synthesizeSWarnInfo.totalNum || 0;
+    statisticsList[4].valueB = res.synthesizeSWarnInfo.maxWarnLevel || '';
+  }
+  onMounted(async () => {
+    orgcode = route.query['orgcode'] as string;
+    getEachMineWarnCountInfoList();
+  });
 
-defineExpose({ setLoading });
+  defineExpose({ setLoading });
 </script>
 
 <style scoped lang="less">
-@ventSpace: zxm;
-
-:deep(.zxm-table-container) {
-  max-height: 720px !important;
-}
+  @ventSpace: zxm;
 
-:deep(.ventSpace-table-body) {
-  height: auto !important;
-}
+  :deep(.zxm-table-container) {
+    max-height: 720px !important;
+  }
 
-:deep(.zxm-picker) {
-  height: 30px !important;
-}
+  :deep(.ventSpace-table-body) {
+    height: auto !important;
+  }
 
-:deep(.@{ventSpace}-picker-dropdown) {
-  position: absolute !important;
-  top: 35px !important;
-  left: 0 !important;
-}
+  :deep(.zxm-picker) {
+    height: 30px !important;
+  }
 
-.data-statistics {
-  height: 200px;
-  padding: 20px;
-  margin-top: 20px;
-  background-color: #0ebbff15;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
+  :deep(.@{ventSpace}-picker-dropdown) {
+    position: absolute !important;
+    top: 35px !important;
+    left: 0 !important;
+  }
 
-  .statistics-box {
+  .data-statistics {
+    height: 200px;
+    padding: 20px;
+    margin-top: 20px;
+    background-color: #0ebbff15;
     display: flex;
-    flex: 1;
-    height: 100%;
-    justify-content: center;
+    justify-content: space-between;
     align-items: center;
 
-    .left-box {
-      position: relative;
-      width: 138px;
+    .statistics-box {
+      display: flex;
+      flex: 1;
       height: 100%;
+      justify-content: center;
+      align-items: center;
 
-      .box-title {
-        position: absolute;
-        left: 50%;
-        bottom: 18px;
-        transform: translate(-50%, 0);
-        color: #fff;
-      }
-    }
+      .left-box {
+        position: relative;
+        width: 138px;
+        height: 100%;
 
-    &:nth-child(1) .left-box {
-      background: url('../../../../assets/images/vent-tf.png') no-repeat center;
-      background-size: 100% auto
-    }
+        .box-title {
+          position: absolute;
+          left: 50%;
+          bottom: 18px;
+          transform: translate(-50%, 0);
+          color: #fff;
+        }
+      }
 
-    &:nth-child(2) .left-box {
-      background: url('../../../../assets/images/dust-fc.png') no-repeat center;
-      background-size: 100% auto
-    }
+      &:nth-child(1) .left-box {
+        background: url('../../../../assets/images/vent-tf.png') no-repeat center;
+        background-size: 100% auto;
+      }
 
-    &:nth-child(3) .left-box {
-      background: url('../../../../assets/images/gas-ws.png') no-repeat center;
-      background-size: 100% auto
-    }
+      &:nth-child(2) .left-box {
+        background: url('../../../../assets/images/dust-fc.png') no-repeat center;
+        background-size: 100% auto;
+      }
 
-    &:nth-child(4) .left-box {
-      background: url('../../../../assets/images/fire-fz.png') no-repeat center;
-      background-size: 100% auto
-    }
+      &:nth-child(3) .left-box {
+        background: url('../../../../assets/images/gas-ws.png') no-repeat center;
+        background-size: 100% auto;
+      }
 
-    &:nth-child(5) .left-box {
-      background: url('../../../../assets/images/aqjc.png') no-repeat center;
-      background-size: 100% auto
-    }
+      &:nth-child(4) .left-box {
+        background: url('../../../../assets/images/fire-fz.png') no-repeat center;
+        background-size: 100% auto;
+      }
 
-    .right-box {
-      position: relative;
-      width: 215px;
-      height: 100%;
-      display: flex;
-      flex-direction: column;
-      justify-content: space-around;
-      align-items: center;
+      &:nth-child(5) .left-box {
+        background: url('../../../../assets/images/aqjc.png') no-repeat center;
+        background-size: 100% auto;
+      }
 
-      .box-text {
+      .right-box {
         position: relative;
-        width: 100%;
-        height: 40px;
-        color: #fff;
-        background: url('../../../../assets/images/his-one.png') no-repeat center;
-        background-size: 100% 100%;
+        width: 215px;
+        height: 100%;
+        display: flex;
+        flex-direction: column;
+        justify-content: space-around;
+        align-items: center;
 
-        .text-label {
-          position: absolute;
-          left: 20px;
-          top: 50%;
-          transform: translate(0, -50%);
-        }
+        .box-text {
+          position: relative;
+          width: 100%;
+          height: 40px;
+          color: #fff;
+          background: url('../../../../assets/images/his-one.png') no-repeat center;
+          background-size: 100% 100%;
 
-        .text-value {
-          position: absolute;
-          left: 130px;
-          top: 50%;
-          transform: translate(0, -50%);
+          .text-label {
+            position: absolute;
+            left: 20px;
+            top: 50%;
+            transform: translate(0, -50%);
+          }
+
+          .text-value {
+            position: absolute;
+            left: 130px;
+            top: 50%;
+            transform: translate(0, -50%);
+          }
         }
       }
     }
   }
-}
 
-// .tab-button-group {
-//   // line-height: 60px;
-//   margin-top: 16px;
-//   display: flex;
-//   pointer-events: auto;
-//   position: relative;
-//   &::after {
-//     position: absolute;
-//     content: '';
-//     width: calc(100% + 10px);
-//     height: 2px;
-//     top: 44px;
-//     left: -10px;
-//     border-bottom: 1px solid #0efcff;
-//   }
-//   .tab-button {
-//     padding: 10px 30px;
-//     position: relative;
-//     display: flex;
-//     justify-content: center;
-//     align-items: center;
-//     font-size: 16px;
-//     color: #fff;
-//     cursor: pointer;
-//     margin-right: 10px;
-//     background-color: rgba(0, 103, 103, 0.253);
-//     &::before {
-//       content: '';
-//       position: absolute;
-//       top: 0;
-//       right: 0;
-//       bottom: 0;
-//       left: 0;
-//       border: 1px solid #2bb2c4;
-//       // transform: skewX(-38deg);
-//       // background-color: rgba(0, 77, 103, 85%);
-//       z-index: 0;
-//     }
-//     &::after {
-//       background-color: rgba(0, 77, 103, 85%);
-//     }
-//   }
-//   .active {
-//     &::before {
-//       border-color: #46fcff;
-//       box-shadow: 1px 1px 10px 2px #0efcff99 inset;
-//     }
-//   }
-// }
-.alarm-history-table {
-  width: 100%;
-  background-color: #0ebbff15;
-  position: relative;
-  margin-top: 10px;
+  // .tab-button-group {
+  //   // line-height: 60px;
+  //   margin-top: 16px;
+  //   display: flex;
+  //   pointer-events: auto;
+  //   position: relative;
+  //   &::after {
+  //     position: absolute;
+  //     content: '';
+  //     width: calc(100% + 10px);
+  //     height: 2px;
+  //     top: 44px;
+  //     left: -10px;
+  //     border-bottom: 1px solid #0efcff;
+  //   }
+  //   .tab-button {
+  //     padding: 10px 30px;
+  //     position: relative;
+  //     display: flex;
+  //     justify-content: center;
+  //     align-items: center;
+  //     font-size: 16px;
+  //     color: #fff;
+  //     cursor: pointer;
+  //     margin-right: 10px;
+  //     background-color: rgba(0, 103, 103, 0.253);
+  //     &::before {
+  //       content: '';
+  //       position: absolute;
+  //       top: 0;
+  //       right: 0;
+  //       bottom: 0;
+  //       left: 0;
+  //       border: 1px solid #2bb2c4;
+  //       // transform: skewX(-38deg);
+  //       // background-color: rgba(0, 77, 103, 85%);
+  //       z-index: 0;
+  //     }
+  //     &::after {
+  //       background-color: rgba(0, 77, 103, 85%);
+  //     }
+  //   }
+  //   .active {
+  //     &::before {
+  //       border-color: #46fcff;
+  //       box-shadow: 1px 1px 10px 2px #0efcff99 inset;
+  //     }
+  //   }
+  // }
+  .alarm-history-table {
+    width: 100%;
+    background-color: #0ebbff15;
+    position: relative;
+    margin-top: 10px;
 
-  &::after {
-    position: absolute;
-    content: '';
-    width: calc(100% + 10px);
-    height: 2px;
-    top: 0px;
-    left: -10px;
-    border-bottom: 1px solid #0efcff99;
+    &::after {
+      position: absolute;
+      content: '';
+      width: calc(100% + 10px);
+      height: 2px;
+      top: 0px;
+      left: -10px;
+      border-bottom: 1px solid #0efcff99;
+    }
   }
-}
 </style>

+ 31 - 9
src/views/vent/monitorManager/workFaceMonitor/workFace.threejs.base.ts

@@ -64,6 +64,16 @@ class WorkFace {
     //   _this.render();
     // });
   }
+  setControls = () => {
+    if (this.model && this.model.orbitControls) {
+      this.model.orbitControls.panSpeed = 0.5;
+      this.model.orbitControls.rotateSpeed = 0.5;
+      this.model.orbitControls.maxPolarAngle = Math.PI / 3;
+      this.model.orbitControls.minPolarAngle = Math.PI / 4;
+      this.model.orbitControls.minAzimuthAngle = -Math.PI / 3;
+      this.model.orbitControls.maxAzimuthAngle = Math.PI / 4;
+    }
+  };
 
   render() {
     this.model.renderer?.render(this.model.scene as THREE.Scene, this.model.camera as THREE.PerspectiveCamera);
@@ -426,10 +436,11 @@ class WorkFace {
     DiXing?.add(mesh0);
     // 黄=》黄
     const curveYellow1 = new THREE.CatmullRomCurve3([
-      new THREE.Vector3(-179.811 + offeset, 620.836, -365.375),
-      new THREE.Vector3(-242.441 + offeset, 408.812, -365.375),
-      new THREE.Vector3(-121.899 + offeset, 67.201, -365.375),
-      new THREE.Vector3(-231.811 + offeset, -141.83, -365.375),
+      new THREE.Vector3(784.664 - yellowLen, 623.933, -365.355),
+      new THREE.Vector3(167.212 - yellowLen, 450.517, -365.355),
+      new THREE.Vector3(7.587 - yellowLen, 262.225, -365.355),
+      new THREE.Vector3(426.499 - yellowLen, 31.416, -365.355),
+      new THREE.Vector3(261.665 - yellowLen, -139.495, -365.355),
     ]);
     const curveYellow2 = new THREE.CatmullRomCurve3([
       new THREE.Vector3(-179.811 - yellowLen, 620.836, -365.375),
@@ -488,13 +499,23 @@ class WorkFace {
 
     // 黄色-》蓝色
     const curve2 = new THREE.CatmullRomCurve3([
-      new THREE.Vector3(-179.811 + offeset, 620.836, -365.375),
-      new THREE.Vector3(-242.441 + offeset, 408.812, -365.375),
-      new THREE.Vector3(-121.899 + offeset, 67.201, -365.375),
-      new THREE.Vector3(-231.811 + offeset, -141.83, -365.375),
+      new THREE.Vector3(784.664 - yellowLen, 623.933, -365.355),
+      new THREE.Vector3(167.212 - yellowLen, 450.517, -365.355),
+      new THREE.Vector3(7.587 - yellowLen, 262.225, -365.355),
+      new THREE.Vector3(426.499 - yellowLen, 31.416, -365.355),
+      new THREE.Vector3(261.665 - yellowLen, -139.495, -365.355),
+    ]);
+
+    const curve4 = new THREE.CatmullRomCurve3([
+      new THREE.Vector3(784.664, 623.933, -365.355),
+      new THREE.Vector3(167.212, 450.517, -365.355),
+      new THREE.Vector3(7.587, 262.225, -365.355),
+      new THREE.Vector3(426.499, 31.416, -365.355),
+      new THREE.Vector3(261.665, -139.495, -365.355),
     ]);
+
     const points2 = curve2.getPoints(80);
-    const points3 = curve3.getPoints(80);
+    const points3 = curve4.getPoints(80);
     const newPoints1: number[] = [];
     const normals: number[] = [];
     const colors: number[] = [];
@@ -557,6 +578,7 @@ class WorkFace {
         this.getPositions(this.glob.N);
         this.addLight();
         this.setThreePlane();
+        this.setControls();
         // this.drawSpheres();
 
         resolve(null);