Commit 9c2f6836 authored by yaqizhang's avatar yaqizhang

Merge branch 'master' of http://111.61.77.35:9999/gengdidi/gassafety into master

parents 3b702688 03e2844b
...@@ -37,7 +37,7 @@ public class TDeviceReportDataController extends BaseController ...@@ -37,7 +37,7 @@ public class TDeviceReportDataController extends BaseController
private ITDeviceReportDataService tDeviceReportDataService; private ITDeviceReportDataService tDeviceReportDataService;
/** /**
* 查询设备监控列表 * 查询设备历史监控列表
*/ */
@PreAuthorize("@ss.hasPermi('dataMonitoring:reportData:list')") @PreAuthorize("@ss.hasPermi('dataMonitoring:reportData:list')")
@GetMapping("/list") @GetMapping("/list")
...@@ -49,7 +49,7 @@ public class TDeviceReportDataController extends BaseController ...@@ -49,7 +49,7 @@ public class TDeviceReportDataController extends BaseController
} }
/** /**
* 查询设备监控列表 * 查询设备实时监控列表
*/ */
@PreAuthorize("@ss.hasPermi('dataMonitoring:reportData:realtimeList')") @PreAuthorize("@ss.hasPermi('dataMonitoring:reportData:realtimeList')")
@GetMapping("/realtimeList") @GetMapping("/realtimeList")
......
...@@ -53,9 +53,9 @@ public class THiddenTroubleController extends BaseController ...@@ -53,9 +53,9 @@ public class THiddenTroubleController extends BaseController
* @return * @return
*/ */
@GetMapping("/getMapHiddenTroublelist") @GetMapping("/getMapHiddenTroublelist")
public AjaxResult getMapHiddenTroublelist() public AjaxResult getMapHiddenTroublelist(String troubleName)
{ {
List<HiddenTroubleVo> list = tHiddenTroubleService.getMapTHiddenTroubleList(); List<HiddenTroubleVo> list = tHiddenTroubleService.getMapTHiddenTroubleList(troubleName);
return AjaxResult.success(list); return AjaxResult.success(list);
} }
......
...@@ -33,7 +33,7 @@ public interface THiddenTroubleMapper ...@@ -33,7 +33,7 @@ public interface THiddenTroubleMapper
* @param * @param
* @return 隐患信息集合 * @return 隐患信息集合
*/ */
public List<THiddenTrouble> getMapTHiddenTroubleList(); public List<THiddenTrouble> getMapTHiddenTroubleList(String troubleName);
/** /**
* 新增隐患信息 * 新增隐患信息
......
...@@ -34,7 +34,7 @@ public interface ITHiddenTroubleService ...@@ -34,7 +34,7 @@ public interface ITHiddenTroubleService
* @param * @param
* @return 隐患信息集合 * @return 隐患信息集合
*/ */
public List<HiddenTroubleVo> getMapTHiddenTroubleList(); public List<HiddenTroubleVo> getMapTHiddenTroubleList(String troubleName);
/** /**
* 新增隐患信息 * 新增隐患信息
......
...@@ -117,10 +117,10 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService ...@@ -117,10 +117,10 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
* @return 隐患信息集合 * @return 隐患信息集合
*/ */
@Override @Override
public List<HiddenTroubleVo> getMapTHiddenTroubleList() public List<HiddenTroubleVo> getMapTHiddenTroubleList(String troubleName)
{ {
List<HiddenTroubleVo> list = new ArrayList<>(); List<HiddenTroubleVo> list = new ArrayList<>();
List<THiddenTrouble> troubleList = tHiddenTroubleMapper.getMapTHiddenTroubleList(); List<THiddenTrouble> troubleList = tHiddenTroubleMapper.getMapTHiddenTroubleList(troubleName);
if(troubleList.size() != 0) { if(troubleList.size() != 0) {
for (THiddenTrouble temp : troubleList) { for (THiddenTrouble temp : troubleList) {
......
...@@ -49,9 +49,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -49,9 +49,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by create_time desc order by create_time desc
</select> </select>
<select id="getMapTHiddenTroubleList" resultMap="THiddenTroubleResult"> <select id="getMapTHiddenTroubleList" parameterType="String" resultMap="THiddenTroubleResult">
<include refid="selectTHiddenTroubleVo"/> <include refid="selectTHiddenTroubleVo"/>
where is_del = '0' and (deal_status is null or deal_status = '3') <where> is_del = '0' and (deal_status is null or deal_status = '3')
<if test="troubleName != null"> and trouble_name like concat('%', #{troubleName}, '%')</if>
</where>
order by create_time desc order by create_time desc
</select> </select>
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</div> </div>
<div class="eq-text"> <div class="eq-text">
处理状态:<span>{{ 处理状态:<span>{{
data.dealStatus ? dealStatus : "暂未处理" data.dealStatus ? data.dealStatus : "暂未处理"
}}</span> }}</span>
</div> </div>
<div class="eq-text"> <div class="eq-text">
...@@ -69,10 +69,10 @@ ...@@ -69,10 +69,10 @@
<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.deviceName ? data.deviceName : "-" }})</span> 关联设备:<span>{{ data.deviceName ? data.deviceName : "-" }}</span>
</div> </div>
<div> <div>
设备类型:<span>{{ data.deviceType ? data.deviceType : "-" }}</span> 设备类型:<span>{{ data.deviceType ? this.deviceType[data.deviceType] : "-" }}</span>
</div> </div>
<div v-if="!orderId"> <div v-if="!orderId">
工单编号:<span>{{ data.orderId }}</span> 工单编号:<span>{{ data.orderId }}</span>
...@@ -80,11 +80,10 @@ ...@@ -80,11 +80,10 @@
</div> </div>
<div class="btn"> <div class="btn">
<span @mousedown.stop="deviceMore"> <span @mousedown.stop="deviceMore">
<el-button class="elbtn" type="primary">设备详情</el-button> <el-button class="elbtn" type="primary">隐患详情</el-button>
</span> </span>
<span v-if="orderId" @mousedown.stop="createWork"> <span v-if="orderId" @mousedown.stop="createWork">
<el-button <el-button
v-if="title == '压力表' || title == '流量计'"
class="elbtn" class="elbtn"
type="primary" type="primary"
>生成工单</el-button >生成工单</el-button
...@@ -111,6 +110,7 @@ export default { ...@@ -111,6 +110,7 @@ export default {
data() { data() {
return { return {
deviceType: { deviceType: {
0: "管道",
1: "调压箱", 1: "调压箱",
2: "阀门井", 2: "阀门井",
3: "流量计", 3: "流量计",
...@@ -121,7 +121,7 @@ export default { ...@@ -121,7 +121,7 @@ export default {
computed: { computed: {
orderId() { orderId() {
// 如果已经生成过工单,就不能再次生成了 // 如果已经生成过工单,就不能再次生成了
console.log("orderId",this.data.orderId)
// return this.data.orderId ? false : true; // return this.data.orderId ? false : true;
return this.data.orderId ? false : true; return this.data.orderId ? false : true;
}, },
...@@ -131,15 +131,15 @@ export default { ...@@ -131,15 +131,15 @@ export default {
createWork() { createWork() {
// 控制外层弹框 // 控制外层弹框
// console.log(this.data.view.$refs.CreateWork); // console.log(this.data.view.$refs.CreateWork);
this.data.view.$refs.CreateWork.alarmId = this.data.alarmId; this.data.class.view.$refs.CreateWorkTrouble.form.troubleId = this.data.troubleId;
this.data.view.$refs.CreateWork.open = true; this.data.class.view.$refs.CreateWorkTrouble.form.troubleName = this.data.troubleName;
this.data.view.$refs.CreateWork.gaoMap = this.data.view.gaoMap; this.data.class.view.$refs.CreateWorkTrouble.form.troubleType = this.data.troubleType;
this.data.class.view.$refs.CreateWorkTrouble.form.troubleLevel = this.data.troubleLevel;
this.data.class.view.$refs.CreateWorkTrouble.open = true;
this.data.class.view.$refs.CreateWorkTrouble.gaoMap = this.data.class.view.gaoMap;
// 改变外层回调 // 改变外层回调
// this.data.view.CreateWorkCallBack = this.CreateWorkCallBack; // this.data.view.CreateWorkCallBack = this.CreateWorkCallBack;
this.data.view.alarmObjChange({ this.data.class.view.troubleObjChange({troubleId:this.data.troubleId});
alarmId: this.data.alarmId,
type: "device",
});
}, },
// CreateWorkCallBack(e) { // CreateWorkCallBack(e) {
// // console.log("生成工单后传过来的参数", e); // // console.log("生成工单后传过来的参数", e);
...@@ -154,17 +154,17 @@ export default { ...@@ -154,17 +154,17 @@ export default {
// marker.setExtData(options); // marker.setExtData(options);
// }, // },
deviceMore() { deviceMore() {
this.data.view.$router.push({ this.data.class.view.$router.push({
path: "/dataMonitoring/alarmdetail", path: "/riskManagement/hiddenTroubleDetail",
query: { query: {
alarmId: this.data.alarmId, troubleId: this.data.troubleId,
dcviceType: this.deviceType[this.data.deviceType], // dcviceType: this.deviceType[this.data.deviceType],
}, },
}); });
}, },
// 查看工单 // 查看工单
checkWork() { checkWork() {
this.data.view.$router.push({ this.data.class.view.$router.push({
path: "/workOrder/detail", path: "/workOrder/detail",
query: { query: {
orderId: this.data.orderId, orderId: this.data.orderId,
...@@ -189,7 +189,7 @@ export default { ...@@ -189,7 +189,7 @@ export default {
.top { .top {
width: 100%; width: 100%;
height: 51px; height: 51px;
background-color: #ff5a67; background-color: #e6a23c;
.text { .text {
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
......
...@@ -274,13 +274,13 @@ class gaodeMap { ...@@ -274,13 +274,13 @@ class gaodeMap {
this.workerManMarkArr.push(marker); this.workerManMarkArr.push(marker);
} }
} }
// 隐患 // 隐患
if (DEVICE_TYPE.TROUBLE == markerType) { if (DEVICE_TYPE.TROUBLE == markerType) {
marker.markerType = markerType; marker.markerType = markerType;
marker.data = data; marker.data = data;
marker.infoWindow = infoWindow; marker.infoWindow = infoWindow;
marker.on("mouseover", this.troubleOpen);
marker.setExtData(data);
this.troubles.push(marker); this.troubles.push(marker);
} }
...@@ -388,7 +388,14 @@ class gaodeMap { ...@@ -388,7 +388,14 @@ class gaodeMap {
this.workerManInfoWindow = e.target.infoWindow; this.workerManInfoWindow = e.target.infoWindow;
}; };
// 隐患 // 隐患
troubleOpen = e => {}; troubleOpen = e => {
this.markerType = e.target.markerType;
e.target.content = this.getMarketContent(e.target.data);
e.target.infoWindow.setContent(e.target.content);
e.target.infoWindow.open(map, e.target.getPosition());
this.boxCollision(e.target.infoWindow.dom);
this.workerManInfoWindow = e.target.infoWindow;
};
// 鼠标移入设备时候实行的函数 // 鼠标移入设备时候实行的函数
infoOpen = e => { infoOpen = e => {
...@@ -631,7 +638,6 @@ class gaodeMap { ...@@ -631,7 +638,6 @@ class gaodeMap {
opacity: 0.1, opacity: 0.1,
image: require("../assets/images/trouble.png") image: require("../assets/images/trouble.png")
}); });
marker.workerPoint = true;
marker.setIcon(icon); marker.setIcon(icon);
break; break;
} }
...@@ -705,7 +711,7 @@ class gaodeMap { ...@@ -705,7 +711,7 @@ class gaodeMap {
}); });
marker.infoWindow = new AMap.InfoWindow({ marker.infoWindow = new AMap.InfoWindow({
isCustom: true, isCustom: true,
autoMove: false, autoMove: true,
content: dom.$el, content: dom.$el,
//信息船体偏移量 //信息船体偏移量
// offset: new AMap.Pixel(20, 20), // offset: new AMap.Pixel(20, 20),
...@@ -1079,8 +1085,11 @@ class gaodeMap { ...@@ -1079,8 +1085,11 @@ class gaodeMap {
} }
markerShow(type, bool) { markerShow(type, bool) {
this.markers.forEach(item => { this.markers.forEach(item => {
const { deviceType } = item.getExtData(); const { deviceType, troubleId } = item.getExtData();
if (deviceType == type) {
if (type == 8 && troubleId) {
bool ? item.show() : item.hide();
} else if (deviceType == type) {
// 如果是值班人员,还要隐藏身上的线条以及marker // 如果是值班人员,还要隐藏身上的线条以及marker
if (type == 9) { if (type == 9) {
if (bool) { if (bool) {
......
...@@ -124,7 +124,8 @@ ...@@ -124,7 +124,8 @@
size="normal" size="normal"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="showDetail(scope.row)"> @click="showDetail(scope.row)"
v-hasPermi="['dataMonitoring:deviceAlarm:query']">
详情 详情
</el-button> </el-button>
</template> </template>
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="showDetail(scope.row)" @click="showDetail(scope.row)"
v-hasPermi="['system:data:export']" v-hasPermi="['dataMonitoring:reportData:query']"
>详情</el-button> >详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
......
...@@ -97,7 +97,12 @@ ...@@ -97,7 +97,12 @@
<el-table-column label="设备型号" align="center" prop="deviceModel" /> <el-table-column label="设备型号" align="center" prop="deviceModel" />
<el-table-column label="所在地址" align="center" prop="deviceAddr" /> <el-table-column label="所在地址" align="center" prop="deviceAddr" />
<el-table-column label="安装日期" align="center" prop="installationTime" width="180" /> <el-table-column label="安装日期" align="center" prop="installationTime" width="180" />
<el-table-column label="最后巡检日期" align="center" prop="inspectionTime" width="180" /> <el-table-column label="最后巡检日期" align="center" prop="inspectionTime" width="180" >
<template slot-scope="scope">
<span v-if="scope.row.inspectionTime != null">{{ scope.row.inspectionTime }}</span>
<span v-if="scope.row.inspectionTime == null">-</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
...@@ -112,6 +117,7 @@ ...@@ -112,6 +117,7 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="showDetail(scope.row)" @click="showDetail(scope.row)"
v-hasPermi="['device:deviceInfo:query']"
>详情</el-button> >详情</el-button>
<el-button <el-button
size="mini" size="mini"
......
...@@ -988,7 +988,7 @@ input[type="radio"] { ...@@ -988,7 +988,7 @@ input[type="radio"] {
} }
.upPic { .upPic {
display: inline-block; display: inline-block;
margin-left: 64px; margin-left: 40px;
line-height: 48px; line-height: 48px;
font-size: 16px; font-size: 16px;
color: #053b6a; color: #053b6a;
......
...@@ -102,7 +102,12 @@ ...@@ -102,7 +102,12 @@
<el-table-column label="管道长度" align="center" prop="pipeLength" /> <el-table-column label="管道长度" align="center" prop="pipeLength" />
<el-table-column label="所在地址" align="center" prop="pipeAddr" /> <el-table-column label="所在地址" align="center" prop="pipeAddr" />
<el-table-column label="安装日期" align="center" prop="installationTime" width="180" /> <el-table-column label="安装日期" align="center" prop="installationTime" width="180" />
<el-table-column label="最后巡检日期" align="center" prop="inspectionTime" width="180" /> <el-table-column label="最后巡检日期" align="center" prop="inspectionTime" width="180" >
<template slot-scope="scope">
<span v-if="scope.row.inspectionTime != null">{{ scope.row.inspectionTime }}</span>
<span v-if="scope.row.inspectionTime == null">-</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
...@@ -117,6 +122,7 @@ ...@@ -117,6 +122,7 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="showDetail(scope.row)" @click="showDetail(scope.row)"
v-hasPermi="['device:pipe:query']"
>详情</el-button> >详情</el-button>
<el-button <el-button
size="mini" size="mini"
......
...@@ -51,7 +51,12 @@ ...@@ -51,7 +51,12 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="地址" align="center" prop="address"/> <el-table-column label="地址" align="center" prop="address"/>
<el-table-column label="计划描述" align="center" prop="remarks"/> <el-table-column label="计划描述" align="center" prop="remarks">
<template slot-scope="scope">
<span v-if="scope.row.remarks != null">{{ scope.row.remarks }}</span>
<span v-if="scope.row.remarks == null">-</span>
</template>
</el-table-column>
<el-table-column label="计划状态" align="center" prop="planStatus"> <el-table-column label="计划状态" align="center" prop="planStatus">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.planStatus == 0">未生成工单</span> <span v-if="scope.row.planStatus == 0">未生成工单</span>
...@@ -85,6 +90,7 @@ ...@@ -85,6 +90,7 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="showDetail(scope.row)" @click="showDetail(scope.row)"
v-hasPermi="['deviceInspection:inspectionPlan:query']"
>详情</el-button> >详情</el-button>
<el-button <el-button
size="normal" size="normal"
...@@ -270,6 +276,9 @@ ...@@ -270,6 +276,9 @@
endTime: [ endTime: [
{ required: true, message: "请选择结束时间", trigger: "blur" } { required: true, message: "请选择结束时间", trigger: "blur" }
], ],
address: [
{ required: true, message: "请输入地址", trigger: "blur" }
],
appointInspector: [ appointInspector: [
{ required: true, message: "请选择巡检人员", trigger: "blur" } { required: true, message: "请选择巡检人员", trigger: "blur" }
], ],
......
...@@ -130,11 +130,11 @@ export default { ...@@ -130,11 +130,11 @@ export default {
this.form.orderType = "3"; this.form.orderType = "3";
addBasicsInfo(this.form).then((response) => { addBasicsInfo(this.form).then((response) => {
if (response.code == 200) { if (response.code == 200) {
console.log(response.msg);
this.msgSuccess("生成工单成功"); this.msgSuccess("生成工单成功");
this.open = false; this.open = false;
console.log(response.msg);
this.$emit("callback", response.msg);
} }
this.$emit("callback", 999);
}); });
} }
}); });
......
...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
append-to-body append-to-body
> >
<el-form ref="form" :model="form" :rules="rules" label-width="130px"> <el-form ref="form" :model="form" :rules="rules" label-width="130px">
<el-form-item label="隐患名称" prop="deviceName"> <el-form-item label="隐患名称" prop="troubleName">
<font>{{ form.deviceName }}</font> <font>{{ form.troubleName }}</font>
</el-form-item> </el-form-item>
<el-form-item label="隐患类型" prop="alarmType"> <el-form-item label="隐患类型" prop="troubleType">
<font>{{ form.alarmType }}</font> <font>{{ form.troubleType }}</font>
</el-form-item> </el-form-item>
<el-form-item label="隐患级别" prop="alarmValue"> <el-form-item label="隐患级别" prop="troubleLevel">
<font>{{ form.alarmValue }}</font> <font>{{ form.troubleLevel }}</font>
</el-form-item> </el-form-item>
<el-form-item label="工单名称" prop="orderName"> <el-form-item label="工单名称" prop="orderName">
<el-input v-model="form.orderName" placeholder="请输入工单名称" /> <el-input v-model="form.orderName" placeholder="请输入工单名称" />
...@@ -69,9 +69,9 @@ export default { ...@@ -69,9 +69,9 @@ export default {
data() { data() {
return { return {
form: { form: {
deviceName: "", troubleName: "",
alarmType: "", troubleType: "",
alarmValue: "", troubleLevel: "",
orderName: "", orderName: "",
appointInspector: "", appointInspector: "",
remarks: "", remarks: "",
...@@ -95,24 +95,28 @@ export default { ...@@ -95,24 +95,28 @@ export default {
created() { created() {
// this.alarmId && this.handleIssue(this.alarmId); // this.alarmId && this.handleIssue(this.alarmId);
console.log("this.form");
}, },
watch: { watch: {
open(value, oldValue) { open(value, oldValue) {
if (value) { if (value) {
console.log(this.alarmId); this.getInspectorList()
this.handleIssue(this.alarmId); console.log("this.form",this.form);
// console.log(this.alarmId);
// this.handleIssue(this.alarmId);
} }
}, },
}, },
methods: { methods: {
handleIssue(alarmId) { // handleIssue(alarmId) {
this.getInspectorList(); // this.getInspectorList();
getDeviceAlarm(alarmId).then((response) => { // getDeviceAlarm(alarmId).then((response) => {
this.form = response.data; // this.form = response.data;
this.open = true; // this.open = true;
this.title = "填写工单信息"; // this.title = "填写工单信息";
}); // });
}, // },
getInspectorList() { getInspectorList() {
this.loading = true; this.loading = true;
...@@ -127,15 +131,15 @@ export default { ...@@ -127,15 +131,15 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.form.resourceId = this.form.alarmId; this.form.resourceId = this.form.troubleId;
this.form.orderType = "3"; this.form.orderType = "2";
addBasicsInfo(this.form).then((response) => { addBasicsInfo(this.form).then((response) => {
if (response.code == 200) { if (response.code == 200) {
console.log(response.msg);
this.msgSuccess("生成工单成功"); this.msgSuccess("生成工单成功");
this.open = false; this.open = false;
console.log(response.msg);
this.$emit("callback", response.msg);
} }
this.$emit("callback", 999);
}); });
} }
}); });
......
...@@ -76,11 +76,11 @@ ...@@ -76,11 +76,11 @@
@callback="CreateWorkCallBack" @callback="CreateWorkCallBack"
/> />
<!-- 隐患工单 --> <!-- 隐患工单 -->
<!-- <CreateWorkTrouble <CreateWorkTrouble
ref="CreateWorkTrouble" ref="CreateWorkTrouble"
:open="createWorkTroubleOpen" :open="createWorkTroubleOpen"
@callback="CreateWorkTroubleCallBack" @callback="CreateWorkTroubleCallBack"
/> --> />
<div <div
ref="drawer" ref="drawer"
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
<!-- 有数据 --> <!-- 有数据 -->
<template v-if="item.list.length > 0"> <template v-if="item.list.length > 0">
<!-- 设备以及管道 展示内容是一样的 --> <!-- 设备以及管道 展示内容是一样的 -->
<template v-if="item.value != 9"> <template v-if="item.value != 8 && item.value != 9">
<div class="list-wrapper"> <div class="list-wrapper">
<div class="thead"> <div class="thead">
<div class="no">序号</div> <div class="no">序号</div>
...@@ -173,6 +173,31 @@ ...@@ -173,6 +173,31 @@
</div> </div>
</div> </div>
</template> </template>
<!-- 隐患的展示 -->
<template v-else-if="item.value == 8">
<div class="list-wrapper">
<div class="thead">
<div class="no">序号</div>
<div class="code">隐患等级</div>
<div class="name">隐患名称</div>
</div>
<div
class="deviceList"
:class="{ topActive: index == 0 }"
v-for="(iten, index) in item.list"
:key="iten.deviceId + `` + index"
@mousedown.stop="panToo(iten, item)"
>
<div class="no">{{ iten.no + 1 }}</div>
<div :title="iten.troubleLevel" class="code">
{{ iten.troubleLevel }}
</div>
<div :title="iten.troubleName" class="name">
{{ iten.troubleName }}
</div>
</div>
</div>
</template>
<!-- 值班人员 展示不太一样--> <!-- 值班人员 展示不太一样-->
<template v-else-if="item.value == 9"> <template v-else-if="item.value == 9">
<div class="list-wrapper"> <div class="list-wrapper">
...@@ -198,6 +223,7 @@ ...@@ -198,6 +223,7 @@
</div> </div>
</div> </div>
</template> </template>
<!-- 翻页 --> <!-- 翻页 -->
<div class="goback"> <div class="goback">
<div class="btn-w"> <div class="btn-w">
...@@ -245,12 +271,14 @@ import { getAllDeviceInfo, countDeviceByType } from "@/api/device/deviceInfo"; ...@@ -245,12 +271,14 @@ import { getAllDeviceInfo, countDeviceByType } from "@/api/device/deviceInfo";
import { getMapHiddenTroublelist } from "@/api/riskManagement/hiddenTrouble"; import { getMapHiddenTroublelist } from "@/api/riskManagement/hiddenTrouble";
import RightBototmData from "./components/RightBototmData.vue"; import RightBototmData from "./components/RightBototmData.vue";
import CreateWork from "./components/CreateWork.vue"; import CreateWork from "./components/CreateWork.vue";
import CreateWorkTrouble from "./components/CreateWorkTrouble.vue";
import { getInspectorLocations } from "@/api/inspectorLocation/location"; import { getInspectorLocations } from "@/api/inspectorLocation/location";
export default { export default {
components: { components: {
RightBototmData, RightBototmData,
CreateWork, CreateWork,
CreateWorkTrouble,
}, },
data() { data() {
return { return {
...@@ -342,8 +370,12 @@ export default { ...@@ -342,8 +370,12 @@ export default {
bottomDataShow: true, bottomDataShow: true,
// 是否显示生成工单弹框 // 是否显示生成工单弹框
createWorkOpen: false, createWorkOpen: false,
//隐患工单
createWorkTroubleOpen: false,
// 查询用的 // 查询用的
alarmObj: { alarmId: "", type: "" }, alarmObj: { alarmId: "", type: "" },
troubleObj: null,
// 左边抽屉 内嵌scroll盒子的高 // 左边抽屉 内嵌scroll盒子的高
boxHeight: "", boxHeight: "",
drawerOpacity: false, drawerOpacity: false,
...@@ -477,6 +509,7 @@ export default { ...@@ -477,6 +509,7 @@ export default {
return getMapHiddenTroublelist().then((res) => { return getMapHiddenTroublelist().then((res) => {
console.log(res); console.log(res);
if (res.code == 200) { if (res.code == 200) {
this.troubleClassify(res.data);
res.data.forEach((item) => { res.data.forEach((item) => {
console.log("隐患", item); console.log("隐患", item);
this.gaoMap.addMarker(DEVICE_TYPE.TROUBLE, item); this.gaoMap.addMarker(DEVICE_TYPE.TROUBLE, item);
...@@ -734,6 +767,13 @@ export default { ...@@ -734,6 +767,13 @@ export default {
} else { } else {
this.gaoMap.markerShow(4, false); this.gaoMap.markerShow(4, false);
} }
// 隐患
if (this.leftBarNum.includes(8)) {
this.gaoMap.markerShow(8, true);
// this.panTo(item);
} else {
this.gaoMap.markerShow(8, false);
}
if (this.leftBarNum.includes(9)) { if (this.leftBarNum.includes(9)) {
this.gaoMap.markerShow(9, true); this.gaoMap.markerShow(9, true);
...@@ -769,6 +809,8 @@ export default { ...@@ -769,6 +809,8 @@ export default {
} else if (item.value == 9) { } else if (item.value == 9) {
// 工作人员 // 工作人员
this.workerManInfoWindowShow(iten, lat, lng); this.workerManInfoWindowShow(iten, lat, lng);
} else if (item.value == 8) {
this.trouleInfoWindowShow(iten, lat, lng)
} else { } else {
// 其他设备 // 其他设备
this.diveceInfoWindowShow(iten, lat, lng); this.diveceInfoWindowShow(iten, lat, lng);
...@@ -815,6 +857,26 @@ export default { ...@@ -815,6 +857,26 @@ export default {
this.gaoMap.infoOpen(e); this.gaoMap.infoOpen(e);
}; };
}, },
// 隐患infowindow
trouleInfoWindowShow(iten, lat, lng) {
const target = this.gaoMap.markers.filter((item) => {
return item.getExtData().troubleId == iten.troubleId;
})[0];
console.log("target", target);
const e = {
target,
lnglat: iten.path,
};
// 如果是原地不动,就直接执行
if (iten.path[0] == lng && iten.path[1] == lat) {
this.gaoMap.troubleOpen(e);
return;
}
// 因为地图移动的时候infowindow无法显示
this.gaoMap.handleInfoWindowOpenFunc = () => {
this.gaoMap.troubleOpen(e);
};
},
// workerMan,值班人员飞过去后侠士infowindow // workerMan,值班人员飞过去后侠士infowindow
workerManInfoWindowShow(iten, lat, lng) { workerManInfoWindowShow(iten, lat, lng) {
// console.log("iten",iten.userId) // console.log("iten",iten.userId)
...@@ -932,6 +994,20 @@ export default { ...@@ -932,6 +994,20 @@ export default {
this.allList[3] = lljArr; this.allList[3] = lljArr;
this.allList[4] = ylbArr; this.allList[4] = ylbArr;
}, },
// 隐患存储
troubleClassify(troubleData) {
const workManArr = troubleData.map((item, index) => {
return {
path: [item.longitude, item.latitude],
no: index,
troubleId: item.troubleId,
troubleName: item.troubleName,
troubleLevel: item.troubleLevel,
};
});
console.log("值班人员", workManArr);
this.allList[5] = workManArr;
},
// 值班人员 // 值班人员
workerManClassify(workManData) { workerManClassify(workManData) {
const workManArr = workManData.map((item, index) => { const workManArr = workManData.map((item, index) => {
...@@ -1174,10 +1250,13 @@ export default { ...@@ -1174,10 +1250,13 @@ export default {
this.initMap(); this.initMap();
this.leftBarNum = [1, 2, 3, 4, 7, 8, 9]; this.leftBarNum = [1, 2, 3, 4, 7, 8, 9];
}, },
// 改变弹框状态 // 改变工单弹框状态
openChange(bool) { // openChange(bool) {
this.createWorkOpen = bool; // this.createWorkOpen = bool;
}, // },
// openTroubleChange(bool) {
// this.createWorkTroubleOpen = bool;
// },
// 生成工单的回调 // 生成工单的回调
CreateWorkCallBack(e) { CreateWorkCallBack(e) {
if (!this.alarmObj.alarmId) return; if (!this.alarmObj.alarmId) return;
...@@ -1205,6 +1284,24 @@ export default { ...@@ -1205,6 +1284,24 @@ export default {
this.alarmObj = obj; this.alarmObj = obj;
console.log(this.alarmObj); console.log(this.alarmObj);
}, },
// 隐患
// 手动加入orderId
CreateWorkTroubleCallBack(e) {
// console.log("隐患嘿嘿嘿")
const trouble = this.gaoMap.troubles.filter((item) => {
console.log(item, this.troubleObj.troubleId);
return item.data.troubleId == this.troubleObj.troubleId;
})[0];
console.log("找到隐患了,是", trouble);
let options = trouble.getExtData();
// 暂时传值,到时候回重新刷新
options.orderId = e;
trouble.setExtData(options);
trouble.data.orderId = e;
},
troubleObjChange(obj) {
this.troubleObj = obj;
},
}, },
beforeDestroy() { beforeDestroy() {
...@@ -1518,7 +1615,7 @@ input[type="radio"] { ...@@ -1518,7 +1615,7 @@ input[type="radio"] {
} }
.upPic { .upPic {
display: inline-block; display: inline-block;
margin-left: 64px; margin-left: 40px;
line-height: 48px; line-height: 48px;
font-size: 16px; font-size: 16px;
color: #053b6a; color: #053b6a;
......
...@@ -102,6 +102,7 @@ ...@@ -102,6 +102,7 @@
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleIsDel(scope.row)" @click="handleIsDel(scope.row)"
v-hasPermi="['riskManagement:hiddenTrouble:query']"
v-if="scope.row.orderId == '' || scope.row.orderId == null" v-if="scope.row.orderId == '' || scope.row.orderId == null"
>作废 >作废
</el-button> </el-button>
...@@ -222,10 +223,13 @@ ...@@ -222,10 +223,13 @@
<font>{{form2.troubleName}}</font> <font>{{form2.troubleName}}</font>
</el-form-item> </el-form-item>
<el-form-item label="隐患类型"> <el-form-item label="隐患类型">
<font>{{form2.troubleType}}</font> <font v-if="form2.troubleType == 1">设备老化</font>
<font v-if="form2.troubleType == 2">质保过期</font>
</el-form-item> </el-form-item>
<el-form-item label="隐患级别"> <el-form-item label="隐患级别">
<font>{{form2.troubleLevel}}</font> <font v-if="form2.troubleLevel == 1">Ⅰ级</font>
<font v-if="form2.troubleLevel == 2">Ⅱ级</font>
<font v-if="form2.troubleLevel == 3">Ⅲ级</font>
</el-form-item> </el-form-item>
<el-form-item label="工单名称" prop="orderName" style="width: 720px"> <el-form-item label="工单名称" prop="orderName" style="width: 720px">
<el-input v-model="form2.orderName" placeholder="请输入工单名称" /> <el-input v-model="form2.orderName" placeholder="请输入工单名称" />
......
...@@ -84,10 +84,16 @@ ...@@ -84,10 +84,16 @@
</el-table-column> </el-table-column>
<el-table-column label="更新时间" align="center" prop="actualTime" width="180"> <el-table-column label="更新时间" align="center" prop="actualTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.actualTime) }}</span> <span v-if="scope.row.actualTime != null">{{ scope.row.actualTime }}</span>
<span v-if="scope.row.actualTime == null">-</span>
</template>
</el-table-column>
<el-table-column label="工单描述" align="center" prop="remarks" >
<template slot-scope="scope">
<span v-if="scope.row.remarks != null">{{ scope.row.remarks }}</span>
<span v-if="scope.row.remarks == null">-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="工单描述" align="center" prop="remarks" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
...@@ -111,6 +117,7 @@ ...@@ -111,6 +117,7 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="showDetail(scope.row)" @click="showDetail(scope.row)"
v-hasPermi="['workOrder:basicsInfo:query']"
>详情</el-button> >详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
......
...@@ -82,10 +82,16 @@ ...@@ -82,10 +82,16 @@
</el-table-column> </el-table-column>
<el-table-column label="更新时间" align="center" prop="actualTime" width="180"> <el-table-column label="更新时间" align="center" prop="actualTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.actualTime) }}</span> <span v-if="scope.row.actualTime != null">{{ scope.row.actualTime }}</span>
<span v-if="scope.row.actualTime == null">-</span>
</template>
</el-table-column>
<el-table-column label="工单描述" align="center" prop="remarks" >
<template slot-scope="scope">
<span v-if="scope.row.remarks != null">{{ scope.row.remarks }}</span>
<span v-if="scope.row.remarks == null">-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="工单描述" align="center" prop="remarks" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
...@@ -109,6 +115,7 @@ ...@@ -109,6 +115,7 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="showDetail(scope.row)" @click="showDetail(scope.row)"
v-hasPermi="['workOrder:basicsInfo:query']"
>详情</el-button> >详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -323,7 +330,7 @@ ...@@ -323,7 +330,7 @@
handleReceive(row) { handleReceive(row) {
if (row.orderStatus == '0') { if (row.orderStatus == '0') {
const orderIds = row.orderId, const orderIds = row.orderId,
orderName = roe.orderName; orderName = row.orderName;
this.$confirm('是否确认接收工单(' + orderName + orderIds + ")", "操作提示", { this.$confirm('是否确认接收工单(' + orderName + orderIds + ")", "操作提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
......
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