From b44206e6f3adba4b5f85760e4913e4214cd6a599 Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期六, 18 三月 2023 18:36:17 +0800
Subject: [PATCH] 事件总数修改

---
 src/views/intelligentPatrol/statistics/unlawful/type/index.vue |  157 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 157 insertions(+), 0 deletions(-)

diff --git a/src/views/intelligentPatrol/statistics/unlawful/type/index.vue b/src/views/intelligentPatrol/statistics/unlawful/type/index.vue
index ce894c3..4c35960 100644
--- a/src/views/intelligentPatrol/statistics/unlawful/type/index.vue
+++ b/src/views/intelligentPatrol/statistics/unlawful/type/index.vue
@@ -57,6 +57,10 @@
           <el-table-column prop="name" label="绫诲瀷鍚嶇О" min-width="10">
           </el-table-column>
           <el-table-column prop="count" label="浜嬩欢鎬绘暟" min-width="5">
+            <template slot-scope="scope">
+
+              <el-button type="text" @click="seachTotalEvents(scope.row.id)">{{scope.row.count}}</el-button>
+            </template>
           </el-table-column>
           <el-table-column prop="ratio" label="鍗犳瘮" min-width="5">
           </el-table-column>
@@ -94,16 +98,138 @@
           </el-pagination>
         </div>
       </div>
+
+      <el-dialog
+          title="浜嬩欢鎬绘暟"
+          :visible.sync="dialogVisibleEvent"
+          width="80%"
+          :before-close="handClose">
+        <el-table
+            border
+            stripe
+            ref="multipleTable"
+            :header-cell-style="{
+                        background: '#F5F5F5',
+                        'font-weight': '650',
+                        'line-height': '45px'
+                    }"
+            :data="gridData"
+            style="width: 100%"
+            :row-class-name="tableRowClassName"
+
+        >
+
+          <el-table-column
+              prop="code"
+              label="浜嬩欢缂栧彿"
+              min-width="18"
+          >
+          </el-table-column>
+          <el-table-column
+              prop="eventSource"
+              label="闂鏉ユ簮"
+              min-width="8"
+          >
+            <template slot-scope="scope">
+                            <span>{{
+                                scope.row.eventSource === 2
+                                    ? '缃戞牸宸℃煡'
+                                    : '瑙嗛宸℃煡'
+                              }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+              :prop="mystatus === 1 ? 'category' : 'category'"
+              :label="mystatus === 1 ? '澶х被鍚嶇О' : '杩濆缓绫诲埆'"
+              :min-width="mystatus === 1 ? '10' : '15'"
+          >
+          </el-table-column>
+          <el-table-column
+              :prop="mystatus === 1 ? 'type' : 'site'"
+              :label="mystatus === 1 ? '灏忕被鍚嶇О' : '杩濆缓鍦扮偣'"
+              min-width="10"
+          >
+          </el-table-column>
+          <el-table-column
+              :prop="mystatus === 1 ? 'site' : ''"
+              :label="
+                            mystatus === 1 ? '鎶ヨ鐐逛綅' : '杩濇硶寤虹瓚闀裤�佸銆侀珮'
+                        "
+              :min-width="mystatus === 1 ? '10' : '20'"
+              show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <div v-if="mystatus === 2">
+                                <span>{{
+                                    scope.row.buildingLength +
+                                    '绫�' +
+                                    '銆�' +
+                                    scope.row.buildingWidth +
+                                    '绫�' +
+                                    '銆�' +
+                                    scope.row.buildingHigh +
+                                    '绫�'
+                                  }}</span>
+              </div>
+              <div v-else>{{ scope.row.site }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column
+              :prop="mystatus === 1 ? 'street' : 'buildingArea'"
+              :label="mystatus === 1 ? '鎵�灞炲尯鍩�' : '杩濇硶寤虹瓚闈㈢Н'"
+              min-width="12"
+          >
+          </el-table-column>
+          <el-table-column
+              prop="alarmTime"
+              label="鎶ヨ鏃堕棿"
+              min-width="15"
+              v-if="mystatus === 1"
+          >
+            <template slot-scope="scope">
+              <span>{{ filterTime(scope.row.alarmTime) }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+              :prop="mystatus === 1 ? 'continueTime' : 'materials'"
+              :label="mystatus === 1 ? '鎸佺画鏃堕棿' : '杩濇硶寤虹瓚鏉愭枡'"
+              min-width="12"
+          >
+          </el-table-column>
+        </el-table>
+
+        <div >
+          <el-pagination
+              background
+              :current-page="currentPages"
+              layout="prev, pager, next"
+              :total="totalNums"
+              :page-size="pageSizes"
+              @current-change="changeCurrentPages"
+          >
+          </el-pagination>
+        </div>
+
+      </el-dialog>
     </main>
   </div>
 </template>
   <script>
 import { createNamespacedHelpers } from "vuex";
+import helper from "@/utils/mydate";
+import basecase from "@/api/operate/basecase";
 const { mapActions } = createNamespacedHelpers("statistics");
 
 export default {
   data() {
     return {
+      seachID:'',
+      dialogVisibleEvent:false,
+      mystatus:1,
+      totalNums:1,
+      pageSizes:10,
+      currentPages:1,
+      gridData:[],
       pickerOptions: {
         shortcuts: [
           {
@@ -148,7 +274,38 @@
   },
   methods: {
     ...mapActions(["searchByType"]),
+    handClose(){
+      this.dialogVisibleEvent=false
+    },
+    changeCurrentPages(page){
+      this.currentPages = page;
 
+      this.seachTotalEvents(this.seachID)
+    },
+// 澶勭悊鏃堕棿
+    filterTime(time) {
+      return helper(time);
+    },
+    seachTotalEvents(id){
+      this.seachID=id
+      this.dialogVisibleEvent =true
+      console.log(this.value2)
+      let params ={
+        type:1,
+        violationsTypeId:id,
+        current: this.currentPages,
+        size: this.pageSizes,
+      }
+      params.startTime = this.value2[0]||''
+      params.endTime = this.value2[1]||''
+      basecase.baseCasePoolList(params).then(res=>{
+        console.log(res)
+        this.gridData =res.records
+        this.pageSizes =res.size
+        this.currentPages =res.current
+        this.totalNums = res.total
+      })
+    },
     handleExport(e) {
       this.$axios({
         method: 'post',

--
Gitblit v1.8.0