Commit d9d60473 authored by yaqizhang's avatar yaqizhang

设备巡检

parent b0a5815a
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
<script> <script>
import { listDeviceAlarm, getDeviceAlarm } from "@/api/dataMonitoring/deviceAlarm"; import { listDeviceAlarm, getDeviceAlarm } from "@/api/dataMonitoring/deviceAlarm";
import { deviceTree } from "@/api/device/deviceInfo"; import { deviceTree } from "@/api/device/deviceInfo";
import gaodeMap from "utils/gaodeMap.js"; import gaodeMap from "utils/gaodeMap.js";
import {map, DEVICE_TYPE} from "utils/gaodeMap.js"; import {map, DEVICE_TYPE} from "utils/gaodeMap.js";
...@@ -145,7 +145,7 @@ import { listDeviceAlarm, getDeviceAlarm } from "@/api/dataMonitoring/deviceAlar ...@@ -145,7 +145,7 @@ import { listDeviceAlarm, getDeviceAlarm } from "@/api/dataMonitoring/deviceAlar
import { addBasicsInfo } from "@/api/workOrder/basicsInfo"; import { addBasicsInfo } from "@/api/workOrder/basicsInfo";
export default { export default {
name: "BasicsInfo", name: "DeviceAlarm",
components: { components: {
}, },
data() { data() {
...@@ -188,6 +188,7 @@ export default { ...@@ -188,6 +188,7 @@ export default {
devices: null, devices: null,
// 巡检员列表 // 巡检员列表
inspector: [], inspector: [],
alermId:'',
// 弹出层标题 // 弹出层标题
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
...@@ -212,7 +213,10 @@ export default { ...@@ -212,7 +213,10 @@ export default {
created() { created() {
// 如果是跳转来的,则接受初始化参数 // 如果是跳转来的,则接受初始化参数
// this.user_id = this.$route.query.id; //详细信息页接收参数 // this.user_id = this.$route.query.id; //详细信息页接收参数
this.orderId = this.$route.query.orderId;
this.alarmId = +this.$route.query.alarmId;
console.log("query",this.$route.query.alarmId)
this.getList(); this.getList();
this.getDicts("t_order_status").then(response => { this.getDicts("t_order_status").then(response => {
this.typeOptions = response.data; this.typeOptions = response.data;
...@@ -225,7 +229,7 @@ export default { ...@@ -225,7 +229,7 @@ export default {
mounted(){ mounted(){
let gaoMap = new gaodeMap("石家庄"); let gaoMap = new gaodeMap("石家庄");
this.gaoMap = gaoMap; this.gaoMap = gaoMap;
this.getDeviceAlarm(); // this.getDeviceAlarm();
this.initData(); this.initData();
this.drawPieChart(); this.drawPieChart();
this.main3(); this.main3();
...@@ -790,7 +794,7 @@ export default { ...@@ -790,7 +794,7 @@ export default {
}); });
}, },
getDeviceAlarm (){ getDeviceAlarm (){
getDeviceAlarm(this.orderId).then(response =>{ getDeviceAlarm(this.alarmId).then(response =>{
this.form = response.data; this.form = response.data;
this.active = parseInt(response.data.orderStatus) + 1; this.active = parseInt(response.data.orderStatus) + 1;
if(this.form.deviceInfoList.length>0){ if(this.form.deviceInfoList.length>0){
......
...@@ -321,7 +321,6 @@ ...@@ -321,7 +321,6 @@
this.inspectionPlanList = response.rows; this.inspectionPlanList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
console.log("this.inspectionPlanList",this.inspectionPlanList)
}); });
}, },
/** 详细信息跳转 */ /** 详细信息跳转 */
......
...@@ -32,10 +32,6 @@ ...@@ -32,10 +32,6 @@
<el-form-item label="检测地点:" prop="address"> <el-form-item label="检测地点:" prop="address">
<font>{{form.address}}</font> <font>{{form.address}}</font>
</el-form-item> </el-form-item>
<el-form-item label="计划执行时间:" prop="startTime">
<font>{{form.startTime}}{{form.endTime}}</font>
</el-form-item>
<el-form-item label="计划描述:" prop="remarks"> <el-form-item label="计划描述:" prop="remarks">
<div style="height: 90px;width: 250px; border: 1px solid rgb(187, 183, 183);margin-top: 10px;overflow-y: auto;padding: 5px;border-radius: 5px;"> <div style="height: 90px;width: 250px; border: 1px solid rgb(187, 183, 183);margin-top: 10px;overflow-y: auto;padding: 5px;border-radius: 5px;">
<font>{{form.remarks}} <font>{{form.remarks}}
...@@ -44,13 +40,9 @@ ...@@ -44,13 +40,9 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="float: left;width: 25%;"> <el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="float: left;width: 25%;">
<el-form-item label="设备类型:" prop="deviceType" v-if="form.orderType != 1"> <el-form-item label="计划执行时间:" prop="startTime">
<font v-if="form.deviceType == 0">管道</font> <font>{{form.startTime}}{{form.endTime}}</font>
<font v-if="form.deviceType == 1">调压阀</font> </el-form-item>
<font v-if="form.deviceType == 2">阀门井</font>
<font v-if="form.deviceType == 3">流量计</font>
<font v-if="form.deviceType == 4">压力表</font>
</el-form-item>
<el-form-item label="设备名称:" prop="deviceName"> <el-form-item label="设备名称:" prop="deviceName">
<!-- <font v-if="form.orderType != 1">{{form.deviceName}}</font> --> <!-- <font v-if="form.orderType != 1">{{form.deviceName}}</font> -->
<el-tree <el-tree
...@@ -97,6 +89,7 @@ ...@@ -97,6 +89,7 @@
import { addBasicsInfo } from "@/api/workOrder/basicsInfo"; import { addBasicsInfo } from "@/api/workOrder/basicsInfo";
import { inspectorList } from "@/api/system/user"; import { inspectorList } from "@/api/system/user";
import { deviceNodeTree } from "@/api/device/deviceInfo"; import { deviceNodeTree } from "@/api/device/deviceInfo";
import { deviceTree } from "@/api/device/deviceInfo";
export default { export default {
name: "InspectionPlan", name: "InspectionPlan",
...@@ -260,19 +253,19 @@ export default { ...@@ -260,19 +253,19 @@ export default {
getInspectionPlan(this.planId).then(response =>{ getInspectionPlan(this.planId).then(response =>{
this.form = response.data; this.form = response.data;
this.active = parseInt(response.data.orderStatus) + 1; this.active = parseInt(response.data.orderStatus) + 1;
console.log("this.form",this.form) console.log(this.form,2222222222222222)
if(this.form.inspectionPlanList.length>0){ if(this.form.deviceInfoList.length>0){
this.gaoMap.resetMapCenter([this.form.inspectionPlanList[0].longitude,this.form.inspectionPlanList[0].latitude]); this.gaoMap.resetMapCenter([this.form.deviceInfoList[0].longitude,this.form.deviceInfoList[0].latitude]);
} }
for(var i = 0; i < this.form.inspectionPlanList.length; i++){ for(var i = 0; i < this.form.deviceInfoList.length; i++){
let obj = this.form.inspectionPlanList[i]; let obj = this.form.deviceInfoList[i];
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj) this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj)
} }
if(this.form.orderType == '1') { if(this.form.orderType == '1') {
// 获取设备列表树 // 获取设备列表树
let data = { let data = {
key1:this.form.inspectionPlanList, key1:this.form.deviceInfoList,
key2:this.form.pipeList key2:this.form.pipeList
}; };
deviceTree(data).then(response => { deviceTree(data).then(response => {
......
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