| | |
| | | startup: function () { |
| | | |
| | | objThis._map.addLayer(objThis._siteLayer); |
| | | var that = this; |
| | | |
| | | var openid = that.getQueryStringByKey('id'); |
| | | |
| | | |
| | | $.ajax({ |
| | | url: "http://web.byisf.com/api/blade-jfpts/jingdan/jingdan/detail?id=" + openid, |
| | | type: 'get', |
| | | dataType: 'JSON', |
| | | success: function (data) { |
| | | that.addPoint(that.addEntitys, data.data.jd, data.data.wd) |
| | | } |
| | | }) |
| | | |
| | | |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | open: function () { |
| | | |
| | | var that = this; |
| | | |
| | | var openid = that.getQueryStringByKey('id'); |
| | | var lgtd = that.getQueryStringByKey('jd'); |
| | | var lttd = that.getQueryStringByKey('wd'); |
| | | var deptId = that.getQueryStringByKey('deptId'); |
| | | var oneId = that.getQueryStringByKey('oneId'); |
| | | |
| | | that.addPoint(that.addEntitys, lgtd, lttd, './images/jingbaored.png'); |
| | | |
| | | $.ajax({ |
| | | url: "https://web.byisf.com/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') |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | close: function () { |
| | |
| | | entityContent.push(item); |
| | | }, |
| | | |
| | | addPoint: function (entitys, lgtd, lttd) { |
| | | var symbol = new esri.symbol.PictureMarkerSymbol('./images/jingbaored.png', 20, 20); |
| | | addPoint: function (entitys, lgtd, lttd, img) { |
| | | var symbol = new esri.symbol.PictureMarkerSymbol(img, 33, 48); |
| | | var pt = new Point(lgtd, lttd, new SpatialReference({ |
| | | wkid: 4326 |
| | | })); |
| | | var graphic = new esri.Graphic(pt, symbol); |
| | | entitys.add(graphic); |
| | | }, |
| | | |
| | | addPoints: function (entitys, lgtd, lttd, img) { |
| | | var symbol = new esri.symbol.PictureMarkerSymbol(img, 20, 20); |
| | | var pt = new Point(lgtd, lttd, new SpatialReference({ |
| | | wkid: 4326 |
| | | })); |