From 72085226bc9f82a9129b8fbcd17fab1edf9ef270 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 05 一月 2024 15:08:19 +0800
Subject: [PATCH] 1. 修复飞行巡检模块中有效率异常详情弹出框无法正常显示的bug; 2.优化各异常类型的折线图配置项生成逻辑;

---
 src/views/data_management/HistoryData.vue |   90 ++++++++++++++++++++++++++++----------------
 1 files changed, 57 insertions(+), 33 deletions(-)

diff --git a/src/views/data_management/HistoryData.vue b/src/views/data_management/HistoryData.vue
index 19f4f5d..df6f031 100644
--- a/src/views/data_management/HistoryData.vue
+++ b/src/views/data_management/HistoryData.vue
@@ -1,8 +1,8 @@
 <script>
-import TimeSelectWithShortCuts from '@/sfc/TimeSelectWithShortCuts.vue';
+import TimeShortCuts from '@/sfc/TimeShortCuts.vue';
 import ScenarioType from '@/sfc/ScenarioType.vue';
 import InputSearch from '@/sfc/InputSearch.vue';
-
+import { ElMessage } from 'element-plus'
 import AreaAndmonitorType from '@/sfc/AreaAndmonitorType.vue'
 
 import { useCommonFunction } from '../../utils/common.js';
