Commit 293c9264 authored by yaqizhang's avatar yaqizhang

详情地图图标

parent 80e3bedd
......@@ -697,12 +697,25 @@ export default {
}
if(this.form.deviceList != null){
console.log(this.form.deviceList,"oooooooooooo")
let device = this.form.deviceList[0];
console.log("device", device);
this.dataListdetail.push(device);
let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER,[device.longitude, device.latitude],"containerAlarm");
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]);
}
......
......@@ -587,18 +587,20 @@
this.active = parseInt(response.data.orderStatus) + 1;
let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER,[this.form.longitude, this.form.latitude]);
this.gaoMap = gaoMap;
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, this.form)
// this.gaoMap.resetMapCenter([this.form.longitude, this.form.latitude]);
console.log("this.form.longitude",this.form.longitude)
console.log("this.form", this.form)
// if (this.form.length > 0) {
// }
// for (var i = 0; i < this.form.length; i++) {
// let obj = this.form[i];
// this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj)
// }
if("1" == deviceType){
this.gaoMap.addMarker(DEVICE_TYPE.REGEULATORBOX, this.form,"false")
}
if("2" == deviceType){
this.gaoMap.addMarker(DEVICE_TYPE.VALUEWELL, this.form,"false")
}
if("3" == deviceType){
this.gaoMap.addMarker(DEVICE_TYPE.FLOWMETER, this.form,"false")
}
if("4" == deviceType){
this.gaoMap.addMarker(DEVICE_TYPE.PRESSUREGAGE, this.form,"false")
}
var getData1 = [];
var getData2 = [];
......
......@@ -315,7 +315,19 @@
// 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]);
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) {
......
......@@ -63,7 +63,7 @@
</el-form>
</el-col>
<el-col :span="24">
<el-table max-height="175px" :data="form.inspectionDataList" style="width: 89%; margin-left: 30px;">
<el-table max-height="175px" :data="form.inspectionDataList" style="width: 89%; margin-left: 30px;">
<el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="设备编号" align="center" prop="deviceCode" />
<el-table-column label="设备类型" align="center" prop="deviceType" />
......@@ -124,7 +124,8 @@
<!--&lt;!&ndash; <font>{{form.orderId}}</font> &ndash;&gt;-->
<template slot-scope="scope">
<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>
</el-form-item>
</el-form>
......@@ -136,7 +137,8 @@
</div>
<!-- <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)"
v-hasPermi="['workOrder:basicsInfo:add']">生成工单
</el-button>
......@@ -210,14 +212,9 @@
</div>
</div>
<el-dialog
title = "工单信息"
lock-scroll
:visible.sync="dialogVisible"
width="70%"
>
<el-dialog title="工单信息" lock-scroll :visible.sync="dialogVisible" width="70%">
<div style="height:80vh;overflow:auto">
<workOrder :linkOrderId="form.orderId"/>
<workOrder :linkOrderId="form.orderId" />
</div>
</el-dialog>
</div>
......@@ -235,7 +232,7 @@
import workOrder from "../../workOrder/detail/index.vue"
export default {
props:["resourceId"],
props: ["resourceId"],
name: "InspectionPlanDetail",
components: {
workOrder
......@@ -342,9 +339,9 @@
// 如果是跳转来的,则接受初始化参数
// this.user_id = this.$route.query.id; //详细信息页接收参数
this.getList();
if(this.resourceId){
if (this.resourceId) {
this.planId = this.resourceId;
}else{
} else {
this.planId = this.$route.query.planId;
}
// this.getDetail();
......@@ -380,34 +377,55 @@
this.form = response.data;
console.log("this.form", this.form)
this.active = parseInt(response.data.orderStatus) + 1;
if (this.form.deviceList?.length > 0) {
// for (var i = 0; i < this.form.deviceList.length; i++) {
let obj = this.form.deviceList[0];
let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, [obj.longitude, obj.latitude],"containerInspect");
this.gaoMap = gaoMap;
if("1" == obj.deviceType){
this.gaoMap.addMarker(DEVICE_TYPE.REGEULATORBOX, obj,"false")
const deviceNum = this.form?.deviceList?.length;
const pipeNum = this.form?.pipeList?.length;
console.log(deviceNum, pipeNum)
if (deviceNum > 0 && pipeNum > 0) {
let obj = this.form.deviceList[0];
let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, null, "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, obj,"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, obj,"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, obj,"false")
if ("4" == obj.deviceType) {
this.gaoMap.addMarker(DEVICE_TYPE.PRESSUREGAGE, this.form.deviceList[i], "false")
}
// }
}
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);
}
} 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 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,"containerInspect");
let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, path3, "containerInspect");
this.gaoMap = gaoMap;
for (var i = 0; i < this.form.pipeList.length; i++) {
let obj = this.form.pipeList[i];
......@@ -415,7 +433,6 @@
}
}
if (this.form.orderType == '1') {
// 获取设备列表树
let data = {
......@@ -667,4 +684,4 @@
font-size: 15px;
font-weight: 900;
}
</style>
</style>
\ No newline at end of file
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