From a61623f7887a78170e5ab91d1fbf7929ce0e82fd Mon Sep 17 00:00:00 2001
From: zmc <zmc_li@foxmail.com>
Date: 星期四, 02 十一月 2023 11:40:44 +0800
Subject: [PATCH] “去掉点击站点时页面上的搜索框和排名清单”

---
 src/api/index.js                                     |    7 -
 src/main.js                                          |    4 
 src/views/line_graph/components/subRiskModel.vue     |  122 +++++++---------------------------------
 src/views/line_graph/SiteComprehensiveRskRanking.vue |    5 +
 src/router/index.js                                  |    4 
 5 files changed, 31 insertions(+), 111 deletions(-)

diff --git a/src/api/index.js b/src/api/index.js
index f6fa644..41cd230 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -1,12 +1,9 @@
 import axios from 'axios';
 import { setInterceptors } from './config';
 
-
-
-
-const url = 'http://localhost:8081/';
+// const url = 'http://localhost:8081/';
 // 閮ㄧ讲
-// const url = 'http://114.215.109.124:8803/';
+const url = 'http://114.215.109.124:8803/';
 
 //椋炵窘鐩戠
 const $http = axios.create({
diff --git a/src/main.js b/src/main.js
index d8d9357..04920ab 100644
--- a/src/main.js
+++ b/src/main.js
@@ -34,9 +34,9 @@
 
 
 // 鏈湴
-axios.defaults.baseURL = 'http://localhost:8081'
+// axios.defaults.baseURL = 'http://localhost:8081'
 // 閮ㄧ讲
-// axios.defaults.baseURL = 'http://114.215.109.124:8803'
+axios.defaults.baseURL = 'http://114.215.109.124:8803'
 app.config.globalProperties.$http = axios
 
 app.use(ElMessage)
diff --git a/src/router/index.js b/src/router/index.js
index 7e37fcc..7dcc63b 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -116,7 +116,7 @@
             {
               path: "/detail/:siteName/:month",
               name: 'detail',
-              meta: { title: '绔欑偣鍏蜂綋淇℃伅' },
+              meta: { title: '绔欑偣鍏蜂綋淇℃伅',transition: 'slide-left' },
               component: () => import('@/views/line_graph/components/SiteDetail.vue')
             },
 
@@ -124,7 +124,7 @@
             {
               path: "/subRiskModel",
               name: 'subRiskModel',
-              meta: { title: '椋庨櫓妯″瀷宓屽叆 ' },
+              meta: { title: '椋庨櫓妯″瀷宓屽叆' },
               component: () => import('@/views/line_graph/components/subRiskModel.vue')
             },
 
diff --git a/src/views/line_graph/SiteComprehensiveRskRanking.vue b/src/views/line_graph/SiteComprehensiveRskRanking.vue
index e0c2597..7a7d908 100644
--- a/src/views/line_graph/SiteComprehensiveRskRanking.vue
+++ b/src/views/line_graph/SiteComprehensiveRskRanking.vue
@@ -195,7 +195,10 @@
       }
     },
     openDetail(row){
-      this.$router.push(`/detail/${row.siteName}/${this.form.month}`)
+      const encodedSiteName = encodeURIComponent(row.siteName);
+      this.$router.push(`/detail/${encodedSiteName}/${this.form.month}`)
+
+      // this.$router.push(`/detail/${row.siteName}/${this.form.month}`)
     }
   }
 }
diff --git a/src/views/line_graph/components/subRiskModel.vue b/src/views/line_graph/components/subRiskModel.vue
index 35c691f..65cdc96 100644
--- a/src/views/line_graph/components/subRiskModel.vue
+++ b/src/views/line_graph/components/subRiskModel.vue
@@ -5,7 +5,7 @@
 -->
 
 <script>
-  import InputSearch from '@/sfc/InputSearch.vue'
+  // import InputSearch from '@/sfc/InputSearch.vue'
   import AreaAndmonitorType from '@/sfc/AreaAndmonitorType.vue'
   import DustRadarChart from '@/views/line_graph/components/DustRadarChart.vue'
   import exceptionApi from '@/api/exceptionApi.js'
@@ -28,7 +28,7 @@
     components: {
       LineChart,
       // DateSelectWithShortCuts,
-      InputSearch,
+      // InputSearch,
       AreaAndmonitorType,
       DustRadarChart,
       ButtonClick,
@@ -105,8 +105,7 @@
           this.form.endTime = dayjs(this.month).endOf('month').format('YYYY-MM-DD HH:mm:ss')
 
           this.parentDataFlag = true
-          // 鏇存柊鎺掓竻鍗�
-          this.getRiskRank()
+
           // 鏇存柊缁熻鏁版嵁
           this.getAnalysisData()
           // 璁$畻椋庨櫓鍊�
@@ -225,6 +224,7 @@
         if (this.form.endTime) {
           params['endTime'] = this.form.endTime
         }
+        this.screenLoading= true
         this.loading = true
         this.queryButton = true
         exceptionApi
@@ -239,9 +239,10 @@
             }
             this.begin = this.chartData[0].lst
             this.end = this.chartData[this.chartData.length - 1].lst
-  
+            
             // 绉婚櫎绌烘暟鎹姸鎬�
             this.isNoData = false
+            this.screenLoading= false
             this.setChart()
             //  鎶樼嚎鍥炬暟鎹�
             let temp = index.calBillData(this.chartData, this.begin, this.end)
@@ -308,47 +309,6 @@
         }
       },
   
