From 628d3b4f2ddb24bfcaddf89a1da15010d3199870 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 31 Oct 2022 15:30:46 +0800
Subject: [PATCH] 1

---
 src/views/home/components/rightContainer.vue |   57 ++++++++++++++++++++++++++++++++++-----------------------
 1 files changed, 34 insertions(+), 23 deletions(-)

diff --git a/src/views/home/components/rightContainer.vue b/src/views/home/components/rightContainer.vue
index 6fcfc27..ecb5969 100644
--- a/src/views/home/components/rightContainer.vue
+++ b/src/views/home/components/rightContainer.vue
@@ -4,16 +4,9 @@
             <div class="title">
                 <i></i> 案件统计
                 <div class="timer">
-                    <el-date-picker
-                        v-model="eventTime"
-                        type="daterange"
-                        align="right"
-                        unlink-panels
-                        range-separator="至"
-                        start-placeholder="开始日期"
-                        end-placeholder="结束日期"
-                        :picker-options="pickerOptions"
-                    ></el-date-picker>
+                    <el-date-picker v-model="eventTime" type="daterange" align="right" unlink-panels range-separator="至"
+                        start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
+                    </el-date-picker>
                 </div>
             </div>
 
@@ -23,19 +16,15 @@
             <div class="title">
                 <i></i>
                 <span style="margin-right:130px">安保活动</span>
-                <span class="activity" :class="{choosed:acttype==0}" @click="actTabClick(0)">正在进行</span>
+                <span class="activity" :class="{ choosed: acttype == 0 }" @click="actTabClick(0)">正在进行</span>
                 <span>/</span>
-                <span class="activity" :class="{choosed:acttype==1}" @click="actTabClick(1)">历史活动</span>
+                <span class="activity" :class="{ choosed: acttype == 1 }" @click="actTabClick(1)">历史活动</span>
             </div>
             <div id="peopleList" class="echarts-box">
-                <el-table
-                    :data="acttype == 0 ? underwayArr : historyArr"
-                    style="width: 100%"
-                    :header-cell-style="{'text-align':'center','background-color':'#203c60','borderColor':'#324e75'}"
-                    :cell-style="{'text-align':'center','borderColor':'#324e75'}"
-                    :row-class-name="tableRowClassName"
-                    ref="activityTable"
-                >
+                <el-table :data="acttype == 0 ? underwayArr : historyArr" style="width: 100%"
+                    :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
+                    :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }"
+                    :row-class-name="tableRowClassName" ref="activityTable">
                     <el-table-column prop="activityName" label="活动名称" width="100"></el-table-column>
                     <el-table-column prop="startTime" label="开始时间" width="100"></el-table-column>
                     <el-table-column prop="endTime" label="结束时间" width="100"></el-table-column>
@@ -46,7 +35,7 @@
         <div class="crowd-box">
             <div class="title">
                 <i></i> 现有设备
-                <span class="regionTotal">{{regionTotal}}个</span>
+                <span class="regionTotal">{{ regionTotal }}个</span>
             </div>
             <div id="EquipmentEcharts" class="echarts-box"></div>
         </div>
@@ -500,6 +489,21 @@
 
 
 
+    },
+
+    destroyed () {
+        if (!equipmentmyChart) {
+            return
+        }
+        if (!eventchangemychart) {
+            return
+        }
+
+        equipmentmyChart.dispose()
+        eventchangemychart.dispose()
+
+        equipmentmyChart = null
+        eventchangemychart = null
     }
 }
 </script>
@@ -509,6 +513,7 @@
     position: relative;
     height: 100%;
     width: 100%;
+
     .case-box {
         height: 30%;
     }
@@ -522,6 +527,7 @@
             overflow-y: auto;
         }
     }
+
     .case-box,
     .alert-box,
     .crowd-box {
@@ -547,11 +553,13 @@
                 background: #43bafe;
                 box-shadow: 0px 0px 8px 2px #43bafe;
             }
+
             .timer {
                 width: 250px;
                 height: 30px;
                 float: right;
             }
+
             .regionTotal {
                 color: #fff;
                 font-size: 22px;
@@ -559,14 +567,17 @@
                 margin-left: 50%;
                 letter-spacing: 1px;
             }
+
             .activity {
                 font-size: 16px;
                 color: rgb(98, 95, 95);
                 cursor: pointer;
             }
+
             .activity:hover {
                 text-decoration: underline;
             }
+
             .choosed {
                 color: #fff;
             }
@@ -588,7 +599,7 @@
                 border: 1px solid rgba(20, 50, 123, 1);
                 cursor: pointer;
 
-                & > div {
+                &>div {
                     height: 26px;
                     line-height: 26px;
                 }
@@ -603,7 +614,7 @@
             flex: 1;
         }
 
-        .sub-tab + .echarts-box {
+        .sub-tab+.echarts-box {
             margin-top: 10px;
         }
 

--
Gitblit v1.9.3