From 82541a55189fc3e611391ba5ff4342dbe57598dd Mon Sep 17 00:00:00 2001
From: zmc <zmc_li@foxmail.com>
Date: 星期三, 22 十一月 2023 14:39:55 +0800
Subject: [PATCH] 1.用import异常图标 2.修改飞行巡检的时间格式 3.修改了部分网络请求为api函数形式

---
 src/views/exception/components/CompFlightInspection.vue |  129 +++++++++++-------------------------------
 1 files changed, 35 insertions(+), 94 deletions(-)

diff --git a/src/views/exception/components/FlightInspection1.vue b/src/views/exception/components/CompFlightInspection.vue
similarity index 92%
rename from src/views/exception/components/FlightInspection1.vue
rename to src/views/exception/components/CompFlightInspection.vue
index 95b4991..e435d7f 100644
--- a/src/views/exception/components/FlightInspection1.vue
+++ b/src/views/exception/components/CompFlightInspection.vue
@@ -5,6 +5,7 @@
 import AreaAndmonitorType from '@/sfc/AreaAndmonitorType.vue'
 import ButtonClick from '@/sfc/ButtonClick.vue'
 import index from '@/utils/exception_common_function/index.js'
+
 //  寮傚父鍥惧舰寮傛缁勪欢
 const DustLineChart = defineAsyncComponent(() =>  import('@/views/exception/components/DustLineChart.vue'))
 import exceptionApi from '@/api/exceptionApi.js'
@@ -17,6 +18,14 @@
 import time from '@/utils/time.js'
 import lineChart from '@/utils/chartFunction/lineChart.js'
 import exceptionOption from '@/utils/chartFunction/exceptionOption.js'
+import exception0 from '@/assets/exception/exception0.png'
+import exception1 from '@/assets/exception/exception1.png'
+import exception2 from '@/assets/exception/exception2.png'
+import exception3 from '@/assets/exception/exception3.png'
+import exception4 from '@/assets/exception/exception4.png'
+import exception5 from '@/assets/exception/exception5.png'
+import exception6 from '@/assets/exception/exception6.png'
+import exception7 from '@/assets/exception/exception7.png'
 export default {
   props: {
     // 鐐逛綅鍚嶅瓧
@@ -219,8 +228,8 @@
         this.getShopNames()
     },
     month(){
-        this.beginTime = dayjs(this.month).startOf('month')
-        this.endTime = dayjs(this.month).endOf('month')
+        this.beginTime = dayjs(this.month).startOf('month').format('YYYY-MM-DD HH:mm:ss')
+        this.endTime = dayjs(this.month).endOf('month').format('YYYY-MM-DD HH:mm:ss')
         this.backExceptionDataAWeekAgo()
         this.getShopNames()
     }
@@ -277,7 +286,7 @@
           siteName: this.exception.exception4,
           exceptionType: '4',
           exceptionName: '閲忕骇绐佸彉',
-          iconSrc: '../../../assets/exception/exception4.png',
+          iconSrc: exception4,
           siteNum: this.exception.exception4.length,
           exceptionNum: this.exception.exception4Num,
           isNoDataStatus: this.isNoData.exception4,
@@ -287,17 +296,27 @@
           siteName: this.exception.exception5,
           exceptionType: '5',
           exceptionName: '涓磋繎瓒呮爣寮傚父',
-          iconSrc: '@/assets/exception/exception5.png',
+          iconSrc: exception5,
           siteNum: this.exception.exception5.length,
           exceptionNum: this.exception.exception5Num,
           isNoDataStatus: this.isNoData.exception5,
           span: 5
         },
         {
+          siteName: this.exception.exception8,
+          exceptionType: '8',
+          exceptionName: '鏈夋晥鐜囧紓甯�',
+          iconSrc: exception0,
+          siteNum: this.exception.exception8.length,
+          exceptionNum: this.exception.exception8Num,
+          isNoDataStatus: this.isNoData.exception8,
+          span: 5
+        },
+        {
           siteName: this.exception.exception6,
           exceptionType: '6',
           exceptionName: '鍗曟棩瓒呮爣娆℃暟涓寸晫寮傚父',
-          iconSrc: '@/assets/exception/exception6.png',
+          iconSrc: exception6,
           siteNum: this.exception.exception6.length,
           exceptionNum: this.exception.exception6Num,
           isNoDataStatus: this.isNoData.exception6,
@@ -308,27 +327,27 @@
           siteName: this.exception.exception7,
           exceptionType: '7',
           exceptionName: '鍙樺寲瓒嬪娍寮傚父',
-          iconSrc: '@/assets/exception/exception7.png',
+          iconSrc: exception7,
           siteNum: this.exception.exception7.length,
           exceptionNum: this.exception.exception7Num,
           isNoDataStatus: this.isNoData.exception7,
-          span: 5
+          span: 4
         },
         {
           siteName: this.exception.exception0,
           exceptionType: '0',
           exceptionName: '鏁版嵁缂哄け寮傚父',
-          iconSrc: '@/assets/exception/exception0.png',
+          iconSrc: exception0,
           siteNum: this.exception.exception0.length,
           exceptionNum: this.exception.exception0Num,
           isNoDataStatus: this.isNoData.exception0,
-          span: 4
+          span: 6
         },
         {
           siteName: this.exception.exception1,
           exceptionType: '1',
           exceptionName: '鏁版嵁瓒呬綆',
-          iconSrc: '@/assets/exception/exception1.png',
+          iconSrc: exception1,
           siteNum: this.exception.exception1.length,
           exceptionNum: this.exception.exception1Num,
           isNoDataStatus: this.isNoData.exception1,
@@ -338,7 +357,7 @@
           siteName: this.exception.exception2,
           exceptionType: '2',
           exceptionName: '瓒呮爣',
-          iconSrc: '@/assets/exception/exception2.png',
+          iconSrc: exception2,
           siteNum: this.exception.exception2.length,
           exceptionNum: this.exception.exception2Num,
           isNoDataStatus: this.isNoData.exception2,
@@ -348,92 +367,17 @@
           siteName: this.exception.exception3,
           exceptionType: '3',
           exceptionName: '鏁版嵁闀挎椂娈垫棤娉㈠姩',
-          iconSrc: '@/assets/exception/exception3.png',
+          iconSrc: exception3,
           siteNum: this.exception.exception3.length,
           exceptionNum: this.exception.exception3Num,
           isNoDataStatus: this.isNoData.exception3,
           span: 6
-        },
-        {
-          siteName: this.exception.exception8,
-          exceptionType: '8',
-          exceptionName: '鏈夋晥鐜囧紓甯�',
-          iconSrc: '@/assets/exception/exception3.png',
-          siteNum: this.exception.exception8.length,
-          exceptionNum: this.exception.exception8Num,
-          isNoDataStatus: this.isNoData.exception8,
-          span: 6
         }
       ]
     },
