Explorar o código

调控流程图更换

bobo04052021@163.com hai 2 meses
pai
achega
a4acb637b7

+ 67 - 0
src/assets/images/autoWindow.svg

@@ -0,0 +1,67 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="727.29" height="325" viewBox="0 0 727.29 325">
+  <g id="风窗自动调控流程" transform="translate(-423 -276)">
+    <path id="SvgjsPath1012" d="M43.33,73.5h81.34c24.44,0,24.44,55,0,55H43.33C18.89,128.5,18.89,73.5,43.33,73.5Z" transform="translate(423 276)" fill="#b7eaeb"/>
+    <text id="开始" transform="translate(491 383)" fill="#323232" font-size="16" font-family="MicrosoftYaHei-Bold, Microsoft YaHei" font-weight="700"><tspan x="0" y="0">开始</tspan></text>
+    <path id="SvgjsPath1018" d="M402.29,75q0-4,4-4h110c2.66,0,4,1.33,4,4v52c0,2.67-1.34,4-4,4h-110q-4,0-4-4Z" transform="translate(423 276)" fill="#b7eaeb"/>
+    <text id="瓦斯传感器监" transform="translate(836.29 373)" fill="#323232" font-size="16" font-family="MicrosoftYaHei-Bold, Microsoft YaHei" font-weight="700"><tspan x="0" y="0">瓦斯传感器监</tspan></text>
+    <text id="测" transform="translate(876.29 393)" fill="#323232" font-size="16" font-family="MicrosoftYaHei-Bold, Microsoft YaHei" font-weight="700"><tspan x="0" y="0">测</tspan></text>
+    <path id="SvgjsPath1026" d="M205,75q0-4,4-4H319q4,0,4,4v52q0,4-4,4H209q-4,0-4-4Z" transform="translate(423 276)" fill="#b7eaeb"/>
+    <text id="设置传感器浓" transform="translate(639 373)" fill="#323232" font-size="16" font-family="MicrosoftYaHei-Bold, Microsoft YaHei" font-weight="700"><tspan x="0" y="0">设置传感器浓</tspan></text>
+    <text id="度限值" transform="translate(663 393)" fill="#323232" font-size="16" font-family="MicrosoftYaHei-Bold, Microsoft YaHei" font-weight="700"><tspan x="0" y="0">度限值</tspan></text>
+    <path id="SvgjsPath1034" d="M587.29,101l70-35,70,35-70,35Z" transform="translate(423 276)" fill="#b7eaeb"/>
+    <text id="浓度超限" transform="translate(1048.29 383.35)" fill="#323232" font-size="16" font-family="MicrosoftYaHei-Bold, Microsoft YaHei" font-weight="700"><tspan x="0" y="0">浓度超限</tspan></text>
+    <path id="路径_56986" data-name="路径 56986" transform="translate(423 276)" fill="none"/>
+    <path id="SvgjsPath1042" d="M390.09,96.5l13,4.5-13,4.5v-9" transform="translate(423 276)" fill="#fff"/>
+    <path id="路径_56987" data-name="路径 56987" transform="translate(423 276)" fill="none"/>
+    <path id="SvgjsPath1046" d="M575.09,96.5l13,4.5-13,4.5v-9" transform="translate(423 276)" fill="#fff"/>
+    <path id="路径_56988" data-name="路径 56988" transform="translate(423 276)" fill="none"/>
+    <path id="SvgjsPath1050" d="M465.79,58.8l-4.5,13-4.5-13h9" transform="translate(423 276)" fill="#fff"/>
+    <path id="SvgjsPath1056" d="M598.29,216q0-4,4-4h110c2.66,0,4,1.33,4,4v52c0,2.67-1.34,4-4,4h-110q-4,0-4-4Z" transform="translate(423 276)" fill="#b7eaeb"/>
+    <text id="增大风窗面积" transform="translate(1032.29 524)" fill="#323232" font-size="16" font-family="MicrosoftYaHei-Bold, Microsoft YaHei" font-weight="700"><tspan x="0" y="0">增大风窗面积</tspan></text>
+    <path id="路径_56989" data-name="路径 56989" transform="translate(423 276)" fill="none"/>
+    <path id="SvgjsPath1064" d="M661.79,199.8l-4.5,13-4.5-13h9" transform="translate(423 276)" fill="#fff"/>
+    <path id="SvgjsPath1070" d="M381.29,242l76-42,76,42-76,42Z" transform="translate(423 276)" fill="#b7eaeb"/>
+    <text id="增大后浓度" transform="translate(840.29 514.42)" fill="#323232" font-size="16" font-family="MicrosoftYaHei-Bold, Microsoft YaHei" font-weight="700"><tspan x="0" y="0">增大后浓度</tspan></text>
+    <text id="是否超限" transform="translate(848.29 534.42)" fill="#323232" font-size="16" font-family="MicrosoftYaHei-Bold, Microsoft YaHei" font-weight="700"><tspan x="0" y="0">是否超限</tspan></text>
+    <path id="路径_56990" data-name="路径 56990" transform="translate(423 276)" fill="none"/>
+    <path id="SvgjsPath1080" d="M545.49,246.5l-13-4.5,13-4.5v9" transform="translate(423 276)" fill="#fff"/>
+    <path id="路径_56991" data-name="路径 56991" transform="translate(423 276)" fill="none"/>
+    <path id="SvgjsPath1084" d="M652.79,284.2l4.5-13,4.5,13h-9" transform="translate(423 276)" fill="#fff"/>
+    <path id="SvgjsPath1090" d="M205,216q0-4,4-4H319q4,0,4,4v52q0,4-4,4H209q-4,0-4-4Z" transform="translate(423 276)" fill="#b7eaeb"/>
+    <text id="停止增大风窗" transform="translate(639 514)" fill="#323232" font-size="16" font-family="MicrosoftYaHei-Bold, Microsoft YaHei" font-weight="700"><tspan x="0" y="0">停止增大风窗</tspan></text>
+    <text id="面积" transform="translate(671 534)" fill="#323232" font-size="16" font-family="MicrosoftYaHei-Bold, Microsoft YaHei" font-weight="700"><tspan x="0" y="0">面积</tspan></text>
+    <path id="路径_56992" data-name="路径 56992" transform="translate(423 276)" fill="none"/>
+    <path id="SvgjsPath1100" d="M335.2,246.5l-13-4.5,13-4.5v9" transform="translate(423 276)" fill="#fff"/>
+    <path id="路径_56993" data-name="路径 56993" transform="translate(423 276)" fill="none"/>
+    <path id="SvgjsPath1108" d="M192.8,96.5l13,4.5-13,4.5v-9" transform="translate(423 276)" fill="#fff"/>
+    <path id="SvgjsPath1110" d="M43.33,214.5h81.34c24.44,0,24.44,55,0,55H43.33C18.89,269.5,18.89,214.5,43.33,214.5Z" transform="translate(423 276)" fill="#b7eaeb"/>
+    <text id="结束" transform="translate(491 524)" fill="#323232" font-size="16" font-family="MicrosoftYaHei-Bold, Microsoft YaHei" font-weight="700"><tspan x="0" y="0">结束</tspan></text>
+    <path id="路径_56994" data-name="路径 56994" transform="translate(423 276)" fill="none"/>
+    <path id="SvgjsPath1118" d="M155.2,246.5l-13-4.5,13-4.5v9" transform="translate(423 276)" fill="#fff"/>
+    <path id="路径_56995" data-name="路径 56995" d="M564.425-753.2h55.819" transform="translate(0 1130.204)" fill="none" stroke="#fff" stroke-width="2"/>
+    <path id="路径_56996" data-name="路径 56996" d="M564.425-753.2h67.09" transform="translate(181.574 1130.204)" fill="none" stroke="#fff" stroke-width="2"/>
+    <path id="路径_56997" data-name="路径 56997" d="M564.425-753.2h61.3" transform="translate(378.865 1130.204)" fill="none" stroke="#fff" stroke-width="2"/>
+    <path id="路径_56998" data-name="路径 56998" d="M-7338.71-1370v65.826" transform="translate(8419 1782)" fill="none" stroke="#fff" stroke-width="2"/>
+    <path id="路径_56999" data-name="路径 56999" d="M-7339.693-1440v-28.861h-196v23.99" transform="translate(8419.983 1782)" fill="none" stroke="#fff" stroke-width="2"/>
+    <path id="路径_57000" data-name="路径 57000" d="M-7840.8-1265h49.707" transform="translate(8419 1783)" fill="none" stroke="#fff" stroke-width="2"/>
+    <path id="路径_57001" data-name="路径 57001" d="M-7840.8-1265h49.707" transform="translate(8599.094 1783)" fill="none" stroke="#fff" stroke-width="2"/>
+    <path id="路径_57002" data-name="路径 57002" d="M-7840.8-1265h52.706" transform="translate(8809.384 1783)" fill="none" stroke="#fff" stroke-width="2"/>
+    <path id="路径_57003" data-name="路径 57003" d="M-7539.209-1221.8v28.969h200.5V-1221.8" transform="translate(8419 1782)" fill="none" stroke="#fff" stroke-width="2"/>
+    <g id="组_15355" data-name="组 15355">
+      <rect id="SvgjsRect1051" width="16" height="22" transform="translate(973.25 301)" fill="#fff"/>
+      <text id="否" transform="translate(973.25 317)" fill="#323232" font-size="16" font-family="MicrosoftYaHei-Bold, Microsoft YaHei" font-weight="700"><tspan x="0" y="0">否</tspan></text>
+    </g>
+    <g id="组_15354" data-name="组 15354">
+      <rect id="SvgjsRect1065" width="16" height="22" transform="translate(1072.29 433.25)" fill="#fff"/>
+      <text id="是" transform="translate(1072.29 449.25)" fill="#323232" font-size="16" font-family="MicrosoftYaHei-Bold, Microsoft YaHei" font-weight="700"><tspan x="0" y="0">是</tspan></text>
+    </g>
+    <g id="组_15353" data-name="组 15353">
+      <rect id="SvgjsRect1085" width="16" height="22" transform="translate(973.36 579)" fill="#fff"/>
+      <text id="是-2" data-name="是" transform="translate(973.36 595)" fill="#323232" font-size="16" font-family="MicrosoftYaHei-Bold, Microsoft YaHei" font-weight="700"><tspan x="0" y="0">是</tspan></text>
+    </g>
+    <g id="组_15352" data-name="组 15352">
+      <rect id="SvgjsRect1101" width="16" height="22" transform="translate(771.07 507)" fill="#fff"/>
+      <text id="否-2" data-name="否" transform="translate(771.07 523)" fill="#323232" font-size="16" font-family="MicrosoftYaHei-Bold, Microsoft YaHei" font-weight="700"><tspan x="0" y="0">否</tspan></text>
+    </g>
+  </g>
+</svg>

