From 23bdcca2b8a90286c45926fd0978b08fa304fbb4 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sat, 08 May 2021 18:24:54 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/jfpt-Vue

---
 src/views/policeTracking/policeTracking.vue |   37 +++++++++++++++++++++++++++++++------
 1 files changed, 31 insertions(+), 6 deletions(-)

diff --git a/src/views/policeTracking/policeTracking.vue b/src/views/policeTracking/policeTracking.vue
index 434c630..619bfae 100644
--- a/src/views/policeTracking/policeTracking.vue
+++ b/src/views/policeTracking/policeTracking.vue
@@ -585,6 +585,16 @@
   },
   created() {
     this.form = this.$route.query;
+    if (
+      !(
+        this.form.securityArr &&
+        this.form.securityArr != null &&
+        this.form.securityArr != undefined &&
+        this.form.securityArr.length > 0
+      )
+    ) {
+      this.form.securityArr = [];
+    }
     this.updatedPageData();
     this.vaddress = this.form.vaddress;
     this.getReceivingAlarm();
@@ -594,7 +604,7 @@
     this.getAudios();
     this.getImgAndVideo();
     this.$refs.mapDiv.onload = () => {
-      window.frames[0].init("AlertSecurity", {
+      window.frames[1].init("AlertSecurity", {
         x: this.form.jd,
         y: this.form.wd,
       });
@@ -730,7 +740,7 @@
         bz: this.form.bz,
         snumber: this.form.alarmId,
         sname: this.form.alarmPeople,
-        deviceNumber:this.form.deviceNumber,
+        deviceNumber: this.form.deviceNumber,
         zc: zc,
         zctime: this.getDate().current,
       };
@@ -762,7 +772,7 @@
 
     getList() {
       var that = this;
-      var deptid = that.form.deptId.slice(0,19);//报错deptId格式不对liu.2021.5.7
+      var deptid = that.form.deptId.slice(0, 19); //报错deptId格式不对liu.2021.5.7
       axios
         .get(
           `/api/blade-user/pages?current=1&size=9999&work_status=&deptId=${deptid}`
@@ -770,8 +780,13 @@
         .then(function (res) {
           that.tableData = [];
           var i = 0;
-
-          if (that.form.securityArr.length > 0) {
+          console.log(that.form, 89);
+          if (
+            that.form.securityArr &&
+            that.form.securityArr != null &&
+            that.form.securityArr != undefined &&
+            that.form.securityArr.length > 0
+          ) {
             res.data.data.records.forEach((item) => {
               if (item.id == that.form.securityId) {
                 that.tableData.push({
@@ -937,7 +952,17 @@
         },
       }).then(function (res) {
         that.form = res.data.data.records[0];
-        that.getList();//报错deptId格式不对liu.2021.5.7
+        if (
+          !(
+            that.form.securityArr &&
+            that.form.securityArr != null &&
+            that.form.securityArr != undefined &&
+            that.form.securityArr.length > 0
+          )
+        ) {
+          that.form.securityArr = [];
+        }
+        that.getList(); //报错deptId格式不对liu.2021.5.7
       });
     },
   },

--
Gitblit v1.9.3