浏览代码

1. 修改了瓦斯智能排放与按需供风联动echarts加载不出来的问题

hongrunxia 2 月之前
父节点
当前提交
016a38cfba

+ 2 - 1
.env.development

@@ -29,6 +29,7 @@ VITE_GLOB_API_URL_PREFIX=
 
 #微前端qiankun应用,命名必须以VITE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
 #VITE_APP_SUB_APP = [["micro-need-air", "//10.10.150.72:8099/"], ["micro-vent-3dModal", "//localhost:8091/"], ["micro-fire-front", "//localhost:8090/"]]
-VITE_APP_SUB_APP = [["micro-vent-3dModal", "//192.168.183.88:8091/", "micro-vent-3dModal"], ["micro-need-air", "//192.168.183.88:8093/", "micro-need-air"], ["micro-fire-front", "//localhost:8097/", "fire-Micro"]]
+# VITE_APP_SUB_APP = [["micro-vent-3dModal", "//192.168.183.88:8091/", "micro-vent-3dModal"], ["micro-need-air", "//192.168.183.88:8093/", "micro-need-air"], ["micro-fire-front", "//localhost:8097/", "fire-Micro"]]
+VITE_APP_SUB_APP = [["micro-vent-3dModal", "//192.168.183.154:8091/", "micro-vent-3dModal"], ["micro-need-air", "//192.168.183.88:8093/", "micro-need-air"], ["micro-fire-front", "//localhost:8097/", "fire-Micro"]]
 # VITE_APP_SUB_APP = [["micro-vent-3dModal", "//182.92.126.35:8091/", "micro-vent-3dModal"], ["micro-need-air", "//182.92.126.35:8099/", "micro-need-air"], ["micro-fire-front", "//182.92.126.35:8097/", "fire-Micro"]]
 # VITE_APP_SUB_APP = [["micro-vent-3dModal", "//localhost:8091/"], ["micro-need-air", "//localhost:8099/"], ["micro-fire-front", "//localhost:8090/"]]

+ 0 - 1
src/components/chart/BarAndLine.vue

