Commit b013a9d2 authored by zhangjianqian's avatar zhangjianqian

大屏增加切换三维地图,命周期需要新增状态,预警和过期,并可筛选。

parent f0b0c0ba
...@@ -59,8 +59,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -59,8 +59,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by id desc order by id desc
</select> </select>
<select id="selectTDevLifeCycleListByParam" parameterType="TDevLifeCycle" resultMap="TDevLifeCycleResult"> <select id="selectTDevLifeCycleListByParam" parameterType="TDevLifeCycle" resultMap="TDevLifeCycleResult">
select id, dev_type,(select dict_label from sys_dict_data where dict_type='cytle_dev_type' and dict_value=dev_type) dev_type_name, dev_name, dev_no, dev_addr, dev_describe, dev_company, dev_status, alarm_days, use_date, curr_overhaul_date,dev_void_date, SELECT id, dev_type,
next_overhaul_date, curr_maintenance_date, next_maintenance_date, create_time,case when (TO_DAYS(next_overhaul_date)-TO_DAYS(NOW()))>alarm_days then 0 when next_overhaul_date is null or alarm_days is null then 0 else 1 end as jianxiu from t_dev_life_cycle (SELECT dict_label FROM sys_dict_data WHERE dict_type='cytle_dev_type' AND dict_value=dev_type) dev_type_name,
dev_name, dev_no, dev_addr, dev_describe, dev_company, dev_status, alarm_days, use_date,
curr_overhaul_date,dev_void_date,
next_overhaul_date, curr_maintenance_date, next_maintenance_date, create_time,
CASE
WHEN curr_overhaul_date IS NULL THEN -1
WHEN next_overhaul_date IS NULL OR DATEDIFF(next_overhaul_date, NOW()) > alarm_days THEN 0
WHEN next_overhaul_date>NOW() THEN 1
ELSE 2
END AS jianxiu
FROM t_dev_life_cycle
<where> <where>
<if test="devType != null and devType != ''"> and dev_type = #{devType}</if> <if test="devType != null and devType != ''"> and dev_type = #{devType}</if>
<if test="devName != null and devName != ''"> and dev_name like concat('%', #{devName}, '%')</if> <if test="devName != null and devName != ''"> and dev_name like concat('%', #{devName}, '%')</if>
...@@ -74,6 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -74,6 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="nextOverhaulDate != null "> and next_overhaul_date = #{nextOverhaulDate}</if> <if test="nextOverhaulDate != null "> and next_overhaul_date = #{nextOverhaulDate}</if>
<if test="currMaintenanceDate != null "> and curr_maintenance_date = #{currMaintenanceDate}</if> <if test="currMaintenanceDate != null "> and curr_maintenance_date = #{currMaintenanceDate}</if>
<if test="nextMaintenanceDate != null "> and next_maintenance_date = #{nextMaintenanceDate}</if> <if test="nextMaintenanceDate != null "> and next_maintenance_date = #{nextMaintenanceDate}</if>
<if test="jianxiu != null "> and jianxiu = #{jianxiu}</if>
<if test="soutext!=null and soutext!=''"> <if test="soutext!=null and soutext!=''">
and (dev_name like concat('%', #{soutext}, '%') or dev_no like concat('%', #{soutext}, '%')) and (dev_name like concat('%', #{soutext}, '%') or dev_no like concat('%', #{soutext}, '%'))
</if> </if>
......
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
<!-- <Right /> --> <!-- <Right /> -->
<div @click="$emit('imgClick', 'index')" class="backindex">返回首页概览</div> <div @click="$emit('imgClick', 'index')" class="backindex">返回首页概览</div>
<div class="mapChange">
<div :class="{ active: mapStyle }" @click="mapChange(2)">全景地图</div>
<div :class="{ active: !mapStyle }" @click="mapChange(1)">三维地图</div>
</div>
<Bottom @change="change"/> <Bottom @change="change"/>
</div> </div>
</template> </template>
...@@ -50,6 +54,7 @@ export default { ...@@ -50,6 +54,7 @@ export default {
data() { data() {
return { return {
pipeArr:[0,1,2], pipeArr:[0,1,2],
mapStyle: true,
}; };
}, },
computed: {}, computed: {},
...@@ -181,6 +186,15 @@ export default { ...@@ -181,6 +186,15 @@ export default {
}); });
} }
}, },
mapChange(num) {
if (num == 1) {
this.mapStyle = false;
this.gaoMap.changeMap(this.mapStyle)
} else {
this.mapStyle = true;
this.gaoMap.changeMap(this.mapStyle)
}
},
// sel1(index, item) { // sel1(index, item) {
// console.log(index, "=====fdsfdsf=====", item); // console.log(index, "=====fdsfdsf=====", item);
// const ind = this.selarr.indexOf(item.val); // const ind = this.selarr.indexOf(item.val);
...@@ -247,4 +261,26 @@ export default { ...@@ -247,4 +261,26 @@ export default {
z-index: 999; z-index: 999;
cursor: pointer; cursor: pointer;
} }
.mapChange {
left: 60px;
top: 60px;
color: #fff;
padding: 5px;
position: absolute;
display: flex;
z-index: 9999;
div {
border: 1px solid #339cc9;
padding: 3px 6px;
margin-left: 8px;
color: #339cc9;
cursor: pointer;
font-size: 14px;
&.active,
&:hover {
background-color: #053b6a;
color: #2cd5db;
}
}
}
</style> </style>
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="出厂编号" prop="devName">
<el-form-item label="设备名称" prop="devName">
<el-input <el-input
v-model="queryParams.devName" v-model="queryParams.devName"
placeholder="请输入出厂编号" placeholder="请输入出厂编号"
...@@ -20,15 +21,25 @@ ...@@ -20,15 +21,25 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="规格型号" prop="devNo">
<el-form-item label="出厂编号" prop="devNo">
<el-input <el-input
v-model="queryParams.devNo" v-model="queryParams.devNo"
placeholder="请输入规格型号" placeholder="请输入出厂编号"
clearable clearable
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<!--<el-form-item label="规格型号" prop="devModel">-->
<!--<el-input-->
<!--v-model="queryParams.devModel"-->
<!--placeholder="请输入规格型号"-->
<!--clearable-->
<!--size="small"-->
<!--@keyup.enter.native="handleQuery"-->
<!--/>-->
<!--</el-form-item>-->
<el-form-item label="安装位置" prop="devAddr"> <el-form-item label="安装位置" prop="devAddr">
<el-input <el-input
v-model="queryParams.devAddr" v-model="queryParams.devAddr"
......
...@@ -39,11 +39,12 @@ ...@@ -39,11 +39,12 @@
<!-- />--> <!-- />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="设备状态" prop="devStatus"> <el-form-item label="检验状态" prop="jianxiu">
<el-select v-model="queryParams.devStatus" placeholder="请选择设备状态" clearable size="small"> <el-select v-model="queryParams.jianxiu" placeholder="请选择设备状态" clearable size="small">
<el-option label="正常" value="1" /> <el-option label="未检验" value="-1" />
<el-option label="停用" value="2" /> <el-option label="已检验" value="0" />
<el-option label="报废" value="9" /> <el-option label="预警中" value="1" />
<el-option label="已过期" value="2" />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -78,12 +79,12 @@ ...@@ -78,12 +79,12 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="设备描述" align="center" prop="devDescribe" />--> <!-- <el-table-column label="设备描述" align="center" prop="devDescribe" />-->
<el-table-column label="设备状态" align="center" prop="devStatus" > <el-table-column label="检验状态" align="center" prop="jianxiu" >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.devStatus==null">-</span> <span v-if="scope.row.jianxiu==-1">未检验</span>
<span v-if="scope.row.devStatus==1" style="color: #1ab394">正常</span> <span v-if="scope.row.jianxiu==0" style="color: #1ab394">已检验</span>
<span v-if="scope.row.devStatus==2" style="color: #C03639">停用</span> <span v-if="scope.row.jianxiu==1" style="color: #fb8c00">预警中</span>
<span v-if="scope.row.devStatus==9" style="color:grey">报废</span> <span v-if="scope.row.jianxiu==2" style="color: #C03639">已过期</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="设备启用日期" align="center" prop="useDate" width="100"> <el-table-column label="设备启用日期" align="center" prop="useDate" width="100">
......
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