diff --git a/gassafety-web/.env.development b/gassafety-web/.env.development index 45cc986f091df5abadac4bb0bad2608a251c666a..b91f52107e8a084ac4a151535eaf5c1e4ecd4013 100644 --- a/gassafety-web/.env.development +++ b/gassafety-web/.env.development @@ -4,6 +4,11 @@ ENV = 'development' # 燃气安全管ç†ç³»ç»Ÿ/å¼€å‘环境 VUE_APP_BASE_API = '/dev-api' +#地图ä¸å¿ƒ +VUE_APP_MAP_CENTER = '石家庄' + +#代ç†åœ°å€ +VUE_APP_TARGET = 'http://localhost:8903/gassafety' # è·¯ç”±æ‡’åŠ è½½ VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/gassafety-web/.env.production b/gassafety-web/.env.production index 624b5d10354261506cca74637824690da6f75ae4..bb5b49afe19b8a97575582a3a01251325a0ba0a9 100644 --- a/gassafety-web/.env.production +++ b/gassafety-web/.env.production @@ -4,4 +4,10 @@ ENV = 'production' # 燃气安全管ç†ç³»ç»Ÿ/生产环境 VUE_APP_BASE_API = '/prod-api' +#地图ä¸å¿ƒ +VUE_APP_MAP_CENTER = '石家庄' + +#代ç†åœ°å€ +VUE_APP_TARGET = 'http://36.148.23.59:8901/gassafety' + port = 8091 diff --git a/gassafety-web/src/components/mapDialog/checkPipeLineLocation.vue b/gassafety-web/src/components/mapDialog/checkPipeLineLocation.vue index 8d8d25c7c7670462eece677e19e3fa0a0b84b873..8c94fadfa27b0d6a4db849c878a28aed3c8e7e31 100644 --- a/gassafety-web/src/components/mapDialog/checkPipeLineLocation.vue +++ b/gassafety-web/src/components/mapDialog/checkPipeLineLocation.vue @@ -50,7 +50,7 @@ if(value){ window.addEventListener("click", this.barClose); this.$nextTick(() => { - this.map = new gaodeMap("石家庄"); + this.map = new gaodeMap(process.env.VUE_APP_MAP_CENTER); this.map.addMouseTool(); if(this.str){ this.map.addPolyline([{coordinates:this.str}]); diff --git a/gassafety-web/src/utils/gaodeMap.js b/gassafety-web/src/utils/gaodeMap.js index 2356225c15512b0156d9be872610652831d4ae98..5ef9f27e7d6e62cbe36093b5103e99a9617cd8bb 100644 --- a/gassafety-web/src/utils/gaodeMap.js +++ b/gassafety-web/src/utils/gaodeMap.js @@ -43,10 +43,11 @@ class gaodeMap { leftListClick = false; //æž„é€ å‡½æ•°ä¸è®¾ç½®ä¸å¤®ç‚¹é»˜è®¤å€¼ - constructor(center, latlng) { + constructor(center, latlng,containerId) { + let container = containerId ? containerId : "container"; this.markers = []; this.center = center ? center : defaultCenter; - map = new AMap.Map("container", { + map = new AMap.Map(container, { //mask: addMask(result.districtList[0].boundaries), center: [114.72995, 38.37417], // resizeEnable: true, @@ -234,7 +235,8 @@ class gaodeMap { this.setMarkerIcon(marker); if ( DEVICE_TYPE.WORKORDER != markerType && - DEVICE_TYPE.INSPECTOR != markerType + DEVICE_TYPE.INSPECTOR != markerType && + func != "false" ) { marker.content = this.getMarketContent(data); marker.on("mouseover", this.infoOpen); @@ -349,7 +351,9 @@ class gaodeMap { //infoWindow.close(map, e.target.getPosition()); } if (func) { - func(); + if(func != "false"){ + func(); + } } } // 其他设备 diff --git a/gassafety-web/src/views/dataMonitoring/alarmdetail/index.vue b/gassafety-web/src/views/dataMonitoring/alarmdetail/index.vue index 03c7da2c6c09117df38093f10a93663e893d36c2..c298c1c4b6c99a2519540e8d8ba56041c9a02a8e 100644 --- a/gassafety-web/src/views/dataMonitoring/alarmdetail/index.vue +++ b/gassafety-web/src/views/dataMonitoring/alarmdetail/index.vue @@ -1,7 +1,7 @@ <template> <div class="app-container detail" style="background-color: rgb(238, 241, 245);"> <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;"> <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;">返回 @@ -55,7 +55,8 @@ <el-form-item label="å·¥å•ç¼–å·:" prop="orderId"> <!-- <font>{{form.orderId}}</font> --> <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> </el-form-item> <el-form-item label="处ç†çŠ¶æ€:" prop="dealStatus"> @@ -152,7 +153,7 @@ <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 style="width: 100%;height: 100%" id="container"></div> + <div style="width: 100%;height: 100%" id="containerAlarm"></div> </div> </el-col> </el-row> @@ -235,6 +236,16 @@ </el-dialog> </div> </div> + <el-dialog + title = "å·¥å•ä¿¡æ¯" + lock-scroll + :visible.sync="dialogVisible" + width="70%" + > + <div style="height:80vh;overflow:auto"> + <workOrder :linkOrderId="form.orderId"/> + </div> + </el-dialog> </div> </template> @@ -247,13 +258,17 @@ import { map, DEVICE_TYPE } from "utils/gaodeMap.js"; import { inspectorList } from "@/api/system/user"; import echarts from 'echarts'; + import workOrder from "../../workOrder/detail/index.vue" export default { + props:["resourceId"], name: "DeviceAlarm", components: { + workOrder }, data() { return { + dialogVisible: false, dataListdetail: [], alarmId:'', // æŠ˜çº¿å›¾æ ‡é¢˜ @@ -277,7 +292,12 @@ export default { }, created() { // 如果是跳转æ¥çš„,则接å—åˆå§‹åŒ–å‚æ•° - this.alarmId = +this.$route.query.alarmId; + if(this.resourceId){ + this.alarmId = this.resourceId; + }else{ + this.alarmId = this.$route.query.alarmId; + } + this.getDetail(); }, mounted() { @@ -649,12 +669,13 @@ export default { }, /** 详细信æ¯è·³è½¬ */ showDetail(orderId) { - this.$router.push({ + /*this.$router.push({ path: '/workOrder/detail', query:{ orderId : orderId } - }) //带å‚跳转 + }) //带å‚跳转*/ + this.dialogVisible = true; }, getDetail (){ getDeviceAlarm(this.alarmId).then(response =>{ @@ -668,7 +689,7 @@ export default { 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("石家庄",path3); + let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER,path3,"containerAlarm"); this.gaoMap=gaoMap; console.log("pipe", pipe); this.dataListdetail.push(pipe); @@ -679,7 +700,7 @@ export default { let device = this.form.deviceList[0]; console.log("device", 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.addMarker(DEVICE_TYPE.WORKORDER, device); diff --git a/gassafety-web/src/views/dataMonitoring/realtimedetail/index.vue b/gassafety-web/src/views/dataMonitoring/realtimedetail/index.vue index 084b9524b7594fdaa9e1d7e78ba03baa63ab0756..50df293fb6866a2b6f2cd4470b973db832ea088f 100644 --- a/gassafety-web/src/views/dataMonitoring/realtimedetail/index.vue +++ b/gassafety-web/src/views/dataMonitoring/realtimedetail/index.vue @@ -585,7 +585,7 @@ this.dataListdetail3.push(obj3); this.form = response.data; 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.addMarker(DEVICE_TYPE.WORKORDER, this.form) // this.gaoMap.resetMapCenter([this.form.longitude, this.form.latitude]); diff --git a/gassafety-web/src/views/device/deviceInfoDetail/index.vue b/gassafety-web/src/views/device/deviceInfoDetail/index.vue index d0b9fd2a0685d479f6e2e4d6927687d8ef852276..ac8bf4b84ef676f7ec5fa4cb0a93623045b1f017 100644 --- a/gassafety-web/src/views/device/deviceInfoDetail/index.vue +++ b/gassafety-web/src/views/device/deviceInfoDetail/index.vue @@ -313,7 +313,7 @@ console.log(this.form, "this.form") const obj =this.form; // 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.addMarker(DEVICE_TYPE.WORKORDER, this.form) }); diff --git a/gassafety-web/src/views/device/map/index.vue b/gassafety-web/src/views/device/map/index.vue index dc06bce4e49ab05f92dfb6f373b5fdd133f8be51..3c38244a4d3dbe67503253f8fae78960a39bcc92 100644 --- a/gassafety-web/src/views/device/map/index.vue +++ b/gassafety-web/src/views/device/map/index.vue @@ -341,7 +341,7 @@ export default { this.boxWidth = document.body.clientWidth - 100; }, async initMap() { - let gaoMap = new gaodeMap("石家庄"); + let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER); this.gaoMap = gaoMap; this.gaoMap.view = this; window.removeEventListener("click", this.barClose); diff --git a/gassafety-web/src/views/device/pipeDetail/index.vue b/gassafety-web/src/views/device/pipeDetail/index.vue index bd4f9ff11d734ece0659c6be306c4de924cb59d4..8f89e2f0d0494fbd57e8701b3f4b31e3edae3e76 100644 --- a/gassafety-web/src/views/device/pipeDetail/index.vue +++ b/gassafety-web/src/views/device/pipeDetail/index.vue @@ -270,7 +270,7 @@ 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("石家庄", path3); + let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, path3); this.gaoMap = gaoMap; this.gaoMap.onlyLine(this.form); }); diff --git a/gassafety-web/src/views/deviceInspection/inspectiondetail/index.vue b/gassafety-web/src/views/deviceInspection/inspectiondetail/index.vue index 5cd576e02d66572d609f07c278d5ac8877e54ac0..ed0be351c5e31ed9c289f86fd7d3b88949a09784 100644 --- a/gassafety-web/src/views/deviceInspection/inspectiondetail/index.vue +++ b/gassafety-web/src/views/deviceInspection/inspectiondetail/index.vue @@ -2,7 +2,7 @@ <div class="app-container detail inspectiondetail" style="background-color: rgb(238, 241, 245);"> <!-- å·¡æ£€è®¡åˆ’ä¿¡æ¯ --> <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;"> <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;">返回 @@ -87,7 +87,7 @@ </el-col> <el-col :span="12"> <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> </el-col> </el-row> @@ -121,9 +121,10 @@ <el-col :span="6"> <el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;"> <el-form-item label="å·¥å•ç¼–å·:" prop="orderId"> - <!-- <font>{{form.orderId}}</font> --> + <!--<!– <font>{{form.orderId}}</font> –>--> <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> </el-form-item> </el-form> @@ -208,6 +209,17 @@ </el-dialog> </div> </div> + + <el-dialog + title = "å·¥å•ä¿¡æ¯" + lock-scroll + :visible.sync="dialogVisible" + width="70%" + > + <div style="height:80vh;overflow:auto"> + <workOrder :linkOrderId="form.orderId"/> + </div> + </el-dialog> </div> </template> @@ -220,13 +232,17 @@ import { inspectorList } from "@/api/system/user"; import { deviceTree } from "@/api/device/deviceInfo"; import { deviceNodeTree } from "@/api/device/deviceInfo"; + import workOrder from "../../workOrder/detail/index.vue" export default { + props:["resourceId"], name: "InspectionPlanDetail", components: { + workOrder }, data() { return { + dialogVisible: false, // é®ç½©å±‚ loading: true, // 导出é®ç½©å±‚ @@ -326,7 +342,11 @@ // 如果是跳转æ¥çš„,则接å—åˆå§‹åŒ–å‚æ•° // this.user_id = this.$route.query.id; //详细信æ¯é¡µæŽ¥æ”¶å‚æ•° this.getList(); - this.planId = this.$route.query.planId; + if(this.resourceId){ + this.planId = this.resourceId; + }else{ + this.planId = this.$route.query.planId; + } // this.getDetail(); }, mounted() { @@ -361,13 +381,24 @@ 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("石家庄", [obj.longitude, obj.latitude]); + let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER, [obj.longitude, obj.latitude],"containerInspect"); this.gaoMap = gaoMap; - this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj) + 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") + } // } } @@ -376,7 +407,7 @@ 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("石家庄", path3); + 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]; @@ -534,12 +565,13 @@ }, /** 详细信æ¯è·³è½¬ */ showDetail(orderId) { - this.$router.push({ + /*this.$router.push({ path: '/workOrder/detail', query: { orderId: orderId } - }) //带å‚跳转 + }) //带å‚跳转*/ + this.dialogVisible = true; }, /** 归档按钮æ“作 */ handleFinish(res) { @@ -635,4 +667,4 @@ font-size: 15px; font-weight: 900; } -</style> \ No newline at end of file +</style> diff --git a/gassafety-web/src/views/enterprise/mapView/index.vue b/gassafety-web/src/views/enterprise/mapView/index.vue index 77fb954b1c69327987b46eab26eca1c1b274af9c..a942a228b88a93562330a7f1522a4a58cabdd747 100644 --- a/gassafety-web/src/views/enterprise/mapView/index.vue +++ b/gassafety-web/src/views/enterprise/mapView/index.vue @@ -477,7 +477,7 @@ export default { }, initMap() { - let gaoMap = new gaodeMap("石家庄"); + let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER); this.gaoMap = gaoMap; window.removeEventListener("mousedown", this.barClose); window.addEventListener("mousedown", this.barClose); diff --git a/gassafety-web/src/views/riskManagement/hiddenTroubleDetail/index.vue b/gassafety-web/src/views/riskManagement/hiddenTroubleDetail/index.vue index 86cdeb5880c28025e08770912d97519568f33bd2..0194bb7ad41b6879e3501cec97567af0480ac4c6 100644 --- a/gassafety-web/src/views/riskManagement/hiddenTroubleDetail/index.vue +++ b/gassafety-web/src/views/riskManagement/hiddenTroubleDetail/index.vue @@ -2,7 +2,7 @@ <div class="app-container detail" style="background-color: rgb(238, 241, 245);"> <!-- å·¡æ£€è®¡åˆ’ä¿¡æ¯ --> <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;"> <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;">返回 @@ -104,7 +104,8 @@ <el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;"> <el-form-item label="å·¥å•ç¼–å·:" prop="orderId"> <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> </el-form-item> </el-form> @@ -254,7 +255,7 @@ <el-cascader v-model="form1.device" :options="options" - :props="props" + :props="propsH" :show-all-levels="false" @change="handleChange" filterable @@ -349,6 +350,17 @@ @confirmFun="confirmFun($event)" ></Mapdialog> </div> + + <el-dialog + title = "å·¥å•ä¿¡æ¯" + lock-scroll + :visible.sync="dialogVisible" + width="70%" + > + <div style="height:80vh;overflow:auto"> + <workOrder :linkOrderId="form.orderId"/> + </div> + </el-dialog> </div> </div> </template> @@ -361,15 +373,19 @@ import { inspectorList, allListUser } from "@/api/system/user"; import { deviceNodeTree } from "@/api/device/deviceInfo"; import MyFileUpload from '@/components/MyFileUpload'; import Mapdialog from "@/components/mapDialog/checkDeviceLoaction.vue"; +import workOrder from "../../workOrder/detail/index.vue" export default { + props:["resourceId"], name: "HiddenTroubleDetail", components: { MyFileUpload, - Mapdialog + Mapdialog, + workOrder }, data() { return { + dialogVisible: false, troubleId: '', isDisplay:false, showAndHide : false, @@ -380,7 +396,7 @@ export default { // 用户列表 userList: [], loadmap: false, - props: { + propsH: { value: "id", label: "name", level: "level", @@ -450,10 +466,14 @@ export default { }; }, created() { - + 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.getDicts("t_trouble_type").then(response => { this.typeOptions = response.data; @@ -481,12 +501,17 @@ export default { }, /** 详细信æ¯è·³è½¬ */ showDetail(orderId) { - this.$router.push({ + /* this.$router.push({ path: '/workOrder/detail', query:{ 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() { @@ -621,8 +646,8 @@ export default { this.showAndHide = false; } }, - - + + // 表å•é‡ç½® reset() { this.form1 = { diff --git a/gassafety-web/src/views/workOrder/detail/index.vue b/gassafety-web/src/views/workOrder/detail/index.vue index 6bb8cd5d0ce62ae2ea2a00703b64e284d5354cef..80f48819e2f905e663136896039aa047623cf8aa 100644 --- a/gassafety-web/src/views/workOrder/detail/index.vue +++ b/gassafety-web/src/views/workOrder/detail/index.vue @@ -4,11 +4,11 @@ <div style="padding-top: 10px;background: #fff;height: 100%;"> <el-row> <el-col :span="24" style="padding-left: 15px;margin-bottom: -10px;"> - <div style="height: 45px;" @click="$router.go(-1)"> + <div v-if="linkOrderId == undefined" 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> <div style="float: left;margin-top: 8px;margin-left: 5px;"><img src="../../../assets/logo/fanhui.png" - style="width: 25px;" alt=""></div> + style="width: 25px;" alt=""></div> </div> </el-col> </el-row> @@ -46,9 +46,12 @@ <el-col :span="6"> <el-form ref="form" v-model="form" :rules="rules" style="width: 100%;"> <el-form-item label="å·¥å•ç±»åž‹:" prop="orderType" style="margin-bottom: 0px;"> - <font v-if="form.orderType == 1">巡检信æ¯</font> - <font v-if="form.orderType == 2">éšæ‚£ä¿¡æ¯</font> - <font v-if="form.orderType == 3">报è¦ä¿¡æ¯</font> + <font v-if="form.orderType == 1 && linkOrderId != undefined">巡检信æ¯</font> + <font v-if="form.orderType == 2 && 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 == 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 label="å·¥å•ç¼–å·:" prop="orderId" style="margin-bottom: 0px;"> <font>{{form.orderId}}</font> @@ -82,7 +85,7 @@ <el-form-item label="设备å称:" prop="deviceName" style="margin-bottom: 0px;"> <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" - @node-click="handleNodeClick" v-if="form.orderType == 1" /> + @node-click="handleNodeClick" v-if="form.orderType == 1" /> </el-form-item> <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> @@ -145,7 +148,7 @@ <div class="block" style="width: 95%;"> <el-timeline ref="timeline"> <el-timeline-item v-for="(activity, index) in form.feedbackList" v-show='index>1?false:true' :key="index" - :timestamp="activity.feedbackTime"> + :timestamp="activity.feedbackTime"> <el-card> <el-row> @@ -181,17 +184,17 @@ <div class="feedbackTime-div"> <div class="feedbackTime"> <el-image :src="activity.pictureUrl1" :preview-src-list="[activity.pictureUrl1]" - v-if="activity.pictureUrl1 != null && activity.pictureUrl1 != ''" style="width: 100%;"> + v-if="activity.pictureUrl1 != null && activity.pictureUrl1 != ''" style="width: 100%;"> </el-image> </div> <div class="feedbackTime"> <el-image :src="activity.pictureUrl2" :preview-src-list="[activity.pictureUrl2]" - v-if="activity.pictureUrl2 != null && activity.pictureUrl2 != ''" style="width: 100%;"> + v-if="activity.pictureUrl2 != null && activity.pictureUrl2 != ''" style="width: 100%;"> </el-image> </div> <div class="feedbackTime"> <el-image :src="activity.pictureUrl3" :preview-src-list="[activity.pictureUrl3]" - v-if="activity.pictureUrl3 != null && activity.pictureUrl3 != ''" style="width: 100%;"> + v-if="activity.pictureUrl3 != null && activity.pictureUrl3 != ''" style="width: 100%;"> </el-image> </div> </div> @@ -205,7 +208,7 @@ <div style="width: 95%;position: relative;" @click="changeDisplay(scope)"> <!-- <el-button type="primary"> --> <i class="el-icon-arrow-down" v-if="isDisplay==false" - style="margin-left: 100px;color: #909399;font-size: 14px;"> + style="margin-left: 100px;color: #909399;font-size: 14px;"> <span style="text-decoration:underline">显示全部</span> </i> <i class="el-icon-arrow-up" v-else style="color: #909399;font-size: 14px;margin-left: 100px;"> @@ -250,9 +253,9 @@ <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)" - v-hasPermi="['workOrder:basicsInfo:edit']" v-if="form.orderStatus == 0">修改</el-button> + v-hasPermi="['workOrder:basicsInfo:edit']" v-if="form.orderStatus == 0 && 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">å½’æ¡£</el-button> + 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-form ref="form" :model="form" :rules="rules" label-width="100px"> <div v-if="this.title == 'å·¥å•ä¿¡æ¯ä¿®æ”¹'"> @@ -261,7 +264,7 @@ </el-form-item> <el-form-item label="指定执行人员" prop="appointInspector"> <el-select v-model="form.appointInspector" placeholder="请选择执行人员" filterable clearable size="small" - @change="setUserId"> + @change="setUserId"> <el-option v-for="item in inspector" :key="item.userId" :label="item.nickName" :value="item.userId"> </el-option> </el-select> @@ -294,6 +297,38 @@ </el-dialog> </div> </div> + <el-dialog + title="巡检信æ¯" + lock-scroll + :visible.sync="inspectionDialogVisible" + width="70%" + > + <div style="height:80vh;overflow:auto"> + <inspection :resourceId="form.resourceId"/> + </div> + </el-dialog> + + <el-dialog + title="éšæ‚£ä¿¡æ¯" + lock-scroll + :visible.sync="hiddenTroubleDialogVisible" + width="70%" + > + <div style="height:80vh;overflow:auto"> + <hiddenTrouble :resourceId="form.resourceId"/> + </div> + </el-dialog> + + <el-dialog + title="报è¦ä¿¡æ¯" + lock-scroll + :visible.sync="alarmDialogVisible" + width="70%" + > + <div style="height:80vh;overflow:auto"> + <alarm :resourceId="form.resourceId"/> + </div> + </el-dialog> </div> </template> @@ -304,13 +339,23 @@ import gaodeMap from "utils/gaodeMap.js"; import { map, DEVICE_TYPE } from "utils/gaodeMap.js"; import { inspectorList } from "@/api/system/user"; + import inspection from "../../deviceInspection/inspectiondetail/index.vue"; + import hiddenTrouble from "../../riskManagement/hiddenTroubleDetail/index.vue"; + import alarm from "../../dataMonitoring/alarmdetail/index.vue"; export default { + props:["linkOrderId"], name: "BasicsInfo", components: { + inspection, + hiddenTrouble, + alarm }, data() { return { + inspectionDialogVisible: false, + hiddenTroubleDialogVisible: false, + alarmDialogVisible: false, inspector: [], isDisplay: false, dialogImageUrl: '', @@ -381,7 +426,12 @@ created() { // 如果是跳转æ¥çš„,则接å—åˆå§‹åŒ–å‚æ•° // this.user_id = this.$route.query.id; //详细信æ¯é¡µæŽ¥æ”¶å‚æ•° - this.orderId = this.$route.query.orderId; + if(this.linkOrderId){ + this.orderId = this.linkOrderId; + }else{ + this.orderId = this.$route.query.orderId; + } + this.getList(); this.getDicts("t_order_status").then(response => { this.typeOptions = response.data; @@ -392,7 +442,6 @@ // this.getBasicsInfo(); }, mounted() { - this.getBasicsInfo(); }, methods: { @@ -449,47 +498,47 @@ }, getBasicsInfo() { ! - getBasicsInfo(this.orderId).then(response => { - this.form = response.data; - this.active = parseInt(response.data.orderStatus) + 1; - - if (this.form.deviceInfoList.length > 0) { - console.log("this.form.deviceInfoList", this.form.deviceInfoList) - let gaoMap = new gaodeMap("石家庄", [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]; - this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj); + getBasicsInfo(this.orderId).then(response => { + this.form = response.data; + this.active = parseInt(response.data.orderStatus) + 1; + + if (this.form.deviceInfoList.length > 0) { + console.log("this.form.deviceInfoList", this.form.deviceInfoList) + 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]; + this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj); + } } - } - 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("石家庄",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.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') { - // 获å–è®¾å¤‡åˆ—è¡¨æ ‘ - let data = { - key1: this.form.deviceInfoList, - key2: this.form.pipeList - }; - deviceTree(data).then(response => { - this.deviceOptions[0].childList = response.data; - }); - } - }); + if (this.form.orderType == '1') { + // 获å–è®¾å¤‡åˆ—è¡¨æ ‘ + let data = { + key1: this.form.deviceInfoList, + key2: this.form.pipeList + }; + deviceTree(data).then(response => { + this.deviceOptions[0].childList = response.data; + }); + } + }); }, // ç›é€‰èŠ‚点 // filterNode(value, data) { @@ -613,6 +662,17 @@ this.download(response.msg); this.exportLoading = false; }).catch(() => { }); + }, + detailInfos(type){ + if("1" == type){ + this.inspectionDialogVisible = true; + } + if("2" == type){ + this.hiddenTroubleDialogVisible = true; + } + if("3" == type){ + this.alarmDialogVisible = true; + } } } } @@ -686,4 +746,4 @@ font-size: 15px; font-weight: 900; } -</style> \ No newline at end of file +</style> diff --git a/gassafety-web/src/views/workOrder/feedbackdetail/index.vue b/gassafety-web/src/views/workOrder/feedbackdetail/index.vue index 6b85057b87f59aa8d371665bb634de689d2b3685..b24442c646ca3701f88996e1e64b411e77bc9e26 100644 --- a/gassafety-web/src/views/workOrder/feedbackdetail/index.vue +++ b/gassafety-web/src/views/workOrder/feedbackdetail/index.vue @@ -371,7 +371,7 @@ export default { this.getBasicsInfo(); }, mounted(){ - let gaoMap = new gaodeMap("石家庄"); + let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER); this.gaoMap = gaoMap; this.getBasicsInfo(); }, diff --git a/gassafety-web/vue.config.js b/gassafety-web/vue.config.js index d3ce23ad2cdf17b85ec51253711cea1ae50ba54b..c05b38c4684e8c7fefe9a6ff1ecb749903505b5e 100644 --- a/gassafety-web/vue.config.js +++ b/gassafety-web/vue.config.js @@ -34,7 +34,7 @@ module.exports = { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { // target: `http://36.148.23.59:8901/gassafety`, - target: `http://36.148.23.59:8901/gassafety`, + target: process.env.VUE_APP_TARGET, changeOrigin: true, pathRewrite: { ["^" + process.env.VUE_APP_BASE_API]: ""