@@ -116,7 +116,6 @@
       initChartsOption();
 
       function initCharts(isRefresh = false) {
-        debugger;
         if (props.dataSource.length < 1) return;
         //轴数据
         let isFresh = false;

文件差异内容过多而无法显示
+ 537 - 526
src/views/vent/monitorManager/alarmMonitor/warn/ventilateWarn.vue


+ 147 - 196
src/views/vent/monitorManager/fanLocalMonitor/components/dischargeGas.vue

@@ -15,7 +15,15 @@
     <div class="modal-box">
       <div class="left-box" style="width: 900px; height: 400px"> </div>
       <div class="right-box">
-        <div ref="ChartRef" class="line-chart" style="height: 400px; width: 100%"></div>
+        <!-- <div ref="ChartRef" class="line-chart" style="height: 400px; width: 100%"></div> -->
+        <BarAndLine
+          class="echarts-line"
+          xAxisPropType="readTime"
+          height="400px"
+          :dataSource="echartsData"
+          :chartsColumns="chartsColumnList1"
+          :option="echatsOption"
+        />
       </div>
     </div>
     <div class="setting-box">
@@ -32,224 +40,167 @@
 </template>
 
 <script lang="ts" setup>
-import { BasicModal, useModalInner } from '/@/components/Modal';
-import { ref, nextTick, onMounted, computed } from 'vue';
-import * as echarts from 'echarts';
-const props = defineProps({
-  data: {
-    type: Object,
-    default: () => {},
-  },
-});
-const emit = defineEmits(['close', 'register', 'openModal']);
-// 注册 modal
-const [register, { closeModal }] = useModalInner((data) => {
-  nextTick(() => {
-    updateChart();
-  });
-});
-const ChartRef = ref(null);
-const categories = ref(['2025-01-01', '2025-01-02', '2025-01-03']);
-const gasT1 = ref([0.1, 0.2, 0.1]);
-const gasT2 = ref([0.2, 0.2, 0.1]);
-function updateChart() {
-  const myChart = echarts.init(ChartRef.value);
-  const option = {
-    title: {
-      text: '',
-      textStyle: {
-        color: '#ffffff', // 设置标题颜色
-      },
-      left: 'center', // 水平居中
-      top: '0', // 设置标题距离顶部的距离
-    },
-    legend: {
-      top: '9%',
-      textStyle: {
-        color: '#ffffffff',
-      },
-      width: '80%', // 设置图例的宽度
-      orient: 'horizontal', // 水平布局
-      pageIconColor: '#ffffff', // 设置翻页图标颜色
-      pageTextStyle: {
-        color: '#ffffff', // 设置翻页文字颜色
-      },
-    },
-    xAxis: {
-      type: 'category',
-      data: categories.value,
-      splitLine: { show: true, lineStyle: { color: 'rgba(28, 72, 105, 0.5)' } },
-      axisLabel: {
-        interval: 0, // 显示所有标签
-        color: '#ffffff', // 设置 x 轴字体颜色
-      },
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import { ref, nextTick, onMounted, watch } from 'vue';
+  import { chartsColumnList1, echatsOption } from '../fanLocal.data';
+  import BarAndLine from '/@/components/chart/BarAndLine.vue';
+  const props = defineProps({
+    data: {
+      type: Object,
+      default: () => {},
     },
-    yAxis: [
-      {
-        type: 'value',
-        name: '浓度',
-        max: 1,
-        splitLine: { show: true, lineStyle: { color: 'rgba(21,80,126,.5)' } },
-        axisLabel: {
-          color: '#ffffff',
-        },
-      },
-    ],
-    grid: {
-      top: '21%', // 设置 grid 距离顶部的距离,增加间隔
-      left: '3%',
-      right: '4%',
-      bottom: '3%',
-      containLabel: true,
+    gasMax: {
+      type: Number,
     },
-    series: [
-      {
-        name: '目标风量',
-        data: gasT1.value,
-        type: 'line',
-        yAxisIndex: 1,
-      },
-      {
-        name: '供风量',
-        data: gasT2.value,
-        type: 'line',
-        yAxisIndex: 1,
-      },
-    ],
-  };
-  myChart.setOption(option);
-  window.onresize = function () {
-    myChart.resize();
-  };
-}
-onMounted(() => {});
-function onSubmit() {
-  emit('close');
-  closeModal();
-}
+  });
+  const emit = defineEmits(['close', 'register', 'openModal']);
+  // 注册 modal
+  const [register, { closeModal }] = useModalInner((data) => {
+    nextTick(() => {
+      // updateChart();
+    });
+  });
+  const echartsData = ref([]);
+  const monitorData = ref({});
+  watch(
+    () => props.data,
+    (newVal) => {
+      monitorData.value = newVal;
+      if (echartsData.value.length > 20) {
+        echartsData.value.shift();
+      }
+      echartsData.value = [...echartsData.value, newVal];
+      console.log(echartsData.value);
+    }
+  );
+  onMounted(() => {});
+  function onSubmit() {
+    emit('close');
+    closeModal();
+  }
 </script>
 
 <style scoped lang="less">
-.modal-box {
-  display: flex;
-  flex-direction: row;
-  background-color: #ffffff05;
-  padding: 10px 8px 0 8px;
-  border: 1px solid #00d8ff22;
-  position: relative;
-  // min-height: 600px;
-  .left-box {
-    flex: 1; /* 占据 3/4 的空间 */
-    background-image: url(../../../../../assets/images/dischargeGas.svg);
-    background-repeat: no-repeat;
-    background-size: contain; /* 确保背景图片完整显示 */
-    background-position: center; /* 确保背景图片居中 */
-  }
-  .right-box {
-    flex: 1; /* 占据 3/4 的空间 */
-    height: 400px;
-    width: 100%;
-  }
-}
-.setting-box {
-  width: 1570px;
-  height: 70px;
-  margin: 10px 0;
-  background-color: #ffffff05;
-  border: 1px solid #00d8ff22;
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-
-  .right-inputs {
-    width: 100%;
+  .modal-box {
     display: flex;
-    height: 40px;
-    margin: 0 10px;
-    justify-content: space-between;
+    flex-direction: row;
+    background-color: #ffffff05;
+    padding: 10px 8px 0 8px;
+    border: 1px solid #00d8ff22;
+    position: relative;
+    // min-height: 600px;
+    .left-box {
+      flex: 1; /* 占据 3/4 的空间 */
+      background-image: url(../../../../../assets/images/dischargeGas.svg);
+      background-repeat: no-repeat;
+      background-size: contain; /* 确保背景图片完整显示 */
+      background-position: center; /* 确保背景图片居中 */
+    }
+    .right-box {
+      flex: 1; /* 占据 3/4 的空间 */
+      height: 400px;
+      width: 100%;
+    }
   }
-  .left-buttons {
+  .setting-box {
+    width: 1570px;
+    height: 70px;
+    margin: 10px 0;
+    background-color: #ffffff05;
+    border: 1px solid #00d8ff22;
     display: flex;
-    height: 40px;
+    align-items: center;
+    justify-content: space-between;
 
-    .btn {
+    .right-inputs {
+      width: 100%;
+      display: flex;
+      height: 40px;
       margin: 0 10px;
+      justify-content: space-between;
     }
-  }
-  .border-clip {
-    width: 1px;
-    height: 25px;
-    border-right: 1px solid #8b8b8b77;
-  }
-  .input-title {
-    max-width: 150px;
-  }
-  .input-box {
-    width: 220px !important;
-    background: transparent !important;
-    border-color: #00d8ff44 !important;
-    margin-right: 20px;
-    color: #fff !important;
-  }
-  .btn {
-    padding: 8px 20px;
-    position: relative;
-    border-radius: 2px;
-    color: #fff;
-    width: fit-content;
-    cursor: pointer;
+    .left-buttons {
+      display: flex;
+      height: 40px;
 
-    &::before {
-      position: absolute;
-      display: block;
-      content: '';
-      width: calc(100% - 4px);
-      height: calc(100% - 4px);
-      top: 2px;
-      left: 2px;
-      border-radius: 2px;
-      z-index: -1;
+      .btn {
+        margin: 0 10px;
+      }
     }
-  }
-
-  .btn1 {
-    border: 1px solid #5cfaff;
+    .border-clip {
+      width: 1px;
+      height: 25px;
+      border-right: 1px solid #8b8b8b77;
+    }
+    .input-title {
+      max-width: 150px;
+    }
+    .input-box {
+      width: 220px !important;
+      background: transparent !important;
+      border-color: #00d8ff44 !important;
+      margin-right: 20px;
+      color: #fff !important;
+    }
+    .btn {
+      padding: 8px 20px;
+      position: relative;
+      border-radius: 2px;
+      color: #fff;
+      width: fit-content;
+      cursor: pointer;
 
-    &::before {
-      background-image: linear-gradient(#2effee92, #0cb1d592);
+      &::before {
+        position: absolute;
+        display: block;
+        content: '';
+        width: calc(100% - 4px);
+        height: calc(100% - 4px);
+        top: 2px;
+        left: 2px;
+        border-radius: 2px;
+        z-index: -1;
+      }
     }
 
-    &:hover {
-      border: 1px solid #5cfaffaa;
+    .btn1 {
+      border: 1px solid #5cfaff;
 
       &::before {
-        background-image: linear-gradient(#2effee72, #0cb1d572);
+        background-image: linear-gradient(#2effee92, #0cb1d592);
+      }
+
+      &:hover {
+        border: 1px solid #5cfaffaa;
+
+        &::before {
+          background-image: linear-gradient(#2effee72, #0cb1d572);
+        }
       }
     }
   }
-}
 
-@keyframes open {
-  0% {
-    height: 0px;
-  }
-  100% {
-    height: fit-content;
+  @keyframes open {
+    0% {
+      height: 0px;
+    }
+    100% {
+      height: fit-content;
+    }
   }
-}
 
-@keyframes close {
-  0% {
-    height: fit-content;
+  @keyframes close {
+    0% {
+      height: fit-content;
+    }
+    100% {
+      height: 0px;
+    }
+  }
+  :deep(.zxm-divider-inner-text) {
+    color: #cacaca88 !important;
   }
-  100% {
-    height: 0px;
+  :deep(.zxm-form-item) {
+    margin-bottom: 10px;
   }
-}
-:deep(.zxm-divider-inner-text) {
-  color: #cacaca88 !important;
-}
-:deep(.zxm-form-item) {
-  margin-bottom: 10px;
-}
-</style>
+</style>

+ 165 - 149
src/views/vent/monitorManager/fanLocalMonitor/components/supplyAir.vue

@@ -6,7 +6,7 @@
     width="1200px"
     v-bind="$attrs"
     @ok="onSubmit"
-    :closeFunc="onCancel"
+    @cancel="onCancel"
     :canFullscreen="false"
     :destroyOnClose="true"
     :footer="null"
@@ -19,7 +19,7 @@
           class="echarts-line"
           xAxisPropType="time"
           height="400px"
-          :dataSource="monitorData"
+          :dataSource="echartsData"
           :chartsColumns="chartsColumnList1"
           :option="echatsOption"
         />
@@ -29,9 +29,9 @@
       <div class="right-inputs">
         <div class="vent-flex-row">
           <div class="input-title">出风口风量(m³/min):</div>
-          <InputNumber class="input-box" size="large" v-model:value="ductOutletAirVolume_merge" />
+          <InputNumber class="input-box" size="large" v-model:value="dataSource['ductOutletAirVolume_merge']" />
           <div class="input-title">局扇供风量(m³/min):</div>
-          <InputNumber class="input-box" size="large" v-model:value="inletAirVolume_merge" />
+          <InputNumber class="input-box" size="large" v-model:value="dataSource['inletAirVolume_merge']" />
         </div>
       </div>
     </div>
@@ -39,177 +39,193 @@
 </template>
 
 <script lang="ts" setup>
-import { BasicModal, useModalInner } from '/@/components/Modal';
-import { ref, onMounted, reactive, nextTick, computed } from 'vue';
-import echarts from '/@/utils/lib/echarts';
-import { option, initData, fanInfoData, chartsColumnList1, echatsOption } from '../fanLocal.data';
-import BarAndLine from '/@/components/chart/BarAndLine.vue';
-import dayjs from 'dayjs';
-const emit = defineEmits(['close', 'register', 'openModal']);
-// 注册 modal
-const [register, { closeModal }] = useModalInner((data) => {
-  nextTick(() => {
-    if (option['xAxis']) option['xAxis']['data'] = xData;
-    option['series'] = yDataList;
-    initEcharts();
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import { ref, onMounted, nextTick, watch } from 'vue';
+  import echarts from '/@/utils/lib/echarts';
+  import { option, chartsColumnList1, echatsOption } from '../fanLocal.data';
+  import BarAndLine from '/@/components/chart/BarAndLine.vue';
+  import dayjs from 'dayjs';
+  const emit = defineEmits(['close', 'register', 'openModal']);
+  const props = defineProps({
+    data: {
+      type: Object,
+      default: () => {},
+    },
+    targetVolume: {
+      type: Number,
+    },
   });
-});
-const ChartRef = ref();
-const myChart = ref();
-const refresh = ref(true);
-const xDataMax = 1000;
-const xData: any[] = [];
-const yDataList: [] = [];
-const monitorData = ref([]);
-const props = defineProps({
-  data: {
-    type: Array,
-    default: () => [],
-  },
-  targetVolume: {
-    type: Number,
-  },
-});
-function onSubmit() {
-  emit('close');
-  closeModal();
-}
-function initEcharts() {
-  if (ChartRef.value) {
-    myChart.value = echarts.init(ChartRef.value);
-    option && myChart.value.setOption(option);
-    refresh.value = false;
+  // 注册 modal
+  const [register, { closeModal }] = useModalInner((data) => {
     nextTick(() => {
-      setTimeout(() => {
-        refresh.value = true;
-      }, 0);
+      if (option['xAxis']) option['xAxis']['data'] = xData;
+      option['series'] = yDataList;
+      initEcharts();
     });
+  });
+  const ChartRef = ref();
+  const myChart = ref();
+  const refresh = ref(true);
+  const xData: any[] = [];
+  const yDataList: [] = [];
+  const echartsData = ref([]);
+  const monitorData = ref({});
+  watch(
+    () => props.data,
+    (newVal) => {
+      monitorData.value = newVal;
+      if (echartsData.value.length > 20) {
+        echartsData.value.shift();
+      }
+      echartsData.value = [...echartsData.value, newVal];
+      console.log(echartsData.value);
+    }
+  );
+  function onSubmit() {
+    emit('close');
+    closeModal();
   }
-}
-onMounted(() => {});
-</script>
-
-<style scoped lang="less">
-.modal-box {
-  display: flex;
-  flex-direction: row;
-  background-color: #ffffff05;
-  padding: 10px 8px 0 8px;
-  border: 1px solid #00d8ff22;
-  position: relative;
-  // min-height: 600px;
-  .left-box {
-    flex: 1; /* 占据 3/4 的空间 */
-    background-image: url(../../../../../assets/images/supplyAir.svg);
-    background-repeat: no-repeat;
-    background-size: contain; /* 确保背景图片完整显示 */
-    background-position: center; /* 确保背景图片居中 */
+  function onCancel() {
+    //
   }
-  .right-box {
-    flex: 1; /* 占据 3/4 的空间 */
-    height: 400px;
-    width: 100%;
+  function initEcharts() {
+    if (ChartRef.value) {
+      myChart.value = echarts.init(ChartRef.value);
+      option && myChart.value.setOption(option);
+      refresh.value = false;
+      nextTick(() => {
+        setTimeout(() => {
+          refresh.value = true;
+        }, 0);
+      });
+    }
   }
-}
-.setting-box {
-  width: 1570px;
-  height: 70px;
-  margin: 10px 0;
-  background-color: #ffffff05;
-  border: 1px solid #00d8ff22;
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
+  onMounted(() => {
+    // initEcharts();
+  });
+</script>
 
-  .right-inputs {
-    width: 100%;
+<style scoped lang="less">
+  .modal-box {
     display: flex;
-    height: 40px;
-    margin: 0 10px;
-    justify-content: space-between;
+    flex-direction: row;
+    background-color: #ffffff05;
+    padding: 10px 8px 0 8px;
+    border: 1px solid #00d8ff22;
+    position: relative;
+    // min-height: 600px;
+    .left-box {
+      flex: 1; /* 占据 3/4 的空间 */
+      background-image: url(../../../../../assets/images/supplyAir.svg);
+      background-repeat: no-repeat;
+      background-size: contain; /* 确保背景图片完整显示 */
+      background-position: center; /* 确保背景图片居中 */
+    }
+    .right-box {
+      flex: 1; /* 占据 3/4 的空间 */
+      height: 400px;
+      width: 100%;
+    }
   }
-  .left-buttons {
+  .setting-box {
+    width: 1570px;
+    height: 70px;
+    margin: 10px 0;
+    background-color: #ffffff05;
+    border: 1px solid #00d8ff22;
     display: flex;
-    height: 40px;
+    align-items: center;
+    justify-content: space-between;
 
-    .btn {
+    .right-inputs {
+      width: 100%;
+      display: flex;
+      height: 40px;
       margin: 0 10px;
+      justify-content: space-between;
     }
-  }
-  .border-clip {
-    width: 1px;
-    height: 25px;
-    border-right: 1px solid #8b8b8b77;
-  }
-  .input-title {
-    max-width: 150px;
-  }
-  .input-box {
-    width: 220px !important;
-    background: transparent !important;
-    border-color: #00d8ff44 !important;
-    margin-right: 20px;
-    color: #fff !important;
-  }
-  .btn {
-    padding: 8px 20px;
-    position: relative;
-    border-radius: 2px;
-    color: #fff;
-    width: fit-content;
-    cursor: pointer;
+    .left-buttons {
+      display: flex;
+      height: 40px;
 
-    &::before {
-      position: absolute;
-      display: block;
-      content: '';
-      width: calc(100% - 4px);
-      height: calc(100% - 4px);
-      top: 2px;
-      left: 2px;
-      border-radius: 2px;
-      z-index: -1;
+      .btn {
+        margin: 0 10px;
+      }
     }
-  }
-
-  .btn1 {
-    border: 1px solid #5cfaff;
+    .border-clip {
+      width: 1px;
+      height: 25px;
+      border-right: 1px solid #8b8b8b77;
+    }
+    .input-title {
+      max-width: 150px;
+    }
+    .input-box {
+      width: 220px !important;
+      background: transparent !important;
+      border-color: #00d8ff44 !important;
+      margin-right: 20px;
+      color: #fff !important;
+    }
+    .btn {
+      padding: 8px 20px;
+      position: relative;
+      border-radius: 2px;
+      color: #fff;
+      width: fit-content;
+      cursor: pointer;
 
-    &::before {
-      background-image: linear-gradient(#2effee92, #0cb1d592);
+      &::before {
+        position: absolute;
+        display: block;
+        content: '';
+        width: calc(100% - 4px);
+        height: calc(100% - 4px);
+        top: 2px;
+        left: 2px;
+        border-radius: 2px;
+        z-index: -1;
+      }
     }
 
-    &:hover {
-      border: 1px solid #5cfaffaa;
+    .btn1 {
+      border: 1px solid #5cfaff;
 
       &::before {
-        background-image: linear-gradient(#2effee72, #0cb1d572);
+        background-image: linear-gradient(#2effee92, #0cb1d592);
+      }
+
+      &:hover {
+        border: 1px solid #5cfaffaa;
+
+        &::before {
+          background-image: linear-gradient(#2effee72, #0cb1d572);
+        }
       }
     }
   }
-}
 
-@keyframes open {
-  0% {
-    height: 0px;
-  }
-  100% {
-    height: fit-content;
+  @keyframes open {
+    0% {
+      height: 0px;
+    }
+    100% {
+      height: fit-content;
+    }
   }
-}
 
-@keyframes close {
-  0% {
-    height: fit-content;
+  @keyframes close {
+    0% {
+      height: fit-content;
+    }
+    100% {
+      height: 0px;
+    }
+  }
+  :deep(.zxm-divider-inner-text) {
+    color: #cacaca88 !important;
   }
-  100% {
-    height: 0px;
+  :deep(.zxm-form-item) {
+    margin-bottom: 10px;
   }
-}
-:deep(.zxm-divider-inner-text) {
-  color: #cacaca88 !important;
-}
-:deep(.zxm-form-item) {
-  margin-bottom: 10px;
-}
 </style>

文件差异内容过多而无法显示
+ 629 - 574
src/views/vent/monitorManager/fanLocalMonitor/index.vue


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

@@ -47,7 +47,7 @@
       <dv-border-box8 :dur="5" :style="`padding: 5px; height: ${scroll.y + 120}px`">
         <div class="tabs-button-group">
           <a-button v-if="hasPermission('windrect:handler')" class="tabs-button" type="primary" @click="openModel">一键测风</a-button>
-          <a-button v-if="hasPermission('windrect:reset')" class="tabs-button" type="primary" @click="resetHandle">一键复位</a-button>
+          <a-button class="tabs-button" type="primary" @click="resetHandle">一键复位</a-button>
         </div>
         <a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange">
           <a-tab-pane key="1" tab="实时监测">

部分文件因为文件数量过多而无法显示