From c2f95b0b9090a2394b5b068582b932a5e57b86aa Mon Sep 17 00:00:00 2001
From: zmc <zmc_li@foxmail.com>
Date: 星期二, 05 九月 2023 18:19:37 +0800
Subject: [PATCH] 雷达图 新增综合风险排名 数据接入配置

---
 src/views/exception/FlightInspection.vue |   93 ++++++++++++++++++++++++++++++++++++----------
 1 files changed, 72 insertions(+), 21 deletions(-)

diff --git a/src/views/exception/FlightInspection.vue b/src/views/exception/FlightInspection.vue
index dd60dfe..b4d4d3c 100644
--- a/src/views/exception/FlightInspection.vue
+++ b/src/views/exception/FlightInspection.vue
@@ -12,12 +12,12 @@
 const DustLineChart = defineAsyncComponent(() =>
   import('./components/DustLineChart.vue')
 );
-
+import exceptionApi from '@/api/exceptionApi.js';
 import dayjs from 'dayjs';
 export default {
   components: {
     ExceptionType,
-    InputSearch,
+    // InputSearch,
     TimeSelectWithShortCuts,
     DustExceptionText,
     DustLineChart,
@@ -42,15 +42,17 @@
       displayData: [],
       // 琛ㄦ牸楂樺害
       tableHeight: 400,
-      // 琛ㄦ牸鏁版嵁
+      // 琛ㄦ牸鏄剧ず
+      isTableShow:false,
       // 褰撳墠椤�
       currentPage: 1,
       // 姣忛〉鏉℃暟
       pageSize: 20,
+      // 琛ㄦ牸鐨勬�昏褰曟暟
       total: 0,
   
       // 琛ㄦ牸鏌ヨ鏃犳暟鎹椂
-      isNoData: false,
+      // isNoData: false,
       // 瀵硅瘽妗嗘樉绀�
       dialogTableVisible: false,
       // 淇濆瓨寮傚父瀵瑰簲鐨勫簵閾哄悕绉板拰璁惧缂栧彿
@@ -86,8 +88,6 @@
       // 绔欑偣鎬绘暟閲�
       siteTotal: 0,
 
-      // 寮傚父鐨勭珯鐐规�绘暟閲�
-      // exceptionSiteNum:0,
 
       // 閫変腑琛ㄦ牸褰撳墠琛岀殑鏁版嵁
       tableCurrentRowData: null,
@@ -129,8 +129,9 @@
         banTouch:0,
         // 0浠h〃鍒嗛〉锛�1浠h〃涓嶅垎椤�
         originClick:0
-      }
-
+      },
+      // 鏉′欢鏌ヨ瀵硅瘽妗�
+      conditionDialogVisible:false
     };
   },
   setup() {
@@ -185,10 +186,17 @@
     this.backExceptionDataAWeekAgo();
     // 鏌ヨ鏃堕棿娈电殑鍚勫紓甯哥殑绔欑偣锛屾煡璇㈣鏃堕棿鍖洪棿鐨勫悇寮傚父鏁伴噺
     this.getShopNames();
- 
+    this.getSiteNume()
   },
 
   methods: {
+   // 鏀惧洖绔欑偣鎬绘暟閲�
+    getSiteNume(){
+      exceptionApi.getSitesNum().then(res => {
+      this.siteTotal = res.data.data.length
+    })
+    
+    },
 
     /**
      * description锛氱偣鍑诲紓甯哥珯鐐瑰悕瀛楁椂 杩斿洖鐨勬暟鎹�
@@ -1098,15 +1106,18 @@
           this.displayData = response.data.data.rows;
           this.loading.queryButton = false
           this.loading.tableLoading = false;
+
           if (response.data.data.total == 0) {
             ElMessage('璇ユ椂娈垫棤鏁版嵁');
-            this.isNoData = true;
+            this.isTableShow = false
             return;
           }
+          this.isTableShow = true
           this.total = response.data.data.total;
           // 绉婚櫎绌烘暟鎹姸鎬�
-          this.isNoData = false;
         });
+
+      this.conditionDialogVisible = false
     },
 
     /**
@@ -1134,9 +1145,10 @@
 
           if (response.data.data.total == 0) {
             ElMessage('璇ユ椂娈垫棤鏁版嵁');
-            this.isNoData = true;
+            this.isTableShow = false
             return;
           }
+          this.isTableShow = true
           this.total = response.data.data.total;
           this.loading.tableLoading = false;
         });
@@ -1205,7 +1217,16 @@
 </script>
 
 <template>
- 
+ <el-button type="primary" @click="conditionDialogVisible = true">
+    鎼滅储鏉′欢
+  </el-button>
+
+  <el-dialog
+    v-model="conditionDialogVisible"
+    title="Tips"
+    width="30%"
+    class="condition-dialog"
+  >
   <el-row ref="h1">
     <el-col>
       <el-form :inline="true">
@@ -1213,24 +1234,27 @@
           <el-form-item >
           <AreaAndmonitorType ></AreaAndmonitorType>
           </el-form-item>
-          <el-form-item>
+
+          <!-- <el-form-item>
             <InputSearch
               isNeedDefaultSite="0"
               @submit-value="(n) => (form.name = n)"
               @submit-site-Nums="(n) => (siteTotal = n)"
             >
             </InputSearch>
-          </el-form-item>
+          </el-form-item> -->
 
+          <el-form-item>
+            <TimeSelectWithShortCuts timeType="day" @submit-time="giveTime" ></TimeSelectWithShortCuts>
+          </el-form-item>
+          
           <el-form-item>
             <ExceptionType
               @submit-value="(n) => form.exceptionName = n"
             ></ExceptionType>
           </el-form-item>
 
-          <el-form-item>
-            <TimeSelectWithShortCuts @submit-time="giveTime"></TimeSelectWithShortCuts>
-          </el-form-item>
+      
         </div>
 
         <div class="head-container-search">
@@ -1242,6 +1266,24 @@
       </el-form>
     </el-col>
   </el-row>
+  
+
+<!-- 
+    <template #footer>
+
+      <span class="dialog-footer">
+        <el-button @click="dialogVisible = false">Cancel</el-button>
+        <el-button type="primary" @click="dialogVisible = false">
+          Confirm
+        </el-button>
+      </span>
+    </template> -->
+  </el-dialog>
+
+
+
+
+
 
   <el-row class="head-describtion-text" ref="h2">
     <el-row>
@@ -1859,8 +1901,8 @@
     </el-col>
   </el-row>
 
-  <el-row>
-    <el-col v-show="!isNoData">
+  <el-row v-show="isTableShow">
+    <el-col >
       <el-table
         ref="table"
         :data="displayData"
@@ -1954,7 +1996,6 @@
     </el-col>
   </el-row>
 
-  <el-empty v-show="isNoData" :image-size="200" />
 
   <el-dialog v-model="dialogTableVisible" draggable align-center height="300px">
     <!-- 澶� -->
@@ -2097,9 +2138,19 @@
 </template>
 
 <style lang="scss" scoped>
+
 .el-row {
   margin-left: 10px;
 }
+/* 涓嬫媺鑿滃崟寮�濮� */
+.example-showcase .el-dropdown-link {
+  cursor: pointer;
+  color: var(--el-color-primary);
+  display: flex;
+  align-items: center;
+}
+
+/* 涓嬫媺鑿滃崟缁撴潫 */
 
 /* 鏉′欢鏌ヨ妯″潡鐨勬牱寮� */
 .head-container-search {

--
Gitblit v1.9.3