Commit 0c19e090 authored by 王晓倩's avatar 王晓倩

隐患信息列表图片垂直居中问题,实时数据、历史数据、隐患信息检索下拉框清空问题

parent 39ae8167
......@@ -75,8 +75,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from t_device_report_data t
left join t_device_info d on t.device_num = d.iot_no
<where>
<if test="deviceCode != null "> and d.device_code like concat('%',#{deviceCode},'%')</if>
<if test="deviceType != null "> and d.device_type = #{deviceType}</if>
<if test="deviceCode != null and deviceCode != ''"> and d.device_code like concat('%',#{deviceCode},'%')</if>
<if test="deviceType != null and deviceType != ''"> and d.device_type = #{deviceType}</if>
<if test="startReportTime != null "> and t.report_time &gt;= #{startReportTime}</if>
<if test="endReportTime != null "> and t.report_time &lt;= #{endReportTime}</if>
<if test="communicationStatus != null and communicationStatus != ''"> and t.communication_status = #{communicationStatus}</if>
......@@ -112,8 +112,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from t_device_report_data t
LEFT JOIN t_device_info d on t.device_num = d.iot_no
<where>
<if test="deviceCode != null "> and d.device_code like concat('%',#{deviceCode},'%')</if>
<if test="deviceType != null "> and d.device_type = #{deviceType}</if>
<if test="deviceCode != null and deviceCode != ''"> and d.device_code like concat('%',#{deviceCode},'%')</if>
<if test="deviceType != null and deviceType != ''"> and d.device_type = #{deviceType}</if>
<if test="deviceType == null "> and (d.device_type = '3' or d.device_type = '4')</if>
<if test="startReportTime != null "> and t.report_time &gt;= #{startReportTime}</if>
<if test="endReportTime != null "> and t.report_time &lt;= #{endReportTime}</if>
......
......@@ -40,9 +40,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="deviceType != null and deviceType != ''"> and device_type = #{deviceType}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="dealStatus != null and dealStatus != '' and dealStatus != 0 and dealStatus != -1"> and deal_status = #{dealStatus}</if>
<if test="dealStatus != null and dealStatus != '' and dealStatus != -2 and dealStatus != -1"> and deal_status = #{dealStatus}</if>
<if test="dealStatus == -1"> and order_id is null</if>
<if test="dealStatus == 0"> and order_id is not null and deal_status is null</if>
<if test="dealStatus == -2"> and order_id is not null and deal_status is null</if>
<if test="address != null and address != ''"> and address = #{address}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
<if test="pictureUrl != null and pictureUrl != ''"> and picture_url = #{pictureUrl}</if>
......
<template>
<div class="app-container">
<div v-if="fromGisMap">
<div
style="width: 5%; height: 45px; margin-left: 20px"
@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>
</div>
<el-form
:model="queryParams"
ref="queryForm"
......@@ -93,19 +72,19 @@
</el-form>
<el-table v-loading="loading" :data="deviceAlarmList.slice((pageNum-1)*pageSize,pageNum*pageSize)" @selection-change="handleSelectionChange" >
<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="deviceName" width="300px"/>
<el-table-column label="设备编号" align="center" prop="deviceCode" width="260px"/>
<el-table-column label="设备类型" align="center" prop="deviceType"/>
<el-table-column label="报警类型" align="center" prop="alarmType" />
<el-table-column label="报警值" align="center" prop="alarmValue" />
<el-table-column label="报警开始时间" align="center" prop="startTime" />
<el-table-column label="报警结束时间" align="center" prop="endTime" >
<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>
</template>
</el-table-column>
<el-table-column label="处理状态" align="center" prop="dealStatus">n
<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 == '') &&
......
......@@ -12,8 +12,12 @@
</el-form-item>
<el-form-item label="设备类型" prop="deviceType">
<el-select v-model="queryParams.deviceType" placeholder="请选择设备类型" filterable clearable size="small">
<el-option label="流量计" value="3" />
<el-option label="压力表" value="4" />
<el-option
v-for="temp in typeOptions"
:key="temp.value"
:label="temp.label"
:value="temp.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
......@@ -93,6 +97,11 @@ export default {
pageSize: 10,
// 设备监控表格数据
dataList: [],
// 处理状态字典
typeOptions: [
{'label':'流量计','value':'3'},
{'label':'压力表','value':'4'},
],
// 弹出层标题
title: "",
// 是否显示弹出层
......
......@@ -12,8 +12,12 @@
</el-form-item>
<el-form-item label="设备类型" prop="deviceType">
<el-select v-model="queryParams.deviceType" placeholder="请选择设备类型" filterable clearable size="small">
<el-option label="流量计" value="3" />
<el-option label="压力表" value="4" />
<el-option
v-for="temp in typeOptions"
:key="temp.value"
:label="temp.label"
:value="temp.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="上报时间" prop="startReportTime">
......@@ -102,6 +106,11 @@ export default {
pageSize: 10,
// 设备监控表格数据
dataList: [],
// 处理状态字典
typeOptions: [
{'label':'流量计','value':'3'},
{'label':'压力表','value':'4'},
],
// 弹出层标题
title: "",
// 是否显示弹出层
......
......@@ -16,11 +16,12 @@
</el-form-item>
<el-form-item label="处理状态" prop="dealStatus">
<el-select v-model="queryParams.dealStatus" placeholder="请选择状态" filterable clearable size="small" style="width: 170px">
<el-option label="未生成工单" value="-1" />
<el-option label="暂未处理" value="0" />
<el-option label="不需处理" value="1" />
<el-option label="已处理完成" value="2" />
<el-option label="未处理完成" value="3" />
<el-option
v-for="temp in statusOptions"
:key="temp.value"
:label="temp.label"
:value="temp.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="上报时间" prop="startCreateTime">
......@@ -67,7 +68,7 @@
</el-row>
<el-table v-loading="loading" :data="hiddenTroubleList.slice((pageNum-1)*pageSize,pageNum*pageSize)" @selection-change="handleSelectionChange">
<el-table-column label="隐患名称" align="center" prop="troubleName" />
<el-table-column label="隐患名称" align="center" prop="troubleName" width="400px"/>
<el-table-column label="隐患类型" align="center" prop="troubleType" >
<template slot-scope="scope">
<span v-if="scope.row.troubleType == 1">设备老化</span>
......@@ -81,9 +82,10 @@
<span v-if="scope.row.troubleLevel == 3">Ⅲ级</span>
</template>
</el-table-column>
<el-table-column label="图片" align="center" prop="pictureUrl" >
<el-table-column label="图片" align="center" prop="pictureUrl" style="text-align:center;">
<template slot-scope="scope">
<el-image :src="scope.row.pictureUrl" :preview-src-list="[scope.row.pictureUrl]" v-if="scope.row.pictureUrl != '' && scope.row.pictureUrl != null" style="width: 20%;vertical-align:middle"></el-image>
<img :src="scope.row.pictureUrl" style="width: 20%;vertical-align:middle" @click="showPicture(scope.row)"/>
<el-image :ref="'a'+scope.row.troubleId" :src="scope.row.pictureUrl" v-show="false" :preview-src-list="[scope.row.pictureUrl]" v-if="scope.row.pictureUrl != '' && scope.row.pictureUrl != null"></el-image>
</template>
</el-table-column>
<el-table-column label="上报人" align="center" prop="reportManName" />
......@@ -331,6 +333,14 @@ export default {
typeOptions: [],
// 隐患等级字典
levelOptions: [],
// 处理状态字典
statusOptions: [
{'label':'未生成工单','value':'-1'},
{'label':'暂未处理','value':'-2'},
{'label':'不需处理','value':'1'},
{'label':'已处理完成','value':'2'},
{'label':'未处理完成','value':'3'}
],
// 上传文件列表
fileList: [],
// 地图
......@@ -536,6 +546,10 @@ export default {
this.single = selection.length!==1
this.multiple = !selection.length
},
showPicture(row){
this.$refs['a'+row.troubleId].showViewer = true;
console.log("===",row.troubleId);
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
......
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