From cae7f403bb70f6c2752bedacbceb55e6f2c79891 Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期四, 15 十二月 2022 16:06:50 +0800
Subject: [PATCH] 2022-12-15 肖辉 智能巡查--预警研判 报警信息突出可点击,修改默认不弹出

---
 src/views/intelligentPatrol/studyJudge/index.vue |  244 ++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 191 insertions(+), 53 deletions(-)

diff --git a/src/views/intelligentPatrol/studyJudge/index.vue b/src/views/intelligentPatrol/studyJudge/index.vue
index d7d3595..f10e22f 100644
--- a/src/views/intelligentPatrol/studyJudge/index.vue
+++ b/src/views/intelligentPatrol/studyJudge/index.vue
@@ -1,34 +1,47 @@
 <template>
   <div class="study-judge">
-    <div class="study-judge-header">
-      <span
-        >鎮ㄦ湁{{ countData.review }}鏉″緟瀹℃牳鎶ヨ淇℃伅,浠婃棩绔嬫{{
-          countData.register
-        }}鏉�,鍐嶅涔爗{ countData.study }}鏉�</span
-      >
-    </div>
+    <!--    <div class="study-judge-header">-->
+    <!--      <span-->
+    <!--        >鎮ㄦ湁{{ countData.review }}鏉″緟瀹℃牳鎶ヨ淇℃伅,浠婃棩绔嬫{{-->
+    <!--          countData.register-->
+    <!--        }}鏉�,鍐嶅涔爗{ countData.study }}鏉�</span-->
+    <!--      >-->
+    <!--    </div>-->
     <div class="study-judge-main">
-      <div class="sjm-header">
-        <div class="sjm-header-left">
-          <span class="moni-name">鐩戞帶鐐逛綅鍚嶇О: {{ currentEvent.name }} </span>
-          <span class="moni-area">{{ currentEvent.street }}</span>
-          <span>{{ currentEvent.address }}</span>
-        </div>
-        <div class="sjm-header-right">
-          <el-button
-            size="small"
-            @click="createVideo(currentEvent, 'playerWin')"
-            >瀹炴椂棰勮</el-button
-          >
-          <el-button
-            size="small"
-            @click="createVideo(currentEvent, 'playerWin')"
-            >褰曞儚鍥炴斁</el-button
-          >
-        </div>
-      </div>
+      <!--      <div class="sjm-header">-->
+      <!--        <div class="sjm-header-left">-->
+      <!--          <span class="moni-name">鐩戞帶鐐逛綅鍚嶇О: {{ currentEvent.name }} </span>-->
+      <!--          <span class="moni-area">{{ currentEvent.street }}</span>-->
+      <!--          <span>{{ currentEvent.address }}</span>-->
+      <!--        </div>-->
+      <!--        <div class="sjm-header-right">-->
+      <!--          <el-button size="small" @click="createVideo(currentEvent, 'live')"-->
+      <!--            >瀹炴椂棰勮</el-button-->
+      <!--          >-->
+      <!--          <el-button size="small" @click="createVideo(currentEvent, 'playback')"-->
+      <!--            >褰曞儚鍥炴斁</el-button-->
+      <!--          >-->
+      <!--        </div>-->
+      <!--      </div>-->
       <div class="sjm-content">
         <div class="sjm-content-left">
+          <!--          <div class="sjm-header-left">-->
+          <!--            <span class="moni-name">鐩戞帶鐐逛綅鍚嶇О: {{ currentEvent.name }} </span>-->
+          <!--            <span class="moni-area">{{ currentEvent.street }}</span>-->
+          <!--            <span>{{ currentEvent.address }}</span>-->
+          <!--          </div>-->
+          <span @click="openDialogTable" class="count-data-span"
+          >鎮ㄦ湁{{ countData.review }}鏉″緟瀹℃牳鎶ヨ淇℃伅,浠婃棩绔嬫{{
+              countData.register
+            }}鏉�,鍐嶅涔爗{ countData.study }}鏉�</span
+          >
+          <div class="sjm-header-left">
+            <span class="moni-name"
+              >鐩戞帶鐐逛綅鍚嶇О: {{ currentEvent.name }}
+            </span>
+            <span class="moni-area">{{ currentEvent.street }}</span>
+            <span>{{ currentEvent.address }}</span>
+          </div>
           <div
             class="img-item"
             v-for="(item, index) in imageList"
@@ -43,10 +56,49 @@
           <div class="img-item" v-for="item in imageList" :key="item.id">
             <img :src="item" />
           </div>
