|
@ -147,10 +147,31 @@ export default {
|
147
|
147
|
// 请求失败处理...
|
148
|
148
|
})
|
149
|
149
|
this.$test
|
150
|
|
.post(services.organization.EQUIPMENT_NOT_BIND, {})
|
|
150
|
.post(services.alarm.LOAD_MAP_AREA_TOOL, {})
|
151
|
151
|
.then((res) => {
|
152
|
152
|
console.log(res)
|
153
|
|
res.data.forEach(e => {
|
|
153
|
res.data.mapAreaList.forEach(e => {
|
|
154
|
var typeObj = res.data.mapAreaTypeList.filter(type => {
|
|
155
|
return e.businessType == type.mapAreaBusinessType
|
|
156
|
})
|
|
157
|
var polygon = Ai.Polygon(e.mapAreaContent, {color: typeObj[0].color})
|
|
158
|
this.map.addLayer(polygon)
|
|
159
|
})
|
|
160
|
res.data.toolList.forEach(e => {
|
|
161
|
var typeObj = res.data.toolTypeList.filter(type => {
|
|
162
|
return e.resourceToolType == type.resourceToolType
|
|
163
|
})
|
|
164
|
var point = Ai.Point([e.latitude, e.longitude], {
|
|
165
|
icon: Ai.Icon({
|
|
166
|
// 设置图标URL路径
|
|
167
|
iconUrl: typeObj[0].iconUrl,
|
|
168
|
// 设置图标大小
|
|
169
|
iconSize: [20, 20],
|
|
170
|
// 设置点对象和图标的相对偏移量
|
|
171
|
iconAnchor: [100, 100]
|
|
172
|
})
|
|
173
|
})
|
|
174
|
this.map.addLayer(point)
|
154
|
175
|
})
|
155
|
176
|
})
|
156
|
177
|
.catch((res) => {
|