Browse Source

1.风门动画速度调整
2.监测echarts组件历史接口调整
3.安全监控bug修改

hongrunxia 10 months ago
parent
commit
eaff7886c3
26 changed files with 996 additions and 1110 deletions
  1. 2 2
      public/js/config.js
  2. 2 2
      src/components/chart/BarAndLine.vue
  3. 1 2
      src/utils/threejs/useEvent.ts
  4. 1 1
      src/views/vent/comment/threejs/Smoke.ts
  5. 0 1
      src/views/vent/deviceManager/substationTabel/substation.data.ts
  6. 0 0
      src/views/vent/home/billboard/billboard.api.ts
  7. 0 43
      src/views/vent/home/billboard/components/ArrowButton.vue
  8. 0 52
      src/views/vent/home/billboard/components/BaseCard.vue
  9. 0 41
      src/views/vent/home/billboard/components/CommonTitle.vue
  10. 0 31
      src/views/vent/home/billboard/components/FireStatus.vue
  11. 14 15
      src/views/vent/home/clique/components/3Dmap/index.vue
  12. 14 14
      src/views/vent/home/clique/components/icon-light.vue
  13. 79 66
      src/views/vent/monitorManager/comment/DeviceEcharts.vue
  14. 4 4
      src/views/vent/monitorManager/compressor/nitrogen.data.ts
  15. 409 401
      src/views/vent/monitorManager/deviceMonitor/components/device/modal/fiber.sjh.vue
  16. 1 0
      src/views/vent/monitorManager/gateMonitor/gate.threejs.ts
  17. 2 2
      src/views/vent/monitorManager/gateMonitor/gate.threejs.two.yj.ts
  18. 2 2
      src/views/vent/monitorManager/gateMonitor/gate.threejs.yj.ts
  19. 3 3
      src/views/vent/monitorManager/mainFanMonitor/index.vue
  20. 2 0
      src/views/vent/monitorManager/mainFanMonitor/main.threejs.ts
  21. 16 5
      src/views/vent/monitorManager/mainFanMonitor/mainWind.threejs.ts
  22. 4 4
      src/views/vent/monitorManager/safetyMonitor/index.vue
  23. 3 2
      src/views/vent/monitorManager/windrectMonitor/components/modalTable.vue
  24. 8 15
      src/views/vent/monitorManager/windrectMonitor/index.vue
  25. 6 0
      src/views/vent/monitorManager/windrectMonitor/windrect.data.ts
  26. 423 402
      src/views/vent/performance/fileDetail/index.vue

+ 2 - 2
public/js/config.js

@@ -3,8 +3,8 @@ const VUE_APP_URL = {
   webRtcUrl: '/webRtc' // rtsp服务器IP地址
 }
 const History_Type = {
-  type: 'remote', // remote、vent  (remote 代表的是历史查询走的装备院的接口,vent是走的咱们的,目前神东的项目都用remote, 其他矿用vent)
-  // type: 'vent', // remote、vent
+  // type: 'remote', // remote、vent  (remote 代表的是历史查询走的装备院的接口,vent是走的咱们的,目前神东的项目都用remote, 其他矿用vent)
+  type: 'vent', // remote、vent
   deviceType: []
 }
 

+ 2 - 2
src/components/chart/BarAndLine.vue

