Commit 293c9264 authored by yaqizhang's avatar yaqizhang

详情地图图标

parent 80e3bedd
...@@ -697,12 +697,25 @@ export default { ...@@ -697,12 +697,25 @@ export default {
} }
if(this.form.deviceList != null){ if(this.form.deviceList != null){
console.log(this.form.deviceList,"oooooooooooo")
let device = this.form.deviceList[0]; let device = this.form.deviceList[0];
console.log("device", device); console.log("device", device);
this.dataListdetail.push(device); this.dataListdetail.push(device);
let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER,[device.longitude, device.latitude],"containerAlarm"); let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER,[device.longitude, device.latitude],"containerAlarm");
this.gaoMap = gaoMap; this.gaoMap = gaoMap;
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, device); if("1" == device.deviceType){
this.gaoMap.addMarker(DEVICE_TYPE.REGEULATORBOX, device,"false")
}
if("2" == device.deviceType){
this.gaoMap.addMarker(DEVICE_TYPE.VALUEWELL, device,"false")
}
if("3" == device.deviceType){
this.gaoMap.addMarker(DEVICE_TYPE.FLOWMETER, device,"false")
}
if("4" == device.deviceType){
this.gaoMap.addMarker(DEVICE_TYPE.PRESSUREGAGE, device,"false")
}
// this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, device);
// this.gaoMap.resetMapCenter([device.longitude, device.latitude]); // this.gaoMap.resetMapCenter([device.longitude, device.latitude]);
} }
......
...@@ -587,18 +587,20 @@ ...@@ -587,18 +587,20 @@
this.active = parseInt(response.data.orderStatus) + 1; this.active = parseInt(response.data.orderStatus) + 1;
let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER,[this.form.longitude, this.form.latitude]); let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER,[this.form.longitude, this.form.latitude]);
this.gaoMap = gaoMap; this.gaoMap = gaoMap;
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, this.form) if("1" == deviceType){
// this.gaoMap.resetMapCenter([this.form.longitude, this.form.latitude]); this.gaoMap.addMarker(DEVICE_TYPE.REGEULATORBOX, this.form,"false")
console.log("this.form.longitude",this.form.longitude) }
console.log("this.form", this.form) if("2" == deviceType){
this.gaoMap.addMarker(DEVICE_TYPE.VALUEWELL, this.form,"false")
// if (this.form.length > 0) { }
if("3" == deviceType){
// } this.gaoMap.addMarker(DEVICE_TYPE.FLOWMETER, this.form,"false")
// for (var i = 0; i < this.form.length; i++) { }
// let obj = this.form[i]; if("4" == deviceType){
// this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj) this.gaoMap.addMarker(DEVICE_TYPE.PRESSUREGAGE, this.form,"false")
// } }
var getData1 = []; var getData1 = [];
var getData2 = []; var getData2 = [];
......
...@@ -315,7 +315,19 @@ ...@@ -315,7 +315,19 @@
// this.gaoMap.resetMapCenter([this.form.longitude, this.form.latitude]);let obj = this.form.deviceList[0]; // this.gaoMap.resetMapCenter([this.form.longitude, this.form.latitude]);let obj = this.form.deviceList[0];
let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, [obj.longitude, obj.latitude]); let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, [obj.longitude, obj.latitude]);
this.gaoMap = gaoMap; this.gaoMap = gaoMap;
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, this.form) if("1" == obj.deviceType){
this.gaoMap.addMarker(DEVICE_TYPE.REGEULATORBOX, obj,"false")
}
if("2" == obj.deviceType){
this.gaoMap.addMarker(DEVICE_TYPE.VALUEWELL, obj,"false")
}
if("3" == obj.deviceType){
this.gaoMap.addMarker(DEVICE_TYPE.FLOWMETER, obj,"false")
}
if("4" == obj.deviceType){
this.gaoMap.addMarker(DEVICE_TYPE.PRESSUREGAGE, obj,"false")
}
// this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, this.form)
}); });
}, },
getFileInfo(res) { getFileInfo(res) {
......
...@@ -124,7 +124,8 @@ ...@@ -124,7 +124,8 @@
<!--&lt;!&ndash; <font>{{form.orderId}}</font> &ndash;&gt;--> <!--&lt;!&ndash; <font>{{form.orderId}}</font> &ndash;&gt;-->
<template slot-scope="scope"> <template slot-scope="scope">
<font v-if="resourceId != undefined">{{form.orderId}}</font> <font v-if="resourceId != undefined">{{form.orderId}}</font>
<el-button type="text" @click="showDetail(form.orderId)" v-if="resourceId == undefined">{{form.orderId}}</el-button> <el-button type="text" @click="showDetail(form.orderId)" v-if="resourceId == undefined">
{{form.orderId}}</el-button>
</template> </template>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -136,7 +137,8 @@ ...@@ -136,7 +137,8 @@
</div> </div>
<!-- <el-divider></el-divider> --> <!-- <el-divider></el-divider> -->
<div class="" style="width: 95%; height: 60px;margin-left: 50px;text-align: center;margin-top: 15px;" v-if="form.planStatus == 0"> <div class="" style="width: 95%; height: 60px;margin-left: 50px;text-align: center;margin-top: 15px;"
v-if="form.planStatus == 0">
<el-button size="normal" type="primary" icon="el-icon-edit" @click="handleIssue(form.planId)" <el-button size="normal" type="primary" icon="el-icon-edit" @click="handleIssue(form.planId)"
v-hasPermi="['workOrder:basicsInfo:add']">生成工单 v-hasPermi="['workOrder:basicsInfo:add']">生成工单
</el-button> </el-button>
...@@ -210,14 +212,9 @@ ...@@ -210,14 +212,9 @@
</div> </div>
</div> </div>
<el-dialog <el-dialog title="工单信息" lock-scroll :visible.sync="dialogVisible" width="70%">
title = "工单信息"
lock-scroll
:visible.sync="dialogVisible"
width="70%"
>
<div style="height:80vh;overflow:auto"> <div style="height:80vh;overflow:auto">
<workOrder :linkOrderId="form.orderId"/> <workOrder :linkOrderId="form.orderId" />
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
...@@ -235,7 +232,7 @@ ...@@ -235,7 +232,7 @@
import workOrder from "../../workOrder/detail/index.vue" import workOrder from "../../workOrder/detail/index.vue"
export default { export default {
props:["resourceId"], props: ["resourceId"],
name: "InspectionPlanDetail", name: "InspectionPlanDetail",
components: { components: {
workOrder workOrder
...@@ -342,9 +339,9 @@ ...@@ -342,9 +339,9 @@
// 如果是跳转来的,则接受初始化参数 // 如果是跳转来的,则接受初始化参数
// this.user_id = this.$route.query.id; //详细信息页接收参数 // this.user_id = this.$route.query.id; //详细信息页接收参数
this.getList(); this.getList();
if(this.resourceId){ if (this.resourceId) {
this.planId = this.resourceId; this.planId = this.resourceId;
}else{ } else {
this.planId = this.$route.query.planId; this.planId = this.$route.query.planId;
} }
// this.getDetail(); // this.getDetail();
...@@ -380,34 +377,55 @@ ...@@ -380,34 +377,55 @@
this.form = response.data; this.form = response.data;
console.log("this.form", this.form) console.log("this.form", this.form)
this.active = parseInt(response.data.orderStatus) + 1; this.active = parseInt(response.data.orderStatus) + 1;
if (this.form.deviceList?.length > 0) { const deviceNum = this.form?.deviceList?.length;
const pipeNum = this.form?.pipeList?.length;
console.log(deviceNum, pipeNum)
// for (var i = 0; i < this.form.deviceList.length; i++) { if (deviceNum > 0 && pipeNum > 0) {
let obj = this.form.deviceList[0]; let obj = this.form.deviceList[0];
let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, [obj.longitude, obj.latitude],"containerInspect"); let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, null, "containerInspect");
this.gaoMap = gaoMap; this.gaoMap = gaoMap;
if("1" == obj.deviceType){ for (let i = 0; i < this.form.deviceList.length; i++) {
this.gaoMap.addMarker(DEVICE_TYPE.REGEULATORBOX, obj,"false") if ("1" == obj.deviceType) {
this.gaoMap.addMarker(DEVICE_TYPE.REGEULATORBOX, this.form.deviceList[i], "false")
} }
if("2" == obj.deviceType){ if ("2" == obj.deviceType) {
this.gaoMap.addMarker(DEVICE_TYPE.VALUEWELL, obj,"false") this.gaoMap.addMarker(DEVICE_TYPE.VALUEWELL, this.form.deviceList[i], "false")
} }
if("3" == obj.deviceType){ if ("3" == obj.deviceType) {
this.gaoMap.addMarker(DEVICE_TYPE.FLOWMETER, obj,"false") this.gaoMap.addMarker(DEVICE_TYPE.FLOWMETER, this.form.deviceList[i], "false")
} }
if("4" == obj.deviceType){ if ("4" == obj.deviceType) {
this.gaoMap.addMarker(DEVICE_TYPE.PRESSUREGAGE, obj,"false") this.gaoMap.addMarker(DEVICE_TYPE.PRESSUREGAGE, this.form.deviceList[i], "false")
} }
// }
} }
for (var i = 0; i < this.form.pipeList.length; i++) {
if (this.form.pipeList?.length > 0) { let obj = this.form.pipeList[i];
this.gaoMap.onlyLine(obj);
}
} else if (deviceNum > 0 && pipeNum == 0) {
let obj = this.form.deviceList[0];
let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, [obj.longitude, obj.latitude], "containerInspect");
this.gaoMap = gaoMap;
for (let i = 0; i < this.form.deviceList.length; i++) {
if ("1" == obj.deviceType) {
this.gaoMap.addMarker(DEVICE_TYPE.REGEULATORBOX, this.form.deviceList[i], "false")
}
if ("2" == obj.deviceType) {
this.gaoMap.addMarker(DEVICE_TYPE.VALUEWELL, this.form.deviceList[i], "false")
}
if ("3" == obj.deviceType) {
this.gaoMap.addMarker(DEVICE_TYPE.FLOWMETER, this.form.deviceList[i], "false")
}
if ("4" == obj.deviceType) {
this.gaoMap.addMarker(DEVICE_TYPE.PRESSUREGAGE, this.form.deviceList[i], "false")
}
}
} else if (deviceNum == 0 && pipeNum > 0) {
const { coordinates } = this.form.pipeList[0]; const { coordinates } = this.form.pipeList[0];
const path1 = eval(coordinates)[0]; const path1 = eval(coordinates)[0];
const path2 = eval(coordinates)[1]; const path2 = eval(coordinates)[1];
const path3 = [(Number(path1[0]) + Number(path2[0])) / 2, (Number(path1[1]) + Number(path2[1])) / 2]; const path3 = [(Number(path1[0]) + Number(path2[0])) / 2, (Number(path1[1]) + Number(path2[1])) / 2];
let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, path3,"containerInspect"); let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, path3, "containerInspect");
this.gaoMap = gaoMap; this.gaoMap = gaoMap;
for (var i = 0; i < this.form.pipeList.length; i++) { for (var i = 0; i < this.form.pipeList.length; i++) {
let obj = this.form.pipeList[i]; let obj = this.form.pipeList[i];
...@@ -415,7 +433,6 @@ ...@@ -415,7 +433,6 @@
} }
} }
if (this.form.orderType == '1') { if (this.form.orderType == '1') {
// 获取设备列表树 // 获取设备列表树
let data = { let data = {
......
...@@ -49,9 +49,12 @@ ...@@ -49,9 +49,12 @@
<font v-if="form.orderType == 1 && linkOrderId != undefined">巡检信息</font> <font v-if="form.orderType == 1 && linkOrderId != undefined">巡检信息</font>
<font v-if="form.orderType == 2 && linkOrderId != undefined">隐患信息</font> <font v-if="form.orderType == 2 && linkOrderId != undefined">隐患信息</font>
<font v-if="form.orderType == 3 && linkOrderId != undefined">报警信息</font> <font v-if="form.orderType == 3 && linkOrderId != undefined">报警信息</font>
<el-button type="text" v-if="form.orderType == 1 && linkOrderId == undefined" @click="detailInfos(form.orderType)">巡检信息</el-button> <el-button type="text" v-if="form.orderType == 1 && linkOrderId == undefined"
<el-button type="text" v-if="form.orderType == 2 && linkOrderId == undefined" @click="detailInfos(form.orderType)">隐患信息</el-button> @click="detailInfos(form.orderType)">巡检信息</el-button>
<el-button type="text" v-if="form.orderType == 3 && linkOrderId == undefined" @click="detailInfos(form.orderType)">报警信息</el-button> <el-button type="text" v-if="form.orderType == 2 && linkOrderId == undefined"
@click="detailInfos(form.orderType)">隐患信息</el-button>
<el-button type="text" v-if="form.orderType == 3 && linkOrderId == undefined"
@click="detailInfos(form.orderType)">报警信息</el-button>
</el-form-item> </el-form-item>
<el-form-item label="工单编号:" prop="orderId" style="margin-bottom: 0px;"> <el-form-item label="工单编号:" prop="orderId" style="margin-bottom: 0px;">
<font>{{form.orderId}}</font> <font>{{form.orderId}}</font>
...@@ -84,8 +87,8 @@ ...@@ -84,8 +87,8 @@
</el-form-item> </el-form-item>
<el-form-item label="设备名称:" prop="deviceName" style="margin-bottom: 0px;"> <el-form-item label="设备名称:" prop="deviceName" style="margin-bottom: 0px;">
<font v-if="form.orderType != 1">{{form.deviceName}}</font> <font v-if="form.orderType != 1">{{form.deviceName}}</font>
<el-tree style="margin-top: 5px;margin-left: 70px;" :data="deviceOptions" :props="defaultProps" :expand-on-click-node="false" ref="tree" <el-tree style="margin-top: 5px;margin-left: 70px;" :data="deviceOptions" :props="defaultProps"
@node-click="handleNodeClick" v-if="form.orderType == 1" /> :expand-on-click-node="false" ref="tree" @node-click="handleNodeClick" v-if="form.orderType == 1" />
</el-form-item> </el-form-item>
<el-form-item label="设备位置:" v-if="form.orderType != 1" style="margin-bottom: 0px;"> <el-form-item label="设备位置:" v-if="form.orderType != 1" style="margin-bottom: 0px;">
<font v-if="form.deviceType == 0">{{form.pipeList?form.pipeList[0].pipeAddr:"-"}}</font> <font v-if="form.deviceType == 0">{{form.pipeList?form.pipeList[0].pipeAddr:"-"}}</font>
...@@ -120,7 +123,7 @@ ...@@ -120,7 +123,7 @@
</div> </div>
</el-col> </el-col>
<el-row style="margin-bottom: -20px;"> <el-row style="margin-bottom: -20px;">
<el-col :span="6"style="margin-bottom: 15px;"> <el-col :span="6" style="margin-bottom: 15px;">
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;"> <el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;">
<el-form-item label="接单人:" prop="actualInspectorName"> <el-form-item label="接单人:" prop="actualInspectorName">
<font>{{form.actualInspectorName}}</font> <font>{{form.actualInspectorName}}</font>
...@@ -252,10 +255,12 @@ ...@@ -252,10 +255,12 @@
<!-- 归档 --> <!-- 归档 -->
<div class="" style="width: 95%;margin-left: 50px;text-align: center;margin-top: 10px;"> <div class="" style="width: 95%;margin-left: 50px;text-align: center;margin-top: 10px;">
<el-button style="margin-bottom: 15px;margin-top: 10px;" type="primary" size="normal" icon="el-icon-edit" @click="handleUpdate(form.orderId)" <el-button style="margin-bottom: 15px;margin-top: 10px;" type="primary" size="normal" icon="el-icon-edit"
v-hasPermi="['workOrder:basicsInfo:edit']" v-if="form.orderStatus == 0 && linkOrderId == undefined">修改</el-button> @click="handleUpdate(form.orderId)" v-hasPermi="['workOrder:basicsInfo:edit']"
<el-button style="margin-bottom: 15px;margin-top: 10px;" type="primary" size="normal" icon="el-icon-edit" @click="handleFinish(form.orderId)" v-if="form.orderStatus == 0 && linkOrderId == undefined">修改</el-button>
v-hasPermi="['workOrder:basicsInfo:editStatus']" v-if="form.orderStatus == 2 && linkOrderId == undefined">归档</el-button> <el-button style="margin-bottom: 15px;margin-top: 10px;" type="primary" size="normal" icon="el-icon-edit"
@click="handleFinish(form.orderId)" v-hasPermi="['workOrder:basicsInfo:editStatus']"
v-if="form.orderStatus == 2 && linkOrderId == undefined">归档</el-button>
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<div v-if="this.title == '工单信息修改'"> <div v-if="this.title == '工单信息修改'">
...@@ -297,36 +302,21 @@ ...@@ -297,36 +302,21 @@
</el-dialog> </el-dialog>
</div> </div>
</div> </div>
<el-dialog <el-dialog title="巡检信息" lock-scroll :visible.sync="inspectionDialogVisible" width="70%">
title="巡检信息"
lock-scroll
:visible.sync="inspectionDialogVisible"
width="70%"
>
<div style="height:80vh;overflow:auto"> <div style="height:80vh;overflow:auto">
<inspection :resourceId="form.resourceId"/> <inspection :resourceId="form.resourceId" />
</div> </div>
</el-dialog> </el-dialog>
<el-dialog <el-dialog title="隐患信息" lock-scroll :visible.sync="hiddenTroubleDialogVisible" width="70%">
title="隐患信息"
lock-scroll
:visible.sync="hiddenTroubleDialogVisible"
width="70%"
>
<div style="height:80vh;overflow:auto"> <div style="height:80vh;overflow:auto">
<hiddenTrouble :resourceId="form.resourceId"/> <hiddenTrouble :resourceId="form.resourceId" />
</div> </div>
</el-dialog> </el-dialog>
<el-dialog <el-dialog title="报警信息" lock-scroll :visible.sync="alarmDialogVisible" width="70%">
title="报警信息"
lock-scroll
:visible.sync="alarmDialogVisible"
width="70%"
>
<div style="height:80vh;overflow:auto"> <div style="height:80vh;overflow:auto">
<alarm :resourceId="form.resourceId"/> <alarm :resourceId="form.resourceId" />
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
...@@ -344,7 +334,7 @@ ...@@ -344,7 +334,7 @@
import alarm from "../../dataMonitoring/alarmdetail/index.vue"; import alarm from "../../dataMonitoring/alarmdetail/index.vue";
export default { export default {
props:["linkOrderId"], props: ["linkOrderId"],
name: "BasicsInfo", name: "BasicsInfo",
components: { components: {
inspection, inspection,
...@@ -426,9 +416,9 @@ ...@@ -426,9 +416,9 @@
created() { created() {
// 如果是跳转来的,则接受初始化参数 // 如果是跳转来的,则接受初始化参数
// this.user_id = this.$route.query.id; //详细信息页接收参数 // this.user_id = this.$route.query.id; //详细信息页接收参数
if(this.linkOrderId){ if (this.linkOrderId) {
this.orderId = this.linkOrderId; this.orderId = this.linkOrderId;
}else{ } else {
this.orderId = this.$route.query.orderId; this.orderId = this.$route.query.orderId;
} }
...@@ -497,29 +487,66 @@ ...@@ -497,29 +487,66 @@
}); });
}, },
getBasicsInfo() { getBasicsInfo() {
!
getBasicsInfo(this.orderId).then(response => { getBasicsInfo(this.orderId).then(response => {
this.form = response.data; this.form = response.data;
this.active = parseInt(response.data.orderStatus) + 1; this.active = parseInt(response.data.orderStatus) + 1;
const deviceNum = this.form?.deviceInfoList?.length;
const pipeNum = this.form?.pipeList?.length;
console.log(deviceNum,pipeNum)
if (deviceNum > 0 && pipeNum > 0) {
let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, null);
this.gaoMap = gaoMap;
for (var i = 0; i < this.form.deviceInfoList.length; i++) {
let obj = this.form.deviceInfoList[i];
console.log(obj, "kkkkkkkk")
if ("1" == obj.deviceType) {
this.gaoMap.addMarker(DEVICE_TYPE.REGEULATORBOX, obj, "false")
}
if ("2" == obj.deviceType) {
this.gaoMap.addMarker(DEVICE_TYPE.VALUEWELL, obj, "false")
}
if ("3" == obj.deviceType) {
this.gaoMap.addMarker(DEVICE_TYPE.FLOWMETER, obj, "false")
}
if ("4" == obj.deviceType) {
this.gaoMap.addMarker(DEVICE_TYPE.PRESSUREGAGE, obj, "false")
}
}
if (this.form.deviceInfoList.length > 0) { for (var i = 0; i < this.form.pipeList.length; i++) {
console.log("this.form.deviceInfoList", this.form.deviceInfoList) let obj = this.form.pipeList[i];
this.gaoMap.onlyLine(obj);
}
} else if (deviceNum > 0 && pipeNum == 0) {
let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, [this.form.deviceInfoList[0].longitude, this.form.deviceInfoList[0].latitude]); let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, [this.form.deviceInfoList[0].longitude, this.form.deviceInfoList[0].latitude]);
this.gaoMap = gaoMap; this.gaoMap = gaoMap;
// this.gaoMap.resetMapCenter([this.form.deviceInfoList[0].longitude, this.form.deviceInfoList[0].latitude]); // this.gaoMap.resetMapCenter([this.form.deviceInfoList[0].longitude, this.form.deviceInfoList[0].latitude]);
for (var i = 0; i < this.form.deviceInfoList.length; i++) { for (var i = 0; i < this.form.deviceInfoList.length; i++) {
let obj = this.form.deviceInfoList[i]; let obj = this.form.deviceInfoList[i];
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj); console.log(obj, "kkkkkkkk")
if ("1" == obj.deviceType) {
this.gaoMap.addMarker(DEVICE_TYPE.REGEULATORBOX, obj, "false")
}
if ("2" == obj.deviceType) {
this.gaoMap.addMarker(DEVICE_TYPE.VALUEWELL, obj, "false")
}
if ("3" == obj.deviceType) {
this.gaoMap.addMarker(DEVICE_TYPE.FLOWMETER, obj, "false")
}
if ("4" == obj.deviceType) {
this.gaoMap.addMarker(DEVICE_TYPE.PRESSUREGAGE, obj, "false")
} }
} }
if (this.form.pipeList != null) { } else if (deviceNum == 0 && pipeNum > 0) {
console.log("this.form.pipeList",this.form.pipeList[0].coordinates) console.log("this.form.pipeList", this.form.pipeList[0].coordinates)
const {coordinates} = this.form.pipeList[0]; const { coordinates } = this.form.pipeList[0];
const path1 = eval(coordinates)[0]; const path1 = eval(coordinates)[0];
const path2 = eval(coordinates)[1]; const path2 = eval(coordinates)[1];
const path3 = [(Number(path1[0]) + Number(path2[0])) / 2, (Number(path1[1]) + Number(path2[1])) / 2]; const path3 = [(Number(path1[0]) + Number(path2[0])) / 2, (Number(path1[1]) + Number(path2[1])) / 2];
let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER,path3); let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, path3);
this.gaoMap = gaoMap; this.gaoMap = gaoMap;
for (var i = 0; i < this.form.pipeList.length; i++) { for (var i = 0; i < this.form.pipeList.length; i++) {
...@@ -528,6 +555,44 @@ ...@@ -528,6 +555,44 @@
} }
} }
// if (this.form.deviceInfoList.length > 0) {
// let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, [this.form.deviceInfoList[0].longitude, this.form.deviceInfoList[0].latitude]);
// this.gaoMap = gaoMap;
// // 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];
// console.log(obj, "kkkkkkkk")
// if ("1" == obj.deviceType) {
// this.gaoMap.addMarker(DEVICE_TYPE.REGEULATORBOX, obj, "false")
// }
// if ("2" == obj.deviceType) {
// this.gaoMap.addMarker(DEVICE_TYPE.VALUEWELL, obj, "false")
// }
// if ("3" == obj.deviceType) {
// this.gaoMap.addMarker(DEVICE_TYPE.FLOWMETER, obj, "false")
// }
// if ("4" == obj.deviceType) {
// this.gaoMap.addMarker(DEVICE_TYPE.PRESSUREGAGE, obj, "false")
// }
// }
// }
// if (this.form.pipeList != null) {
// console.log("this.form.pipeList", this.form.pipeList[0].coordinates)
// const { coordinates } = this.form.pipeList[0];
// const path1 = eval(coordinates)[0];
// const path2 = eval(coordinates)[1];
// const path3 = [(Number(path1[0]) + Number(path2[0])) / 2, (Number(path1[1]) + Number(path2[1])) / 2];
// let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, path3);
// this.gaoMap = gaoMap;
// 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') { if (this.form.orderType == '1') {
// 获取设备列表树 // 获取设备列表树
let data = { let data = {
...@@ -663,14 +728,14 @@ ...@@ -663,14 +728,14 @@
this.exportLoading = false; this.exportLoading = false;
}).catch(() => { }); }).catch(() => { });
}, },
detailInfos(type){ detailInfos(type) {
if("1" == type){ if ("1" == type) {
this.inspectionDialogVisible = true; this.inspectionDialogVisible = true;
} }
if("2" == type){ if ("2" == type) {
this.hiddenTroubleDialogVisible = true; this.hiddenTroubleDialogVisible = true;
} }
if("3" == type){ if ("3" == type) {
this.alarmDialogVisible = true; this.alarmDialogVisible = true;
} }
} }
...@@ -706,6 +771,7 @@ ...@@ -706,6 +771,7 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.el-card__body { .el-card__body {
padding: 5px 20px 20px 20px; padding: 5px 20px 20px 20px;
} }
......
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