From 8aa3edd56c279100c9053576f3e90fa55459fe77 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Mon, 16 Jan 2023 16:15:55 +0800
Subject: [PATCH] 修改

---
 src/page/index/logo.vue |  110 ++++++++++++++++++++++++-------------------------------
 1 files changed, 48 insertions(+), 62 deletions(-)

diff --git a/src/page/index/logo.vue b/src/page/index/logo.vue
index 6216cf7..c53f978 100644
--- a/src/page/index/logo.vue
+++ b/src/page/index/logo.vue
@@ -2,7 +2,8 @@
   <div class="avue-logo">
     <transition name="fade">
       <span v-if="keyCollapse" class="avue-logo_subtitle" key="0">
-        {{ website.logo }}
+<!--        {{ website.logo }}-->
+        <i class="icon-anbao"></i>
       </span>
     </transition>
     <transition-group name="fade">
@@ -193,7 +194,7 @@
               <el-form-item>
                 <el-button
                   type="success"
-                  @click.stop="updateJtyep(form, 1, '办结')"
+                  @click.stop="updateJtyep(form, 2, '办结')"
                   >办结
                 </el-button>
 
@@ -347,71 +348,52 @@
     };
   },
   created() {
-    // this.getData();
     this.websocketStart();
   },
   computed: {
     ...mapGetters(["website", "keyCollapse"]),
   },
   methods: {
-    // getData() {
-    //   var that = this;
-    //   axios({
-    //     url: "/api/blade-jfpts/alarm/alarm/getLimit",
-    //     method: "get",
-    //   }).then(function (response) {
-    //     if (response.data.data.length > 0) {
-    //       that.deviceId = response.data.data[0].id;
-    //     } else {
-    //       that.deviceId = 0;
-    //     }
-    //     //获得最新ID,开启实时报警循环
-    //     that.layerRealtime();
-    //   });
-    // },
     layerRealtime(jid) {
       var that = this;
-      // window.clearTimeout(window.realTimeQuery);
-      // that.deviceId = 334; // 测试用
-      // window.realTimeQuery = setInterval(function () {
-        axios({
-          url: "/api/blade-jfpts/alarm/alarm/selecttx?id=" + jid,
-          method: "post",
-        }).then(function (response) {
-          var userId = JSON.parse(
-            window.localStorage.getItem("物联网安保云服务平台-userInfo")
-          ).content.user_id;
+      axios({
+        url: "/api/blade-jfpts/alarm/alarm/page",
+        method: "get",
+        params: {
+          id: jid,
+        },
+      }).then(function (response) {
+        var userId = JSON.parse(
+          window.localStorage.getItem("物联网安保云服务平台-userInfo")
+        ).content.user_id;
 
-          if (response.data.data.length > 0) {
-            // that.deviceId = response.data.data[0].id;
-            that.form = response.data.data[0];
+        if (response.data.data.records.length > 0) {
+          that.form = response.data.data.records[0];
+          if (
+            response.data.data.records[0].waringType == "紧急求救" &&
+            response.data.data.records[0].alarmId == userId
+          ) {
+            response.data.data.records[0].waringType = "一键求助";
 
-            if (
-              response.data.data[0].waringType == "紧急求救" &&
-              response.data.data[0].alarmId == userId
-            ) {
-              response.data.data[0].waringType = "一键求助";
+            that.peopleList = [
+              { label: that.form.oneContacts, value: that.form.onePhone },
+              { label: that.form.twoContacts, value: that.form.twoPhone },
+              { label: that.form.threeContacts, value: that.form.threePhone },
+            ];
+            that.peopleName = that.form.oneContacts;
+            that.peoplePhone = that.form.onePhone;
+            that.dialogTableVisible = true;
 
-              that.peopleList = [
-                { label: that.form.oneContacts, value: that.form.onePhone },
-                { label: that.form.twoContacts, value: that.form.twoPhone },
-                { label: that.form.threeContacts, value: that.form.threePhone },
-              ];
-              that.peopleName = that.form.oneContacts;
-              that.peoplePhone = that.form.onePhone;
-              that.dialogTableVisible = true;
+            that.ofX = null;
+            that.ofY = null;
 
-              that.ofX = null;
-              that.ofY = null;
+            window.addEventListener("mousemove", that.handleMousemove);
 
-              window.addEventListener("mousemove", that.handleMousemove);
-
-              that.$refs.realAudio.src = "./realVideo/audio.mp3";
-              that.$refs.realAudio.play();
-            }
+            that.$refs.realAudio.src = "./realVideo/audio.mp3";
+            that.$refs.realAudio.play();
           }
-        });
-      // }, 5000);
+        }
+      });
     },
     closeDialog() {
       //关闭窗口回调,关闭警报
@@ -556,10 +538,14 @@
             },
           }).then((resdata) => {});
 
-          that.$router.push({
-            path: "/policeTracking/track",
-            query: that.form,
-          });
+          if (t == "办结") {
+            location.reload();
+          } else {
+            that.$router.push({
+              path: "/policeTracking/track",
+              query: that.form,
+            });
+          }
         });
     },
     beginTimeOrEndTime(time) {
@@ -756,7 +742,6 @@
               jid: that.form.id,
             },
           }).then((resdata) => {
-            console.log(resdata);
           });
 
           newCallAxios
@@ -808,10 +793,10 @@
       }
       if (window.WebSocket) {
         // https
-        //window.socket = new WebSocket("wss://web.byisf.com/wss/websocket/");
+        window.socket = new WebSocket("wss://web.byisf.com/wss/websocket/");
 
         //http
-         window.socket = new WebSocket("ws://localhost:9034/websocket");
+        //window.socket = new WebSocket("ws://localhost:9034/websocket");
 
         window.socket.onmessage = function (event) {
           // alert(event.data)
@@ -825,6 +810,7 @@
           //执行重连
           that.websocketStart();
         };
+
       } else {
         console.log("WebSocket连接没有建立成功!!");
       }
@@ -853,13 +839,13 @@
               //执行重连
               that.websocketStart();
             }
-          }, 10000);
+          }, 4000);
         } else {
           console.log("WebSocket连接没有建立成功!!");
           //执行重连
           that.websocketStart();
         }
-      }, 3000);
+      }, 1000);
     },
 
     onDialogTableVisible() {

--
Gitblit v1.9.3