Selaa lähdekoodia

1. 瓦斯抽采单元数量更新

hongrunxia 4 kuukautta sitten
vanhempi
commit
0461e7dca5

+ 1 - 0
src/router/guard/permissionGuard.ts

@@ -73,6 +73,7 @@ export function createPermissionGuard(router: Router) {
       const url = new URL(window.location.href);
       const tokenStr = url.search.split('?token=')[1];
       await doTokenLogin(tokenStr);
+      return next({ path: to.fullPath, replace: true, query: to.query });
     }
     // 如果指定了需要模拟登录则执行模拟登录,覆盖原有的登录信息
     if (to.query[MOCK_LOGIN_URL_QUERY.key] === MOCK_LOGIN_URL_QUERY.val) {

+ 1 - 1
src/views/vent/gas/gasAssessment/components/gasControl.vue

@@ -26,7 +26,7 @@
       <div class="lr right-box" v-if="loading">
         <ventBox1 class="vent-margin-t-10">
           <template #title>
-            <div>阀门调控</div>
+            <div>阀门开度调控</div>
           </template>
           <template #container>
             <ListItem

+ 14 - 15
src/views/vent/gas/gasAssessment/gasAssessment.data.ts

@@ -1,17 +1,15 @@
 import { reactive, ref } from 'vue';
-import { BasicColumn } from '/@/components/Table';
 import echarts from '/@/utils/lib/echarts';
-import * as THREE from 'three';
 import { ModuleDataChart } from '/@/views/vent/deviceManager/configurationTable/types';
 
 export const monitorNav = [
   {
-    title: '达标评判监测',
+    title: '达标评判',
     pathName: 'gasAssessment',
     isShow: true,
   },
   {
-    title: '瓦斯智能调控',
+    title: '智能调控',
     pathName: 'gasControl',
     isShow: false,
   },
@@ -21,7 +19,7 @@ export const monitorNav = [
     isShow: false,
   },
   {
-    title: '管道参数监测',
+    title: '管道监测',
     pathName: 'gasPiping',
     isShow: false,
   },
@@ -30,6 +28,11 @@ export const monitorNav = [
     pathName: 'gasVideo',
     isHover: false,
   },
+  // {
+  //   title: '故障诊断',
+  //   pathName: 'gasAlarm',
+  //   isHover: false,
+  // },
 ];
 
 export const echartsOption = reactive({
@@ -300,27 +303,27 @@ export const monitorValveData = [
   {
     title: '1#阀门',
     code: 'T0',
-    unit: 'KPa',
+    unit: '°',
   },
   {
     title: '2#阀门',
     code: 'T1',
-    unit: '%',
+    unit: '°',
   },
   {
     title: '3#阀门',
     code: 'T2',
-    unit: 'm³/min',
+    unit: '°',
   },
   {
     title: '4#阀门',
     code: 'CO2',
-    unit: '',
+    unit: '°',
   },
   {
     title: '5#阀门',
     code: 'gasC',
-    unit: 'ppm',
+    unit: '°',
   },
 ];
 
@@ -451,7 +454,7 @@ export const gasPumpValve = [
 
 export const gasUnitDetail = [
   {
-    title: '开日期',
+    title: '开日期',
     code: 'startDay',
     // unit: 'kPa',
   },
@@ -486,10 +489,6 @@ export const gasUnitDetail = [
     // unit: '万m³',
   },
   {
-    title: '累计混量',
-    code: 'unitTotalMass',
-  },
-  {
     title: '累计纯量',
     code: 'unit=Mass',
   },

+ 1 - 1
src/views/vent/gas/gasAssessment/index.vue

@@ -91,7 +91,7 @@
 
   // // 监测数据
   const selectData = ref([]);
-  const monitorDataGroupNum = ref(5);
+  const monitorDataGroupNum = ref(3);
   // // https获取监测数据
   let timer: null | NodeJS.Timeout = null;
   function getMonitor(flag?) {

+ 13 - 33
src/views/vent/gas/gasAssessment/threejs/gasAssessmen.threejs.base.ts

@@ -54,26 +54,6 @@ class GasAssessmen {
   render() {
     this.model.renderer?.render(this.model.scene as THREE.Scene, this.model.camera as THREE.PerspectiveCamera);
   }
-  // 绘制抽采单元
-  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;
-    const planeGeo = new THREE.PlaneGeometry();
-    planeGeo.applyMatrix4(new THREE.Matrix4().makeTranslation(-1, 0, 0));
-    for (let i = 0; i < n; i++) {
-      const material = new THREE.MeshBasicMaterial({ color: colors[i], transparent: true, opacity: 0.6, depthTest: false, depthWrite: false });
-      const plane = new THREE.Mesh(planeGeo, material);
-      plane.name = 'unit' + i;
-      plane.rotation.x = -Math.PI / 2;
-      plane.scale.set(lenScale - 0.001, 0.375, 1.0);
-      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];
@@ -88,7 +68,7 @@ class GasAssessmen {
     const sizeList = [
       {
         id: '111',
-        ratio: 0.2,
+        ratio: 0.5,
         color: colors.c1,
       },
       {
@@ -98,19 +78,19 @@ class GasAssessmen {
       },
       {
         id: '333',
-        ratio: 0.1,
-        color: colors.c4,
-      },
-      {
-        id: '444',
-        ratio: 0.2,
-        color: colors.c5,
-      },
-      {
-        id: '555',
         ratio: 0.2,
-        color: colors.c3,
+        color: colors.c4,
       },
+      // {
+      //   id: '444',
+      //   ratio: 0.2,
+      //   color: colors.c5,
+      // },
+      // {
+      //   id: '555',
+      //   ratio: 0.2,
+      //   color: colors.c3,
+      // },
     ];
     this.unitList = sizeList;
 
@@ -249,7 +229,7 @@ class GasAssessmen {
   };
   // 抽采单元内容显示
   setCss3D = () => {
-    const sizeList = [0.2, 0.3, 0.1, 0.2, 0.2];
+    const sizeList = [0.5, 0.3, 0.2];
     // const sizeList = [0.4, 0.5, 0.1];
     // width = 7.713 height =3.717
     let leftW = 0;

+ 7 - 0
src/views/vent/gas/gasAssessment/threejs/gasAssessmen.threejs.ts

@@ -55,6 +55,13 @@ const render = () => {
   }
 };
 
+export const setCss3D = () => {
+  workFaceObj?.setCss3D();
+};
+export const clearCss3D = () => {
+  workFaceObj?.clearCss3D();
+};
+
 // 切换风窗类型
 export const setModelType = (type, n = Math.ceil(Math.random() * 4)) => {
   return new Promise((resolve) => {