From b5cbeb5685a7064e5f1697937d9bf84ac1c5994d Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Tue, 20 Jul 2021 22:37:25 +0800
Subject: [PATCH] 位置选择

---
 public/map/widgets/alertSecurity/AlertSecurity.js |   30 ++++++++++++++++++++++++++++--
 1 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/public/map/widgets/alertSecurity/AlertSecurity.js b/public/map/widgets/alertSecurity/AlertSecurity.js
index 68121dd..39ebf23 100644
--- a/public/map/widgets/alertSecurity/AlertSecurity.js
+++ b/public/map/widgets/alertSecurity/AlertSecurity.js
@@ -200,7 +200,7 @@
 
       if (baid != null && baid != "") {
         $.ajax({
-          url: "http://localhost:82/routeIn/routein/selectList?id=" + baid,
+          url: "http://s16s652780.51mypc.cn/api/routeIn/routein/selectList?id=" + baid,
           type: 'post',
           dataType: 'JSON',
           success: function (res) {
@@ -220,7 +220,33 @@
 
             }
             that.addPolygonAll(that.addEntitys, entityArr);
-            that._map.centerAndZoom(new esri.geometry.Point(entityArr[Math.ceil(entityArr.length / 2 )][0],entityArr[Math.ceil(entityArr.length / 2 )][1], new esri.SpatialReference({ wkid: 4326 })), 14);
+            that._map.centerAndZoom(new esri.geometry.Point(entityArr[Math.ceil(entityArr.length / 2)][0], entityArr[Math.ceil(entityArr.length / 2)][1], new esri.SpatialReference({wkid: 4326})), 14);
+          }
+        })
+      } else {
+        that.addPoint(that.addEntitys, lgtd, lttd, './images/jingbaored.png');
+        that.createEntitys(that.addEntitys, lgtd, lttd, './images/real-time-callPolice-opcity.png');
+        that.createTwinkleEntitys(that.addEntitys, lgtd, lttd, './images/real-time-callPolice-opcity.png');
+        // console.log(deptId,153454)
+        $.ajax({
+          url: "http://s16s652780.51mypc.cn/api/blade-user/pages?current=1&size=9999&work_status=&deptId=" + deptId,
+          type: 'get',
+          dataType: 'JSON',
+          success: function (res) {
+
+            // console.log(res.data.records, oneId)
+
+            res.data.records.forEach((item) => {
+              if (item.id == oneId) {
+                that.addPoints(that.addEntitys, item.jd, item.wd, './images/security.png')
+              }
+            });
+
+            res.data.records.forEach((item) => {
+              if (item.roleName == "处警员" && item.id != oneId) {
+                that.addPoints(that.addEntitys, item.jd, item.wd, './images/security.png')
+              }
+            });
           }
         })
       }

--
Gitblit v1.9.3