-    cardRow2() {
-      return [
-        {
-          siteName: this.exception.exception7,
-          exceptionType: '7',
-          exceptionName: '鍙樺寲瓒嬪娍寮傚父',
-          iconSrc: '@/assets/exception/exception7.png',
-          siteNum: this.exception.exception7.length,
-          exceptionNum: this.exception.exception7Num,
-          isNoDataStatus: this.isNoData.exception7
-        },
-        {
-          siteName: this.exception.exception0,
-          exceptionType: '0',
-          exceptionName: '鏁版嵁缂哄け寮傚父',
-          iconSrc: '@/assets/exception/exception0.png',
-          siteNum: this.exception.exception0.length,
-          exceptionNum: this.exception.exception0Num,
-          isNoDataStatus: this.isNoData.exception0
-        },
-        {
-          siteName: this.exception.exception1,
-          exceptionType: '1',
-          exceptionName: '鏁版嵁瓒呬綆',
-          iconSrc: '@/assets/exception/exception1.png',
-          siteNum: this.exception.exception1.length,
-          exceptionNum: this.exception.exception1Num,
-          isNoDataStatus: this.isNoData.exception1
-        }
-      ]
-    },
-    cardRow3() {
-      return [
-        {
-          siteName: this.exception.exception2,
-          exceptionType: '2',
-          exceptionName: '瓒呮爣',
-          iconSrc: '@/assets/exception/exception2.png',
-          siteNum: this.exception.exception2.length,
-          exceptionNum: this.exception.exception2Num,
-          isNoDataStatus: this.isNoData.exception2
-        },
-        {
-          siteName: this.exception.exception3,
-          exceptionType: '3',
-          exceptionName: '鏁版嵁闀挎椂娈垫棤娉㈠姩',
-          iconSrc: '@/assets/exception/exception3.png',
-          siteNum: this.exception.exception3.length,
-          exceptionNum: this.exception.exception3Num,
-          isNoDataStatus: this.isNoData.exception3
-        },
-        {
-          siteName: this.exception.exception8,
-          exceptionType: '8',
-          exceptionName: '鏈夋晥鐜囧紓甯�',
-          iconSrc: '@/assets/exception/exception3.png',
-          siteNum: this.exception.exception8.length,
-          exceptionNum: this.exception.exception8Num,
-          isNoDataStatus: this.isNoData.exception8
-        }
-      ]
-    }
   },
   mounted() {
-    // this.backExceptionDataAWeekAgo()
-    // 鏌ヨ鏃堕棿娈电殑鍚勫紓甯哥殑绔欑偣锛屾煡璇㈣鏃堕棿鍖洪棿鐨勫悇寮傚父鏁伴噺
 
-    // this.getShopNames()
     this.getSiteNume()
   },
 
@@ -916,9 +860,6 @@
       if (this.siteName) {
         params['siteName'] = this.siteName
       }
-      if (this.form.exceptionName.length != 0) {
-        params['exceptionType'] = this.form.exceptionName.join()
-      }
       if (this.form.street.length != 0) {
         params['street'] = this.form.street.join()
       }
@@ -955,22 +896,22 @@
       if (this.siteName) {
         params['siteName'] = this.siteName
       }
-      if (this.form.exceptionName) {
-        params['exceptionType'] = this.form.exceptionName
-      }
+
       params['beginTime'] = this.beginTime
       params['endTime'] = this.endTime
-
+      console.log('name',this.siteName)
       this.$http.get('/dust/exceptiondata', { params: params }).then((response) => {
         // 淇濆瓨杩斿洖鐨�
         // this.tableData = response.data.data.rows;
         this.displayData = response.data.data.rows
         this.loading.tableLoading = false
+
         if (response.data.data.total == 0) {
           ElMessage('璇ユ椂娈垫棤鏁版嵁')
           this.isTableShow = false
           return
         }
+
         this.isTableShow = true
         this.total = response.data.data.total
       })

--
Gitblit v1.9.3