Browse Source

feat: 更新碳源投加适配

sunxiao 1 month ago
parent
commit
066348330e

+ 3 - 0
src/api/3.svg

@@ -0,0 +1,3 @@
+<svg width="14" height="24" viewBox="0 0 14 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M1.69718 22.3933C0.667119 21.4168 0.244119 20.0698 0.39437 18.3524L0.441508 17.8136H2.90911L2.87081 18.2514C2.77654 19.329 3.04091 20.1708 3.66394 20.777C4.25022 21.4168 5.13638 21.7198 6.25187 21.7198C7.43497 21.7198 8.41386 21.3494 9.15473 20.6086C9.89265 19.9014 10.3161 18.9249 10.4251 17.6789L10.5017 16.8034C10.6137 15.5238 10.364 14.5136 9.72193 13.7391C9.07689 12.9982 8.12901 12.6278 6.87831 12.6278H5.66141L5.85585 10.4053H7.03895C8.15444 10.4053 9.09952 10.0349 9.80365 9.32775C10.5078 8.62059 10.9253 7.71139 11.0255 6.56647L11.0844 5.89298C11.1817 4.78173 10.957 3.87253 10.3736 3.19905C9.79031 2.52557 8.9747 2.18882 7.89301 2.18882C6.81132 2.18882 5.93973 2.49189 5.27531 3.1317C4.61088 3.77151 4.233 4.61336 4.14167 5.65726L4.09454 6.19605H1.72834L1.78137 5.58991C1.93162 3.87253 2.59031 2.52557 3.72658 1.51534C4.86285 0.505112 6.32676 0 8.15211 0C9.94366 0 11.353 0.505112 12.3095 1.54901C13.2661 2.59291 13.6832 4.00723 13.53 5.75829L13.4652 6.49912C13.368 7.61037 13.0121 8.58692 12.3976 9.42877C11.7831 10.2706 11.0202 10.8768 10.106 11.2809C11.1523 11.6849 11.9385 12.3584 12.4307 13.3013C12.9199 14.2779 13.0901 15.4228 12.9752 16.7361L12.9045 17.5443C12.7366 19.4637 12.0264 21.0127 10.777 22.1576C9.49074 23.3362 7.91953 23.9087 6.02657 23.9087C4.16742 23.9087 2.72428 23.4036 1.69718 22.3933Z" fill="#2454FF"/>
+</svg>

+ 13 - 0
src/api/control.js

@@ -46,4 +46,17 @@ export const controlApi = {
    * 碳源投加 数据看板 - right
    */
   getRightEChartData: params => http.get(`/front/bigModel/smartAdd/addMedicineRecordList`, { params }),
+
+
+  /**
+   * 碳源投加 报警数值参数
+   */
+  getWarningParams: params => http.get(`/business/tytjParams/1`, { params }),
+  
+
+  /**
+  * 碳源投加 报警数值参数
+  */
+  getLastResult: params => http.get(`/front/bigModel/smartAdd/homeValues`, { params }),
+  
 }

+ 4 - 0
src/views/control/DrawerSetting.vue

@@ -131,6 +131,10 @@ const initWaterParamter = async () => {
   })
 }
 
+const handleMedicateAmount = () => {
+  // 更新值,未使用到
+}
+
 const onDrawerAfterdEnter = () => {
   initWaterParamter();
 }

+ 13 - 27
src/views/control/DrawerWarning.vue

@@ -1,42 +1,28 @@
 <script setup>
-import { onMounted, ref, computed } from 'vue';
-import { NDrawer, NDrawerContent, NTabs, NTabPane, useMessage } from 'naive-ui';
-
-
-import { controlApi } from "@/api/control";
+import { NDrawer, NDrawerContent } from 'naive-ui';
 
 const showModel = defineModel("show");
 
-
-const onDrawerAfterdEnter =() => {
-  // 这个可能用不到
-}
+defineProps({
+  warningCollectList: {
+    type: Array,
+    default: () => []
+  }
+})
 </script>
 
 <template>
