Преглед на файлове

1. 用户管理查询页面添加所属角色信息
2. 项目配置中添加语音扩播功能所需配置信息
3. 添加评价单元绘制功能

hongrunxia преди 3 месеца
родител
ревизия
cb30b983e2

+ 2 - 0
src/components/Table/src/hooks/usePagination.tsx

@@ -39,6 +39,7 @@ export function usePagination(refProps: ComputedRef<BasicTableProps>) {
             <Select
               defaultValue={configRef.value.pageSize}
               options={[
+                { label: '5条每页', value: 5 },
                 { label: '10条每页', value: 10 },
                 { label: '30条每页', value: 30 },
                 { label: '50条每页', value: 50 },
@@ -83,6 +84,7 @@ export function usePagination(refProps: ComputedRef<BasicTableProps>) {
         <Select
           defaultValue={configRef.value.pageSize}
           options={[
+            { label: '5条每页', value: 5 },
             { label: '10条每页', value: 10 },
             { label: '30条每页', value: 30 },
             { label: '50条每页', value: 50 },

+ 60 - 9
src/components/chart/BarAndLine.vue

@@ -64,6 +64,7 @@
       const { setOptions, echarts } = useECharts(chartRef as Ref<HTMLDivElement>);
       const chartData = props.chartsColumnsType ? getTableHeaderColumns(props.chartsColumnsType) : [];
       let chartsColumns = (props.chartsColumns.length > 0 ? props.chartsColumns : chartData) as ChartColumn[];
+      let tempYmax: number[] = [];
       // let groupedByColumns = {};
       const option = reactive({
         name: '',
@@ -127,46 +128,96 @@
               option.series[index].type = 'bar';
             }
             option.series[index].data = props.dataSource.map((item) => Number(item[propType.dataIndex]) || 0);
-            console.log('nnn', option.series[index].data);
+            // console.log('nnn', option.series[index].data);
             // 这里动态计算echarts y轴最大值
             const max = Math.max(...option.series[index].data);
             const digitCount = max.toFixed(0).length;
             let yMax = 0;
             if (digitCount < 2) {
-              if (max < 1) {
+              if (max < 0.5) {
                 yMax = 1;
-              } else {
+              } else if (max < 0.9) {
+                yMax = 1.5;
+              } else if (max < 5) {
                 yMax = 10;
+              } else {
+                yMax = 15;
               }
             } else if (digitCount < 3) {
               const n = Number((Number(max.toFixed(0)) / 10).toFixed(0));
-              yMax = (n + 1) * 10;
+              if (max < n * 10 + 5) {
+                yMax = (n + 1) * 10;
+              } else {
+                yMax = (n + 2) * 10;
+              }
             } else if (digitCount < 4) {
               const n = Number((Number(max.toFixed(0)) / 100).toFixed(0));
-              yMax = (n + 1) * 100;
+              if (max < n * 100 + 50) {
+                yMax = (n + 1) * 100;
+              } else {
+                yMax = (n + 2) * 100;
+              }
             } else if (digitCount < 5) {
               const n = Number((Number(max.toFixed(0)) / 1000).toFixed(0));
-              yMax = (n + 1) * 1000;
+              if (max < n * 1000 + 500) {
+                yMax = (n + 1) * 1000;
+              } else {
+                yMax = (n + 1) * 1000 + 500;
+              }
             } else if (digitCount < 6) {
               const n = Number((Number(max.toFixed(0)) / 10000).toFixed(0));
-              yMax = (n + 1) * 10000;
+              if (max < n * 10000 + 5000) {
+                yMax = (n + 1) * 1000;
+              } else {
+                yMax = (n + 1) * 10000 + 5000;
+              }
             }
 
             if (yMax != 0 && yMax !== propType?.ymax) {
               propType.ymax = yMax;
-              isFresh = true;
             }
             return true;
           });
+          // 根据sort分组
+          const groupedBy = {};
+          for (const item of chartsColumns) {
+            if (groupedBy[item.sort]) {
+              groupedBy[item.sort].push(item);
+            } else {
+              groupedBy[item.sort] = [item];
+            }
+          }
+          // 根据分组找ymax最大值
+          const newChartsColumns: ChartColumn[] = [];
+          let index = 0;
+          for (let sortId in groupedBy) {
+            const group = groupedBy[sortId];
+            let ymax = group[0].ymax;
+            for (let i = 1; i < group.length; i++) {
+              if (group[i].ymax > ymax) {
+                ymax = group[i].ymax;
+              }
+            }
+            if (!tempYmax[index] || tempYmax[index] != ymax) {
+              tempYmax[index] = ymax;
+              isFresh = true;
+            }
+            for (let i = 0; i < group.length; i++) {
+              group[i].ymax = ymax;
+              newChartsColumns.push(group[i]);
+            }
+            ++index;
+          }
+          chartsColumns = newChartsColumns;
           option.xAxis[0].data = xAxisData;
           if (isFresh) {
             spinning.value = true;
             optionUtil.initChartOption(props.chartsType, chartsColumns);
             spinning.value = false;
             initCharts(true);
-            emit('refresh');
             nextTick(() => {
               setOptions(option, true);
+              emit('refresh');
             });
           } else {
             // console.log('echarts监测列表数据', option.xAxis[0].data);

+ 1 - 1
src/design/ant/pagination.less

@@ -62,7 +62,7 @@ html[data-theme='dark'] {
 
       a {
         margin-top: 1px;
-        color: #606266;
+        color: #ffffff;
       }
 
       &:last-child {

+ 0 - 1
src/logics/initAppConfig.ts

@@ -22,7 +22,6 @@ import { Persistent } from '/@/utils/cache/persistent';
 import { deepMerge } from '/@/utils';
 import { ThemeEnum } from '/@/enums/appEnum';
 
-
 // Initial project configuration
 export function initAppConfigStore() {
   const localeStore = useLocaleStore();

+ 14 - 14
src/settings/componentSetting.ts

@@ -26,20 +26,20 @@ export default {
     // 默认排序方法
     defaultSortFn: (sortInfo: SorterResult) => {
       //update-begin-author:taoyan date:2022-10-21 for: VUEN-2199【表单设计器】多字段排序
-      if(sortInfo instanceof Array){
-        let sortInfoArray:any[] = []
-        for(let item of sortInfo){
-          let info = getSort(item);
-          if(info){
-            sortInfoArray.push(info)
+      if (sortInfo instanceof Array) {
+        const sortInfoArray: any[] = [];
+        for (const item of sortInfo) {
+          const info = getSort(item);
+          if (info) {
+            sortInfoArray.push(info);
           }
         }
         return {
-          sortInfoString: JSON.stringify(sortInfoArray)
-        }
-      }else{
-        let info = getSort(sortInfo)
-        return info || {}
+          sortInfoString: JSON.stringify(sortInfoArray),
+        };
+      } else {
+        const info = getSort(sortInfo);
+        return info || {};
       }
       //update-end-author:taoyan date:2022-10-21 for: VUEN-2199【表单设计器】多字段排序
     },
@@ -75,10 +75,10 @@ export default {
  * 获取排序信息
  * @param item
  */
-function getSort(item){
+function getSort(item) {
   const { field, order } = item;
   if (field && order) {
-    let sortType = 'ascend' == order ? 'asc' : 'desc';
+    const sortType = 'ascend' == order ? 'asc' : 'desc';
     return {
       // 排序字段
       column: field,
@@ -86,5 +86,5 @@ function getSort(item){
       order: sortType,
     };
   }
-  return ''
+  return '';
 }

+ 3 - 3
src/settings/registerThirdComp.ts

@@ -18,13 +18,13 @@ export async function registerThirdComp(app: App) {
   //---------------------------------------------------------------------
   // 注册全局聊天表情包
   app.component('Picker', Picker);
-  
+
   //---------------------------------------------------------------------
   // 注册全局dayjs
   dayjs.locale('zh-cn');
   dayjs.extend(relativeTime);
   dayjs.extend(customParseFormat);
-  app.config.globalProperties.$dayjs = dayjs
-  app.provide('$dayjs', dayjs)
+  app.config.globalProperties.$dayjs = dayjs;
+  app.provide('$dayjs', dayjs);
   //---------------------------------------------------------------------
 }

+ 12 - 0
src/views/system/user/user.data.ts

@@ -21,6 +21,18 @@ export const columns: BasicColumn[] = [
     customRender: render.renderAvatar,
   },
   {
+    title: '所属角色',
+    dataIndex: 'userRoles',
+    width: 100,
+    customRender: ({ value }) => {
+      const nameList = [];
+      value.forEach((item) => {
+        nameList.push(item['roleName']);
+      });
+      return nameList.toString();
+    },
+  },
+  {
     title: '性别',
     dataIndex: 'sex',
     width: 80,

+ 1 - 1
src/views/vent/comment/EditRowTable.vue

@@ -177,7 +177,7 @@
             if (pass) {
               currentEditKeyRef.value = '';
             }
-            msg.success({ content: '数据已保存', key: 'saving' });
+            // msg.success({ content: '数据已保存', key: 'saving' });
           } catch (error) {
             msg.error({ content: '保存失败', key: 'saving' });
           }

+ 145 - 47
src/views/vent/gas/gasAssessment/threejs/gasAssessmen.threejs.base.ts

@@ -3,6 +3,7 @@ import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer
 import { OutlinePass } from 'three/examples/jsm/postprocessing/OutlinePass.js';
 import { setModalCenter, setTag3D, gradientColors } from '/@/utils/threejs/util';
 import { CSS3DObject } from 'three/examples/jsm/renderers/CSS3DRenderer.js';
+import { green, yellow } from '@ant-design/colors';
 
 // import * as dat from 'dat.gui';
 // const gui = new dat.GUI();
@@ -48,7 +49,9 @@ class GasAssessmen {
     this.model.renderer?.render(this.model.scene as THREE.Scene, this.model.camera as THREE.PerspectiveCamera);
   }
   // 绘制抽采单元
-  setPlanes = (n, colors = new Array(n).fill(new THREE.Color('rgb(100%, 0%, 0%)'))) => {
+  setPlanes1 = (n, colors = new Array(n).fill(new THREE.Color('rgb(100%, 0%, 0%)'))) => {
+    const sizeList = [0.2, 0.3, 0.1, 0.4];
+    // width = 7.713 height =3.717
     colors = gradientColors('#00FF2C', '#FF0000', n, 2);
     this.planeNum = n;
     const lenScale = 0.77 / n;
@@ -63,6 +66,146 @@ class GasAssessmen {
       plane.position.set(0.282 - lenScale * (i - 0.5), 0.015, 0.142);
       this.planeGroup.add(plane);
     }
+    this.group.add(this.planeGroup);
+  };
+
+  setPlanes = (n) => {
+    // const sizeList = [0.2, 0.3, 0.1, 0.2, 0.2];
+    const colors = {
+      c1: new THREE.Color(0x00fe00), // >90
+      c2: new THREE.Color(0xf9b866), // >75 <90  249,184,102
+      c3: new THREE.Color(0xfefe00), // 50-75  254,254,0
+      c4: new THREE.Color(0xfe6600), // 25-50 254,102,0
+      c5: new THREE.Color(0xb00101), // <25 176,1,1
+    };
+
+    const sizeList = [
+      {
+        ratio: 0.2,
+        color: colors.c1,
+      },
+      {
+        ratio: 0.3,
+        color: colors.c2,
+      },
+      {
+        ratio: 0.1,
+        color: colors.c4,
+      },
+      {
+        ratio: 0.2,
+        color: colors.c5,
+      },
+      {
+        ratio: 0.2,
+        color: colors.c3,
+      },
+    ];
+
+    // width = 7.713 height =3.717
+    const geometry = new THREE.PlaneGeometry(7.723, 3.72, 1, 1);
+
+    // 初始化累积比例数组和颜色数组
+    const accumulatedRatios = [];
+    const colorsArray = new Float32Array(3 * sizeList.length);
+
+    // 计算累积比例和颜色数组
+    function updateShaderData(sizeList) {
+      let accRatio = 0;
+      for (let i = 0; i < sizeList.length; i++) {
+        const item = sizeList[i];
+        accRatio += item.ratio;
+        accumulatedRatios.push(accRatio);
+        colorsArray[i * 3] = item.color.r;
+        colorsArray[i * 3 + 1] = item.color.g;
+        colorsArray[i * 3 + 2] = item.color.b;
+      }
+    }
+
+    updateShaderData(sizeList); // 初始调用
+
+    // 定义着色器代码
+    const vertexShader = `
+    varying vec2 vUv;
+    void main() {
+        vUv = uv;
+        gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
+    }
+`;
+
+    const fragmentShader = `
+    varying vec2 vUv;
+    uniform float ratios[${sizeList.length}];
+    uniform vec3 colors[${sizeList.length}];
+    
+    void main() {
+        for(int i = 0; i < ${sizeList.length}; i++) {
+            if(vUv.x < ratios[i]) {
+                gl_FragColor = vec4(colors[i], 1.0);
+                return;
+            }
+        }
+        gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+    }
+  `;
+
+    //   const fragmentShader = `
+    //     varying vec2 vUv;
+    //     uniform float ratios[${sizeList.length + 1}]; // 加入了起始点 0
+    //     uniform vec3 colors[${sizeList.length}];
+
+    //     vec3 lerp(vec3 a, vec3 b, float t) {
+    //         return a + t * (b - a);
+    //     }
+
+    //     void main() {
+    //         int index = 0;
+    //         for(int i = 1; i <= ${sizeList.length}; i++) {
+    //             if(vUv.x >= ratios[i-1] && vUv.x < ratios[i]) {
+    //                 index = i - 1;
+    //                 break;
+    //             }
+    //         }
+
+    //         // 如果是最后一个颜色块,直接使用其颜色
+    //         if (index == ${sizeList.length - 1}) {
+    //             gl_FragColor = vec4(colors[index], 1.0);
+    //         } else {
+    //             // 计算该像素在当前颜色块内的相对位置
+    //             float t = (vUv.x - ratios[index]) / (ratios[index + 1] - ratios[index]);
+    //             // 在相邻颜色间进行线性插值
+    //             vec3 color = lerp(colors[index], colors[index + 1], t);
+    //             gl_FragColor = vec4(color, 1.0);
+    //         }
+    //     }
+    // `;
+
+    // 创建着色器材质
+    const material = new THREE.ShaderMaterial({
+      uniforms: {
+        ratios: { value: accumulatedRatios },
+        colors: { value: colorsArray },
+      },
+      vertexShader: vertexShader,
+      fragmentShader: fragmentShader,
+      depthTest: false,
+      depthWrite: false,
+    });
+
+    // // 当 sizeList 数据变化时调用此函数
+    // function updateSizeList(newSizeList) {
+    //   accumulatedRatios.length = 0; // 清空累积比例数组
+    //   updateShaderData(newSizeList);
+    //   material.uniforms.ratios.value = accumulatedRatios;
+    //   material.uniforms.colors.value = colorsArray;
+    //   material.needsUpdate = true;
+    // }
+
+    // 创建网格并添加到场景中
+    const plane = new THREE.Mesh(geometry, material);
+    plane.rotation.x = -Math.PI / 2;
+    plane.position.set(-0.2, 0.15, -0.03);
+    this.group.add(plane);
   };
 
   // 清除抽采单元绘制面
@@ -76,6 +219,7 @@ class GasAssessmen {
   };
   // 抽采单元内容显示
   setCss3D = () => {
+    // width = 7.713 height =3.717
     const obj = this.group.getObjectByName(`unitText`);
     if (!obj) {
       const element = document.getElementById(`gasUnitBox`) as HTMLElement;
@@ -120,43 +264,6 @@ class GasAssessmen {
     }
   };
 
-  getPositions(num = 40) {
-    const curve1 = new THREE.LineCurve3(new THREE.Vector3(-595.2, 0.046, -2.863), new THREE.Vector3(595.2, 0.046, -2.863)); // 前
-    const curve2 = new THREE.LineCurve3(new THREE.Vector3(-595.065, 0.014, 1.696), new THREE.Vector3(595.048, 0.014, 1.696)); // 中
-    const curve3 = new THREE.LineCurve3(new THREE.Vector3(0.0, 0.0, 190.611), new THREE.Vector3(0.0, 0.0, -190.611)); // 后‘
-
-    const len1 = curve1.getLength();
-    const len2 = curve2.getLength();
-    const len3 = curve3.getLength();
-
-    const unit = (len1 + len2 + len3) / num;
-    const num1 = Math.floor(len1 / unit);
-    const num2 = Math.floor(len2 / unit);
-    const num3 = Math.floor(len3 / unit);
-
-    const points1 = curve1.getPoints(num1);
-    const points2 = curve2.getPoints(num2);
-    const points3 = curve3.getPoints(num3);
-
-    this.positions = [points1, points2, points3];
-  }
-
-  darkenNonBloomed(obj) {
-    if (obj.isMesh && this.bloomLayer.test(obj.layers) === false) {
-      const opacity = obj.material.opacity;
-      this.materials[obj.uuid] = obj.material;
-      obj.material = this.darkMaterial.clone();
-      obj.material.opacity = opacity;
-    }
-  }
-
-  restoreMaterial(obj) {
-    if (this.materials[obj.uuid]) {
-      obj.material = this.materials[obj.uuid];
-      delete this.materials[obj.uuid];
-    }
-  }
-
   /* 点击 */
   mousedownModel(rayCaster: THREE.Raycaster) {
     this.render();
@@ -166,12 +273,6 @@ class GasAssessmen {
     //
   }
 
-  setModalType() {
-    this.group.add(this.planeGroup);
-    this.planeGroup.visible = false;
-    this.planeGroup.position.set(-0.35, 0.14, -0.21);
-  }
-
   mountedThree() {
     return new Promise(async (resolve) => {
       this.model.renderer.sortObjects = true;
@@ -183,9 +284,6 @@ class GasAssessmen {
           }
         });
         this.group.name = this.modelName;
-        this.group.scale.set(2.5, 2.5, 2.5);
-        console.log(this.group);
-        this.getPositions(this.glob.N);
         this.addLight();
 
         resolve(null);

+ 2 - 3
src/views/vent/gas/gasAssessment/threejs/gasAssessmen.threejs.ts

@@ -69,11 +69,10 @@ export const setModelType = (type, n = Math.ceil(Math.random() * 4), isShowPlane
 
       workFaceObj?.setPlanes(n);
       showOrHideGasPlane(true);
-      workFaceObj.setModalType();
       const oldControlsPosition = { x: -0.086221, y: -0.612538, z: 0.33468 };
       const oldCameraPosition = { x: 19.589025920044726, y: 7.437905524957071, z: 23.032636074396976 };
-      const newCameraPosition = { x: -0.04091497261004392, y: 6.00285177785006, z: 13.133761362574692 };
-      const newControlsPosition = { x: -0.08622121639058732, y: -0.6125377446115873, z: 0.3346804214903462 };
+      const newCameraPosition = { x: 0.0439416940344207, y: 3.30089674660269, z: 5.075410444673834 };
+      const newControlsPosition = { x: -0.00008688304055517147, y: -0.3947939804629856, z: -0.07734918886555561 };
 
       if (model.scene.getObjectByName('workFace')) {
         model.camera.position.set(oldCameraPosition.x, oldCameraPosition.y, oldCameraPosition.z + 20);

+ 1 - 2
src/views/vent/home/colliery/components/main-monitor.vue

@@ -27,7 +27,7 @@
       <div class="point-des-box">
         <div>工况点</div>
         <div>负压(Pa): {{ selectDataObj.dataH }}</div>
-        <div>风量(m³/min): {{ (selectDataObj.dataQ * 60).toFixed(2)  }}</div>
+        <div>风量(m³/min): {{ (selectDataObj.dataQ * 60).toFixed(2) }}</div>
       </div>
       <div class="main" ref="main"></div>
     </div>
@@ -35,7 +35,6 @@
 </template>
 
 <script lang="ts" setup>
-
   import { ref, reactive, onMounted, nextTick, defineProps, watch } from 'vue';
   import { SvgIcon } from '/@/components/Icon';
   import * as echarts from 'echarts';

+ 405 - 399
src/views/vent/home/colliery/index.vue

@@ -7,8 +7,9 @@
           <span>{{ nowTimeWeek }}</span>
           <span>{{ nowTime }}</span>
         </div>
-        <div class="main-title"><img v-if="hasPermission('home:logo')" class="logo"
-            :src="`${baseUrl}/sys/common/static/${logoUrl}`" />{{ title }}</div>
+        <div class="main-title"
+          ><img v-if="hasPermission('home:logo')" class="logo" :src="`${baseUrl}/sys/common/static/${logoUrl}`" />{{ title }}</div
+        >
       </div>
       <div class="home-contents">
         <div class="left-content">
@@ -46,8 +47,10 @@
               <!-- <div class="btn-icon" @click="goModalDetail"></div> -->
               <!-- 展会不显示按钮 -->
               <div v-if="sysOrgCode !== 'mkyzhpt'" class="btn-icon" @click="goModalDetail"></div>
-              <VentModal ref="centerModalRef"
-                style="width: calc(100% - 30px); height: calc(100% - 30px); position: absolute; background-color: #fff" />
+              <VentModal
+                ref="centerModalRef"
+                style="width: calc(100% - 30px); height: calc(100% - 30px); position: absolute; background-color: #fff"
+              />
             </div>
           </div>
           <!-- 风量监测 -->
@@ -72,466 +75,469 @@
       </div>
     </div>
   </div>
-  <Network ref="NetworkRef" v-if="pageType == 'timesolution'" :pageResult="pageResult" @changePageType="changePageType"
-    style="position: absolute" />
-  <VentModal v-if="pageType == 'model3D' || pageType == 'timesolution'" ref="fullModalRef"
-    style="width: calc(100% - 30px); height: calc(100% - 30px); position: absolute" />
+  <Network ref="NetworkRef" v-if="pageType == 'timesolution'" :pageResult="pageResult" @changePageType="changePageType" style="position: absolute" />
+  <VentModal
+    v-if="pageType == 'model3D' || pageType == 'timesolution'"
+    ref="fullModalRef"
+    style="width: calc(100% - 30px); height: calc(100% - 30px); position: absolute"
+  />
 </template>
 <script lang="ts" setup>
-import { reactive, onMounted, ref, nextTick, computed, unref, inject, onBeforeUnmount, onUnmounted } from 'vue';
-import fanMonitor from './components/fan-monitor.vue';
-import mainMonitor from './components/main-monitor.vue';
-import windDevice from './components/wind-device.vue';
-import windMonitor from './components/wind-monitor.vue';
-import windLine from './components/wind-line.vue';
-import workMonitor from './components/work-monitor.vue';
-import deviceWarn from './components/device-warn.vue';
-import { useGlobSetting } from '/@/hooks/setting';
-import { list } from './clique.api';
-import Network from '../../monitorManager/deviceMonitor/components/network/index.vue';
-import { useRouter } from 'vue-router';
-import { router } from '/@/router';
-// import { Modal } from 'ant-design-vue';
-// import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
-import dayjs from 'dayjs';
-import { getActions } from '/@/qiankun/state';
-import { unmountMicroApps, mountMicroApp } from '/@/qiankun';
-import { getDate } from './clique.data';
-import VentModal from '/@/components/vent/micro/ventModal.vue';
-import { usePermission } from '/@/hooks/web/usePermission';
-
-const { currentRoute } = useRouter();
-const { hasPermission } = usePermission();
-
-const { title, logoUrl, sysOrgCode } = useGlobSetting();
-const baseUrl = VUE_APP_URL.baseUrl;
-const actions = getActions();
-let timer: NodeJS.Timeout | null = null;
-let fanLocalList = reactive<any[]>([]); //局部风机数据
-let mainList = ref<any[]>([]); //主通风机数据
-let centerList = reactive<any[]>([]); //中间区域数据
-let flList = ref<any[]>([]); //风量监测数据
-let lineList = ref<any>([]); //关键路线数据
-let workList = ref<any>([]); //工作面数据
-let warnData = ref<any>([]); //预警数据
-let deviceData = ref<any>({}); //设备监测数据
-let navList = reactive([
-  { name: '总回风量(m³/min)', isShow: true, valList: [] },
-  { name: '总进风量(m³/min)', isShow: true, valList: [] },
-  { name: '计划风量(m³/min)', isShow: true, valList: [] },
-  // { name: '有效风量(m³/min)', isShow: true, valList: [] },
-  // { name: '等积孔(m²)', isShow: true, valList: [] },
-  // { name: '外部漏风率', isShow: false, val: 0 },
-  { name: '有效风量率', isShow: false, val: '0%' },
-]);
-let nowTimeYear = ref('');
-let nowTimeWeek = ref('');
-let nowTime = ref('');
-
-const centerModalRef = ref();
-const fullModalRef = ref();
-
-const globSetting = useGlobSetting();
-const pageType = ref('');
-let router = useRouter();
-const pageResult = ref({});
-
-function goDetail(deviceType) {
-  //lxh
-  // pageType.value = deviceType;
-  if (deviceType == 'fanMain') {
-    router.push('/monitorChannel/monitor-fanmain');
-  } else if (deviceType == 'fanLocal') {
-    if (sysOrgCode !== 'ymdnymdn') {
-      router.push('/monitorChannel/monitor-fanlocal');
-    } else {
-      router.push('/fanlocal-page/home');
+  import { reactive, onMounted, ref, nextTick, computed, unref, inject, onBeforeUnmount, onUnmounted } from 'vue';
+  import fanMonitor from './components/fan-monitor.vue';
+  import mainMonitor from './components/main-monitor.vue';
+  import windDevice from './components/wind-device.vue';
+  import windMonitor from './components/wind-monitor.vue';
+  import windLine from './components/wind-line.vue';
+  import workMonitor from './components/work-monitor.vue';
+  import deviceWarn from './components/device-warn.vue';
+  import { useGlobSetting } from '/@/hooks/setting';
+  import { list } from './clique.api';
+  import Network from '../../monitorManager/deviceMonitor/components/network/index.vue';
+  import { useRouter } from 'vue-router';
+  import { router } from '/@/router';
+  // import { Modal } from 'ant-design-vue';
+  // import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
+  import dayjs from 'dayjs';
+  import { getActions } from '/@/qiankun/state';
+  import { unmountMicroApps, mountMicroApp } from '/@/qiankun';
+  import { getDate } from './clique.data';
+  import VentModal from '/@/components/vent/micro/ventModal.vue';
+  import { usePermission } from '/@/hooks/web/usePermission';
+
+  const { currentRoute } = useRouter();
+  const { hasPermission } = usePermission();
+
+  const { title, logoUrl, sysOrgCode } = useGlobSetting();
+  const baseUrl = VUE_APP_URL.baseUrl;
+  const actions = getActions();
+  let timer: NodeJS.Timeout | null = null;
+  let fanLocalList = reactive<any[]>([]); //局部风机数据
+  let mainList = ref<any[]>([]); //主通风机数据
+  let centerList = reactive<any[]>([]); //中间区域数据
+  let flList = ref<any[]>([]); //风量监测数据
+  let lineList = ref<any>([]); //关键路线数据
+  let workList = ref<any>([]); //工作面数据
+  let warnData = ref<any>([]); //预警数据
+  let deviceData = ref<any>({}); //设备监测数据
+  let navList = reactive([
+    { name: '总回风量(m³/min)', isShow: true, valList: [] },
+    { name: '总进风量(m³/min)', isShow: true, valList: [] },
+    { name: '计划风量(m³/min)', isShow: true, valList: [] },
+    // { name: '有效风量(m³/min)', isShow: true, valList: [] },
+    // { name: '等积孔(m²)', isShow: true, valList: [] },
+    // { name: '外部漏风率', isShow: false, val: 0 },
+    { name: '有效风量率', isShow: false, val: '0%' },
+  ]);
+  let nowTimeYear = ref('');
+  let nowTimeWeek = ref('');
+  let nowTime = ref('');
+
+  const centerModalRef = ref();
+  const fullModalRef = ref();
+
+  const globSetting = useGlobSetting();
+  const pageType = ref('');
+  let router = useRouter();
+  const pageResult = ref({});
+
+  function goDetail(deviceType) {
+    //lxh
+    // pageType.value = deviceType;
+    if (deviceType == 'fanMain') {
+      router.push('/monitorChannel/monitor-fanmain');
+    } else if (deviceType == 'fanLocal') {
+      if (sysOrgCode !== 'ymdnymdn') {
+        router.push('/monitorChannel/monitor-fanlocal');
+      } else {
+        router.push('/fanlocal-page/home');
+      }
+    } else if (deviceType == 'windrect') {
+      router.push('/monitorChannel/monitor-windrect');
+    } else if (deviceType == 'warning') {
+      router.push('/monitorChannel/monitor-alarm-home');
     }
-  } else if (deviceType == 'windrect') {
-    router.push('/monitorChannel/monitor-windrect');
-  } else if (deviceType == 'warning') {
-    router.push('/monitorChannel/monitor-alarm-home');
   }
-}
-function goHome() {
-  pageType.value = 'home';
-}
-
-function getList() {
-  list({}).then((res) => {
-    console.log(res, 'res-----------');
-    fanLocalList.length = 0;
-    fanLocalList.push(res.fanlocal);
-    mainList.value = res.fanmain || [];
-    if (res.midinfo[0].sysdata) {
-      centerList = res.midinfo[0].sysdata;
-      // 总回
-      navList[0].valList =
-        centerList && centerList.zonghuifeng
-          ? centerList.zonghuifeng.split('').map((el) => {
-            return { val: el };
-          })
-          : [];
-      // 总进
-      navList[1].valList =
-        centerList && centerList.zongjinfeng
-          ? centerList.zongjinfeng
-            .toString()
-            .split('')
-            .map((el) => {
-              return { val: el };
-            })
-          : [];
-      // 计划风量
-      navList[2].valList =
-        centerList && centerList.xufengliang
-          ? centerList.xufengliang
-            .toString()
-            .split('')
-            .map((el) => {
-              return { val: el };
-            })
-          : [];
-      navList[3].val = `${res.midinfo[0].sysinfo.useM3Perent}%` || '--';
-    }
-    flList.value = res.windrect || res.sys_wind;
+  function goHome() {
+    pageType.value = 'home';
+  }
 
-    if (res.sys_majorpath.length != 0) {
-      lineList.value = res.sys_majorpath;
-    } else {
-      let paramArr: any = [];
-      lineList.value = paramArr;
-    }
+  function getList() {
+    list({}).then((res) => {
+      console.log(res, 'res-----------');
+      fanLocalList.length = 0;
+      fanLocalList.push(res.fanlocal);
+      mainList.value = res.fanmain || [];
+      if (res.midinfo[0].sysdata) {
+        centerList = res.midinfo[0].sysdata;
+        // 总回
+        navList[0].valList =
+          centerList && centerList.zonghuifeng
+            ? centerList.zonghuifeng.split('').map((el) => {
+                return { val: el };
+              })
+            : [];
+        // 总进
+        navList[1].valList =
+          centerList && centerList.zongjinfeng
+            ? centerList.zongjinfeng
+                .toString()
+                .split('')
+                .map((el) => {
+                  return { val: el };
+                })
+            : [];
+        // 计划风量
+        navList[2].valList =
+          centerList && centerList.xufengliang
+            ? centerList.xufengliang
+                .toString()
+                .split('')
+                .map((el) => {
+                  return { val: el };
+                })
+            : [];
+        navList[3].val = `${res.midinfo[0].sysinfo.useM3Perent}%` || '--';
+      }
+      flList.value = res.windrect || res.sys_wind;
+
+      if (res.sys_majorpath.length != 0) {
+        lineList.value = res.sys_majorpath;
+      } else {
+        let paramArr: any = [];
+        lineList.value = paramArr;
+      }
+
+      if (res.sys_surface_caimei.length != 0) {
+        workList.value = res.sys_surface_caimei;
+      } else {
+        let paramArr: any = [];
+        workList.value = getDate(paramArr);
+      }
+      warnData.value = res.warn || [];
+      deviceData.value = res.device || {};
+    });
+  }
+
+  //获取当前时间年月日时分秒
+  function getNowTime() {
+    setInterval(() => {
+      nowTimeYear.value = dayjs().format('YYYY/MM/DD');
+      let week = dayjs(new Date().getTime()).day();
+      switch (week) {
+        case 0:
+          nowTimeWeek.value = '星期日';
+          break;
+        case 1:
+          nowTimeWeek.value = '星期一';
+          break;
+        case 2:
+          nowTimeWeek.value = '星期二';
+          break;
+        case 3:
+          nowTimeWeek.value = '星期三';
+          break;
+        case 4:
+          nowTimeWeek.value = '星期四';
+          break;
+        case 5:
+          nowTimeWeek.value = '星期五';
+          break;
+        case 6:
+          nowTimeWeek.value = '星期六';
+          break;
+      }
+      let date = new Date();
+      let hours = date.getHours();
+      let minutes = date.getMinutes();
+      let seconds = date.getSeconds();
+      if (minutes >= 0 && minutes <= 9) {
+        minutes = `0${minutes}`;
+      }
+      if (seconds >= 0 && seconds <= 9) {
+        seconds = `0${seconds}`;
+      }
+      nowTime.value = `${hours}:${minutes}:${seconds}`;
+    }, 1000);
+  }
+
+  function goModalDetail() {
+    router.push('/micro-vent-3dModal/dashboard/analysis?type=model3D');
+  }
 
-    if (res.sys_surface_caimei.length != 0) {
-      workList.value = res.sys_surface_caimei;
+  const changePageType = (pageType) => {
+    actions.setGlobalState({ pageObj: { pageType: pageType } });
+  };
+
+  onMounted(() => {
+    const currentRouteObj = unref(currentRoute);
+    if (currentRouteObj && currentRouteObj['query'] && currentRouteObj['query']['deviceType']) {
+      pageType.value = 'model3D';
     } else {
-      let paramArr: any = [];
-      workList.value = getDate(paramArr);
-    }
-    warnData.value = res.warn || [];
-    deviceData.value = res.device || {};
-  });
-}
-
-//获取当前时间年月日时分秒
-function getNowTime() {
-  setInterval(() => {
-    nowTimeYear.value = dayjs().format('YYYY/MM/DD');
-    let week = dayjs(new Date().getTime()).day();
-    switch (week) {
-      case 0:
-        nowTimeWeek.value = '星期日';
-        break;
-      case 1:
-        nowTimeWeek.value = '星期一';
-        break;
-      case 2:
-        nowTimeWeek.value = '星期二';
-        break;
-      case 3:
-        nowTimeWeek.value = '星期三';
-        break;
-      case 4:
-        nowTimeWeek.value = '星期四';
-        break;
-      case 5:
-        nowTimeWeek.value = '星期五';
-        break;
-      case 6:
-        nowTimeWeek.value = '星期六';
-        break;
-    }
-    let date = new Date();
-    let hours = date.getHours();
-    let minutes = date.getMinutes();
-    let seconds = date.getSeconds();
-    if (minutes >= 0 && minutes <= 9) {
-      minutes = `0${minutes}`;
-    }
-    if (seconds >= 0 && seconds <= 9) {
-      seconds = `0${seconds}`;
+      pageType.value = 'home';
     }
-    nowTime.value = `${hours}:${minutes}:${seconds}`;
-  }, 1000);
-}
-
-function goModalDetail() {
-  router.push('/micro-vent-3dModal/dashboard/analysis?type=model3D');
-}
-
-const changePageType = (pageType) => {
-  actions.setGlobalState({ pageObj: { pageType: pageType } });
-};
-
-onMounted(() => {
-  const currentRouteObj = unref(currentRoute);
-  if (currentRouteObj && currentRouteObj['query'] && currentRouteObj['query']['deviceType']) {
-    pageType.value = 'model3D';
-  } else {
-    pageType.value = 'home';
-  }
-  actions.onGlobalStateChange((newState) => {
-    for (const key in newState) {
-      if (key === 'pageObj') {
-        const pageObj = newState[key];
-        if (pageObj && pageObj.pageType) {
-          pageType.value = pageObj.pageType;
-          if (pageObj.timesolution) {
-            pageResult.value = pageObj.timesolution;
+    actions.onGlobalStateChange((newState) => {
+      for (const key in newState) {
+        if (key === 'pageObj') {
+          const pageObj = newState[key];
+          if (pageObj && pageObj.pageType) {
+            pageType.value = pageObj.pageType;
+            if (pageObj.timesolution) {
+              pageResult.value = pageObj.timesolution;
+            }
           }
         }
       }
-    }
+    });
+    getNowTime();
+    getList();
+    timer = Number(
+      setInterval(() => {
+        getList();
+      }, 10000)
+    );
+  });
+  onBeforeUnmount(() => {
+    clearInterval(timer);
+    timer = null;
+  });
+  onUnmounted(() => {
+    pageType.value = '';
   });
-  getNowTime();
-  getList();
-  timer = Number(
-    setInterval(() => {
-      getList();
-    }, 10000)
-  );
-});
-onBeforeUnmount(() => {
-  clearInterval(timer);
-  timer = null;
-});
-onUnmounted(() => {
-  pageType.value = '';
-});
 </script>
 
 <style lang="less" scoped>
-@font-face {
-  font-family: 'douyuFont';
-  src: url('../../../../assets/font/douyuFont.otf');
-}
-
-@font-face {
-  font-family: 'yjsz';
-  src: url('../../../../assets/font/yjsz.TTF');
-}
-
-.home-container {
-  width: 100%;
-  height: 100%;
-  position: relative;
-
-  .header {
+  @font-face {
+    font-family: 'douyuFont';
+    src: url('../../../../assets/font/douyuFont.otf');
+  }
+
+  @font-face {
+    font-family: 'yjsz';
+    src: url('../../../../assets/font/yjsz.TTF');
+  }
+
+  .home-container {
     width: 100%;
-    height: 76px;
+    height: 100%;
     position: relative;
-    background: url('../../../../assets//images//home-container/header-nav.png') no-repeat;
-
-    .head-time {
-      position: absolute;
-      top: 14px;
-      left: 15px;
-      color: #b5c9e9;
-      font-size: 14px;
-
-      span {
-        margin-right: 20px;
-        letter-spacing: 2px;
+
+    .header {
+      width: 100%;
+      height: 76px;
+      position: relative;
+      background: url('../../../../assets//images//home-container/header-nav.png') no-repeat;
+
+      .head-time {
+        position: absolute;
+        top: 14px;
+        left: 15px;
+        color: #b5c9e9;
+        font-size: 14px;
+
+        span {
+          margin-right: 20px;
+          letter-spacing: 2px;
+        }
       }
-    }
 
-    .main-title {
-      position: absolute;
-      left: 50%;
-      top: 50%;
-      transform: translate(-50%, -50%);
-      color: #fff;
-      font-size: 28px;
-      font-weight: 600;
-      display: flex;
-      align-items: center;
+      .main-title {
+        position: absolute;
+        left: 50%;
+        top: 50%;
+        transform: translate(-50%, -50%);
+        color: #fff;
+        font-size: 28px;
+        font-weight: 600;
+        display: flex;
+        align-items: center;
 
-      .logo {
-        width: 32px;
-        height: 32px;
-        margin-right: 5px;
+        .logo {
+          width: 32px;
+          height: 32px;
+          margin-right: 5px;
+        }
       }
     }
-  }
 
-  .home-contents {
-    display: flex;
-    justify-content: space-between;
-    height: calc(100% - 76px);
-    padding: 10px;
-    box-sizing: border-box;
-
-    .left-content {
+    .home-contents {
       display: flex;
-      flex-direction: column;
-      flex: 1;
       justify-content: space-between;
-      height: 100%;
+      height: calc(100% - 76px);
+      padding: 10px;
+      box-sizing: border-box;
 
-      .monitor-box {
+      .left-content {
         display: flex;
+        flex-direction: column;
         flex: 1;
-        width: 100%;
-        background: url('../../../../assets/images/home-container/dialog.png') no-repeat;
-        background-size: 100% 100%;
-      }
+        justify-content: space-between;
+        height: 100%;
 
-      .monitor-box1 {
-        margin: 10px 0px;
-      }
-    }
+        .monitor-box {
+          display: flex;
+          flex: 1;
+          width: 100%;
+          background: url('../../../../assets/images/home-container/dialog.png') no-repeat;
+          background-size: 100% 100%;
+        }
 
-    .center-content {
-      display: flex;
-      flex-direction: column;
-      justify-content: space-between;
-      flex: 2;
-      height: 100%;
-      margin: 0px 10px;
+        .monitor-box1 {
+          margin: 10px 0px;
+        }
+      }
 
-      .three-box {
-        position: relative;
+      .center-content {
         display: flex;
-        background-color: #fff;
+        flex-direction: column;
+        justify-content: space-between;
         flex: 2;
-        width: 100%;
-        margin-bottom: 15px;
-        background: url('../../../../assets/images/home-container/three-dialog.png') no-repeat;
-        background-size: 100% 100%;
-
-        .three-nav {
-          position: absolute;
-          z-index: 9999;
-          left: 50%;
-          top: 38px;
-          transform: translate(-50%, 0);
-          width: 812px;
-          height: 89px;
-          padding: 0px 20px;
-          box-sizing: border-box;
+        height: 100%;
+        margin: 0px 10px;
+
+        .three-box {
+          position: relative;
           display: flex;
-          justify-content: space-around;
-          align-items: center;
-          background: url('../../../../assets/images/home-container/three-nav.png') no-repeat;
+          background-color: #fff;
+          flex: 2;
+          width: 100%;
+          margin-bottom: 15px;
+          background: url('../../../../assets/images/home-container/three-dialog.png') no-repeat;
+          background-size: 100% 100%;
 
-          .nav-item {
+          .three-nav {
+            position: absolute;
+            z-index: 9999;
+            left: 50%;
+            top: 38px;
+            transform: translate(-50%, 0);
+            width: 812px;
+            height: 89px;
+            padding: 0px 20px;
+            box-sizing: border-box;
             display: flex;
-            flex: 1;
-            flex-direction: column;
             justify-content: space-around;
             align-items: center;
-            height: 80%;
-
-            .item-label {
-              color: #98f5ff;
-            }
+            background: url('../../../../assets/images/home-container/three-nav.png') no-repeat;
 
-            .item-value {
-              position: relative;
-              width: 125px;
-              height: 37px;
-              padding: 0px 5px;
-              box-sizing: border-box;
+            .nav-item {
               display: flex;
-              justify-content: space-between;
+              flex: 1;
+              flex-direction: column;
+              justify-content: space-around;
               align-items: center;
-              background: url('../../../../assets/images/home-container/item-value.png') no-repeat;
+              height: 80%;
+
+              .item-label {
+                color: #98f5ff;
+              }
 
-              .bg-box {
+              .item-value {
                 position: relative;
-                width: 20px;
-                height: 26px;
-                border-bottom: 2px solid #063493;
-                background: linear-gradient(to right, rgba(1, 194, 249), rgba(0, 125, 252));
-
-                .box-line {
-                  position: absolute;
-                  left: 0;
-                  top: 50%;
-                  transform: translate(0, -50%);
-                  height: 1px;
-                  width: 100%;
-                  background-color: rgba(6, 52, 147, 0.6);
+                width: 125px;
+                height: 37px;
+                padding: 0px 5px;
+                box-sizing: border-box;
+                display: flex;
+                justify-content: space-between;
+                align-items: center;
+                background: url('../../../../assets/images/home-container/item-value.png') no-repeat;
+
+                .bg-box {
+                  position: relative;
+                  width: 20px;
+                  height: 26px;
+                  border-bottom: 2px solid #063493;
+                  background: linear-gradient(to right, rgba(1, 194, 249), rgba(0, 125, 252));
+
+                  .box-line {
+                    position: absolute;
+                    left: 0;
+                    top: 50%;
+                    transform: translate(0, -50%);
+                    height: 1px;
+                    width: 100%;
+                    background-color: rgba(6, 52, 147, 0.6);
+                  }
+
+                  .value-text {
+                    position: absolute;
+                    left: 50%;
+                    top: 50%;
+                    transform: translate(-50%, -50%);
+                    color: #fff;
+                    font-size: 22px;
+                    font-family: 'yjsz';
+                    font-weight: 500;
+                  }
                 }
 
-                .value-text {
-                  position: absolute;
-                  left: 50%;
-                  top: 50%;
-                  transform: translate(-50%, -50%);
+                .value-text1 {
+                  width: 100%;
+                  text-align: center;
                   color: #fff;
                   font-size: 22px;
                   font-family: 'yjsz';
                   font-weight: 500;
                 }
               }
+            }
+          }
 
-              .value-text1 {
-                width: 100%;
-                text-align: center;
-                color: #fff;
-                font-size: 22px;
-                font-family: 'yjsz';
-                font-weight: 500;
-              }
+          .three-modal {
+            width: 100%;
+            height: 100%;
+            padding: 20px 17px 20px 15px;
+            box-sizing: border-box;
+            // position: absolute;
+            // background-color: var(--vent-base-color);
+
+            .btn-icon {
+              width: 40px;
+              height: 40px;
+              background: url('/@/assets/images/vent/home/tosmall.png') no-repeat center;
+              background-size: 100% 100%;
+              position: absolute;
+              z-index: 99999;
+              bottom: 30px;
+              right: 30px;
             }
           }
         }
 
-        .three-modal {
+        .wind-box {
+          display: flex;
+          flex: 1;
           width: 100%;
-          height: 100%;
-          padding: 20px 17px 20px 15px;
-          box-sizing: border-box;
-          // position: absolute;
-          // background-color: var(--vent-base-color);
-
-          .btn-icon {
-            width: 40px;
-            height: 40px;
-            background: url('/@/assets/images/vent/home/tosmall.png') no-repeat center;
-            background-size: 100% 100%;
-            position: absolute;
-            z-index: 99999;
-            bottom: 30px;
-            right: 30px;
-          }
+          background: url('../../../../assets/images/home-container/dialog1.png') no-repeat;
+          background-size: 100% 100%;
         }
       }
 
-      .wind-box {
+      .right-content {
         display: flex;
+        flex-direction: column;
+        justify-content: space-between;
         flex: 1;
-        width: 100%;
-        background: url('../../../../assets/images/home-container/dialog1.png') no-repeat;
-        background-size: 100% 100%;
-      }
-    }
+        height: 100%;
 
-    .right-content {
-      display: flex;
-      flex-direction: column;
-      justify-content: space-between;
-      flex: 1;
-      height: 100%;
-
-      .monitor-box {
-        display: flex;
-        flex: 1;
-        width: 100%;
-        background: url('../../../../assets/images/home-container/dialog.png') no-repeat;
-        background-size: 100% 100%;
-      }
+        .monitor-box {
+          display: flex;
+          flex: 1;
+          width: 100%;
+          background: url('../../../../assets/images/home-container/dialog.png') no-repeat;
+          background-size: 100% 100%;
+        }
 
-      .monitor-box1 {
-        margin: 10px 0px;
+        .monitor-box1 {
+          margin: 10px 0px;
+        }
       }
     }
   }
-}
 
-// #__qiankun_microapp_wrapper_for_micro_vent_3_d_modal__{
-//   width: 100% !important;
-//   height: 100% !important;
-// }</style>
+  // #__qiankun_microapp_wrapper_for_micro_vent_3_d_modal__{
+  //   width: 100% !important;
+  //   height: 100% !important;
+  // }
+</style>

+ 2 - 2
src/views/vent/monitorManager/deviceMonitor/components/device/device.data.ts

@@ -491,7 +491,7 @@ export const haveHandlerArr = [
 
   // 'firemon',
 ]; // table无操作
-export const noWarningArr = ['location', 'vehicle', 'cheliang']; // 无预警详情的
+export const noWarningArr = ['location', 'vehicle', 'cheliang', 'majorpath']; // 无预警详情的
 export const haveSysDetailArr = ['forcFan', 'pulping']; //有场景详情的
 // export const haveSysDetailArr = ['']; //有场景详情的
-export const noHistoryArr = () => (History_Type['type'] == 'remote' ? ['surface_history'] : []);
+export const noHistoryArr = () => (History_Type['type'] == 'remote' ? ['surface_history', 'majorpath'] : ['majorpath']);

+ 2 - 2
src/views/vent/monitorManager/gateMonitor/gate.threejs.ts

@@ -163,8 +163,8 @@ export function computePlay(data, maxarea, isFirst = false) {
     rotationParam.backRightDeg0 = (90 / maxarea) * Number(isFirst ? 0 : data.rearPresentValue2);
     rotationParam.backLeftDeg1 = (90 / maxarea) * Number(data.frontPresentValue2) || 0;
     rotationParam.backRightDeg1 = (90 / maxarea) * Number(data.rearPresentValue2) || 0;
-    fm2.playWindow.call(fm3, rotationParam, 1);
-    fm2.playWindow.call(fm3, rotationParam, 2);
+    fmWindow.playWindow(rotationParam, 1);
+    fmWindow.playWindow(rotationParam, 2);
   }
 }
 

+ 6 - 6
src/views/vent/monitorManager/gateMonitor/index.vue

@@ -45,8 +45,8 @@
         <div v-if="!hasPermission('btn:controlWindow') && selectData.deviceType != 'gate_ss'" class="button-box" @click="playAnimation(6)"
           >同时关闭</div
         >
-        <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(10)">前门前窗控制</div>
-        <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(11)">前门后窗控制</div>
+        <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(10)">A窗控制</div>
+        <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(11)">B窗控制</div>
       </div>
       <!-- 控制模式 -->
       <div class="top-right row" v-if="hasPermission('btn:remote')">
@@ -594,13 +594,13 @@
         break;
 
       case 10: // 风窗控制
-        modalTitle.value = '前门风窗控制';
+        modalTitle.value = 'A窗控制';
         modalType.value = '10';
         modalIsShow.value = true;
         break;
 
       case 11: // 风窗控制
-        modalTitle.value = '后门风窗控制';
+        modalTitle.value = 'B窗控制';
         modalType.value = '11';
         modalIsShow.value = true;
         break;
@@ -810,11 +810,11 @@
           selectData.autoRoManual = null;
         }
         break;
-      case '10': // 前门风窗控制
+      case '10': // 前(A)窗控制
         data.paramcode = 'frontSetValue';
         data.value = value;
         break;
-      case '11': // 后门风窗控制
+      case '11': // 后(B)窗控制
         data.paramcode = 'rearSetValue';
         data.value = value;
         break;

+ 9 - 0
src/views/vent/monitorManager/windowMonitor/index.vue

@@ -57,6 +57,7 @@
       <div class="top-right row">
         <div v-if="hasPermission('window:controlFull')" class="button-box" @click="setArea(5)">一键全开</div>
         <div v-if="hasPermission('window:controlFull')" class="button-box" @click="setArea(6)">一键全关</div>
+        <div class="button-box" @click="() => (linkAlarmShow = true)">预警指标</div>
         <!-- <div class="control-type row">
           <div class="control-title">控制模式:</div>
           <a-radio-group v-model:value="controlType">
@@ -181,6 +182,12 @@
   />
   <HandleModal :modal-is-show="modalIsShow" :modal-title="modalTitle" :modal-type="modalType" @handle-ok="handleOK" @handle-cancel="handleCancel" />
   <DeviceBaseInfo @register="regModal" :device-type="deviceType" />
+  <LinkControlDesModal
+    :modal-is-show="linkAlarmShow"
+    :modal-title="modalTitle"
+    :device-id="selectData.deviceID"
+    @close="() => (linkAlarmShow = false)"
+  />
 </template>
 
 <script setup lang="ts">
@@ -193,6 +200,7 @@
   import HandlerHistoryTable from '../comment/HandlerHistoryTable.vue';
   import HandleModal from './modal.vue';
   import DeviceBaseInfo from '../comment/components/DeviceBaseInfo.vue';
+  import LinkControlDesModal from '../comment/components/LinkControlDesModal.vue';
   import { mountedThree, destroy, addMonitorText, computePlay, setModelType, initCameraCanvas } from './window.threejs';
   import { list, getTableList, windControl } from './window.api';
   import { list as baseList } from '../../deviceManager/windWindowTabel/ventanalyWindow.api';
@@ -220,6 +228,7 @@
   });
 
   const modalIsShow = ref<boolean>(false); // 是否显示模态框
+  const linkAlarmShow = ref<boolean>(false); // 是否显示模态框
   const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
   const modalType = ref(''); // 模态框内容显示类型,设备操作类型
   const deviceType = ref('window');

+ 11 - 0
src/views/vent/sys/setting/setting.data.ts

@@ -57,6 +57,7 @@ export const formSchema: FormSchema[] = [
     label: '系统风格',
     component: 'RadioGroup',
     defaultValue: 1,
+    show: false,
     componentProps: {
       options: [
         {
@@ -94,4 +95,14 @@ export const formSchema: FormSchema[] = [
       fileMax: 1,
     },
   },
+  {
+    field: 'voiceAlarmType',
+    label: '语音报警协议类型',
+    component: 'Input',
+  },
+  {
+    field: 'voiceAlarmAddress',
+    label: '语音报警服务地址',
+    component: 'Input',
+  },
 ];