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

优化一下

parent 8edec1e3
......@@ -99,7 +99,7 @@ export default {
obj: { typs: Object },
},
created() {
console.log("created", this.obj);
// console.log("created", this.obj);
},
mounted() {},
computed: {
......@@ -110,7 +110,7 @@ export default {
methods: {
moment,
mousedown(e) {
console.log("?");
// console.log("?");
return;
// console.log(this.$refs.previewImg)
this.$refs.previewImg.showViewer = true;
......
......@@ -115,7 +115,7 @@ export default {
return {};
},
created() {
console.log("created", this.obj);
// console.log("created", this.obj);
},
mounted() {},
computed: {
......@@ -136,7 +136,7 @@ export default {
methods: {
moment,
mousedown(e) {
console.log("??");
// console.log("??");
return;
// console.log(this.$refs.previewImg)
this.$refs.previewImg.showViewer = true;
......
......@@ -2,7 +2,7 @@
<div class="wrapper">
<span class="dot-left"></span>
<div class="top display-default">
<div class="left text">{{ data.deviceName }}</div>
<div class="left text">{{ data.troubleName }}</div>
<div class="right text">
<img
src="../../assets/images/closeBtn.png"
......@@ -16,59 +16,63 @@
<div class="eq-content display-default">
<div class="text-wrapper">
<div class="eq-text">
设备类型:<span>{{ title }}</span>
隐患类型:<span>{{ data.troubleType }}</span>
</div>
<div class="eq-text">
设备型号:<span>{{ data.deviceModel }}</span>
隐患等级:<span>{{ data.troubleLevel }}</span>
</div>
<div class="eq-text">
所属管道:<span>{{ data.pipeName }}</span>
处理状态:<span>{{
data.dealStatus ? dealStatus : "暂未处理"
}}</span>
</div>
<div class="eq-text">
物联网编号:<span>{{ data.iotNo }}</span>
上报人员:<span>{{ data.reportManName }}</span>
</div>
</div>
<div class="pic">
<img v-bind:src="data.iconUrl" alt="" />
<img v-bind:src="data.pictureUrl" alt="" />
</div>
</div>
<!-- 维修人员 -->
<div class="maintain-content">
<el-col :span="11">
<div>
<span>安装日期:</span>
<span>{{
moment(data.installationTime).format("YYYY-MM-DD")
}}</span>
<span>上报日期:</span>
<span>{{ moment(data.createTime).format("YYYY-MM-DD") }}</span>
</div>
</el-col>
<el-col :span="13">
<div>
<span>最后巡检日期:</span>
<span>{{ data.inspectionTime ? data.inspectionTime : "-" }}</span>
<span>{{
data.updateTime
? moment(data.updateTime).format("YYYY-MM-DD")
: "-"
}}</span>
</div>
</el-col>
<div>
<span>管道所在地址:</span>
<span>{{ data.pipeAddr }}</span>
<span>隐患所在地址:</span>
<span>{{ data.address }}</span>
</div>
<div>
<span>备注信息:</span>
<span>{{ data.remarks }} </span>
<span>{{ data.remarks ? data.remarks : "-" }} </span>
</div>
</div>
</div>
<!-- 报警状态 -->
<!-- 隐患关联设备状态 -->
<div class="warn-wrapper" v-if="true">
<div class="warn-content">
<div>
报警状态:<span>报警({{ data.alarmType }})</span>
关联设备:<span>({{ data.deviceName ? data.deviceName : "-" }})</span>
</div>
<div>
详细信息:<span>{{ data.alarmValue ? data.alarmValue : "-" }}</span>
设备类型:<span>{{ data.deviceType ? data.deviceType : "-" }}</span>
</div>
<div v-if="!orderId">
工单编号:<span>{{ data.orderId }}</span>
......
......@@ -13,7 +13,7 @@ export default {
},
},
created() {
console.log("data", this.data);
// console.log("data", this.data);
},
};
</script>
......
......@@ -158,7 +158,7 @@ export default {
// console.log("userId",item.getExtData().userId)
return item.getExtData().userId == this.formData.userId;
})[0];
console.log("target.moveMarker", target.moveMarker);
// console.log("target.moveMarker", target.moveMarker);
getInspectorLocations(this.formData).then((res) => {
if (res.code == 200) {
// 如果这个时间段没有移动轨迹
......
......@@ -91,10 +91,12 @@ class gaodeMap {
// console.log("缩放开始")
if (!this.onceFlag) {
this.onceFlag = true;
if (this.view) {
this.view.backFlag = false;
// 让抽屉不在隐身
this.view.drawerOpacity = true;
}
}
});
this.districtBoundaries();
......
......@@ -7,6 +7,7 @@ import lineInfoWindow from "../components/PopWindowGis/lineInfoWindow.vue";
import markerInfoWindow from "../components/PopWindowGis/markerInfoWindow.vue";
import removeLineInfoWindow from "../components/PopWindowGis/removeLineInfoWindow.vue";
import markerInfoWindowWarn from "../components/PopWindowGis/markerInfoWindowWarn.vue";
import troubleInfoWindowWarn from "../components/PopWindowGis/troubleInfoWindowWarn.vue";
import lineInfoWindowWarn from "../components/PopWindowGis/lineInfoWindowWarn.vue";
import { delDeviceInfo } from "@/api/device/deviceInfo";
......@@ -36,7 +37,7 @@ class gaodeMap {
polyLines = [];
//值班人员的单独数组,轨迹的时候使用
workerManArr = [];
troubles=[];
troubles = [];
// 值班人员对象的arr
workerManMarkArr = [];
// 是否开启新增
......@@ -276,7 +277,11 @@ class gaodeMap {
// 隐患
if (DEVICE_TYPE.TROUBLE == markerType) {
this.troubles.push(marker)
marker.markerType = markerType;
marker.data = data;
marker.infoWindow = infoWindow;
this.troubles.push(marker);
}
if (
......@@ -382,6 +387,8 @@ class gaodeMap {
// infoWindow.close();
this.workerManInfoWindow = e.target.infoWindow;
};
// 隐患
troubleOpen = e => {};
// 鼠标移入设备时候实行的函数
infoOpen = e => {
......@@ -454,7 +461,7 @@ class gaodeMap {
getMarketContent(Data, markerInfoWindow) {
let data = { ...Data };
data.class = this;
console.log("this.markerType", this.markerType);
// console.log("this.markerType", this.markerType);
switch (this.markerType) {
case DEVICE_TYPE.REGEULATORBOX: {
const dom = createPop(markerInfoWindow, {
......@@ -518,7 +525,7 @@ class gaodeMap {
return html;
}
case DEVICE_TYPE.TROUBLE: {
const dom = createPop(workerManInfowindow, {
const dom = createPop(troubleInfoWindowWarn, {
title: "隐患",
data: data,
map: map
......@@ -812,7 +819,6 @@ class gaodeMap {
// 警告状态时
const item = e.target.getExtData().lineData;
// console.log("item",item)
if (e.target.getExtData().lineData.alarmState == 1) {
infoWindow = this.lineMouseOver(polyline, lineInfoWindowWarn, item);
} 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 @@
ref="RightBototmData"
:list="rightBototmData"
/>
<!-- 报警工单 -->
<CreateWork
ref="CreateWork"
:open="createWorkOpen"
@callback="CreateWorkCallBack"
/>
<!-- 隐患工单 -->
<!-- <CreateWorkTrouble
ref="CreateWorkTrouble"
:open="createWorkTroubleOpen"
@callback="CreateWorkTroubleCallBack"
/> -->
<div
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