+ 294 - 294
src/views/vent/monitorManager/windowMonitor/components/gasSupplyAir.vue

@@ -68,335 +68,335 @@
 </template>
 
 <script lang="ts" setup>
-  import { ref, nextTick, onMounted, watch, computed, reactive } from 'vue';
-  import BarAndLine from '/@/components/chart/BarAndLine.vue';
-  import { number } from 'vue-types';
-  const props = defineProps({
-    modalIsShow: {
-      type: Boolean,
-      default: false,
-    },
-    modalType: {
-      type: String,
-    },
-    data: {
-      type: Object,
-      default: () => {},
-    },
-    gasVal: {
-      type: Number,
-    },
-    isMock: {
-      type: Boolean,
-    },
-  });
-  const emit = defineEmits(['handleOk', 'handleCancel']);
-  const visible = computed(() => props.modalIsShow);
-  const changeEchart = computed(() => props.modalType);
-  const echartsData = ref<
-    {
-      gasVal: string | number;
-      gas: string | number;
-      readTime: string;
-      fWindowM3: string | number;
-      forntArea: string | number;
-      rearArea?: string | number;
-    }[]
-  >([]);
-  const monitorData = ref({});
-  const echatsOption = {
-    legend: {
-      top: 10,
-    },
-    grid: {
-      top: '80',
-      left: '30',
-      right: '35',
-      bottom: '10',
-      containLabel: true,
-    },
-    toolbox: {
-      feature: {
-        saveAsImage: {
-          show: false,
-        },
+import { ref, nextTick, onMounted, watch, computed, reactive } from 'vue';
+import BarAndLine from '/@/components/chart/BarAndLine.vue';
+import { number } from 'vue-types';
+const props = defineProps({
+  modalIsShow: {
+    type: Boolean,
+    default: false,
+  },
+  modalType: {
+    type: String,
+  },
+  data: {
+    type: Object,
+    default: () => {},
+  },
+  gasVal: {
+    type: Number,
+  },
+  isMock: {
+    type: Boolean,
+  },
+});
+const emit = defineEmits(['handleOk', 'handleCancel']);
+const visible = computed(() => props.modalIsShow);
+const changeEchart = computed(() => props.modalType);
+const echartsData = ref<
+  {
+    gasVal: string | number;
+    gas: string | number;
+    readTime: string;
+    fWindowM3: string | number;
+    forntArea: string | number;
+    rearArea?: string | number;
+  }[]
+>([]);
+const monitorData = ref({});
+const echatsOption = {
+  legend: {
+    top: 10,
+  },
+  grid: {
+    top: '80',
+    left: '30',
+    right: '35',
+    bottom: '10',
+    containLabel: true,
+  },
+  toolbox: {
+    feature: {
+      saveAsImage: {
+        show: false,
       },
     },
-    xAxis: {
-      type: 'category',
-      axisLabel: {
-        margin: 10,
-        color: '#f1f1f199',
-      },
-      name: '',
+  },
+  xAxis: {
+    type: 'category',
+    axisLabel: {
+      margin: 10,
+      color: '#f1f1f199',
     },
-    yAxis: {
-      axisLabel: {
-        color: '#0071A5',
-      },
+    name: '',
+  },
+  yAxis: {
+    axisLabel: {
+      color: '#0071A5',
     },
-  };
+  },
+};
 
-  const chartsColumnListTemp = [
-    {
-      legend: '瓦斯超限值',
-      seriesName: '(%)',
-      ymax: 1100,
-      yname: '%',
-      linetype: 'line',
-      yaxispos: 'left',
-      color: '#00FFA8',
-      sort: 1,
-      xRotate: 0,
-      dataIndex: 'gasVal',
-    },
-    {
-      legend: '瓦斯实时值',
-      seriesName: '(%)',
-      ymax: 1100,
-      yname: '%',
-      linetype: 'line',
-      yaxispos: 'left',
-      color: '#00FFA8',
-      sort: 1,
-      xRotate: 0,
-      dataIndex: 'gas',
-    },
-    {
-      legend: '风窗开度',
-      seriesName: '(°)',
-      ymax: 1100,
-      yname: '°',
-      linetype: 'line',
-      yaxispos: 'right',
-      color: '#FDB146',
-      sort: 2,
-      xRotate: 0,
-      dataIndex: 'forntArea',
-    },
-    {
-      legend: '前窗开度',
-      seriesName: '(°)',
-      ymax: 1100,
-      yname: '°',
-      linetype: 'line',
-      yaxispos: 'right',
-      color: '#FDB146',
-      sort: 2,
-      xRotate: 0,
-      dataIndex: 'forntArea',
-    },
-    {
-      legend: '后窗开度',
-      seriesName: '(°)',
-      ymax: 1100,
-      yname: '°',
-      linetype: 'line',
-      yaxispos: 'right',
-      color: '#FDB146',
-      sort: 2,
-      xRotate: 0,
-      dataIndex: 'rearArea',
-    },
-  ];
-  const chartsColumnList = ref(chartsColumnListTemp);
-  let frontWindowAngle = ref<undefined | number>(undefined);
-  let rearWindowAngle = ref<undefined | number>(undefined);
-  let fWindowM3 = ref<undefined | number>(undefined);
-  let gas = ref<undefined | number>(undefined);
-  let fWindowM3Temp = ref<undefined | number>(undefined);
-  let gasTemp = ref<undefined | number>(undefined);
-  let index = 1;
-  watch(
-    () => props.data,
-    (newVal) => {
-      if (!visible.value) return;
-      if (newVal['nwindownum'] == 1) {
-        // 单道风窗
-        if (chartsColumnList.value.length != 3) chartsColumnList.value = [chartsColumnListTemp[0], chartsColumnListTemp[1], chartsColumnListTemp[2]];
-      } else {
-        // 多道风窗
-        if (chartsColumnList.value.length != 4)
-          chartsColumnList.value = [chartsColumnListTemp[0], chartsColumnListTemp[1], chartsColumnListTemp[3], chartsColumnListTemp[4]];
-      }
-      monitorData.value = newVal;
-      if (echartsData.value.length > 20) {
-        echartsData.value.shift();
+const chartsColumnListTemp = [
+  {
+    legend: '瓦斯超限值',
+    seriesName: '(%)',
+    ymax: 1100,
+    yname: '%',
+    linetype: 'line',
+    yaxispos: 'left',
+    color: '#00FFA8',
+    sort: 1,
+    xRotate: 0,
+    dataIndex: 'gasVal',
+  },
+  {
+    legend: '瓦斯实时值',
+    seriesName: '(%)',
+    ymax: 1100,
+    yname: '%',
+    linetype: 'line',
+    yaxispos: 'left',
+    color: '#00FFA8',
+    sort: 1,
+    xRotate: 0,
+    dataIndex: 'gas',
+  },
+  {
+    legend: '风窗开度',
+    seriesName: '(°)',
+    ymax: 1100,
+    yname: '°',
+    linetype: 'line',
+    yaxispos: 'right',
+    color: '#FDB146',
+    sort: 2,
+    xRotate: 0,
+    dataIndex: 'forntArea',
+  },
+  {
+    legend: '前窗开度',
+    seriesName: '(°)',
+    ymax: 1100,
+    yname: '°',
+    linetype: 'line',
+    yaxispos: 'right',
+    color: '#FDB146',
+    sort: 2,
+    xRotate: 0,
+    dataIndex: 'forntArea',
+  },
+  {
+    legend: '后窗开度',
+    seriesName: '(°)',
+    ymax: 1100,
+    yname: '°',
+    linetype: 'line',
+    yaxispos: 'right',
+    color: '#FDB146',
+    sort: 2,
+    xRotate: 0,
+    dataIndex: 'rearArea',
+  },
+];
+const chartsColumnList = ref(chartsColumnListTemp);
+let frontWindowAngle = ref<undefined | number>(undefined);
+let rearWindowAngle = ref<undefined | number>(undefined);
+let fWindowM3 = ref<undefined | number>(undefined);
+let gas = ref<undefined | number>(undefined);
+let fWindowM3Temp = ref<undefined | number>(undefined);
+let gasTemp = ref<undefined | number>(undefined);
+let index = 1;
+watch(
+  () => props.data,
+  (newVal) => {
+    if (!visible.value) return;
+    if (newVal['nwindownum'] == 1) {
+      // 单道风窗
+      if (chartsColumnList.value.length != 3) chartsColumnList.value = [chartsColumnListTemp[0], chartsColumnListTemp[1], chartsColumnListTemp[2]];
+    } else {
+      // 多道风窗
+      if (chartsColumnList.value.length != 4)
+        chartsColumnList.value = [chartsColumnListTemp[0], chartsColumnListTemp[1], chartsColumnListTemp[3], chartsColumnListTemp[4]];
+    }
+    monitorData.value = newVal;
+    if (echartsData.value.length > 20) {
+      echartsData.value.shift();
+    }
+    if (props.isMock) {
+      // 这里开启风窗开度模拟
+      if (newVal['nwindownum'] == 1 && frontWindowAngle.value === undefined) {
+        frontWindowAngle.value = newVal['forntArea'];
+      } else if (newVal['nwindownum'] == 2) {
+        if (frontWindowAngle.value === undefined) frontWindowAngle.value = (newVal['forntArea'] / newVal['maxarea']) * 90;
+        if (rearWindowAngle.value === undefined) rearWindowAngle.value = (newVal['rearArea'] / newVal['maxarea']) * 90;
       }
-      if (props.isMock) {
-        // 这里开启风窗开度模拟
-        if (newVal['nwindownum'] == 1 && frontWindowAngle.value === undefined) {
-          frontWindowAngle.value = newVal['forntArea'];
-        } else if (newVal['nwindownum'] == 2) {
-          if (frontWindowAngle.value === undefined) frontWindowAngle.value = (newVal['forntArea'] / newVal['maxarea']) * 90;
-          if (rearWindowAngle.value === undefined) rearWindowAngle.value = (newVal['rearArea'] / newVal['maxarea']) * 90;
-        }
-        if (fWindowM3.value === undefined) fWindowM3.value = newVal['fWindowM3'];
-        // if (gas == undefined) gas = Number(newVal['gas']) > Number(props.gasVal) ? newVal['gas'] : props.gasVal + 0.2;
-        if (gas.value == undefined) gas.value = props.gasVal + 0.2;
-        // 开启模拟
-        if (gas.value > props.gasVal - 0.3) {
-          mock(newVal['maxarea']);
-          echartsData.value = [
-            ...echartsData.value,
-            {
-              gasVal: props.gasVal,
-              gas: gas.value as number,
-              readTime: newVal['readTime'].substring(11),
-              forntArea: frontWindowAngle.value as number,
-              rearArea: rearWindowAngle.value as number,
-              fWindowM3: fWindowM3.value as number,
-            },
-          ];
-        } else {
-          const random = Math.random() - 0.5;
-          fWindowM3Temp.value = fWindowM3.value + random * 50;
-          gasTemp.value = gas.value + random * 0.01;
-          echartsData.value = [
-            ...echartsData.value,
-            {
-              gasVal: props.gasVal,
-              gas: gasTemp.value,
-              readTime: newVal['readTime'].substring(11),
-              forntArea: frontWindowAngle.value as number,
-              rearArea: rearWindowAngle.value as number,
-              fWindowM3: fWindowM3Temp.value,
-            },
-          ];
-        }
+      if (fWindowM3.value === undefined) fWindowM3.value = newVal['fWindowM3'];
+      // if (gas == undefined) gas = Number(newVal['gas']) > Number(props.gasVal) ? newVal['gas'] : props.gasVal + 0.2;
+      if (gas.value == undefined) gas.value = props.gasVal + 0.2;
+      // 开启模拟
+      if (gas.value > props.gasVal - 0.3) {
+        mock(newVal['maxarea']);
+        echartsData.value = [
+          ...echartsData.value,
+          {
+            gasVal: props.gasVal,
+            gas: gas.value as number,
+            readTime: newVal['readTime'].substring(11),
+            forntArea: frontWindowAngle.value as number,
+            rearArea: rearWindowAngle.value as number,
+            fWindowM3: fWindowM3.value as number,
+          },
+        ];
       } else {
+        const random = Math.random() - 0.5;
+        fWindowM3Temp.value = fWindowM3.value + random * 50;
+        gasTemp.value = gas.value + random * 0.01;
         echartsData.value = [
           ...echartsData.value,
           {
             gasVal: props.gasVal,
-            gas: newVal['gas'],
+            gas: gasTemp.value,
             readTime: newVal['readTime'].substring(11),
-            forntArea: (newVal['forntArea'] / newVal['maxarea']) * 90,
-            rearArea: (newVal['rearArea'] / newVal['maxarea']) * 90,
-            fWindowM3: newVal['fWindowM3'],
+            forntArea: frontWindowAngle.value as number,
+            rearArea: rearWindowAngle.value as number,
+            fWindowM3: fWindowM3Temp.value,
           },
         ];
       }
+    } else {
+      echartsData.value = [
+        ...echartsData.value,
+        {
+          gasVal: props.gasVal,
+          gas: newVal['gas'],
+          readTime: newVal['readTime'].substring(11),
+          forntArea: (newVal['forntArea'] / newVal['maxarea']) * 90,
+          rearArea: (newVal['rearArea'] / newVal['maxarea']) * 90,
+          fWindowM3: newVal['fWindowM3'],
+        },
+      ];
     }
-  );
+  }
+);
 
-  function mock(maxArea?: number) {
-    debugger;
-    if (maxArea) {
-      // 每调用一次数据就增减一些
-      // frontWindowAngle 增加一些
-      if (frontWindowAngle.value !== undefined && frontWindowAngle.value <= 90) {
-        frontWindowAngle.value = Math.min(frontWindowAngle.value + 3, 90);
-      }
-      if (rearWindowAngle.value !== undefined && rearWindowAngle.value <= 90) {
-        rearWindowAngle.value = Math.min(rearWindowAngle.value + 3, 90);
-      }
-      if (fWindowM3.value !== undefined) {
-        fWindowM3.value += 40 * index;
-      }
-      if (gas.value !== undefined) {
-        gas.value -= 0.001 * index;
-      }
-      ++index;
+function mock(maxArea?: number) {
+  debugger;
+  if (maxArea) {
+    // 每调用一次数据就增减一些
+    // frontWindowAngle 增加一些
+    if (frontWindowAngle.value !== undefined && frontWindowAngle.value <= 90) {
+      frontWindowAngle.value = Math.min(frontWindowAngle.value + 3, 90);
+    }
+    if (rearWindowAngle.value !== undefined && rearWindowAngle.value <= 90) {
+      rearWindowAngle.value = Math.min(rearWindowAngle.value + 3, 90);
+    }
+    if (fWindowM3.value !== undefined) {
+      fWindowM3.value += 40 * index;
+    }
+    if (gas.value !== undefined) {
+      gas.value -= 0.001 * index;
     }
+    ++index;
   }
+}
 
-  function handleOk() {
-    emit('handleCancel');
-    echartsData.value = [];
-    frontWindowAngle.value = undefined;
-    rearWindowAngle.value = undefined;
-    fWindowM3.value = undefined;
-    gas.value = undefined;
-    fWindowM3Temp.value = undefined;
-    gasTemp.value = undefined;
-  }
-  onMounted(() => {});
+function handleOk() {
+  emit('handleCancel');
+  echartsData.value = [];
+  frontWindowAngle.value = undefined;
+  rearWindowAngle.value = undefined;
+  fWindowM3.value = undefined;
+  gas.value = undefined;
+  fWindowM3Temp.value = undefined;
+  gasTemp.value = undefined;
+}
+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; /* 确保背景图片居中 */
-    }
-    .right-box {
-      flex: 1; /* 占据 3/4 的空间 */
-      height: 400px;
-      width: 100%;
-    }
+.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/autoWindow.svg);
+    background-repeat: no-repeat;
+    background-size: contain; /* 确保背景图片完整显示 */
+    background-position: center; /* 确保背景图片居中 */
   }
-  .setting-box {
-    width: 1570px;
-    height: 70px;
-    margin: 10px 0;
-    background-color: #ffffff05;
-    border: 1px solid #00d8ff22;
+  .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%;
     display: flex;
-    align-items: center;
+    height: 40px;
+    margin: 0 10px;
     justify-content: space-between;
+  }
+  .left-buttons {
+    display: flex;
+    height: 40px;
 
-    .right-inputs {
-      width: 100%;
-      display: flex;
-      height: 40px;
+    .btn {
       margin: 0 10px;
-      justify-content: space-between;
-    }
-    .left-buttons {
-      display: flex;
-      height: 40px;
-
-      .btn {
-        margin: 0 10px;
-      }
-    }
-    .border-clip {
-      width: 1px;
-      height: 25px;
-      border-right: 1px solid #8b8b8b77;
-    }
-
-    .input-box {
-      width: 300px;
-      span {
-        color: aqua;
-        padding: 0 20px;
-      }
     }
   }
+  .border-clip {
+    width: 1px;
+    height: 25px;
+    border-right: 1px solid #8b8b8b77;
+  }
 
-  @keyframes open {
-    0% {
-      height: 0px;
-    }
-    100% {
-      height: fit-content;
+  .input-box {
+    width: 300px;
+    span {
+      color: aqua;
+      padding: 0 20px;
     }
   }
+}
 
-  @keyframes close {
-    0% {
-      height: fit-content;
-    }
-    100% {
-      height: 0px;
-    }
+@keyframes open {
+  0% {
+    height: 0px;
+  }
+  100% {
+    height: fit-content;
   }
-  :deep(.zxm-divider-inner-text) {
-    color: #cacaca88 !important;
+}
+
+@keyframes close {
+  0% {
+    height: fit-content;
   }
-  :deep(.zxm-form-item) {
-    margin-bottom: 10px;
+  100% {
+    height: 0px;
   }
+}
+:deep(.zxm-divider-inner-text) {
+  color: #cacaca88 !important;
+}
+:deep(.zxm-form-item) {
+  margin-bottom: 10px;
+}
 </style>

+ 172 - 172
src/views/vent/monitorManager/windowMonitor/components/supplyAir.vue

@@ -37,200 +37,200 @@
 </template>
 
 <script lang="ts" setup>
-  import { ref, nextTick, onMounted, watch, computed, reactive } from 'vue';
-  import BarAndLine from '/@/components/chart/BarAndLine.vue';
-  const props = defineProps({
-    modalIsShow: {
-      type: Boolean,
-      default: false,
-    },
-    modalType: {
-      type: String,
-    },
-    data: {
-      type: Object,
-      default: () => {},
-    },
-    targetVolume: {
-      type: Number,
-    },
-  });
-  const emit = defineEmits(['handleOk', 'handleCancel']);
-  const visible = computed(() => props.modalIsShow);
-  const changeEchart = computed(() => props.modalType);
-  const echartsData = ref<{ targetVolume: string | Number; readTime: string; fWindowM3: string | Number; rearm3?: string | Number }[]>([]);
-  const monitorData = ref({});
-  const echatsOption = {
-    legend: {
-      top: 10,
-    },
-    grid: {
-      top: '80',
-      left: '30',
-      right: '35',
-      bottom: '10',
-      containLabel: true,
-    },
-    toolbox: {
-      feature: {
-        saveAsImage: {
-          show: false,
-        },
+import { ref, nextTick, onMounted, watch, computed, reactive } from 'vue';
+import BarAndLine from '/@/components/chart/BarAndLine.vue';
+const props = defineProps({
+  modalIsShow: {
+    type: Boolean,
+    default: false,
+  },
+  modalType: {
+    type: String,
+  },
+  data: {
+    type: Object,
+    default: () => {},
+  },
+  targetVolume: {
+    type: Number,
+  },
+});
+const emit = defineEmits(['handleOk', 'handleCancel']);
+const visible = computed(() => props.modalIsShow);
+const changeEchart = computed(() => props.modalType);
+const echartsData = ref<{ targetVolume: string | Number; readTime: string; fWindowM3: string | Number; rearm3?: string | Number }[]>([]);
+const monitorData = ref({});
+const echatsOption = {
+  legend: {
+    top: 10,
+  },
+  grid: {
+    top: '80',
+    left: '30',
+    right: '35',
+    bottom: '10',
+    containLabel: true,
+  },
+  toolbox: {
+    feature: {
+      saveAsImage: {
+        show: false,
       },
     },
-    xAxis: {
-      type: 'category',
-      axisLabel: {
-        margin: 10,
-        color: '#f1f1f199',
-      },
-      name: '',
+  },
+  xAxis: {
+    type: 'category',
+    axisLabel: {
+      margin: 10,
+      color: '#f1f1f199',
     },
-    yAxis: {
-      axisLabel: {
-        color: '#0071A5',
-      },
+    name: '',
+  },
+  yAxis: {
+    axisLabel: {
+      color: '#0071A5',
     },
-  };
+  },
+};
 
-  const chartsColumnList = reactive([
-    {
-      legend: '目标风量',
-      seriesName: '(m³/min)',
-      ymax: 1100,
-      yname: 'm³/min',
-      linetype: 'line',
-      yaxispos: 'left',
-      color: '#00FFA8',
-      sort: 1,
-      xRotate: 0,
-      dataIndex: 'targetVolume',
-    },
-    {
-      legend: '供风量',
-      seriesName: '(m³/min)',
-      ymax: 1100,
-      yname: 'm³/min',
-      linetype: 'line',
-      yaxispos: 'right',
-      color: '#FDB146',
-      sort: 1,
-      xRotate: 0,
-      dataIndex: 'fWindowM3',
-    },
-  ]);
-  watch(
-    () => props.data,
-    (newVal) => {
-      if (!visible.value) return;
-      if (props.modalType == '8') {
-        chartsColumnList[1].dataIndex = 'rearm31';
-        chartsColumnList[1].legend = '后窗实时供风量';
-      } else {
-        chartsColumnList[1].dataIndex = 'fWindowM3';
-        chartsColumnList[1].legend = '前窗实时供风量';
-      }
-      monitorData.value = newVal;
-      if (echartsData.value.length > 20) {
-        echartsData.value.shift();
-      }
-      echartsData.value = [
-        ...echartsData.value,
-        { fWindowM3: newVal['fWindowM3'], targetVolume: props.targetVolume, readTime: newVal['readTime'].substring(11), rearm3: newVal['rearm3'] },
-      ];
+const chartsColumnList = reactive([
+  {
+    legend: '目标风量',
+    seriesName: '(m³/min)',
+    ymax: 1100,
+    yname: 'm³/min',
+    linetype: 'line',
+    yaxispos: 'left',
+    color: '#00FFA8',
+    sort: 1,
+    xRotate: 0,
+    dataIndex: 'targetVolume',
+  },
+  {
+    legend: '供风量',
+    seriesName: '(m³/min)',
+    ymax: 1100,
+    yname: 'm³/min',
+    linetype: 'line',
+    yaxispos: 'right',
+    color: '#FDB146',
+    sort: 1,
+    xRotate: 0,
+    dataIndex: 'fWindowM3',
+  },
+]);
+watch(
+  () => props.data,
+  (newVal) => {
+    if (!visible.value) return;
+    if (props.modalType == '8') {
+      chartsColumnList[1].dataIndex = 'rearm31';
+      chartsColumnList[1].legend = '后窗实时供风量';
+    } else {
+      chartsColumnList[1].dataIndex = 'fWindowM3';
+      chartsColumnList[1].legend = '前窗实时供风量';
     }
-  );
-
-  function handleOk() {
-    emit('handleCancel');
-    echartsData.value = [];
+    monitorData.value = newVal;
+    if (echartsData.value.length > 20) {
+      echartsData.value.shift();
+    }
+    echartsData.value = [
+      ...echartsData.value,
+      { fWindowM3: newVal['fWindowM3'], targetVolume: props.targetVolume, readTime: newVal['readTime'].substring(11), rearm3: newVal['rearm3'] },
+    ];
   }
-  onMounted(() => {});
+);
+
+function handleOk() {
+  emit('handleCancel');
+  echartsData.value = [];
+}
+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; /* 确保背景图片居中 */
-    }
-    .right-box {
-      flex: 1; /* 占据 3/4 的空间 */
-      height: 400px;
-      width: 100%;
-    }
+.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/autoWindow.svg);
+    background-repeat: no-repeat;
+    background-size: contain; /* 确保背景图片完整显示 */
+    background-position: center; /* 确保背景图片居中 */
   }
-  .setting-box {
-    width: 1570px;
-    height: 70px;
-    margin: 10px 0;
-    background-color: #ffffff05;
-    border: 1px solid #00d8ff22;
+  .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%;
     display: flex;
-    align-items: center;
+    height: 40px;
+    margin: 0 10px;
     justify-content: space-between;
+  }
+  .left-buttons {
+    display: flex;
+    height: 40px;
 
-    .right-inputs {
-      width: 100%;
-      display: flex;
-      height: 40px;
+    .btn {
       margin: 0 10px;
-      justify-content: space-between;
-    }
-    .left-buttons {
-      display: flex;
-      height: 40px;
-
-      .btn {
-        margin: 0 10px;
-      }
-    }
-    .border-clip {
-      width: 1px;
-      height: 25px;
-      border-right: 1px solid #8b8b8b77;
-    }
-
-    .input-box {
-      width: 350px;
-      span {
-        color: aqua;
-        padding: 0 20px;
-      }
     }
   }
+  .border-clip {
+    width: 1px;
+    height: 25px;
+    border-right: 1px solid #8b8b8b77;
+  }
 
-  @keyframes open {
-    0% {
-      height: 0px;
-    }
-    100% {
-      height: fit-content;
+  .input-box {
+    width: 350px;
+    span {
+      color: aqua;
+      padding: 0 20px;
     }
   }
+}
 
-  @keyframes close {
-    0% {
-      height: fit-content;
-    }
-    100% {
-      height: 0px;
-    }
+@keyframes open {
+  0% {
+    height: 0px;
+  }
+  100% {
+    height: fit-content;
   }
-  :deep(.zxm-divider-inner-text) {
-    color: #cacaca88 !important;
+}
+
+@keyframes close {
+  0% {
+    height: fit-content;
   }
-  :deep(.zxm-form-item) {
-    margin-bottom: 10px;
+  100% {
+    height: 0px;
   }
+}
+:deep(.zxm-divider-inner-text) {
+  color: #cacaca88 !important;
+}
+:deep(.zxm-form-item) {
+  margin-bottom: 10px;
+}
 </style>