-  <n-drawer v-model:show="showModel" :width="420" :placement="placement" :on-after-enter="onDrawerAfterdEnter">
+  <n-drawer v-model:show="showModel" :width="420">
     <n-drawer-content title="系统报警" closable body-content-style="padding: 24px 16px 40px 16px;" :header-style="{ padding: '16px 12px', fontSize: '15px', color: '#1A2029' }">
       <div class="warning-list h-full relative space-y-[10px]">
-        <div class="warning-item space-x-[8px]">
-          <img src="@/assets/images/control/icon-warning.png" alt="" class="w-[18px] h-[18px]">
-          <div class="main space-x-[4px]">
-            <h4 class="title">反硝化异常报警</h4>
-            <ul class="content">
-              <li>・好氧池硝酸盐超管控值(北池)</li>
-              <li>・好氧池硝酸盐控制目标偏移过大(北池)</li>
-            </ul>
-            <p class="desc">排查现场工况/调整控制参数,非碳源量的问题,请切手动控制</p>
-          </div>
-        </div>
-        <div class="warning-item space-x-[8px]">
-          <img src="@/assets/images/control/icon-warning.png" alt="" class="w-[18px] h-[18px]">
+        <div class="warning-item space-x-[8px]" v-for="item, index in warningCollectList" :key="index">
+          <img src="@/assets/images/control/icon-warning.png" alt="" class="w-[18px] h-[18px] mt-[2px]">
           <div class="main space-x-[4px]">
-            <h4 class="title">反硝化异常报警</h4>
+            <h4 class="title">{{ item.title }}</h4>
             <ul class="content">
-              <li>・好氧池硝酸盐超管控值(北池)</li>
-              <li>・好氧池硝酸盐控制目标偏移过大(北池)</li>
+              <li v-for="val, i in item.content" :key="i">{{ val.content }}</li>
             </ul>
-            <p class="desc">排查现场工况/调整控制参数,非碳源量的问题,请切手动控制</p>
+            <p class="desc">{{ item.desc }}</p>
           </div>
         </div>
       </div>

+ 17 - 114
src/views/control/EchartLeft.vue

@@ -1,6 +1,6 @@
 <script setup>
 import { ref, onMounted, nextTick, onUnmounted } from "vue";
-import { NSpin, NSelect, NDatePicker, useMessage } from "naive-ui";
+import { NSelect, NDatePicker } from "naive-ui";
 import dayjs from "dayjs";
 import * as echarts from 'echarts';
 
@@ -14,7 +14,6 @@ let leftEchartInstance = null;
 const selectValue = ref(['jsSlq']);
 const echartDataSource = ref([]);
 