@@ -13,7 +13,7 @@
 
 export default {
   components: {
-    TimeSelectWithShortCuts,
+    TimeShortCuts,
     ScenarioType,
     InputSearch,
     ButtonClick,
@@ -32,6 +32,8 @@
         // 缁撴潫鏃堕棿
         endTime: ''
       },
+      // 鎼滅储妗嗕紶閫掍笂鏉ョ殑璁惧缂栧彿
+      tempMnCode :'',
       // 杩斿洖鐨勬暟鎹�
       tableData: [],
       // 琛ㄦ牸鏁版嵁
@@ -50,7 +52,9 @@
       // 宸查�変腑鐨勫満鏅被鍨�
       scenarioType: [],
       // 琛ㄦ牸楂樺害
-      tableHeight: '500'
+      tableHeight: '500',
+      // 绔欑偣鎬绘暟閲�
+      siteNums:0
     };
   },
   setup() {
@@ -128,7 +132,6 @@
 
     // 椤靛彿鏀瑰彉鏃惰Е鍙�
     handleCurrentChange(val) {
-      console.log('褰撳墠椤典负锛�', val);
       // 灏嗗綋鍓嶉〉鍙风粰currentPage
       this.currentPage = val;
 
@@ -142,10 +145,7 @@
 
     // 鏌ヨ鏁版嵁
     handleSubmit() {
-      // if (this.isExceedOneMonth(this.form.beginTime, this.form.endTime)) {
-      //   alert('鏃堕棿璺ㄥ害涓嶈兘瓒呰繃涓�涓湀');
-      //   return;
-      // }
+
       this.loading = true;
       this.queryButton = true
       let params = {};
@@ -162,7 +162,6 @@
       if (this.scenarioType.length != 0) {
         params['scenarioType'] = this.scenarioType.join();
       }
-
       this.$http.get('/dust/history1', { params: params }).then((response) => {
         // 淇濆瓨杩斿洖鐨�
         this.tableData = response.data.data.rows;
@@ -195,14 +194,14 @@
         // 淇濆瓨杩斿洖鐨�
         this.tableData = response.data.data.rows;
         this.displayData = this.tableData;
-
+        this.loading = false;
         if (response.data.data.total == 0) {
           ElMessage('璇ユ椂娈垫棤鏁版嵁');
           this.isNoData = true;
           return;
         }
         this.total = response.data.data.total;
-        this.loading = false;
+       
       });
     }
   }
@@ -210,6 +209,7 @@
 </script>
 
 <template>
+  <div class="history-container"> 
   <el-row>
     <el-col ref="h1" class="head-row">
       <el-card>
@@ -217,46 +217,55 @@
           <div class="demo-form-inline">
             <el-row>
               <el-col>
-
                 <el-form-item>
                   <AreaAndmonitorType></AreaAndmonitorType>
                 </el-form-item>
+
                 <el-form-item>
-                  <template #label> </template>
-                  <InputSearch isNeedDefaultSite="1" @submit-value="(n) => (form.name = n)">
+                  <InputSearch isNeedDefaultSite="1" @submit-value="(n) => (form.name = n)" @submit-site-nums="(n)=>(siteNums=n)">
                   </InputSearch>
                 </el-form-item>
+                
                 <el-form-item>
                   <template #label>
                     <span class="font-label">璁惧缂栧彿:</span>
                   </template>
                   <el-input v-model="form.number" clearable placeholder="璇疯緭鍏�"></el-input>
                 </el-form-item>
+              </el-col>
+
+              <el-col> 
                 <el-form-item>
+                <TimeShortCuts time-type="week"  @submit-time="giveTime"></TimeShortCuts>
+              </el-form-item>
+
+              <el-form-item>
                   <ScenarioType @submitScenarioType="(val) => (scenarioType = val)">
                   </ScenarioType>
                 </el-form-item>
+
               </el-col>
-              <el-form-item>
-                <TimeSelectWithShortCuts @submit-time="giveTime"></TimeSelectWithShortCuts>
-              </el-form-item>
+
+              
             </el-row>
           </div>
           <div class="button-and-export">
             <el-form-item>
-              <!-- <el-button
-                type="primary"
-                @click="handleSubmit"
-                style="margin-left: 10px"
-                ><el-icon style="margin-right: 6px;font-size: 1.2em;"><i-ep-Search/></el-icon>鏌ヨ</el-button
-              >
-              <el-button type="success" @click="exportDom" round><el-icon style="margin-right: 6px;margin-bottom:2px;font-size: 1.2em;"><i-ep-Download ></i-ep-Download></el-icon>瀵煎嚭鏁版嵁</el-button> -->
+              <el-tag class="ml-2" type="success" size="large">绔欑偣鎬绘暟</el-tag>
+              <span class="tag-text">{{ siteNums }}</span>
+            </el-form-item>
+            
+            <el-form-item>
               <ButtonClick style="margin-right: 12px;" content="鎼滅储" type="primary" :loading="queryButton" @do-search="handleSubmit"></ButtonClick>
               <ButtonExportExcel  content="瀵煎嚭鏁版嵁" type="success" :loading="exportButton" @do-export="exportDom"></ButtonExportExcel>
             </el-form-item>
           </div>
         </el-form>
+           
       </el-card>
+    </el-col>
+    <el-col>
+     
     </el-col>
   </el-row>
 
@@ -267,12 +276,12 @@
         v-loading="loading">
         <!--缁戝畾涓�涓柟娉曪紝灏嗚繑鍥炲�艰祴缁檌ndex,鍗宠〃鏍兼瘡琛屾暟鎹殑涓嬫爣-->
         <el-table-column type="index" label="搴忓彿" align="center" fixed :index="indexMethod"></el-table-column>
-        <el-table-column prop="name" label="绔欑偣鍚嶇О" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="name" label="鐐逛綅鍚嶇О" show-overflow-tooltip></el-table-column>
         <el-table-column prop="address" label="鍦板潃" align="center" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="dutyCompany" label="渚涘簲鍟�" align="center" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="mnCode" label="璁惧缂栧彿" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="dutyCompany" label="杩愮淮鍟�" align="center" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="mnCode" label="璁惧缂栫爜" show-overflow-tooltip></el-table-column>
         <el-table-column prop="typeName" label="绫诲瀷" align="center" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="dustValue" label="鎵皹娴撳害(mg/m鲁)" align="center" sortable
+        <el-table-column prop="dustValue" label="TSP(mg/m鲁)" align="center" sortable
           show-overflow-tooltip></el-table-column>
         <el-table-column prop="noiseValue" label="鍣0(dB)" align="center" sortable show-overflow-tooltip></el-table-column>
         <el-table-column prop="lst" label="閲囬泦鏃堕棿" sortable align="center" show-overflow-tooltip></el-table-column>
@@ -291,10 +300,14 @@
     <el-empty v-show="isNoData" :image-size="200" />
 
   </el-row>
+</div>
 </template>
 
-<style lang="scss" scoped>
-// 鏁翠綋宸﹀杈硅窛
+<style  scoped>
+.history-container {
+  min-width: 1200px;
+}
+/* // 鏁翠綋宸﹀杈硅窛 */
 .el-row {
   margin-left: 10px;
 }
@@ -310,6 +323,8 @@
 .font-label {
   margin-top: 3px;
   font-weight: bold;
+  font-size: 14px;
+  color: #333333;
 }
 
 .demo-form-inline {
@@ -318,11 +333,20 @@
 
 .button-and-export {
   display: flex;
-  justify-content: flex-end;
+  /* justify-content: flex-end; */
+  justify-content: space-between;
   /* 浠庤灏句綅缃紑濮嬫帓鍒� */
 }
 
+.el-table {
+  /* color: #303133 */
+  color: rgb(59, 60, 63)
+}
 .el-pagination {
-  margin: 10px 0px;
+  margin: 10px 10px;
+}
+.tag-text{
+  margin-left: 10px;
+  font-size: 14px;
 }
 </style>

--
Gitblit v1.9.3