Procházet zdrojové kódy

feat: 更新请求地址以及变更水质报警请求排序

sunxiao před 1 měsícem
rodič
revize
e6c2363916
2 změnil soubory, kde provedl 59 přidání a 58 odebrání
  1. 2 2
      .env.development
  2. 57 56
      src/views/analyse/WaterView.vue

+ 2 - 2
.env.development

@@ -1,5 +1,5 @@
 # 请求地址
-VITE_BASE_URL=http://chat.sequoialibra.com:81/apiServe/
-# VITE_BASE_URL=http://192.168.40.21:8080/
+# VITE_BASE_URL=http://chat.sequoialibra.com:81/apiServe/
+VITE_BASE_URL=http://192.168.40.21:8080/
 # 请求前缀
 VITE_BASE_PREFIX='' 

+ 57 - 56
src/views/analyse/WaterView.vue

@@ -57,48 +57,14 @@ const options = [
 const mockData = [
   {
     "createBy": "task-job",
-    "createTime": "2025-02-19 17:08",
-    "updateBy": "task-job",
-    "updateTime": "2025-02-19 21:08",
-    "remark": "0",
-    "id": 4247,
-    "type": 0,
-    "category": "进水总磷",
-    "time": "2025-02-19 20:08",
-    "reason": "进水总磷超标报警",
-    "warningVal": 8.32,
-    "designVal": 7.1,
-    "controlVal": null,
-    "forecastVal": null,
-    "functionWay": 0,
-    "level": "一级",
-    "status": 2,
-    "isEmergency": 0,
-    "offTime": "2025-02-19 21:08:20",
-    "operator": null,
-    "review": null,
-    "useRecommend": null,
-    "waterType": 0,
-    "symbol": 0,
-    "cwrwxz": 1.1554,
-    "cwrwfhz": 0.7731,
-    "delFlag": 0,
-    "revision": 4,
-    "counts": "5",
-    "warningValStr": null,
-    "warningStatus": null,
-    "symbolDesc": "超标准值"
-  },
-  {
-    "createBy": "task-job",
-    "createTime": "2025-02-20 03:08",
+    "createTime": "2025-02-22 18:08",
     "updateBy": "task-job",
-    "updateTime": "2025-02-20 08:08",
+    "updateTime": "2025-02-23 09:08",
     "remark": "0",
-    "id": 4256,
+    "id": 4287,
     "type": 0,
     "category": "进水SS",
-    "time": "2025-02-20 07:08",
+    "time": "2025-02-23 08:08",
     "reason": "进水SS超标报警",
     "warningVal": 900,
     "designVal": 315,
@@ -108,17 +74,17 @@ const mockData = [
     "level": "一级",
     "status": 2,
     "isEmergency": 0,
-    "offTime": "2025-02-20 08:08:20",
+    "offTime": "2025-02-23 09:08:00",
     "operator": null,
     "review": null,
     "useRecommend": null,
     "waterType": 0,
     "symbol": 0,
-    "cwrwxz": 1.0698,
-    "cwrwfhz": 0.6046,
+    "cwrwxz": 2.8571,
+    "cwrwfhz": 2.1813,
     "delFlag": 0,
-    "revision": 5,
-    "counts": "5",
+    "revision": 15,
+    "counts": "16",
     "warningValStr": null,
     "warningStatus": null,
     "symbolDesc": "超标准值"
@@ -159,16 +125,50 @@ const mockData = [
   },
   {
     "createBy": "task-job",
-    "createTime": "2025-02-23 17:08",
+    "createTime": "2025-02-20 03:08",
+    "updateBy": "task-job",
+    "updateTime": "2025-02-20 08:08",
+    "remark": "0",
+    "id": 4256,
+    "type": 0,
+    "category": "进水SS",
+    "time": "2025-02-20 07:08",
+    "reason": "进水SS超标报警",
+    "warningVal": 900,
+    "designVal": 315,
+    "controlVal": null,
+    "forecastVal": null,
+    "functionWay": 0,
+    "level": "一级",
+    "status": 2,
+    "isEmergency": 0,
+    "offTime": "2025-02-20 08:08:20",
+    "operator": null,
+    "review": null,
+    "useRecommend": null,
+    "waterType": 0,
+    "symbol": 0,
+    "cwrwxz": 1.0698,
+    "cwrwfhz": 0.6046,
+    "delFlag": 0,
+    "revision": 5,
+    "counts": "5",
+    "warningValStr": null,
+    "warningStatus": null,
+    "symbolDesc": "超标准值"
+  },
+  {
+    "createBy": "task-job",
+    "createTime": "2025-02-19 17:08",
     "updateBy": "task-job",
-    "updateTime": "2025-02-23 21:08",
+    "updateTime": "2025-02-19 21:08",
     "remark": "0",
-    "id": 4307,
+    "id": 4247,
     "type": 0,
     "category": "进水总磷",
-    "time": "2025-02-23 20:08",
+    "time": "2025-02-19 20:08",
     "reason": "进水总磷超标报警",
-    "warningVal": 8.25,
+    "warningVal": 8.32,
     "designVal": 7.1,
     "controlVal": null,
     "forecastVal": null,
@@ -176,21 +176,21 @@ const mockData = [
     "level": "一级",
     "status": 2,
     "isEmergency": 0,
-    "offTime": "2025-02-23 21:08:00",
+    "offTime": "2025-02-19 21:08:20",
     "operator": null,
     "review": null,
     "useRecommend": null,
     "waterType": 0,
     "symbol": 0,
-    "cwrwxz": 1.2196,
-    "cwrwfhz": 1.0285,
+    "cwrwxz": 1.1554,
+    "cwrwfhz": 0.7731,
     "delFlag": 0,
     "revision": 4,
     "counts": "5",
     "warningValStr": null,
     "warningStatus": null,
     "symbolDesc": "超标准值"
-  }
+  },
 ]
 watch(() => waterTypeValue.value, curValue => {
   onRestore({ warningStatus: warningActive.value, waterType: curValue });
@@ -221,8 +221,8 @@ const resetConfiguration = () => {
  * 报警详情
 */
 const handleOpenContent = async (item) => {
-  const  { id, category, reason:title, counts } = item;
-  if ( id == flowParams.warningId ) return;
+  const { id, category, reason: title, counts } = item;
+  if (id == flowParams.warningId) return;
 
 
   flowParams.category = category;
@@ -371,7 +371,7 @@ const handleOpenContent = async (item) => {
 
   /**
    * 临时修改 - 后续需要删除
-   * */ 
+   * */
   textDataSources.value = {
     ...textDataSources.value,
     list: textDataSources.value.list.map(item => {
@@ -561,7 +561,8 @@ const handleWelcomeRecommend = question => {
         <p v-show="!recordList.length" class="pt-[30px] text-[12px] text-[#999] text-center">暂无报警数据</p>
         <div class="grid grid-cols-1 gap-[12px]">
           <div v-show="warningActive == 1">
-            <RecodeSquareCardItem v-for="item in mockData" :key="item.id" :item="item" @on-click="handleOpenContent" />
+            <RecodeSquareCardItem v-for="item, index in mockData" :key="item.id" :item="item"
+              @on-click="handleOpenContent" :style="{ marginBottom: index < 3 ? '10px' : '' }" />
           </div>
           <RecodeSquareCardItem v-for="item in recordList" :key="item.id" :item="item" @on-click="handleOpenContent" />
         </div>