Commit af61664b authored by yaqizhang's avatar yaqizhang

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

parents 92eabaee fc10f4fc
...@@ -77,7 +77,8 @@ public class CommonController ...@@ -77,7 +77,8 @@ public class CommonController
// String fileName = FileUploadUtils.upload(filePath, file); // String fileName = FileUploadUtils.upload(filePath, file);
// String url = serverConfig.getUrl() + fileName; // String url = serverConfig.getUrl() + fileName;
String fileName = file.getOriginalFilename(); String fileName = file.getOriginalFilename();
String url = serverConfig.getUrl() + FileUploadUtils.upload(filePath, file); String fileServer = serverConfig.getUrl().contains("127") && serverConfig.getUrl().contains("8093") && !filePath.contains("/data")? serverConfig.getUrl() : serverConfig.getUrl().replace("127.0.0.1:8903","36.148.23.59:8901");
String url = fileServer + FileUploadUtils.upload(filePath, file);
AjaxResult ajax = AjaxResult.success(); AjaxResult ajax = AjaxResult.success();
ajax.put("fileName", fileName); ajax.put("fileName", fileName);
ajax.put("url", url); ajax.put("url", url);
......
...@@ -37,7 +37,7 @@ public class TOrderFeedback extends BaseEntity ...@@ -37,7 +37,7 @@ public class TOrderFeedback extends BaseEntity
@Excel(name = "反馈时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "反馈时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date feedbackTime; private Date feedbackTime;
/** 是否存在隐患(0正常,1存在隐患) */ /** 是否存在隐患(1是,2否) */
@Excel(name = "是否存在隐患", readConverterExp = "0=正常,1存在隐患") @Excel(name = "是否存在隐患", readConverterExp = "0=正常,1存在隐患")
private String isHiddenDanger; private String isHiddenDanger;
......
...@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; ...@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.annotation.Excel; import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity; import com.zehong.common.core.domain.BaseEntity;
import com.zehong.system.domain.TDeviceInfo; import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.TOrderFeedback;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
...@@ -42,6 +43,9 @@ public class WorkOrderVo extends BaseEntity ...@@ -42,6 +43,9 @@ public class WorkOrderVo extends BaseEntity
/** 设备列表 */ /** 设备列表 */
private List<TDeviceInfo> deviceInfoList; private List<TDeviceInfo> deviceInfoList;
/** 反馈信息列表 */
private List<TOrderFeedback> feedbackList;
/** 设备数量 */ /** 设备数量 */
private int deviceNum; private int deviceNum;
...@@ -86,28 +90,12 @@ public class WorkOrderVo extends BaseEntity ...@@ -86,28 +90,12 @@ public class WorkOrderVo extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date actualTime; private Date actualTime;
/** 归档信息 */
private String archiving;
/** 备注 */ /** 备注 */
private String remarks; private String remarks;
/** 反馈内容 */
private String contents;
/** 反馈时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date feedbackTime;
/** 图片地址1 */
private String pictureUrl1;
/** 图片地址2 */
private String pictureUrl2;
/** 图片地址3 */
private String pictureUrl3;
/** 处理状态 */
private String dealStatus;
public void setOrderId(String orderId) public void setOrderId(String orderId)
{ {
this.orderId = orderId; this.orderId = orderId;
...@@ -169,6 +157,14 @@ public class WorkOrderVo extends BaseEntity ...@@ -169,6 +157,14 @@ public class WorkOrderVo extends BaseEntity
this.deviceInfoList = deviceInfoList; this.deviceInfoList = deviceInfoList;
} }
public List<TOrderFeedback> getFeedbackList() {
return feedbackList;
}
public void setFeedbackList(List<TOrderFeedback> feedbackList) {
this.feedbackList = feedbackList;
}
public int getDeviceNum() { public int getDeviceNum() {
return deviceNum; return deviceNum;
} }
...@@ -234,6 +230,7 @@ public class WorkOrderVo extends BaseEntity ...@@ -234,6 +230,7 @@ public class WorkOrderVo extends BaseEntity
{ {
return orderStatus; return orderStatus;
} }
public void setAppointInspector(Long appointInspector) public void setAppointInspector(Long appointInspector)
{ {
this.appointInspector = appointInspector; this.appointInspector = appointInspector;
...@@ -243,6 +240,7 @@ public class WorkOrderVo extends BaseEntity ...@@ -243,6 +240,7 @@ public class WorkOrderVo extends BaseEntity
{ {
return appointInspector; return appointInspector;
} }
public void setAllotTime(Date allotTime) public void setAllotTime(Date allotTime)
{ {
this.allotTime = allotTime; this.allotTime = allotTime;
...@@ -252,6 +250,7 @@ public class WorkOrderVo extends BaseEntity ...@@ -252,6 +250,7 @@ public class WorkOrderVo extends BaseEntity
{ {
return allotTime; return allotTime;
} }
public void setActualInspector(Long actualInspector) public void setActualInspector(Long actualInspector)
{ {
this.actualInspector = actualInspector; this.actualInspector = actualInspector;
...@@ -261,6 +260,7 @@ public class WorkOrderVo extends BaseEntity ...@@ -261,6 +260,7 @@ public class WorkOrderVo extends BaseEntity
{ {
return actualInspector; return actualInspector;
} }
public void setActualTime(Date actualTime) public void setActualTime(Date actualTime)
{ {
this.actualTime = actualTime; this.actualTime = actualTime;
...@@ -270,6 +270,7 @@ public class WorkOrderVo extends BaseEntity ...@@ -270,6 +270,7 @@ public class WorkOrderVo extends BaseEntity
{ {
return actualTime; return actualTime;
} }
public void setRemarks(String remarks) public void setRemarks(String remarks)
{ {
this.remarks = remarks; this.remarks = remarks;
...@@ -280,6 +281,14 @@ public class WorkOrderVo extends BaseEntity ...@@ -280,6 +281,14 @@ public class WorkOrderVo extends BaseEntity
return remarks; return remarks;
} }
public String getArchiving() {
return archiving;
}
public void setArchiving(String archiving) {
this.archiving = archiving;
}
public String getAppointInspectorName() { public String getAppointInspectorName() {
return appointInspectorName; return appointInspectorName;
} }
...@@ -296,54 +305,6 @@ public class WorkOrderVo extends BaseEntity ...@@ -296,54 +305,6 @@ public class WorkOrderVo extends BaseEntity
this.actualInspectorName = actualInspectorName; this.actualInspectorName = actualInspectorName;
} }
public String getContents() {
return contents;
}
public void setContents(String contents) {
this.contents = contents;
}
public Date getFeedbackTime() {
return feedbackTime;
}
public void setFeedbackTime(Date feedbackTime) {
this.feedbackTime = feedbackTime;
}
public String getPictureUrl1() {
return pictureUrl1;
}
public void setPictureUrl1(String pictureUrl1) {
this.pictureUrl1 = pictureUrl1;
}
public String getPictureUrl2() {
return pictureUrl2;
}
public void setPictureUrl2(String pictureUrl2) {
this.pictureUrl2 = pictureUrl2;
}
public String getPictureUrl3() {
return pictureUrl3;
}
public void setPictureUrl3(String pictureUrl3) {
this.pictureUrl3 = pictureUrl3;
}
public String getDealStatus() {
return dealStatus;
}
public void setDealStatus(String dealStatus) {
this.dealStatus = dealStatus;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
...@@ -62,6 +62,11 @@ public class TOrderFeedbackServiceImpl implements ITOrderFeedbackService ...@@ -62,6 +62,11 @@ public class TOrderFeedbackServiceImpl implements ITOrderFeedbackService
@Override @Override
public int insertTOrderFeedback(TOrderFeedback tOrderFeedback) public int insertTOrderFeedback(TOrderFeedback tOrderFeedback)
{ {
if("2".equals(tOrderFeedback.getIsHiddenDanger())){
tOrderFeedback.setDealStatus("1");
}
tOrderFeedback.setFeedbackTime(DateUtils.getNowDate());
String deviceCode = tOrderFeedback.getDeviceCode(); String deviceCode = tOrderFeedback.getDeviceCode();
String dealStatus = tOrderFeedback.getDealStatus(); String dealStatus = tOrderFeedback.getDealStatus();
...@@ -90,7 +95,7 @@ public class TOrderFeedbackServiceImpl implements ITOrderFeedbackService ...@@ -90,7 +95,7 @@ public class TOrderFeedbackServiceImpl implements ITOrderFeedbackService
order.setOrderStatus("2"); order.setOrderStatus("2");
tWorkOrderMapper.updateTWorkOrder(order); tWorkOrderMapper.updateTWorkOrder(order);
} }
tOrderFeedback.setFeedbackTime(DateUtils.getNowDate());
return tOrderFeedbackMapper.insertTOrderFeedback(tOrderFeedback); return tOrderFeedbackMapper.insertTOrderFeedback(tOrderFeedback);
} }
......
...@@ -139,14 +139,8 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService ...@@ -139,14 +139,8 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
workOrderVo.setDeviceInfoList(deviceInfoList); workOrderVo.setDeviceInfoList(deviceInfoList);
List<TOrderFeedback> feedbackList = tOrderFeedbackMapper.selectTOrderFeedbackByOrderId(tWorkOrder.getOrderId()); List<TOrderFeedback> feedbackList = tOrderFeedbackMapper.selectTOrderFeedbackByOrderId(tWorkOrder.getOrderId());
if(feedbackList.size() != 0){ if(feedbackList.size() != 0) {
TOrderFeedback feedback = feedbackList.get(0); workOrderVo.setFeedbackList(feedbackList);
workOrderVo.setContents(feedback.getContents());
workOrderVo.setFeedbackTime(feedback.getFeedbackTime());
workOrderVo.setDealStatus(feedback.getDealStatus());
workOrderVo.setPictureUrl1(feedback.getPictureUrl1() != null ? feedback.getPictureUrl1() : null);
workOrderVo.setPictureUrl2(feedback.getPictureUrl2() != null ? feedback.getPictureUrl2() : null);
workOrderVo.setPictureUrl3(feedback.getPictureUrl3() != null ? feedback.getPictureUrl3() : null);
} }
return workOrderVo; return workOrderVo;
......
...@@ -266,3 +266,29 @@ ...@@ -266,3 +266,29 @@
position: relative; position: relative;
float: right; float: right;
} }
// 上传按钮
.hide {
.el-upload--picture-card {
display: none;
}
}
// 所有的提示框标题
.el-dialog__header{
padding-bottom:0;
padding:0px;
height: 51px;
line-height: 50px;
background-color: #053b6a;
.el-dialog__title{
display: inline-block;
margin-left:22px;
color:#fff;
}
.el-dialog__headerbtn{
i{
color: #fff;
}
}
// background-color: ;
}
\ No newline at end of file
...@@ -118,11 +118,11 @@ ...@@ -118,11 +118,11 @@
.hideSidebar { .hideSidebar {
.sidebar-container { .sidebar-container {
width: 54px !important; // width: 54px !important;
} }
.main-container { .main-container {
margin-left: 54px; // margin-left: 54px;
} }
.submenu-title-noDropdown { .submenu-title-noDropdown {
......
...@@ -11,9 +11,11 @@ ...@@ -11,9 +11,11 @@
:on-success="handleUploadSuccess" :on-success="handleUploadSuccess"
:on-remove="handleRemove" :on-remove="handleRemove"
:on-preview="handleFileClick" :on-preview="handleFileClick"
:on-change="fileChange"
:show-file-list="true" :show-file-list="true"
:headers="headers" :headers="headers"
class="upload-file-uploader" class="upload-file-uploader"
:class="{hide:addShow}"
ref="upload" ref="upload"
> >
<!-- 上传按钮 --> <!-- 上传按钮 -->
...@@ -78,6 +80,7 @@ export default { ...@@ -78,6 +80,7 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
}, },
data() { data() {
return { return {
...@@ -89,6 +92,7 @@ export default { ...@@ -89,6 +92,7 @@ export default {
modal:false, modal:false,
dialogVisible:false, dialogVisible:false,
dialogImageUrl:"", dialogImageUrl:"",
addShow:true,
}; };
}, },
computed: { computed: {
...@@ -163,6 +167,7 @@ export default { ...@@ -163,6 +167,7 @@ export default {
// 文件列表移除文件 // 文件列表移除文件
handleRemove(file, fileList) { handleRemove(file, fileList) {
console.log("列表移除", file, fileList); console.log("列表移除", file, fileList);
this.addShow = fileList.length>0 ?true:false;
this.$emit("remove", file); this.$emit("remove", file);
}, },
// 删除文件 // 删除文件
...@@ -197,9 +202,15 @@ export default { ...@@ -197,9 +202,15 @@ export default {
return ""; return "";
} }
}, },
// 当改变列表改变时
fileChange(file,fileList){
this.addShow = fileList.length>0 ?true:false;
}
}, },
created() { created() {
// this.fileList = this.list; // this.fileList = this.list;
this.addShow = this.fileArr.length>0 ?true:false;
}, },
}; };
</script> </script>
...@@ -223,4 +234,5 @@ export default { ...@@ -223,4 +234,5 @@ export default {
.ele-upload-list__item-content-action .el-link { .ele-upload-list__item-content-action .el-link {
margin-right: 10px; margin-right: 10px;
} }
</style> </style>
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<span>{{ obj.inspectionTime }}</span> <span>{{ obj.inspectionTime }}</span>
</div> </div>
<div> <div>
<span>备注信息</span> <span>备注信息</span>
<span>{{ obj.remarks }} </span> <span>{{ obj.remarks }} </span>
</div> </div>
</div> </div>
...@@ -179,7 +179,7 @@ export default { ...@@ -179,7 +179,7 @@ export default {
vertical-align: top; vertical-align: top;
display: inline-block; display: inline-block;
word-break: break-all; word-break: break-all;
max-width: 280px; max-width: 250px;
} }
} }
} }
...@@ -213,4 +213,4 @@ export default { ...@@ -213,4 +213,4 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
</style> </style>
\ No newline at end of file
...@@ -2,34 +2,38 @@ ...@@ -2,34 +2,38 @@
<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">{{title}}</div> <div class="left text">{{data.deviceName}}</div>
<div class="right text"> <div class="right text">
<img src="../../assets/images/closeBtn.png" alt="" @click="map.clearInfoWindow()"/> <img src="../../assets/images/closeBtn.png" alt="" @click="map.clearInfoWindow()"/>
</div> </div>
</div> </div>
<!-- 设备信息 --> <!-- 设备信息 -->
<div class="eq-content display-default"> <div class="content">
<div class="text-wrapper"> <div class="eq-content display-default">
<div class="eq-text">设备名称:<span>{{data.deviceName}}</span></div> <div class="text-wrapper">
<div class="eq-text">设备型号:<span>{{data.deviceModel}}</span></div> <div class="eq-text">设备类型:<span>{{title}}</span></div>
<div class="eq-text">所属管道:<span>{{data.pipeCode}}</span></div> <div class="eq-text">设备型号:<span>{{data.deviceModel}}</span></div>
<div class="eq-text">设备状态:<span>报警</span></div> <div class="eq-text">所属管道:<span>{{data.pipeCode}}</span></div>
<div class="eq-text">物联网编号:<span>{{data.iotNo}}</span></div>
</div>
<div class="pic">
<img v-bind:src="data.iconUrl" alt="" />
</div>
</div> </div>
<div class="pic"> <!-- 维修人员 -->
<img v-bind:src="data.iconUrl" alt="" /> <div class="maintain-content">
<div>管道所在地址:<span>{{data.deviceAddr}}</span></div>
<div>安装日期:<span>{{data.installationTime}}</span></div>
<div>最后巡检日期:<span></span></div>
<div>备注信息:<span>{{data.remarks}}</span></div>
</div> </div>
<!-- 报警状态 -->
<!--<div class="warn-content">
<div>报警状态 <span>报警</span></div>
<div>详细信息:<span>管线两端设备压差较大,管线可能泄漏</span></div>
</div>-->
</div> </div>
<!-- 维修人员 -->
<div class="maintain-content">
<div>姓名: <span>{{data.linkman}}</span></div>
<div>电话: <span>{{data.phone}}</span></div>
<div>详细信息:<span>管线两端设备压差较大,管线可能泄漏</span></div>
</div>
<!-- 报警状态 -->
<div class="warn-content">
<div>报警状态 <span>报警</span></div>
<div>详细信息:<span>管线两端设备压差较大,管线可能泄漏</span></div>
</div>
</div> </div>
</template> </template>
...@@ -48,7 +52,6 @@ export default { ...@@ -48,7 +52,6 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.wrapper { .wrapper {
width: 406px; width: 406px;
height: 488px;
background: #fff; background: #fff;
border-radius: 4px; border-radius: 4px;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16); box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
...@@ -76,7 +79,6 @@ export default { ...@@ -76,7 +79,6 @@ export default {
height: 156px; height: 156px;
box-sizing: border-box; box-sizing: border-box;
padding: 13px 16px 13px 22px; padding: 13px 16px 13px 22px;
border-bottom: 1px solid #e2e2e2;
.text-wrapper { .text-wrapper {
padding-top: 1px; padding-top: 1px;
& > div { & > div {
...@@ -102,15 +104,20 @@ export default { ...@@ -102,15 +104,20 @@ export default {
.maintain-content { .maintain-content {
width: 100%; width: 100%;
height: 109px; height: 130px;
padding-left: 22px; padding-left: 22px;
padding-top: 16px; padding-top: 16px;
box-sizing: border-box; box-sizing: border-box;
border-bottom: 1px solid #e2e2e2;
& > div { & > div {
margin-bottom: 8px; margin-bottom: 8px;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
span {
vertical-align: top;
display: inline-block;
word-break: break-all;
max-width: 250px;
}
} }
} }
...@@ -192,4 +199,46 @@ export default { ...@@ -192,4 +199,46 @@ export default {
} }
.content {
max-height: 480px;
overflow: hidden;
overflow-y: auto;
.eq-content {
min-height: 156px;
box-sizing: border-box;
padding: 13px 22px 0px 22px;
// border-bottom: 1px solid #e2e2e2;
.text-wrapper {
padding-top: 1px;
& > div {
margin-bottom: 6px;
}
.eq-text {
font-size: 14px;
font-weight: 400;
color: #1d1d1d;
opacity: 1;
& > span {
vertical-align: top;
display: inline-block;
// white-space: nowrap;
// text-overflow: ellipsis;
// overflow: hidden;
word-break: break-all;
max-width: 88px;
}
}
}
.pic {
width: 177px;
height: 129px;
// background-color: black;
img {
width: 100%;
height: 100%;
}
}
}
}
</style> </style>
<template> <template>
<el-dialog <el-dialog
title="新增" :title="myTitle"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
:before-close="handleClose" :before-close="handleClose"
> >
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
:rules="rules" :rules="rules"
ref="editForm" ref="editForm"
:model="editForm" :model="editForm"
label-width="120px" label-width="135px"
size="mini"
> >
<el-col> <el-col>
<el-form-item v-show="false" label="管道id" prop="pipeId"> <el-form-item v-show="false" label="管道id" prop="pipeId">
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
<el-col> <el-col>
<el-form-item v-show="false" label="企业id" prop="enterpriseId"> <el-form-item v-show="false" label="企业id" prop="enterpriseId">
<el-input disabled v-model="editForm.enterpriseId"></el-input> <el-input disabled v-model="editForm.enterpriseId"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -41,7 +40,7 @@ ...@@ -41,7 +40,7 @@
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="管道长度" prop="pipeLength"> <el-form-item label="管道长度" prop="pipeLength">
<el-input type="number" min=0 v-model="editForm.pipeLength"> <el-input type="number" min="0" v-model="editForm.pipeLength">
<i <i
slot="suffix" slot="suffix"
style="color: #000; font-style: normal; margin-right: 10px" style="color: #000; font-style: normal; margin-right: 10px"
...@@ -225,14 +224,33 @@ export default { ...@@ -225,14 +224,33 @@ export default {
}, },
}; };
}, },
computed:{
myTitle(){
if(this.editForm.pipeId){
return `修改管道信息`
}else{
return `新增管道信息`
}
}
},
created() { created() {
console.log("lineData", this.lineData, this.lnglatsArr, this.pipeLength); console.log("lineData", this.lineData, this.lnglatsArr, this.pipeLength);
if (this.lineData?.pipeId) { if (this.lineData?.pipeId) {
this.editForm = { ...this.lineData }; this.editForm = { ...this.lineData };
} else {
// 如果是新建的里面天蝎过东西就存档
console.log("内部lineDate", this.target.getExtData());
const { lineData } = this.target.getExtData();
console.log(lineData)
if (lineData) {
this.editForm = { ...lineData };
}
} }
this.editForm.coordinates = getString(this.lnglatsArr); this.editForm.coordinates = getString(this.lnglatsArr);
// 如果有图片路径就赋显,如果没有就啥也没有 // 如果有图片路径就赋显,如果没有就啥也没有
this.fileArr = this.lineData.pipeId ? [{ url: this.editForm.iconUrl }] : []; this.fileArr = this.editForm?.iconUrl
? [{ url: this.editForm.iconUrl }]
: [];
}, },
methods: { methods: {
mouseup() { mouseup() {
...@@ -293,11 +311,17 @@ export default { ...@@ -293,11 +311,17 @@ export default {
this.remove(); this.remove();
}, },
handleClose(done) { handleClose(done) {
this.$confirm("确认关闭?") let options = this.target.getExtData();
.then((_) => { options.lineData = { ...this.editForm };
done(); this.target.setExtData(options);
}) // 把值带出去
.catch((_) => {}); done();
// this.$confirm("确认关闭?")
// .then((_) => {
// done();
// })
// .catch((_) => {});
}, },
// 图片上传成功 // 图片上传成功
fileFinshed(e) { fileFinshed(e) {
......
...@@ -2,63 +2,114 @@ ...@@ -2,63 +2,114 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="80%"
:before-close="handleClose"> :before-close="handleClose">
<el-form ref="form" :model="form" :rules="rules" label-width="135px"> <el-row>
<el-form-item label="所属管道" prop="pipeCode"> <el-form ref="form" :model="form" :rules="rules" label-width="135px">
<el-select v-model="form.pipeCode" placeholder="请选择所属管道"> <el-row>
<el-option <el-col :span="11">
v-for="item in pipeList" <el-form-item label="所属管道" prop="pipeCode">
:key="item.pipeCode" <el-select v-model="form.pipeCode" placeholder="请选择所属管道" style="width: 100%">
:label="item.pipeName" <el-option
:value="item.pipeCode"> v-for="item in pipeList"
</el-option> :key="item.pipeCode"
</el-select> :label="item.pipeName"
</el-form-item> :value="item.pipeCode"
<el-form-item label="设备名称" prop="deviceName"> >
<el-input v-model="form.deviceName" placeholder="请输入设备名称" /> </el-option>
</el-form-item> </el-select>
<el-form-item label="所在地址" prop="deviceAddr"> </el-form-item>
<el-input v-model="form.deviceAddr" placeholder="请输入所在地址" /> </el-col>
</el-form-item> </el-row>
<el-form-item label="设备型号" prop="deviceModel">
<el-input v-model="form.deviceModel" placeholder="请输入设备型号" /> <el-row>
</el-form-item> <el-col :span="11">
<el-form-item label="经度" prop="longitude"> <el-form-item label="设备名称" prop="deviceName">
<el-input v-model="form.longitude" placeholder="请输入经度" /> <el-input v-model="form.deviceName" placeholder="请输入设备名称" />
</el-form-item> </el-form-item>
<el-form-item label="纬度" prop="latitude"> </el-col>
<el-input v-model="form.latitude" placeholder="请输入纬度" />
</el-form-item> <el-col :span="11">
<el-form-item label="物联网编号" prop="iotNo"> <el-form-item label="设备型号" prop="deviceModel">
<el-input v-model="form.iotNo" placeholder="请输入物联网编号" /> <el-input v-model="form.deviceModel" placeholder="请输入设备型号" />
</el-form-item> </el-form-item>
<el-form-item label="设备图片上传" prop="iconUrl"> </el-col>
<MyFileUpload </el-row>
listType="picture-card"
@resFun="getFileInfo" <el-col :span="11">
@remove="listRemove" <el-form-item label="所在地址" prop="deviceAddr">
:fileArr="fileArr" <el-input v-model="form.deviceAddr" placeholder="请输入所在地址" />
/> </el-form-item>
</el-form-item> </el-col>
<el-form-item label="联系人" prop="linkman">
<el-input v-model="form.linkman" placeholder="请输入联系人" /> <el-col :span="11">
</el-form-item> <el-form-item label="物联网编号" prop="iotNo">
<el-form-item label="电话" prop="phone"> <el-input v-model="form.iotNo" placeholder="请输入物联网编号" />
<el-input v-model="form.phone" placeholder="请输入电话" /> </el-form-item>
</el-form-item> </el-col>
<el-form-item label="安装时间" prop="installationTime">
<el-date-picker clearable size="small" <el-col :span="22">
v-model="form.installationTime" <el-form-item label="经纬度坐标" prop="">
type="datetime" <el-card class="box-card">
value-format="yyyy-MM-dd HH:mm:ss" <div v-text="`[[${form.longitude},${form.latitude}]]`"></div>
placeholder="选择安装时间"> </el-card>
</el-date-picker> </el-form-item>
</el-form-item> </el-col>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" /> <!-- <el-col>
</el-form-item> <el-form-item label="纬度" prop="latitude">
</el-form> <el-input v-model="form.latitude" placeholder="请输入纬度" />
</el-form-item>
</el-col> -->
<el-col :span="11">
<el-form-item label="联系人" prop="linkman">
<el-input v-model="form.linkman" placeholder="请输入联系人" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="联系电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入联系电话" />
</el-form-item>
</el-col>
<el-col>
<el-form-item label="设备图片上传" prop="iconUrl">
<MyFileUpload
listType="picture-card"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileArr"
/>
<el-input v-show="false" disabled v-model="form.iconUrl"></el-input>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="安装时间" prop="installationTime">
<el-date-picker
clearable
size="small"
v-model="form.installationTime"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择安装时间"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="22">
<el-form-item label="备注" prop="remarks">
<el-input
type="textarea"
v-model="form.remarks"
placeholder="请输入备注"
/>
</el-form-item>
</el-col>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button> <el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="submitForm">确 定</el-button>
...@@ -84,14 +135,44 @@ ...@@ -84,14 +135,44 @@
}, },
dialogVisible : false, dialogVisible : false,
fileList: [], fileList: [],
// 表单校验
rules: {
},
map : null, map : null,
obj : null, obj : null,
gaoMap : null, gaoMap : null,
fileArr: [], fileArr: [],
pipeList: [] pipeList: [],
rules: {
pipeCode: [
{ required: true, message: "请选择所属管道", trigger: "blur" },
// { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
],
deviceName: [
{ required: true, message: "请输入设备名称", trigger: "blur" },
],
deviceModel: [
{ required: true, message: "请输入设备型号", trigger: "blur" },
],
deviceAddr: [
{ required: true, message: "请输入所在地址", trigger: "blur" },
],
iotNo: [
{ required: true, message: "请输入物联网编号", trigger: "blur" },
],
linkman: [
{ required: true, message: "请输入联系人", trigger: "blur" },
],
phone: [
{ required: true, message: "请输入联系电话", trigger: "blur" },
],
iconUrl: [{ required: true, message: "请上传图片", trigger: "change" }],
installationTime: [
{
// type: "date",
required: true,
message: "请选择日期",
trigger: "change",
},
],
},
} }
}, },
components: { components: {
...@@ -124,7 +205,6 @@ ...@@ -124,7 +205,6 @@
this.remove(); this.remove();
this.map.remove(this.obj); this.map.remove(this.obj);
this.form.deviceId = response.data; this.form.deviceId = response.data;
console.log(this.gaoMap,"addgaoMap")
this.gaoMap.addMarker(this.gaoMap.deviceType,this.form); this.gaoMap.addMarker(this.gaoMap.deviceType,this.form);
//this.gaoMap.placeSearch.clear(); //this.gaoMap.placeSearch.clear();
this.gaoMap.closeAddMarker(); this.gaoMap.closeAddMarker();
...@@ -143,12 +223,19 @@ ...@@ -143,12 +223,19 @@
}, },
handleClose(done) { handleClose(done) {
done(); done();
},
getPipeInfos(){
pipeAllInfoList({}).then((response) => {
this.pipeList = response.data;
});
} }
}, },
mounted(){ watch:{
pipeAllInfoList({}).then(response => { dialogVisible(val){
this.pipeList = response.data; if(val){
}); this.getPipeInfos();
}
}
} }
} }
</script> </script>
......
...@@ -2,63 +2,113 @@ ...@@ -2,63 +2,113 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="80%"
:before-close="handleClose"> :before-close="handleClose">
<el-form ref="form" :model="form" :rules="rules" label-width="135px"> <el-row>
<el-form-item label="所属管道" prop="pipeCode"> <el-form ref="form" :model="form" :rules="rules" label-width="135px">
<el-select v-model="form.pipeCode" placeholder="请选择所属管道"> <el-row>
<el-option <el-col :span="11">
v-for="item in pipeList" <el-form-item label="所属管道" prop="pipeCode">
:key="item.pipeCode" <el-select v-model="form.pipeCode" placeholder="请选择所属管道" style="width: 100%">
:label="item.pipeName" <el-option
:value="item.pipeCode"> v-for="item in pipeList"
</el-option> :key="item.pipeCode"
</el-select> :label="item.pipeName"
</el-form-item> :value="item.pipeCode"
<el-form-item label="设备名称" prop="deviceName"> >
<el-input v-model="form.deviceName" placeholder="请输入设备名称" /> </el-option>
</el-form-item> </el-select>
<el-form-item label="所在地址" prop="deviceAddr"> </el-form-item>
<el-input v-model="form.deviceAddr" placeholder="请输入所在地址" /> </el-col>
</el-form-item> </el-row>
<el-form-item label="设备型号" prop="deviceModel">
<el-input v-model="form.deviceModel" placeholder="请输入设备型号" /> <el-row>
</el-form-item> <el-col :span="11">
<el-form-item label="经度" prop="longitude"> <el-form-item label="设备名称" prop="deviceName">
<el-input v-model="form.longitude" placeholder="请输入经度" /> <el-input v-model="form.deviceName" placeholder="请输入设备名称" />
</el-form-item> </el-form-item>
<el-form-item label="纬度" prop="latitude"> </el-col>
<el-input v-model="form.latitude" placeholder="请输入纬度" />
</el-form-item> <el-col :span="11">
<el-form-item label="物联网编号" prop="iotNo"> <el-form-item label="设备型号" prop="deviceModel">
<el-input v-model="form.iotNo" placeholder="请输入物联网编号" /> <el-input v-model="form.deviceModel" placeholder="请输入设备型号" />
</el-form-item> </el-form-item>
<el-form-item label="设备图片上传" prop="iconUrl"> </el-col>
<MyFileUpload </el-row>
listType="picture-card" <el-col :span="11">
@resFun="getFileInfo" <el-form-item label="所在地址" prop="deviceAddr">
@remove="listRemove" <el-input v-model="form.deviceAddr" placeholder="请输入所在地址" />
:fileArr="fileArr" </el-form-item>
/> </el-col>
</el-form-item>
<el-form-item label="联系人" prop="linkman"> <el-col :span="11">
<el-input v-model="form.linkman" placeholder="请输入联系人" /> <el-form-item label="物联网编号" prop="iotNo">
</el-form-item> <el-input v-model="form.iotNo" placeholder="请输入物联网编号" />
<el-form-item label="电话" prop="phone"> </el-form-item>
<el-input v-model="form.phone" placeholder="请输入电话" /> </el-col>
</el-form-item>
<el-form-item label="安装时间" prop="installationTime"> <el-col :span="22">
<el-date-picker clearable size="small" <el-form-item label="经纬度坐标" prop="">
v-model="form.installationTime" <el-card class="box-card">
type="datetime" <div v-text="`[[${form.longitude},${form.latitude}]]`"></div>
value-format="yyyy-MM-dd HH:mm:ss" </el-card>
placeholder="选择安装时间"> </el-form-item>
</el-date-picker> </el-col>
</el-form-item>
<el-form-item label="备注" prop="remarks"> <!-- <el-col>
<el-input v-model="form.remarks" placeholder="请输入备注" /> <el-form-item label="纬度" prop="latitude">
</el-form-item> <el-input v-model="form.latitude" placeholder="请输入纬度" />
</el-form> </el-form-item>
</el-col> -->
<el-col :span="11">
<el-form-item label="联系人" prop="linkman">
<el-input v-model="form.linkman" placeholder="请输入联系人" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="联系电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入联系电话" />
</el-form-item>
</el-col>
<el-col>
<el-form-item label="设备图片上传" prop="iconUrl">
<MyFileUpload
listType="picture-card"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileArr"
/>
<el-input v-show="false" disabled v-model="form.iconUrl"></el-input>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="安装时间" prop="installationTime">
<el-date-picker
clearable
size="small"
v-model="form.installationTime"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择安装时间"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="22">
<el-form-item label="备注" prop="remarks">
<el-input
type="textarea"
v-model="form.remarks"
placeholder="请输入备注"
/>
</el-form-item>
</el-col>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button> <el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="submitForm">确 定</el-button>
...@@ -84,14 +134,44 @@ ...@@ -84,14 +134,44 @@
}, },
dialogVisible : false, dialogVisible : false,
fileList: [], fileList: [],
// 表单校验
rules: {
},
map : null, map : null,
obj : null, obj : null,
gaoMap : null, gaoMap : null,
fileArr: [], fileArr: [],
pipeList: [] pipeList: [],
rules: {
pipeCode: [
{ required: true, message: "请选择所属管道", trigger: "blur" },
// { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
],
deviceName: [
{ required: true, message: "请输入设备名称", trigger: "blur" },
],
deviceModel: [
{ required: true, message: "请输入设备型号", trigger: "blur" },
],
deviceAddr: [
{ required: true, message: "请输入所在地址", trigger: "blur" },
],
iotNo: [
{ required: true, message: "请输入物联网编号", trigger: "blur" },
],
linkman: [
{ required: true, message: "请输入联系人", trigger: "blur" },
],
phone: [
{ required: true, message: "请输入联系电话", trigger: "blur" },
],
iconUrl: [{ required: true, message: "请上传图片", trigger: "change" }],
installationTime: [
{
// type: "date",
required: true,
message: "请选择日期",
trigger: "change",
},
],
},
} }
}, },
components: { components: {
...@@ -141,12 +221,19 @@ ...@@ -141,12 +221,19 @@
listRemove(e) { listRemove(e) {
this.form.url = ""; this.form.url = "";
this.fileArr = []; this.fileArr = [];
},
getPipeInfos(){
pipeAllInfoList({}).then((response) => {
this.pipeList = response.data;
});
} }
}, },
mounted(){ watch:{
pipeAllInfoList({}).then(response => { dialogVisible(val){
this.pipeList = response.data; if(val){
}); this.getPipeInfos();
}
}
} }
} }
</script> </script>
......
...@@ -6,12 +6,17 @@ ...@@ -6,12 +6,17 @@
> >
<template v-for="(item, index) in topMenus"> <template v-for="(item, index) in topMenus">
<!-- <el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber" --> <!-- <el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber" -->
<el-menu-item :style="" :index="item.path" :key="index" v-if="index < visibleNumber"> <el-menu-item
:style=""
<!-- 导航栏左侧图标 --> :index="item.path"
<!-- <svg-icon :icon-class="item.meta.icon" /> --> :key="index"
{{ item.meta.title }}</el-menu-item> v-if="index < visibleNumber"
<div class="menu-item-div"></div> >
<!-- 导航栏左侧图标 -->
<!-- <svg-icon :icon-class="item.meta.icon" /> -->
{{ item.meta.title }}
</el-menu-item>
<!-- <div class="menu-item-div"></div> -->
</template> </template>
<!-- 顶部菜单超出数量折叠 --> <!-- 顶部菜单超出数量折叠 -->
...@@ -32,7 +37,7 @@ ...@@ -32,7 +37,7 @@
<script> <script>
import { constantRoutes } from "@/router"; import { constantRoutes } from "@/router";
import '../../common/font/font.css' import "../../common/font/font.css";
export default { export default {
data() { data() {
return { return {
...@@ -41,7 +46,7 @@ export default { ...@@ -41,7 +46,7 @@ export default {
// 是否为首次加载 // 是否为首次加载
isFrist: false, isFrist: false,
// 当前激活菜单的 index // 当前激活菜单的 index
currentIndex: undefined currentIndex: undefined,
}; };
}, },
computed: { computed: {
...@@ -55,9 +60,9 @@ export default { ...@@ -55,9 +60,9 @@ export default {
if (menu.hidden !== true) { if (menu.hidden !== true) {
// 兼容顶部栏一级菜单内部跳转 // 兼容顶部栏一级菜单内部跳转
if (menu.path === "/") { if (menu.path === "/") {
topMenus.push(menu.children[0]); topMenus.push(menu.children[0]);
} else { } else {
topMenus.push(menu); topMenus.push(menu);
} }
} }
}); });
...@@ -73,12 +78,14 @@ export default { ...@@ -73,12 +78,14 @@ export default {
this.routers.map((router) => { this.routers.map((router) => {
for (var item in router.children) { for (var item in router.children) {
if (router.children[item].parentPath === undefined) { if (router.children[item].parentPath === undefined) {
if(router.path === "/") { if (router.path === "/") {
router.children[item].path = "/redirect/" + router.children[item].path; router.children[item].path =
"/redirect/" + router.children[item].path;
} else { } else {
if(!this.ishttp(router.children[item].path)) { if (!this.ishttp(router.children[item].path)) {
router.children[item].path = router.path + "/" + router.children[item].path; router.children[item].path =
} router.path + "/" + router.children[item].path;
}
} }
router.children[item].parentPath = router.path; router.children[item].parentPath = router.path;
} }
...@@ -103,17 +110,17 @@ export default { ...@@ -103,17 +110,17 @@ export default {
} }
var routes = this.activeRoutes(activePath); var routes = this.activeRoutes(activePath);
if (routes.length === 0) { if (routes.length === 0) {
activePath = this.currentIndex || this.routers[0].path activePath = this.currentIndex || this.routers[0].path;
this.activeRoutes(activePath); this.activeRoutes(activePath);
} }
return activePath; return activePath;
}, },
}, },
beforeMount() { beforeMount() {
window.addEventListener('resize', this.setVisibleNumber) window.addEventListener("resize", this.setVisibleNumber);
}, },
beforeDestroy() { beforeDestroy() {
window.removeEventListener('resize', this.setVisibleNumber) window.removeEventListener("resize", this.setVisibleNumber);
}, },
mounted() { mounted() {
this.setVisibleNumber(); this.setVisibleNumber();
...@@ -126,6 +133,7 @@ export default { ...@@ -126,6 +133,7 @@ export default {
}, },
// 菜单选择事件 // 菜单选择事件
handleSelect(key, keyPath) { handleSelect(key, keyPath) {
console.log(key)
this.currentIndex = key; this.currentIndex = key;
if (this.ishttp(key)) { if (this.ishttp(key)) {
// http(s):// 路径新窗口打开 // http(s):// 路径新窗口打开
...@@ -148,14 +156,14 @@ export default { ...@@ -148,14 +156,14 @@ export default {
} }
}); });
} }
if(routes.length > 0) { if (routes.length > 0) {
this.$store.commit("SET_SIDEBAR_ROUTERS", routes); this.$store.commit("SET_SIDEBAR_ROUTERS", routes);
} }
return routes; return routes;
}, },
ishttp(url) { ishttp(url) {
return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1 return url.indexOf("http://") !== -1 || url.indexOf("https://") !== -1;
} },
}, },
}; };
</script> </script>
...@@ -176,33 +184,39 @@ export default { ...@@ -176,33 +184,39 @@ export default {
} }
.el-menu--horizontal > .el-menu-item.is-active { .el-menu--horizontal > .el-menu-item.is-active {
border-bottom: 3px solid #{'var(--theme)'}; border-bottom: 3px solid #{"var(--theme)"};
/* box-shadow: inset 2px 2px 20px #5CD9D4; */ /* box-shadow: inset 2px 2px 20px #5CD9D4; */
color: #5CD9D4; color: #5cd9d4;
} }
/* submenu item */ /* submenu item */
.el-menu--horizontal > .el-submenu .el-submenu__title { .el-menu--horizontal > .el-submenu .el-submenu__title {
height: 50px !important; height: 50px !important;
line-height: 50px !important; line-height: 50px !important;
} }
.el-menu--horizontal > .el-menu-item:not(.is-disabled):hover, .el-menu--horizontal > .el-menu-item:not(.is-disabled):focus{ .el-menu--horizontal > .el-menu-item:not(.is-disabled):hover,
.el-menu--horizontal > .el-menu-item:not(.is-disabled):focus {
background-color: rgba(0, 0, 0, 0); background-color: rgba(0, 0, 0, 0);
/* opacity: 0; */ /* opacity: 0; */
/* box-shadow: inset 2px 2px 20px #5CD9D4; */ /* box-shadow: inset 2px 2px 20px #5CD9D4; */
color: #fff; color: #fff;
} }
.menu-item-div{ .menu-item-div {
width: 2px; width: 2px;
height: 30px; height: 30px;
margin-top: 25px; margin-top: 25px;
background-color: rgb(190, 189, 189); background-color: rgb(190, 189, 189);
float: left; float: left;
background: linear-gradient(130deg, rgba(0, 0, 0, 0) 0%,rgba(255,255,255,0.7) 50%, rgba(0, 0, 0, 0) 100%); background: linear-gradient(
130deg,
rgba(0, 0, 0, 0) 0%,
rgba(255, 255, 255, 0.7) 50%,
rgba(0, 0, 0, 0) 100%
);
&:last-child { &:last-child {
width: 0px; width: 0px;
height: 0px; height: 0px;
} }
} }
</style> </style>
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)"> <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}"> <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)"/><br> <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)"/><br>
<item :title="onlyOneChild.meta.title" /> <!-- <item :title="onlyOneChild.meta.title" /> -->
{{onlyOneChild.meta.title}}
</el-menu-item> </el-menu-item>
</app-link> </app-link>
</template> </template>
......
<template> <template>
<div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}"> <div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}">
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" /> <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar class="sidebar-container" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" /> <Sidebar class="sidebar-container" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
<div :class="{hasTagsView:needTagsView}" class="main-container"> <div :class="{hasTagsView:needTagsView}" class="main-container">
<div :class="{'fixed-header':fixedHeader}"> <div :class="{'fixed-header':fixedHeader}">
<navbar /> <navbar />
......
...@@ -142,6 +142,16 @@ class gaodeMap { ...@@ -142,6 +142,16 @@ class gaodeMap {
offset: new AMap.Pixel(24, -38), offset: new AMap.Pixel(24, -38),
anchor: "left-top" anchor: "left-top"
}); });
infoWindow.on("mouseover",function () {
let options = map.getStatus();
options.scrollWheel = false;
map.setStatus(options);
});
infoWindow.on("mouseout",function () {
let options = map.getStatus();
options.scrollWheel = true;
map.setStatus(options);
});
let marker = new AMap.Marker({ let marker = new AMap.Marker({
position: [data.longitude, data.latitude], position: [data.longitude, data.latitude],
map: map, map: map,
...@@ -154,7 +164,7 @@ class gaodeMap { ...@@ -154,7 +164,7 @@ class gaodeMap {
marker.on("mouseout", infoClose); marker.on("mouseout", infoClose);
marker.setExtData(data); marker.setExtData(data);
that.deviceType = markerType; that.deviceType = markerType;
let editWindow = that.createInfowindow(); let editWindow = that.createInfowindow("编辑");
editWindow.fileArr = editWindow.fileArr =
data.iconUrl != "" && data.iconUrl != undefined data.iconUrl != "" && data.iconUrl != undefined
? [{ url: data.iconUrl }] ? [{ url: data.iconUrl }]
...@@ -167,7 +177,8 @@ class gaodeMap { ...@@ -167,7 +177,8 @@ class gaodeMap {
editWindow.form = e.target.getExtData(); editWindow.form = e.target.getExtData();
editWindow.show(); editWindow.show();
} else if ("delete" == that.mapOperateType) { } else if ("delete" == that.mapOperateType) {
vue.$confirm("是否删除"+e.target.getExtData().deviceName, "提示", { let diviceType = {"2":"调压箱","3":"阀门井","4":"流量计","7":"压力表",};
vue.$confirm('是否删除名称为"'+e.target.getExtData().deviceName+'"的'+diviceType[markerType]+" ?", "提示", {
type: "warning" type: "warning"
// center: true // center: true
}).then(() => { }).then(() => {
...@@ -181,7 +192,7 @@ class gaodeMap { ...@@ -181,7 +192,7 @@ class gaodeMap {
message: "已取消删除" message: "已取消删除"
}); });
}); });
} else { } /*else {
//map.setZoomAndCenter(13, e.target.getPosition()); //map.setZoomAndCenter(13, e.target.getPosition());
let infoWindow = new AMap.InfoWindow({ let infoWindow = new AMap.InfoWindow({
isCustom: true, isCustom: true,
...@@ -190,7 +201,7 @@ class gaodeMap { ...@@ -190,7 +201,7 @@ class gaodeMap {
}); });
infoWindow.setContent(e.target.content); infoWindow.setContent(e.target.content);
infoWindow.open(map, e.target.getPosition()); infoWindow.open(map, e.target.getPosition());
} }*/
}); });
marker.on("dragend", function(e) { marker.on("dragend", function(e) {
editWindow.form.longitude = e.lnglat.lng; editWindow.form.longitude = e.lnglat.lng;
...@@ -203,12 +214,21 @@ class gaodeMap { ...@@ -203,12 +214,21 @@ class gaodeMap {
//map.setFitView(); //map.setFitView();
function infoClose(e) { function infoClose(e) {
infoWindow.close(map, e.target.getPosition()); let options = map.getStatus();
options.scrollWheel = true;
map.setStatus(options);
//infoWindow.close(map, e.target.getPosition());
} }
function infoOpen(e) { function infoOpen(e) {
let options = map.getStatus();
options.scrollWheel = false;
map.setStatus(options);
infoWindow.setContent(e.target.content); infoWindow.setContent(e.target.content);
infoWindow.open(map, e.target.getPosition()); infoWindow.open(map, e.target.getPosition());
that.markerInfoWindow = infoWindow;
} }
} }
...@@ -371,7 +391,7 @@ class gaodeMap { ...@@ -371,7 +391,7 @@ class gaodeMap {
let polyline = new AMap.Polyline({ let polyline = new AMap.Polyline({
path, path,
strokeColor: "#F7FE38", strokeColor: "#F7FE38",
strokeWeight: 8, strokeWeight: 4,
strokeOpacity: 0.9, strokeOpacity: 0.9,
zIndex: 50, zIndex: 50,
bubble: true, bubble: true,
...@@ -477,9 +497,10 @@ class gaodeMap { ...@@ -477,9 +497,10 @@ class gaodeMap {
} }
// 创建一条新的线 // 创建一条新的线
createNewLine() { createNewLine() {
map.remove(this.markerOverlays);
this.mouseTool.polyline({ this.mouseTool.polyline({
// bubbles:false, // bubbles:false,
strokeWeight: 9, strokeWeight: 4,
strokeColor: "#80d8ff", strokeColor: "#80d8ff",
extData: { extData: {
type: "newLine", type: "newLine",
...@@ -504,8 +525,9 @@ class gaodeMap { ...@@ -504,8 +525,9 @@ class gaodeMap {
} }
} }
// 新建line增加编辑以及右键菜单 // 新建line增加编辑以及右键菜单
closeLineInfoWindow() { closeInfoWindow() {
this.showInfoWindow && this.showInfoWindow.close(); this.showInfoWindow && this.showInfoWindow.close();
this.markerInfoWindow && this.markerInfoWindow.close();
} }
// 新line与老line添加点击事件 // 新line与老line添加点击事件
newLineAddEvent(obj) { newLineAddEvent(obj) {
...@@ -545,6 +567,7 @@ class gaodeMap { ...@@ -545,6 +567,7 @@ class gaodeMap {
const pipeLength = obj.getLength(); const pipeLength = obj.getLength();
// 传回来的数据 如果是新管道就是空 // 传回来的数据 如果是新管道就是空
const lineData = type == "newLine" ? {} : obj.getExtData().lineData; const lineData = type == "newLine" ? {} : obj.getExtData().lineData;
// const lineData = obj.getExtData().lineData;
console.log("lineData===================>传入组件的数据", lineData); console.log("lineData===================>传入组件的数据", lineData);
this.infoWindowPipelineView({ this.infoWindowPipelineView({
target: obj, target: obj,
...@@ -579,7 +602,7 @@ class gaodeMap { ...@@ -579,7 +602,7 @@ class gaodeMap {
lineData: { pipeName } lineData: { pipeName }
} = obj.getExtData(); } = obj.getExtData();
vue vue
.$confirm(`是否删除${pipeName}`, "提示", { .$confirm(`是否删除名称为"${pipeName}"的管道 ?`, "提示", {
// confirmButtonText: "确定", // confirmButtonText: "确定",
// cancelButtonText: "取消", // cancelButtonText: "取消",
type: "warning" type: "warning"
...@@ -675,7 +698,7 @@ class gaodeMap { ...@@ -675,7 +698,7 @@ class gaodeMap {
this.mouseTool.on("draw", function(e) { this.mouseTool.on("draw", function(e) {
if (e.obj.getExtData().type != "newLine") { if (e.obj.getExtData().type != "newLine") {
map.remove(that.markerOverlays); map.remove(that.markerOverlays);
const device = that.createInfowindow(); const device = that.createInfowindow("新增");
device.map = map; device.map = map;
device.obj = e.obj; device.obj = e.obj;
device.gaoMap = that; device.gaoMap = that;
...@@ -692,16 +715,32 @@ class gaodeMap { ...@@ -692,16 +715,32 @@ class gaodeMap {
device.show(); device.show();
}); });
e.obj.on("mouseover",function () {
that.mouseTool.close();
});
e.obj.on("mouseout",function () {
that.draw(that.deviceType);
})
that.markerOverlays.push(e.obj); that.markerOverlays.push(e.obj);
} }
if (e.obj && e.obj.getExtData().type == "newLine") { if (e.obj && e.obj.getExtData().type == "newLine") {
console.log("挂上事件"); console.log("挂上事件");
that.newLineAddEvent(e.obj); that.newLineAddEvent(e.obj);
// 记录这条线 // 记录这条线
that.newLineObj = e.obj; // console.log(e.obj.getPath().length)
// 如果只有一个点,并没有连成线的时候就不close 大于一个点的时候才执行clse
console.log(that.lineType)
if (e.obj.getPath().length > 1) {
that.newLineObj = e.obj;
that.mouseTool.close();
} else {
// that.newLineObj = null;
}
// 关闭 // 关闭
that.mouseTool.close();
// 创建一条新线,然后在点地图的时候删除原来的旧线 // 创建一条新线,然后在点地图的时候删除原来的旧线
// that.createNewLine(); // that.createNewLine();
...@@ -720,29 +759,29 @@ class gaodeMap { ...@@ -720,29 +759,29 @@ class gaodeMap {
/** /**
* 创建弹框事件 * 创建弹框事件
*/ */
createInfowindow() { createInfowindow(val) {
switch (this.deviceType) { switch (this.deviceType) {
case DEVICE_TYPE.PIPEPLINE: { case DEVICE_TYPE.PIPEPLINE: {
break; break;
} }
case DEVICE_TYPE.REGEULATORBOX: { case DEVICE_TYPE.REGEULATORBOX: {
return createPop(regulatorBox, { return createPop(regulatorBox, {
title: "调压箱" title: val+ "调压箱"
}); });
} }
case DEVICE_TYPE.VALUEWELL: { case DEVICE_TYPE.VALUEWELL: {
return createPop(valveWell, { return createPop(valveWell, {
title: "阀门井" title: val+ "阀门井"
}); });
} }
case DEVICE_TYPE.FLOWMETER: { case DEVICE_TYPE.FLOWMETER: {
return createPop(flowMeter, { return createPop(flowMeter, {
title: "流量计" title: val+ "流量计"
}); });
} }
case DEVICE_TYPE.PRESSUREGAGE: { case DEVICE_TYPE.PRESSUREGAGE: {
return createPop(flowMeter, { return createPop(flowMeter, {
title: "压力表" title: val+ "压力表"
}); });
} }
} }
...@@ -811,18 +850,18 @@ class gaodeMap { ...@@ -811,18 +850,18 @@ class gaodeMap {
let that = this; let that = this;
AMap.plugin(["AMap.AutoComplete", "AMap.PlaceSearch"], function() { AMap.plugin(["AMap.AutoComplete", "AMap.PlaceSearch"], function() {
//输入提示 //输入提示
var autoOptions = { // var autoOptions = {
input: inputId // input: inputId
}; // };
let auto = new AMap.AutoComplete(autoOptions); // let auto = new AMap.AutoComplete(autoOptions);
that.placeSearch = new AMap.PlaceSearch({ that.placeSearch = new AMap.PlaceSearch({
map: map map: map
}); });
//构造地点查询类 //构造地点查询类
auto.on("select", function(e) { // auto.on("select", function(e) {
that.searchSelectAdcode = e.poi.adcode; // that.searchSelectAdcode = e.poi.adcode;
that.searchSelectName = e.poi.name; // that.searchSelectName = e.poi.name;
}); // });
}); });
} }
......
...@@ -69,17 +69,11 @@ ...@@ -69,17 +69,11 @@
id="tipinput" id="tipinput"
class="search-input" class="search-input"
/> />
<el-button <el-button icon="el-icon-search" class="search-but" @click="search()"
icon="el-icon-search"
class="search-but"
@click="search()"
>搜索</el-button >搜索</el-button
> >
<el-button <el-button icon="el-icon-refresh" class="refresh-but" @click="refreshMap()"
icon="el-icon-refresh" >重置</el-button
class="refresh-but"
@click="refreshMap()"
>重置</el-button
> >
<div class="leftBar-wrapper"> <div class="leftBar-wrapper">
...@@ -157,7 +151,7 @@ export default { ...@@ -157,7 +151,7 @@ export default {
this.initMap(); this.initMap();
}, },
methods: { methods: {
initMap(){ initMap() {
let gaoMap = new gaodeMap("石家庄"); let gaoMap = new gaodeMap("石家庄");
this.gaoMap = gaoMap; this.gaoMap = gaoMap;
window.addEventListener("click", this.barClose); window.addEventListener("click", this.barClose);
...@@ -169,7 +163,7 @@ export default { ...@@ -169,7 +163,7 @@ export default {
// 左边的Bar修改值 // 左边的Bar修改值
leftBarChange(item) { leftBarChange(item) {
// this.leftBarNum= this.leftBarNum != item.value ? item.value:0; // this.leftBarNum= this.leftBarNum != item.value ? item.value:0;
const index = this.leftBarNum.indexOf(item.value); const index = this.leftBarNum.indexOf(item.value);
if (index >= 0) { if (index >= 0) {
this.leftBarNum.splice(index, 1); this.leftBarNum.splice(index, 1);
...@@ -181,44 +175,37 @@ export default { ...@@ -181,44 +175,37 @@ export default {
if (this.leftBarNum.includes(1)) { if (this.leftBarNum.includes(1)) {
this.gaoMap.lineShow(true); this.gaoMap.lineShow(true);
}else{ } else {
this.gaoMap.lineShow(false); this.gaoMap.lineShow(false);
} }
// console.log("marks",this.gaoMap.markers) // console.log("marks",this.gaoMap.markers)
// this.gaoMap.markerShow(); // this.gaoMap.markerShow();
if (this.leftBarNum.includes(2)) { if (this.leftBarNum.includes(2)) {
this.gaoMap.markerShow(1,true) this.gaoMap.markerShow(1, true);
}else{ } else {
this.gaoMap.markerShow(1,false) this.gaoMap.markerShow(1, false);
} }
if (this.leftBarNum.includes(3)) { if (this.leftBarNum.includes(3)) {
this.gaoMap.markerShow(2,true) this.gaoMap.markerShow(2, true);
}else{ } else {
this.gaoMap.markerShow(2,false) this.gaoMap.markerShow(2, false);
} }
if (this.leftBarNum.includes(4)) { if (this.leftBarNum.includes(4)) {
this.gaoMap.markerShow(3,true) this.gaoMap.markerShow(3, true);
}else{ } else {
this.gaoMap.markerShow(3,false) this.gaoMap.markerShow(3, false);
} }
if (this.leftBarNum.includes(7)) { if (this.leftBarNum.includes(7)) {
this.gaoMap.markerShow(4,true) this.gaoMap.markerShow(4, true);
}else{ } else {
this.gaoMap.markerShow(4,false) this.gaoMap.markerShow(4, false);
} }
}, },
addDevice() { addDevice() {
if (this.iconClass == "icon-create") { if (this.iconClass == "icon-create") {
this.targetNum = this.targetNum != 1 ? 1 : 0; this.targetNum = this.targetNum != 1 ? 1 : 0;
} else { } else {
...@@ -226,16 +213,16 @@ export default { ...@@ -226,16 +213,16 @@ export default {
this.targetNum = 0; this.targetNum = 0;
this.createReset(); this.createReset();
this.gaoMap.newLineReset(); this.gaoMap.newLineReset();
} }
} }
if (this.targetNum == 1 && this.createValue == 1) { if (this.targetNum == 1 && this.createValue == 1) {
this.gaoMap.lineType = 1; this.gaoMap.lineType = 1;
} else { } else {
this.gaoMap.lineType = 0; this.gaoMap.lineType = 0;
this.gaoMap.mouseTool.close();
} }
// 关闭当前线条的infowindow // 关闭当前的infowindow
this.gaoMap.closeLineInfoWindow(); this.gaoMap.closeInfoWindow();
this.deviceType = !this.deviceType; this.deviceType = !this.deviceType;
this.gaoMap.mapOperateType = "add"; this.gaoMap.mapOperateType = "add";
...@@ -249,7 +236,7 @@ export default { ...@@ -249,7 +236,7 @@ export default {
this.iconClass = item.icon; this.iconClass = item.icon;
this.createValue = item.value; this.createValue = item.value;
this.createLabel = item.label; this.createLabel = item.label;
if (this.targetNum == 1 && this.createValue == 1) { if (this.targetNum == 1 && this.createValue == 1) {
// 0是初始,1是新建 2是编辑 3删除 // 0是初始,1是新建 2是编辑 3删除
this.gaoMap.lineType = 1; this.gaoMap.lineType = 1;
...@@ -262,7 +249,6 @@ export default { ...@@ -262,7 +249,6 @@ export default {
// 如果不是管道了,把之前的管道清空 // 如果不是管道了,把之前的管道清空
this.gaoMap.newLineReset(); this.gaoMap.newLineReset();
// this.createReset(); // this.createReset();
// 其他 // 其他
this.gaoMap.draw(this.createValue.toString()); this.gaoMap.draw(this.createValue.toString());
...@@ -284,7 +270,7 @@ export default { ...@@ -284,7 +270,7 @@ export default {
this.gaoMap.linePolyEditorAllClose(); this.gaoMap.linePolyEditorAllClose();
this.gaoMap.removeMarkerDragg(); this.gaoMap.removeMarkerDragg();
this.gaoMap.mapOperateType = "normal"; this.gaoMap.mapOperateType = "normal";
}else{ } else {
// 如果正在新建线条,则清空 // 如果正在新建线条,则清空
this.gaoMap.newLineReset(); this.gaoMap.newLineReset();
this.deviceType = false; this.deviceType = false;
...@@ -293,6 +279,8 @@ export default { ...@@ -293,6 +279,8 @@ export default {
// this.gaoMap.placeSearch.clear(); // this.gaoMap.placeSearch.clear();
this.gaoMap.closeAddMarker(); this.gaoMap.closeAddMarker();
} }
// 关闭当前的infowindow
this.gaoMap.closeInfoWindow();
this.createReset(); this.createReset();
}, },
deleteDevice() { deleteDevice() {
...@@ -301,7 +289,7 @@ export default { ...@@ -301,7 +289,7 @@ export default {
if (this.targetNum != 3) { if (this.targetNum != 3) {
this.gaoMap.removeMarkerDragg(); this.gaoMap.removeMarkerDragg();
this.gaoMap.mapOperateType = "normal"; this.gaoMap.mapOperateType = "normal";
}else{ } else {
// 如果正在新建线条,则清空 // 如果正在新建线条,则清空
this.gaoMap.newLineReset(); this.gaoMap.newLineReset();
// 清空所有正在编辑状态的线 // 清空所有正在编辑状态的线
...@@ -312,6 +300,8 @@ export default { ...@@ -312,6 +300,8 @@ export default {
//this.gaoMap.placeSearch.clear(); //this.gaoMap.placeSearch.clear();
this.gaoMap.closeAddMarker(); this.gaoMap.closeAddMarker();
} }
// 关闭当前的infowindow
this.gaoMap.closeInfoWindow();
this.createReset(); this.createReset();
}, },
selectDeviceType(val) { selectDeviceType(val) {
...@@ -353,37 +343,50 @@ export default { ...@@ -353,37 +343,50 @@ export default {
}, },
getPipeList(queryParams) { getPipeList(queryParams) {
pipeAllInfoList(queryParams).then((res) => { pipeAllInfoList(queryParams).then((res) => {
console.log("管道", res); console.log("管道", res);
if (res.code == 200) { if (res.code == 200) {
this.gaoMap.addPolyline(res.data); this.gaoMap.addPolyline(res.data);
} }
}); });
}, },
searchClear() {
this.iconClass = "icon-create";
this.createValue = 0;
this.createLabel = "新建";
this.targetNum = 0;
this.gaoMap.lineType = 0;
this.gaoMap.newLineReset();
this.gaoMap.linePolyEditorAllClose();
this.gaoMap.closeAddMarker();
this.gaoMap.removeMarkerDragg();
this.gaoMap.mapOperateType = "normal";
// map.remove(this.gaodeMap.markerOverlays);
},
search() { search() {
this.searchClear();
map.clearMap(); map.clearMap();
this.gaoMap.placeSearch.clear(); this.gaoMap.placeSearch.clear();
if(!(!this.gaoMap.searchSelectAdcode && !this.gaoMap.searchSelectName)){ if (!(!this.gaoMap.searchSelectAdcode && !this.gaoMap.searchSelectName)) {
this.gaoMap.placeSearch.setCity(this.gaoMap.searchSelectAdcode); this.gaoMap.placeSearch.setCity(this.gaoMap.searchSelectAdcode);
this.gaoMap.placeSearch.search(this.gaoMap.searchSelectName); this.gaoMap.placeSearch.search(this.gaoMap.searchSelectName);
this.getDeviceInfo({"deviceName": this.gaoMap.searchSelectName}); this.getDeviceInfo({ deviceName: this.gaoMap.searchSelectName });
this.gaoMap.polyLines = []; this.gaoMap.polyLines = [];
this.getPipeList({"pipeName": this.gaoMap.searchSelectName}); this.getPipeList({ pipeName: this.gaoMap.searchSelectName });
this.gaoMap.searchSelectAdcode = undefined; this.gaoMap.searchSelectAdcode = undefined;
this.gaoMap.searchSelectName = undefined; this.gaoMap.searchSelectName = undefined;
}else{ } else {
this.gaoMap.placeSearch.search(this.keyWord); this.gaoMap.placeSearch.search(this.keyWord);
this.getDeviceInfo({"deviceName": this.keyWord}); this.getDeviceInfo({ deviceName: this.keyWord });
this.gaoMap.polyLines = []; this.gaoMap.polyLines = [];
this.getPipeList({"pipeName": this.keyWord}); this.getPipeList({ pipeName: this.keyWord });
} }
}, },
// 新建下拉列表关闭 window点击事件 // 新建下拉列表关闭 window点击事件
barClose() { barClose() {
console.log("window"); console.log("window");
this.deviceType = false; this.deviceType = false;
// 关闭当前线条的infowindow // 关闭当前线条的infowindow
this.gaoMap.closeLineInfoWindow() this.gaoMap.closeInfoWindow();
// 如果没有选择的时候点window 则高亮消失 // 如果没有选择的时候点window 则高亮消失
if (this.targetNum == 1 && this.iconClass == "icon-create") { if (this.targetNum == 1 && this.iconClass == "icon-create") {
this.targetNum = 0; this.targetNum = 0;
...@@ -394,10 +397,14 @@ export default { ...@@ -394,10 +397,14 @@ export default {
this.gaoMap.lineFlag = false; this.gaoMap.lineFlag = false;
// this.gaoMap.createNewLine(); // this.gaoMap.createNewLine();
}, },
refreshMap(){ refreshMap() {
this.iconClass = "icon-create";
this.createValue = 0;
this.createLabel = "新建";
this.targetNum = 0;
map.clearMap(); map.clearMap();
this.initMap(); this.initMap();
} },
}, },
beforeDestroy() { beforeDestroy() {
...@@ -642,7 +649,7 @@ input[type="radio"] { ...@@ -642,7 +649,7 @@ input[type="radio"] {
background-color: #053b6a; background-color: #053b6a;
} }
.refresh-but{ .refresh-but {
position: fixed; position: fixed;
top: 100px; top: 100px;
left: 28%; left: 28%;
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<span>{{ parseTime(scope.row.actualTime) }}</span> <span>{{ parseTime(scope.row.actualTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" prop="remarks" /> <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
...@@ -141,10 +141,24 @@ ...@@ -141,10 +141,24 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工单描述" prop="remarks">
<el-input v-model="form.remarks" type="textarea" placeholder="请输入工单描述" />
</el-form-item>
</div> </div>
<div v-if="this.title == '工单信息归档'"> <div v-if="this.title == '工单信息归档'">
<el-form-item label="归档信息" prop="remarks"> <el-form-item label="工单名称" prop="orderName">
<el-input v-model="form.remarks" type="textarea" placeholder="请输入归档信息" /> <font>{{form.orderName}}</font>
</el-form-item>
<el-form-item label="工单类型" prop="orderType">
<span type="primary" v-if="form.orderType == 1">巡检信息</span>
<span type="primary" v-if="form.orderType == 2">隐患信息</span>
<span type="primary" v-if="form.orderType == 3">报警信息</span>
</el-form-item>
<el-form-item label="工单编号" prop="orderId">
<font>{{form.orderId}}</font>
</el-form-item>
<el-form-item label="归档信息" prop="archiving">
<el-input v-model="form.archiving" type="textarea" placeholder="请输入归档信息" />
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<span>{{ parseTime(scope.row.actualTime) }}</span> <span>{{ parseTime(scope.row.actualTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" prop="remarks" /> <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
...@@ -124,8 +124,19 @@ ...@@ -124,8 +124,19 @@
<!-- 工单反馈对话框 --> <!-- 工单反馈对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="工单名称" prop="orderName">
<font>{{form.orderName}}</font>
</el-form-item>
<el-form-item label="工单类型" prop="orderType">
<span type="primary" v-if="form.orderType == 1">巡检信息</span>
<span type="primary" v-if="form.orderType == 2">隐患信息</span>
<span type="primary" v-if="form.orderType == 3">报警信息</span>
</el-form-item>
<el-form-item label="工单编号" prop="orderId">
<font>{{form.orderId}}</font>
</el-form-item>
<el-form-item label="设备列表" prop="deviceCode" v-if="form.orderType == '1'"> <el-form-item label="设备列表" prop="deviceCode" v-if="form.orderType == '1'">
<el-select v-model="form.deviceCode" placeholder="请选择设备" clearable size="small" > <el-select v-model="form.deviceCode" placeholder="请选择设备" clearable size="small" filterable >
<el-option <el-option
v-for="device in form.deviceInfoList" v-for="device in form.deviceInfoList"
:key="device.deviceCode" :key="device.deviceCode"
...@@ -143,12 +154,18 @@ ...@@ -143,12 +154,18 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="是否存在隐患" prop="isHiddenDanger"> <el-form-item label="是否存在隐患" prop="isHiddenDanger">
<el-radio-group v-model="form.isHiddenDanger"> <!--<el-radio-group v-model="form.isHiddenDanger">
<el-radio :label="1">是</el-radio> <el-radio :label="1">是</el-radio>
<el-radio :label="0"></el-radio> <el-radio :label="2">否</el-radio>
</el-radio-group> </el-radio-group>-->
<el-switch
v-model="isHiddenDanger"
active-text="是"
inactive-text="否">
</el-switch>
</el-form-item> </el-form-item>
<el-form-item label="处理结果" prop="dealStatus"> <!-- <el-form-item label="处理结果" prop="dealStatus">-->
<el-form-item label="处理结果" prop="dealStatus" v-if="isHiddenDanger == true">
<el-radio-group v-model="form.dealStatus"> <el-radio-group v-model="form.dealStatus">
<el-radio :label="2">已处理完成</el-radio> <el-radio :label="2">已处理完成</el-radio>
<el-radio :label="3">未处理完成</el-radio> <el-radio :label="3">未处理完成</el-radio>
...@@ -180,6 +197,7 @@ ...@@ -180,6 +197,7 @@
}, },
data() { data() {
return { return {
isHiddenDanger: false,
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
...@@ -307,8 +325,9 @@ ...@@ -307,8 +325,9 @@
/** 接单按钮操作 */ /** 接单按钮操作 */
handleReceive(row) { handleReceive(row) {
if (row.orderStatus == '0') { if (row.orderStatus == '0') {
const orderIds = row.orderId; const orderIds = row.orderId,
this.$confirm('是否确认接收工单' + orderIds, "操作提示", { orderName = roe.orderName;
this.$confirm('是否确认接收工单(' + orderName + orderIds + ")", "操作提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
...@@ -346,6 +365,11 @@ ...@@ -346,6 +365,11 @@
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
if(this.isHiddenDanger == false){
this.form.isHiddenDanger = "2";
} else {
this.form.isHiddenDanger = "1";
}
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if(this.form.orderStatus == '1' || this.form.orderStatus == '2'){ if(this.form.orderStatus == '1' || this.form.orderStatus == '2'){
......
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