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

Merge remote-tracking branch 'origin/master'

parents ba85bb00 f2e720ac
......@@ -40,7 +40,7 @@ public class TDeviceAlarmController extends BaseController
/**
* 查询报警信息列表
*/
@PreAuthorize("@ss.hasPermi('dataMonitoring:deviceAlarm:list')")
//@PreAuthorize("@ss.hasPermi('dataMonitoring:deviceAlarm:list')")
@GetMapping("/list")
public TableDataInfo list(DeviceAlarmForm deviceAlarmForm) throws Exception
{
......
......@@ -141,7 +141,7 @@ public class TDeviceInfoController extends BaseController
/**
* 统计各设备类型的设备总数
*/
@PreAuthorize("@ss.hasPermi('device:deviceInfo:countDeviceByType')")
//@PreAuthorize("@ss.hasPermi('device:deviceInfo:countDeviceByType')")
@GetMapping("/countDeviceByType")
public AjaxResult countDeviceByType()
{
......
......@@ -112,7 +112,7 @@ public class TPipeController extends BaseController
/**
* 统计管道总长度
*/
@PreAuthorize("@ss.hasPermi('device:pipe:countPipeLength')")
//@PreAuthorize("@ss.hasPermi('device:pipe:countPipeLength')")
@GetMapping("/countPipeLength")
public AjaxResult countPipeLength()
{
......
......@@ -82,7 +82,7 @@ public class SysUserController extends BaseController
/**
* 获取巡检员列表
*/
@PreAuthorize("@ss.hasPermi('system:user:inspectorList')")
//@PreAuthorize("@ss.hasPermi('system:user:inspectorList')")
@GetMapping("/inspectorList")
public AjaxResult inspectorList()
{
......
......@@ -15,7 +15,7 @@
:show-file-list="true"
:headers="headers"
class="upload-file-uploader"
:class="{ hide: addShow }"
:class="{ hide: fileArr.length>0 ||addShow }"
ref="upload"
>
<!-- 上传按钮 -->
......@@ -233,6 +233,8 @@ export default {
// this.fileList = this.list;
this.addShow = this.fileArr.length > 0 ? true : false;
},
};
</script>
......
......@@ -271,6 +271,7 @@ export default {
},
listRemove(e) {
this.form.url = "";
this.form.iconUrl="";
this.fileArr = [];
},
getPipeInfos() {
......
......@@ -270,6 +270,7 @@ export default {
},
listRemove(e) {
this.form.url = "";
this.form.iconUrl="";
this.fileArr = [];
},
getPipeInfos() {
......
......@@ -267,6 +267,7 @@ export default {
},
listRemove(e) {
this.form.url = "";
this.form.iconUrl="";
this.fileArr = [];
},
handleClose(done) {
......
......@@ -267,6 +267,7 @@ export default {
},
listRemove(e) {
this.form.url = "";
this.form.iconUrl="";
this.fileArr = [];
},
getPipeInfos() {
......
......@@ -41,7 +41,7 @@ class gaodeMap {
leftListClick = false;
//构造函数中设置中央点默认值
constructor(center) {
constructor(center, latlng) {
this.markers = [];
this.center = center ? center : defaultCenter;
map = new AMap.Map("container", {
......@@ -77,7 +77,7 @@ class gaodeMap {
this.createNewLine();
console.log("map点击事件新建");
})
.catch(() => {});
.catch(() => { });
}
// console.log("抬起来了");
});
......@@ -116,9 +116,10 @@ class gaodeMap {
let options = this.myMap.getStatus();
options.scrollWheel = true;
this.myMap.setStatus(options);
console.log("飞行结束")
});
this.districtBoundaries();
this.districtBoundaries(latlng);
}
panTo(lnglat) {
this.myMap.panTo(lnglat);
......@@ -148,7 +149,7 @@ class gaodeMap {
* 设置城市边界
*/
districtBoundaries() {
districtBoundaries(latlng) {
let that = this;
let opts = {
subdistrict: 0,
......@@ -156,12 +157,20 @@ class gaodeMap {
level: "city"
};
let district = new AMap.DistrictSearch(opts);
district.search(that.center, function(status, result) {
district.search(that.center, function (status, result) {
if (status == "complete") {
let defaultCenter = [];
defaultCenter.push(result.districtList[0].center.lng);
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;
for (let i = 0; i < bounds.length; i += 1) {
new AMap.Polyline({
......@@ -190,12 +199,12 @@ class gaodeMap {
offset: new AMap.Pixel(24, -38),
anchor: "left-top"
});
infoWindow.on("mouseover", function() {
infoWindow.on("mouseover", function () {
let options = map.getStatus();
options.scrollWheel = false;
map.setStatus(options);
});
infoWindow.on("mouseout", function() {
infoWindow.on("mouseout", function () {
let options = map.getStatus();
options.scrollWheel = true;
map.setStatus(options);
......@@ -225,7 +234,7 @@ class gaodeMap {
editWindow.obj = marker;
editWindow.gaoMap = that;
editWindow.map = map;
marker.on("click", function(e) {
marker.on("click", function (e) {
if ("edit" == that.mapOperateType) {
editWindow.form = e.target.getExtData();
editWindow.show();
......@@ -239,10 +248,10 @@ class gaodeMap {
vue
.$confirm(
'是否删除名称为"' +
e.target.getExtData().deviceName +
'"的' +
diviceType[markerType] +
" ?",
e.target.getExtData().deviceName +
'"的' +
diviceType[markerType] +
" ?",
"提示",
{
type: "warning"
......@@ -287,19 +296,19 @@ class gaodeMap {
infoWindow.open(map, e.target.getPosition());
}*/
});
marker.on("dragend", function(e) {
marker.on("dragend", function (e) {
editWindow.form.longitude = e.lnglat.lng;
editWindow.form.latitude = e.lnglat.lat;
});
} else {
marker.on("mouseover", function() {
marker.on("mouseover", function () {
marker.setLabel({
offset: new AMap.Pixel(0, -10), //设置文本标注偏移量
content: "<div class='info'>" + data.deviceName + "</div>", //设置文本标注内容
direction: "top" //设置文本标注方位
});
});
marker.on("mouseout", function() {
marker.on("mouseout", function () {
marker.setLabel({
content: null
});
......@@ -943,14 +952,14 @@ class gaodeMap {
this.overlays = [];
let that = this;
this.markerOverlays = [];
this.mouseTool.on("draw", function(e) {
this.mouseTool.on("draw", function (e) {
if (e.obj.getExtData().type != "newLine") {
map.remove(that.markerOverlays);
const device = that.createInfowindow("新增");
device.map = map;
device.obj = e.obj;
device.gaoMap = that;
e.obj.on("click", function(aa) {
e.obj.on("click", function (aa) {
let postion = aa.target._position;
//兼容拖拽后单击事件,拖拽后点击事件返回位置为数组
if (postion instanceof Array) {
......@@ -962,11 +971,11 @@ class gaodeMap {
}
device.show();
});
e.obj.on("mouseover", function() {
e.obj.on("mouseover", function () {
that.mouseTool.close();
});
e.obj.on("mouseout", function() {
e.obj.on("mouseout", function () {
that.draw(that.deviceType);
});
......@@ -1077,7 +1086,7 @@ class gaodeMap {
"AMap.MapType",
"AMap.Geolocation"
],
function() {
function () {
// 在图面添加工具条控件,工具条控件集成了缩放、平移、定位等功能按钮在内的组合控件
//map.addControl(new AMap.ToolBar());
......@@ -1100,7 +1109,7 @@ class gaodeMap {
searchTips(inputId) {
let that = this;
AMap.plugin(["AMap.AutoComplete", "AMap.PlaceSearch"], function() {
AMap.plugin(["AMap.AutoComplete", "AMap.PlaceSearch"], function () {
//输入提示
// var autoOptions = {
// input: inputId
......@@ -1141,7 +1150,7 @@ class gaodeMap {
});
let infoWindow = new AMap.InfoWindow({
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",
offset: new AMap.Pixel(20, -20)
});
......@@ -1158,9 +1167,11 @@ class gaodeMap {
infoWindow.close();
});
map.add(polyline);
const path = eval(coordinates)[0];
const path1 = eval(coordinates)[0];
const path2 = eval(coordinates)[1];
// 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];
// map.panTo(lntlat)
......
......@@ -281,8 +281,8 @@ export default {
this.getDetail();
},
mounted() {
let gaoMap = new gaodeMap("石家庄");
this.gaoMap = gaoMap;
// let gaoMap = new gaodeMap("石家庄");
// this.gaoMap = gaoMap;
},
methods: {
initData(getData1, getData2, getData3) {
......@@ -663,6 +663,13 @@ export default {
if(this.form.pipeList != null){
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);
this.dataListdetail.push(pipe);
this.gaoMap.onlyLine(pipe);
......@@ -672,8 +679,11 @@ export default {
let device = this.form.deviceList[0];
console.log("device", 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.resetMapCenter([device.longitude, device.latitude]);
}
var getData1 = [];
......
......@@ -215,8 +215,8 @@
// this.getData();
},
mounted() {
let gaoMap = new gaodeMap("石家庄");
this.gaoMap = gaoMap;
// let gaoMap = new gaodeMap("石家庄");
// this.gaoMap = gaoMap;
this.getData();
},
methods: {
......@@ -585,9 +585,11 @@
this.dataListdetail3.push(obj3);
this.form = response.data;
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)
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)
// if (this.form.length > 0) {
......
......@@ -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-col :span="11">
<el-form-item label="所属管道" prop="pipeId">
......
......@@ -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-col :span="23">
<el-form-item label="管道名称" prop="pipeName">
......
......@@ -6,14 +6,17 @@
<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 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>
<ul>
<li style="list-style: none;font-weight: 900;font-size: 20px;color: #053b6a;">管道管理详情</li>
</ul>
</div>
</el-col>
</el-row>
......@@ -22,7 +25,9 @@
<el-row style="width: 100%;">
<el-col :span="24">
<div style="color: #31EAEA;height: 25px;">
<ul><li>详细信息</li></ul>
<ul>
<li>详细信息</li>
</ul>
</div>
</el-col>
</el-row>
......@@ -65,32 +70,25 @@
<font>{{form.inspectionTime}}</font>
</el-form-item>
<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>
</el-col>
<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>
</el-col>
</el-row>
<div class="" style="width: 95%; height: 60px;margin-left: 50px;text-align: center;">
<el-button
size="normal"
type="primary"
icon="el-icon-edit"
@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>
<el-button size="normal" type="primary" icon="el-icon-edit" @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 @@
<el-col :span="12">
<el-form-item label="管道长度" prop="pipeLength">
<el-input type="number" min="0" v-model="editForm.pipeLength" placeholder="请输入管道长度">
<i
slot="suffix"
style="color: #000; font-style: normal; margin-right: 10px"
></i>
<i slot="suffix" style="color: #000; font-style: normal; margin-right: 10px"></i>
</el-input>
</el-form-item>
</el-col>
......@@ -153,24 +148,15 @@
</el-col>
<el-col>
<el-form-item label="管道图片上传" prop="iconUrl">
<MyFileUpload
listType="picture-card"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
/>
<MyFileUpload listType="picture-card" @resFun="getFileInfo" @remove="listRemove" :fileArr="fileList" />
<el-input v-show="false" disabled v-model="editForm.iconUrl"></el-input>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="安装日期" prop="installationTime">
<el-col :span="11">
<el-date-picker clearable size="small"
style="width: 100%"
v-model="editForm.installationTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择安装日期">
<el-date-picker clearable size="small" style="width: 100%" v-model="editForm.installationTime"
type="date" value-format="yyyy-MM-dd" placeholder="请选择安装日期">
</el-date-picker>
</el-col>
</el-form-item>
......@@ -187,13 +173,8 @@
</div>
</el-dialog>
<Mapdialog
v-if="loadmap"
:dialogTableVisible="dialogTableVisible"
@dialogcancelFun="dialogcancelFun"
@confirmFun="confirmFun($event)"
:str="str"
></Mapdialog>
<Mapdialog v-if="loadmap" :dialogTableVisible="dialogTableVisible" @dialogcancelFun="dialogcancelFun"
@confirmFun="confirmFun($event)" :str="str"></Mapdialog>
</div>
</div>
......@@ -261,7 +242,7 @@
{ required: true, message: "请上传图片", trigger: "change" },
],
installationTime: [
{ required: true, message: "请选择日期", trigger: "change" },
{ required: true, message: "请选择日期", trigger: "change" },
],
}
};
......@@ -269,6 +250,9 @@
created() {
// 如果是跳转来的,则接受初始化参数
this.pipeId = this.$route.query.pipeId;
},
mounted() {
this.getDetail();
this.getDicts("t_pipe_type").then(response => {
this.typeOptions = response.data;
......@@ -276,19 +260,22 @@
this.getDicts("t_pipe_pressure").then(response => {
this.pressureOptions = response.data;
});
},
mounted(){
let gaoMap = new gaodeMap("石家庄");
this.gaoMap = gaoMap;
},
methods: {
getDetail (){
getPipe(this.pipeId).then(response =>{
getDetail() {
getPipe(this.pipeId).then(response => {
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);
});
},
getFileInfo(res){
getFileInfo(res) {
this.editForm.iconUrl = res.url;
},
listRemove(e) {
......@@ -321,7 +308,7 @@
url: this.editForm.iconUrl,
});
}
if(this.editForm.coordinates){
if (this.editForm.coordinates) {
this.str = this.editForm.coordinates;
}
this.open = true;
......@@ -345,7 +332,7 @@
handleDelete(res) {
res.isDel = "1";
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];
devices = devices + obj.deviceName + " ";
}
......@@ -371,10 +358,14 @@
width: 100%;
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;
width: 120px;
float: left;
......@@ -385,19 +376,24 @@
justify-content: center;
align-items: center;
}
.el-card__body {
padding: 5px 20px 20px 20px;
}
.detail .el-form{
.detail .el-form {
width: 20%;
}
.detail .el-form-item{
.detail .el-form-item {
margin-bottom: 0px;
}
.avatar-uploader{
.avatar-uploader {
width: 25%;
float: left;
}
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
......@@ -405,9 +401,11 @@
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409EFF;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
......@@ -416,13 +414,15 @@
line-height: 178px;
text-align: center;
}
.avatar {
width: 178px;
height: 178px;
display: block;
}
li{
li {
font-size: 15px;
font-weight: 900;
}
</style>
</style>
\ No newline at end of file
......@@ -162,12 +162,17 @@
</div>
<div
class="deviceList"
:class="{ topActive: index == 0 }"
v-for="(iten, index) in item.list"
:class="{
topActive: index == 0,
textRed: iten.alarmState == 1,
}"
:key="iten.deviceId + `` + index"
@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">
{{ iten.code }}
</div>
......@@ -404,11 +409,11 @@ export default {
// });
},
watch: {
changeBtnData: {
handler(newName, oldName) {},
deep: true,
// immediate: true,
},
// changeBtnData: {
// handler(newName, oldName) {},
// deep: true,
// // immediate: true,
// },
},
methods: {
onResize() {
......@@ -456,9 +461,11 @@ export default {
.then((res) => {
if (res == 200) {
// 所有设备上图结束之后,左边的抽屉加载数据
this.pipeList();
this.pipeList().then((res) => {
console.log("开始报警准备");
this.getSelectAlarmDevice();
});
// 获取报警资源
this.getSelectAlarmDevice();
}
});
},
......@@ -536,7 +543,7 @@ export default {
},
// 获取报警资源,并且改变图上的状态
getSelectAlarmDevice() {
selectAlarmDevice().then((res) => {
return selectAlarmDevice().then((res) => {
if (res.length > 0) {
}
console.log("报警设备", res);
......@@ -565,8 +572,10 @@ export default {
const pipeId = item.getExtData().lineData.pipeId;
return deviceId == pipeId;
})[0];
if (polyline) {
let options = polyline.getExtData();
// 增加一个报警状态
// 如果有endtime说明状态已经不是报警状态了,要归位,所有东西都要变回来
options.lineData.view = this;
......@@ -590,6 +599,15 @@ export default {
console.log("管道报警");
}
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 {
options.alarmValue = alarmValue;
}
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()
// console.log(imageName)
......@@ -866,7 +897,6 @@ export default {
this.diveceInfoWindowShow(iten, lat, lng);
}
},
// 如果是线条飞过去出现infowindow
polylineInfoWindowShow(iten, lat, lng) {
const target = this.gaoMap.polyLines.filter((item) => {
......@@ -991,6 +1021,8 @@ export default {
deviceType: "0",
deviceName: item.pipeName,
code: item.pipeCode,
alarmState: item.alarmState ? item.alarmState : "0",
selfData: item,
};
});
this.allList[0] = pipeArr;
......@@ -1011,6 +1043,8 @@ export default {
deviceType: item.deviceType,
deviceName: item.deviceName,
code: item.iotNo,
alarmState: item.alarmState ? item.alarmState : "0",
selfData: item,
};
});
// 所有阀门井数据
......@@ -1026,6 +1060,8 @@ export default {
deviceType: item.deviceType,
deviceName: item.deviceName,
code: item.iotNo,
alarmState: item.alarmState ? item.alarmState : "0",
selfData: item,
};
});
// 所有流量计数据
......@@ -1041,6 +1077,8 @@ export default {
deviceType: item.deviceType,
deviceName: item.deviceName,
code: item.iotNo,
alarmState: item.alarmState ? item.alarmState : "0",
selfData: item,
};
});
// 所有压力表数据
......@@ -1056,6 +1094,8 @@ export default {
deviceType: item.deviceType,
deviceName: item.deviceName,
code: item.iotNo,
alarmState: item.alarmState ? item.alarmState : "0",
selfData: item,
};
});
// console.log("设备", tyxArr, fmjArr, lljArr, ylbArr);
......@@ -1093,7 +1133,7 @@ export default {
this.allList[6] = workManArr;
},
// 左边设备翻页
pipeList(pageNum) {
async pipeList(pageNum) {
const num = pageNum ? pageNum : 10;
// const { nowPage } = this.changeBtnData[0];
// this.changeBtnData[0].list = this.allList[0].filter((item, index) => {
......@@ -1265,6 +1305,7 @@ export default {
} else {
// 左边全选
this.leftBarNum = [1, 2, 3, 4, 7, 8, 9];
// this.arrowRightNum=[];
// 右转箭头的样式active判定
// this.arrowRightNum = [];
// 清空左边列表
......@@ -1278,12 +1319,13 @@ export default {
await this.getInspectorLocations({ userName: this.keyWord });
await this.getMapHiddenTroublelist({ troubleName: this.keyWord });
// 设备报警
this.getSelectAlarmDevice();
this.changeBtnData.forEach((item) => {
item.nowPage = 1;
});
this.pipeList();
this.pipeList().then(() => {
// 设备报警
this.getSelectAlarmDevice();
});
}
},
// 清空左边列表
......@@ -1640,7 +1682,7 @@ input[type="radio"] {
}
.deviceList {
cursor: pointer;
margin-bottom: 2px;
margin-bottom: 10px;
box-sizing: border-box;
border-bottom: 1px solid #053b6a00;
color: #1d1d1d;
......@@ -1682,6 +1724,16 @@ input[type="radio"] {
width: 100px;
text-align: center;
}
.textRed {
.no,
.name,
.code {
color: red;
}
&:hover {
border-bottom: 1px solid red;
}
}
}
.box {
width: 348px;
......
......@@ -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-col :span="23">
<el-form-item label="隐患名称" prop="troubleName">
......@@ -406,7 +406,7 @@ export default {
{ required: true, message: "请输入地址", trigger: "blur" }
],
pictureUrl: [
{ required: true, message: "请上传图片", trigger: "blur" }
{ required: true, message: "请上传图片", trigger: ['blur', 'change'] }
],
longitude: [
{ required: true, message: "请输入经纬度", trigger: "blur" }
......@@ -449,11 +449,14 @@ export default {
})
},
getFileInfo(res){
console.log ("res",res )
this.form1.pictureUrl = res.url;
},
listRemove(e) {
this.form1.pictureUrl = "";
this.fileList = [];
console.log("删除了")
},
confirmFun(res) {
//确认选择经纬度
......@@ -588,6 +591,7 @@ export default {
}
this.open1 = true;
this.title1 = "修改隐患信息";
console.log("this.form1.pictureUrl",this.form1.pictureUrl)
if (this.form1.pictureUrl) {
this.fileList.push({
url: this.form1.pictureUrl,
......
......@@ -276,7 +276,7 @@
import FileUpload from '@/components/FileUpload';
import Cookie from 'js-cookie';
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 { 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