+          <el-form
+            ref="currentEvent"
+            label-width="120px"
+            :model="eventInfoData"
+            :rules="rules"
+            label-position="left"
+            class="left-form"
+          >
+            <el-form-item label="浜嬩欢缂栧彿:">
+              <span>{{ currentEvent.code }}</span>
+            </el-form-item>
+            <el-form-item label="浜嬩欢绛夌骇:">
+              <span>{{ currentEvent.grade }}</span>
+            </el-form-item>
+            <el-form-item label="棣栨鎶ヨ鏃堕棿:">
+              <span>{{ currentEvent.alarmTime }}</span>
+            </el-form-item>
+            <el-form-item label="鏈�杩戞姤璀︽椂闂�:">
+              <span>{{ currentEvent.currentAlarmTime }}</span>
+            </el-form-item>
+            <el-form-item label="鎸佺画鏃堕棿:">
+              <span>{{ currentEvent.conntinueTime }}</span>
+            </el-form-item>
+          </el-form>
         </div>
-        <div class="sjm-content-center">鍦板浘瀹瑰櫒</div>
+        <div class="sjm-content-center">
+          <div class="map">
+            <MyMap :point="point" :zoom="zoom" :mark="mark"></MyMap>
+          </div>
+          <!-- <iframe src="https://183.245.159.161:8282/OneMap/index.html#/OneMap?code=2&clientVersion=&skin=white&locale=zh&otherAuthor=allowable"></iframe> -->
+        </div>
         <div class="sjm-content-right">
           <div class="card-box">
+            <div class="but-live">
+              <el-button size="small" @click="createVideo(currentEvent, 'live')"
+                >瀹炴椂棰勮</el-button
+              >
+              <el-button
+                size="small"
+                @click="createVideo(currentEvent, 'playback')"
+                >褰曞儚鍥炴斁</el-button
+              >
+            </div>
             <div class="card-header">
               <span>鎶ヨ璁板綍--{{ currentEvent.algoName }}</span>
             </div>
@@ -56,21 +108,21 @@
               :model="eventInfoData"
               :rules="rules"
             >
-              <el-form-item label="浜嬩欢缂栧彿:">
-                <span>{{ currentEvent.code }}</span>
-              </el-form-item>
-              <el-form-item label="浜嬩欢绛夌骇:">
-                <span>{{ currentEvent.grade }}</span>
-              </el-form-item>
-              <el-form-item label="棣栨鎶ヨ鏃堕棿:">
-                <span>{{ currentEvent.alarmTime }}</span>
-              </el-form-item>
-              <el-form-item label="鏈�杩戞姤璀︽椂闂�:">
-                <span>{{ currentEvent.currentAlarmTime }}</span>
-              </el-form-item>
-              <el-form-item label="鎸佺画鏃堕棿:">
-                <span>{{ currentEvent.conntinueTime }}</span>
-              </el-form-item>
+              <!--              <el-form-item label="浜嬩欢缂栧彿:">-->
+              <!--                <span>{{ currentEvent.code }}</span>-->
+              <!--              </el-form-item>-->
+              <!--              <el-form-item label="浜嬩欢绛夌骇:">-->
+              <!--                <span>{{ currentEvent.grade }}</span>-->
+              <!--              </el-form-item>-->
+              <!--              <el-form-item label="棣栨鎶ヨ鏃堕棿:">-->
+              <!--                <span>{{ currentEvent.alarmTime }}</span>-->
+              <!--              </el-form-item>-->
+              <!--              <el-form-item label="鏈�杩戞姤璀︽椂闂�:">-->
+              <!--                <span>{{ currentEvent.currentAlarmTime }}</span>-->
+              <!--              </el-form-item>-->
+              <!--              <el-form-item label="鎸佺画鏃堕棿:">-->
+              <!--                <span>{{ currentEvent.conntinueTime }}</span>-->
+              <!--              </el-form-item>-->
               <el-form-item label="鍏宠仈搴楅摵" prop="store">
                 <el-select
                   v-model="eventInfoData.store"
@@ -169,13 +221,15 @@
     <el-dialog
       :visible.sync="dialogCreate"
       title="鏌ョ湅瑙嗛"
-      width="80%"
       v-show="dialogCreate"
       :before-close="handleClose2"
     >
       <div class="dom" style="width: 100%; height: 600px; position: relative">
         <div id="dom1" class="dom1"></div>
       </div>
+    </el-dialog>
+    <el-dialog :visible.sync="isShowTable" title="鎶ヨ淇℃伅" width="1200px">
+      <inspection-table/>
     </el-dialog>
   </div>
 </template>
@@ -187,9 +241,11 @@
 import { FILE_ORIGINAL_URL } from "@/utils";
 import { validateCarNum } from "@/utils/validate";
 import MyDispatch from "@/components/dispatch";
+import InspectionTable from "@/views/intelligentPatrol/studyJudge/inspectionTable/index.vue";
+import MyMap from "@/components/map";
 
 export default {
-  components: { MyDispatch },
+  components: { MyDispatch, MyMap,InspectionTable },
   created() {
     this.getInspectionData();
     this.initEventParams();
@@ -222,6 +278,11 @@
       })
       .catch((err) => this.$message.error(err));
   },
