From 90ee0a2139d541cfd5ea6cfa2ee179cee90352a7 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Wed, 03 Mar 2021 09:12:29 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/security/security.vue |   55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 54 insertions(+), 1 deletions(-)

diff --git a/src/views/security/security.vue b/src/views/security/security.vue
index 735662e..ff5efda 100644
--- a/src/views/security/security.vue
+++ b/src/views/security/security.vue
@@ -27,7 +27,50 @@
                    @click="handleDelete">删 除
         </el-button>
       </template>
+	  <template slot="menuLeft">
+	    <el-button
+	      type="danger"
+	      size="small"
+	      icon="el-icon-delete"
+	      plain
+	      v-if="permission.real_delete"
+	      @click="handleDelete"
+	    >删 除
+	    </el-button>
+	  </template>
+
+	  <template slot-scope="{ row }" slot="jtype">
+	    <el-tag>{{
+	      row.jtype == "0" ? "否" : row.jtype == "1" ? "是" : "无"
+	      }}
+	    </el-tag>
+	  </template>
+
+	  <template slot-scope="{ type, size, row }" slot="menu">
+	    <el-button
+	      icon="el-icon-location-outline"
+	      :size="size"
+	      :type="type"
+	      @click.stop="handleMap(row)"
+	    >定位
+	    </el-button>
+	  </template>
     </avue-crud>
+
+    <el-drawer
+      title="电子地图"
+      append-to-body="true"
+      :visible.sync="showMap"
+    >
+      <iframe
+        id="mapDiv"
+        ref="mapDiv"
+        src="/map/index.html?openid=APoliceTeam"
+        frameborder="0"
+        width="100%"
+        height="100%"
+      ></iframe>
+    </el-drawer>
   </basic-container>
 </template>
 
@@ -41,6 +84,7 @@
         form: {},
         query: {},
         loading: true,
+        showMap: false,
         page: {
           pageSize: 10,
           currentPage: 1,
@@ -198,6 +242,16 @@
             });
           });
       },
+      handleMap(row) {
+        debugger
+        this.showMap = true;
+        this.$nextTick(() => {
+          this.$refs.mapDiv.onload = () => {
+            window.frames[0].init(null,{x: row.jd, y: row.wd});
+            
+          };
+        })
+      },
       handleDelete() {
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");
@@ -267,4 +321,3 @@
     }
   };
 </script>
-

--
Gitblit v1.9.3