Browse Source

1. 修改场景管理中场景编辑时无法获取到需风量地点、回风系统等信息
2. 布尔台压风系统添加字段

hongrunxia 8 months ago
parent
commit
06725ba521

+ 18 - 23
src/views/vent/deviceManager/workingFace/index.vue

@@ -20,20 +20,20 @@
 
 <script lang="ts" name="system-user" setup>
   //ts语法
-  import { ref, onMounted } from 'vue'
+  import { ref, onMounted } from 'vue';
   import CustomNormalTable from './CustomNormalTable.vue';
   import { searchFormSchema, commentFormSchema } from './workingFace.data';
   import { list, deleteById, batchDeleteById, saveOrUpdate } from './workingFace.api';
 
   import { FormSchema } from '/@/components/Table';
   import { getFormSchemaColumns } from '/@/hooks/web/useWebColumns';
-  
-  const formSchema = ref<FormSchema[]>([])
-  const isRefresh = ref(false)
 
-  const arrToFormColumns = (tableHeaderColumns = []) => {
+  const formSchema = ref<FormSchema[]>([]);
+  const isRefresh = ref(false);
+
+  const arrToFormColumns = (tableHeaderColumns = [], strtype) => {
     const columnList: any[] = [];
-    if(tableHeaderColumns.length > 0){
+    if (tableHeaderColumns.length > 0) {
       tableHeaderColumns.forEach((item: any) => {
         let columnsItem;
         if (item.type == 1 || item.type == 10) {
@@ -74,30 +74,25 @@
           }
         }
         columnList.push(columnsItem);
-        formSchema.value = [...commentFormSchema, ...columnList]
+        formSchema.value = [...commentFormSchema(strtype), ...columnList];
       });
-    }else{
-      formSchema.value = commentFormSchema as any[]
+    } else {
+      formSchema.value = commentFormSchema(strtype) as any[];
     }
   };
 
   const changeFormItems = (data) => {
-    if(data && data['strtype']){
-      const formSchemaColumns = getFormSchemaColumns(`${data['strtype']}_edit`) || []
-      arrToFormColumns(formSchemaColumns)
-      isRefresh.value = true
-    }else{
-
-      formSchema.value = commentFormSchema as any[]
-      isRefresh.value = true
+    if (data && data['strtype']) {
+      const formSchemaColumns = getFormSchemaColumns(`${data['strtype']}_edit`) || [];
+      arrToFormColumns(formSchemaColumns, data['strtype']);
+      isRefresh.value = true;
+    } else {
+      formSchema.value = commentFormSchema(data['strtype']) as any[];
+      isRefresh.value = true;
     }
-  }
-
-  onMounted(() => {
-    
-  })
-
+  };
 
+  onMounted(() => {});
 </script>
 
 <style scoped></style>

+ 13 - 2
src/views/vent/deviceManager/workingFace/workingFace.api.ts

@@ -6,8 +6,14 @@ enum Api {
   save = '/safety/ventanalyManageSystem/add',
   edit = '/safety/ventanalyManageSystem/edit',
   modalList = '/ventanaly-model/Vmodel/ventanalyModel/list',
-  huifengids = '/safety/ventanalyManageSystem/queryHuifengList',
+  huifengids = '/ventanaly-jingtaifengliang/xufengController/getXufengHuifengJingtai',
   xufengids = '/safety/ventanalyManageSystem/queryXufengliangList',
+  caimei = '/ventanaly-jingtaifengliang/xufengController/getXufengCaimeiInfoJingtai',
+  juejin = '/ventanaly-jingtaifengliang/xufengController/getXufengJuejinInfoJingtai',
+  dongshi = '/ventanaly-jingtaifengliang/xufengController/getXufengDongshiInfoJingtai',
+  cheliang = '/ventanaly-jingtaifengliang/xufengController/getXufengCheliangiInfoJingtai',
+  qita = '/ventanaly-jingtaifengliang/xufengController/getXufengOtherInfoJingtai',
+  beiyong = '/ventanaly-jingtaifengliang/xufengController/getXufengBeiyongInfoJingtai',
   getDeviceIds = '/safety/ventanalyMonitorParams/getdevices',
   deleteById = '/safety/ventanalyManageSystem/delete',
   deleteBatch = '/sys/user/deleteBatch',
@@ -45,7 +51,12 @@ export const huifengids = (params) => defHttp.post({ url: Api.huifengids, params
  * 列表接口
  * @param params
  */
-export const xufengids = (params) => defHttp.post({ url: Api.xufengids, params });
+export const caimei = (params) => defHttp.post({ url: Api.caimei, params });
+export const juejin = (params) => defHttp.post({ url: Api.juejin, params });
+export const dongshi = (params) => defHttp.post({ url: Api.dongshi, params });
+export const cheliang = (params) => defHttp.post({ url: Api.cheliang, params });
+export const qita = (params) => defHttp.post({ url: Api.qita, params });
+export const beiyong = (params) => defHttp.post({ url: Api.beiyong, params });
 
 /**
  * 列表接口

+ 166 - 147
src/views/vent/deviceManager/workingFace/workingFace.data.ts

@@ -1,6 +1,6 @@
 import { BasicColumn } from '/@/components/Table';
 import { FormSchema } from '/@/components/Table';
-import { list, modalList, huifengids, xufengids, getDeviceIds } from './workingFace.api';
+import { list, modalList, huifengids, beiyong, qita, cheliang, dongshi, juejin, caimei } from './workingFace.api';
 
 export const columns: BasicColumn[] = [
   {
@@ -69,163 +69,182 @@ export const searchFormSchema: FormSchema[] = [
     field: 'systemname',
     component: 'Input',
     colProps: { span: 6 },
-  }
+  },
 ];
 
-export const commentFormSchema: FormSchema[] = [
-  {
-    label: '',
-    field: 'id',
-    component: 'Input',
-    show: false,
-  },
-  {
-    label: '系统名称',
-    field: 'systemname',
-    component: 'Input',
-  },
-  {
-    label: '系统Code',
-    field: 'code',
-    component: 'Input',
-  },
-  {
-    label: '系统类型',
-    field: 'strtype',
-    component: 'JDictSelectTag',
-    required: true,
-    componentProps: {
-      disabled: true,
-      dictCode: 'syskind',
-      placeholder: '请选择系统型号',
+export const commentFormSchema = (strtype) => {
+  return [
+    {
+      label: '',
+      field: 'id',
+      component: 'Input',
+      show: false,
     },
-  },
-  {
-    label: '模型ID',
-    field: 'nmodelid',
-    component: 'ApiSelect',
-    componentProps: () => {
-      return {
-        api: modalList,
-        resultField: 'records',
-        labelField: 'strmodelname',
-        valueField: 'nmodelid',
-      };
+    {
+      label: '系统名称',
+      field: 'systemname',
+      component: 'Input',
     },
-  },
-  {
-    label: '控制策略',
-    field: 'workmode',
-    component: 'JDictSelectTag',
-    componentProps: {
-      dictCode: 'workmode',
-      placeholder: '请选择控制策略',
-      stringToNumber: true,
+    {
+      label: '系统Code',
+      field: 'code',
+      component: 'Input',
     },
-  },
-  {
-    label: '监测类型',
-    field: 'monitorflag_dictText',
-    component: 'JDictSelectTag',
-    componentProps: {
-      dictCode: 'monitorflag',
-      placeholder: '请选择状态',
+    {
+      label: '系统类型',
+      field: 'strtype',
+      component: 'JDictSelectTag',
+      defaultValue: strtype,
+      required: true,
+      componentProps: {
+        disabled: true,
+        dictCode: 'syskind',
+        placeholder: '请选择系统型号',
+      },
     },
-  },
-  {
-    label: '风向',
-    field: 'windkind',
-    component: 'JDictSelectTag',
-    componentProps: {
-      dictCode: 'winddir',
-      placeholder: '请选择风向',
-      stringToNumber: true,
+    {
+      label: '模型ID',
+      field: 'nmodelid',
+      component: 'ApiSelect',
+      componentProps: () => {
+        return {
+          api: modalList,
+          resultField: 'records',
+          labelField: 'strmodelname',
+          valueField: 'nmodelid',
+        };
+      },
     },
-  },
-  {
-    label: '所属回风系统',
-    field: 'huifengid',
-    component: 'ApiSelect',
-    componentProps: () => {
-      return {
-        api: huifengids,
-        labelField: 'huifengName',
-        valueField: 'id',
-      };
+    {
+      label: '控制策略',
+      field: 'workmode',
+      component: 'JDictSelectTag',
+      componentProps: {
+        dictCode: 'workmode',
+        placeholder: '请选择控制策略',
+        stringToNumber: true,
+      },
     },
-  },
-  {
-    label: '关联需风量地点',
-    field: 'xufengliangid',
-    component: 'ApiSelect',
-    componentProps: () => {
-      return {
-        api: xufengids,
-        labelField: 'strmodelname',
-        valueField: 'nmodelid',
-      };
+    {
+      label: '监测类型',
+      field: 'monitorflag_dictText',
+      component: 'JDictSelectTag',
+      componentProps: {
+        dictCode: 'monitorflag',
+        placeholder: '请选择状态',
+      },
     },
-  },
-  {
-    label: '模型类型',
-    field: 'strsystype',
-    component: 'JDictSelectTag',
-    componentProps: ({ formModel }) => {
-      if (formModel['strtype']) {
-        console.log('场景类型---->', formModel['strtype']);
+    {
+      label: '风向',
+      field: 'windkind',
+      component: 'JDictSelectTag',
+      componentProps: {
+        dictCode: 'winddir',
+        placeholder: '请选择风向',
+        stringToNumber: true,
+      },
+    },
+    {
+      label: '所属回风系统',
+      field: 'huifengid',
+      component: 'ApiSelect',
+      componentProps: () => {
         return {
-          dictCode: `${formModel['strtype']}_modal`,
-          placeholder: '请选择模型类型',
+          api: huifengids,
+          labelField: 'huifeng_name',
+          valueField: 'id',
+          resultField: 'obj',
         };
-      }
-      return {
-        options: [],
-      };
+      },
     },
-  },
-  {
-    label: '是否绑定采空区',
-    field: 'linkEmptyFlag',
-    component: 'RadioGroup',
-    defaultValue: 0,
-    componentProps: ({ formActionType }) => {
-      return {
-        options: [
-          { label: '绑定采空区', value: 1, key: '1' },
-          { label: '不绑定', value: 0, key: '2' },
-        ],
-        onChange: (e: any) => {
-          const { updateSchema } = formActionType;
-          updateSchema({
-            field: 'linkEmpty',
-            label: '绑定采空区ID',
-            component: 'ApiSelect',
-            show: e.target.value == 1 ? true : false,
-            componentProps: () => {
-              return {
-                api: list.bind(null, { strtype: 'sys_empty', pageSize: 1000 }),
-                labelField: 'systemname',
-                valueField: 'id',
-                resultField: 'records',
-              };
-            },
-          });
-        },
-      };
+    {
+      label: '关联需风量地点',
+      field: 'xufengliangid',
+      component: 'ApiSelect',
+      componentProps: ({ formModel }) => {
+        let api;
+        if (formModel['strtype'] == 'sys_dongshi') {
+          api = dongshi;
+        } else if (formModel['strtype'] == 'sys_other') {
+          api = qita;
+        } else if (formModel['strtype'] == 'sys_cheliang') {
+          api = cheliang;
+        } else if (formModel['strtype'] == 'sys_surface_juejin') {
+          api = juejin;
+        } else if (formModel['strtype'] == 'sys_surface_caimei') {
+          api = caimei;
+        } else if (formModel['strtype'] == 'sys_surface_beiyong') {
+          api = beiyong;
+        }
+        return {
+          api: api.bind(null, { id: formModel['huifengid'] }),
+          labelField: 'work_name',
+          valueField: 'id',
+          resultField: 'obj',
+        };
+      },
     },
-  },
-  {
-    label: '绑定采空区ID',
-    field: 'linkEmpty',
-    component: 'ApiSelect',
-    show: false,
-    componentProps: () => {
-      return {
-        api: list.bind(null, { strtype: 'sys_empty', pageSize: 1000 }),
-        labelField: 'systemname',
-        valueField: 'id',
-        resultField: 'records',
-      };
+    {
+      label: '模型类型',
+      field: 'strsystype',
+      component: 'JDictSelectTag',
+      componentProps: ({ formModel }) => {
+        if (formModel['strtype']) {
+          console.log('场景类型---->', formModel['strtype']);
+          return {
+            dictCode: `${formModel['strtype']}_modal`,
+            placeholder: '请选择模型类型',
+          };
+        }
+        return {
+          options: [],
+        };
+      },
     },
-  },
-];
+    {
+      label: '是否绑定采空区',
+      field: 'linkEmptyFlag',
+      component: 'RadioGroup',
+      defaultValue: 0,
+      componentProps: ({ formActionType }) => {
+        return {
+          options: [
+            { label: '绑定采空区', value: 1, key: '1' },
+            { label: '不绑定', value: 0, key: '2' },
+          ],
+          onChange: (e: any) => {
+            const { updateSchema } = formActionType;
+            updateSchema({
+              field: 'linkEmpty',
+              label: '绑定采空区ID',
+              component: 'ApiSelect',
+              show: e.target.value == 1 ? true : false,
+              componentProps: () => {
+                return {
+                  api: list.bind(null, { strtype: 'sys_empty', pageSize: 1000 }),
+                  labelField: 'systemname',
+                  valueField: 'id',
+                  resultField: 'records',
+                };
+              },
+            });
+          },
+        };
+      },
+    },
+    {
+      label: '绑定采空区ID',
+      field: 'linkEmpty',
+      component: 'ApiSelect',
+      show: false,
+      componentProps: () => {
+        return {
+          api: list.bind(null, { strtype: 'sys_empty', pageSize: 1000 }),
+          labelField: 'systemname',
+          valueField: 'id',
+          resultField: 'records',
+        };
+      },
+    },
+  ];
+};

+ 4 - 2
src/views/vent/monitorManager/camera/index.vue

@@ -409,8 +409,10 @@ function goFullScreen(domId) {
 function clearCamera() {
   const num = webRtcServerList.length
   for (let i = 0; i < num; i++) {
-    webRtcServerList[i].disconnect()
-    webRtcServerList[i] = null
+    if(webRtcServerList[i]){
+      webRtcServerList[i].disconnect()
+      webRtcServerList[i] = null
+    }
   }
   for (let i = 0; i < playerList.value.length; i++) {
     const player = playerList.value[i]

+ 1 - 1
src/views/vent/monitorManager/deviceMonitor/components/network/index.vue

@@ -185,7 +185,7 @@
             </BorderBox11>
           </div>
           <div class="bottom-right bottom-lr-box">
-            <BorderBox11 class="border-bg" title="最大阻力路线" :color="['#00FFFF']" backgroundColor="#00bfff15">
+            <BorderBox11 class="border-bg" title="关键阻力路线" :color="['#00FFFF']" backgroundColor="#00bfff15">
               <div class="zl-top">
                 <div v-if="maxPaths.length > 0">
                   <template v-for="index in maxPaths.length" :key="index">

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

@@ -500,7 +500,7 @@ class Fm2 {
         this.model.animate();
         if (this.model.camera && this.model.camera.layers.mask == -1) this.model.camera.layers.toggle(1);
         resolve(null);
-        this.initCamera(playerDom);
+        // this.initCamera(playerDom);
       });
     });
   }

+ 12 - 8
src/views/vent/monitorManager/nitrogen/components/nitrogenHome.vue

@@ -89,7 +89,7 @@
       </div>
     </div>
     <div class="total-data">
-      <div class="vent-flex-row">
+      <div class="vent-flex-row item-box">
         <div class="item" v-for="(data, index) in totalData" :key="index"
           >{{ data.title + '(' + data.unit + ')' }}:<span class="val">{{
             monitorData[data.code] ? formatNum(monitorData[data.code]) : '-'
@@ -490,11 +490,15 @@
       right: 30px;
       // display: flex;
       font-size: 18px;
-      .item {
-        width: 200px;
-        margin-left: 30px;
-        .val {
-          color: #00d8ff;
+      .item-box {
+        width: 600px;
+        flex-wrap: wrap;
+        .item {
+          width: 250px;
+          margin-left: 30px;
+          .val {
+            color: #00d8ff;
+          }
         }
       }
     }
@@ -871,10 +875,10 @@
     .playerBox {
       z-index: 9999;
       position: fixed;
-      top: 200px;
+      // top: 200px;
       right: 15px;
       width: 100%;
-      height: 100%;
+      height: calc(100% - 100px);
       overflow-y: auto;
       margin: auto;
       pointer-events: none;

+ 2 - 2
src/views/vent/monitorManager/nitrogen/nitrogen.data.1.ts

@@ -59,8 +59,8 @@ export const bottomBtnList = ref([
 ]);
 
 export async function getMonitorData() {
-  const { sysOrgCode } = useGlobSetting();
-  // const sysOrgCode = 'sdmtjtswmk';
+  // const { sysOrgCode } = useGlobSetting();
+  const sysOrgCode = 'sdmtjtbetmk';
   switch (sysOrgCode) {
     case 'yjmdsankuang': // 窑街三矿
       return await import('./nitrogen.dataYJ');

+ 17 - 2
src/views/vent/monitorManager/nitrogen/nitrogen.dataBet.ts

@@ -74,8 +74,23 @@ export const preFanMonitorData = [
 ];
 export const totalData = [
   {
-    title: '总压力',
-    code: 'MainPipePressure',
+    title: '压1出风流量',
+    code: 'PreSys_TotalOutPipeFlow1',
+    unit: 'm³/min',
+  },
+  {
+    title: '压2出风流量',
+    code: 'PreSys_TotalOutPipeFlow2',
+    unit: 'm³/min',
+  },
+  {
+    title: '压1出风压力',
+    code: 'PreSys_TotalOutPipePre1',
+    unit: 'bar',
+  },
+  {
+    title: '压2出风压力',
+    code: 'PreSys_TotalOutPipePre2',
     unit: 'bar',
   },
 ];