Commit 18cceaa1 authored by 纪泽龙's avatar 纪泽龙

Merge branch 'develop_jzl'

parents beb1683b 93682c78
......@@ -31,11 +31,11 @@ const permission = {
const index = [
{
path: "",
meta: { title: "Gis地图", icon: "dashboard" },
meta: { title: "GIS地图", icon: "dashboard" },
children: [
{
path: "enterprise/mapView",
meta: { title: "Gis地图", icon: "dashboard" }
meta: { title: "GIS地图", icon: "dashboard" }
}
]
}
......
......@@ -53,8 +53,8 @@ class gaodeMap {
showLabel: true,
// labelzIndex: 110,
pitch: 8,
zoom: 9
//mapStyle: 'amap://styles/darkblue',
zoom: 9,
// mapStyle: 'amap://styles/darkblue',
// mapStyle: 'amap://styles/3b679a15f448a4740ba2ff7524e1a4ae',
});
this.myMap = map;
......
......@@ -117,7 +117,7 @@ class gaodeMap {
if (this.handleInfoWindowOpenFunc) {
this.handleInfoWindowOpenFunc();
this.handleInfoWindowOpenFunc = null;
this.leftListClick=false;
this.leftListClick = false;
}
// 刚进入页面的时候只调用一次,让左侧的抽屉在地图移动完之后显示
......@@ -216,6 +216,8 @@ class gaodeMap {
options.scrollWheel = true;
map.setStatus(options);
});
this.infoWindowMove(infoWindow);
let marker = new AMap.Marker({
position: [data.longitude, data.latitude],
map: map,
......@@ -1011,6 +1013,25 @@ class gaodeMap {
this.markerPassedPolylineInfoWindow &&
this.markerPassedPolylineInfoWindow.close();
}
// infoWindow的拖拽
infoWindowMove(infoWindow) {
let disX, disY,dom;
infoWindow.on("mousedown", e => {
dom = e.target.dom;
// const a = dom.offsetTop + 20;
// dom.style.top = a + "px";
// console.log(dom.offsetTop);
// console.log(e.originEvent.clientY);
// console.log(dom.offsetLeft);
// console.log(e.originEvent.clientX);
disX = dom.offsetTop - e.originEvent.clientX;
disY = dom.offsetLeft - e.originEvent.clientY;
window.addEventListener("mousemove",(e)=>{
})
});
}
// 关闭转化到vue的dom
removeCloneDom() {
// 线
......
<template>
<div class="app-container">
<el-row v-if="$route.query.back">
<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-form
:model="queryParams"
ref="queryForm"
......@@ -71,30 +90,80 @@
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="deviceAlarmList" @selection-change="handleSelectionChange" >
<el-table-column label="设备名称" align="center" prop="deviceName" width="280px"/>
<el-table-column label="设备编号" align="center" prop="deviceCode" width="240px"/>
<el-table-column label="设备类型" align="center" prop="deviceType"/>
<el-table
v-loading="loading"
:data="deviceAlarmList"
@selection-change="handleSelectionChange"
>
<el-table-column
label="设备名称"
align="center"
prop="deviceName"
width="280px"
/>
<el-table-column
label="设备编号"
align="center"
prop="deviceCode"
width="240px"
/>
<el-table-column label="设备类型" align="center" prop="deviceType" />
<el-table-column label="报警类型" align="center" prop="alarmType" />
<el-table-column label="报警值" align="center" prop="alarmValue" width="150px"/>
<el-table-column label="报警开始时间" align="center" prop="startTime" width="220px"/>
<el-table-column label="报警结束时间" align="center" prop="endTime" width="220px">
<el-table-column
label="报警值"
align="center"
prop="alarmValue"
width="150px"
/>
<el-table-column
label="报警开始时间"
align="center"
prop="startTime"
width="220px"
/>
<el-table-column
label="报警结束时间"
align="center"
prop="endTime"
width="220px"
>
<template slot-scope="scope">
<span v-if="scope.row.endTime == null || scope.row.endTime == ''">-</span>
<span v-if="scope.row.endTime != null && scope.row.endTime != ''">{{scope.row.endTime}}</span>
<span v-if="scope.row.endTime == null || scope.row.endTime == ''"
>-</span
>
<span v-if="scope.row.endTime != null && scope.row.endTime != ''">{{
scope.row.endTime
}}</span>
</template>
</el-table-column>
<el-table-column label="处理状态" align="center" prop="dealStatus" width="150px">
<el-table-column
label="处理状态"
align="center"
prop="dealStatus"
width="150px"
>
<template slot-scope="scope">
<span v-if="scope.row.orderId == null || scope.row.orderId == ''">未生成工单</span>
<span v-if="(scope.row.dealStatus == null || scope.row.dealStatus == '') &&
scope.row.orderId != null && scope.row.orderId != ''">暂未处理</span>
<span v-if="scope.row.orderId == null || scope.row.orderId == ''"
>未生成工单</span
>
<span
v-if="
(scope.row.dealStatus == null || scope.row.dealStatus == '') &&
scope.row.orderId != null &&
scope.row.orderId != ''
"
>暂未处理</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" class-name="small-padding fixed-width">
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
size="normal"
......@@ -102,7 +171,8 @@
icon="el-icon-edit"
@click="handleIssue(scope.row)"
v-hasPermi="['workOrder:basicsInfo:add']"
v-if="scope.row.orderId == '' || scope.row.orderId == null">
v-if="scope.row.orderId == '' || scope.row.orderId == null"
>
生成工单
</el-button>
<el-button
......@@ -110,7 +180,8 @@
type="text"
icon="el-icon-edit"
@click="showDetail(scope.row)"
v-hasPermi="['dataMonitoring:deviceAlarm:query']">
v-hasPermi="['dataMonitoring:deviceAlarm:query']"
>
详情
</el-button>
</template>
......@@ -118,11 +189,12 @@
</el-table>
<pagination
v-show="total>0"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList" />
@pagination="getList"
/>
<!-- 添加工单信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
......@@ -137,10 +209,22 @@
<font>{{ form.alarmValue }}</font>
</el-form-item>
<el-form-item label="工单名称" prop="orderName">
<el-input v-model="form.orderName" placeholder="请输入工单名称" style="width: 590px" />
<el-input
v-model="form.orderName"
placeholder="请输入工单名称"
style="width: 590px"
/>
</el-form-item>
<el-form-item label="指定执行人员" prop="appointInspector">
<el-select v-model="form.appointInspector" placeholder="请选择执行人员" clearable filterable size="small" @change="setUserId" style="width: 590px">
<el-select
v-model="form.appointInspector"
placeholder="请选择执行人员"
clearable
filterable
size="small"
@change="setUserId"
style="width: 590px"
>
<el-option
v-for="item in inspector"
:key="item.userId"
......@@ -150,7 +234,12 @@
</el-select>
</el-form-item>
<el-form-item label="工单描述" prop="remarks">
<el-input type="textarea" v-model="form.remarks" placeholder="请输入工单描述" style="width: 590px" />
<el-input
type="textarea"
v-model="form.remarks"
placeholder="请输入工单描述"
style="width: 590px"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
......@@ -162,9 +251,12 @@
</template>
<script>
import { listDeviceAlarm, getDeviceAlarm } from "@/api/dataMonitoring/deviceAlarm";
import { addBasicsInfo } from "@/api/workOrder/basicsInfo";
import { inspectorList } from "@/api/system/user";
import {
listDeviceAlarm,
getDeviceAlarm,
} from "@/api/dataMonitoring/deviceAlarm";
import { addBasicsInfo } from "@/api/workOrder/basicsInfo";
import { inspectorList } from "@/api/system/user";
export default {
name: "DeviceAlarm",
......@@ -172,7 +264,7 @@ export default {
data() {
return {
// 判断是从哪里来的,如果是地图里来的,则可以返回
fromGisMap:false,
fromGisMap: false,
// 遮罩层
loading: true,
// 导出遮罩层
......@@ -241,11 +333,11 @@ export default {
beforeRouteEnter: (to, from, next) => {
next((vm) => {
// 如果是从地图里来的
if(from.path=="/enterprise/mapView"){
if (from.path == "/enterprise/mapView") {
// console.log(123)
vm.fromGisMap=true;
}else{
vm.fromGisMap=false;
vm.fromGisMap = true;
} else {
vm.fromGisMap = false;
}
});
},
......@@ -302,9 +394,9 @@ export default {
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.alarmId)
this.single = selection.length !== 1
this.multiple = !selection.length
this.ids = selection.map((item) => item.alarmId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 下发按钮操作 */
handleIssue(row) {
......@@ -334,12 +426,12 @@ export default {
/** 详细信息跳转 */
showDetail(row) {
this.$router.push({
path: '/dataMonitoring/alarmdetail',
path: "/dataMonitoring/alarmdetail",
query: {
alarmId: row.alarmId,
deviceType:row.deviceType
}
}) //带参跳转
deviceType: row.deviceType,
},
}); //带参跳转
},
},
};
......
......@@ -28,21 +28,34 @@
style="width: 100%"
height="170"
>
<el-table-column prop="deviceCode" label="设备编号" width="100">
</el-table-column>
<el-table-column prop="deviceName" label="设备名称" width="">
<el-table-column prop="deviceName" label="设备名称" width="150">
</el-table-column>
<el-table-column prop="alarmType" label="报警类型" width="80">
<el-table-column prop="alarmType" label="报警类型" width="">
</el-table-column>
<el-table-column prop="createTime" label="报警开始时间" width="170">
<el-table-column prop="createTime" label="报警开始时间" width="">
</el-table-column>
<el-table-column label="处理状态" align="center" prop="dealStatus">
<template slot-scope="scope">
<span v-if="scope.row.orderId == null || scope.row.orderId == ''"
>未生成工单</span
>
<span v-else-if="!scope.row.dealStatus && scope.row.orderId"
>暂未处理</span
>
<span v-else-if="scope.row.dealStatus == 1">不需处理</span>
<span v-else-if="scope.row.dealStatus == 2">已处理完成</span>
<span v-else-if="scope.row.dealStatus == 3">未处理完成</span>
<span v-else> - </span>
</template>
</el-table-column>
<el-table-column prop="alarmValue" label="报警内容" width="100">
</el-table-column>
</el-table>
</div>
</div>
<div class="right">
<template v-for="(item, index) in list">
<div
......@@ -95,6 +108,7 @@ export default {
4: "icon-ylbgs",
99: "icon-gdcd",
},
tableData: [
{
deviceCode: "2016-05-03",
......@@ -158,12 +172,12 @@ export default {
return this.iconList[item.type];
},
moreClick() {
this.$router.push("/dataMonitoring/deviceAlarm");
this.$router.push("/dataMonitoring/deviceAlarm?back=1");
// route.push(`dataMonitoring/deviceAlarm`)
},
repeatClick() {
// this.tableData=[];
if(this.repeatFinshed) return;
if (this.repeatFinshed) return;
this.getList(true);
},
getList(bool) {
......@@ -176,14 +190,18 @@ export default {
deviceName,
alarmType,
createTime,
dealStatus,
alarmValue,
orderId,
} = item;
return {
deviceCode,
deviceName,
alarmType,
createTime,
dealStatus,
alarmValue,
orderId,
};
});
this.tableData = arr;
......@@ -242,7 +260,7 @@ export default {
}
.repeat2 {
margin-left: 20px;
color:#67c23a;
color: #67c23a;
}
.more {
float: right;
......
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