From b305a75f4fc8c270886e018bb2228f8796780eab Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 25 Mar 2021 15:02:16 +0800
Subject: [PATCH] 部分文件修改,主追踪页面改动

---
 src/views/policeTracking/policeTracking.vue |   57 ++++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 42 insertions(+), 15 deletions(-)

diff --git a/src/views/policeTracking/policeTracking.vue b/src/views/policeTracking/policeTracking.vue
index 60726c5..1b64d8e 100644
--- a/src/views/policeTracking/policeTracking.vue
+++ b/src/views/policeTracking/policeTracking.vue
@@ -156,6 +156,7 @@
           </el-form>
 
           <div
+            v-if="form.jtype != 2"
             style="margin-top: 20px"
             role="tab"
             aria-expanded="true"
@@ -174,17 +175,18 @@
                 <i class="el-icon-document avue-group__icon"></i>
                 <h1 class="avue-group__title">人员信息</h1>
                 <el-button
-                  @click="onSubmit('通知保安')"
-                  type="danger"
+                  @click="onSubmit('通知' + ensureNames, 1), (flag = false)"
                   size="small"
                   style="position: absolute; right: 0"
+                  :disabled="!flag"
+                  :type="!flag ? 'info' : 'danger'"
                   >通 知</el-button
                 >
               </div>
             </div>
           </div>
 
-          <el-card>
+          <el-card v-if="form.jtype != 2">
             <el-table
               ref="multipleTable"
               :data="tableData"
@@ -193,7 +195,12 @@
               @selection-change="handleSelectionChange"
               max-height="240"
             >
-              <el-table-column v-if="false" type="selection" width="55" align="center">
+              <el-table-column
+                v-if="flag"
+                type="selection"
+                width="55"
+                align="center"
+              >
               </el-table-column>
 
               <el-table-column
@@ -463,7 +470,7 @@
           <el-row :align="center" style="margin-top: 40px">
             <el-col :offset="10">
               <el-button
-                @click="onSubmit('处理完成')"
+                @click="onSubmit('处理完成', 2)"
                 :disabled="form.jtype == 2 ? true : false"
                 :type="form.jtype == 2 ? 'info' : 'danger'"
                 >处理完成</el-button
@@ -478,7 +485,7 @@
       <iframe
         id="mapDiv"
         ref="mapDiv"
-        src="https://web.byisf.com/map/index.html?openid=ClientManagement"
+        :src="baseUrl"
         frameborder="0"
         width="100%"
         height="100%"
@@ -491,8 +498,10 @@
 import axios from "axios";
 
 export default {
+  inject: ["reload"],
   data() {
     return {
+      flag: true,
       selectOptions: [],
       receivingList: [],
       security: {
@@ -564,18 +573,26 @@
       },
       tableData: [],
       multipleSelection: [],
+      ensureNames: "",
+      baseUrl: "",
     };
   },
   created() {
     this.form = this.$route.query;
     this.getReceivingAlarm();
+    this.baseUrl = `/map/index.html?ISinit=1&openid=AlertSecurity&id=${this.form.id}&jd=${this.form.jd}&wd=${this.form.wd}`;
   },
   mounted() {
     this.getList();
+
+    this.$refs.mapDiv.onload = () => {
+      window.frames[0].init("AlertSecurity", {
+        x: this.form.jd,
+        y: this.form.wd,
+      });
+    };
   },
   updated() {
-    
-
     var arr = [];
     this.tableData.forEach((item) => {
       if (item.roleName == "管理员") {
@@ -693,7 +710,7 @@
           currenS,
       };
     },
-    onSubmit(zc) {
+    onSubmit(zc, jtype) {
       var that = this;
       axios
         .post(
@@ -702,7 +719,7 @@
           {
             params: {
               jid: this.form.id,
-              jtype: 2,
+              jtype: jtype,
               rid: this.form.alarmId,
               bz: this.form.bz,
               snumber: this.form.alarmId,
@@ -713,7 +730,9 @@
           }
         )
         .then(function (res) {
-          if (res.msg == "修改成功") {
+          that.getReceivingAlarm();
+
+          if (jtype == 2) {
             var arr = [];
             that.$store.state.tags.tagList.forEach((item) => {
               if (item.value != that.$store.state.tags.tag.value) {
@@ -723,7 +742,6 @@
             that.$store.state.tags.tagList = arr;
             that.$router.go(-1);
           }
-          that.getReceivingAlarm();
         });
     },
 
@@ -737,12 +755,10 @@
 
     getList() {
       var that = this;
-      // .post("/api/blade-jfpts/alarm/alarm/queryBa", {}, {})
       axios
-        .get("/api/blade-user/page?current=1&size=9999&deptId=&work_status=")
+        .get("/api/blade-user/pages?current=1&size=9999&deptId=&work_status=")
         .then(function (res) {
           that.tableData = [];
-          console.log(res);
           var i = 0;
           res.data.data.records.forEach((item) => {
             if (item.roleName == "处警员" || item.roleName == "管理员") {
@@ -760,6 +776,17 @@
     },
 
     handleSelectionChange(val) {
+      this.ensureNames = "";
+      val.forEach((item, index) => {
+        if (index == val.length - 1) {
+          this.ensureNames += item.name;
+          this.ensureNames += "。";
+        } else {
+          this.ensureNames += item.name;
+          this.ensureNames += "、";
+        }
+      });
+
       this.multipleSelection = val;
     },
 

--
Gitblit v1.9.3