智慧保安互联网APP
shuishen
2021-10-11 b48a5f64fe196bee6f1c7eb0be1b78c9ebec0860
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];