Commit b47b0a6a authored by 王晓倩's avatar 王晓倩

工单详情地图显示设备标点和管线

parent 24b5c403
......@@ -451,21 +451,21 @@ export default {
console.log(this.form)
this.active = parseInt(response.data.orderStatus) + 1;
if(this.form.deviceInfoList.length>0){
console.log("this.form.deviceInfoList",this.form.deviceInfoList)
this.gaoMap.resetMapCenter([this.form.deviceInfoList[0].longitude,this.form.deviceInfoList[0].latitude]);
}
for(var i = 0; i < this.form.deviceInfoList.length; i++){
let obj = this.form.deviceInfoList[i];
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj);
}
}
for(var i = 0; i < this.form.pipeList.length; i++){
if(this.form.pipeList.length>0) {
for (var i = 0; i < this.form.pipeList.length; i++) {
let obj = this.form.pipeList[i];
this.gaoMap.onlyLine(obj);
}
}
if(this.form.orderType == '1') {
// 获取设备列表树
......
......@@ -260,7 +260,6 @@
</div>
</div>
</div>
</div>
</template>
<script>
......@@ -443,14 +442,23 @@ export default {
getBasicsInfo (){
getBasicsInfo(this.orderId).then(response =>{
this.form = response.data;
console.log(this.form)
this.active = parseInt(response.data.orderStatus) + 1;
if(this.form.deviceInfoList.length>0){
console.log("this.form.deviceInfoList",this.form.deviceInfoList)
this.gaoMap.resetMapCenter([this.form.deviceInfoList[0].longitude,this.form.deviceInfoList[0].latitude]);
}
for(var i = 0; i < this.form.deviceInfoList.length; i++){
let obj = this.form.deviceInfoList[i];
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj)
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj);
}
}
if(this.form.pipeList.length>0) {
for (var i = 0; i < this.form.pipeList.length; i++) {
let obj = this.form.pipeList[i];
this.gaoMap.onlyLine(obj);
}
}
if(this.form.orderType == '1') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment