Commit 1d096feb authored by 纪泽龙's avatar 纪泽龙

优化一下

parent 8edec1e3
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
obj: { typs: Object }, obj: { typs: Object },
}, },
created() { created() {
console.log("created", this.obj); // console.log("created", this.obj);
}, },
mounted() {}, mounted() {},
computed: { computed: {
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
methods: { methods: {
moment, moment,
mousedown(e) { mousedown(e) {
console.log("?"); // console.log("?");
return; return;
// console.log(this.$refs.previewImg) // console.log(this.$refs.previewImg)
this.$refs.previewImg.showViewer = true; this.$refs.previewImg.showViewer = true;
......
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
return {}; return {};
}, },
created() { created() {
console.log("created", this.obj); // console.log("created", this.obj);
}, },
mounted() {}, mounted() {},
computed: { computed: {
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
methods: { methods: {
moment, moment,
mousedown(e) { mousedown(e) {
console.log("??"); // console.log("??");
return; return;
// console.log(this.$refs.previewImg) // console.log(this.$refs.previewImg)
this.$refs.previewImg.showViewer = true; this.$refs.previewImg.showViewer = true;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="wrapper"> <div class="wrapper">
<span class="dot-left"></span> <span class="dot-left"></span>
<div class="top display-default"> <div class="top display-default">
<div class="left text">{{ data.deviceName }}</div> <div class="left text">{{ data.troubleName }}</div>
<div class="right text"> <div class="right text">
<img <img
src="../../assets/images/closeBtn.png" src="../../assets/images/closeBtn.png"
...@@ -16,59 +16,63 @@ ...@@ -16,59 +16,63 @@
<div class="eq-content display-default"> <div class="eq-content display-default">
<div class="text-wrapper"> <div class="text-wrapper">
<div class="eq-text"> <div class="eq-text">
设备类型:<span>{{ title }}</span> 隐患类型:<span>{{ data.troubleType }}</span>
</div> </div>
<div class="eq-text"> <div class="eq-text">
设备型号:<span>{{ data.deviceModel }}</span> 隐患等级:<span>{{ data.troubleLevel }}</span>
</div> </div>
<div class="eq-text"> <div class="eq-text">
所属管道:<span>{{ data.pipeName }}</span> 处理状态:<span>{{
data.dealStatus ? dealStatus : "暂未处理"
}}</span>
</div> </div>
<div class="eq-text"> <div class="eq-text">
物联网编号:<span>{{ data.iotNo }}</span> 上报人员:<span>{{ data.reportManName }}</span>
</div> </div>
</div> </div>
<div class="pic"> <div class="pic">
<img v-bind:src="data.iconUrl" alt="" /> <img v-bind:src="data.pictureUrl" alt="" />
</div> </div>
</div> </div>
<!-- 维修人员 --> <!-- 维修人员 -->
<div class="maintain-content"> <div class="maintain-content">
<el-col :span="11"> <el-col :span="11">
<div> <div>
<span>安装日期:</span> <span>上报日期:</span>
<span>{{ <span>{{ moment(data.createTime).format("YYYY-MM-DD") }}</span>
moment(data.installationTime).format("YYYY-MM-DD")
}}</span>
</div> </div>
</el-col> </el-col>
<el-col :span="13"> <el-col :span="13">
<div> <div>
<span>最后巡检日期:</span> <span>最后巡检日期:</span>
<span>{{ data.inspectionTime ? data.inspectionTime : "-" }}</span> <span>{{
data.updateTime
? moment(data.updateTime).format("YYYY-MM-DD")
: "-"
}}</span>
</div> </div>
</el-col> </el-col>
<div> <div>
<span>管道所在地址:</span> <span>隐患所在地址:</span>
<span>{{ data.pipeAddr }}</span> <span>{{ data.address }}</span>
</div> </div>
<div> <div>
<span>备注信息:</span> <span>备注信息:</span>
<span>{{ data.remarks }} </span> <span>{{ data.remarks ? data.remarks : "-" }} </span>
</div> </div>
</div> </div>
</div> </div>
<!-- 报警状态 --> <!-- 隐患关联设备状态 -->
<div class="warn-wrapper" v-if="true"> <div class="warn-wrapper" v-if="true">
<div class="warn-content"> <div class="warn-content">
<div> <div>
报警状态:<span>报警({{ data.alarmType }})</span> 关联设备:<span>({{ data.deviceName ? data.deviceName : "-" }})</span>
</div> </div>
<div> <div>
详细信息:<span>{{ data.alarmValue ? data.alarmValue : "-" }}</span> 设备类型:<span>{{ data.deviceType ? data.deviceType : "-" }}</span>
</div> </div>
<div v-if="!orderId"> <div v-if="!orderId">
工单编号:<span>{{ data.orderId }}</span> 工单编号:<span>{{ data.orderId }}</span>
......
...@@ -13,7 +13,7 @@ export default { ...@@ -13,7 +13,7 @@ export default {
}, },
}, },
created() { created() {
console.log("data", this.data); // console.log("data", this.data);
}, },
}; };
</script> </script>
......
...@@ -158,7 +158,7 @@ export default { ...@@ -158,7 +158,7 @@ export default {
// console.log("userId",item.getExtData().userId) // console.log("userId",item.getExtData().userId)
return item.getExtData().userId == this.formData.userId; return item.getExtData().userId == this.formData.userId;
})[0]; })[0];
console.log("target.moveMarker", target.moveMarker); // console.log("target.moveMarker", target.moveMarker);
getInspectorLocations(this.formData).then((res) => { getInspectorLocations(this.formData).then((res) => {
if (res.code == 200) { if (res.code == 200) {
// 如果这个时间段没有移动轨迹 // 如果这个时间段没有移动轨迹
......
...@@ -91,10 +91,12 @@ class gaodeMap { ...@@ -91,10 +91,12 @@ class gaodeMap {
// console.log("缩放开始") // console.log("缩放开始")
if (!this.onceFlag) { if (!this.onceFlag) {
this.onceFlag = true; this.onceFlag = true;
if (this.view) {
this.view.backFlag = false; this.view.backFlag = false;
// 让抽屉不在隐身 // 让抽屉不在隐身
this.view.drawerOpacity = true; this.view.drawerOpacity = true;
} }
}
}); });
this.districtBoundaries(); this.districtBoundaries();
......
...@@ -7,6 +7,7 @@ import lineInfoWindow from "../components/PopWindowGis/lineInfoWindow.vue"; ...@@ -7,6 +7,7 @@ import lineInfoWindow from "../components/PopWindowGis/lineInfoWindow.vue";
import markerInfoWindow from "../components/PopWindowGis/markerInfoWindow.vue"; import markerInfoWindow from "../components/PopWindowGis/markerInfoWindow.vue";
import removeLineInfoWindow from "../components/PopWindowGis/removeLineInfoWindow.vue"; import removeLineInfoWindow from "../components/PopWindowGis/removeLineInfoWindow.vue";
import markerInfoWindowWarn from "../components/PopWindowGis/markerInfoWindowWarn.vue"; import markerInfoWindowWarn from "../components/PopWindowGis/markerInfoWindowWarn.vue";
import troubleInfoWindowWarn from "../components/PopWindowGis/troubleInfoWindowWarn.vue";
import lineInfoWindowWarn from "../components/PopWindowGis/lineInfoWindowWarn.vue"; import lineInfoWindowWarn from "../components/PopWindowGis/lineInfoWindowWarn.vue";
import { delDeviceInfo } from "@/api/device/deviceInfo"; import { delDeviceInfo } from "@/api/device/deviceInfo";
...@@ -36,7 +37,7 @@ class gaodeMap { ...@@ -36,7 +37,7 @@ class gaodeMap {
polyLines = []; polyLines = [];
//值班人员的单独数组,轨迹的时候使用 //值班人员的单独数组,轨迹的时候使用
workerManArr = []; workerManArr = [];
troubles=[]; troubles = [];
// 值班人员对象的arr // 值班人员对象的arr
workerManMarkArr = []; workerManMarkArr = [];
// 是否开启新增 // 是否开启新增
...@@ -276,7 +277,11 @@ class gaodeMap { ...@@ -276,7 +277,11 @@ class gaodeMap {
// 隐患 // 隐患
if (DEVICE_TYPE.TROUBLE == markerType) { if (DEVICE_TYPE.TROUBLE == markerType) {
this.troubles.push(marker) marker.markerType = markerType;
marker.data = data;
marker.infoWindow = infoWindow;
this.troubles.push(marker);
} }
if ( if (
...@@ -382,6 +387,8 @@ class gaodeMap { ...@@ -382,6 +387,8 @@ class gaodeMap {
// infoWindow.close(); // infoWindow.close();
this.workerManInfoWindow = e.target.infoWindow; this.workerManInfoWindow = e.target.infoWindow;
}; };
// 隐患
troubleOpen = e => {};
// 鼠标移入设备时候实行的函数 // 鼠标移入设备时候实行的函数
infoOpen = e => { infoOpen = e => {
...@@ -454,7 +461,7 @@ class gaodeMap { ...@@ -454,7 +461,7 @@ class gaodeMap {
getMarketContent(Data, markerInfoWindow) { getMarketContent(Data, markerInfoWindow) {
let data = { ...Data }; let data = { ...Data };
data.class = this; data.class = this;
console.log("this.markerType", this.markerType); // console.log("this.markerType", this.markerType);
switch (this.markerType) { switch (this.markerType) {
case DEVICE_TYPE.REGEULATORBOX: { case DEVICE_TYPE.REGEULATORBOX: {
const dom = createPop(markerInfoWindow, { const dom = createPop(markerInfoWindow, {
...@@ -518,7 +525,7 @@ class gaodeMap { ...@@ -518,7 +525,7 @@ class gaodeMap {
return html; return html;
} }
case DEVICE_TYPE.TROUBLE: { case DEVICE_TYPE.TROUBLE: {
const dom = createPop(workerManInfowindow, { const dom = createPop(troubleInfoWindowWarn, {
title: "隐患", title: "隐患",
data: data, data: data,
map: map map: map
...@@ -812,7 +819,6 @@ class gaodeMap { ...@@ -812,7 +819,6 @@ class gaodeMap {
// 警告状态时 // 警告状态时
const item = e.target.getExtData().lineData; const item = e.target.getExtData().lineData;
// console.log("item",item) // console.log("item",item)
if (e.target.getExtData().lineData.alarmState == 1) { if (e.target.getExtData().lineData.alarmState == 1) {
infoWindow = this.lineMouseOver(polyline, lineInfoWindowWarn, item); infoWindow = this.lineMouseOver(polyline, lineInfoWindowWarn, item);
} else { } else {
......
<template>
<el-dialog
:title="title"
:visible.sync="open"
:close="close"
width="800px"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
<el-form-item label="隐患名称" prop="deviceName">
<font>{{ form.deviceName }}</font>
</el-form-item>
<el-form-item label="隐患类型" prop="alarmType">
<font>{{ form.alarmType }}</font>
</el-form-item>
<el-form-item label="隐患级别" prop="alarmValue">
<font>{{ form.alarmValue }}</font>
</el-form-item>
<el-form-item label="工单名称" prop="orderName">
<el-input v-model="form.orderName" placeholder="请输入工单名称" />
</el-form-item>
<el-form-item label="指定执行人员" prop="appointInspector">
<el-select
v-model="form.appointInspector"
placeholder="请选择执行人员"
clearable
size="small"
@change="setUserId"
>
<el-option
v-for="item in inspector"
:key="item.userId"
:label="item.nickName"
:value="item.userId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="工单描述" prop="remarks">
<el-input
type="textarea"
v-model="form.remarks"
placeholder="请输入工单描述"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="loading" type="primary" @click="submitForm"
>确 定</el-button
>
<!-- <el-button @click="cancel">取 消</el-button> -->
<el-button @click.stop="close">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { inspectorList } from "@/api/system/user";
import { addBasicsInfo } from "@/api/workOrder/basicsInfo";
import { getDeviceAlarm } from "@/api/dataMonitoring/deviceAlarm";
export default {
//隐患工单
props: {
// 传进来一些内容
content: {
type: Object,
},
},
data() {
return {
form: {
deviceName: "",
alarmType: "",
alarmValue: "",
orderName: "",
appointInspector: "",
remarks: "",
},
gaoMap: "",
open: false,
title: "",
inspector: [],
loading: false,
alarmId: "",
rules: {
orderName: [
{ required: true, message: "工单名称不能为空", trigger: "blur" },
],
appointInspector: [
{ required: true, message: "请选择巡检人员", trigger: "blur" },
],
},
};
},
created() {
// this.alarmId && this.handleIssue(this.alarmId);
},
watch: {
open(value, oldValue) {
if (value) {
console.log(this.alarmId);
this.handleIssue(this.alarmId);
}
},
},
methods: {
handleIssue(alarmId) {
this.getInspectorList();
getDeviceAlarm(alarmId).then((response) => {
this.form = response.data;
this.open = true;
this.title = "填写工单信息";
});
},
getInspectorList() {
this.loading = true;
inspectorList().then((response) => {
this.inspector = response.data;
this.loading = false;
});
},
setUserId(val) {
this.form.appointInspector = val;
},
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.form.resourceId = this.form.alarmId;
this.form.orderType = "3";
addBasicsInfo(this.form).then((response) => {
if (response.code == 200) {
console.log(response.msg);
this.msgSuccess("生成工单成功");
this.open = false;
}
this.$emit("callback", 999);
});
}
});
},
close() {
console.log("关闭");
this.open = false;
},
},
};
</script>
<style>
</style>
\ No newline at end of file
...@@ -69,11 +69,18 @@ ...@@ -69,11 +69,18 @@
ref="RightBototmData" ref="RightBototmData"
:list="rightBototmData" :list="rightBototmData"
/> />
<!-- 报警工单 -->
<CreateWork <CreateWork
ref="CreateWork" ref="CreateWork"
:open="createWorkOpen" :open="createWorkOpen"
@callback="CreateWorkCallBack" @callback="CreateWorkCallBack"
/> />
<!-- 隐患工单 -->
<!-- <CreateWorkTrouble
ref="CreateWorkTrouble"
:open="createWorkTroubleOpen"
@callback="CreateWorkTroubleCallBack"
/> -->
<div <div
ref="drawer" ref="drawer"
......
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