-      // 寰楀埌鍓�10椋庨櫓鎺掑悕娓呭崟
-      async getRiskRank() {
-        this.screenLoading = true
-        let staticsData = await exceptionApi.analysisdataByType(this.month, 'month')
-  
-        let exceptionData = await exceptionApi.exceptiondata1({
-          siteName: '',
-          beginTime: this.form.beginTime,
-          endTime: this.form.endTime
-        })
-  
-        const riskValueSites = index.merge(
-          staticsData.data.data,
-          exceptionData.data.data,
-          this.form.beginTime,
-          this.form.endTime
-        )
-        this.top_10_sites_with_risk_values = this.getTopRiskData(riskValueSites, 10)
-        
-        if (this.top_10_sites_with_risk_values.length != 0) {
-          // 琛ㄦ牸鎸夐闄╁�煎�掑彊鎺掑垪
-          this.$nextTick(() => {
-            this.$refs.table.sort('riskValue', 'descending')
-          })
-          this.screenLoading = false
-          // Promise
-          return this.top_10_sites_with_risk_values[0].siteName
-        }
-        this.screenLoading = false
-      },
-  
-      /**
-       * 闄嶅簭鎺掑垪锛岃繑鍥為檷搴忓墠num鐨勫厓绱�
-       * @param锛� 瀵硅薄鏁扮粍锛岃繑鍥炵殑鏁伴噺
-       */
-      getTopRiskData(arr, num) {
-        // 鎸夌収riskValue闄嶅簭鎺掑垪
-        arr.sort((a, b) => b.riskValue - a.riskValue)
-        // 鑾峰彇鍓峮um涓厓绱�
-        return arr.slice(0, num)
-      }
     }
   }
   </script>
@@ -358,33 +318,29 @@
       <el-form-item class="form-item">
         <AreaAndmonitorType></AreaAndmonitorType>
       </el-form-item>
-      <el-form-item class="form-item">
-        <!-- <InputSearch isNeedDefaultSite="1" @submit-value="(n) => (form.name = n)" :siteName="form.name"></InputSearch> -->
+
+      <!-- <el-form-item class="form-item">
         <InputSearch
           :site-name="form.name"
           isNeedDefaultSite="0"
           @submit-value="(n) => (form.name = n)"
         ></InputSearch>
-      </el-form-item>
+      </el-form-item> -->
   
       <!-- <el-form-item>
-          <DateSelectWithShortCuts @submit-time="giveTime"></DateSelectWithShortCuts>
-        </el-form-item> -->
-  
-      <el-form-item>
         <MonthSelect :month="this.month_1" @submit-value="giveMonth"></MonthSelect>
-      </el-form-item>
+      </el-form-item> -->
   
-      <el-form-item>
+      <!-- <el-form-item>
         <ButtonClick
           content="椋庨櫓璇勪及"
           type="primary"
           :loading="queryButton"
           @do-search="riskAssessment"
         ></ButtonClick>
-      </el-form-item>
+      </el-form-item> -->
     </el-form>
-  
+    
     <div v-loading="screenLoading" class="wait-name">
       <div class="chart-container" v-show="!isNoData && !screenLoading">
         <div class="time-text">
@@ -393,47 +349,9 @@
         </div>
   
         <el-row :gutter="10">
-          <el-col :span="5">
-            <el-card shadow="never" class="table-class">
-              <el-table
-                ref="table"
-                highlight-current-row="true"
-                :data="top_10_sites_with_risk_values"
-                :default-sort="{ prop: 'riskValue', order: 'descending' }"
-                height="540"
-              >
-                <el-table-column
-                  type="index"
-                  label="搴忓彿"
-                  :index="indexMethod"
-                  fixed
-                  width="25"
-                  show-overflow-tooltip
-                />
-                <el-table-column prop="siteName" label="绔欑偣鍚嶇О" show-overflow-tooltip />
-                <el-table-column
-                  prop="riskValue"
-                  label="椋庨櫓鍊�"
-                  sortable
-                  width="67"
-                  show-overflow-tooltip
-                />
-                <el-table-column label="鎿嶄綔" align="center">
-                  <template #default="{ row }">
-                    <el-button
-                      type="primary"
-                      text
-                      class="table-button"
-                      @click="querySiteStaticsInfo(row)"
-                      >椋庨櫓璇︽儏</el-button
-                    >
-                  </template>
-                </el-table-column>
-              </el-table>
-            </el-card>
-          </el-col>
+
   
-          <el-col :span="12">
+          <el-col :span="14">
             <el-card shadow="never">
               <DustRadarChart
                 :name="[
@@ -454,7 +372,7 @@
             </el-card>
           </el-col>
   
-          <el-col :span="3">
+          <el-col :span="5">
             <el-card shadow="never" class="card-height">
               <template #header>
                 <h1
@@ -497,7 +415,7 @@
             </el-card>
           </el-col>
   
-          <el-col :span="4">
+          <el-col :span="5">
             <el-card shadow="never" class="card-height">
               <template #header><span class="title-16">椋庨櫓璇︽儏</span></template>
   
@@ -564,7 +482,9 @@
     margin-left: 10px;
   }
   .time-text {
-    letter-spacing: 2px;
+    font-size: 14px;
+    color: #333333;
+    letter-spacing: 1px;
   }
   .el-card {
     margin-top: 15px;
@@ -657,7 +577,7 @@
     border-radius: 0px;
   }
   .site-name {
-    margin-left: 120px;
+    margin-left: 20px;
   }
   </style>
   
\ No newline at end of file

--
Gitblit v1.9.3