@@ -80,7 +80,7 @@
       let optionUtil;
 
       watchEffect(() => {
-        props.dataSource && props.dataSource.length > 0 && option.series && initCharts();
+        props.dataSource && option.series && initCharts();
       });
 
       watch([() => props.chartsType, () => props.chartsColumns], ([newChartsType, newChartsColumns]) => {
@@ -100,7 +100,7 @@
       initChartsOption();
 
       function initCharts(isRefresh = false) {
-        // debugger;
+        debugger;
         //轴数据
         if (option.series && option.series.length === chartsColumns.length) {
           let xAxisData = props.dataSource.map((item) => item[props.xAxisPropType]);

+ 1 - 2
src/utils/threejs/useEvent.ts

@@ -4,7 +4,7 @@ import UseThree from './useThree';
 import gsap from 'gsap';
 
 export default function useEvent() {
-  let point = <THREE.Vector3 | null>null;
+  const point = <THREE.Vector3 | null>null;
   let intersect0: THREE.Intersection | null | undefined;
 
   let startTime: number = 0;
@@ -167,4 +167,3 @@ export default function useEvent() {
 
   return { mouseDownFn, mouseUpFn, mousemoveFn };
 }
-

+ 1 - 1
src/views/vent/comment/threejs/Smoke.ts

@@ -180,6 +180,7 @@ export default class Smoke {
           setTimeout(function () {
             if (self.frameId) cancelAnimationFrame(self.frameId);
             self.frameId = 0;
+            self.geometry.setAttribute('position', new THREE.BufferAttribute(new Float32Array([]), 3)); // 一个顶点由3个坐标构成
             resolve(null);
           }, 10);
         },
@@ -190,7 +191,6 @@ export default class Smoke {
     if (this.frameId) {
       cancelAnimationFrame(this.frameId);
     }
-
     const material = this.points.material;
     for (const key of Object.keys(material)) {
       const value = material[key];

+ 0 - 1
src/views/vent/deviceManager/substationTabel/substation.data.ts

@@ -187,7 +187,6 @@ export const formSchema: FormSchema[] = [
     label: 'reqHeader请求头',
     field: 'reqHeader',
     component: 'Input',
-    show: false,
   },
   {
     label: '请求参数或读取文件名',

+ 0 - 0
src/views/vent/home/billboard/billboard.api.ts


+ 0 - 43
src/views/vent/home/billboard/components/ArrowButton.vue

@@ -1,43 +0,0 @@
-<!-- eslint-disable vue/multi-word-component-names -->
-<template>
-  <div class="arrow-button" :class="`point-to-${pointTo}`" @click="$emit('click')"></div>
-</template>
-<script lang="ts" setup>
-  /** 箭头按钮,宽高固定 90 * 76 */
-  withDefaults(
-    defineProps<{
-      pointTo: 'left' | 'right' | 'bottom' | 'top';
-    }>(),
-    {
-      pointTo: 'left',
-    }
-  );
-
-  defineEmits(['click']);
-</script>
-<style lang="less" scoped>
-  .arrow-button {
-    height: 90px;
-    width: 76px;
-    background-image: url('@/assets/images/company/arrow-button.png');
-    background-size: 100% auto;
-    background-repeat: no-repeat;
-  }
-
-  .arrow-button:hover {
-    background-image: url('@/assets/images/company/arrow-button-hover.png');
-  }
-
-  .point-to-left {
-    transform: rotate(0deg);
-  }
-  .point-to-right {
-    transform: rotate(180deg);
-  }
-  .point-to-top {
-    transform: rotate(90deg);
-  }
-  .point-to-bottom {
-    transform: rotate(270deg);
-  }
-</style>

+ 0 - 52
src/views/vent/home/billboard/components/BaseCard.vue

@@ -1,52 +0,0 @@
-<!-- eslint-disable vue/multi-word-component-names -->
-<template>
-  <div class="card" :style="{ height: `${height}px` }">
-    <p class="card_title" @click="alert">
-      <slot name="title">{{ title }}</slot>
-    </p>
-    <div class="card_content" :style="{ height: `${contentHeight}px` }">
-      <slot></slot>
-    </div>
-  </div>
-</template>
-<script lang="ts" setup>
-  // import mapComponent from './components/3Dmap/index.vue';
-
-  withDefaults(
-    defineProps<{
-      title: string;
-      /** 卡片总体的高度 */
-      height?: number;
-      /** 卡片内容部分的高度 */
-      contentHeight?: number;
-    }>(),
-    {
-      height: 370,
-      contentHeight: 300,
-    }
-  );
-
-  function alert() {
-    window.alert('123');
-  }
-</script>
-<style lang="less" scoped>
-  @font-face {
-    font-family: 'douyuFont';
-    src: url('@/assets/font/douyuFont.otf');
-  }
-
-  .card {
-    background: url('@/assets/images/company/area-card4.png') no-repeat;
-    background-size: 100% 100%;
-    padding: 2px 20px 0 20px;
-    text-align: center;
-  }
-  .card_title {
-    margin-top: 10px;
-    font-family: 'douyuFont';
-  }
-  .card_content {
-    padding: 10px 0 0 0;
-  }
-</style>

+ 0 - 41
src/views/vent/home/billboard/components/CommonTitle.vue

@@ -1,41 +0,0 @@
-<!-- eslint-disable vue/multi-word-component-names -->
-<template>
-  <div class="common-title flex justify-between">
-    <div>
-      <slot name="label">{{ label }}</slot>
-    </div>
-    <div class="common-title__value">
-      <slot name="value">{{ value }}</slot>
-    </div>
-  </div>
-</template>
-<script lang="ts" setup>
-  withDefaults(
-    defineProps<{
-      label: string;
-      value?: string;
-    }>(),
-    {
-      value: '/',
-    }
-  );
-
-  defineEmits(['click']);
-</script>
-<style lang="less" scoped>
-  @import '@/design/vent/color.less';
-
-  .common-title {
-    height: 30px;
-    line-height: 30px;
-    padding-left: 58px;
-    box-sizing: border-box;
-    background: url('@/assets/images/company/lentj.png') no-repeat center;
-    background-size: 100% 100%;
-  }
-
-  .common-title__value {
-    color: @vent-gas-primary-text;
-    padding-right: 10px;
-  }
-</style>

+ 0 - 31
src/views/vent/home/billboard/components/FireStatus.vue

@@ -1,31 +0,0 @@
-<!-- eslint-disable vue/multi-word-component-names -->
-<template>
-  <CommonTitle class="mb-10px" label="矿井火灾风险性等级" :value="risk" />
-  <ListItem
-    v-for="(item, i) in FIRE_STATUS_LIST"
-    :key="item.icon"
-    :icon="item.icon"
-    :label="item.label"
-    :value="data[item.prop]"
-    :type="i % 2 ? 'green' : 'blue'"
-    class="mt-5px"
-  />
-</template>
-<script lang="ts" setup>
-  import { ref } from 'vue';
-  import CommonTitle from './CommonTitle.vue';
-  import ListItem from './ListItem.vue';
-  import { FIRE_STATUS_LIST } from '../billboard.data';
-
-  const risk = ref('低风险');
-
-  const data = ref({
-    a: '正常',
-    b: '正常',
-    c: '正常',
-    d: '正常',
-    e: '正常',
-    f: '22℃',
-  });
-</script>
-<style lang="less" scoped></style>

+ 14 - 15
src/views/vent/home/clique/components/3Dmap/index.vue

@@ -16,86 +16,85 @@
 
   const locationInfo = [
     {
-      // name: '保德矿',
+      // name: 'bd',
       name: '矿矿矿',
       code: 'bd',
       value: [111.102548, 38.951875],
     },
     {
-      // name: '锦界矿',
+      // name: 'jj',
       name: '矿矿矿',
       code: 'jj',
       value: [110.174801, 38.742404],
     },
     {
-      // name: '榆家梁矿',
+      // name: 'yjl',
       name: '矿矿矿',
       code: 'yjl',
       value: [110.526055, 39.044234],
     },
     {
-      // name: '大柳塔矿',
+      // name: 'dlt',
       name: '矿矿矿',
       code: 'dlt',
       value: [110.245165, 39.259314],
     },
     // {
-    //   name: '神东煤炭集团',
+    //   name: 'sd',
     //   value: [110.216401, 39.276499],
     // },
     {
-      // name: '上湾矿',
+      // name: 'sw',
       name: '矿矿矿',
       code: 'sw',
       value: [110.191364, 39.290282],
     },
     {
-      // name: '哈拉沟矿',
+      // name: 'hlg',
       name: '矿矿矿',
       code: 'hlg',
       value: [110.207022, 39.308751],
     },
     {
-      // name: '补连塔矿',
+      // name: 'blt',
       name: '矿矿矿',
       code: 'blt',
       value: [110.173867, 39.358305],
     },
     {
-      // name: '石圪台矿',
+      // name: 'sgt',
       name: '矿矿矿',
       code: 'sgt',
       value: [110.136362, 39.418578],
     },
 
     {
-      // name: '寸草塔矿',
+      // name: 'cct',
       name: '矿矿矿',
       code: 'cct',
       value: [110.107954, 39.436366],
     },
     {
-      // name: '乌兰木伦矿',
+      // name: 'wlml',
       name: '矿矿矿',
       code: 'wlml',
       value: [110.102314, 39.456531],
     },
 
     {
-      // name: '布尔台矿',
+      // name: 'bet',
       name: '矿矿矿',
       code: 'bet',
       value: [110.066138, 39.480941],
     },
     {
-      // name: '寸草塔二矿',
+      // name: 'cce',
       name: '矿矿矿',
       code: 'ccte',
       value: [110.059497, 39.505482],
     },
     {
-      // name: '柳塔矿',
-      // name: '柳塔矿',
+      // name: 'lt',
       name: '矿矿矿',
       code: 'lt',
       value: [110.094463, 39.536514],

+ 14 - 14
src/views/vent/home/clique/components/icon-light.vue

@@ -18,20 +18,20 @@
   const unselectBgPath = getAssetURL('company/home/unselect-bg.png');
   const selectBgPath = getAssetURL('company/home/select-bg.png');
   let pointList = ref<any[]>([
-    // { code: 'liuTa', imgSrc: unselectBgPath, label: '柳塔矿', leftV: '327px', topV: '40px', textColor: '#fff' },
-    // { code: 'cunCaoErTa', imgSrc: unselectBgPath, label: '寸草塔二矿', leftV: '291px', topV: '69px', textColor: '#fff' },
-    // { code: 'buErTaiTa', imgSrc: selectBgPath, label: '布尔台矿', leftV: '286px', topV: '97px', textColor: 'rgba(255, 231, 83,.9)' },
-    // { code: 'wuLunTa', imgSrc: unselectBgPath, label: '乌兰木伦矿', leftV: '327px', topV: '115px', textColor: '#fff' },
-    // { code: 'cunCaoTa', imgSrc: selectBgPath, label: '寸草塔矿', leftV: '346px', topV: '132px', textColor: 'rgba(255, 231, 83,.9)' },
-    // { code: 'shiKanTa', imgSrc: unselectBgPath, label: '石坎台矿', leftV: '373px', topV: '149px', textColor: '#fff' },
-    // { code: 'buLieTa', imgSrc: selectBgPath, label: '补连塔矿', leftV: '408px', topV: '184px', textColor: 'rgba(255, 231, 83,.9)' },
-    // { code: 'haLaGouTa', imgSrc: unselectBgPath, label: '哈拉沟矿', leftV: '445px', topV: '214px', textColor: '#fff' },
-    // { code: 'shangWanTa', imgSrc: selectBgPath, label: '上湾矿', leftV: '439px', topV: '244px', textColor: 'rgba(255, 231, 83,.9)' },
-    // { code: 'huoJiTuTa', imgSrc: unselectBgPath, label: '活鸡兔井', leftV: '398px', topV: '265px', textColor: '#fff' },
-    // { code: 'daLiuTa', imgSrc: unselectBgPath, label: '大柳塔矿', leftV: '492px', topV: '260px', textColor: '#fff' },
-    // { code: 'jinJieTa', imgSrc: selectBgPath, label: '锦界矿', leftV: '565px', topV: '413px', textColor: 'rgba(255, 231, 83,.9)' },
-    // { code: 'yuJiaTa', imgSrc: unselectBgPath, label: '榆家梁矿', leftV: '669px', topV: '308px', textColor: '#fff' },
-    // { code: 'baoDeTa', imgSrc: selectBgPath, label: '宝德矿', leftV: '862px', topV: '340px', textColor: 'rgba(255, 231, 83,.9)' },
+    // { code: 'liuTa', imgSrc: unselectBgPath, label: 'lt', leftV: '327px', topV: '40px', textColor: '#fff' },
+    // { code: 'cunCaoErTa', imgSrc: unselectBgPath, label: 'cce', leftV: '291px', topV: '69px', textColor: '#fff' },
+    // { code: 'buErTaiTa', imgSrc: selectBgPath, label: 'bet', leftV: '286px', topV: '97px', textColor: 'rgba(255, 231, 83,.9)' },
+    // { code: 'wuLunTa', imgSrc: unselectBgPath, label: 'wlml', leftV: '327px', topV: '115px', textColor: '#fff' },
+    // { code: 'cunCaoTa', imgSrc: selectBgPath, label: 'cc', leftV: '346px', topV: '132px', textColor: 'rgba(255, 231, 83,.9)' },
+    // { code: 'shiKanTa', imgSrc: unselectBgPath, label: 'skt', leftV: '373px', topV: '149px', textColor: '#fff' },
+    // { code: 'buLieTa', imgSrc: selectBgPath, label: 'blt', leftV: '408px', topV: '184px', textColor: 'rgba(255, 231, 83,.9)' },
+    // { code: 'haLaGouTa', imgSrc: unselectBgPath, label: 'hlg', leftV: '445px', topV: '214px', textColor: '#fff' },
+    // { code: 'shangWanTa', imgSrc: selectBgPath, label: 'sw', leftV: '439px', topV: '244px', textColor: 'rgba(255, 231, 83,.9)' },
+    // { code: 'huoJiTuTa', imgSrc: unselectBgPath, label: 'hjt', leftV: '398px', topV: '265px', textColor: '#fff' },
+    // { code: 'daLiuTa', imgSrc: unselectBgPath, label: 'dlt', leftV: '492px', topV: '260px', textColor: '#fff' },
+    // { code: 'jinJieTa', imgSrc: selectBgPath, label: 'jj', leftV: '565px', topV: '413px', textColor: 'rgba(255, 231, 83,.9)' },
+    // { code: 'yuJiaTa', imgSrc: unselectBgPath, label: 'yjl', leftV: '669px', topV: '308px', textColor: '#fff' },
+    // { code: 'baoDeTa', imgSrc: selectBgPath, label: 'bd', leftV: '862px', topV: '340px', textColor: 'rgba(255, 231, 83,.9)' },
     { code: 'liuTa', imgSrc: unselectBgPath, label: 'XXX', leftV: '327px', topV: '40px', textColor: '#fff' },
     { code: 'cunCaoErTa', imgSrc: unselectBgPath, label: 'XXX', leftV: '291px', topV: '69px', textColor: '#fff' },
     { code: 'buErTaiTa', imgSrc: selectBgPath, label: 'XXX', leftV: '286px', topV: '97px', textColor: 'rgba(255, 231, 83,.9)' },

+ 79 - 66
src/views/vent/monitorManager/comment/DeviceEcharts.vue

@@ -20,7 +20,7 @@
     <div class="charts-box" v-else-if="chartsType === 'detail' && deviceListApi">
       <Select
         :options="options"
-        :fieldNames="{ label: 'strname', value: 'id' }"
+        :fieldNames="{ label: 'strname', value: 'deviceID' }"
         v-model:value="deviceId"
         placeholder="请选择查看的设备"
         size="small"
@@ -39,7 +39,7 @@
     <div class="charts-box" v-else-if="chartsType === 'history'">
       <Select
         :options="options"
-        :fieldNames="{ label: 'strname', value: 'id' }"
+        :fieldNames="{ label: 'strname', value: 'deviceID' }"
         v-model:value="deviceId"
         placeholder="请选择查看的设备"
         size="small"
@@ -47,30 +47,33 @@
       />
       <template v-if="globalConfig.History_Type == 'vent'">
         <a-date-picker
-          v-model:value="historyParams.tData"
-          valueFormat="YYYY-MM-DD"
-          placeholder="请选择查询日期"
+          v-model:value="historyParams.ttime_begin"
+          valueFormat="YYYY-MM-DD HH:mm:ss"
+          placeholder="请选择开始日期"
           size="small"
-          style="position: absolute; z-index: 99; left: 254px; width: 150px; top: 2px"
+          :showTime="true"
+          style="position: absolute; z-index: 99; left: 254px; width: 170px; top: 2px"
         />
-        <a-time-range-picker
-          v-model:value="historyParams.ttime"
-          valueFormat="HH:mm:ss"
+        <a-date-picker
+          v-model:value="historyParams.ttime_end"
+          valueFormat="YYYY-MM-DD HH:mm:ss"
+          placeholder="请选择结束日期"
           size="small"
-          style="position: absolute; z-index: 99; left: 406px; width: 200px; top: 2px"
+          :showTime="true"
+          style="position: absolute; z-index: 99; left: 426px; width: 170px; top: 2px"
         />
         <a-select
           ref="select"
           v-model:value="historyParams.skip"
           placeholder="请选择间隔时间"
           size="small"
-          style="position: absolute; z-index: 99; top: 2px; left: 608px; width: 150px"
+          style="position: absolute; z-index: 99; top: 2px; left: 600px; width: 150px"
         >
-          <a-select-option value="1">5秒</a-select-option>
-          <a-select-option value="2">10秒</a-select-option>
-          <a-select-option value="3">30秒</a-select-option>
-          <a-select-option value="4">1分钟</a-select-option>
-          <a-select-option value="5">5分钟</a-select-option>
+          <a-select-option value="1">1秒</a-select-option>
+          <a-select-option value="2">5秒</a-select-option>
+          <a-select-option value="3">10秒</a-select-option>
+          <a-select-option value="4">30分钟</a-select-option>
+          <a-select-option value="5">1分钟</a-select-option>
           <a-select-option value="6">10分钟</a-select-option>
           <a-select-option value="7">30分钟</a-select-option>
           <a-select-option value="8">1小时</a-select-option>
@@ -82,14 +85,16 @@
           valueFormat="YYYY-MM-DD HH:mm:ss"
           placeholder="开始时间"
           size="small"
-          style="position: absolute; z-index: 99; left: 254px; width: 150px; top: 2px"
+          :showTime="true"
+          style="position: absolute; z-index: 99; left: 254px; width: 170px; top: 2px"
         />
         <a-date-picker
           v-model:value="historyParams.endTime"
           valueFormat="YYYY-MM-DD HH:mm:ss"
           placeholder="结束时间"
           size="small"
-          style="position: absolute; z-index: 99; left: 406px; width: 150px; top: 2px"
+          :showTime="true"
+          style="position: absolute; z-index: 99; left: 426px; width: 170px; top: 2px"
         />
         <a-select
           ref="select"
@@ -135,7 +140,6 @@
   import dayjs from 'dayjs';
   import { defHttp } from '/@/utils/http/axios';
   import { Select, Pagination } from 'ant-design-vue';
-  import { merge } from 'lodash-es';
 
   export default defineComponent({
     name: 'DeviceEcharts',
@@ -174,28 +178,21 @@
       const globalConfig = inject('globalConfig');
       let historyList;
       if (globalConfig.History_Type == 'vent') {
-        historyList = (params) => defHttp.get({ url: '/safety/ventanalyMonitorData/list', params });
+        historyList = (params) => defHttp.get({ url: '/safety/ventanalyMonitorData/listdays', params });
       } else {
         historyList = (params) => defHttp.post({ url: '/ventanaly-device/history/getHistoryData', params });
       }
       const chartsType = ref('listMonitor');
       const deviceId = ref('');
       const options = ref([]);
-      const historyParams = reactive(
-        History_Type == 'vent'
-          ? {
-              tData: dayjs(),
-              ttime: ['', ''],
-              ttime_begin: dayjs.startOf('date')('HH:mm:ss'),
-              ttime_end: dayjs('HH:mm:ss'),
-              skip: '1',
-            }
-          : {
-              startTime: dayjs().startOf('date'),
-              endTime: dayjs(),
-              interval: '10s',
-            }
-      );
+      const historyParams = reactive({
+        ttime_begin: dayjs().startOf('date').format('YYYY-MM-DD HH:mm:ss'),
+        ttime_end: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+        skip: '8',
+        startTime: dayjs().startOf('date').format('YYYY-MM-DD HH:mm:ss'),
+        endTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+        interval: '1h',
+      });
       const resultXAxisPropType = ref('');
       const resultDataSource = ref<any[]>([]);
       const detailDataSource = ref<any[]>([]);
@@ -263,39 +260,54 @@
             // 实时监测所有
             resultDataSource.value = props.dataSource;
           } else if (newChartsType === 'history') {
+            resultDataSource.value = [];
             // 历史
-            resultXAxisPropType.value = 'gcreatetime';
             if (newChartsType !== oldChartsType || newDeviceId !== oldDeviceId) {
               currentPage.value = 1;
             }
-            let res;
-            if (globalConfig.History_Type == 'vent') {
-              resultXAxisPropType.value = 'gcreatetime';
-              res = await historyList({
-                ttime_begin: historyParams.ttime[0] ? historyParams.ttime[0] : null,
-                ttime_end: historyParams.ttime[1] ? historyParams.ttime[1] : null,
-                tData: dayjs(historyParams.tData).format('YYYY-MM-DD'),
-                strtype: props.deviceType + '*',
-                gdeviceid: newDeviceId,
-                skip: historyParams.skip,
-                pageSize: pageSize.value,
-                pageNo: currentPage.value,
-              });
-            } else {
-              resultXAxisPropType.value = 'time';
-              res = await historyList({
-                startTime: historyParams.startTime,
-                endTime: historyParams.endTime,
-                deviceId: newDeviceId,
-                interval: historyParams.interval,
-              });
-            }
-            if (res.records && res.records.length > 0) {
-              resultDataSource.value = res.records.map((item) => Object.assign(item, item.readData));
-            } else {
-              resultDataSource.value = [];
+            const device = options.value.find((device) => device['deviceID'] === newDeviceId);
+            if (device) {
+              let res;
+              if (globalConfig.History_Type == 'vent') {
+                resultXAxisPropType.value = 'gcreatetime';
+
+                const datas = await historyList({
+                  ttime_begin: historyParams.startTime,
+                  ttime_end: historyParams.endTime,
+                  strtype: device.deviceType,
+                  gdeviceid: newDeviceId,
+                  skip: historyParams.skip,
+                  pageSize: pageSize.value,
+                  pageNo: currentPage.value,
+                  column: 'createTime',
+                });
+                res = datas['datalist']['records'];
+                if (res && res.length > 0) {
+                  resultDataSource.value = res.map((item) => Object.assign(item, item.readData));
+                } else {
+                  resultDataSource.value = [];
+                }
+                total.value = datas['datalist'].total;
+              } else {
+                resultXAxisPropType.value = 'time';
+                res = await historyList({
+                  pageSize: pageSize.value,
+                  pageNum: currentPage.value,
+                  startTime: historyParams.startTime,
+                  endTime: historyParams.endTime,
+                  deviceId: newDeviceId,
+                  strtype: device.deviceType,
+                  interval: historyParams.interval,
+                  column: 'createTime',
+                });
+                if (res && res.records && res.records.length > 0) {
+                  resultDataSource.value = res.records.map((item) => Object.assign(item, item.readData));
+                } else {
+                  resultDataSource.value = [];
+                }
+                total.value = res.total;
+              }
             }
-            total.value = res.total;
           } else if (newChartsType === 'detail') {
             // 设备详情
             resultXAxisPropType.value = 'readTime';
@@ -324,9 +336,10 @@
 
       onMounted(async () => {
         const res = await props.deviceListApi();
-        if (res && res.records) {
-          options.value = res.records;
-          deviceId.value = options.value[0]['id'];
+        debugger;
+        if (res['msgTxt'] && res['msgTxt'][0] && res['msgTxt'][0]['datalist']) {
+          options.value = res['msgTxt'][0]['datalist'];
+          deviceId.value = options.value[0]['deviceID'];
         }
       });
 

+ 4 - 4
src/views/vent/monitorManager/compressor/nitrogen.data.ts

@@ -214,16 +214,16 @@ export function getMonitorComponent() {
   const { sysOrgCode } = useGlobSetting();
   let nitrogenHome;
   switch (sysOrgCode) {
-    case 'sdmtjtdltmk': //大柳塔井
+    case 'sdmtjtdltmk': //dltj
       nitrogenHome = defineAsyncComponent(() => import('./components/nitrogenHome_dltj.vue'));
       return nitrogenHome;
-    case 'sdmtjtbetmk': // 布尔台
+    case 'sdmtjtbetmk': // bet
       nitrogenHome = defineAsyncComponent(() => import('./components/nitrogenHome_bet.vue'));
       return nitrogenHome;
-    case 'sdmtjtbdmk': // 保德
+    case 'sdmtjtbdmk': // bd
       nitrogenHome = defineAsyncComponent(() => import('./components/nitrogenHome_bd.vue'));
       return nitrogenHome;
-    case 'sdmtjtyjlmk': //榆家梁
+    case 'sdmtjtyjlmk': //yjl
     case 'sdmtjtbltmk': // 补连塔
       debugger;
       nitrogenHome = defineAsyncComponent(() => import('./components/nitrogenHome_blt.vue'));

+ 409 - 401
src/views/vent/monitorManager/deviceMonitor/components/device/modal/fiber.sjh.vue

@@ -1,261 +1,269 @@
 <template>
-    <BasicModal v-bind="$attrs" @register="register" :title="`光纤测温详情${currentTime}`" width="1200px" @ok="handleOk"
-        @cancel="handleCancel">
-        <div class="fiber-modal">
-            <div class="modal-left">
-                <div v-for="device in deviceList" class="link-item"
-                    :class="{ 'active-device-title': device.deviceID === activeDeviceID }" :key="device.deviceID">
-                    <span class="" @click="selectDevice(device.deviceID)">{{ device.strinstallpos }}</span>
-                </div>
+  <BasicModal v-bind="$attrs" @register="register" :title="`光纤测温详情${currentTime}`" width="1200px" @ok="handleOk" @cancel="handleCancel">
+    <div class="fiber-modal">
+      <div class="modal-left">
+        <div
+          v-for="device in deviceList"
+          class="link-item"
+          :class="{ 'active-device-title': device.deviceID === activeDeviceID }"
+          :key="device.deviceID"
+        >
+          <span class="" @click="selectDevice(device.deviceID)">{{ device.strinstallpos }}</span>
+        </div>
+      </div>
+      <div class="modal-right">
+        <div class="right-top">
+          <div class="top-item">
+            <div class="icon">
+              <SvgIcon class="icon-style max-temperature" size="38" name="max-temperature" />
             </div>
-            <div class="modal-right">
-                <div class="right-top">
-                    <div class="top-item">
-                        <div class="icon">
-                            <SvgIcon class="icon-style max-temperature" size="38" name="max-temperature" />
-                        </div>
-                        <div class="item-container">
-                            <div class="title">最高温度</div>
-                            <div class="value">{{ posMonitor.tempmax || '--' }} <span>℃</span> </div>
-                        </div>
-                    </div>
-                    <div class="top-item">
-                        <div class="icon">
-                            <SvgIcon class="icon-style min-temperature" size="38" name="min-temperature" />
-                        </div>
-                        <div class="item-container">
-                            <div class="title">最低温度</div>
-                            <div class="value">{{ posMonitor.tempmin || '--' }} <span>℃</span></div>
-                        </div>
-                    </div>
-                    <div class="top-item">
-                        <div class="icon">
-                            <SvgIcon class="icon-style aveg-temperature" size="38" name="aveg-temperature" />
-                        </div>
-                        <div class="item-container">
-                            <div class="title">平均温度</div>
-                            <div class="value">{{ posMonitor.tempavg || '--' }} <span>℃</span></div>
-                        </div>
-                    </div>
-                    <div class="top-item warning-box">
-                        <div class="icon">
-                            <SvgIcon class="icon-style" size="38" name="risk-level" />
-                        </div>
-                        <div class="item-container">
-                            <div class="title">风险等级</div>
-                            <div class="warning-value">低风险</div>
-                        </div>
-                    </div>
-                </div>
-                <div class="right-center">
-                    <div class="table-box">
-                        <span class="base-title">测点监测详情</span>
-                        <a-table size="small" :columns="columns" :data-source="posList" :pagination="false"
-                            :scroll="{ y: 200 }" />
-                    </div>
-                    <!-- <div class="warning-box">
+            <div class="item-container">
+              <div class="title">最高温度</div>
+              <div class="value">{{ posMonitor.tempmax || '--' }} <span>℃</span> </div>
+            </div>
+          </div>
+          <div class="top-item">
+            <div class="icon">
+              <SvgIcon class="icon-style min-temperature" size="38" name="min-temperature" />
+            </div>
+            <div class="item-container">
+              <div class="title">最低温度</div>
+              <div class="value">{{ posMonitor.tempmin || '--' }} <span>℃</span></div>
+            </div>
+          </div>
+          <div class="top-item">
+            <div class="icon">
+              <SvgIcon class="icon-style aveg-temperature" size="38" name="aveg-temperature" />
+            </div>
+            <div class="item-container">
+              <div class="title">平均温度</div>
+              <div class="value">{{ posMonitor.tempavg || '--' }} <span>℃</span></div>
+            </div>
+          </div>
+          <div class="top-item warning-box">
+            <div class="icon">
+              <SvgIcon class="icon-style" size="38" name="risk-level" />
+            </div>
+            <div class="item-container">
+              <div class="title">风险等级</div>
+              <div class="warning-value">低风险</div>
+            </div>
+          </div>
+        </div>
+        <div class="right-center">
+          <div class="table-box">
+            <span class="base-title">测点监测详情</span>
+            <a-table size="small" :columns="columns" :data-source="posList" :pagination="false" :scroll="{ y: 200 }" />
+          </div>
+          <!-- <div class="warning-box">
                         <span class="base-title">预警历史详情</span>
                         <div class="warning-container">
                             <dv-scroll-board ref="scrollBoard" :config="warningConfig"
                                 style="width: 100%; height: 240px; overflow-y: auto; border: 1px solid #39e8ff33" />
                         </div>
                     </div> -->
-                </div>
-                <div class="right-bottom">
-                    <span class="base-title">测点监测曲线</span>
-                    <div class="echarts-box">
-                        <BarAndLine xAxisPropType="tempmax" :dataSource="posList1" height="100%"
-                            :chartsColumns="chartsColumns" :option="echatsOption" chartsType="listMonitor" />
-                    </div>
-                </div>
-            </div>
         </div>
-    </BasicModal>
+        <div class="right-bottom">
+          <span class="base-title">测点监测曲线</span>
+          <div class="echarts-box">
+            <BarAndLine
+              xAxisPropType="tempmax"
+              :dataSource="posList1"
+              height="100%"
+              :chartsColumns="chartsColumns"
+              :option="echatsOption"
+              chartsType="listMonitor"
+            />
+          </div>
+        </div>
+      </div>
+    </div>
+  </BasicModal>
 </template>
 <script lang="ts">
-import { defineComponent, ref, watch, shallowRef, reactive } from 'vue';
-import { BasicModal, useModalInner } from '/@/components/Modal';
-import BarAndLine from '/@/components/chart/BarAndLine.vue';
-import { SvgIcon } from '/@/components/Icon';
-import { Decoration7 as DvDecoration7, ScrollBoard as DvScrollBoard } from '@kjgl77/datav-vue3';
-import dayjs from 'dayjs';
-
-export default defineComponent({
+  import { defineComponent, ref, watch, shallowRef, reactive } from 'vue';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import BarAndLine from '/@/components/chart/BarAndLine.vue';
+  import { SvgIcon } from '/@/components/Icon';
+  import { Decoration7 as DvDecoration7, ScrollBoard as DvScrollBoard } from '@kjgl77/datav-vue3';
+  import dayjs from 'dayjs';
+
+  export default defineComponent({
     components: { BasicModal, BarAndLine, SvgIcon, DvScrollBoard, DvDecoration7 },
     props: {
-        dataSource: { type: Array },
-        activeID: { type: String },
+      dataSource: { type: Array },
+      activeID: { type: String },
     },
     setup(props) {
-        const currentTime = ref(dayjs().format('YYYY-MM-DD HH:mm:ss'));
-        const modelRef = ref({});
-        const loading = ref(true);
-        const activeDeviceID = ref<any>('');
-        const deviceList = ref<any[]>([]);
-        const posList = reactive<any[]>([]);
-        const posList1 = reactive<any[]>([]);
-        const posMonitor = shallowRef({});
-
-        const echatsOption = {
-            grid: {
-                top: '20%',
-                left: '2px',
-                right: '10px',
-                bottom: '3%',
-                containLabel: true,
-            },
-            toolbox: {
-                feature: {},
-            },
-        };
-
-        const chartsColumns = [
-            {
-                legend: '测点报警温度',
-                seriesName: '(℃)',
-                ymax: 200,
-                yname: '℃',
-                linetype: 'line',
-                yaxispos: 'left',
-                color: '#FDB146',
-                sort: 1,
-                xRotate: 0,
-                dataIndex: 'value',
-            },
-        ];
-        const columns = [
-            {
-                title: '位置',
-                dataIndex: 'maxposition',
-                align: 'center',
-                width: 120,
-            },
-            {
-                title: '最高温度(℃)',
-                dataIndex: 'tempmax',
-                align: 'center',
-                width: 100,
-            },
-            {
-                title: '起点',
-                dataIndex: 'fiberstart',
-                align: 'center',
-            },
-            {
-                title: '终点',
-                dataIndex: 'fiberend',
-                align: 'center',
-            },
-            {
-                title: '报警状态',
-                dataIndex: 'alarmflag',
-                align: 'center',
-            },
-        ];
-
-        // const warningConfig = reactive({
-        //     header: ['测点', '温度', '预警信息'],
-        //     data: [
-        //         ['测点6', '318℃', '严重报警'],
-        //         ['测点43', '142℃', '一般预警'],
-        //         ['测点23', '167℃', '一般预警'],
-        //         ['测点6', '198℃', '超高预警'],
-        //         ['测点65', '197℃', '超高预警'],
-        //         ['测点78', '154℃', '一般预警'],
-        //         ['测点61', '104℃', '一般预警'],
-        //         ['测点87', '150℃', '一般信息'],
-        //     ],
-        //     index: false,
-        //     columnWidth: [150],
-        //     headerHeight: 38,
-        //     headerBGC: '#3d9dd45d',
-        //     oddRowBGC: '#009acd10',
-        //     evenRowBGC: '#009acd05',
-        //     align: ['center', 'center', 'center'],
-        // });
-
-        const [register, { setModalProps, closeModal }] = useModalInner();
-
-        function handleVisibleChange(visible) {
-            if (visible) {
-                loading.value = true;
-                setModalProps({ loading: true, confirmLoading: true });
-
-                setTimeout(() => {
-                    loading.value = false;
-                    setModalProps({ loading: false, confirmLoading: false });
-                }, 1000);
-            }
+      const currentTime = ref(dayjs().format('YYYY-MM-DD HH:mm:ss'));
+      const modelRef = ref({});
+      const loading = ref(true);
+      const activeDeviceID = ref<any>('');
+      const deviceList = ref<any[]>([]);
+      const posList = reactive<any[]>([]);
+      const posList1 = reactive<any[]>([]);
+      const posMonitor = shallowRef({});
+
+      const echatsOption = {
+        grid: {
+          top: '20%',
+          left: '2px',
+          right: '10px',
+          bottom: '3%',
+          containLabel: true,
+        },
+        toolbox: {
+          feature: {},
+        },
+      };
+
+      const chartsColumns = [
+        {
+          legend: '测点报警温度',
+          seriesName: '(℃)',
+          ymax: 200,
+          yname: '℃',
+          linetype: 'line',
+          yaxispos: 'left',
+          color: '#FDB146',
+          sort: 1,
+          xRotate: 0,
+          dataIndex: 'value',
+        },
+      ];
+      const columns = [
+        {
+          title: '位置',
+          dataIndex: 'maxposition',
+          align: 'center',
+          width: 120,
+        },
+        {
+          title: '最高温度(℃)',
+          dataIndex: 'tempmax',
+          align: 'center',
+          width: 100,
+        },
+        {
+          title: '起点',
+          dataIndex: 'fiberstart',
+          align: 'center',
+        },
+        {
+          title: '终点',
+          dataIndex: 'fiberend',
+          align: 'center',
+        },
+        {
+          title: '报警状态',
+          dataIndex: 'alarmflag',
+          align: 'center',
+        },
+      ];
+
+      // const warningConfig = reactive({
+      //     header: ['测点', '温度', '预警信息'],
+      //     data: [
+      //         ['测点6', '318℃', '严重报警'],
+      //         ['测点43', '142℃', '一般预警'],
+      //         ['测点23', '167℃', '一般预警'],
+      //         ['测点6', '198℃', '超高预警'],
+      //         ['测点65', '197℃', '超高预警'],
+      //         ['测点78', '154℃', '一般预警'],
+      //         ['测点61', '104℃', '一般预警'],
+      //         ['测点87', '150℃', '一般信息'],
+      //     ],
+      //     index: false,
+      //     columnWidth: [150],
+      //     headerHeight: 38,
+      //     headerBGC: '#3d9dd45d',
+      //     oddRowBGC: '#009acd10',
+      //     evenRowBGC: '#009acd05',
+      //     align: ['center', 'center', 'center'],
+      // });
+
+      const [register, { setModalProps, closeModal }] = useModalInner();
+
+      function handleVisibleChange(visible) {
+        if (visible) {
+          loading.value = true;
+          setModalProps({ loading: true, confirmLoading: true });
+
+          setTimeout(() => {
+            loading.value = false;
+            setModalProps({ loading: false, confirmLoading: false });
+          }, 1000);
         }
-
-        // 选择监测
-        function selectDevice(id) {
-            loading.value = true;
-            setModalProps({ loading: true, confirmLoading: true });
-            setTimeout(() => {
-                loading.value = false;
-                activeDeviceID.value = id;
-                setModalProps({ loading: false, confirmLoading: false });
-            }, 300);
-        }
-
-        function handleOk(e) {
-            e.preventDefault();
-            closeModal();
-        }
-
-        function handleCancel(e) {
-            e.preventDefault();
-            closeModal();
-        }
-
-        watch([() => props.dataSource, () => props.activeID], ([newDataSource, newActiveID], [oldDataSource, oldActiveID]) => {
-            console.log(newDataSource, 'newDataSource--------------');
-            deviceList.value = newDataSource as any[];
-            activeDeviceID.value = activeDeviceID.value ? activeDeviceID.value : newActiveID;
-            posList.length = 0;
-            posList1.length = 0
-            newDataSource?.forEach((item: any, index) => {
-                if ((!activeDeviceID.value && index == 0) || item.deviceID === activeDeviceID.value) {
-                    posMonitor.value = item.readData;
-                    posList.push({
-                        maxposition: item.readData['maxposition'],
-                        tempmax: item.readData['tempmax'],
-                        fiberstart: item.readData['fiberstart'],
-                        fiberend: item.readData['fiberend'],
-                        alarmflag: item.readData['alarmflag']=='0' ? '正常' : '报警',
-                    })
-                    let echartList =item.readData.TempStr ? item.readData.TempStr.split(',') : []
-                    echartList.forEach((el, index) => {
-                        posList1.push({ tempmax: index + 1, value: el });
-                    })
-                }
+      }
+
+      // 选择监测
+      function selectDevice(id) {
+        loading.value = true;
+        setModalProps({ loading: true, confirmLoading: true });
+        setTimeout(() => {
+          loading.value = false;
+          activeDeviceID.value = id;
+          setModalProps({ loading: false, confirmLoading: false });
+        }, 300);
+      }
+
+      function handleOk(e) {
+        e.preventDefault();
+        closeModal();
+      }
+
+      function handleCancel(e) {
+        e.preventDefault();
+        closeModal();
+      }
+
+      watch([() => props.dataSource, () => props.activeID], ([newDataSource, newActiveID], [oldDataSource, oldActiveID]) => {
+        console.log(newDataSource, 'newDataSource--------------');
+        deviceList.value = newDataSource as any[];
+        activeDeviceID.value = activeDeviceID.value ? activeDeviceID.value : newActiveID;
+        posList.length = 0;
+        posList1.length = 0;
+        newDataSource?.forEach((item: any, index) => {
+          if ((!activeDeviceID.value && index == 0) || item.deviceID === activeDeviceID.value) {
+            posMonitor.value = item.readData;
+            posList.push({
+              maxposition: item.readData['maxposition'],
+              tempmax: item.readData['tempmax'],
+              fiberstart: item.readData['fiberstart'],
+              fiberend: item.readData['fiberend'],
+              alarmflag: item.readData['alarmflag'] == '0' ? '正常' : '报警',
+            });
+            let echartList = item.readData.TempStr ? item.readData.TempStr.split(',') : [];
+            echartList.forEach((el, index) => {
+              posList1.push({ tempmax: index + 1, value: el });
             });
+          }
         });
-
-        return {
-            register,
-            model: modelRef,
-            currentTime,
-            handleVisibleChange,
-            selectDevice,
-            handleOk,
-            handleCancel,
-            deviceList,
-            activeDeviceID,
-            posMonitor,
-            echatsOption,
-            posList,
-            posList1,
-            chartsColumns,
-            columns,
-            // warningConfig,
-        };
+      });
+
+      return {
+        register,
+        model: modelRef,
+        currentTime,
+        handleVisibleChange,
+        selectDevice,
+        handleOk,
+        handleCancel,
+        deviceList,
+        activeDeviceID,
+        posMonitor,
+        echatsOption,
+        posList,
+        posList1,
+        chartsColumns,
+        columns,
+        // warningConfig,
+      };
     },
-});
+  });
 </script>
 <style lang="less" scoped>
-.fiber-modal {
+  .fiber-modal {
     width: 100%;
     height: 650px;
     display: flex;
@@ -263,195 +271,195 @@ export default defineComponent({
     justify-content: space-between;
 
     .modal-left {
-        width: 200px;
-        height: 100%;
-        overflow-y: auto;
-        background: #ffffff11;
-        padding: 5px;
-        border-radius: 5px;
-
-        .active-device-title {
-            color: aqua;
+      width: 200px;
+      height: 100%;
+      overflow-y: auto;
+      background: #ffffff11;
+      padding: 5px;
+      border-radius: 5px;
+
+      .active-device-title {
+        color: aqua;
+      }
+
+      .link-item {
+        position: relative;
+        cursor: pointer;
+        line-height: 30px;
+        padding-left: 30px;
+
+        span:hover {
+          color: #89ffff;
         }
 
-        .link-item {
-            position: relative;
-            cursor: pointer;
-            line-height: 30px;
-            padding-left: 30px;
-
-            span:hover {
-                color: #89ffff;
-            }
-
-            &::after {
-                content: '';
-                position: absolute;
-                display: block;
-                width: 8px;
-                height: 8px;
-                top: 12px;
-                left: 10px;
-                transform: rotateZ(45deg) skew(10deg, 10deg);
-                background: #45d3fd;
-            }
+        &::after {
+          content: '';
+          position: absolute;
+          display: block;
+          width: 8px;
+          height: 8px;
+          top: 12px;
+          left: 10px;
+          transform: rotateZ(45deg) skew(10deg, 10deg);
+          background: #45d3fd;
         }
+      }
     }
 
     .modal-right {
-        width: calc(100% - 220px);
-        overflow-y: auto;
-
-        .base-title {
-            line-height: 32px;
-            position: relative;
-            padding-left: 20px;
-
-            &::after {
-                content: '';
-                position: absolute;
-                display: block;
-                width: 4px;
-                height: 12px;
-                top: 4px;
-                left: 10px;
-                background: #45d3fd;
-                border-radius: 4px;
-            }
+      width: calc(100% - 220px);
+      overflow-y: auto;
+
+      .base-title {
+        line-height: 32px;
+        position: relative;
+        padding-left: 20px;
+
+        &::after {
+          content: '';
+          position: absolute;
+          display: block;
+          width: 4px;
+          height: 12px;
+          top: 4px;
+          left: 10px;
+          background: #45d3fd;
+          border-radius: 4px;
         }
-
-        .right-top {
+      }
+
+      .right-top {
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        margin-bottom: 10px;
+
+        .top-item {
+          width: 200px;
+          height: 80px;
+          display: flex;
+          flex-direction: row;
+          justify-content: center;
+          border: 1px solid rgba(25, 237, 255, 0.4);
+          box-shadow: inset 0 0 10px rgba(0, 197, 255, 0.6);
+          background: rgba(0, 0, 0, 0.06666666666666667);
+          padding-top: 16px;
+
+          .icon {
+            margin-right: 10px;
+            margin-top: 5px;
+            color: #fdb146;
+          }
+
+          .item-container {
+            width: 100px;
             display: flex;
-            flex-direction: row;
-            justify-content: space-between;
-            margin-bottom: 10px;
-
-            .top-item {
-                width: 200px;
-                height: 80px;
-                display: flex;
-                flex-direction: row;
-                justify-content: center;
-                border: 1px solid rgba(25, 237, 255, 0.4);
-                box-shadow: inset 0 0 10px rgba(0, 197, 255, 0.6);
-                background: rgba(0, 0, 0, 0.06666666666666667);
-                padding-top: 16px;
-
-                .icon {
-                    margin-right: 10px;
-                    margin-top: 5px;
-                    color: #fdb146;
-                }
-
-                .item-container {
-                    width: 100px;
-                    display: flex;
-                    flex-direction: column;
-                    justify-content: center;
-
-                    div {
-                        text-align: center;
-                    }
-
-                    .title {
-                        font-size: 18px;
-                    }
-
-                    .value {
-                        text-shadow: 0 0 25px #00fbfe;
-                        background: linear-gradient(0deg, #45d3fd, #45d3fd, #61ddb1, #61ddb1);
-                        font-style: normal;
-                        background-size: cover;
-                        font-family: electronicFont;
-                        font-size: 30px;
-                        -webkit-background-clip: text;
-                        background-clip: text;
-                        -webkit-text-fill-color: transparent;
-                        position: relative;
-                        top: -8px;
-
-                        span {
-                            font-family: Arial, Helvetica, sans-serif;
-                            font-size: 18px;
-                            color: aliceblue;
-                        }
-                    }
-                }
-            }
-
-            .warning-box {
-                padding-top: 0px;
+            flex-direction: column;
+            justify-content: center;
 
-                .icon {
-                    margin-top: 20px;
+            div {
+              text-align: center;
+            }
 
-                    .icon-style {
-                        color: #fdb146;
-                    }
-                }
+            .title {
+              font-size: 18px;
+            }
 
-                .warning-value {
-                    font-size: 18px;
-                    color: #61ddb1;
-                }
+            .value {
+              text-shadow: 0 0 25px #00fbfe;
+              background: linear-gradient(0deg, #45d3fd, #45d3fd, #61ddb1, #61ddb1);
+              font-style: normal;
+              background-size: cover;
+              font-family: electronicFont;
+              font-size: 30px;
+              -webkit-background-clip: text;
+              background-clip: text;
+              -webkit-text-fill-color: transparent;
+              position: relative;
+              top: -8px;
+
+              span {
+                font-family: Arial, Helvetica, sans-serif;
+                font-size: 18px;
+                color: aliceblue;
+              }
             }
+          }
         }
 
-        .right-center {
+        .warning-box {
+          padding-top: 0px;
+
+          .icon {
             margin-top: 20px;
-            display: flex;
-            flex-direction: row;
-            justify-content: space-between;
 
-            .table-box {
-                position: relative;
-                width: 100%;
-                height: 250px;
+            .icon-style {
+              color: #fdb146;
             }
+          }
 
-            // .warning-box {
-            //     width: calc(100% - 520px);
-
-            //     .warning-container {
-            //         width: 100%;
-            //         height: convert;
-            //         background: #009acd00;
-
-            //         :deep(.dv-scroll-board) {
-            //             .row-item {
-            //                 height: 40px !important;
-            //                 line-height: 40px !important;
-            //             }
-
-            //             .header-item {
-            //                 border-top: 1px solid #91e9fe !important;
-            //                 border-bottom: 1px solid #91e9fe !important;
-            //             }
-            //         }
-            //     }
-            // }
+          .warning-value {
+            font-size: 18px;
+            color: #61ddb1;
+          }
+        }
+      }
+
+      .right-center {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+
+        .table-box {
+          position: relative;
+          width: 100%;
+          height: 250px;
         }
 
-        .right-bottom {
-            margin-top: 20px;
-
-            .echarts-box {
-                width: 100%;
-                height: 230px;
-            }
+        // .warning-box {
+        //     width: calc(100% - 520px);
+
+        //     .warning-container {
+        //         width: 100%;
+        //         height: convert;
+        //         background: #009acd00;
+
+        //         :deep(.dv-scroll-board) {
+        //             .row-item {
+        //                 height: 40px !important;
+        //                 line-height: 40px !important;
+        //             }
+
+        //             .header-item {
+        //                 border-top: 1px solid #91e9fe !important;
+        //                 border-bottom: 1px solid #91e9fe !important;
+        //             }
+        //         }
+        //     }
+        // }
+      }
+
+      .right-bottom {
+        margin-top: 20px;
+
+        .echarts-box {
+          width: 100%;
+          height: 230px;
         }
+      }
     }
-}
+  }
 
-:deep(.zxm-table-body) {
+  :deep(.zxm-table-body) {
     border: 1px solid rgba(57, 232, 255, 0.2) !important;
 
-    .zxm-table-tbody>tr>td {
-        border: none !important;
+    .zxm-table-tbody > tr > td {
+      border: none !important;
     }
-}
+  }
 
-:deep(.zxm-table-cell) {
+  :deep(.zxm-table-cell) {
     border-right: none !important;
-}
-</style>
+  }
+</style>

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

@@ -288,6 +288,7 @@ export const initCameraCanvas = async (playerVal1) => {
 
 export const mountedThree = (playerDom) => {
   const { sysOrgCode } = useGlobSetting();
+  // sysOrgCode = 'yjmdsankuang';
   return new Promise(async (resolve) => {
     model = new UseThree('#damper3D', '', '#deviceDetail');
     model.setEnvMap('test1');

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

@@ -349,7 +349,7 @@ class FmTwoYj {
           handler = () => {
             this.clipActionArr.frontDoor.paused = true;
             this.clipActionArr.frontDoor.reset(); //
-            this.clipActionArr.frontDoor.time = 22;
+            this.clipActionArr.frontDoor.time = 8;
             this.clipActionArr.frontDoor.timeScale = -timeScale;
             // this.clipActionArr.frontDoor.clampWhenFinished = true;
             this.clipActionArr.frontDoor.play();
@@ -377,7 +377,7 @@ class FmTwoYj {
           handler = () => {
             this.clipActionArr.backDoor.paused = true;
             this.clipActionArr.backDoor.reset();
-            this.clipActionArr.backDoor.time = 22;
+            this.clipActionArr.backDoor.time = 8;
             this.clipActionArr.backDoor.timeScale = -timeScale;
             // this.clipActionArr.backDoor.clampWhenFinished = true;
             this.clipActionArr.backDoor.play();

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

@@ -349,7 +349,7 @@ class FmYj {
           handler = () => {
             this.clipActionArr.frontDoor.paused = true;
             this.clipActionArr.frontDoor.reset(); //
-            this.clipActionArr.frontDoor.time = 22;
+            this.clipActionArr.frontDoor.time = 8;
             this.clipActionArr.frontDoor.timeScale = -timeScale;
             // this.clipActionArr.frontDoor.clampWhenFinished = true;
             this.clipActionArr.frontDoor.play();
@@ -377,7 +377,7 @@ class FmYj {
           handler = () => {
             this.clipActionArr.backDoor.paused = true;
             this.clipActionArr.backDoor.reset();
-            this.clipActionArr.backDoor.time = 22;
+            this.clipActionArr.backDoor.time = 8;
             this.clipActionArr.backDoor.timeScale = -timeScale;
             // this.clipActionArr.backDoor.clampWhenFinished = true;
             this.clipActionArr.backDoor.play();

+ 3 - 3
src/views/vent/monitorManager/mainFanMonitor/index.vue

@@ -1,10 +1,9 @@
 <template>
   <div class="bg" style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden">
-    <a-spin :spinning="loading" />
+    <!-- <a-spin :spinning="loading" /> -->
     <div
       id="main3DCSS"
       class="threejs-Object-CSS"
-      v-show="!loading"
       style="width: 100%; height: 100%; position: absolute; pointer-events: none; overflow: hidden; z-index: 1; top: 0"
     >
       <div style="position: relative">
@@ -552,7 +551,7 @@
 
   const tabChange = (activeKeyVal) => {
     activeKey.value = activeKeyVal;
-    MonitorDataTable.value.setSelectedRowKeys(selectData.deviceID);
+    // MonitorDataTable.value.setSelectedRowKeys(selectData.deviceID);
   };
 
   // 设备数据
@@ -640,6 +639,7 @@
   };
   // 切换检测数据
   const getSelectRow = async (id) => {
+    debugger;
     if (!id) return;
     loading.value = true;
     const baseDataIndex: any = dataSource.value.findIndex((baseData: any) => baseData.deviceID === id);

+ 2 - 0
src/views/vent/monitorManager/mainFanMonitor/main.threejs.ts

@@ -306,6 +306,8 @@ export const setModelType = (type) => {
   if (!model) return;
   modalType = type;
   return new Promise((resolve) => {
+    // 停止气流动画
+    mainWindObj?.stopSmoke();
     if (modalType === 'mainWindRect' && mainWindObj && mainWindObj.group) {
       (<UseThree>model).startAnimation = mainWindObj.render.bind(mainWindObj);
       group = mainWindObj.group;

+ 16 - 5
src/views/vent/monitorManager/mainFanMonitor/mainWind.threejs.ts

@@ -191,7 +191,7 @@ class mainWindRect {
     }
   }
 
-  async closeDevice(deviceType) {
+  async closeDevice(deviceType, flag = true) {
     let smoke;
     if (deviceType === 'front') {
       smoke = this.frontSmoke;
@@ -199,10 +199,17 @@ class mainWindRect {
       smoke = this.backSmoke;
     }
     if (smoke && smoke.frameId) {
-      smoke.stopSmoke();
-      await this.openOrCloseValve(deviceType, 'close');
-      this.startGearAnimation(deviceType, 'close', '', null);
-      await this.lookMotor(deviceType, 'close');
+      if (flag) {
+        smoke.stopSmoke();
+        await this.openOrCloseValve(deviceType, 'close');
+        this.startGearAnimation(deviceType, 'close', '', null);
+        await this.lookMotor(deviceType, 'close');
+      } else {
+        smoke.stopSmoke(0);
+        await this.openOrCloseValve(deviceType, 'close', 0);
+        this.startGearAnimation(deviceType, 'close', '', null, 0);
+        await this.lookMotor(deviceType, 'close', 0);
+      }
     }
   }
 
@@ -362,6 +369,10 @@ class mainWindRect {
       //
     }
   }
+  stopSmoke() {
+    this.closeDevice('front', false);
+    this.closeDevice('back', false);
+  }
 
   /* 打开或关闭蝶阀 */
   openOrCloseValve(deviceType, flag, duration = 3) {

+ 4 - 4
src/views/vent/monitorManager/safetyMonitor/index.vue

@@ -300,11 +300,11 @@
         // 如果是安全监控的数据时需要过滤常见设备数据,根据设定的常用安全监控字典去匹配
         let dictCodes = getDictItemsByCode('safetynormal');
         const searchForm = formData.getFieldsValue();
-        if (searchForm && !searchForm['dataTypeName'] && dictCodes && dictCodes.length) {
+        if (searchForm && !searchForm['dataTypeName'] && dictCodes && dictCodes.length > 0) {
           const tempData = [];
           const tempData1 = [];
-
-          dataArr.forEach((item) => {
+          for (let i = 0; i < dataArr.length; i++) {
+            const item = dataArr[i];
             let flag = false;
             for (let i = 0; i < dictCodes.length; i++) {
               const dict = dictCodes[i];
@@ -317,7 +317,7 @@
             } else {
               tempData1.push(item);
             }
-          });
+          }
           if (sysOrgCode == 'zjtzqctmk' || hasPermission('btn:noGb')) {
             dataSource.value = [...tempData, ...tempData1];
           } else {

+ 3 - 2
src/views/vent/monitorManager/windrectMonitor/components/modalTable.vue

@@ -1,5 +1,5 @@
 <template>
-  <BasicTable @register="registerTable" :rowSelection="rowSelection" />
+  <BasicTable @register="registerTable" :rowSelection="rowSelection" :scroll="{ y: 450 }" />
 </template>
 <script lang="ts">
   import { BasicTable } from '/@/components/Table';
@@ -24,12 +24,13 @@
         designScope: 'windrect_list',
         tableProps: {
           title: '',
-          api: deviceList,
+          api: deviceList.bind(null, { pageSize: 1000 }),
           columns: columns,
           size: 'small',
           actionColumn: {
             width: 180,
           },
+          pagination: false,
           showActionColumn: false,
           showTableSetting: false,
           bordered: false,

+ 8 - 15
src/views/vent/monitorManager/windrectMonitor/index.vue

@@ -94,7 +94,7 @@
                 :dataSource="dataSource"
                 height="100%"
                 :chartsColumns="chartsColumnList"
-                :device-list-api="baseList"
+                :device-list-api="list.bind(null, { devicetype: 'windrect', pagetype: 'normal' })"
                 device-type="windrect"
               />
             </div>
@@ -102,7 +102,7 @@
           <a-tab-pane key="3" tab="历史数据">
             <div class="tab-item">
               <HistoryTable columns-type="windrect" device-type="windrect" designScope="windrect-history" :scroll="scroll">
-                <template #filterCell="{ column, record }">
+                <!-- <template #filterCell="{ column, record }">
                   <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == '0' ? 'green' : 'red'">{{
                     record.warnFlag == '0' ? '正常' : '报警'
                   }}</a-tag>
@@ -110,22 +110,16 @@
                     record.netStatus == '0' ? '断开' : '连接'
                   }}</a-tag>
                   <div v-if="record.nwindownum == 1 && column.dataIndex === 'rearArea'">/</div>
-                </template>
+                </template> -->
               </HistoryTable>
             </div>
           </a-tab-pane>
           <a-tab-pane key="4" tab="报警历史">
             <div class="tab-item" v-if="activeKey === '4'">
-              <AlarmHistoryTable
-                columns-type="alarm"
-                device-type="windrect"
-                :device-list-api="baseList"
-                designScope="alarm-history"
-                :scroll="scroll"
-              />
+              <AlarmHistoryTable columns-type="alarm" device-type="windrect" designScope="alarm-history" :scroll="scroll" />
             </div>
           </a-tab-pane>
-          <a-tab-pane v-if="hasPermission('windrect:handlerHistory')" key="5" tab="操作历史">
+          <!-- <a-tab-pane v-if="hasPermission('windrect:handlerHistory')" key="5" tab="操作历史">
             <div class="tab-item" v-if="activeKey === '5'">
               <HandlerHistoryTable
                 columns-type="operator_history"
@@ -135,7 +129,7 @@
                 :scroll="scroll"
               />
             </div>
-          </a-tab-pane>
+          </a-tab-pane> -->
           <a-tab-pane v-if="hasPermission('windrect:result')" key="6" tab="测风结果">
             <ResultTable v-if="activeKey === '6'" deviceType="windrect_list" :scroll="scroll" />
           </a-tab-pane>
@@ -146,10 +140,10 @@
   <div ref="playerRef" style="z-index: 999; position: absolute; top: 100px; right: 10px; width: 300px; height: 280px; margin: auto"></div>
   <BasicModal v-bind="$attrs" @register="registerModal" title="一键测风" width="900px" @ok="handleOk" @cancel="handleCancel">
     <div class="head-line">
-      <div class="vent-flex-row">
+      <!-- <div class="vent-flex-row">
         <span>同时运行数量:</span>
         <a-input-number v-model:value="runNum" :min="1" :max="10" />
-      </div>
+      </div> -->
       <div class="vent-flex-row">
         <div v-for="(criticalPath, index) in criticalPathList" :key="index" class="button-box" @click="selectCriticalPath(criticalPath.id)">{{
           criticalPath.systemname
@@ -186,7 +180,6 @@
   import { deviceControlApi } from '/@/api/vent/index';
   import { mountedThree, destroy, addMonitorText, play, setModelType, playCamera } from './windrect.threejs';
   import { list, pathList, deviceList, testWind, exportXls } from './windrect.api';
-  import { list as baseList } from '../../deviceManager/windfindingTabel/windfinding.api';
   import { message, Progress } from 'ant-design-vue';
   import { chartsColumns, option } from './windrect.data';
   import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';

+ 6 - 0
src/views/vent/monitorManager/windrectMonitor/windrect.data.ts

@@ -48,6 +48,12 @@ export const resultColumns: BasicColumn[] = [
     align: 'center',
   },
   {
+    title: '操作人员',
+    dataIndex: 'updateBy',
+    width: 100,
+    align: 'center',
+  },
+  {
     title: '操作',
     dataIndex: 'action',
     width: 100,

+ 423 - 402
src/views/vent/performance/fileDetail/index.vue

@@ -4,8 +4,15 @@
     <div class="content">
       <div class="left-box">
         <!-- 左侧树菜单 -->
-        <fileSystem :selected="selected" :list="listArr" :draggable="true" @delete-node="onDeltet" @on-click="onClick"
-          @change-name="onChangeName" @addNode="onAddNode">
+        <fileSystem
+          :selected="selected"
+          :list="listArr"
+          :draggable="true"
+          @delete-node="onDeltet"
+          @on-click="onClick"
+          @change-name="onChangeName"
+          @addNode="onAddNode"
+        >
           <template #icon="{ item }">
             <template v-if="item.isFolder">
               <SvgIcon v-if="item.expanded" size="18" name="file-open" />
@@ -16,8 +23,7 @@
           <template #operation="{ type }">
             <i class="iconfont icon-xinzeng" v-if="type == 'addDocument'"></i>
             <i class="iconfont icon-bianji" v-if="type == 'Editable'"></i>
-            <a-popconfirm v-if="type == 'deleteNode'" title="是否确认删除!" ok-text="确定" cancel-text="取消"
-              @confirm="confirmDel">
+            <a-popconfirm v-if="type == 'deleteNode'" title="是否确认删除!" ok-text="确定" cancel-text="取消" @confirm="confirmDel">
               <i class="iconfont icon-guanbi"></i>
             </a-popconfirm>
           </template>
@@ -25,27 +31,37 @@
       </div>
       <div class="right-box">
         <div class="search">
-          <span style="color:#fff">文件名称:</span>
-          <a-input v-model:value="searchForm.fileName" placeholder="请输入文件名称" :disabled="activeKey!='1'" />
-          <span style="color:#fff">文件类型:</span>
-          <a-select v-model:value="searchForm.fileType" placeholder="请选择..." style="width:220px;margin-right:20px" :disabled="activeKey!='1'">
+          <span style="color: #fff">文件名称:</span>
+          <a-input v-model:value="searchForm.fileName" placeholder="请输入文件名称" :disabled="activeKey != '1'" />
+          <span style="color: #fff">文件类型:</span>
+          <a-select v-model:value="searchForm.fileType" placeholder="请选择..." style="width: 220px; margin-right: 20px" :disabled="activeKey != '1'">
             <a-select-option v-for="item in filetypeList" :value="item.value">{{ item.label }}</a-select-option>
           </a-select>
-          <a-button type="primary" preIcon="ant-design:search-outlined" @click="onSearch" :disabled="activeKey!='1'">查询</a-button>
+          <a-button type="primary" preIcon="ant-design:search-outlined" @click="onSearch" :disabled="activeKey != '1'">查询</a-button>
           <a-button type="primary" style="float: right; margin-right: 20px" @click="openModal(true)">文件上传</a-button>
         </div>
         <div class="list">
           <a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange">
             <a-tab-pane key="1" tab="全部">
-              <NormalTable :key="alive" :submitInfo="submitInfo" :selfParam="selfParam" :searchParam="searchForm"
-                :nodeParam="nodeParam" :columns="columns" :list="getTree" :deleteById="deleteById" :downLoad="downLoad"
-                designScope="file-detail" title="文件详情" />
+              <NormalTable
+                :key="alive"
+                :submitInfo="submitInfo"
+                :selfParam="selfParam"
+                :searchParam="searchForm"
+                :nodeParam="nodeParam"
+                :columns="columns"
+                :list="getTree"
+                :deleteById="deleteById"
+                :downLoad="downLoad"
+                designScope="file-detail"
+                title="文件详情"
+              />
             </a-tab-pane>
             <a-tab-pane key="2" tab="待审批">
-              <approvalPend :key="alive2" :selected="selected"></approvalPend>
+              <approvalPend :key="alive2" :selected="selected" />
             </a-tab-pane>
             <a-tab-pane key="3" tab="已审批">
-              <endEd :key="alive3" :selected="selected"></endEd>
+              <endEd :key="alive3" :selected="selected" />
             </a-tab-pane>
           </a-tabs>
         </div>
@@ -61,8 +77,7 @@
           </a-radio-group>
         </a-form-item>
         <a-form-item label="文件类型">
-          <JDictSelectTag v-model:value="formState.fileType" placeholder="请选择文件类型" dictCode="file_type"
-            style="width: 260px" />
+          <JDictSelectTag v-model:value="formState.fileType" placeholder="请选择文件类型" dictCode="file_type" style="width: 260px" />
         </a-form-item>
         <a-form-item label="文件上传">
           <a-upload :before-upload="beforeUpload" @remove="handleRemove" :multiple="false" :file-list="fileList">
@@ -74,419 +89,425 @@
   </div>
 </template>
 <script lang="ts" setup name="system-user">
-import customHeader from '/@/components/vent/customHeader.vue';
-import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
-import fileSystem from './commen/fileSystem.vue';
-import treeIcon from './commen/Icon/treeIcon.vue';
-import NormalTable from '../comment/NormalTable.vue';
-import approvalPend from '../approvalPend/index.vue';
-import endEd from '../endEd/index.vue';
-import { useRouter } from 'vue-router';
-import { useMessage } from '/@/hooks/web/useMessage';
-import { SvgIcon } from '/@/components/Icon';
-import { ref, onMounted, reactive, nextTick, watch } from 'vue';
-import { columns } from './fileDetail.data';
-import { getTree, createFile, editMenu, delMenu, uploadApi, downLoad, deleteById, listData, getNowUserAgencyData } from './fileDetail.api';
-
-let activeKey = ref('1');
-let selfParam = reactive({
-  //各矿参数
-  sysOrgCode: '',
-  bpmStatus: null,
-  flag: false,
-});
-let router = useRouter(); //路由
-const { createMessage } = useMessage();
-let searchForm = reactive({
-  fileName: '',
-  fileType: ''
-})
-let filetypeList = reactive<any[]>([
-  { label: 'txt', value: 'txt' },
-  { label: 'doc', value: 'doc' },
-  { label: 'docx', value: 'docx' },
-  { label: 'xls', value: 'xls' },
-  { label: 'xlsx', value: 'xlsx' },
-  { label: 'ppt', value: 'ppt' },
-  { label: 'pptx', value: 'pptx' },
-  { label: 'jpg', value: 'jpg' },
-  { label: 'png', value: 'png' },
-  { label: 'pdf', value: 'pdf' },
-])
-let fileList = reactive<any[]>([]); //上传文件列表
-// let uploadParam = reactive({}); //上传文件参数
-let nodeParam = reactive({}); //点击树节点时传递的参数
-let alive = ref(0); //点击树节点刷新表格数据
-let alive2 = ref(0)
-let alive3 = ref(0)
-let visible = ref(false); //控制上传弹窗的显示
-let formState = reactive({
-  //上传文件类型,是否审批
-  isApprove: null,
-  fileType: '',
-});
-//文件审批-提交信息
-let submitInfo = ref<any[]>([])
-
-//lxh 当前选中树节点
-let selected = reactive<any>({
-  id: null,
-  pid: null,
-  title: '',
-  isFolder: false,
-});
-let flag = ref('');
-//左侧菜单列表
-let listArr = reactive<any[]>([]);
-//获取要删除的节点数据
-let delNode = reactive({});
-
-//上传文件
-let openModal = (val) => {
-  formState.isApprove = null;
-  formState.fileType = '';
-  fileList.length = 0;
-  visible.value = val;
-};
-
-//tabs选项切换
-let tabChange = (activeKeyVal) => {
-  activeKey.value = activeKeyVal;
-  switch (activeKeyVal) {
-    case '1':
-      alive.value = new Date().getTime()
-      break;
-    case '2':
-      alive2.value = new Date().getTime()
-      break;
-    case '3':
-      alive3.value = new Date().getTime()
-      break;
-
-  }
-};
-//文件审批状态切换
-let changeRadio = (val) => {
-  formState.isApprove = val.target.value;
-};
-//开始上传
-let handleOk = () => {
-  if (formState.isApprove === null) {
-    createMessage.warning('请选择文件审批状态!');
-  } else {
-    const formData = new FormData();
-    formData.append('file', fileList[0]);
-    formData.append('parentId', selected.id);
-    formData.append('isApprove', formState.isApprove);
-    formData.append('fileType', formState.fileType);
-    uploadApi(formData).then((res) => {
-      console.log(res, '上传返回');
-      alive.value = new Date().getTime()
-      visible.value = false;
-    });
-  }
-};
-//取消上传
-let handleCancel = () => {
-  visible.value = false;
-};
-let list2trees = (data) => {
-  // 删除 所有 children,以防止多次调用
-  data.forEach(function (item) {
-    delete item.children;
+  import customHeader from '/@/components/vent/customHeader.vue';
+  import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
+  import fileSystem from './commen/fileSystem.vue';
+  import treeIcon from './commen/Icon/treeIcon.vue';
+  import NormalTable from '../comment/NormalTable.vue';
+  import approvalPend from '../approvalPend/index.vue';
+  import endEd from '../endEd/index.vue';
+  import { useRouter } from 'vue-router';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import { SvgIcon } from '/@/components/Icon';
+  import { ref, onMounted, reactive, nextTick, watch } from 'vue';
+  import { columns } from './fileDetail.data';
+  import { getTree, createFile, editMenu, delMenu, uploadApi, downLoad, deleteById, listData, getNowUserAgencyData } from './fileDetail.api';
+
+  let activeKey = ref('1');
+  let selfParam = reactive({
+    //各矿参数
+    sysOrgCode: '',
+    bpmStatus: null,
+    flag: false,
   });
-  // 将数据存储为 以 id 为 KEY 的 map 索引数据列
-  let map = {};
-  data.forEach(function (item) {
-    map[item.id] = item;
+  let router = useRouter(); //路由
+  const { createMessage } = useMessage();
+  let searchForm = reactive({
+    fileName: '',
+    fileType: '',
   });
-  var val = [];
-  data.forEach(function (item) {
-    item.isFolder = true;
-    item.title = item.fileName;
-    item.pid = item.parentId;
-    // 以当前遍历项,的pid,去map对象中找到索引的id
-    var parent = map[item.pid];
-    // 好绕啊,如果找到索引,那么说明此项不在顶级当中,那么需要把此项添加到,他对应的父级中
-    if (parent) {
-      (parent.children || (parent.children = [])).push(item);
+  let filetypeList = reactive<any[]>([
+    { label: 'txt', value: 'txt' },
+    { label: 'doc', value: 'doc' },
+    { label: 'docx', value: 'docx' },
+    { label: 'xls', value: 'xls' },
+    { label: 'xlsx', value: 'xlsx' },
+    { label: 'ppt', value: 'ppt' },
+    { label: 'pptx', value: 'pptx' },
+    { label: 'jpg', value: 'jpg' },
+    { label: 'png', value: 'png' },
+    { label: 'pdf', value: 'pdf' },
+  ]);
+  let fileList = reactive<any[]>([]); //上传文件列表
+  // let uploadParam = reactive({}); //上传文件参数
+  let nodeParam = reactive({}); //点击树节点时传递的参数
+  let alive = ref(0); //点击树节点刷新表格数据
+  let alive2 = ref(0);
+  let alive3 = ref(0);
+  let visible = ref(false); //控制上传弹窗的显示
+  let formState = reactive({
+    //上传文件类型,是否审批
+    isApprove: null,
+    fileType: '',
+  });
+  //文件审批-提交信息
+  let submitInfo = ref<any[]>([]);
+
+  //lxh 当前选中树节点
+  let selected = reactive<any>({
+    id: null,
+    pid: null,
+    title: '',
+    isFolder: false,
+  });
+  let flag = ref('');
+  //左侧菜单列表
+  let listArr = reactive<any[]>([]);
+  //获取要删除的节点数据
+  let delNode = reactive({});
+
+  //上传文件
+  let openModal = (val) => {
+    formState.isApprove = null;
+    formState.fileType = '';
+    fileList.length = 0;
+    visible.value = val;
+  };
+
+  //tabs选项切换
+  let tabChange = (activeKeyVal) => {
+    activeKey.value = activeKeyVal;
+    switch (activeKeyVal) {
+      case '1':
+        alive.value = new Date().getTime();
+        break;
+      case '2':
+        alive2.value = new Date().getTime();
+        break;
+      case '3':
+        alive3.value = new Date().getTime();
+        break;
+    }
+  };
+  //文件审批状态切换
+  let changeRadio = (val) => {
+    formState.isApprove = val.target.value;
+  };
+  //开始上传
+  let handleOk = () => {
+    if (formState.isApprove === null) {
+      createMessage.warning('请选择文件审批状态!');
     } else {
-      //如果没有在map中找到对应的索引ID,那么直接把 当前的item添加到 val结果集中,作为顶级
-      val.push(item);
+      const formData = new FormData();
+      formData.append('file', fileList[0]);
+      formData.append('parentId', selected.id);
+      formData.append('isApprove', formState.isApprove);
+      formData.append('fileType', formState.fileType);
+      uploadApi(formData).then((res) => {
+        console.log(res, '上传返回');
+        alive.value = new Date().getTime();
+        visible.value = false;
+      });
     }
-  });
-  return val;
-};
-
-let getTypeTableList = async () => {
-  let parentId = nodeParam.id || '';
-  let selectFlag = nodeParam.id ? false : true;
-  let likeFileName = searchForm.fileName || '';
-  let fileSuffix=searchForm.fileType || '';
-  let bpmStatus = selfParam.bpmStatus || '';
-  let sysOrgCode = selfParam.sysOrgCode || '';
-  let res = await getTree({ parentId: parentId, selectFlag: selectFlag, likeFileName: likeFileName,fileSuffix:'.'+fileSuffix, bpmStatus: bpmStatus, sysOrgCode: sysOrgCode });
-  console.log(res, 'tableList--------------------');
-};
-
-//获取左侧菜单树数据
-let getTreeList = async () => {
-  listArr.length = 0;
-  let data = await getTree({ parentId: '' });
-  let datas = data.records.filter((v) => v.fileType == null);
-  let list = list2trees(datas);
-  listArr.push(...list);
-  console.log(listArr, '树节点数据');
-  selected.id = listArr[0].id;
-  selected.pid = listArr[0].pid;
-  selected.title = listArr[0].title;
-  selected.isFolder = listArr[0].isFolder;
-};
-
-//点击目录
-const onClick = (node) => {
-  selected.id = node.id;
-  selected.pid = node.pid;
-  selected.title = node.title;
-  selected.isFolder = node.isFolder;
-  console.log(selected, 'selec----------')
-  if (flag.value != node.title) {
-    alive.value = new Date().getTime()
-    nodeParam = node;
-    flag.value = node.title;
-  }
-};
-//添加文件
-const onAddNode = async (node) => {
-  let data = await createFile({ fileName: node.newName, type: 'FOL', parentId: node.id });
-  console.log(data, '新增文件返回');
-  getTreeList();
-};
-
-//  修改名字
-const onChangeName = (node) => {
-  editMenu({
-    id: node.id,
-    fileName: node.newName,
-    parentId: node.pid,
-  }).then((res) => {
+  };
+  //取消上传
+  let handleCancel = () => {
+    visible.value = false;
+  };
+  let list2trees = (data) => {
+    // 删除 所有 children,以防止多次调用
+    data.forEach(function (item) {
+      delete item.children;
+    });
+    // 将数据存储为 以 id 为 KEY 的 map 索引数据列
+    let map = {};
+    data.forEach(function (item) {
+      map[item.id] = item;
+    });
+    var val = [];
+    data.forEach(function (item) {
+      item.isFolder = true;
+      item.title = item.fileName;
+      item.pid = item.parentId;
+      // 以当前遍历项,的pid,去map对象中找到索引的id
+      var parent = map[item.pid];
+      // 好绕啊,如果找到索引,那么说明此项不在顶级当中,那么需要把此项添加到,他对应的父级中
+      if (parent) {
+        (parent.children || (parent.children = [])).push(item);
+      } else {
+        //如果没有在map中找到对应的索引ID,那么直接把 当前的item添加到 val结果集中,作为顶级
+        val.push(item);
+      }
+    });
+    return val;
+  };
+
+  let getTypeTableList = async () => {
+    let parentId = nodeParam.id || '';
+    let selectFlag = nodeParam.id ? false : true;
+    let likeFileName = searchForm.fileName || '';
+    let fileSuffix = searchForm.fileType || '';
+    let bpmStatus = selfParam.bpmStatus || '';
+    let sysOrgCode = selfParam.sysOrgCode || '';
+    let res = await getTree({
+      parentId: parentId,
+      selectFlag: selectFlag,
+      likeFileName: likeFileName,
+      fileSuffix: '.' + fileSuffix,
+      bpmStatus: bpmStatus,
+      sysOrgCode: sysOrgCode,
+    });
+    console.log(res, 'tableList--------------------');
+  };
+
+  //获取左侧菜单树数据
+  let getTreeList = async () => {
+    listArr.length = 0;
+    let data = await getTree({ parentId: '' });
+    let datas = data.records.filter((v) => v.fileType == null);
+    let list = list2trees(datas);
+    listArr.push(...list);
+    console.log(listArr, '树节点数据');
+    selected.id = listArr[0].id;
+    selected.pid = listArr[0].pid;
+    selected.title = listArr[0].title;
+    selected.isFolder = listArr[0].isFolder;
+  };
+
+  //点击目录
+  const onClick = (node) => {
+    selected.id = node.id;
+    selected.pid = node.pid;
+    selected.title = node.title;
+    selected.isFolder = node.isFolder;
+    console.log(selected, 'selec----------');
+    if (flag.value != node.title) {
+      alive.value = new Date().getTime();
+      nodeParam = node;
+      flag.value = node.title;
+    }
+  };
+  //添加文件
+  const onAddNode = async (node) => {
+    let data = await createFile({ fileName: node.newName, type: 'FOL', parentId: node.id });
+    console.log(data, '新增文件返回');
     getTreeList();
-  });
-};
-// 删除
-let onDeltet = (node) => {
-  delNode = { ...node };
-};
-//确定删除
-let confirmDel = () => {
-  if (delNode.pid == 'root') {
-    createMessage.warning('根节点不能被删除!');
-  } else if (delNode.children) {
-    createMessage.warning('该节点无法被删除,请先删除该节点下的子节点!');
-  } else {
-    delMenu({ id: delNode.id }).then((res) => {
-      console.log(res, '删除文件');
+  };
+
+  //  修改名字
+  const onChangeName = (node) => {
+    editMenu({
+      id: node.id,
+      fileName: node.newName,
+      parentId: node.pid,
+    }).then((res) => {
       getTreeList();
     });
+  };
+  // 删除
+  let onDeltet = (node) => {
+    delNode = { ...node };
+  };
+  //确定删除
+  let confirmDel = () => {
+    if (delNode.pid == 'root') {
+      createMessage.warning('根节点不能被删除!');
+    } else if (delNode.children) {
+      createMessage.warning('该节点无法被删除,请先删除该节点下的子节点!');
+    } else {
+      delMenu({ id: delNode.id }).then((res) => {
+        console.log(res, '删除文件');
+        getTreeList();
+      });
+    }
+  };
+
+  //查询列表
+  let onSearch = () => {
+    alive.value = new Date().getTime();
+  };
+  //上传文件
+  let beforeUpload = (file) => {
+    console.log(file, '选中文件');
+    fileList.length = 0;
+    let index = file.name.indexOf('.');
+    let name = file.name.substring(index + 1);
+    if (name == 'png' || name == 'jpg' || name == 'gif' || name == 'psd' || name == 'webp') {
+      createMessage.warning('禁止上传图片类型的文件!');
+    } else {
+      fileList.push(file);
+    }
+  };
+  // 文件移除
+  let handleRemove = (file) => {
+    const index = fileList.indexOf(file);
+    const newFileList = fileList.slice();
+    newFileList.splice(index, 1);
+    fileList.length = 0;
+  };
+  //文件-提交
+  async function getListData() {
+    let res = await listData({ zx: true, column: 'createTime', order: 'desc', status: 1 });
+    console.log(res, '审批提交-----------');
+    submitInfo.value = res;
   }
-};
-
-//查询列表
-let onSearch = () => {
-  alive.value = new Date().getTime()
-};
-//上传文件
-let beforeUpload = (file) => {
-  console.log(file, '选中文件');
-  fileList.length = 0;
-  let index = file.name.indexOf('.');
-  let name = file.name.substring(index + 1);
-  if (name == 'png' || name == 'jpg' || name == 'gif' || name == 'psd' || name == 'webp') {
-    createMessage.warning('禁止上传图片类型的文件!');
-  } else {
-    fileList.push(file);
-  }
-};
-// 文件移除
-let handleRemove = (file) => {
-  const index = fileList.indexOf(file);
-  const newFileList = fileList.slice();
-  newFileList.splice(index, 1);
-  fileList.length = 0;
-};
-//文件-提交
-async function getListData() {
-  let res = await listData({ zx: true, column: 'createTime', order: 'desc', status: 1 })
-  console.log(res, '审批提交-----------')
-  submitInfo.value = res
-}
-watch(
-  () => router.currentRoute.value,
-  (val) => {
-    console.log('各矿传参', val);
-    selfParam.bpmStatus = val.query.bpmStatus;
-    selfParam.sysOrgCode = val.query.sysOrgCode;
-    selfParam.flag = val.query.flag;
-  },
-  { immediate: true }
-);
-onMounted(() => {
-  getTreeList();
-  getListData()
-  getTypeTableList();
-});
+  watch(
+    () => router.currentRoute.value,
+    (val) => {
+      console.log('各矿传参', val);
+      selfParam.bpmStatus = val.query.bpmStatus;
+      selfParam.sysOrgCode = val.query.sysOrgCode;
+      selfParam.flag = val.query.flag;
+    },
+    { immediate: true }
+  );
+  onMounted(() => {
+    getTreeList();
+    getListData();
+    getTypeTableList();
+  });
 </script>
 
 <style lang="less" scoped>
-@ventSpace: zxm;
-
-.file-details {
-  width: calc(100% - 10px);
-  height: calc(100% - 100px);
-  padding: 0px 15px 15px 15px;
-  position: relative;
-  margin-top: 100px;
-  // background: url(../../../../assets/images/files/homes/bd.png) no-repeat center;
-  // background-size: contain;
-
-  &::after {
-    display: block;
-    content: '';
-    height: 200px;
-    width: 100%;
-    position: absolute;
-    background-image: linear-gradient(#2eb2ff05, #2ea2ff00);
-    border-top: 1px solid #2eb2ff20;
-    top: 0px;
-    left: 0px;
-  }
+  @ventSpace: zxm;
 
-  .content {
-    width: 100%;
-    height: 100%;
-    display: flex;
-    flex-direction: row;
-    justify-content: space-between;
-    align-items: flex-start;
+  .file-details {
+    width: calc(100% - 10px);
+    height: calc(100% - 100px);
+    padding: 0px 15px 15px 15px;
     position: relative;
-    z-index: 999;
+    margin-top: 100px;
+    // background: url(../../../../assets/images/files/homes/bd.png) no-repeat center;
+    // background-size: contain;
+
+    &::after {
+      display: block;
+      content: '';
+      height: 200px;
+      width: 100%;
+      position: absolute;
+      background-image: linear-gradient(#2eb2ff05, #2ea2ff00);
+      border-top: 1px solid #2eb2ff20;
+      top: 0px;
+      left: 0px;
+    }
 
-    .left-box {
-      width: 15%;
+    .content {
+      width: 100%;
       height: 100%;
-      padding: 20px;
-      border: 1px solid #99e8ff66;
-      background: #27546e1a;
-      box-shadow: 0px 0px 20px 7px rgba(145, 233, 254, 0.7) inset;
-      -moz-box-shadow: 0px 0px 20px 7px rgba(145, 233, 254, 0.7) inset;
-      -webkit-box-shadow: 0px 0px 50px 1px rgb(149 235 255 / 5%) inset;
-
-      // lxh
-      .iconfont {
-        color: #fff;
-        font-size: 12px;
-        margin-left: 5px;
+      display: flex;
+      flex-direction: row;
+      justify-content: space-between;
+      align-items: flex-start;
+      position: relative;
+      z-index: 999;
+
+      .left-box {
+        width: 15%;
+        height: 100%;
+        padding: 20px;
+        border: 1px solid #99e8ff66;
+        background: #27546e1a;
+        box-shadow: 0px 0px 20px 7px rgba(145, 233, 254, 0.7) inset;
+        -moz-box-shadow: 0px 0px 20px 7px rgba(145, 233, 254, 0.7) inset;
+        -webkit-box-shadow: 0px 0px 50px 1px rgb(149 235 255 / 5%) inset;
+
+        // lxh
+        .iconfont {
+          color: #fff;
+          font-size: 12px;
+          margin-left: 5px;
+        }
       }
-    }
 
-    .right-box {
-      width: 85%;
-      height: 100%;
-      padding: 0px 0px 0px 15px;
-      box-sizing: border-box;
+      .right-box {
+        width: 85%;
+        height: 100%;
+        padding: 0px 0px 0px 15px;
+        box-sizing: border-box;
+
+        .search {
+          height: 34px;
+          line-height: 34px;
+          margin-bottom: 15px;
+        }
+      }
 
-      .search {
-        height: 34px;
-        line-height: 34px;
-        margin-bottom: 15px;
+      .list {
+        height: calc(100% - 49px);
+        position: relative;
       }
     }
 
-    .list {
-      height: calc(100% - 49px);
-      position: relative;
+    .zxm-form {
+      padding: 10px !important;
     }
   }
 
-  .zxm-form {
-    padding: 10px !important;
+  ::v-deep .jeecg-svg-icon {
+    margin-right: 5px;
+  }
+
+  ::v-deep .jeecg-basic-table-form-container {
+    padding: 0px 0px;
+  }
+
+  ::v-deep .zxm-btn-primary {
+    background-color: transparent;
+    border: none;
+    background: url(../../../../assets/images/files/details/btn.png) no-repeat !important;
+    background-size: 100% 100% !important;
+  }
+
+  ::v-deep .zxm-tree-switcher {
+    background: transparent;
+  }
+
+  ::v-deep .zxm-input {
+    width: 220px;
+    height: 30px;
+    background: transparent;
+    border: 1px solid #31bccc;
+    color: #fff;
+    margin-right: 20px;
+    border-radius: 5px;
   }
-}
-
-::v-deep .jeecg-svg-icon {
-  margin-right: 5px;
-}
-
-::v-deep .jeecg-basic-table-form-container {
-  padding: 0px 0px;
-}
-
-::v-deep .zxm-btn-primary {
-  background-color: transparent;
-  border: none;
-  background: url(../../../../assets/images/files/details/btn.png) no-repeat !important;
-  background-size: 100% 100% !important;
-}
-
-::v-deep .zxm-tree-switcher {
-  background: transparent;
-}
-
-::v-deep .zxm-input {
-  width: 220px;
-  height: 30px;
-  background: transparent;
-  border: 1px solid #31bccc;
-  color: #fff;
-  margin-right: 20px;
-  border-radius: 5px;
-}
-
-::v-deep .zxm-select:not(.zxm-select-customize-input) .zxm-select-selector{
-  height: 30px !important;
-  background: transparent !important;
-  border: 1px solid #31bccc !important;
-  border-radius: 5px !important;
-  color: #fff !important;
-}
-::v-deep .zxm-select-single.zxm-select-show-arrow .zxm-select-selection-item{
-  color: #fff !important;
-}
-
-::v-deep .zxm-btn-group {
-  margin-right: 25px;
-}
-
-::v-deep .zxm-upload-list-item-name {
-  color: #fff;
-}
-
-::v-deep .zxm-upload-list-item:hover .zxm-upload-list-item-info {
-  background-color: transparent;
-}
-
-:deep(.@{ventSpace}-table-cell-row-hover) {
-  background: #264d8833 !important;
-}
-
-:deep(.@{ventSpace}-table-row-selected) {
-  background: #268bc522 !important;
-}
-
-:deep(.@{ventSpace}-select-dropdown) {
-  border: 1px solid #ececec66;
-
-  .@{ventSpace}-select-item-option-selected,
-  .@{ventSpace}-select-item-option-active {
-    background-color: #ffffff33 !important;
+
+  ::v-deep .zxm-select:not(.zxm-select-customize-input) .zxm-select-selector {
+    height: 30px !important;
+    background: transparent !important;
+    border: 1px solid #31bccc !important;
+    border-radius: 5px !important;
+    color: #fff !important;
+  }
+  ::v-deep .zxm-select-single.zxm-select-show-arrow .zxm-select-selection-item {
+    color: #fff !important;
+  }
+
+  ::v-deep .zxm-btn-group {
+    margin-right: 25px;
   }
 
-  .@{ventSpace}-select-item:hover {
-    background-color: #ffffff33 !important;
+  ::v-deep .zxm-upload-list-item-name {
+    color: #fff;
   }
-}
 
-::v-deep .zxm-form-item-control-input {
-  width: 90%;
-}
+  ::v-deep .zxm-upload-list-item:hover .zxm-upload-list-item-info {
+    background-color: transparent;
+  }
+
+  :deep(.@{ventSpace}-table-cell-row-hover) {
+    background: #264d8833 !important;
+  }
+
+  :deep(.@{ventSpace}-table-row-selected) {
+    background: #268bc522 !important;
+  }
+
+  :deep(.@{ventSpace}-select-dropdown) {
+    border: 1px solid #ececec66;
+
+    .@{ventSpace}-select-item-option-selected,
+    .@{ventSpace}-select-item-option-active {
+      background-color: #ffffff33 !important;
+    }
+
+    .@{ventSpace}-select-item:hover {
+      background-color: #ffffff33 !important;
+    }
+  }
+
+  ::v-deep .zxm-form-item-control-input {
+    width: 90%;
+  }
 </style>