Commit b619ccfa authored by 耿迪迪's avatar 耿迪迪

地图中心及工单 gengdidi

parent 525e7f91
...@@ -4,6 +4,8 @@ ENV = 'development' ...@@ -4,6 +4,8 @@ ENV = 'development'
# 燃气安全管理系统/开发环境 # 燃气安全管理系统/开发环境
VUE_APP_BASE_API = '/dev-api' VUE_APP_BASE_API = '/dev-api'
#地图中心
VUE_APP_MAP_CENTER = '石家庄'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true
...@@ -4,4 +4,7 @@ ENV = 'production' ...@@ -4,4 +4,7 @@ ENV = 'production'
# 燃气安全管理系统/生产环境 # 燃气安全管理系统/生产环境
VUE_APP_BASE_API = '/prod-api' VUE_APP_BASE_API = '/prod-api'
#地图中心
VUE_APP_MAP_CENTER = '石家庄'
port = 8091 port = 8091
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
if(value){ if(value){
window.addEventListener("click", this.barClose); window.addEventListener("click", this.barClose);
this.$nextTick(() => { this.$nextTick(() => {
this.map = new gaodeMap("石家庄"); this.map = new gaodeMap(process.env.VUE_APP_MAP_CENTER);
this.map.addMouseTool(); this.map.addMouseTool();
if(this.str){ if(this.str){
this.map.addPolyline([{coordinates:this.str}]); this.map.addPolyline([{coordinates:this.str}]);
......
...@@ -41,10 +41,12 @@ class gaodeMap { ...@@ -41,10 +41,12 @@ class gaodeMap {
leftListClick = false; leftListClick = false;
//构造函数中设置中央点默认值 //构造函数中设置中央点默认值
constructor(center, latlng) { constructor(center, latlng,containerId) {
let container = containerId ? containerId : "container";
this.markers = []; this.markers = [];
console.log(center,"........,,,,,,,<<<<<<,")
this.center = center ? center : defaultCenter; this.center = center ? center : defaultCenter;
map = new AMap.Map("container", { map = new AMap.Map(container, {
//mask: addMask(result.districtList[0].boundaries), //mask: addMask(result.districtList[0].boundaries),
center: [114.72995, 38.37417], center: [114.72995, 38.37417],
// resizeEnable: true, // resizeEnable: true,
......
<template> <template>
<div class="app-container detail" style="background-color: rgb(238, 241, 245);"> <div class="app-container detail" style="background-color: rgb(238, 241, 245);">
<div style="padding-top: 10px;background: #fff;height: 100%;"> <div style="padding-top: 10px;background: #fff;height: 100%;">
<el-row> <el-row v-if ="resourceId == undefined">
<el-col :span="24" style="padding-left: 15px;margin-bottom: -10px;"> <el-col :span="24" style="padding-left: 15px;margin-bottom: -10px;">
<div style="height: 45px;" @click="$router.go(-1)"> <div style="height: 45px;" @click="$router.go(-1)">
<el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回 <el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回
...@@ -55,7 +55,8 @@ ...@@ -55,7 +55,8 @@
<el-form-item label="工单编号:" prop="orderId"> <el-form-item label="工单编号:" prop="orderId">
<!-- <font>{{form.orderId}}</font> --> <!-- <font>{{form.orderId}}</font> -->
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="showDetail(form.orderId)">{{form.orderId}}</el-button> <font v-if="resourceId != undefined">{{form.orderId}}</font>
<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-item label="处理状态:" prop="dealStatus"> <el-form-item label="处理状态:" prop="dealStatus">
...@@ -152,7 +153,7 @@ ...@@ -152,7 +153,7 @@
<el-col :span="8" style="padding: 10px;padding-left: 0px;"> <el-col :span="8" style="padding: 10px;padding-left: 0px;">
<div id="marbox" style="width: 100%;height: 304px; border: 1px solid rgb(218, 213, 213);float: right;"> <div id="marbox" style="width: 100%;height: 304px; border: 1px solid rgb(218, 213, 213);float: right;">
<div style="width: 100%;height: 100%" id="container"></div> <div style="width: 100%;height: 100%" id="containerAlarm"></div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -249,6 +250,7 @@ ...@@ -249,6 +250,7 @@
import echarts from 'echarts'; import echarts from 'echarts';
export default { export default {
props:["resourceId"],
name: "DeviceAlarm", name: "DeviceAlarm",
components: { components: {
}, },
...@@ -277,7 +279,12 @@ export default { ...@@ -277,7 +279,12 @@ export default {
}, },
created() { created() {
// 如果是跳转来的,则接受初始化参数 // 如果是跳转来的,则接受初始化参数
this.alarmId = +this.$route.query.alarmId; if(this.resourceId){
this.alarmId = this.resourceId;
}else{
this.alarmId = this.$route.query.alarmId;
}
this.getDetail(); this.getDetail();
}, },
mounted() { mounted() {
...@@ -668,7 +675,7 @@ export default { ...@@ -668,7 +675,7 @@ export default {
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("石家庄",path3); let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER,path3,"containerAlarm");
this.gaoMap=gaoMap; this.gaoMap=gaoMap;
console.log("pipe", pipe); console.log("pipe", pipe);
this.dataListdetail.push(pipe); this.dataListdetail.push(pipe);
...@@ -679,7 +686,7 @@ export default { ...@@ -679,7 +686,7 @@ export default {
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("石家庄",[device.longitude, device.latitude]); 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); this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, device);
......
...@@ -585,7 +585,7 @@ ...@@ -585,7 +585,7 @@
this.dataListdetail3.push(obj3); this.dataListdetail3.push(obj3);
this.form = response.data; this.form = response.data;
this.active = parseInt(response.data.orderStatus) + 1; this.active = parseInt(response.data.orderStatus) + 1;
let gaoMap = new gaodeMap("石家庄",[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) this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, this.form)
// this.gaoMap.resetMapCenter([this.form.longitude, this.form.latitude]); // this.gaoMap.resetMapCenter([this.form.longitude, this.form.latitude]);
......
...@@ -313,7 +313,7 @@ ...@@ -313,7 +313,7 @@
console.log(this.form, "this.form") console.log(this.form, "this.form")
const obj =this.form; const obj =this.form;
// 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("石家庄", [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) this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, this.form)
}); });
......
...@@ -318,7 +318,7 @@ export default { ...@@ -318,7 +318,7 @@ export default {
this.boxWidth = document.body.clientWidth - 100; this.boxWidth = document.body.clientWidth - 100;
}, },
async initMap() { async initMap() {
let gaoMap = new gaodeMap("石家庄"); let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER);
this.gaoMap = gaoMap; this.gaoMap = gaoMap;
this.gaoMap.view = this; this.gaoMap.view = this;
window.removeEventListener("click", this.barClose); window.removeEventListener("click", this.barClose);
......
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
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("石家庄", path3); let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, path3);
this.gaoMap = gaoMap; this.gaoMap = gaoMap;
this.gaoMap.onlyLine(this.form); this.gaoMap.onlyLine(this.form);
}); });
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-container detail inspectiondetail" style="background-color: rgb(238, 241, 245);"> <div class="app-container detail inspectiondetail" style="background-color: rgb(238, 241, 245);">
<!-- 巡检计划信息 --> <!-- 巡检计划信息 -->
<div style="padding-top: 10px;background: #fff;height: 100%;"> <div style="padding-top: 10px;background: #fff;height: 100%;">
<el-row> <el-row v-if="resourceId == undefined">
<el-col :span="24" style="padding-left: 15px;margin-bottom: -10px;"> <el-col :span="24" style="padding-left: 15px;margin-bottom: -10px;">
<div style="height: 45px;" @click="$router.go(-1)"> <div style="height: 45px;" @click="$router.go(-1)">
<el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回 <el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<div id="marbox" style="width: 100%;height: 250px;margin-top: -25px; border: 1px solid rgb(218, 213, 213);"> <div id="marbox" style="width: 100%;height: 250px;margin-top: -25px; border: 1px solid rgb(218, 213, 213);">
<div style="width: 100%;height: 100%" id="container"></div> <div style="width: 100%;height: 100%" id="containerInspect"></div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -121,9 +121,10 @@ ...@@ -121,9 +121,10 @@
<el-col :span="6"> <el-col :span="6">
<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="orderId"> <el-form-item label="工单编号:" prop="orderId">
<!-- <font>{{form.orderId}}</font> --> <!--&lt;!&ndash; <font>{{form.orderId}}</font> &ndash;&gt;-->
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="showDetail(form.orderId)">{{form.orderId}}</el-button> <font v-if="resourceId != undefined">{{form.orderId}}</font>
<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>
...@@ -222,6 +223,7 @@ ...@@ -222,6 +223,7 @@
import { deviceNodeTree } from "@/api/device/deviceInfo"; import { deviceNodeTree } from "@/api/device/deviceInfo";
export default { export default {
props:["resourceId"],
name: "InspectionPlanDetail", name: "InspectionPlanDetail",
components: { components: {
}, },
...@@ -326,7 +328,11 @@ ...@@ -326,7 +328,11 @@
// 如果是跳转来的,则接受初始化参数 // 如果是跳转来的,则接受初始化参数
// this.user_id = this.$route.query.id; //详细信息页接收参数 // this.user_id = this.$route.query.id; //详细信息页接收参数
this.getList(); this.getList();
this.planId = this.$route.query.planId; if(this.resourceId){
this.planId = this.resourceId;
}else{
this.planId = this.$route.query.planId;
}
// this.getDetail(); // this.getDetail();
}, },
mounted() { mounted() {
...@@ -361,11 +367,11 @@ ...@@ -361,11 +367,11 @@
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) { if (this.form.deviceList?.length > 0) {
// for (var i = 0; i < this.form.deviceList.length; i++) { // for (var i = 0; i < this.form.deviceList.length; i++) {
let obj = this.form.deviceList[0]; let obj = this.form.deviceList[0];
let gaoMap = new gaodeMap("石家庄", [obj.longitude, obj.latitude]); let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, [obj.longitude, obj.latitude],"containerInspect");
this.gaoMap = gaoMap; this.gaoMap = gaoMap;
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj) this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj)
// } // }
...@@ -376,7 +382,7 @@ ...@@ -376,7 +382,7 @@
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("石家庄", path3); 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];
...@@ -635,4 +641,4 @@ ...@@ -635,4 +641,4 @@
font-size: 15px; font-size: 15px;
font-weight: 900; font-weight: 900;
} }
</style> </style>
\ No newline at end of file
...@@ -465,7 +465,7 @@ export default { ...@@ -465,7 +465,7 @@ export default {
}, },
initMap() { initMap() {
let gaoMap = new gaodeMap("石家庄"); let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER);
this.gaoMap = gaoMap; this.gaoMap = gaoMap;
window.removeEventListener("mousedown", this.barClose); window.removeEventListener("mousedown", this.barClose);
window.addEventListener("mousedown", this.barClose); window.addEventListener("mousedown", this.barClose);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-container detail" style="background-color: rgb(238, 241, 245);"> <div class="app-container detail" style="background-color: rgb(238, 241, 245);">
<!-- 巡检计划信息 --> <!-- 巡检计划信息 -->
<div style="padding-top: 10px;background: #fff;height: 100%;"> <div style="padding-top: 10px;background: #fff;height: 100%;">
<el-row> <el-row v-if="resourceId == undefined">
<el-col :span="24" style="padding-left: 15px;margin-bottom: -10px;"> <el-col :span="24" style="padding-left: 15px;margin-bottom: -10px;">
<div style="height: 45px;" @click="$router.go(-1)"> <div style="height: 45px;" @click="$router.go(-1)">
<el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回 <el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
<el-cascader <el-cascader
v-model="form1.device" v-model="form1.device"
:options="options" :options="options"
:props="props" :props="propsH"
:show-all-levels="false" :show-all-levels="false"
@change="handleChange" @change="handleChange"
filterable filterable
...@@ -349,6 +349,16 @@ ...@@ -349,6 +349,16 @@
@confirmFun="confirmFun($event)" @confirmFun="confirmFun($event)"
></Mapdialog> ></Mapdialog>
</div> </div>
<el-dialog
lock-scroll
:visible.sync="dialogVisible"
width="70%"
>
<div style="height:80vh;overflow:auto">
<workOrder :orderIdByHidden="form.orderId"/>
</div>
</el-dialog>
</div> </div>
</div> </div>
</template> </template>
...@@ -361,15 +371,19 @@ import { inspectorList, allListUser } from "@/api/system/user"; ...@@ -361,15 +371,19 @@ import { inspectorList, allListUser } from "@/api/system/user";
import { deviceNodeTree } from "@/api/device/deviceInfo"; import { deviceNodeTree } from "@/api/device/deviceInfo";
import MyFileUpload from '@/components/MyFileUpload'; import MyFileUpload from '@/components/MyFileUpload';
import Mapdialog from "@/components/mapDialog/checkDeviceLoaction.vue"; import Mapdialog from "@/components/mapDialog/checkDeviceLoaction.vue";
import workOrder from "../../workOrder/detail/index.vue"
export default { export default {
props:["resourceId"],
name: "HiddenTroubleDetail", name: "HiddenTroubleDetail",
components: { components: {
MyFileUpload, MyFileUpload,
Mapdialog Mapdialog,
workOrder
}, },
data() { data() {
return { return {
dialogVisible: false,
troubleId: '', troubleId: '',
isDisplay:false, isDisplay:false,
showAndHide : false, showAndHide : false,
...@@ -380,7 +394,7 @@ export default { ...@@ -380,7 +394,7 @@ export default {
// 用户列表 // 用户列表
userList: [], userList: [],
loadmap: false, loadmap: false,
props: { propsH: {
value: "id", value: "id",
label: "name", label: "name",
level: "level", level: "level",
...@@ -450,10 +464,14 @@ export default { ...@@ -450,10 +464,14 @@ export default {
}; };
}, },
created() { created() {
this.getList(); this.getList();
// 如果是跳转来的,则接受初始化参数 // 如果是跳转来的,则接受初始化参数
this.troubleId = this.$route.query.troubleId; if(this.resourceId){
this.troubleId = this.resourceId;
}else{
this.troubleId = this.$route.query.troubleId;
}
this.getDetail(); this.getDetail();
this.getDicts("t_trouble_type").then(response => { this.getDicts("t_trouble_type").then(response => {
this.typeOptions = response.data; this.typeOptions = response.data;
...@@ -481,12 +499,17 @@ export default { ...@@ -481,12 +499,17 @@ export default {
}, },
/** 详细信息跳转 */ /** 详细信息跳转 */
showDetail(orderId) { showDetail(orderId) {
this.$router.push({ /* this.$router.push({
path: '/workOrder/detail', path: '/workOrder/detail',
query:{ query:{
orderId : orderId orderId : orderId
} }
}) })*/
/*let routeData = this.$router.resolve({ path: '/workOrder/detail', query: { orderId: orderId } });
console.log(routeData,"trwetwe===========")
window.open(routeData.href, '_blank');*/
this.dialogVisible = true;
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm1() { submitForm1() {
...@@ -621,8 +644,8 @@ export default { ...@@ -621,8 +644,8 @@ export default {
this.showAndHide = false; this.showAndHide = false;
} }
}, },
// 表单重置 // 表单重置
reset() { reset() {
this.form1 = { this.form1 = {
......
...@@ -371,7 +371,7 @@ export default { ...@@ -371,7 +371,7 @@ export default {
this.getBasicsInfo(); this.getBasicsInfo();
}, },
mounted(){ mounted(){
let gaoMap = new gaodeMap("石家庄"); let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER);
this.gaoMap = gaoMap; this.gaoMap = gaoMap;
this.getBasicsInfo(); this.getBasicsInfo();
}, },
......
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