Commit a7bd9bae authored by 王晓倩's avatar 王晓倩

Merge remote-tracking branch 'origin/master'

parents ba85bb00 f2e720ac
...@@ -40,7 +40,7 @@ public class TDeviceAlarmController extends BaseController ...@@ -40,7 +40,7 @@ public class TDeviceAlarmController extends BaseController
/** /**
* 查询报警信息列表 * 查询报警信息列表
*/ */
@PreAuthorize("@ss.hasPermi('dataMonitoring:deviceAlarm:list')") //@PreAuthorize("@ss.hasPermi('dataMonitoring:deviceAlarm:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(DeviceAlarmForm deviceAlarmForm) throws Exception public TableDataInfo list(DeviceAlarmForm deviceAlarmForm) throws Exception
{ {
......
...@@ -141,7 +141,7 @@ public class TDeviceInfoController extends BaseController ...@@ -141,7 +141,7 @@ public class TDeviceInfoController extends BaseController
/** /**
* 统计各设备类型的设备总数 * 统计各设备类型的设备总数
*/ */
@PreAuthorize("@ss.hasPermi('device:deviceInfo:countDeviceByType')") //@PreAuthorize("@ss.hasPermi('device:deviceInfo:countDeviceByType')")
@GetMapping("/countDeviceByType") @GetMapping("/countDeviceByType")
public AjaxResult countDeviceByType() public AjaxResult countDeviceByType()
{ {
......
...@@ -112,7 +112,7 @@ public class TPipeController extends BaseController ...@@ -112,7 +112,7 @@ public class TPipeController extends BaseController
/** /**
* 统计管道总长度 * 统计管道总长度
*/ */
@PreAuthorize("@ss.hasPermi('device:pipe:countPipeLength')") //@PreAuthorize("@ss.hasPermi('device:pipe:countPipeLength')")
@GetMapping("/countPipeLength") @GetMapping("/countPipeLength")
public AjaxResult countPipeLength() public AjaxResult countPipeLength()
{ {
......
...@@ -82,7 +82,7 @@ public class SysUserController extends BaseController ...@@ -82,7 +82,7 @@ public class SysUserController extends BaseController
/** /**
* 获取巡检员列表 * 获取巡检员列表
*/ */
@PreAuthorize("@ss.hasPermi('system:user:inspectorList')") //@PreAuthorize("@ss.hasPermi('system:user:inspectorList')")
@GetMapping("/inspectorList") @GetMapping("/inspectorList")
public AjaxResult inspectorList() public AjaxResult inspectorList()
{ {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
:show-file-list="true" :show-file-list="true"
:headers="headers" :headers="headers"
class="upload-file-uploader" class="upload-file-uploader"
:class="{ hide: addShow }" :class="{ hide: fileArr.length>0 ||addShow }"
ref="upload" ref="upload"
> >
<!-- 上传按钮 --> <!-- 上传按钮 -->
...@@ -233,6 +233,8 @@ export default { ...@@ -233,6 +233,8 @@ export default {
// this.fileList = this.list; // this.fileList = this.list;
this.addShow = this.fileArr.length > 0 ? true : false; this.addShow = this.fileArr.length > 0 ? true : false;
}, },
}; };
</script> </script>
......
...@@ -271,6 +271,7 @@ export default { ...@@ -271,6 +271,7 @@ export default {
}, },
listRemove(e) { listRemove(e) {
this.form.url = ""; this.form.url = "";
this.form.iconUrl="";
this.fileArr = []; this.fileArr = [];
}, },
getPipeInfos() { getPipeInfos() {
......
...@@ -270,6 +270,7 @@ export default { ...@@ -270,6 +270,7 @@ export default {
}, },
listRemove(e) { listRemove(e) {
this.form.url = ""; this.form.url = "";
this.form.iconUrl="";
this.fileArr = []; this.fileArr = [];
}, },
getPipeInfos() { getPipeInfos() {
......
...@@ -267,6 +267,7 @@ export default { ...@@ -267,6 +267,7 @@ export default {
}, },
listRemove(e) { listRemove(e) {
this.form.url = ""; this.form.url = "";
this.form.iconUrl="";
this.fileArr = []; this.fileArr = [];
}, },
handleClose(done) { handleClose(done) {
......
...@@ -267,6 +267,7 @@ export default { ...@@ -267,6 +267,7 @@ export default {
}, },
listRemove(e) { listRemove(e) {
this.form.url = ""; this.form.url = "";
this.form.iconUrl="";
this.fileArr = []; this.fileArr = [];
}, },
getPipeInfos() { getPipeInfos() {
......
...@@ -41,7 +41,7 @@ class gaodeMap { ...@@ -41,7 +41,7 @@ class gaodeMap {
leftListClick = false; leftListClick = false;
//构造函数中设置中央点默认值 //构造函数中设置中央点默认值
constructor(center) { constructor(center, latlng) {
this.markers = []; this.markers = [];
this.center = center ? center : defaultCenter; this.center = center ? center : defaultCenter;
map = new AMap.Map("container", { map = new AMap.Map("container", {
...@@ -77,7 +77,7 @@ class gaodeMap { ...@@ -77,7 +77,7 @@ class gaodeMap {
this.createNewLine(); this.createNewLine();
console.log("map点击事件新建"); console.log("map点击事件新建");
}) })
.catch(() => {}); .catch(() => { });
} }
// console.log("抬起来了"); // console.log("抬起来了");
}); });
...@@ -116,9 +116,10 @@ class gaodeMap { ...@@ -116,9 +116,10 @@ class gaodeMap {
let options = this.myMap.getStatus(); let options = this.myMap.getStatus();
options.scrollWheel = true; options.scrollWheel = true;
this.myMap.setStatus(options); this.myMap.setStatus(options);
console.log("飞行结束")
}); });
this.districtBoundaries(); this.districtBoundaries(latlng);
} }
panTo(lnglat) { panTo(lnglat) {
this.myMap.panTo(lnglat); this.myMap.panTo(lnglat);
...@@ -148,7 +149,7 @@ class gaodeMap { ...@@ -148,7 +149,7 @@ class gaodeMap {
* 设置城市边界 * 设置城市边界
*/ */
districtBoundaries() { districtBoundaries(latlng) {
let that = this; let that = this;
let opts = { let opts = {
subdistrict: 0, subdistrict: 0,
...@@ -156,12 +157,20 @@ class gaodeMap { ...@@ -156,12 +157,20 @@ class gaodeMap {
level: "city" level: "city"
}; };
let district = new AMap.DistrictSearch(opts); let district = new AMap.DistrictSearch(opts);
district.search(that.center, function(status, result) { district.search(that.center, function (status, result) {
if (status == "complete") { if (status == "complete") {
let defaultCenter = []; let defaultCenter = [];
defaultCenter.push(result.districtList[0].center.lng); defaultCenter.push(result.districtList[0].center.lng);
defaultCenter.push(result.districtList[0].center.lat); defaultCenter.push(result.districtList[0].center.lat);
map.setCenter(defaultCenter); if (latlng) {
map.setCenter(latlng);
} else {
map.setCenter(defaultCenter);
}
console.log("defaultCenter", defaultCenter)
let bounds = result.districtList[0].boundaries; let bounds = result.districtList[0].boundaries;
for (let i = 0; i < bounds.length; i += 1) { for (let i = 0; i < bounds.length; i += 1) {
new AMap.Polyline({ new AMap.Polyline({
...@@ -190,12 +199,12 @@ class gaodeMap { ...@@ -190,12 +199,12 @@ class gaodeMap {
offset: new AMap.Pixel(24, -38), offset: new AMap.Pixel(24, -38),
anchor: "left-top" anchor: "left-top"
}); });
infoWindow.on("mouseover", function() { infoWindow.on("mouseover", function () {
let options = map.getStatus(); let options = map.getStatus();
options.scrollWheel = false; options.scrollWheel = false;
map.setStatus(options); map.setStatus(options);
}); });
infoWindow.on("mouseout", function() { infoWindow.on("mouseout", function () {
let options = map.getStatus(); let options = map.getStatus();
options.scrollWheel = true; options.scrollWheel = true;
map.setStatus(options); map.setStatus(options);
...@@ -225,7 +234,7 @@ class gaodeMap { ...@@ -225,7 +234,7 @@ class gaodeMap {
editWindow.obj = marker; editWindow.obj = marker;
editWindow.gaoMap = that; editWindow.gaoMap = that;
editWindow.map = map; editWindow.map = map;
marker.on("click", function(e) { marker.on("click", function (e) {
if ("edit" == that.mapOperateType) { if ("edit" == that.mapOperateType) {
editWindow.form = e.target.getExtData(); editWindow.form = e.target.getExtData();
editWindow.show(); editWindow.show();
...@@ -239,10 +248,10 @@ class gaodeMap { ...@@ -239,10 +248,10 @@ class gaodeMap {
vue vue
.$confirm( .$confirm(
'是否删除名称为"' + '是否删除名称为"' +
e.target.getExtData().deviceName + e.target.getExtData().deviceName +
'"的' + '"的' +
diviceType[markerType] + diviceType[markerType] +
" ?", " ?",
"提示", "提示",
{ {
type: "warning" type: "warning"
...@@ -287,19 +296,19 @@ class gaodeMap { ...@@ -287,19 +296,19 @@ class gaodeMap {
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;
editWindow.form.latitude = e.lnglat.lat; editWindow.form.latitude = e.lnglat.lat;
}); });
} else { } else {
marker.on("mouseover", function() { marker.on("mouseover", function () {
marker.setLabel({ marker.setLabel({
offset: new AMap.Pixel(0, -10), //设置文本标注偏移量 offset: new AMap.Pixel(0, -10), //设置文本标注偏移量
content: "<div class='info'>" + data.deviceName + "</div>", //设置文本标注内容 content: "<div class='info'>" + data.deviceName + "</div>", //设置文本标注内容
direction: "top" //设置文本标注方位 direction: "top" //设置文本标注方位
}); });
}); });
marker.on("mouseout", function() { marker.on("mouseout", function () {
marker.setLabel({ marker.setLabel({
content: null content: null
}); });
...@@ -943,14 +952,14 @@ class gaodeMap { ...@@ -943,14 +952,14 @@ class gaodeMap {
this.overlays = []; this.overlays = [];
let that = this; let that = this;
this.markerOverlays = []; this.markerOverlays = [];
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;
e.obj.on("click", function(aa) { e.obj.on("click", function (aa) {
let postion = aa.target._position; let postion = aa.target._position;
//兼容拖拽后单击事件,拖拽后点击事件返回位置为数组 //兼容拖拽后单击事件,拖拽后点击事件返回位置为数组
if (postion instanceof Array) { if (postion instanceof Array) {
...@@ -962,11 +971,11 @@ class gaodeMap { ...@@ -962,11 +971,11 @@ class gaodeMap {
} }
device.show(); device.show();
}); });
e.obj.on("mouseover", function() { e.obj.on("mouseover", function () {
that.mouseTool.close(); that.mouseTool.close();
}); });
e.obj.on("mouseout", function() { e.obj.on("mouseout", function () {
that.draw(that.deviceType); that.draw(that.deviceType);
}); });
...@@ -1077,7 +1086,7 @@ class gaodeMap { ...@@ -1077,7 +1086,7 @@ class gaodeMap {
"AMap.MapType", "AMap.MapType",
"AMap.Geolocation" "AMap.Geolocation"
], ],
function() { function () {
// 在图面添加工具条控件,工具条控件集成了缩放、平移、定位等功能按钮在内的组合控件 // 在图面添加工具条控件,工具条控件集成了缩放、平移、定位等功能按钮在内的组合控件
//map.addControl(new AMap.ToolBar()); //map.addControl(new AMap.ToolBar());
...@@ -1100,7 +1109,7 @@ class gaodeMap { ...@@ -1100,7 +1109,7 @@ class gaodeMap {
searchTips(inputId) { searchTips(inputId) {
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
...@@ -1141,7 +1150,7 @@ class gaodeMap { ...@@ -1141,7 +1150,7 @@ class gaodeMap {
}); });
let infoWindow = new AMap.InfoWindow({ let infoWindow = new AMap.InfoWindow({
isCustom: true, isCustom: true,
content: `<span style='border:1px solid #80d8ff;background:#fff'>${pipeName}</span>`, content: `<div style='max-width:150px;border:1px solid #80d8ff;background:#fff'>${pipeName}</div>`,
anchor: "left-top", anchor: "left-top",
offset: new AMap.Pixel(20, -20) offset: new AMap.Pixel(20, -20)
}); });
...@@ -1158,9 +1167,11 @@ class gaodeMap { ...@@ -1158,9 +1167,11 @@ class gaodeMap {
infoWindow.close(); infoWindow.close();
}); });
map.add(polyline); map.add(polyline);
const path = eval(coordinates)[0]; const path1 = eval(coordinates)[0];
const path2 = eval(coordinates)[1];
// map.setFitView(); // map.setFitView();
map.setCenter([+path[0], +path[1]], false); const path3 = [(Number(path1[0])+Number(path2[0]) )/2 ,(Number(path1[1])+Number(path2[1]) )/2];
map.setCenter(path3, false);
// const lntlat = eval(coordinates)[0]; // const lntlat = eval(coordinates)[0];
// map.panTo(lntlat) // map.panTo(lntlat)
......
...@@ -281,8 +281,8 @@ export default { ...@@ -281,8 +281,8 @@ export default {
this.getDetail(); this.getDetail();
}, },
mounted() { mounted() {
let gaoMap = new gaodeMap("石家庄"); // let gaoMap = new gaodeMap("石家庄");
this.gaoMap = gaoMap; // this.gaoMap = gaoMap;
}, },
methods: { methods: {
initData(getData1, getData2, getData3) { initData(getData1, getData2, getData3) {
...@@ -663,6 +663,13 @@ export default { ...@@ -663,6 +663,13 @@ export default {
if(this.form.pipeList != null){ if(this.form.pipeList != null){
let pipe = this.form.pipeList[0]; let pipe = this.form.pipeList[0];
const {coordinates} = this.form.pipeList[0];
const path1 = eval(coordinates)[0];
const path2 = eval(coordinates)[1];
const path3 = [(Number(path1[0]) + Number(path2[0])) / 2, (Number(path1[1]) + Number(path2[1])) / 2];
let gaoMap = new gaodeMap("石家庄",path3);
this.gaoMap=gaoMap;
console.log("pipe", pipe); console.log("pipe", pipe);
this.dataListdetail.push(pipe); this.dataListdetail.push(pipe);
this.gaoMap.onlyLine(pipe); this.gaoMap.onlyLine(pipe);
...@@ -672,8 +679,11 @@ export default { ...@@ -672,8 +679,11 @@ export default {
let device = this.form.deviceList[0]; let device = this.form.deviceList[0];
console.log("device", device); console.log("device", device);
this.dataListdetail.push(device); this.dataListdetail.push(device);
this.gaoMap.resetMapCenter([device.longitude, device.latitude]); let gaoMap = new gaodeMap("石家庄",[device.longitude, device.latitude]);
this.gaoMap = gaoMap;
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, device); this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, device);
// this.gaoMap.resetMapCenter([device.longitude, device.latitude]);
} }
var getData1 = []; var getData1 = [];
......
...@@ -215,8 +215,8 @@ ...@@ -215,8 +215,8 @@
// this.getData(); // this.getData();
}, },
mounted() { mounted() {
let gaoMap = new gaodeMap("石家庄"); // let gaoMap = new gaodeMap("石家庄");
this.gaoMap = gaoMap; // this.gaoMap = gaoMap;
this.getData(); this.getData();
}, },
methods: { methods: {
...@@ -585,9 +585,11 @@ ...@@ -585,9 +585,11 @@
this.dataListdetail3.push(obj3); this.dataListdetail3.push(obj3);
this.form = response.data; this.form = response.data;
this.active = parseInt(response.data.orderStatus) + 1; this.active = parseInt(response.data.orderStatus) + 1;
this.gaoMap.resetMapCenter([this.form.longitude, this.form.latitude]); let gaoMap = new gaodeMap("石家庄",[this.form.longitude, this.form.latitude]);
this.gaoMap = gaoMap;
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, this.form) this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, this.form)
console.log("this.form.longitude",this.form.longitude) // this.gaoMap.resetMapCenter([this.form.longitude, this.form.latitude]);
console.log("this.form.longitude",this.form.longitude)
console.log("this.form", this.form) console.log("this.form", this.form)
// if (this.form.length > 0) { // if (this.form.length > 0) {
......
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
/> />
<!-- 添加或修改设备信息对话框 --> <!-- 添加或修改设备信息对话框 -->
<el-dialog :title="title" :visible.sync="open" append-to-body @close="cancel"> <el-dialog destroy-on-close :title="title" :visible.sync="open" append-to-body @close="cancel">
<el-form ref="form" :model="form" :rules="rules" label-width="135px"> <el-form ref="form" :model="form" :rules="rules" label-width="135px">
<el-col :span="11"> <el-col :span="11">
<el-form-item label="所属管道" prop="pipeId"> <el-form-item label="所属管道" prop="pipeId">
......
...@@ -6,14 +6,17 @@ ...@@ -6,14 +6,17 @@
<div style="height: 45px;" @click="$router.go(-1)"> <div style="height: 45px;" @click="$router.go(-1)">
<el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回 <el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回
</el-button> </el-button>
<div style="float: left;margin-top: 8px;margin-left: 5px;"><img src="../../../assets/logo/fanhui.png" style="width: 25px;" alt=""></div> <div style="float: left;margin-top: 8px;margin-left: 5px;"><img src="../../../assets/logo/fanhui.png"
style="width: 25px;" alt=""></div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="width: 100%;height: 45px;"> <el-row style="width: 100%;height: 45px;">
<el-col :span="24"> <el-col :span="24">
<div style=""> <div style="">
<ul><li style="list-style: none;font-weight: 900;font-size: 20px;color: #053b6a;">设备信息管理详情</li></ul> <ul>
<li style="list-style: none;font-weight: 900;font-size: 20px;color: #053b6a;">设备信息管理详情</li>
</ul>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -21,7 +24,9 @@ ...@@ -21,7 +24,9 @@
<el-row style="width: 100%;"> <el-row style="width: 100%;">
<el-col :span="24"> <el-col :span="24">
<div style="color: #31EAEA;height: 25px;"> <div style="color: #31EAEA;height: 25px;">
<ul><li>详细信息</li></ul> <ul>
<li>详细信息</li>
</ul>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -84,39 +89,25 @@ ...@@ -84,39 +89,25 @@
</el-form> </el-form>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<div id="marbox" style="width: 100%;height: 390px;margin-top: -35px; border: 1px solid rgb(218, 213, 213);margin-bottom: 10px;"> <div id="marbox"
style="width: 100%;height: 390px;margin-top: -35px; border: 1px solid rgb(218, 213, 213);margin-bottom: 10px;">
<div style="width: 100%;height: 100%" id="container"></div> <div style="width: 100%;height: 100%" id="container"></div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<div class="" style="width: 95%; height: 60px;margin-left: 50px;text-align: center;"> <div class="" style="width: 95%; height: 60px;margin-left: 50px;text-align: center;">
<el-button <el-button size="normal" type="primary" icon="el-icon-edit" @click="handleUpdate(form)"
size="normal" v-hasPermi="['device:deviceInfo:edit']">修改</el-button>
type="primary" <el-button size="normal" type="primary" icon="el-icon-delete" @click="handleDelete(form)"
icon="el-icon-edit" v-hasPermi="['device:deviceInfo:remove']">删除</el-button>
@click="handleUpdate(form)"
v-hasPermi="['device:deviceInfo:edit']"
>修改</el-button>
<el-button
size="normal"
type="primary"
icon="el-icon-delete"
@click="handleDelete(form)"
v-hasPermi="['device:deviceInfo:remove']"
>删除</el-button>
<el-dialog :title="title" :visible.sync="open" append-to-body @close="cancel"> <el-dialog :title="title" :visible.sync="open" append-to-body @close="cancel">
<el-form ref="editForm" :model="editForm" :rules="rules" label-width="135px"> <el-form ref="editForm" :model="editForm" :rules="rules" label-width="135px">
<el-col :span="11"> <el-col :span="11">
<el-form-item label="所属管道" prop="pipeId"> <el-form-item label="所属管道" prop="pipeId">
<el-select v-model="editForm.pipeId" placeholder="请选择所属管道" filterable style="width: 100%" > <el-select v-model="editForm.pipeId" placeholder="请选择所属管道" filterable style="width: 100%">
<el-option <el-option v-for="item in options" :key="item.pipeId" :label="item.pipeName" :value="item.pipeId">
v-for="item in options"
:key="item.pipeId"
:label="item.pipeName"
:value="item.pipeId"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -130,32 +121,22 @@ ...@@ -130,32 +121,22 @@
<el-col :span="11"> <el-col :span="11">
<el-form-item label="设备类型" prop="deviceType"> <el-form-item label="设备类型" prop="deviceType">
<el-select v-model="editForm.deviceType" placeholder="请选择设备类型" filterable style="width: 100%" > <el-select v-model="editForm.deviceType" placeholder="请选择设备类型" filterable style="width: 100%">
<el-option <el-option v-for="dict in typeOptions" :key="dict.dictValue" :label="dict.dictLabel"
v-for="dict in typeOptions" :value="dict.dictValue"></el-option>
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="设备名称" prop="deviceName"> <el-form-item label="设备名称" prop="deviceName">
<el-input <el-input v-model="editForm.deviceName" placeholder="请输入设备名称" />
v-model="editForm.deviceName"
placeholder="请输入设备名称"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="设备型号" prop="deviceModel"> <el-form-item label="设备型号" prop="deviceModel">
<el-input <el-input v-model="editForm.deviceModel" placeholder="请输入设备型号" />
v-model="editForm.deviceModel"
placeholder="请输入设备型号"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -178,7 +159,7 @@ ...@@ -178,7 +159,7 @@
<el-input v-model.number="editForm.longitude" placeholder="请输入经度" /> <el-input v-model.number="editForm.longitude" placeholder="请输入经度" />
</el-col> </el-col>
<el-col :span="8" style="margin-left: 10px"> <el-col :span="8" style="margin-left: 10px">
<el-input v-model.number="editForm.latitude" placeholder="请输入纬度"/> <el-input v-model.number="editForm.latitude" placeholder="请输入纬度" />
</el-col> </el-col>
<el-col :span="5" style="margin-left: 10px"> <el-col :span="5" style="margin-left: 10px">
<el-button type="primary" plain @click="MapdialogFun">选择经纬度</el-button> <el-button type="primary" plain @click="MapdialogFun">选择经纬度</el-button>
...@@ -195,23 +176,13 @@ ...@@ -195,23 +176,13 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系电话" prop="phone"> <el-form-item label="联系电话" prop="phone">
<el-input <el-input type="number" maxlength="12" v-model="editForm.phone" placeholder="请输入联系电话" />
type="number"
maxlength="12"
v-model="editForm.phone"
placeholder="请输入联系电话"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col> <el-col>
<el-form-item label="设备图片上传" prop="iconUrl"> <el-form-item label="设备图片上传" prop="iconUrl">
<MyFileUpload <MyFileUpload listType="picture-card" @resFun="getFileInfo" @remove="listRemove" :fileArr="fileList" />
listType="picture-card"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
/>
<el-input v-show="false" disabled v-model="editForm.iconUrl"></el-input> <el-input v-show="false" disabled v-model="editForm.iconUrl"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -219,12 +190,8 @@ ...@@ -219,12 +190,8 @@
<el-col> <el-col>
<el-form-item label="安装日期" prop="installationTime"> <el-form-item label="安装日期" prop="installationTime">
<el-col :span="11"> <el-col :span="11">
<el-date-picker clearable size="small" <el-date-picker clearable size="small" style="width: 100%" v-model="editForm.installationTime"
style="width: 100%" type="date" value-format="yyyy-MM-dd" placeholder="请选择安装日期">
v-model="editForm.installationTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择安装日期">
</el-date-picker> </el-date-picker>
</el-col> </el-col>
</el-form-item> </el-form-item>
...@@ -242,14 +209,8 @@ ...@@ -242,14 +209,8 @@
</div> </div>
</el-dialog> </el-dialog>
<Mapdialog <Mapdialog v-if="loadmap" :dialogTableVisible="dialogTableVisible" @dialogcancelFun="dialogcancelFun"
v-if="loadmap" :slat="editForm.latitude" :slng="editForm.longitude" @confirmFun="confirmFun($event)"></Mapdialog>
:dialogTableVisible="dialogTableVisible"
@dialogcancelFun="dialogcancelFun"
:slat="editForm.latitude"
:slng="editForm.longitude"
@confirmFun="confirmFun($event)"
></Mapdialog>
</div> </div>
</div> </div>
</div> </div>
...@@ -286,7 +247,7 @@ ...@@ -286,7 +247,7 @@
// 设备类型字典 // 设备类型字典
typeOptions: [], typeOptions: [],
// 表单参数 // 表单参数
form: { }, form: {},
editForm: {}, editForm: {},
// 表单校验 // 表单校验
rules: { rules: {
...@@ -330,25 +291,29 @@ ...@@ -330,25 +291,29 @@
created() { created() {
// 如果是跳转来的,则接受初始化参数 // 如果是跳转来的,则接受初始化参数
this.deviceId = this.$route.query.deviceId; this.deviceId = this.$route.query.deviceId;
this.getDetail();
this.getDicts("t_device_type").then(response => { this.getDicts("t_device_type").then(response => {
this.typeOptions = response.data; this.typeOptions = response.data;
}); });
}, },
mounted(){ mounted() {
let gaoMap = new gaodeMap("石家庄"); this.getDetail();
this.gaoMap = gaoMap; // let gaoMap = new gaodeMap("石家庄");
// this.gaoMap = gaoMap;
}, },
methods: { methods: {
getDetail (){ getDetail() {
getDeviceInfo(this.deviceId).then(response =>{ getDeviceInfo(this.deviceId).then(response => {
this.form = response.data; this.form = response.data;
console.log(this.form,"this.form") console.log(this.form, "this.form")
this.gaoMap.resetMapCenter([this.form.longitude, this.form.latitude]); const obj =this.form;
// this.gaoMap.resetMapCenter([this.form.longitude, this.form.latitude]);let obj = this.form.deviceList[0];
let gaoMap = new gaodeMap("石家庄", [obj.longitude, obj.latitude]);
this.gaoMap = gaoMap;
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, this.form) this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, this.form)
}); });
}, },
getFileInfo(res){ getFileInfo(res) {
this.editForm.iconUrl = res.url; this.editForm.iconUrl = res.url;
}, },
listRemove(e) { listRemove(e) {
...@@ -427,10 +392,14 @@ ...@@ -427,10 +392,14 @@
width: 100%; width: 100%;
margin: 20px 0; margin: 20px 0;
} }
.feedbackTime-div{
float: left;margin-left: 150px;margin-top: 10px; .feedbackTime-div {
float: left;
margin-left: 150px;
margin-top: 10px;
} }
.feedbackTime{
.feedbackTime {
height: 120px; height: 120px;
width: 120px; width: 120px;
float: left; float: left;
...@@ -441,19 +410,24 @@ ...@@ -441,19 +410,24 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.el-card__body { .el-card__body {
padding: 5px 20px 20px 20px; padding: 5px 20px 20px 20px;
} }
.detail .el-form{
.detail .el-form {
width: 20%; width: 20%;
} }
.detail .el-form-item{
.detail .el-form-item {
margin-bottom: 0px; margin-bottom: 0px;
} }
.avatar-uploader{
.avatar-uploader {
width: 25%; width: 25%;
float: left; float: left;
} }
.avatar-uploader .el-upload { .avatar-uploader .el-upload {
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
border-radius: 6px; border-radius: 6px;
...@@ -461,9 +435,11 @@ ...@@ -461,9 +435,11 @@
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.avatar-uploader .el-upload:hover { .avatar-uploader .el-upload:hover {
border-color: #409EFF; border-color: #409EFF;
} }
.avatar-uploader-icon { .avatar-uploader-icon {
font-size: 28px; font-size: 28px;
color: #8c939d; color: #8c939d;
...@@ -472,13 +448,15 @@ ...@@ -472,13 +448,15 @@
line-height: 178px; line-height: 178px;
text-align: center; text-align: center;
} }
.avatar { .avatar {
width: 178px; width: 178px;
height: 178px; height: 178px;
display: block; display: block;
} }
li{
li {
font-size: 15px; font-size: 15px;
font-weight: 900; font-weight: 900;
} }
</style> </style>
\ No newline at end of file
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
/> />
<!-- 添加或修改管道信息对话框 --> <!-- 添加或修改管道信息对话框 -->
<el-dialog :title="title" :visible.sync="open" append-to-body @close="cancel"> <el-dialog destroy-on-close :title="title" :visible.sync="open" append-to-body @close="cancel">
<el-form ref="form" :model="form" :rules="rules" label-width="135px"> <el-form ref="form" :model="form" :rules="rules" label-width="135px">
<el-col :span="23"> <el-col :span="23">
<el-form-item label="管道名称" prop="pipeName"> <el-form-item label="管道名称" prop="pipeName">
......
...@@ -6,14 +6,17 @@ ...@@ -6,14 +6,17 @@
<div style="height: 45px;" @click="$router.go(-1)"> <div style="height: 45px;" @click="$router.go(-1)">
<el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回 <el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回
</el-button> </el-button>
<div style="float: left;margin-top: 8px;margin-left: 5px;"><img src="../../../assets/logo/fanhui.png" style="width: 25px;" alt=""></div> <div style="float: left;margin-top: 8px;margin-left: 5px;"><img src="../../../assets/logo/fanhui.png"
style="width: 25px;" alt=""></div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="width: 100%;height: 45px;"> <el-row style="width: 100%;height: 45px;">
<el-col :span="24"> <el-col :span="24">
<div style=""> <div style="">
<ul><li style="list-style: none;font-weight: 900;font-size: 20px;color: #053b6a;">管道管理详情</li></ul> <ul>
<li style="list-style: none;font-weight: 900;font-size: 20px;color: #053b6a;">管道管理详情</li>
</ul>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -22,7 +25,9 @@ ...@@ -22,7 +25,9 @@
<el-row style="width: 100%;"> <el-row style="width: 100%;">
<el-col :span="24"> <el-col :span="24">
<div style="color: #31EAEA;height: 25px;"> <div style="color: #31EAEA;height: 25px;">
<ul><li>详细信息</li></ul> <ul>
<li>详细信息</li>
</ul>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -65,32 +70,25 @@ ...@@ -65,32 +70,25 @@
<font>{{form.inspectionTime}}</font> <font>{{form.inspectionTime}}</font>
</el-form-item> </el-form-item>
<el-form-item label="管道图片:" prop="inspectionTime"> <el-form-item label="管道图片:" prop="inspectionTime">
<el-image :src="form.iconUrl" :preview-src-list="[form.iconUrl]" style="width: 90px;"></el-image> <div style="width: 20%;">
<el-image :src="form.iconUrl" :preview-src-list="[form.iconUrl]" style="width: auto;height: auto;"></el-image>
</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<div id="marbox" style="width: 100%;height: 390px;margin-top: -35px; border: 1px solid rgb(218, 213, 213);margin-bottom: 10px;"> <div id="marbox"
style="width: 100%;height: 390px;margin-top: -35px; border: 1px solid rgb(218, 213, 213);margin-bottom: 10px;">
<div style="width: 100%;height: 100%" id="container"></div> <div style="width: 100%;height: 100%" id="container"></div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<div class="" style="width: 95%; height: 60px;margin-left: 50px;text-align: center;"> <div class="" style="width: 95%; height: 60px;margin-left: 50px;text-align: center;">
<el-button <el-button size="normal" type="primary" icon="el-icon-edit" @click="handleUpdate(form)"
size="normal" v-hasPermi="['device:pipe:edit']">修改</el-button>
type="primary" <el-button size="normal" type="primary" icon="el-icon-delete" @click="handleDelete(form)"
icon="el-icon-edit" v-hasPermi="['device:pipe:remove']">删除</el-button>
@click="handleUpdate(form)"
v-hasPermi="['device:pipe:edit']"
>修改</el-button>
<el-button
size="normal"
type="primary"
icon="el-icon-delete"
@click="handleDelete(form)"
v-hasPermi="['device:pipe:remove']"
>删除</el-button>
<!-- 添加或修改管道信息对话框 --> <!-- 添加或修改管道信息对话框 -->
...@@ -109,10 +107,7 @@ ...@@ -109,10 +107,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="管道长度" prop="pipeLength"> <el-form-item label="管道长度" prop="pipeLength">
<el-input type="number" min="0" v-model="editForm.pipeLength" placeholder="请输入管道长度"> <el-input type="number" min="0" v-model="editForm.pipeLength" placeholder="请输入管道长度">
<i <i slot="suffix" style="color: #000; font-style: normal; margin-right: 10px"></i>
slot="suffix"
style="color: #000; font-style: normal; margin-right: 10px"
></i>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -153,24 +148,15 @@ ...@@ -153,24 +148,15 @@
</el-col> </el-col>
<el-col> <el-col>
<el-form-item label="管道图片上传" prop="iconUrl"> <el-form-item label="管道图片上传" prop="iconUrl">
<MyFileUpload <MyFileUpload listType="picture-card" @resFun="getFileInfo" @remove="listRemove" :fileArr="fileList" />
listType="picture-card"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
/>
<el-input v-show="false" disabled v-model="editForm.iconUrl"></el-input> <el-input v-show="false" disabled v-model="editForm.iconUrl"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col> <el-col>
<el-form-item label="安装日期" prop="installationTime"> <el-form-item label="安装日期" prop="installationTime">
<el-col :span="11"> <el-col :span="11">
<el-date-picker clearable size="small" <el-date-picker clearable size="small" style="width: 100%" v-model="editForm.installationTime"
style="width: 100%" type="date" value-format="yyyy-MM-dd" placeholder="请选择安装日期">
v-model="editForm.installationTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择安装日期">
</el-date-picker> </el-date-picker>
</el-col> </el-col>
</el-form-item> </el-form-item>
...@@ -187,13 +173,8 @@ ...@@ -187,13 +173,8 @@
</div> </div>
</el-dialog> </el-dialog>
<Mapdialog <Mapdialog v-if="loadmap" :dialogTableVisible="dialogTableVisible" @dialogcancelFun="dialogcancelFun"
v-if="loadmap" @confirmFun="confirmFun($event)" :str="str"></Mapdialog>
:dialogTableVisible="dialogTableVisible"
@dialogcancelFun="dialogcancelFun"
@confirmFun="confirmFun($event)"
:str="str"
></Mapdialog>
</div> </div>
</div> </div>
...@@ -261,7 +242,7 @@ ...@@ -261,7 +242,7 @@
{ required: true, message: "请上传图片", trigger: "change" }, { required: true, message: "请上传图片", trigger: "change" },
], ],
installationTime: [ installationTime: [
{ required: true, message: "请选择日期", trigger: "change" }, { required: true, message: "请选择日期", trigger: "change" },
], ],
} }
}; };
...@@ -269,6 +250,9 @@ ...@@ -269,6 +250,9 @@
created() { created() {
// 如果是跳转来的,则接受初始化参数 // 如果是跳转来的,则接受初始化参数
this.pipeId = this.$route.query.pipeId; this.pipeId = this.$route.query.pipeId;
},
mounted() {
this.getDetail(); this.getDetail();
this.getDicts("t_pipe_type").then(response => { this.getDicts("t_pipe_type").then(response => {
this.typeOptions = response.data; this.typeOptions = response.data;
...@@ -276,19 +260,22 @@ ...@@ -276,19 +260,22 @@
this.getDicts("t_pipe_pressure").then(response => { this.getDicts("t_pipe_pressure").then(response => {
this.pressureOptions = response.data; this.pressureOptions = response.data;
}); });
},
mounted(){
let gaoMap = new gaodeMap("石家庄");
this.gaoMap = gaoMap;
}, },
methods: { methods: {
getDetail (){ getDetail() {
getPipe(this.pipeId).then(response =>{ getPipe(this.pipeId).then(response => {
this.form = response.data; this.form = response.data;
const { coordinates } = this.form;
const path1 = eval(coordinates)[0];
const path2 = eval(coordinates)[1];
const path3 = [(Number(path1[0]) + Number(path2[0])) / 2, (Number(path1[1]) + Number(path2[1])) / 2];
let gaoMap = new gaodeMap("石家庄", path3);
this.gaoMap = gaoMap;
this.gaoMap.onlyLine(this.form); this.gaoMap.onlyLine(this.form);
}); });
}, },
getFileInfo(res){ getFileInfo(res) {
this.editForm.iconUrl = res.url; this.editForm.iconUrl = res.url;
}, },
listRemove(e) { listRemove(e) {
...@@ -321,7 +308,7 @@ ...@@ -321,7 +308,7 @@
url: this.editForm.iconUrl, url: this.editForm.iconUrl,
}); });
} }
if(this.editForm.coordinates){ if (this.editForm.coordinates) {
this.str = this.editForm.coordinates; this.str = this.editForm.coordinates;
} }
this.open = true; this.open = true;
...@@ -345,7 +332,7 @@ ...@@ -345,7 +332,7 @@
handleDelete(res) { handleDelete(res) {
res.isDel = "1"; res.isDel = "1";
var devices = " "; var devices = " ";
for(var i = 0; i < res.deviceInfoList.length; i++){ for (var i = 0; i < res.deviceInfoList.length; i++) {
var obj = res.deviceInfoList[i]; var obj = res.deviceInfoList[i];
devices = devices + obj.deviceName + " "; devices = devices + obj.deviceName + " ";
} }
...@@ -371,10 +358,14 @@ ...@@ -371,10 +358,14 @@
width: 100%; width: 100%;
margin: 20px 0; margin: 20px 0;
} }
.feedbackTime-div{
float: left;margin-left: 150px;margin-top: 10px; .feedbackTime-div {
float: left;
margin-left: 150px;
margin-top: 10px;
} }
.feedbackTime{
.feedbackTime {
height: 120px; height: 120px;
width: 120px; width: 120px;
float: left; float: left;
...@@ -385,19 +376,24 @@ ...@@ -385,19 +376,24 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.el-card__body { .el-card__body {
padding: 5px 20px 20px 20px; padding: 5px 20px 20px 20px;
} }
.detail .el-form{
.detail .el-form {
width: 20%; width: 20%;
} }
.detail .el-form-item{
.detail .el-form-item {
margin-bottom: 0px; margin-bottom: 0px;
} }
.avatar-uploader{
.avatar-uploader {
width: 25%; width: 25%;
float: left; float: left;
} }
.avatar-uploader .el-upload { .avatar-uploader .el-upload {
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
border-radius: 6px; border-radius: 6px;
...@@ -405,9 +401,11 @@ ...@@ -405,9 +401,11 @@
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.avatar-uploader .el-upload:hover { .avatar-uploader .el-upload:hover {
border-color: #409EFF; border-color: #409EFF;
} }
.avatar-uploader-icon { .avatar-uploader-icon {
font-size: 28px; font-size: 28px;
color: #8c939d; color: #8c939d;
...@@ -416,13 +414,15 @@ ...@@ -416,13 +414,15 @@
line-height: 178px; line-height: 178px;
text-align: center; text-align: center;
} }
.avatar { .avatar {
width: 178px; width: 178px;
height: 178px; height: 178px;
display: block; display: block;
} }
li{
li {
font-size: 15px; font-size: 15px;
font-weight: 900; font-weight: 900;
} }
</style> </style>
\ No newline at end of file
<template> <template>
<div class="app-container detail" style="background-color: rgb(238, 241, 245);"> <div class="app-container detail" style="background-color: rgb(238, 241, 245);">
<!-- 巡检计划信息 --> <!-- 巡检计划信息 -->
<div style="padding-top: 10px;background: #fff;height: 100%;"> <div style="padding-top: 10px;background: #fff;height: 100%;">
<el-row> <el-row>
<el-col :span="24" style="padding-left: 15px;"> <el-col :span="24" style="padding-left: 15px;">
<div style="height: 45px;" @click="$router.go(-1)"> <div style="height: 45px;" @click="$router.go(-1)">
<el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回 <el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回
</el-button> </el-button>
<div style="float: left;margin-top: 8px;margin-left: 5px;"><img src="../../../assets/logo/fanhui.png" style="width: 25px;" alt=""></div> <div style="float: left;margin-top: 8px;margin-left: 5px;"><img src="../../../assets/logo/fanhui.png"
</div> style="width: 25px;" alt=""></div>
</el-col> </div>
</el-row> </el-col>
<el-row style="width: 100%;height: 45px;"> </el-row>
<el-col :span="24"> <el-row style="width: 100%;height: 45px;">
<div style=""> <el-col :span="24">
<ul><li style="list-style: none;font-weight: 900;font-size: 20px;color: #053b6a;">设备巡检详情</li></ul> <div style="">
</div> <ul>
</el-col> <li style="list-style: none;font-weight: 900;font-size: 20px;color: #053b6a;">设备巡检详情</li>
</el-row> </ul>
<el-divider></el-divider> </div>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row style="width: 100%;"> <el-row style="width: 100%;">
<el-col :span="24"> <el-col :span="24">
<div style="color: #31EAEA;height: 25px;"> <div style="color: #31EAEA;height: 25px;">
<ul><li>详细信息</li></ul> <ul>
</div> <li>详细信息</li>
</el-col> </ul>
</el-row> </div>
</el-col>
</el-row>
<el-row style="width: 100%;padding: 10px;padding-left: 40px;"> <el-row style="width: 100%;padding: 10px;padding-left: 40px;">
<el-col :span="12"> <el-col :span="12">
<el-col :span="12">
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="width: 100%;margin-left: 25px;margin-bottom: 25px;">
<el-form-item label="计划名称:" prop="planName">
<font>{{form.planName}}</font>
</el-form-item>
<el-form-item label="检测地点:" prop="address">
<font>{{form.address}}</font>
</el-form-item>
<el-form-item label="计划描述:" prop="remarks" style="width: 170%;">
<font>{{form.remarks}}</font>
</el-form-item>
</el-form>
</el-col>
<el-col :span="12">
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="width: 100%;">
<el-form-item label="计划执行时间:" prop="startTime">
<font>{{form.startTime}}{{form.endTime}}</font>
</el-form-item>
<el-form-item label="计划状态:" prop="planStatus">
<font v-if="form.planStatus == 0">未生成工单</font>
<font v-if="form.planStatus == 1">已生成工单</font>
<font v-if="form.planStatus == 2">进行中</font>
<font v-if="form.planStatus == 3">已完成</font>
</el-form-item>
</el-form>
</el-col>
<el-col :span="24">
<el-table max-height="175px" :data="form.inspectionDataList" style="width: 89%; margin-left: 50px;">
<el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="设备编号" align="center" prop="deviceCode" />
<el-table-column label="设备类型" align="center" prop="deviceType" />
<el-table-column label="处理状态" align="center" prop="dealStatus">
<template slot-scope="scope">
<span v-if="scope.row.dealStatus == null || scope.row.dealStatus == ''">未处理</span>
<span v-if="scope.row.dealStatus == 1">不需处理</span>
<span v-if="scope.row.dealStatus == 2">已处理完成</span>
<span v-if="scope.row.dealStatus == 3">未处理完成</span>
</template>
</el-table-column>
<el-table-column label="是否存在隐患" align="center" prop="isHiddenDanger" >
<template slot-scope="scope">
<span v-if="scope.row.isHiddenDanger == null || scope.row.isHiddenDanger == ''">-</span>
<span v-if="scope.row.isHiddenDanger == 1"></span>
<span v-if="scope.row.isHiddenDanger == 2"></span>
</template>
</el-table-column>
</el-table>
</el-col>
</el-col>
<el-col :span="12"> <el-col :span="12">
<div id="marbox" style="width: 100%;height: 400px;margin-top: -25px; border: 1px solid rgb(218, 213, 213);"> <el-form ref="form" v-model="form" :rules="rules" label-width="100px"
<div style="width: 100%;height: 100%" id="container"></div> style="width: 100%;margin-left: 25px;margin-bottom: 25px;">
</div> <el-form-item label="计划名称:" prop="planName">
</el-col> <font>{{form.planName}}</font>
</el-row> </el-form-item>
<el-form-item label="检测地点:" prop="address">
<font>{{form.address}}</font>
<!-- 接单信息 --> </el-form-item>
<el-row v-if="this.form.orderId != null && this.form.orderId != ''"> <el-form-item label="计划描述:" prop="remarks" style="width: 170%;">
<el-divider></el-divider> <font>{{form.remarks}}</font>
<el-col :span="24">
<div style="color: #31EAEA;width: 100%;height: 40px;">
<ul><li>接单信息</li></ul>
</div>
</el-col>
<el-col :span="5" style="margin-left: 50px;">
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;">
<el-form-item label="下发人员:" prop="appointInspectorName">
<font>{{form.appointInspectorName}}</font>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="12">
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;"> <el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="width: 100%;">
<el-form-item label="下发时间:" prop="allotTime"> <el-form-item label="计划执行时间:" prop="startTime">
<font>{{form.allotTime}}</font> <font>{{form.startTime}}{{form.endTime}}</font>
</el-form-item>
<el-form-item label="计划状态:" prop="planStatus">
<font v-if="form.planStatus == 0">未生成工单</font>
<font v-if="form.planStatus == 1">已生成工单</font>
<font v-if="form.planStatus == 2">进行中</font>
<font v-if="form.planStatus == 3">已完成</font>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="24">
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;"> <el-table max-height="175px" :data="form.inspectionDataList" style="width: 89%; margin-left: 50px;">
<el-form-item label="工单编号:" prop="orderId"> <el-table-column label="设备名称" align="center" prop="deviceName" />
<!-- <font>{{form.orderId}}</font> --> <el-table-column label="设备编号" align="center" prop="deviceCode" />
<el-table-column label="设备类型" align="center" prop="deviceType" />
<el-table-column label="处理状态" align="center" prop="dealStatus">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="showDetail(form.orderId)">{{form.orderId}}</el-button> <span v-if="scope.row.dealStatus == null || scope.row.dealStatus == ''">未处理</span>
<span v-if="scope.row.dealStatus == 1">不需处理</span>
<span v-if="scope.row.dealStatus == 2">已处理完成</span>
<span v-if="scope.row.dealStatus == 3">未处理完成</span>
</template> </template>
</el-form-item> </el-table-column>
</el-form> <el-table-column label="是否存在隐患" align="center" prop="isHiddenDanger">
<template slot-scope="scope">
<span v-if="scope.row.isHiddenDanger == null || scope.row.isHiddenDanger == ''">-</span>
<span v-if="scope.row.isHiddenDanger == 1"></span>
<span v-if="scope.row.isHiddenDanger == 2"></span>
</template>
</el-table-column>
</el-table>
</el-col> </el-col>
</el-row> </el-col>
<div> <el-col :span="12">
<div id="marbox" style="width: 100%;height: 400px;margin-top: -25px; border: 1px solid rgb(218, 213, 213);">
<div style="width: 100%;height: 100%" id="container"></div>
</div>
</el-col>
</el-row>
</div> <!-- 接单信息 -->
<el-row v-if="this.form.orderId != null && this.form.orderId != ''">
<el-divider></el-divider> <el-divider></el-divider>
<div class="" style="width: 95%; height: 60px;margin-left: 50px;text-align: center;" v-if="form.planStatus == 0"> <el-col :span="24">
<el-button <div style="color: #31EAEA;width: 100%;height: 40px;">
size="normal" <ul>
type="primary" <li>接单信息</li>
icon="el-icon-edit" </ul>
@click="handleIssue(form.planId)" </div>
v-hasPermi="['workOrder:basicsInfo:add']" </el-col>
>生成工单 <el-col :span="5" style="margin-left: 50px;">
</el-button> <el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;">
<el-button <el-form-item label="下发人员:" prop="appointInspectorName">
size="normal" <font>{{form.appointInspectorName}}</font>
type="primary" </el-form-item>
icon="el-icon-edit" </el-form>
@click="handleUpdate(form.planId)" </el-col>
v-hasPermi="['deviceInspection:inspectionPlan:edit']" <el-col :span="6">
>修改 <el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;">
</el-button> <el-form-item label="下发时间:" prop="allotTime">
<el-button <font>{{form.allotTime}}</font>
size="normal" </el-form-item>
type="primary" </el-form>
icon="el-icon-delete" </el-col>
@click="handleIsDel(form)" <el-col :span="6">
v-hasPermi="['deviceInspection:inspectionPlan:edit']" <el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;">
>作废 <el-form-item label="工单编号:" prop="orderId">
</el-button> <!-- <font>{{form.orderId}}</font> -->
<el-dialog :title="title1" :visible.sync="open1" width="800px" append-to-body @close="cancel"> <template slot-scope="scope">
<el-form ref="form1" :model="form1" :rules="rules1" label-width="120px"> <el-button type="text" @click="showDetail(form.orderId)">{{form.orderId}}</el-button>
<el-form-item label="巡检计划名称" prop="planName"> </template>
<el-input v-model="form1.planName" placeholder="请输入巡检计划名称"/> </el-form-item>
</el-form-item> </el-form>
<el-form-item label="巡检设备" prop="devices"> </el-col>
<el-cascader </el-row>
v-model="form1.devices" <div>
:options="options"
:props="props"
:show-all-levels="false" </div>
@change="handleChange" <el-divider></el-divider>
filterable <div class="" style="width: 95%; height: 60px;margin-left: 50px;text-align: center;" v-if="form.planStatus == 0">
clearable <el-button size="normal" type="primary" icon="el-icon-edit" @click="handleIssue(form.planId)"
style="width: 640px" v-hasPermi="['workOrder:basicsInfo:add']">生成工单
></el-cascader> </el-button>
</el-form-item> <el-button size="normal" type="primary" icon="el-icon-edit" @click="handleUpdate(form.planId)"
<el-form-item label="开始时间" prop="startTime"> v-hasPermi="['deviceInspection:inspectionPlan:edit']">修改
<el-date-picker clearable size="small" </el-button>
v-model="form1.startTime" <el-button size="normal" type="primary" icon="el-icon-delete" @click="handleIsDel(form)"
type="date" v-hasPermi="['deviceInspection:inspectionPlan:edit']">作废
value-format="yyyy-MM-dd HH:mm:ss" </el-button>
placeholder="选择开始时间"> <el-dialog :title="title1" :visible.sync="open1" width="800px" append-to-body @close="cancel">
</el-date-picker> <el-form ref="form1" :model="form1" :rules="rules1" label-width="120px">
</el-form-item> <el-form-item label="巡检计划名称" prop="planName">
<el-form-item label="结束时间" prop="endTime"> <el-input v-model="form1.planName" placeholder="请输入巡检计划名称" />
<el-date-picker clearable size="small" </el-form-item>
v-model="form1.endTime" <el-form-item label="巡检设备" prop="devices">
type="date" <el-cascader v-model="form1.devices" :options="options" :props="props" :show-all-levels="false"
value-format="yyyy-MM-dd HH:mm:ss" @change="handleChange" filterable clearable style="width: 640px"></el-cascader>
placeholder="选择结束时间"> </el-form-item>
</el-date-picker> <el-form-item label="开始时间" prop="startTime">
</el-form-item> <el-date-picker clearable size="small" v-model="form1.startTime" type="date"
<el-form-item label="地址" prop="address"> value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择开始时间">
<el-input v-model="form1.address" type="textarea" placeholder="请输入地址"/> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="计划描述" prop="remarks"> <el-form-item label="结束时间" prop="endTime">
<el-input type="textarea" v-model="form1.remarks" placeholder="请输入计划描述"/> <el-date-picker clearable size="small" v-model="form1.endTime" type="date"
</el-form-item> value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择结束时间">
</el-form> </el-date-picker>
<div slot="footer" class="dialog-footer"> </el-form-item>
<el-button type="primary" @click="submitForm1">确 定</el-button> <el-form-item label="地址" prop="address">
<el-button @click="cancel">取 消</el-button> <el-input v-model="form1.address" type="textarea" placeholder="请输入地址" />
</div> </el-form-item>
</el-dialog> <el-form-item label="计划描述" prop="remarks">
<el-dialog :title="title2" :visible.sync="open2" width="800px" append-to-body @close="cancel"> <el-input type="textarea" v-model="form1.remarks" placeholder="请输入计划描述" />
<el-form ref="form2" :model="form2" :rules="rules2" label-width="120px"> </el-form-item>
<el-form-item label="巡检计划名称"> </el-form>
<font>{{form2.planName}}</font> <div slot="footer" class="dialog-footer">
</el-form-item> <el-button type="primary" @click="submitForm1">确 定</el-button>
<el-form-item label="计划时间"> <el-button @click="cancel">取 消</el-button>
<font>{{ parseTime(form2.startTime, '{y}-{m}-{d}') }} 至 </div>
{{ parseTime(form2.endTime, '{y}-{m}-{d}') }}</font> </el-dialog>
</el-form-item> <el-dialog :title="title2" :visible.sync="open2" width="800px" append-to-body @close="cancel">
<el-form-item label="地址"> <el-form ref="form2" :model="form2" :rules="rules2" label-width="120px">
<font>{{form2.address}}</font> <el-form-item label="巡检计划名称">
</el-form-item> <font>{{form2.planName}}</font>
<el-form-item label="工单名称" prop="orderName"> </el-form-item>
<el-input v-model="form2.orderName" placeholder="请输入工单名称" /> <el-form-item label="计划时间">
</el-form-item> <font>{{ parseTime(form2.startTime, '{y}-{m}-{d}') }} 至
<el-form-item label="指定执行人员" prop="appointInspector"> {{ parseTime(form2.endTime, '{y}-{m}-{d}') }}</font>
<el-select v-model="form2.appointInspector" placeholder="请选择执行人员" clearable size="small" > </el-form-item>
<el-option <el-form-item label="地址">
v-for="item in inspector" <font>{{form2.address}}</font>
:key="item.userId" </el-form-item>
:label="item.nickName" <el-form-item label="工单名称" prop="orderName">
:value="item.userId" <el-input v-model="form2.orderName" placeholder="请输入工单名称" />
></el-option> </el-form-item>
</el-select> <el-form-item label="指定执行人员" prop="appointInspector">
</el-form-item> <el-select v-model="form2.appointInspector" placeholder="请选择执行人员" clearable size="small">
<el-form-item label="工单描述" prop="remarks"> <el-option v-for="item in inspector" :key="item.userId" :label="item.nickName" :value="item.userId">
<el-input type="textarea" v-model="form2.remarks" placeholder="请输入工单描述" /> </el-option>
</el-form-item> </el-select>
</el-form> </el-form-item>
<div slot="footer" class="dialog-footer"> <el-form-item label="工单描述" prop="remarks">
<el-button type="primary" @click="submitForm2">确 定</el-button> <el-input type="textarea" v-model="form2.remarks" placeholder="请输入工单描述" />
<el-button @click="cancel">取 消</el-button> </el-form-item>
</div> </el-form>
</el-dialog> <div slot="footer" class="dialog-footer">
</div> <el-button type="primary" @click="submitForm2">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div> </div>
</div> </div>
</template> </div>
</template>
<script> <script>
import { listInspectionPlan, getInspectionPlan, addInspectionPlan, updateInspectionPlan } from "@/api/deviceInspection/inspectionPlan"; import { listInspectionPlan, getInspectionPlan, addInspectionPlan, updateInspectionPlan } from "@/api/deviceInspection/inspectionPlan";
import { addBasicsInfo } from "@/api/workOrder/basicsInfo"; import { addBasicsInfo } from "@/api/workOrder/basicsInfo";
import gaodeMap from "utils/gaodeMap.js"; import gaodeMap from "utils/gaodeMap.js";
import { DEVICE_TYPE} from "utils/gaodeMap.js"; import { DEVICE_TYPE } from "utils/gaodeMap.js";
import { inspectorList } from "@/api/system/user"; import { inspectorList } from "@/api/system/user";
import { deviceTree } from "@/api/device/deviceInfo"; import { deviceTree } from "@/api/device/deviceInfo";
import { deviceNodeTree } from "@/api/device/deviceInfo"; import { deviceNodeTree } from "@/api/device/deviceInfo";
export default { export default {
name: "InspectionPlanDetail", name: "InspectionPlanDetail",
components: { components: {
}, },
data() { data() {
return { return {
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
exportLoading: false, exportLoading: false,
// 选中数组 // 选中数组
...@@ -314,7 +289,7 @@ export default { ...@@ -314,7 +289,7 @@ export default {
// 设备级联 // 设备级联
options: [], options: [],
// 表单参数 // 表单参数
form: { }, form: {},
// 表单校验 // 表单校验
rules: { rules: {
}, },
...@@ -350,16 +325,16 @@ export default { ...@@ -350,16 +325,16 @@ export default {
// this.user_id = this.$route.query.id; //详细信息页接收参数 // this.user_id = this.$route.query.id; //详细信息页接收参数
this.getList(); this.getList();
this.planId = this.$route.query.planId; this.planId = this.$route.query.planId;
this.getDetail(); // this.getDetail();
}, },
mounted(){ mounted() {
let gaoMap = new gaodeMap("石家庄"); // let gaoMap = new gaodeMap("石家庄");
this.gaoMap = gaoMap; // this.gaoMap = gaoMap;
this.getDetail(); this.getDetail();
}, },
methods: { methods: {
/** 查询巡检计划列表 */ /** 查询巡检计划列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listInspectionPlan(this.queryParams).then(response => { listInspectionPlan(this.queryParams).then(response => {
this.inspectionPlanList = response.rows; this.inspectionPlanList = response.rows;
...@@ -370,7 +345,7 @@ export default { ...@@ -370,7 +345,7 @@ export default {
handleChange(value) { handleChange(value) {
console.log(this.form1.devices); console.log(this.form1.devices);
}, },
getInspectorList(){ getInspectorList() {
this.loading = true; this.loading = true;
inspectorList().then(response => { inspectorList().then(response => {
this.inspector = response.data; this.inspector = response.data;
...@@ -378,29 +353,41 @@ export default { ...@@ -378,29 +353,41 @@ export default {
}); });
}, },
/** 获取巡检计划详情 */ /** 获取巡检计划详情 */
getDetail (){ getDetail() {
getInspectionPlan(this.planId).then(response =>{ getInspectionPlan(this.planId).then(response => {
this.form = response.data; this.form = response.data;
console.log("this.form",this.form) console.log("this.form", this.form)
this.active = parseInt(response.data.orderStatus) + 1; this.active = parseInt(response.data.orderStatus) + 1;
if(this.form.deviceList.length>0){ if (this.form.deviceList?.length > 0) {
this.gaoMap.resetMapCenter([this.form.deviceList[0].longitude,this.form.deviceList[0].latitude]);
} // for (var i = 0; i < this.form.deviceList.length; i++) {
for(var i = 0; i < this.form.deviceList.length; i++){ let obj = this.form.deviceList[0];
let obj = this.form.deviceList[i]; let gaoMap = new gaodeMap("石家庄", [obj.longitude, obj.latitude]);
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj) this.gaoMap = gaoMap;
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj)
// }
} }
for(var i = 0; i < this.form.pipeList.length; i++){
let obj = this.form.pipeList[i]; if (this.form.pipeList?.length > 0) {
this.gaoMap.onlyLine(obj); const { coordinates } = this.form.pipeList[0];
const path1 = eval(coordinates)[0];
const path2 = eval(coordinates)[1];
const path3 = [(Number(path1[0]) + Number(path2[0])) / 2, (Number(path1[1]) + Number(path2[1])) / 2];
let gaoMap = new gaodeMap("石家庄", path3);
this.gaoMap = gaoMap;
for (var i = 0; i < this.form.pipeList.length; i++) {
let obj = this.form.pipeList[i];
this.gaoMap.onlyLine(obj);
}
} }
if(this.form.orderType == '1') {
if (this.form.orderType == '1') {
// 获取设备列表树 // 获取设备列表树
let data = { let data = {
key1:this.form.deviceList, key1: this.form.deviceList,
key2:this.form.pipeList key2: this.form.pipeList
}; };
deviceTree(data).then(response => { deviceTree(data).then(response => {
this.deviceOptions[0].childList = response.data; this.deviceOptions[0].childList = response.data;
...@@ -432,8 +419,8 @@ export default { ...@@ -432,8 +419,8 @@ export default {
} }
}); });
}, },
/** 新增修改巡检计划提交按钮 */ /** 新增修改巡检计划提交按钮 */
submitForm1() { submitForm1() {
this.$refs["form1"].validate(valid => { this.$refs["form1"].validate(valid => {
console.log("form1", this.$refs["form1"]); console.log("form1", this.$refs["form1"]);
if (valid) { if (valid) {
...@@ -544,76 +531,89 @@ export default { ...@@ -544,76 +531,89 @@ export default {
}); });
}, },
/** 详细信息跳转 */ /** 详细信息跳转 */
showDetail(orderId) { showDetail(orderId) {
this.$router.push({ this.$router.push({
path: '/workOrder/detail', path: '/workOrder/detail',
query:{ query: {
orderId : orderId orderId: orderId
} }
}) //带参跳转 }) //带参跳转
}, },
/** 归档按钮操作 */ /** 归档按钮操作 */
handleFinish(res) { handleFinish(res) {
// this.reset(); // this.reset();
getInspectionPlan(res).then(response => { getInspectionPlan(res).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "工单信息归档"; this.title = "工单信息归档";
}); });
}, },
} }
} }
</script> </script>
<style> <style>
.el-tree-node__content{ .el-tree-node__content {
width: 150px; width: 150px;
} }
.el-divider--horizontal {
display: block; .el-divider--horizontal {
height: 1px; display: block;
width: 100%; height: 1px;
margin: 20px 0; width: 100%;
} margin: 20px 0;
.feedbackTime-div{ }
float: left;margin-left: 150px;margin-top: 10px;
} .feedbackTime-div {
.feedbackTime{ float: left;
height: 120px; margin-left: 150px;
width: 120px; margin-top: 10px;
float: left; }
margin-left: 15px;
margin-top: 5px; .feedbackTime {
margin-bottom: 15px; height: 120px;
display: flex; width: 120px;
justify-content: center; float: left;
align-items: center; margin-left: 15px;
} margin-top: 5px;
.el-card__body { margin-bottom: 15px;
padding: 5px 20px 20px 20px; display: flex;
} justify-content: center;
.detail .el-form{ align-items: center;
width: 20%; }
}
.detail .el-form-item{ .el-card__body {
margin-bottom: 0px; padding: 5px 20px 20px 20px;
} }
.el-tree{
margin-top: 5px; .detail .el-form {
} width: 20%;
.avatar-uploader{ }
width: 25%;
float: left; .detail .el-form-item {
} margin-bottom: 0px;
.avatar-uploader .el-upload { }
.el-tree {
margin-top: 5px;
}
.avatar-uploader {
width: 25%;
float: left;
}
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
border-radius: 6px; border-radius: 6px;
cursor: pointer; cursor: pointer;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.avatar-uploader .el-upload:hover { .avatar-uploader .el-upload:hover {
border-color: #409EFF; border-color: #409EFF;
} }
.avatar-uploader-icon { .avatar-uploader-icon {
font-size: 28px; font-size: 28px;
color: #8c939d; color: #8c939d;
...@@ -622,13 +622,15 @@ export default { ...@@ -622,13 +622,15 @@ export default {
line-height: 178px; line-height: 178px;
text-align: center; text-align: center;
} }
.avatar { .avatar {
width: 178px; width: 178px;
height: 178px; height: 178px;
display: block; display: block;
} }
li{
li {
font-size: 15px; font-size: 15px;
font-weight: 900; font-weight: 900;
} }
</style> </style>
\ No newline at end of file
...@@ -162,12 +162,17 @@ ...@@ -162,12 +162,17 @@
</div> </div>
<div <div
class="deviceList" class="deviceList"
:class="{ topActive: index == 0 }"
v-for="(iten, index) in item.list" v-for="(iten, index) in item.list"
:class="{
topActive: index == 0,
textRed: iten.alarmState == 1,
}"
:key="iten.deviceId + `` + index" :key="iten.deviceId + `` + index"
@click.stop="panToo(iten, item)" @click.stop="panToo(iten, item)"
> >
<div class="no">{{ iten.no + 1 }}</div> <div class="no">
{{ iten.no + 1 }}
</div>
<div :title="iten.code" class="code"> <div :title="iten.code" class="code">
{{ iten.code }} {{ iten.code }}
</div> </div>
...@@ -404,11 +409,11 @@ export default { ...@@ -404,11 +409,11 @@ export default {
// }); // });
}, },
watch: { watch: {
changeBtnData: { // changeBtnData: {
handler(newName, oldName) {}, // handler(newName, oldName) {},
deep: true, // deep: true,
// immediate: true, // // immediate: true,
}, // },
}, },
methods: { methods: {
onResize() { onResize() {
...@@ -456,9 +461,11 @@ export default { ...@@ -456,9 +461,11 @@ export default {
.then((res) => { .then((res) => {
if (res == 200) { if (res == 200) {
// 所有设备上图结束之后,左边的抽屉加载数据 // 所有设备上图结束之后,左边的抽屉加载数据
this.pipeList(); this.pipeList().then((res) => {
console.log("开始报警准备");
this.getSelectAlarmDevice();
});
// 获取报警资源 // 获取报警资源
this.getSelectAlarmDevice();
} }
}); });
}, },
...@@ -536,7 +543,7 @@ export default { ...@@ -536,7 +543,7 @@ export default {
}, },
// 获取报警资源,并且改变图上的状态 // 获取报警资源,并且改变图上的状态
getSelectAlarmDevice() { getSelectAlarmDevice() {
selectAlarmDevice().then((res) => { return selectAlarmDevice().then((res) => {
if (res.length > 0) { if (res.length > 0) {
} }
console.log("报警设备", res); console.log("报警设备", res);
...@@ -565,8 +572,10 @@ export default { ...@@ -565,8 +572,10 @@ export default {
const pipeId = item.getExtData().lineData.pipeId; const pipeId = item.getExtData().lineData.pipeId;
return deviceId == pipeId; return deviceId == pipeId;
})[0]; })[0];
if (polyline) { if (polyline) {
let options = polyline.getExtData(); let options = polyline.getExtData();
// 增加一个报警状态 // 增加一个报警状态
// 如果有endtime说明状态已经不是报警状态了,要归位,所有东西都要变回来 // 如果有endtime说明状态已经不是报警状态了,要归位,所有东西都要变回来
options.lineData.view = this; options.lineData.view = this;
...@@ -590,6 +599,15 @@ export default { ...@@ -590,6 +599,15 @@ export default {
console.log("管道报警"); console.log("管道报警");
} }
polyline.setExtData(options); polyline.setExtData(options);
const myP = this.allList[0].filter((item) => {
console.log(item.selfData.alarmState);
return item.selfData.alarmState;
})[0];
// console.log("this.allList[0]", this.allList[0]);
// console.log("myP", myP);
// 改变左侧列表的状态(1报警,0,正常)
myP.alarmState = options.lineData.alarmState;
} }
}); });
} }
...@@ -628,6 +646,19 @@ export default { ...@@ -628,6 +646,19 @@ export default {
options.alarmValue = alarmValue; options.alarmValue = alarmValue;
} }
device.setExtData(options); device.setExtData(options);
// 找到是列表里的哪个,改变它的状态,让列表里的这个设备变成红色
const myDevice = this.allList.filter((item) => {
for (let i = 0; i < item.length; i++) {
const iten = item[i];
// 不是隐患也不是值班人员
if (!iten.troubleId && !iten.userId) {
return iten.deviceId == device.getExtData().deviceId;
}
}
})[0][0];
// console.log("myDevice", myDevice);
myDevice.alarmState = options.alarmState;
// const imageName = device.getExtData() // const imageName = device.getExtData()
// console.log(imageName) // console.log(imageName)
...@@ -866,7 +897,6 @@ export default { ...@@ -866,7 +897,6 @@ export default {
this.diveceInfoWindowShow(iten, lat, lng); this.diveceInfoWindowShow(iten, lat, lng);
} }
}, },
// 如果是线条飞过去出现infowindow // 如果是线条飞过去出现infowindow
polylineInfoWindowShow(iten, lat, lng) { polylineInfoWindowShow(iten, lat, lng) {
const target = this.gaoMap.polyLines.filter((item) => { const target = this.gaoMap.polyLines.filter((item) => {
...@@ -991,6 +1021,8 @@ export default { ...@@ -991,6 +1021,8 @@ export default {
deviceType: "0", deviceType: "0",
deviceName: item.pipeName, deviceName: item.pipeName,
code: item.pipeCode, code: item.pipeCode,
alarmState: item.alarmState ? item.alarmState : "0",
selfData: item,
}; };
}); });
this.allList[0] = pipeArr; this.allList[0] = pipeArr;
...@@ -1011,6 +1043,8 @@ export default { ...@@ -1011,6 +1043,8 @@ export default {
deviceType: item.deviceType, deviceType: item.deviceType,
deviceName: item.deviceName, deviceName: item.deviceName,
code: item.iotNo, code: item.iotNo,
alarmState: item.alarmState ? item.alarmState : "0",
selfData: item,
}; };
}); });
// 所有阀门井数据 // 所有阀门井数据
...@@ -1026,6 +1060,8 @@ export default { ...@@ -1026,6 +1060,8 @@ export default {
deviceType: item.deviceType, deviceType: item.deviceType,
deviceName: item.deviceName, deviceName: item.deviceName,
code: item.iotNo, code: item.iotNo,
alarmState: item.alarmState ? item.alarmState : "0",
selfData: item,
}; };
}); });
// 所有流量计数据 // 所有流量计数据
...@@ -1041,6 +1077,8 @@ export default { ...@@ -1041,6 +1077,8 @@ export default {
deviceType: item.deviceType, deviceType: item.deviceType,
deviceName: item.deviceName, deviceName: item.deviceName,
code: item.iotNo, code: item.iotNo,
alarmState: item.alarmState ? item.alarmState : "0",
selfData: item,
}; };
}); });
// 所有压力表数据 // 所有压力表数据
...@@ -1056,6 +1094,8 @@ export default { ...@@ -1056,6 +1094,8 @@ export default {
deviceType: item.deviceType, deviceType: item.deviceType,
deviceName: item.deviceName, deviceName: item.deviceName,
code: item.iotNo, code: item.iotNo,
alarmState: item.alarmState ? item.alarmState : "0",
selfData: item,
}; };
}); });
// console.log("设备", tyxArr, fmjArr, lljArr, ylbArr); // console.log("设备", tyxArr, fmjArr, lljArr, ylbArr);
...@@ -1093,7 +1133,7 @@ export default { ...@@ -1093,7 +1133,7 @@ export default {
this.allList[6] = workManArr; this.allList[6] = workManArr;
}, },
// 左边设备翻页 // 左边设备翻页
pipeList(pageNum) { async pipeList(pageNum) {
const num = pageNum ? pageNum : 10; const num = pageNum ? pageNum : 10;
// const { nowPage } = this.changeBtnData[0]; // const { nowPage } = this.changeBtnData[0];
// this.changeBtnData[0].list = this.allList[0].filter((item, index) => { // this.changeBtnData[0].list = this.allList[0].filter((item, index) => {
...@@ -1265,6 +1305,7 @@ export default { ...@@ -1265,6 +1305,7 @@ export default {
} else { } else {
// 左边全选 // 左边全选
this.leftBarNum = [1, 2, 3, 4, 7, 8, 9]; this.leftBarNum = [1, 2, 3, 4, 7, 8, 9];
// this.arrowRightNum=[];
// 右转箭头的样式active判定 // 右转箭头的样式active判定
// this.arrowRightNum = []; // this.arrowRightNum = [];
// 清空左边列表 // 清空左边列表
...@@ -1278,12 +1319,13 @@ export default { ...@@ -1278,12 +1319,13 @@ export default {
await this.getInspectorLocations({ userName: this.keyWord }); await this.getInspectorLocations({ userName: this.keyWord });
await this.getMapHiddenTroublelist({ troubleName: this.keyWord }); await this.getMapHiddenTroublelist({ troubleName: this.keyWord });
// 设备报警
this.getSelectAlarmDevice();
this.changeBtnData.forEach((item) => { this.changeBtnData.forEach((item) => {
item.nowPage = 1; item.nowPage = 1;
}); });
this.pipeList(); this.pipeList().then(() => {
// 设备报警
this.getSelectAlarmDevice();
});
} }
}, },
// 清空左边列表 // 清空左边列表
...@@ -1640,7 +1682,7 @@ input[type="radio"] { ...@@ -1640,7 +1682,7 @@ input[type="radio"] {
} }
.deviceList { .deviceList {
cursor: pointer; cursor: pointer;
margin-bottom: 2px; margin-bottom: 10px;
box-sizing: border-box; box-sizing: border-box;
border-bottom: 1px solid #053b6a00; border-bottom: 1px solid #053b6a00;
color: #1d1d1d; color: #1d1d1d;
...@@ -1682,6 +1724,16 @@ input[type="radio"] { ...@@ -1682,6 +1724,16 @@ input[type="radio"] {
width: 100px; width: 100px;
text-align: center; text-align: center;
} }
.textRed {
.no,
.name,
.code {
color: red;
}
&:hover {
border-bottom: 1px solid red;
}
}
} }
.box { .box {
width: 348px; width: 348px;
......
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
/> />
<!-- 添加或修改隐患信息对话框 --> <!-- 添加或修改隐患信息对话框 -->
<el-dialog :title="title1" :visible.sync="open1" width="800px" append-to-body @close="cancel"> <el-dialog destroy-on-close :title="title1" :visible.sync="open1" width="800px" append-to-body @close="cancel">
<el-form ref="form1" :model="form1" :rules="rules" label-width="120px"> <el-form ref="form1" :model="form1" :rules="rules" label-width="120px">
<el-col :span="23"> <el-col :span="23">
<el-form-item label="隐患名称" prop="troubleName"> <el-form-item label="隐患名称" prop="troubleName">
...@@ -406,7 +406,7 @@ export default { ...@@ -406,7 +406,7 @@ export default {
{ required: true, message: "请输入地址", trigger: "blur" } { required: true, message: "请输入地址", trigger: "blur" }
], ],
pictureUrl: [ pictureUrl: [
{ required: true, message: "请上传图片", trigger: "blur" } { required: true, message: "请上传图片", trigger: ['blur', 'change'] }
], ],
longitude: [ longitude: [
{ required: true, message: "请输入经纬度", trigger: "blur" } { required: true, message: "请输入经纬度", trigger: "blur" }
...@@ -449,11 +449,14 @@ export default { ...@@ -449,11 +449,14 @@ export default {
}) })
}, },
getFileInfo(res){ getFileInfo(res){
console.log ("res",res )
this.form1.pictureUrl = res.url; this.form1.pictureUrl = res.url;
}, },
listRemove(e) { listRemove(e) {
this.form1.pictureUrl = ""; this.form1.pictureUrl = "";
this.fileList = []; this.fileList = [];
console.log("删除了")
}, },
confirmFun(res) { confirmFun(res) {
//确认选择经纬度 //确认选择经纬度
...@@ -588,6 +591,7 @@ export default { ...@@ -588,6 +591,7 @@ export default {
} }
this.open1 = true; this.open1 = true;
this.title1 = "修改隐患信息"; this.title1 = "修改隐患信息";
console.log("this.form1.pictureUrl",this.form1.pictureUrl)
if (this.form1.pictureUrl) { if (this.form1.pictureUrl) {
this.fileList.push({ this.fileList.push({
url: this.form1.pictureUrl, url: this.form1.pictureUrl,
......
<template> <template>
<div class="app-container detail" style="background-color: rgb(238, 241, 245);"> <div class="app-container detail" style="background-color: rgb(238, 241, 245);">
<!-- 工单信息 --> <!-- 工单信息 -->
<div style="padding-top: 10px;background: #fff;height: 100%;"> <div style="padding-top: 10px;background: #fff;height: 100%;">
<el-row>
<el-col :span="24" style="padding-left: 15px;">
<div style="height: 45px;" @click="$router.go(-1)">
<el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回
</el-button>
<div style="float: left;margin-top: 8px;margin-left: 5px;"><img src="../../../assets/logo/fanhui.png"
style="width: 25px;" alt=""></div>
</div>
</el-col>
</el-row>
<el-row style="width: 100%;height: 45px;">
<el-col :span="24">
<div style="">
<ul>
<li style="list-style: none;font-weight: 900;font-size: 20px;color: #053b6a;">工单基础信息详情</li>
</ul>
</div>
</el-col>
</el-row>
<el-steps :active="active" finish-status="success" simple prop="orderStatus" style="margin-top: 5px">
<el-step title="未接收"></el-step>
<el-step title="已接收"></el-step>
<!-- <el-step title="进行中" ></el-step>-->
<el-step title="已反馈"></el-step>
<el-step title="已归档"></el-step>
</el-steps>
<el-divider></el-divider>
<el-row style="width: 100%;">
<el-col :span="24">
<div style="color: #31EAEA;height: 25px;">
<ul>
<li>详细信息</li>
</ul>
</div>
</el-col>
</el-row>
<el-row style="width: 100%;padding: 10px;padding-left: 40px;">
<el-col :span="6">
<el-form ref="form" v-model="form" :rules="rules" style="width: 100%;">
<el-form-item label="工单类型:" prop="orderType" style="margin-bottom: 0px;">
<font v-if="form.orderType == 1">巡检信息</font>
<font v-if="form.orderType == 2">隐患信息</font>
<font v-if="form.orderType == 3">报警信息</font>
</el-form-item>
<el-form-item label="工单编号:" prop="orderId" style="margin-bottom: 0px;">
<font>{{form.orderId}}</font>
</el-form-item>
<el-form-item label="工单名称:" prop="orderName" style="margin-bottom: 0px;">
<font>{{form.orderName}}</font>
</el-form-item>
<el-form-item label="工单状态:" prop="orderStatus" style="margin-bottom: 0px;">
<font v-if="form.orderStatus == 0">未接收</font>
<font v-if="form.orderStatus == 1">已接收</font>
<font v-if="form.orderStatus == 2">已反馈</font>
<font v-if="form.orderStatus == 3">已归档</font>
</el-form-item>
<el-form-item label="指定执行人员:" prop="appointInspectorName" style="margin-bottom: 0px;">
<font>{{form.appointInspectorName}}</font>
</el-form-item>
<el-form-item label="工单描述:" prop="remarks" style="margin-bottom: 0px;width: 170%;">
<font>{{form.remarks}}</font>
</el-form-item>
</el-form>
</el-col>
<el-col :span="6">
<el-form ref="form" v-model="form" :rules="rules" style="width: 100%;">
<el-form-item label="设备类型:" prop="deviceType" v-if="form.orderType != 1" style="margin-bottom: 0px;">
<font v-if="form.deviceType == 0">管道</font>
<font v-if="form.deviceType == 1">调压阀</font>
<font v-if="form.deviceType == 2">阀门井</font>
<font v-if="form.deviceType == 3">流量计</font>
<font v-if="form.deviceType == 4">压力表</font>
</el-form-item>
<el-form-item label="设备名称:" prop="deviceName" style="margin-bottom: 0px;">
<font v-if="form.orderType != 1">{{form.deviceName}}</font>
<el-tree :data="deviceOptions" :props="defaultProps" :expand-on-click-node="false" ref="tree"
@node-click="handleNodeClick" v-if="form.orderType == 1" />
</el-form-item>
<el-form-item label="设备位置:" v-if="form.orderType != 1" style="margin-bottom: 0px;">
<font v-if="form.deviceType == 0">{{form.pipeList?form.pipeList[0].pipeAddr:"-"}}</font>
<font v-if="form.deviceType != 0">{{form.deviceInfoList?form.deviceInfoList[0].deviceAddr:"-"}}</font>
</el-form-item>
<el-form-item label="工单进度:" v-if="form.orderType == 1" style="margin-bottom: 0px;">
<font>{{form.finishNum}}/{{form.deviceNum}}</font>
</el-form-item>
<el-form-item label="下发时间:" prop="allotTime" style="margin-bottom: 0px;">
<font>{{form.allotTime}}</font>
</el-form-item>
</el-form>
</el-col>
<el-col :span="12">
<div id="marbox" style="width: 100%;height: 250px;margin-top: -35px; border: 1px solid rgb(218, 213, 213);">
<div style="width: 100%;height: 100%" id="container"></div>
</div>
</el-col>
</el-row>
<!-- 接单信息 -->
<div v-if="form.actualTime != '' && form.actualTime != null">
<el-divider></el-divider>
<el-row> <el-row>
<el-col :span="24" style="padding-left: 15px;">
<div style="height: 45px;" @click="$router.go(-1)">
<el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回
</el-button>
<div style="float: left;margin-top: 8px;margin-left: 5px;"><img src="../../../assets/logo/fanhui.png" style="width: 25px;" alt=""></div>
</div>
</el-col>
</el-row>
<el-row style="width: 100%;height: 45px;">
<el-col :span="24"> <el-col :span="24">
<div style=""> <div style="color: #31EAEA;width: 100%;height: 40px;">
<ul><li style="list-style: none;font-weight: 900;font-size: 20px;color: #053b6a;">工单基础信息详情</li></ul> <ul>
<li>接单信息</li>
</ul>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-steps :active="active" finish-status="success" simple prop="orderStatus" style="margin-top: 5px"> <el-row>
<el-step title="未接收" ></el-step> <el-col :span="6">
<el-step title="已接收" ></el-step> <el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;">
<!-- <el-step title="进行中" ></el-step>--> <el-form-item label="接单人:" prop="actualInspectorName">
<el-step title="已反馈" ></el-step> <font>{{form.actualInspectorName}}</font>
<el-step title="已归档" ></el-step> </el-form-item>
</el-steps>
<el-divider></el-divider>
<el-row style="width: 100%;">
<el-col :span="24">
<div style="color: #31EAEA;height: 25px;">
<ul><li>详细信息</li></ul>
</div>
</el-col>
</el-row>
<el-row style="width: 100%;padding: 10px;padding-left: 40px;">
<el-col :span="6">
<el-form ref="form" v-model="form" :rules="rules" style="width: 100%;">
<el-form-item label="工单类型:" prop="orderType" style="margin-bottom: 0px;">
<font v-if="form.orderType == 1">巡检信息</font>
<font v-if="form.orderType == 2">隐患信息</font>
<font v-if="form.orderType == 3">报警信息</font>
</el-form-item>
<el-form-item label="工单编号:" prop="orderId" style="margin-bottom: 0px;">
<font>{{form.orderId}}</font>
</el-form-item>
<el-form-item label="工单名称:" prop="orderName" style="margin-bottom: 0px;">
<font>{{form.orderName}}</font>
</el-form-item>
<el-form-item label="工单状态:" prop="orderStatus" style="margin-bottom: 0px;">
<font v-if="form.orderStatus == 0">未接收</font>
<font v-if="form.orderStatus == 1">已接收</font>
<font v-if="form.orderStatus == 2">已反馈</font>
<font v-if="form.orderStatus == 3">已归档</font>
</el-form-item>
<el-form-item label="指定执行人员:" prop="appointInspectorName" style="margin-bottom: 0px;">
<font>{{form.appointInspectorName}}</font>
</el-form-item>
<el-form-item label="工单描述:" prop="remarks" style="margin-bottom: 0px;width: 170%;">
<font>{{form.remarks}}</font>
</el-form-item>
</el-form> </el-form>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form ref="form" v-model="form" :rules="rules" style="width: 100%;"> <el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;">
<el-form-item label="设备类型:" prop="deviceType" v-if="form.orderType != 1" style="margin-bottom: 0px;"> <el-form-item label="接单时间:" prop="actualTime">
<font v-if="form.deviceType == 0">管道</font> <font>{{form.actualTime}}</font>
<font v-if="form.deviceType == 1">调压阀</font> </el-form-item>
<font v-if="form.deviceType == 2">阀门井</font>
<font v-if="form.deviceType == 3">流量计</font>
<font v-if="form.deviceType == 4">压力表</font>
</el-form-item>
<el-form-item label="设备名称:" prop="deviceName" style="margin-bottom: 0px;">
<font v-if="form.orderType != 1">{{form.deviceName}}</font>
<el-tree
:data="deviceOptions"
:props="defaultProps"
:expand-on-click-node="false"
ref="tree"
@node-click="handleNodeClick"
v-if="form.orderType == 1"
/>
</el-form-item>
<el-form-item label="设备位置:" v-if="form.orderType != 1" style="margin-bottom: 0px;">
<font v-if="form.deviceType == 0">{{form.pipeList?form.pipeList[0].pipeAddr:"-"}}</font>
<font v-if="form.deviceType != 0">{{form.deviceInfoList?form.deviceInfoList[0].deviceAddr:"-"}}</font>
</el-form-item>
<el-form-item label="工单进度:" v-if="form.orderType == 1" style="margin-bottom: 0px;">
<font>{{form.finishNum}}/{{form.deviceNum}}</font>
</el-form-item>
<el-form-item label="下发时间:" prop="allotTime" style="margin-bottom: 0px;">
<font>{{form.allotTime}}</font>
</el-form-item>
</el-form> </el-form>
</el-col> </el-col>
<el-col :span="12"> </el-row>
<div id="marbox" style="width: 100%;height: 250px;margin-top: -35px; border: 1px solid rgb(218, 213, 213);"> <el-divider></el-divider>
<div style="width: 100%;height: 100%" id="container"></div> </div>
</div>
</el-col>
</el-row>
<!-- 接单信息 -->
<div v-if="form.actualTime != '' && form.actualTime != null">
<el-divider></el-divider>
<el-row>
<el-col :span="24">
<div style="color: #31EAEA;width: 100%;height: 40px;">
<ul><li>接单信息</li></ul>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;">
<el-form-item label="接单人:" prop="actualInspectorName">
<font>{{form.actualInspectorName}}</font>
</el-form-item>
</el-form>
</el-col>
<el-col :span="6">
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;">
<el-form-item label="接单时间:" prop="actualTime">
<font>{{form.actualTime}}</font>
</el-form-item>
</el-form>
</el-col>
</el-row>
<el-divider></el-divider>
</div>
<!-- 反馈信息 --> <!-- 反馈信息 -->
<div style="width: 100%;font-weight: 600;" v-if="form.feedbackList != null"> <div style="width: 100%;font-weight: 600;" v-if="form.feedbackList != null">
<div style="color: #31EAEA;width: 100%;height: 40px;"> <div style="color: #31EAEA;width: 100%;height: 40px;">
<ul><li>反馈信息</li></ul> <ul>
</div> <li>反馈信息</li>
<div class="block" style="width: 95%;margin-left: 2%;"> </ul>
<el-timeline ref="timeline">
<el-timeline-item v-for="(activity, index) in form.feedbackList" v-show='index>1?false:true' :key="index" :timestamp="activity.feedbackTime">
<el-card>
<el-row>
<el-col :span="6">
<p>设备类型:
<span v-if="activity.deviceType == 0">管道</span>
<span v-if="activity.deviceType == 1">调压箱</span>
<span v-if="activity.deviceType == 2">阀门井</span>
<span v-if="activity.deviceType == 3">流量计</span>
<span v-if="activity.deviceType == 4">压力表</span>
</p>
<p>是否有隐患:
<span v-if="activity.isHiddenDanger == 1"></span>
<span v-if="activity.isHiddenDanger == 2"></span>
</p>
<p v-if="activity.isHiddenDanger == 1">处理状态:
<span v-if="activity.dealStatus == 1">不需要处理</span>
<span v-if="activity.dealStatus == 2">已处理完成</span>
<span v-if="activity.dealStatus == 3">未处理完成</span>
</p>
<div style="width: 600px;">
<p>反馈信息:
<span>{{activity.contents}}</span>
</p>
</div>
</el-col>
<el-col :span="6">
<p>设备名称:{{activity.deviceName}}</p>
<p>反馈时间:{{activity.feedbackTime}}</p>
</el-col>
<el-col :span="12">
<div class="feedbackTime-div">
<div class="feedbackTime">
<el-image :src="activity.pictureUrl1" :preview-src-list="[activity.pictureUrl1]" v-if="activity.pictureUrl1 != null && activity.pictureUrl1 != ''" style="width: 90px;"></el-image>
</div>
<div class="feedbackTime">
<el-image :src="activity.pictureUrl2" :preview-src-list="[activity.pictureUrl2]" v-if="activity.pictureUrl2 != null && activity.pictureUrl2 != ''" style="width: 90px;"></el-image>
</div>
<div class="feedbackTime">
<el-image :src="activity.pictureUrl3" :preview-src-list="[activity.pictureUrl3]" v-if="activity.pictureUrl3 != null && activity.pictureUrl3 != ''" style="width: 90px;"></el-image>
</div>
</div>
</el-col>
</el-row>
</el-card>
</el-timeline-item>
</el-timeline>
</div>
<div style="width: 95%;position: relative;" @click="changeDisplay(scope)">
<!-- <el-button type="primary"> -->
<i class="el-icon-arrow-down" v-if="isDisplay==false" style="margin-left: 100px;color: #909399;font-size: 14px;">
<span style="text-decoration:underline">显示全部</span>
</i>
<i class="el-icon-arrow-up" v-else style="color: #909399;font-size: 14px;margin-left: 100px;">
<span style="text-decoration:underline">收起</span>
</i>
<!-- </el-button> -->
</div>
</div> </div>
<div class="block" style="width: 95%;margin-left: 2%;">
<el-timeline ref="timeline">
<el-timeline-item v-for="(activity, index) in form.feedbackList" v-show='index>1?false:true' :key="index"
:timestamp="activity.feedbackTime">
<el-card>
<el-row>
<el-col :span="6">
<p>设备类型:
<span v-if="activity.deviceType == 0">管道</span>
<span v-if="activity.deviceType == 1">调压箱</span>
<span v-if="activity.deviceType == 2">阀门井</span>
<span v-if="activity.deviceType == 3">流量计</span>
<span v-if="activity.deviceType == 4">压力表</span>
</p>
<p>是否有隐患:
<span v-if="activity.isHiddenDanger == 1"></span>
<span v-if="activity.isHiddenDanger == 2"></span>
</p>
<p v-if="activity.isHiddenDanger == 1">处理状态:
<span v-if="activity.dealStatus == 1">不需要处理</span>
<span v-if="activity.dealStatus == 2">已处理完成</span>
<span v-if="activity.dealStatus == 3">未处理完成</span>
</p>
<div style="width: 600px;">
<p>反馈信息:
<span>{{activity.contents}}</span>
</p>
</div>
</el-col>
<el-col :span="6">
<p>设备名称:{{activity.deviceName}}</p>
<p>反馈时间:{{activity.feedbackTime}}</p>
</el-col>
<el-col :span="12">
<div class="feedbackTime-div">
<div class="feedbackTime">
<el-image :src="activity.pictureUrl1" :preview-src-list="[activity.pictureUrl1]"
v-if="activity.pictureUrl1 != null && activity.pictureUrl1 != ''" style="width: 90px;">
</el-image>
</div>
<div class="feedbackTime">
<el-image :src="activity.pictureUrl2" :preview-src-list="[activity.pictureUrl2]"
v-if="activity.pictureUrl2 != null && activity.pictureUrl2 != ''" style="width: 90px;">
</el-image>
</div>
<div class="feedbackTime">
<el-image :src="activity.pictureUrl3" :preview-src-list="[activity.pictureUrl3]"
v-if="activity.pictureUrl3 != null && activity.pictureUrl3 != ''" style="width: 90px;">
</el-image>
</div>
</div>
</el-col>
</el-row>
<!-- 归档信息 --> </el-card>
<div v-if="form.orderStatus == 3"> </el-timeline-item>
<el-divider></el-divider> </el-timeline>
<el-row>
<el-col :span="24">
<div style="color: #31EAEA;width: 100%;height: 40px;">
<ul><li>归档信息</li></ul>
</div>
</el-col>
</el-row>
<el-row style="padding-left: 40px;">
<el-col :span="6">
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;">
<el-form-item label="归档信息:" prop="archiving">
<font>{{form.archiving}}</font>
</el-form-item>
</el-form>
</el-col>
<el-col :span="6">
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;">
<el-form-item label="归档时间:" prop="updateTime">
<font>{{form.updateTime}}</font>
</el-form-item>
</el-form>
</el-col>
</el-row>
</div> </div>
<div style="width: 95%;position: relative;" @click="changeDisplay(scope)">
<!-- <el-button type="primary"> -->
<i class="el-icon-arrow-down" v-if="isDisplay==false"
style="margin-left: 100px;color: #909399;font-size: 14px;">
<span style="text-decoration:underline">显示全部</span>
</i>
<i class="el-icon-arrow-up" v-else style="color: #909399;font-size: 14px;margin-left: 100px;">
<span style="text-decoration:underline">收起</span>
</i>
<!-- </el-button> -->
<!-- 归档 -->
<div class="" style="width: 95%; height: 60px;margin-left: 50px;text-align: center;">
<el-button
type="primary"
size="normal"
icon="el-icon-edit"
@click="handleUpdate(form.orderId)"
v-hasPermi="['workOrder:basicsInfo:edit']"
v-if="form.orderStatus == 0"
>修改</el-button>
<el-button
type="primary"
size="normal"
icon="el-icon-edit"
@click="handleFinish(form.orderId)"
v-hasPermi="['workOrder:basicsInfo:editStatus']"
v-if="form.orderStatus == 2"
>归档</el-button>
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<div v-if="this.title == '工单信息修改'">
<el-form-item label="工单名称" prop="orderName">
<el-input v-model="form.orderName" placeholder="请输入工单名称" />
</el-form-item>
<el-form-item label="指定执行人员" prop="appointInspector">
<el-select v-model="form.appointInspector" placeholder="请选择执行人员" filterable clearable size="small" @change="setUserId">
<el-option
v-for="item in inspector"
:key="item.userId"
:label="item.nickName"
:value="item.userId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="工单描述" prop="remarks">
<el-input v-model="form.remarks" type="textarea" placeholder="请输入工单描述" />
</el-form-item>
</div>
<div v-if="this.title == '工单信息归档'">
<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="archiving">
<el-input v-model="form.archiving" type="textarea" placeholder="请输入归档信息" />
</el-form-item>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div> </div>
</div> </div>
<!-- 归档信息 -->
<div v-if="form.orderStatus == 3">
<el-divider></el-divider>
<el-row>
<el-col :span="24">
<div style="color: #31EAEA;width: 100%;height: 40px;">
<ul>
<li>归档信息</li>
</ul>
</div>
</el-col>
</el-row>
<el-row style="padding-left: 40px;">
<el-col :span="6">
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;">
<el-form-item label="归档信息:" prop="archiving">
<font>{{form.archiving}}</font>
</el-form-item>
</el-form>
</el-col>
<el-col :span="6">
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="height: 30px;width: 100%;">
<el-form-item label="归档时间:" prop="updateTime">
<font>{{form.updateTime}}</font>
</el-form-item>
</el-form>
</el-col>
</el-row>
</div>
<!-- 归档 -->
<div class="" style="width: 95%; height: 60px;margin-left: 50px;text-align: center;">
<el-button type="primary" size="normal" icon="el-icon-edit" @click="handleUpdate(form.orderId)"
v-hasPermi="['workOrder:basicsInfo:edit']" v-if="form.orderStatus == 0">修改</el-button>
<el-button type="primary" size="normal" icon="el-icon-edit" @click="handleFinish(form.orderId)"
v-hasPermi="['workOrder:basicsInfo:editStatus']" v-if="form.orderStatus == 2">归档</el-button>
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<div v-if="this.title == '工单信息修改'">
<el-form-item label="工单名称" prop="orderName">
<el-input v-model="form.orderName" placeholder="请输入工单名称" />
</el-form-item>
<el-form-item label="指定执行人员" prop="appointInspector">
<el-select v-model="form.appointInspector" placeholder="请选择执行人员" filterable clearable size="small"
@change="setUserId">
<el-option v-for="item in inspector" :key="item.userId" :label="item.nickName" :value="item.userId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="工单描述" prop="remarks">
<el-input v-model="form.remarks" type="textarea" placeholder="请输入工单描述" />
</el-form-item>
</div>
<div v-if="this.title == '工单信息归档'">
<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="archiving">
<el-input v-model="form.archiving" type="textarea" placeholder="请输入归档信息" />
</el-form-item>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</div> </div>
</template> </div>
</template>
<script> <script>
import { listBasicsInfo, getBasicsInfo, delBasicsInfo, addBasicsInfo, updateBasicsInfo, updateOrderStatus, exportBasicsInfo } from "@/api/workOrder/basicsInfo"; import { listBasicsInfo, getBasicsInfo, delBasicsInfo, addBasicsInfo, updateBasicsInfo, updateOrderStatus, exportBasicsInfo } from "@/api/workOrder/basicsInfo";
import { deviceTree } from "@/api/device/deviceInfo"; import { deviceTree } from "@/api/device/deviceInfo";
import gaodeMap from "utils/gaodeMap.js"; import gaodeMap from "utils/gaodeMap.js";
import {map, DEVICE_TYPE} from "utils/gaodeMap.js"; import { map, DEVICE_TYPE } from "utils/gaodeMap.js";
import { inspectorList } from "@/api/system/user"; import { inspectorList } from "@/api/system/user";
export default { export default {
name: "BasicsInfo", name: "BasicsInfo",
components: { components: {
}, },
data() { data() {
return { return {
inspector: [], inspector: [],
isDisplay:false, isDisplay: false,
dialogImageUrl: '', dialogImageUrl: '',
dialogVisible: false, dialogVisible: false,
disabled: false, disabled: false,
...@@ -344,7 +342,7 @@ export default { ...@@ -344,7 +342,7 @@ export default {
open: false, open: false,
// 工单状态字典 // 工单状态字典
typeOptions: [], typeOptions: [],
pickerOptions:[], pickerOptions: [],
// 工单类型字典 // 工单类型字典
ordertypeOptions: [], ordertypeOptions: [],
// 设备树选项 // 设备树选项
...@@ -377,9 +375,9 @@ export default { ...@@ -377,9 +375,9 @@ export default {
// 表单校验 // 表单校验
rules: { rules: {
}, },
active : 0, active: 0,
orderId : "", orderId: "",
showAndHide : false showAndHide: false
}; };
}, },
created() { created() {
...@@ -393,15 +391,14 @@ export default { ...@@ -393,15 +391,14 @@ export default {
this.getDicts("t_order_type").then(response => { this.getDicts("t_order_type").then(response => {
this.ordertypeOptions = response.data; this.ordertypeOptions = response.data;
}); });
this.getBasicsInfo(); // this.getBasicsInfo();
}, },
mounted(){ mounted() {
let gaoMap = new gaodeMap("石家庄");
this.gaoMap = gaoMap;
this.getBasicsInfo(); this.getBasicsInfo();
}, },
methods: { methods: {
getInspectorList(){ getInspectorList() {
this.loading = true; this.loading = true;
inspectorList().then(response => { inspectorList().then(response => {
this.inspector = response.data; this.inspector = response.data;
...@@ -409,19 +406,19 @@ export default { ...@@ -409,19 +406,19 @@ export default {
}); });
}, },
// 点击按钮显示隐藏 // 点击按钮显示隐藏
changeDisplay(e){ changeDisplay(e) {
this.isDisplay = !this.isDisplay this.isDisplay = !this.isDisplay
let $timeline = this.$refs.timeline; let $timeline = this.$refs.timeline;
if(!this.showAndHide){ if (!this.showAndHide) {
for(let i = 0; i< $timeline.$children.length; i++){ for (let i = 0; i < $timeline.$children.length; i++) {
if(i>1){ if (i > 1) {
$timeline.$children[i].$el.style.display = "block"; $timeline.$children[i].$el.style.display = "block";
} }
} }
this.showAndHide = true; this.showAndHide = true;
}else{ } else {
for(let i = 0; i< $timeline.$children.length; i++){ for (let i = 0; i < $timeline.$children.length; i++) {
if(i>1){ if (i > 1) {
$timeline.$children[i].$el.style.display = "none"; $timeline.$children[i].$el.style.display = "none";
} }
} }
...@@ -452,32 +449,43 @@ export default { ...@@ -452,32 +449,43 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
getBasicsInfo (){ getBasicsInfo() {
getBasicsInfo(this.orderId).then(response =>{ !
getBasicsInfo(this.orderId).then(response => {
this.form = response.data; this.form = response.data;
console.log(this.form)
this.active = parseInt(response.data.orderStatus) + 1; this.active = parseInt(response.data.orderStatus) + 1;
if(this.form.deviceInfoList.length>0){ if (this.form.deviceInfoList.length > 0) {
console.log("this.form.deviceInfoList",this.form.deviceInfoList) console.log("this.form.deviceInfoList", this.form.deviceInfoList)
this.gaoMap.resetMapCenter([this.form.deviceInfoList[0].longitude,this.form.deviceInfoList[0].latitude]); let gaoMap = new gaodeMap("石家庄", [this.form.deviceInfoList[0].longitude, this.form.deviceInfoList[0].latitude]);
this.gaoMap = gaoMap;
// this.gaoMap.resetMapCenter([this.form.deviceInfoList[0].longitude, this.form.deviceInfoList[0].latitude]);
for (var i = 0; i < this.form.deviceInfoList.length; i++) {
let obj = this.form.deviceInfoList[i];
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj);
} }
for(var i = 0; i < this.form.deviceInfoList.length; i++){
let obj = this.form.deviceInfoList[i];
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj);
} }
if(this.form.pipeList != null){
for(var i = 0; i < this.form.pipeList.length; i++){ if (this.form.pipeList != null) {
console.log("this.form.pipeList",this.form.pipeList[0].coordinates)
const {coordinates} = this.form.pipeList[0];
const path1 = eval(coordinates)[0];
const path2 = eval(coordinates)[1];
const path3 = [(Number(path1[0]) + Number(path2[0])) / 2, (Number(path1[1]) + Number(path2[1])) / 2];
let gaoMap = new gaodeMap("石家庄",path3);
this.gaoMap = gaoMap;
for (var i = 0; i < this.form.pipeList.length; i++) {
let obj = this.form.pipeList[i]; let obj = this.form.pipeList[i];
this.gaoMap.onlyLine(obj); this.gaoMap.onlyLine(obj);
} }
} }
if(this.form.orderType == '1') { if (this.form.orderType == '1') {
// 获取设备列表树 // 获取设备列表树
let data = { let data = {
key1:this.form.deviceInfoList, key1: this.form.deviceInfoList,
key2:this.form.pipeList key2: this.form.pipeList
}; };
deviceTree(data).then(response => { deviceTree(data).then(response => {
this.deviceOptions[0].childList = response.data; this.deviceOptions[0].childList = response.data;
...@@ -494,7 +502,7 @@ export default { ...@@ -494,7 +502,7 @@ export default {
handleNodeClick(data) { handleNodeClick(data) {
}, },
setUserId(val){ setUserId(val) {
this.form.appointInspector = val; this.form.appointInspector = val;
}, },
// 取消按钮 // 取消按钮
...@@ -531,7 +539,7 @@ export default { ...@@ -531,7 +539,7 @@ export default {
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.orderId) this.ids = selection.map(item => item.orderId)
this.single = selection.length!==1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
...@@ -559,7 +567,7 @@ export default { ...@@ -559,7 +567,7 @@ export default {
this.title = "工单信息修改"; this.title = "工单信息修改";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
...@@ -569,7 +577,7 @@ export default { ...@@ -569,7 +577,7 @@ export default {
this.open = false; this.open = false;
location.reload(); location.reload();
}); });
} else if(this.form.orderStatus == '2'){ } else if (this.form.orderStatus == '2') {
updateOrderStatus(this.form).then(response => { updateOrderStatus(this.form).then(response => {
this.msgSuccess("操作成功"); this.msgSuccess("操作成功");
this.open = false; this.open = false;
...@@ -583,79 +591,90 @@ export default { ...@@ -583,79 +591,90 @@ export default {
handleDelete(row) { handleDelete(row) {
const orderIds = row.orderId || this.ids; const orderIds = row.orderId || this.ids;
this.$confirm('是否确认删除工单基础信息编号为"' + orderIds + '"的数据项?', "警告", { this.$confirm('是否确认删除工单基础信息编号为"' + orderIds + '"的数据项?', "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(function() { }).then(function () {
return delBasicsInfo(orderIds); return delBasicsInfo(orderIds);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.msgSuccess("删除成功"); this.msgSuccess("删除成功");
}).catch(() => {}); }).catch(() => { });
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = this.queryParams; const queryParams = this.queryParams;
this.$confirm('是否确认导出所有工单基础信息数据项?', "警告", { this.$confirm('是否确认导出所有工单基础信息数据项?', "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.exportLoading = true; this.exportLoading = true;
return exportBasicsInfo(queryParams); return exportBasicsInfo(queryParams);
}).then(response => { }).then(response => {
this.download(response.msg); this.download(response.msg);
this.exportLoading = false; this.exportLoading = false;
}).catch(() => {}); }).catch(() => { });
} }
} }
} }
</script> </script>
<style> <style>
.el-tree-node__content{ .el-tree-node__content {
width: 150px; width: 150px;
} }
.el-divider--horizontal {
display: block; .el-divider--horizontal {
height: 1px; display: block;
width: 100%; height: 1px;
margin: 20px 0; width: 100%;
} margin: 20px 0;
.feedbackTime-div{ }
float: left;margin-left: 150px;margin-top: 10px;
} .feedbackTime-div {
.feedbackTime{ float: left;
height: 120px; margin-left: 150px;
width: 120px; margin-top: 10px;
float: left; }
margin-left: 15px;
margin-top: 5px; .feedbackTime {
margin-bottom: 15px; height: 120px;
display: flex; width: 120px;
justify-content: center; float: left;
align-items: center; margin-left: 15px;
} margin-top: 5px;
.el-card__body { margin-bottom: 15px;
padding: 5px 20px 20px 20px; display: flex;
} justify-content: center;
.el-tree{ align-items: center;
margin-top: 5px; }
margin-left: 70px;
} .el-card__body {
.avatar-uploader{ padding: 5px 20px 20px 20px;
width: 25%; }
float: left;
} .el-tree {
.avatar-uploader .el-upload { margin-top: 5px;
margin-left: 70px;
}
.avatar-uploader {
width: 25%;
float: left;
}
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
border-radius: 6px; border-radius: 6px;
cursor: pointer; cursor: pointer;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.avatar-uploader .el-upload:hover { .avatar-uploader .el-upload:hover {
border-color: #409EFF; border-color: #409EFF;
} }
.avatar-uploader-icon { .avatar-uploader-icon {
font-size: 28px; font-size: 28px;
color: #8c939d; color: #8c939d;
...@@ -664,13 +683,15 @@ export default { ...@@ -664,13 +683,15 @@ export default {
line-height: 178px; line-height: 178px;
text-align: center; text-align: center;
} }
.avatar { .avatar {
width: 178px; width: 178px;
height: 178px; height: 178px;
display: block; display: block;
} }
li{
li {
font-size: 15px; font-size: 15px;
font-weight: 900; font-weight: 900;
} }
</style> </style>
\ No newline at end of file
...@@ -276,7 +276,7 @@ ...@@ -276,7 +276,7 @@
import FileUpload from '@/components/FileUpload'; import FileUpload from '@/components/FileUpload';
import Cookie from 'js-cookie'; import Cookie from 'js-cookie';
import { deviceTree } from "@/api/device/deviceInfo"; import { deviceTree } from "@/api/device/deviceInfo";
import gaodeMap from "utils/gaodeMap.js"; import c from "utils/gaodeMap.js";
import {map, DEVICE_TYPE} from "utils/gaodeMap.js"; import {map, DEVICE_TYPE} from "utils/gaodeMap.js";
import { inspectorList } from "@/api/system/user"; import { inspectorList } from "@/api/system/user";
......
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