浏览代码

feat: 更新预警功能

leo 6 天之前
父节点
当前提交
f4869448a2
共有 4 个文件被更改,包括 422 次插入350 次删除
  1. 222 221
      manifest.json
  2. 二进制
      pages/warning/assets/important-gray.png
  3. 二进制
      pages/warning/assets/urgent-gray.png
  4. 200 129
      pages/warning/index.vue

+ 222 - 221
manifest.json

@@ -1,239 +1,239 @@
 {
-  "name": "智控",
-  "appid": "__UNI__DBA6730",
-  "description": "",
-  "versionName": "1.15.9",
-  "versionCode": 11509,
-  "transformPx": false,
-  "sassImplementationName": "node-sass",
-  /* 5+App特有相关 */
-  "app-plus": {
-    "softinput": {
-      "mode": "adjustPan",
-      "softinputMode": "adjustResize"
+    "name" : "智控",
+    "appid" : "__UNI__DBA6730",
+    "description" : "",
+    "versionName" : "1.15.9",
+    "versionCode" : 11509,
+    "transformPx" : false,
+    "sassImplementationName" : "node-sass",
+    /* 5+App特有相关 */
+    "app-plus" : {
+        "softinput" : {
+            "mode" : "adjustPan",
+            "softinputMode" : "adjustResize"
+        },
+        "usingComponents" : true,
+        "nvueCompiler" : "uni-app",
+        "compilerVersion" : 3,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        "compatible" : {
+            "ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
+        },
+        /* 模块配置 */
+        "modules" : {
+            "Webview-x5" : {},
+            "Maps" : {},
+            "VideoPlayer" : {},
+            "LivePusher" : {},
+            "Geolocation" : {},
+            "Camera" : {},
+            "wasm" : {
+                "enabled" : true,
+                "preload" : false
+            }
+        },
+        /* 应用发布信息 */
+        "distribute" : {
+            /* android打包配置 */
+            "android" : {
+                "permissions" : [
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_COMPONENT_ENABLED_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.DISABLE_KEYGUARD\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-permission android:name=\"android.permission.INSTALL_LOCATION_PROVIDER\"/>",
+                    "<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>",
+                    "<uses-permission android:name=\"android.permission.INSTALL_SHORTCUT\"/>",
+                    "<uses-permission android:name=\"android.permission.INTERNET\"/>",
+                    "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
+                    "<uses-permission android:name=\"android.permission.UPDATE_DEVICE_STATS\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ],
+                "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
+                "targetSdkVersion" : 30
+            },
+            /* ios打包配置 */
+            "ios" : {
+                "dSYMs" : false
+            },
+            /* SDK配置 */
+            "sdkConfigs" : {
+                "geolocation" : {
+                    "amap" : {
+                        "__platform__" : [ "ios", "android" ],
+                        "appkey_ios" : "25716a10d462140d75820fd9f5b342a5",
+                        "appkey_android" : "25716a10d462140d75820fd9f5b342a5"
+                    }
+                },
+                "maps" : {
+                    "amap" : {
+                        "appkey_ios" : "25716a10d462140d75820fd9f5b342a5",
+                        "appkey_android" : "25716a10d462140d75820fd9f5b342a5"
+                    }
+                },
+                "ad" : {}
+            },
+            "icons" : {
+                "android" : {
+                    "hdpi" : "unpackage/res/icons/72x72.png",
+                    "xhdpi" : "unpackage/res/icons/96x96.png",
+                    "xxhdpi" : "unpackage/res/icons/144x144.png",
+                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
+                },
+                "ios" : {
+                    "appstore" : "unpackage/res/icons/1024x1024.png",
+                    "ipad" : {
+                        "app" : "unpackage/res/icons/76x76.png",
+                        "app@2x" : "unpackage/res/icons/152x152.png",
+                        "notification" : "unpackage/res/icons/20x20.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "proapp@2x" : "unpackage/res/icons/167x167.png",
+                        "settings" : "unpackage/res/icons/29x29.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "spotlight" : "unpackage/res/icons/40x40.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png"
+                    },
+                    "iphone" : {
+                        "app@2x" : "unpackage/res/icons/120x120.png",
+                        "app@3x" : "unpackage/res/icons/180x180.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "notification@3x" : "unpackage/res/icons/60x60.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "settings@3x" : "unpackage/res/icons/87x87.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png",
+                        "spotlight@3x" : "unpackage/res/icons/120x120.png"
+                    }
+                }
+            },
+            "splashscreen" : {
+                "androidStyle" : "default"
+            }
+        },
+        "uniStatistics" : {
+            "enable" : true,
+            "version" : "2"
+        }
+    },
+    /* 快应用特有相关 */
+    "quickapp" : {},
+    /* 小程序特有相关 */
+    "mp-weixin" : {
+        "appid" : "wx1cabf67f460e3a14",
+        "setting" : {
+            "urlCheck" : false,
+            "minified" : true,
+            "postcss" : false,
+            "es6" : true
+        },
+        "usingComponents" : true,
+        "uniStatistics" : {
+            "enable" : true
+        }
+    },
+    "mp-alipay" : {
+        "usingComponents" : true,
+        "uniStatistics" : {
+            "enable" : true
+        }
     },
-    "usingComponents": true,
-    "nvueCompiler": "uni-app",
-    "compilerVersion": 3,
-    "splashscreen": {
-      "alwaysShowBeforeRender": true,
-      "waiting": true,
-      "autoclose": true,
-      "delay": 0
+    "mp-baidu" : {
+        "usingComponents" : true,
+        "uniStatistics" : {
+            "enable" : true
+        }
     },
-    "compatible": {
-      "ignoreVersion": true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
+    "mp-toutiao" : {
+        "usingComponents" : true,
+        "uniStatistics" : {
+            "enable" : true
+        }
     },
-    /* 模块配置 */
-    "modules": {
-      "Webview-x5": {},
-      "Maps": {},
-      "VideoPlayer": {},
-      "LivePusher": {},
-      "Geolocation": {},
-      "Camera": {},
-      "wasm": {
-        "enabled": true,
-        "preload": false
-      }
+    "uniStatistics" : {
+        "enable" : true,
+        "version" : "2"
     },
-    /* 应用发布信息 */
-    "distribute": {
-      /* android打包配置 */
-      "android": {
-        "permissions": [
-          "<uses-feature android:name=\"android.hardware.camera\"/>",
-          "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-          "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
-          "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
-          "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
-          "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
-          "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
-          "<uses-permission android:name=\"android.permission.CAMERA\"/>",
-          "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-          "<uses-permission android:name=\"android.permission.CHANGE_COMPONENT_ENABLED_STATE\"/>",
-          "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
-          "<uses-permission android:name=\"android.permission.DISABLE_KEYGUARD\"/>",
-          "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-          "<uses-permission android:name=\"android.permission.INSTALL_LOCATION_PROVIDER\"/>",
-          "<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>",
-          "<uses-permission android:name=\"android.permission.INSTALL_SHORTCUT\"/>",
-          "<uses-permission android:name=\"android.permission.INTERNET\"/>",
-          "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
-          "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-          "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-          "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-          "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
-          "<uses-permission android:name=\"android.permission.UPDATE_DEVICE_STATS\"/>",
-          "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-          "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-          "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
-        ],
-        "abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"],
-        "targetSdkVersion": 30
-      },
-      /* ios打包配置 */
-      "ios": {
-        "dSYMs": false
-      },
-      /* SDK配置 */
-      "sdkConfigs": {
-        "geolocation": {
-          "amap": {
-            "__platform__": ["ios", "android"],
-            "appkey_ios": "25716a10d462140d75820fd9f5b342a5",
-            "appkey_android": "25716a10d462140d75820fd9f5b342a5"
-          }
-        },
-        "maps": {
-          "amap": {
-            "appkey_ios": "25716a10d462140d75820fd9f5b342a5",
-            "appkey_android": "25716a10d462140d75820fd9f5b342a5"
-          }
+    "h5" : {
+        "devServer" : {
+            "port" : 8000,
+            "disableHostCheck" : true,
+            "proxy" : {
+                "/ksy" : {
+                    "target" : "http://dev.hnyfwlw.com",
+                    "changeOrigin" : true,
+                    "ws" : true,
+                    "pathRewrite" : {
+                        "^/ksy" : "ksy"
+                    }
+                }
+            }
         },
-        "ad": {}
-      },
-      "icons": {
-        "android": {
-          "hdpi": "unpackage/res/icons/72x72.png",
-          "xhdpi": "unpackage/res/icons/96x96.png",
-          "xxhdpi": "unpackage/res/icons/144x144.png",
-          "xxxhdpi": "unpackage/res/icons/192x192.png"
+        "template" : "static/tempalate.html",
+        "sdkConfigs" : {
+            "maps" : {
+                "qqmap" : {
+                    "key" : "XGQBZ-MSGW6-KNDSO-MVOIJ-OM6LO-JXBKB"
+                },
+                "amap" : {
+                    "key" : "bd1582190896ab05afb30aa8161d14c2",
+                    "securityJsCode" : "",
+                    "serviceHost" : ""
+                }
+            }
         },
-        "ios": {
-          "appstore": "unpackage/res/icons/1024x1024.png",
-          "ipad": {
-            "app": "unpackage/res/icons/76x76.png",
-            "app@2x": "unpackage/res/icons/152x152.png",
-            "notification": "unpackage/res/icons/20x20.png",
-            "notification@2x": "unpackage/res/icons/40x40.png",
-            "proapp@2x": "unpackage/res/icons/167x167.png",
-            "settings": "unpackage/res/icons/29x29.png",
-            "settings@2x": "unpackage/res/icons/58x58.png",
-            "spotlight": "unpackage/res/icons/40x40.png",
-            "spotlight@2x": "unpackage/res/icons/80x80.png"
-          },
-          "iphone": {
-            "app@2x": "unpackage/res/icons/120x120.png",
-            "app@3x": "unpackage/res/icons/180x180.png",
-            "notification@2x": "unpackage/res/icons/40x40.png",
-            "notification@3x": "unpackage/res/icons/60x60.png",
-            "settings@2x": "unpackage/res/icons/58x58.png",
-            "settings@3x": "unpackage/res/icons/87x87.png",
-            "spotlight@2x": "unpackage/res/icons/80x80.png",
-            "spotlight@3x": "unpackage/res/icons/120x120.png"
-          }
+        "uniStatistics" : {
+            "enable" : true
         }
-      },
-      "splashscreen": {
-        "androidStyle": "default"
-      }
     },
-    "uniStatistics": {
-      "enable": true,
-      "version": "2"
-    }
-  },
-  /* 快应用特有相关 */
-  "quickapp": {},
-  /* 小程序特有相关 */
-  "mp-weixin": {
-    "appid": "wx1cabf67f460e3a14",
-    "setting": {
-      "urlCheck": false,
-      "minified": true,
-      "postcss": false,
-      "es6": true
+    "mp-jd" : {
+        "uniStatistics" : {
+            "enable" : true
+        }
     },
-    "usingComponents": true,
-    "uniStatistics": {
-      "enable": true
-    }
-  },
-  "mp-alipay": {
-    "usingComponents": true,
-    "uniStatistics": {
-      "enable": true
-    }
-  },
-  "mp-baidu": {
-    "usingComponents": true,
-    "uniStatistics": {
-      "enable": true
-    }
-  },
-  "mp-toutiao": {
-    "usingComponents": true,
-    "uniStatistics": {
-      "enable": true
-    }
-  },
-  "uniStatistics": {
-    "enable": true,
-    "version": "2"
-  },
-  "h5": {
-    "devServer": {
-      "port": 8000,
-      "disableHostCheck": true,
-      "proxy": {
-        "/ksy": {
-          "target": "http://dev.hnyfwlw.com",
-          "changeOrigin": true,
-          "ws": true,
-          "pathRewrite": {
-            "^/ksy": "ksy"
-          }
+    "mp-kuaishou" : {
+        "uniStatistics" : {
+            "enable" : true
         }
-      }
     },
-    "template": "static/tempalate.html",
-    "sdkConfigs": {
-      "maps": {
-        "qqmap": {
-          "key": "XGQBZ-MSGW6-KNDSO-MVOIJ-OM6LO-JXBKB"
-        },
-        "amap": {
-          "key": "bd1582190896ab05afb30aa8161d14c2",
-          "securityJsCode": "",
-          "serviceHost": ""
+    "mp-lark" : {
+        "uniStatistics" : {
+            "enable" : true
         }
-      }
     },
-    "uniStatistics": {
-      "enable": true
-    }
-  },
-  "mp-jd": {
-    "uniStatistics": {
-      "enable": true
-    }
-  },
-  "mp-kuaishou": {
-    "uniStatistics": {
-      "enable": true
-    }
-  },
-  "mp-lark": {
-    "uniStatistics": {
-      "enable": true
-    }
-  },
-  "mp-qq": {
-    "uniStatistics": {
-      "enable": true
-    }
-  },
-  "quickapp-webview-huawei": {
-    "uniStatistics": {
-      "enable": true
-    }
-  },
-  "quickapp-webview-union": {
-    "uniStatistics": {
-      "enable": true
+    "mp-qq" : {
+        "uniStatistics" : {
+            "enable" : true
+        }
+    },
+    "quickapp-webview-huawei" : {
+        "uniStatistics" : {
+            "enable" : true
+        }
+    },
+    "quickapp-webview-union" : {
+        "uniStatistics" : {
+            "enable" : true
+        }
     }
-  }
 }
 // "sdkConfigs" : {
 //     "maps" : {
@@ -242,3 +242,4 @@
 //         }
 //     }
 // }
+

二进制
pages/warning/assets/important-gray.png


二进制
pages/warning/assets/urgent-gray.png


+ 200 - 129
pages/warning/index.vue

@@ -35,8 +35,8 @@
 
       <!-- 标签导航 -->
       <view class="tab-nav">
-        <view 
-          v-for="(tab, index) in tabs" 
+        <view
+          v-for="(tab, index) in tabs"
           :key="index"
           class="tab-item"
           :class="{ active: activeTab === index }"
@@ -49,9 +49,9 @@
       <!-- 预警列表 -->
       <scroll-view
         v-if="activeTab == 0"
-        class="warning-list" 
-        scroll-y 
-        :scroll-top="listScrollTop" 
+        class="warning-list"
+        scroll-y
+        :scroll-top="listScrollTop"
         scroll-with-animation
         @scrolltolower="loadMore"
         @scrolltoupper="refresh"
@@ -64,13 +64,31 @@
         >
           <view class="warning-header">
             <view class="warning-type">
-              <view class="type-icon" :class="warning.status == '0' ? 'type-blue' : 'type-gray'">
+              <view
+                class="type-icon"
+                :class="warning.status == '0' ? 'type-blue' : 'type-gray'"
+              >
                 <image :src="weather" class="icon-image" />
               </view>
               <text class="type-text">{{ warning.warning_title }}</text>
               <text class="device-type">{{ warning.device_type }}</text>
             </view>
-            <view class="warning-level" :class="warning.level == '0' ? 'level-normal' :warning.level == '1'? 'level-important':'level-urgent'">
+            <view
+              class="warning-level"
+              :class="
+                warning.level == '0'
+                  ? warning.status != '0'
+                    ? 'level-normal-gray'
+                    : 'level-normal'
+                  : warning.level == '1'
+                    ? warning.status != '0'
+                      ? 'level-important-gray'
+                      : 'level-important'
+                    : warning.status != '0'
+                      ? 'level-urgent-gray'
+                      : 'level-urgent'
+              "
+            >
             </view>
           </view>
           <view class="warning-content">
@@ -87,7 +105,7 @@
             <text style="margin-left: 10rpx">{{ warning.address || '-' }}</text>
           </view>
         </view>
-        
+
         <!-- 加载更多提示 -->
         <view class="loading-more">
           <text v-if="loading">加载中...</text>
@@ -98,9 +116,9 @@
 
       <scroll-view
         v-if="activeTab == 1"
-        class="warning-list" 
-        scroll-y 
-        :scroll-top="listScrollTop" 
+        class="warning-list"
+        scroll-y
+        :scroll-top="listScrollTop"
         scroll-with-animation
         @scrolltolower="loadMore"
         @scrolltoupper="refresh"
@@ -115,13 +133,15 @@
             {{ warning.conf }}
           </view>
           <view class="warning-footer">
-            <text class="warning-time">{{ formatTime(warning.create_time) }}</text>
+            <text class="warning-time">{{
+              formatTime(warning.create_time)
+            }}</text>
             <view class="warning-location">
               <u-icon name="location" size="20rpx" color="#999" />
             </view>
           </view>
         </view>
-        
+
         <!-- 加载更多提示 -->
         <view class="loading-more">
           <text v-if="loading">加载中...</text>
@@ -134,10 +154,29 @@
         <u-icon name="arrow-up" size="28rpx" color="#999" />
       </view>
     </view>
-		<u-calendar v-model="showDatePicker" :mode="mode" @change="changeCalendar"></u-calendar>
-    <u-popup v-model="popupShow" mode="bottom" height="80%" border-radius="20">
+    <u-calendar
+      v-model="showDatePicker"
+      :mode="mode"
+      @change="changeCalendar"
+    ></u-calendar>
+    <u-popup v-model="popupShow" mode="bottom" height="50%" border-radius="20">
       <view class="popup-container">
-        <view class="popup-icon" :class="current.level == '0' ? 'popup-level-normal' :current.level == '1'? 'popup-level-important':'popup-level-urgent'">
+        <view
+          class="popup-icon"
+          :class="
+            current.level == '0'
+              ? current.status != '0'
+                ? 'popup-level-normal-gray'
+                : 'popup-level-normal'
+              : current.level == '1'
+                ? current.status != '0'
+                  ? 'popup-level-important-gray'
+                  : 'popup-level-important'
+                : current.status != '0'
+                  ? 'popup-level-urgent-gray'
+                  : 'popup-level-urgent'
+          "
+        >
         </view>
         <view class="popup-header">{{ current.warning_title }}</view>
         <view class="popup-type">
@@ -150,13 +189,20 @@
           <text style="margin-left: 10rpx">{{ warning.address || '-' }}</text>
         </view>
       </view>
-		</u-popup>
-    <u-popup v-model="popupManualShow" mode="bottom" height="80%" border-radius="20">
-      <view class="popup-container" style="margin-top:40rpx">
+    </u-popup>
+    <u-popup
+      v-model="popupManualShow"
+      mode="bottom"
+      height="50%"
+      border-radius="20"
+    >
+      <view class="popup-container" style="margin-top: 40rpx">
         <view class="popup-content">{{ currentManual.conf }}</view>
-        <view class="popup-time">{{ formatTime(currentManual.create_time) }}</view>
+        <view class="popup-time">{{
+          formatTime(currentManual.create_time)
+        }}</view>
       </view>
-		</u-popup>
+    </u-popup>
   </view>
 </template>
 
@@ -170,8 +216,8 @@ import offline from './assets/offline.png';
 export default {
   data() {
     return {
-      current:{},
-      currentManual:{},
+      current: {},
+      currentManual: {},
       popupShow: false,
       popupManualShow: false,
       exclamation,
@@ -180,10 +226,10 @@ export default {
       weather,
       offline,
       showDatePicker: false,
-			mode: 'range',
+      mode: 'range',
       activeTab: 0,
       listScrollTop: 0,
-      tabs: ['环境监测','手动预警'],
+      tabs: ['环境监测', '手动预警'],
       warningList: [],
       manualWarningList: [],
       page_size: 10,
@@ -192,7 +238,7 @@ export default {
       startTime: this.getSevenDaysAgo() || '开始日期',
       endTime: this.getCurrentDate() || '结束日期',
       deviceId: '',
-      device_type_id:'',
+      device_type_id: '',
       total: 0,
       loading: false,
       finished: false,
@@ -203,45 +249,46 @@ export default {
     this.getWarningList();
   },
   methods: {
-    activeTabHandler(index){
+    activeTabHandler(index) {
       this.activeTab = index;
-      if(index == 0){
+      this.page = 1;
+      if (index == 0) {
         this.getWarningList();
-      }else if(index == 1){
+      } else if (index == 1) {
         this.getWarningManualList();
       }
     },
-    popupManualShowHandler(warning){
+    popupManualShowHandler(warning) {
       this.currentManual = warning;
       this.popupManualShow = true;
     },
-    popupShowHandler(warning){
+    popupShowHandler(warning) {
       this.current = warning;
       const params = {
         record_ids: warning.id,
       };
-      this.readHandler(params)
+      this.readHandler(params);
       this.popupShow = true;
     },
-    changeCalendar(e){
+    changeCalendar(e) {
       this.startTime = e.startDate;
       this.endTime = e.endDate;
       // 重置分页参数
       this.page = 1;
       this.loading = false;
       this.finished = false;
-      if(this.activeTab == 0){
+      if (this.activeTab == 0) {
         this.getWarningList();
-      }else if(this.activeTab == 1){
+      } else if (this.activeTab == 1) {
         this.getWarningManualList();
       }
     },
     // 加载更多
     loadMore() {
       if (this.finished) return;
-      if(this.activeTab == 0){
+      if (this.activeTab == 0) {
         this.getWarningList();
-      }else if(this.activeTab == 1){
+      } else if (this.activeTab == 1) {
         this.getWarningManualList();
       }
     },
@@ -253,26 +300,26 @@ export default {
       this.loading = false;
       this.finished = false;
       this.refreshing = true;
-      if(this.activeTab == 0){
+      if (this.activeTab == 0) {
         this.getWarningList();
-      }else if(this.activeTab == 1){
+      } else if (this.activeTab == 1) {
         this.getWarningManualList();
       }
     },
     // 已读
-    async readHandler(params){
+    async readHandler(params) {
       await this.$myRequest({
-        url:'/api/api_gateway?method=device.env_sec_alert.update_env_sec_alert_record',
-        method:'POST',
+        url: '/api/api_gateway?method=device.env_sec_alert.update_env_sec_alert_record',
+        method: 'POST',
         data: params,
-      })
+      });
       this.page = 1;
-      if(this.activeTab == 0){
+      if (this.activeTab == 0) {
         this.getWarningList();
       }
     },
-    formatTime(time){
-      if(!time){
+    formatTime(time) {
+      if (!time) {
         return '';
       }
       const date = new Date(time * 1000);
@@ -302,18 +349,18 @@ export default {
       const day = String(today.getDate()).padStart(2, '0');
       return `${year}-${month}-${day}`;
     },
-    showDatePickerHandle(){
+    showDatePickerHandle() {
       this.showDatePicker = true;
     },
-  // 把日期转成秒数
+    // 把日期转成秒数
     dateToTimestamp(date) {
       return Math.floor(new Date(date).getTime() / 1000);
     },
-    async getWarningManualList(){
+    async getWarningManualList() {
       if (this.loading) return;
-      
+
       this.loading = true;
-      
+
       const start = this.dateToTimestamp(this.startTime + ' 00:00:00');
       const end = this.dateToTimestamp(this.endTime + ' 23:59:59');
       const params = {
@@ -322,40 +369,39 @@ export default {
         page: this.page,
         page_size: this.page_size,
         device_id: this.deviceId,
-        device_type_id: this.device_type_id
-      }
-      
+        device_type_id: this.device_type_id,
+      };
+
       try {
         const res = await this.$myRequest({
-          url:'/api/api_gateway?method=device.env_sec_alert.get_manual_env_sec_alert_record',
-          method:'POST',
+          url: '/api/api_gateway?method=device.env_sec_alert.get_manual_env_sec_alert_record',
+          method: 'POST',
           data: params,
-        })
-        
+        });
+
         const resData = res?.data || [];
         const list = resData || [];
-        
+
         if (this.page === 1) {
           this.manualWarningList = list;
         } else {
           this.manualWarningList = [...this.manualWarningList, ...list];
         }
-        
+
         this.total = res?.total || 0;
         this.loading = false;
-        
+
         // 计算是否还有更多数据
         if (this.manualWarningList.length >= this.total) {
           this.finished = true;
         } else {
           this.page++;
         }
-        
+
         // 结束刷新状态
         if (this.refreshing) {
           this.refreshing = false;
         }
-        
       } catch (error) {
         console.error('获取预警列表失败:', error);
         this.loading = false;
@@ -364,11 +410,11 @@ export default {
         }
       }
     },
-    async getWarningList(){
+    async getWarningList() {
       if (this.loading) return;
-      
+
       this.loading = true;
-      
+
       const start = this.dateToTimestamp(this.startTime + ' 00:00:00');
       const end = this.dateToTimestamp(this.endTime + ' 23:59:59');
       const params = {
@@ -377,40 +423,39 @@ export default {
         page: this.page,
         page_size: this.page_size,
         device_id: this.deviceId,
-        device_type_id: this.device_type_id
-      }
-      
+        device_type_id: this.device_type_id,
+      };
+
       try {
         const res = await this.$myRequest({
-          url:'/api/api_gateway?method=device.env_sec_alert.get_env_sec_alert',
-          method:'POST',
+          url: '/api/api_gateway?method=device.env_sec_alert.get_env_sec_alert',
+          method: 'POST',
           data: params,
-        })
-        
+        });
+
         const resData = res?.data || [];
         const list = resData || [];
-        
+
         if (this.page === 1) {
           this.warningList = list;
         } else {
           this.warningList = [...this.warningList, ...list];
         }
-        
+
         this.total = res?.total_num || 0;
         this.loading = false;
-        
+
         // 计算是否还有更多数据
         if (this.warningList.length >= this.total) {
           this.finished = true;
         } else {
           this.page++;
         }
-        
+
         // 结束刷新状态
         if (this.refreshing) {
           this.refreshing = false;
         }
-        
       } catch (error) {
         console.error('获取预警列表失败:', error);
         this.loading = false;
@@ -422,8 +467,8 @@ export default {
     // 回到顶部
     scrollToTop() {
       this.listScrollTop = 0;
-    }
-  }
+    },
+  },
 };
 </script>
 
@@ -431,15 +476,15 @@ export default {
 .warning-center {
   min-height: 100vh;
   font-family: 'Source Han Sans CN';
-  background: linear-gradient(0deg, #F5F6FA 79.64%, #FFEEEC 99.35%);
+  background: linear-gradient(0deg, #f5f6fa 79.64%, #ffeeec 99.35%);
 }
-::v-deep .u-calendar__action{
-  display:flex;
+::v-deep .u-calendar__action {
+  display: flex;
 }
-::v-deep .u-calendar__action__icon{
+::v-deep .u-calendar__action__icon {
   width: 40rpx;
 }
-::v-deep .u-calendar__action__text{
+::v-deep .u-calendar__action__text {
   width: calc(100% - 160rpx);
   text-align: center;
 }
@@ -463,7 +508,7 @@ export default {
       font-style: italic;
       display: block;
       color: #303133;
-      font-family: "Source Han Sans CN VF";
+      font-family: 'Source Han Sans CN VF';
       font-size: 40rpx;
       font-weight: 700;
       margin-bottom: 8rpx;
@@ -481,19 +526,19 @@ export default {
       width: 130rpx;
       height: 130rpx;
       position: relative;
-      .icon-image{
+      .icon-image {
         width: 100%;
         height: 100%;
       }
     }
   }
 }
-.popup-container{
-  position:relative;
+.popup-container {
+  position: relative;
   .popup-icon {
     position: absolute;
-    top:0;
-    right:0;
+    top: 0;
+    right: 0;
     margin-left: 12rpx;
     width: 112rpx;
     height: 48rpx;
@@ -505,13 +550,26 @@ export default {
       background-repeat: no-repeat;
       background-size: 100%;
     }
-
+    &.popup-level-normal-gray {
+      background: url('./assets/normal-gray.png');
+      background-repeat: no-repeat;
+      background-size: 100%;
+    }
+    &.popup-level-important-gray {
+      background: url('./assets/important-gray.png');
+      background-repeat: no-repeat;
+      background-size: 100%;
+    }
     &.popup-level-important {
       background: url('./assets/important.png');
       background-repeat: no-repeat;
       background-size: 100%;
     }
-
+    &.popup-level-urgent-gray {
+      background: url('./assets/urgent-gray.png');
+      background-repeat: no-repeat;
+      background-size: 100%;
+    }
     &.popup-level-urgent {
       background: url('./assets/urgent.png');
       background-repeat: no-repeat;
@@ -519,49 +577,49 @@ export default {
     }
   }
 }
-.popup-header{
+.popup-header {
   padding: 20rpx 32rpx;
   width: 100%;
   text-align: left;
   color: #303133;
-  font-family: "Source Han Sans CN VF";
+  font-family: 'Source Han Sans CN VF';
   font-size: 32rx;
   font-weight: 700;
 }
-.popup-type{
-  border-radius:32rpx;
+.popup-type {
+  border-radius: 32rpx;
   margin-left: 32rpx;
-  display:inline-block;
-  border: 2rpx solid #E4E7ED;
+  display: inline-block;
+  border: 2rpx solid #e4e7ed;
   padding: 2rpx 12rpx;
   color: #666666;
-  font-family: "Source Han Sans CN VF";
+  font-family: 'Source Han Sans CN VF';
   font-size: 24rpx;
   font-weight: 400;
   margin-bottom: 24rpx;
 }
-.popup-content{
+.popup-content {
   padding: 0 32rpx;
   line-height: 50rpx;
 }
-.popup-time{
-  padding:0 32rpx;
+.popup-time {
+  padding: 0 32rpx;
   margin-top: 36rpx;
-  color:#999999;
+  color: #999999;
   font-size: 24rpx;
   text-align: left;
   color: #bdbdbd;
-  font-family: "Source Han Sans CN VF";
+  font-family: 'Source Han Sans CN VF';
   font-style: normal;
   font-weight: 400;
 }
-.popup-location{
+.popup-location {
   font-size: 24rpx;
   margin-top: 16rpx;
   padding-top: 16rpx;
-  font-family: "Source Han Sans CN VF";
+  font-family: 'Source Han Sans CN VF';
   color: #999999;
-  display:flex;
+  display: flex;
   align-items: center;
 }
 
@@ -570,9 +628,9 @@ export default {
   font-size: 24rpx;
   margin-top: 16rpx;
   padding-top: 16rpx;
-  font-family: "Source Han Sans CN VF";
+  font-family: 'Source Han Sans CN VF';
   color: #999999;
-  display:flex;
+  display: flex;
   align-items: center;
 }
 /* 日期选择器 */
@@ -591,7 +649,7 @@ export default {
     box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
 
     .date-label {
-      width:250rpx;
+      width: 250rpx;
       font-size: 26rpx;
       color: #999999;
       text-align: center;
@@ -608,11 +666,11 @@ export default {
     display: flex;
     align-items: center;
     justify-content: center;
-    width: 60rpx            ;
+    width: 60rpx;
     height: 60rpx;
     border-radius: 50%;
-    background:#ffffff;
-    .icon-image{
+    background: #ffffff;
+    .icon-image {
       width: 32rpx;
       height: 32rpx;
     }
@@ -680,26 +738,26 @@ export default {
           border-radius: 50%;
           margin-right: 12rpx;
           flex-shrink: 0;
-          display:flex;
+          display: flex;
           align-items: center;
           justify-content: center;
 
           &.type-red {
-            background: linear-gradient(180deg, #FFA9A5 0%, #FF716A 100%);
+            background: linear-gradient(180deg, #ffa9a5 0%, #ff716a 100%);
           }
 
           &.type-blue {
-            background: linear-gradient(180deg, #83D2FF 0%, #09A5FC 100%);
+            background: linear-gradient(180deg, #83d2ff 0%, #09a5fc 100%);
           }
 
           &.type-yellow {
-            background: linear-gradient(180deg, #FED057 0%, #FFAF40 100%);
+            background: linear-gradient(180deg, #fed057 0%, #ffaf40 100%);
           }
 
           &.type-gray {
-            background: #DDDFE6;
+            background: #dddfe6;
           }
-          .icon-image{
+          .icon-image {
             width: 28rpx;
             height: 28rpx;
           }
@@ -716,10 +774,10 @@ export default {
         .device-type {
           font-size: 22rpx;
           color: #515153;
-          font-family: "Source Han Sans CN VF";
+          font-family: 'Source Han Sans CN VF';
           font-style: normal;
           font-weight: 400;
-          border: 2rpx solid #E4E7ED;
+          border: 2rpx solid #e4e7ed;
           padding: 2rpx 12rpx;
           border-radius: 32rpx;
           margin-left: 8rpx;
@@ -729,8 +787,8 @@ export default {
 
       .warning-level {
         position: absolute;
-        top:0;
-        right:0;
+        top: 0;
+        right: 0;
         margin-left: 12rpx;
         width: 112rpx;
         height: 48rpx;
@@ -742,13 +800,26 @@ export default {
           background-repeat: no-repeat;
           background-size: 100%;
         }
-
+        &.level-normal-gray {
+          background: url('./assets/normal-gray.png');
+          background-repeat: no-repeat;
+          background-size: 100%;
+        }
         &.level-important {
           background: url('./assets/important.png');
           background-repeat: no-repeat;
           background-size: 100%;
         }
-
+        &.level-important-gray {
+          background: url('./assets/important-gray.png');
+          background-repeat: no-repeat;
+          background-size: 100%;
+        }
+        &.level-urgent-gray {
+          background: url('./assets/urgent-gray.png');
+          background-repeat: no-repeat;
+          background-size: 100%;
+        }
         &.level-urgent {
           background: url('./assets/urgent.png');
           background-repeat: no-repeat;
@@ -790,9 +861,9 @@ export default {
       margin-top: 16rpx;
       padding-top: 16rpx;
       border-top: 1rpx solid #f0f0f0;
-      font-family: "Source Han Sans CN VF";
+      font-family: 'Source Han Sans CN VF';
       color: #999999;
-      display:flex;
+      display: flex;
       align-items: center;
     }
   }
@@ -842,4 +913,4 @@ export default {
     }
   }
 }
-</style>
+</style>