From b48a5f64fe196bee6f1c7eb0be1b78c9ebec0860 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 11 Oct 2021 08:44:27 +0800
Subject: [PATCH] 修改完善

---
 mapWz/js/vueMain.js |   30 +++++++++++++++++++++++++++---
 1 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/mapWz/js/vueMain.js b/mapWz/js/vueMain.js
index ab33475..2d50583 100644
--- a/mapWz/js/vueMain.js
+++ b/mapWz/js/vueMain.js
@@ -1,8 +1,8 @@
 /*
  * @Author: Morpheus 
  * @Date: 2021-08-26 16:22:11 
- * @Last Modified by:   Morpheus 
- * @Last Modified time: 2021-08-26 16:22:11 
+ * @Last Modified by: Morpheus
+ * @Last Modified time: 2021-08-28 15:03:25
  */
 var me = new Vue({
     el: '#mapVue',
@@ -43,7 +43,25 @@
 
             this.userId = this.GetQueryString('userid')
 
-            axios.get('http://223.82.109.183:2080/api/blade-user/pages?dispatch=0&jurisdiction=' + jurisdictionId + '&current=1&size=999999').then((res) => {
+            var deptid = this.GetQueryString('deptid')
+
+            var roleName = this.GetQueryChinese('roleName')
+
+            console.log(roleName)
+
+            var url = ''
+
+            if (roleName == '保安公司管理员') { 
+
+                url = 'http://223.82.109.183:2080/api/blade-user/pages?&current=1&size=999999&deptId=' + deptid
+
+            } else {
+
+                url = 'http://223.82.109.183:2080/api/blade-user/pages?dispatch=0&jurisdiction=' + jurisdictionId + '&current=1&size=999999'
+
+            }
+
+            axios.get(url).then((res) => {
 
                 if (res.data.data.records.length > 0) {
                     res.data.data.records.forEach(item => {
@@ -68,6 +86,12 @@
             if (r != null) return unescape(r[2]);
             return null;
         },
+        GetQueryChinese(name) {
+            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
+            var r = window.location.search.substr(1).match(reg);
+            if (r != null) return decodeURI(r[2]);
+            return null;
+        },
         beginMap(map, data) {
             var that = this,
                 center = [28.708432053474827, 115.85883507433789];

--
Gitblit v1.9.3