+  mounted() {
+    this.timer = setInterval(() => {
+      setTimeout(this.getInspectionData, 0);
+    }, 1000 * 10);
+  },
   data() {
     const validateCarNumber = (rule, value, callback) => {
       if (value) {
@@ -235,6 +296,8 @@
       }
     };
     return {
+      isShowTable:false,
+      timer: null,
       countData: {
         study: 0,
         review: 0,
@@ -304,9 +367,16 @@
       crtHeight: 600,
       domId: "dom1",
       ctrl: "ctrl1",
+      playType: "live",
+      point: null,
+      mark: null,
+      zoom: null,
     };
   },
   methods: {
+    openDialogTable(){
+      this.isShowTable = true
+    },
     pageChange(type) {
       if (type === "next") {
         this.currentPage += 1;
@@ -321,6 +391,12 @@
         .getInspectionData({ current: this.currentPage })
         .then(({ records }) => {
           this.currentEvent = records[0];
+          this.point = {
+            x: this.currentEvent.longitude,
+            y: this.currentEvent.latitude,
+          };
+          this.zoom = 19;
+          this.mark = { title: this.currentEvent.address };
           if (this.currentEvent?.picData) {
             this.imageList = this.currentEvent.picData
               .split(",")
@@ -450,6 +526,7 @@
       });
     },
     createVideo(item, ctrlType) {
+      this.playType = ctrlType;
       const DHWsInstance = DHWs.getInstance();
       this.ws = DHWsInstance;
       console.log(this.ws);
@@ -465,10 +542,10 @@
         const params = [
           {
             // ctrlType: "realMonitorUI",
-            ctrlType: ctrlType,
+            ctrlType: "playerWin",
             ctrlCode: this.ctrl,
             ctrlProperty: {
-              displayMode: 1,
+              displayMode: ctrlType == "playback" ? 2 : 1,
               splitNum: 1,
               channelList: [{ channelId: item.videoCode }],
             },
@@ -477,6 +554,11 @@
           },
         ];
         this.setPos();
+
+        // _this.ws.on("createCtrlResult", (res) => {
+        //   console.warn(res);
+        // });
+
         _this.ws
           .createCtrl(params)
           .then((res) => {
@@ -486,12 +568,30 @@
           .catch((e) => {
             console.log("error;", e);
           });
-        _this.ws.on("createCtrlResult", (res) => {
-          console.warn(res);
-        });
+
+        if (ctrlType == "playback") {
+          const end = new Date();
+          const start = new Date();
+          start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
+
+          let beginTime = _this.formatDate(start);
+          let endTime = _this.formatDate(end);
+          const params = [
+            {
+              ctrlCode: this.ctrl,
+              array: [
+                {
+                  beginTime: beginTime,
+                  endTime: endTime,
+                  channelId: item.videoCode,
+                },
+              ],
+            },
+          ];
+          _this.ws.openCtrlRecord(params);
+        }
       }, 1000);
     },
-
     destroy() {
       // 璋冪敤閿�姣佹帶浠舵帴鍙�
       if (!this.isLogin) {
@@ -520,6 +620,27 @@
         window.fireEvent("onresize");
       }
     },
+
+    // 鏃堕棿鎴宠浆 yyyy-MM-dd HH:mm:ss
+    formatDate(inputTime) {
+      var date = new Date(inputTime);
+      var y = date.getFullYear();
+      var m = date.getMonth() + 1;
+      m = m < 10 ? "0" + m : m;
+      var d = date.getDate();
+      d = d < 10 ? "0" + d : d;
+      var h = date.getHours();
+      h = h < 10 ? "0" + h : h;
+      var minute = date.getMinutes();
+      var second = date.getSeconds();
+      minute = minute < 10 ? "0" + minute : minute;
+      second = second < 10 ? "0" + second : second;
+      return y + "-" + m + "-" + d + " " + h + ":" + minute + ":" + second;
+    },
+  },
+  beforeDestroy() {
+    clearInterval(this.timer);
+    this.timer = null;
   },
 };
 </script>
@@ -568,11 +689,17 @@
 
       .sjm-content-left {
         line-height: 4.8vh;
+        .count-data-span{
+          cursor: pointer;
+          color: blue;
+        }
+        .left-form > ::v-deep.el-form-item__label {
+          font-size: 16px !important;
 
+        }
         .img-item {
           display: flex;
           flex-direction: column;
-
           img {
             width: 15vw;
             height: 20vh;
@@ -583,9 +710,15 @@
           margin-top: 2vh;
         }
       }
-
+      .sjm-content-center {
+        width: calc(100% - 920px);
+      }
       .sjm-content-right {
         .card-box {
+          .but-live {
+            padding-left: 48px;
+            line-height: 4.8vh;
+          }
           .card-header {
             padding-left: 48px;
             line-height: 4.8vh;
@@ -597,7 +730,7 @@
 
   .el-form {
     ::v-deep .el-form-item {
-      margin-bottom: 5px;
+      margin-bottom: 15px;
     }
 
     ::v-deep .el-form-item__label {
@@ -609,4 +742,9 @@
     color: #4b9bb7;
   }
 }
+
+.map {
+  height: 100%;
+  min-width: 460px;
+}
 </style>

--
Gitblit v1.8.0