-
 const datePickerValue = ref(null);
 
 const selectOptions = ref([
@@ -96,17 +95,19 @@ const getEchartOptions = (list) => {
       x: 'center',
       y: 'top',
       show: true,
-      left: '10px',
-      top: '16px',
-      itemWidth: 6,
+      left: 'right',
+      top: '5px',
+      itemWidth: 8,
       itemGap: 20,
+      icon: 'circle',
       textStyle: {
-        color: '#556677',
+        color: '#1A2029',
+        fontSize: '12px'
       },
       // data: ['直接登录平台', '扫码登录平台', '总'],
     },
     title: {
-      show: !list.length,
+      show: !list[0].data.length,
       text: '暂无数据',
       x: 'center',
       y: 'center',
@@ -116,7 +117,7 @@ const getEchartOptions = (list) => {
       }
     },
     grid: {
-      top: '60px',
+      top: '35px',
       bottom: '30px',
       left: '8%',
       right: '5%',
@@ -175,109 +176,6 @@ const getEchartOptions = (list) => {
   return option;
 }
 
-// 右侧图表
-const getRightEchartOptions = (list) => {
-  const series = list.map(({ name, data }) => {
-    const d1 = data.map(({ time, value }) => {
-      return [
-        time,
-        value
-      ]
-    })
-
-    return {
-      name,
-      showSymbol: false,
-      smooth: true,
-      type: 'line',
-      symbolSize: 10,
-      data: d1,
-    }
-  })
-
-  const option = {
-    legend: {
-      x: 'center',
-      y: 'top',
-      show: true,
-      left: '10px',
-      top: '16px',
-      itemWidth: 6,
-      itemGap: 20,
-      textStyle: {
-        color: '#556677',
-      },
-      // data: ['直接登录平台', '扫码登录平台', '总'],
-    },
-    title: {
-      show: !list.length,
-      text: '暂无数据',
-      x: 'center',
-      y: 'center',
-      textStyle: {
-        fontSize: 14,
-        fontWeight: 'normal',
-      }
-    },
-    grid: {
-      top: '60px',
-      bottom: '30px',
-      left: '8%',
-      right: '5%',
-      // containLabel: true
-    },
-    tooltip: {
-      trigger: 'axis',
-      label: {
-        show: true
-      },
-    },
-    xAxis: {
-      type: 'time',
-      boundaryGap: ['5%', '5%'],
-      axisLine: {
-        show: false
-      },
-      splitLine: {
-        show: false
-      },
-      axisTick: {
-        show: false,
-      },
-      axisLabel: {
-        formatter: function (value) {
-          return dayjs(value).format('MM-DD')
-        }
-      }
-    },
-    yAxis: {
-      axisLine: {
-        show: false
-      },
-      splitLine: {
-        show: true,
-        lineStyle: {
-          type: 'dashed',
-          color: '#E5E5E5'
-        }
-      },
-      axisTick: {
-        show: false
-      },
-      splitArea: {
-        show: false,
-        color: '#fff'
-      },
-      axisLabel: {
-        formatter: function (value) {
-          return value.toFixed(0)
-        }
-      }
-    },
-    series
-  };
-  return option;
-}
 
 // 下拉框选择事件
 const handleSelectOptions = (selectedList) => {
@@ -314,6 +212,11 @@ const onDatePickerConfirm = (ts) => {
   initEchartData();
 }
 
+const onDatePickerClear = (value) => {
+  datePickerValue.value = null;
+  initEchartData();
+}
+
 const initEchartData = async() => {
   const [ timeBegin, timeEnd ] = datePickerValue.value || [];
   
@@ -345,9 +248,9 @@ onUnmounted(() => {
 </script>
 
 <template>
-  <div class="left-echart-container">
+  <div class="echart-container">
     <div class="header">
-      <BaseTitle title="数据看板" type="second" class="flex-shrink-0"></BaseTitle>
+      <BaseTitle title="指标趋势" type="2" class="flex-shrink-0"></BaseTitle>
       <div class="flex items-center space-x-[4px]">
         <NDatePicker
           class="w-[250px]"
@@ -385,7 +288,7 @@ onUnmounted(() => {
 </template>
 
 <style lang="scss" scoped>
-.left-echart-container {
+.echart-container {
   width: 50%;
   height: 100%;
   padding: 14px;

+ 105 - 27
src/views/control/EchartRight.vue

@@ -1,17 +1,31 @@
 <script setup>
 import { ref, onMounted, onUnmounted, nextTick } from "vue";
+import { NDatePicker } from "naive-ui";
 import dayjs from "dayjs";
 import * as echarts from 'echarts';
+import { startOfDay } from "date-fns/esm"
 
 import { controlApi } from "@/api/control";
-
 import BaseTitle from './components/BaseTitle.vue';
 
 let rightEchartInstance = ref(null);
 
+const datePickerValue = ref(null);
+
+// 重置日期样式
+const datePickerThemeOverrides = {
+  peers: {
+    Input: {
+      borderRadius: '2px',
+    }
+  },
+}
+
 const getEchartOptions = (list) => {
+  console.log("list", list);
+  const colors = ['#43FF1E', '#249AFF']
 
-  const series = list.map(({ name, data }) => {
+  const series = list.map(({ name, data }, i) => {
     const d1 = data.map(({ time, value }) => {
       return [
         time,
@@ -26,24 +40,29 @@ const getEchartOptions = (list) => {
       type: 'line',
       symbolSize: 10,
       data: d1,
+      itemStyle: {
+        color: colors[i],
+			},
     }
   })
 
   const option = {
-    // legend: {
-    //   x: 'center',
-    //   y: 'top',
-    //   show: true,
-    //   left: '10px',
-    //   top: '16px',
-    //   itemWidth: 6,
-    //   itemGap: 20,
-    //   textStyle: {
-    //     color: '#556677',
-    //   },
-    // },
+    legend: {
+      x: 'center',
+      y: 'top',
+      show: true,
+      left: 'right',
+      top: '5px',
+      itemWidth: 8,
+      itemGap: 20,
+      icon: 'circle',
+      textStyle: {
+        color: '#1A2029',
+        fontSize: '12px'
+      },
+    },
     title: {
-      show: !list.length,
+      show: !list[0].data.length,
       text: '暂无数据',
       x: 'center',
       y: 'center',
@@ -53,7 +72,7 @@ const getEchartOptions = (list) => {
       }
     },
     grid: {
-      top: '60px',
+      top: '35px',
       bottom: '30px',
       left: '8%',
       right: '5%',
@@ -112,6 +131,52 @@ const getEchartOptions = (list) => {
   return option;
 }
 
+// 日期范围限制
+const isRangeDateDisabled = (ts, type, range) => {
+  const d = 864e5;
+  if (type === "start" && range !== null) {
+    return startOfDay(range[1]).valueOf() - startOfDay(ts).valueOf() >= d * 10;
+  }
+  if (type === "end" && range !== null) {
+    return startOfDay(ts).valueOf() - startOfDay(range[0]).valueOf() >= d * 10;
+  }
+  return false;
+}
+
+const onDatePickerConfirm = (ts) => {
+  datePickerValue.value = ts.map(t => dayjs(t).format('YYYY/MM/DD'));
+  initEchartData();
+}
+
+const onDatePickerClear = (value) => {
+  datePickerValue.value = null;
+  initEchartData();
+}
+
+const initEchartData = async() => {
+  const [ timeBegin, timeEnd ] = datePickerValue.value || [];
+
+  controlApi.getRightEChartData({timeBegin, timeEnd}).then(({ data }) => {
+
+    const list = ['calculateVal', 'realVal'].map((key) => {
+      const result = data.map(item => {
+        const val = item[key];
+        return {
+          time: item.addHour,
+          value: val ? val.toFixed(2) : 0
+        }
+      })
+      return {
+        name: key === 'calculateVal' ? '智能投药' : '即时加药量',
+        data: result
+      }
+    })
+
+    const options = getEchartOptions(list);
+    rightEchartInstance.setOption(options, true);
+  })
+}
+
 const windowEchartResize = () => {
   rightEchartInstance.resize();
 }
@@ -122,11 +187,7 @@ onMounted(async () => {
     rightEchartInstance = echarts.init(document.querySelector('#echartRight'), 'light');
   });
 
-  controlApi.getRightEChartData({timeBegin: '2025/03/01', timeEnd: '2025/04/22'}).then(({ data }) => {
-    console.log("getRightEChartData", data);
-    const options = getEchartOptions([]);
-    rightEchartInstance.setOption(options, true);
-  })
+  initEchartData();
 
   window.addEventListener("resize", windowEchartResize);
 })
@@ -138,8 +199,26 @@ onUnmounted(() => {
 </script>
 
 <template>
-  <div class="left-echart-container">
-    <ul class="header space-x-[12px]">
+  <div class="echart-container">
+    <div class="header">
+      <BaseTitle title="投药趋势" type="3" class="flex-shrink-0"></BaseTitle>
+      <div class="flex items-center space-x-[4px]">
+        <NDatePicker
+          class="w-[250px]"
+          clearable
+          size="small"
+          type="daterange"
+          ref="dateRangeRef"
+          value-format="yyyy/MM/dd"
+          :is-date-disabled="isRangeDateDisabled"
+          :on-confirm="onDatePickerConfirm"
+          :on-clear="onDatePickerClear"
+          v-model:formatted-value="datePickerValue"
+          :theme-overrides="datePickerThemeOverrides"
+        ></NDatePicker>
+      </div>
+    </div>
+    <!-- <ul class="header space-x-[12px]">
       <li class="legend space-x-[4px]">
         <span class="circle color-green"></span>
         <span class="legend-name">智能投药量</span>
@@ -148,8 +227,7 @@ onUnmounted(() => {
         <span class="circle color-blue"></span>
         <span class="legend-name">即时加药量</span>
       </li>
-    </ul>
-
+    </ul> -->
     <div class="content">
       <div class="echarts" id="echartRight"></div>
     </div>
@@ -157,7 +235,7 @@ onUnmounted(() => {
 </template>
 
 <style lang="scss" scoped>
-.left-echart-container {
+.echart-container {
   width: 50%;
   height: 100%;
   padding: 14px;
@@ -167,7 +245,7 @@ onUnmounted(() => {
   overflow: hidden;
 
   .header {
-    @include flex(x, center, end);
+    @include flex(x, center, between);
     height: 28px;
     
     .legend {

+ 153 - 21
src/views/control/MedicinalView.vue

@@ -1,15 +1,9 @@
 <script setup>
-import { ref, onMounted, computed, unref, watch } from 'vue';
-import { NScrollbar, useMessage, NTabs, NTabPane, NProgress } from 'naive-ui';
+import { ref, onMounted, computed, onUnmounted } from 'vue';
+import {useMessage, NProgress } from 'naive-ui';
 import { TheChatView } from '@/components';
 import { controlApi } from "@/api/control";
 import BaseTitle from './components/BaseTitle.vue';
-import BaseRadioCard from './components/BaseRadioCard.vue';
-import BaseCard from './components/BaseCard.vue';
-import BaseChooseItem from './components/BaseChooseItem.vue';
-import BaseInput from './components/BaseInput.vue';
-import TheResultPanel from './components/TheResultPanel.vue';
-import TheEchartPanel from './components/TheEchartPanel.vue';
 
 import NumberPanel from './NumberPanel.vue';
 import CirclePanel from './CirclePanel.vue';
@@ -18,15 +12,25 @@ import EchartRight from './EchartRight.vue'
 import DrawerSetting from './DrawerSetting.vue';
 import ParamterCard from './ParamterCard.vue';
 import DrawerWarning from './DrawerWarning.vue';
+import dayjs from 'dayjs';
 
 let isProcessing = false;
 
+const lastDataSource = ref({});
+const warningCollectList = ref([]);
+
+const updateTime = ref(dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"));
+
 const message = useMessage();
 const processNumber = ref(0);
 const systemStatus = ref(0);
 const configurationStatus = ref(1);
-const medicineAmount = ref(0);
-const tytjTransientLL = ref(0);
+
+const timerPanel = ref(null);
+const timerParams = ref(null);
+
+// 中间面板数值
+const panelResultData = ref({});
 
 const paramterDrawerVisible = ref(false);
 const warningDrawerVisible = ref(false);
@@ -41,7 +45,7 @@ const handleSystemStatus = () => {
   if ( isProcessing ) return;
 
   isProcessing = true;
-
+  console.log( configurationStatus.value );
   if ( configurationStatus.value == 1 ) {
     return message.warning('当前组态未启用,无法投放');
   }
@@ -63,7 +67,7 @@ const handleUpdateParams = () => {
   initData();
 }
 
-const getNumVal = (type, n1, n2, activeIndex) => {
+const getNumVal = (type, n1, n2) => {
 
   if ( type == 0 ) {
     return Math.max(n1, n2);
@@ -79,6 +83,45 @@ const getNumVal = (type, n1, n2, activeIndex) => {
 
 }
 
+const getCurrentTypeData = () => {
+  const {
+    type,
+    hycXsyOne, hycXsyTwo, 
+    qycYxyOne, qycYxyTwo, qycAdOne, qycAdTwo,
+    htfksd,
+  } = lastDataSource.value;
+
+  if ( type == 0 ) {
+    return {
+      type,
+      hycXsy: Math.max(hycXsyOne, hycXsyTwo),
+      qycYxy: Math.max(qycYxyOne, qycYxyTwo),
+      qycAd: Math.max(qycAdOne, qycAdTwo),
+      htfksd,
+    }
+  }
+
+  if (type == 1) {
+    return {
+      type,
+      hycXsy: hycXsyOne,
+      qycYxy: qycYxyOne,
+      qycAd: qycAdOne,
+      htfksd
+    }
+  }
+
+  if (type == 2) {
+    return {
+      type,
+      hycXsy: hycXsyTwo,
+      qycYxy: qycYxyTwo,
+      qycAd: qycAdTwo,
+      htfksd
+    }
+  }
+}
+
 const operateNumbers = (operationType, callBack) => {
   const totalTime = 3000; 
   const steps = 100; 
@@ -101,8 +144,81 @@ const operateNumbers = (operationType, callBack) => {
   }, intervalTime);
 } 
 
+const isEmpty = (val) => {
+  return !(val === null || val === undefined || val === '')
+}
+
+const handleWarningDraw = () => {
+  if ( !warningCollectList.value.length ) {
+    return message.warning('当前没有系统告警');
+  }
+  warningDrawerVisible.value = true;
+}
+
+const getWarningInfo = async () => {
+
+  const { data } = await controlApi.getWarningParams();
+  const { kzmbplbjz, hycxsygkz, xhycbjz, jylpybjz, minAddAmount } = data;
+
+  const {
+    hycXsy,
+    qycYxy,
+    qycAd,
+    htfksd,
+    // 系统加药量
+    medicineAmount,
+
+  } = getCurrentTypeData();
+
+  if ( isEmpty(hycXsy) && isEmpty(htfksd) && isEmpty(kzmbplbjz)) {
+    const content = [];
+    if (( hycXsy - htfksd ) > kzmbplbjz ) {
+      content.push('• 好氧池硝酸盐控制目标偏移过大')
+    }
+    if ( hycXsy > hycxsygkz ) {
+      content.push('• 好氧池硝酸盐超管控值')
+    }
+    if (content.length) {
+      warningCollectList.value.push({
+        title: '反硝化异常报警',
+        content,
+        desc: '请排查现场工况/调整控制参数,非碳源量的问题,建议切换手动控制'
+      })
+    }
+  }
+
+  if (isEmpty(qycYxy) && isEmpty(qycAd) && isEmpty(hycXsy) && isEmpty(xhycbjz)) {
+    if ((qycYxy + qycAd - hycXsy) > xhycbjz) {
+      warningCollectList.value.push({
+        title: '硝化异常报警',
+        content: [],
+        desc: '请排查进水水质、曝气系统、活性污泥系统等,请切手动运行'
+      })
+    }
+  }
+
+  if (isEmpty(medicineAmount) && isEmpty(minAddAmount) && isEmpty(jylpybjz)) {
+    if ( medicineAmount > minAddAmount && medicineAmount > jylpybjz) {
+      warningCollectList.value.push({
+        title: '加药量偏移报警',
+        content: ['• 系统计算加药与现场实际流量计偏移过大'],
+        desc: '请排查现场碳源储罐液位、加药泵和流量计等,确保运行正常'
+      })
+    }
+  }
+}
+
+const initPanelData = async () => {
+  const { data } = await controlApi.getLastResult();
+
+  panelResultData.value = data;
+
+  updateTime.value = dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss");
+}
+
 const initData = async () => {
   const { data } = await controlApi.getBaseData();
+
   const {
     addType,
 
@@ -140,19 +256,25 @@ const initData = async () => {
     cod: getNumVal(type, jsCodOne, jsCodTwo) + ' mg/L',
     jszd: getNumVal(type, jsTnOne, jsTnTwo) + ' mg/L',
     hycxsy: getNumVal(type, hycXsyOne, hycXsyTwo) + ' mg/L',
-    hycad: '没有',
     qycxsy: getNumVal(type, qycYxyOne, qycYxyTwo) + ' mg/L',
     qycan: getNumVal(type, qycAdOne, qycAdTwo) + ' mg/L',
   };
 
   configurationStatus.value = addType;
 
+  lastDataSource.value = data;
 }
 
 onMounted(async () => {
   // 初始化
   await initData();
 
+  // 投药量数据
+  initPanelData();
+
+  // 获取报警相关数据
+  getWarningInfo();
+
   // 获取是否允许投药开关
   await controlApi.getSystemStatus().then(({ data }) => {
     // 0不允许  1允许
@@ -160,7 +282,16 @@ onMounted(async () => {
   });
 
   processNumber.value = systemSwitchType.value ? 100 : 0;
+
+  timerPanel.value = setInterval(initPanelData, 5 * 1000)
+  timerParams.value = setInterval(initData, 40 * 60 * 1000);
 })
+
+onUnmounted(() => {
+  clearInterval(timerPanel);
+  clearInterval(timerParams);
+})
+
 </script>
 
 <template>
@@ -171,7 +302,7 @@ onMounted(async () => {
           <div class="arg-section">
 
             <div class="left-card space-y-[16px]">
-              <BaseTitle title="智能投加计算"></BaseTitle>
+              <BaseTitle title="智能投加计算" type="1"></BaseTitle>
               <ParamterCard :data="paramterValue"></ParamterCard>
             </div>
 
@@ -182,20 +313,20 @@ onMounted(async () => {
                   <li class="item" @click="paramterDrawerVisible = true">
                     <span>参数设置</span>
                   </li>
-                  <li class="item" @click="warningDrawerVisible = true">
+                  <li class="item" @click="handleWarningDraw">
                     <span>系统告警</span>
-                    <span class="waring-circle-icon"></span>
+                    <span class="waring-circle-icon" v-show="warningCollectList.length != 0"></span>
                   </li>
                 </ul>
               </div>
               <div class="result-content">
                 <div class="number_card space-x-[20px]">
-                  <NumberPanel direction="left" title="智能控制系数" :value="123"></NumberPanel>
-                  <CirclePanel :medicineAmount="medicineAmount" :tytjTransientLL="tytjTransientLL"></CirclePanel>
-                  <NumberPanel direction="right" title="硝酸盐智能设定" unit="mg/L" :value="22"></NumberPanel>
+                  <NumberPanel direction="left" title="智能控制系数" :value="panelResultData.kzxs"></NumberPanel>
+                  <CirclePanel :medicineAmount="panelResultData.calculateVal" :tytjTransientLL="panelResultData.realValue"></CirclePanel>
+                  <NumberPanel direction="right" title="硝酸盐智能设定" unit="mg/L" :value="panelResultData.htfksd"></NumberPanel>
                 </div>
                 <div class="progress_card space-y-[8px]">
-                  <span class="time">模型更新时间: 2025-04-11 12:11:11</span>
+                  <span class="time">模型更新时间: {{ updateTime }}</span>
                   <div class="progress">
                     <NProgress
                       processing
@@ -238,6 +369,7 @@ onMounted(async () => {
   <!-- 系统告警 - 抽屉 -->
   <DrawerWarning
     v-model:show="warningDrawerVisible"
+    :warning-collect-list="warningCollectList"
   ></DrawerWarning>
 </template>
 
@@ -310,7 +442,7 @@ onMounted(async () => {
       .result-content {
         @include flex(y, center, around);
         height: calc(100% - 40px);
-        padding: 0px 86px 0 86px;
+        // padding: 0px 86px 0 86px;
         background-clip: padding-box;
         
         .number_card {

+ 0 - 5
src/views/control/ParamterCard.vue

@@ -34,11 +34,6 @@ defineProps({
       <span class="value">{{ data.hycxsy }}</span>
     </li>
     <li class="line"></li>
-    <li class="paramter-item">
-      <span class="label">好氧池氨氮</span>
-      <span class="value">{{ data.hycad }}</span>
-    </li>
-    <li class="line"></li>
     <li class="paramter-item">
       <span class="label">缺氧池硝酸盐</span>
       <span class="value">{{ data.qycxsy }}</span>

+ 12 - 4
src/views/control/components/BaseTitle.vue

@@ -16,15 +16,18 @@ defineProps({
 <template>
   <div class="header">
     <div class="title">
-      <svg xmlns="http://www.w3.org/2000/svg" width="8" height="24" viewBox="0 0 8 24" fill="none"
-        v-if="type === 'first'">
+      <svg xmlns="http://www.w3.org/2000/svg" width="8" height="24" viewBox="0 0 8 24" fill="none" v-if="type == 1">
         <path d="M0 6.86197V3.24507L4.21274 0H7.11111L4.45741 24H1.35684L4.01053 3.85352L0 6.86197Z" fill="#2454FF" />
-      </svg>
-      <svg xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 12 24" fill="none" v-else>
+      </svg> 
+      <svg xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 12 24" fill="none" v-if="type == 2">
         <path
           d="M7.74366 10.4333C8.43696 9.03333 8.78361 7.76667 8.78361 6.6V6.1C8.78361 5.06667 8.58552 4.26667 8.16459 3.7C7.74366 3.13333 7.19892 2.83333 6.48086 2.83333C5.7628 2.83333 5.21807 3.1 4.8219 3.66667C4.42573 4.23333 4.22764 5.1 4.22764 6.23333V7.16667H1.94966V6.1C1.94966 4.26667 2.37059 2.8 3.18769 1.66667C4.02956 0.566667 5.14379 0 6.53039 0C7.42177 0 8.23887 0.266667 8.93217 0.8C9.62547 1.3 10.1702 2.03333 10.5416 2.96667C10.9378 3.9 11.1111 4.93333 11.1111 6.03333V6.6C11.1111 7.6 10.9873 8.5 10.7149 9.4C10.4673 10.2667 10.0959 11.1667 9.57595 12.1L2.94652 21.1667H9.16145V24H0V21.6L7.74366 10.4333Z"
           fill="#2454FF" />
       </svg>
+      <svg width="14" height="24" viewBox="0 0 14 24" fill="none" xmlns="http://www.w3.org/2000/svg" v-if="type == 3">
+      <path d="M1.69718 22.3933C0.667119 21.4168 0.244119 20.0698 0.39437 18.3524L0.441508 17.8136H2.90911L2.87081 18.2514C2.77654 19.329 3.04091 20.1708 3.66394 20.777C4.25022 21.4168 5.13638 21.7198 6.25187 21.7198C7.43497 21.7198 8.41386 21.3494 9.15473 20.6086C9.89265 19.9014 10.3161 18.9249 10.4251 17.6789L10.5017 16.8034C10.6137 15.5238 10.364 14.5136 9.72193 13.7391C9.07689 12.9982 8.12901 12.6278 6.87831 12.6278H5.66141L5.85585 10.4053H7.03895C8.15444 10.4053 9.09952 10.0349 9.80365 9.32775C10.5078 8.62059 10.9253 7.71139 11.0255 6.56647L11.0844 5.89298C11.1817 4.78173 10.957 3.87253 10.3736 3.19905C9.79031 2.52557 8.9747 2.18882 7.89301 2.18882C6.81132 2.18882 5.93973 2.49189 5.27531 3.1317C4.61088 3.77151 4.233 4.61336 4.14167 5.65726L4.09454 6.19605H1.72834L1.78137 5.58991C1.93162 3.87253 2.59031 2.52557 3.72658 1.51534C4.86285 0.505112 6.32676 0 8.15211 0C9.94366 0 11.353 0.505112 12.3095 1.54901C13.2661 2.59291 13.6832 4.00723 13.53 5.75829L13.4652 6.49912C13.368 7.61037 13.0121 8.58692 12.3976 9.42877C11.7831 10.2706 11.0202 10.8768 10.106 11.2809C11.1523 11.6849 11.9385 12.3584 12.4307 13.3013C12.9199 14.2779 13.0901 15.4228 12.9752 16.7361L12.9045 17.5443C12.7366 19.4637 12.0264 21.0127 10.777 22.1576C9.49074 23.3362 7.91953 23.9087 6.02657 23.9087C4.16742 23.9087 2.72428 23.4036 1.69718 22.3933Z" fill="#2454FF"/>
+      </svg>
+
       <span class="text">{{ title }}</span>
     </div>
     <div class="btn-group space-x-[8px]">
@@ -43,6 +46,11 @@ defineProps({
     align-items: center;
     height: 24px;
 
+    .num {
+      font-size: 20px;
+      font-family: D-DIN-PRO-700-Bold;
+    }
+
     .text {
       height: 100%;
       padding-left: 13px;