Commit 6ecedc78 authored by 王晓倩's avatar 王晓倩
parents 4edd8300 b62ff13c
......@@ -101,6 +101,11 @@ public class THiddenTroubleInfoSController extends BaseController
@PutMapping
public AjaxResult edit(@RequestBody THiddenTroubleInfo tHiddenTroubleInfo)
{
//查询燃气信息是否有修改 如果有值证明没有修改 如果没有值证明已经修改
THiddenTroubleInfo tHiddenTroubleInfo1 = tHiddenTroubleInfoService.selectDetails(tHiddenTroubleInfo);
if (tHiddenTroubleInfo1==null){
tHiddenTroubleInfo.setHiddenTroubleDealStatus("1");
}
return toAjax(tHiddenTroubleInfoService.updateTHiddenTroubleInfo(tHiddenTroubleInfo));
}
......
......@@ -65,4 +65,11 @@ public interface THiddenTroubleInfoMapper
* @return
*/
List<THiddenTroubleInfo> selectTHiddenTroubleInfoExcelList(THiddenTroubleInfo tHiddenTroubleInfo);
/**
* 查询燃气信息是否有修改
* @param tHiddenTroubleInfo
* @return
*/
THiddenTroubleInfo selectDetails(THiddenTroubleInfo tHiddenTroubleInfo);
}
......@@ -65,4 +65,11 @@ public interface ITHiddenTroubleInfoService
* @return
*/
List<THiddenTroubleInfo> selectTHiddenTroubleInfoExcelList(THiddenTroubleInfo tHiddenTroubleInfo);
/**
* 查询燃气信息是否有修改
* @param tHiddenTroubleInfo
* @return
*/
THiddenTroubleInfo selectDetails(THiddenTroubleInfo tHiddenTroubleInfo);
}
......@@ -102,4 +102,14 @@ public class THiddenTroubleInfoServiceImpl implements ITHiddenTroubleInfoService
public List<THiddenTroubleInfo> selectTHiddenTroubleInfoExcelList(THiddenTroubleInfo tHiddenTroubleInfo) {
return tHiddenTroubleInfoMapper.selectTHiddenTroubleInfoExcelList(tHiddenTroubleInfo);
}
/**
* 查询燃气信息是否有修改
* @param tHiddenTroubleInfo
* @return
*/
@Override
public THiddenTroubleInfo selectDetails(THiddenTroubleInfo tHiddenTroubleInfo) {
return tHiddenTroubleInfoMapper.selectDetails(tHiddenTroubleInfo);
}
}
......@@ -75,6 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
group by hidden_trouble_id desc
</select>
<insert id="insertTHiddenTroubleInfo" parameterType="THiddenTroubleInfo" useGeneratedKeys="true" keyProperty="hiddenTroubleId">
insert into t_hidden_trouble_info
<trim prefix="(" suffix=")" suffixOverrides=",">
......@@ -145,4 +146,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{hiddenTroubleId}
</foreach>
</update>
<!--查询燃气信息是否有修改-->
<select id="selectDetails" resultMap="THiddenTroubleInfoResult" parameterType="THiddenTroubleInfo">
<include refid="selectTHiddenTroubleInfoVo"/>
where hidden_trouble_id=#{hiddenTroubleId}
<if test="hiddenTroubleName != null">
and hidden_trouble_name = #{hiddenTroubleName}
</if>
<if test="hiddenTroubleLevel != null">
and hidden_trouble_level = #{hiddenTroubleLevel}
</if>
<if test="hiddenTroubleType != null">
and hidden_trouble_type = #{hiddenTroubleType}
</if>
<if test="hiddenTroubleDescribe != null">
and hidden_trouble_describe = #{hiddenTroubleDescribe}
</if>
<if test="longitude != null">
and longitude = #{longitude}
</if>
<if test="latitude != null">
and latitude = #{latitude}
</if>
<if test="pictureUrl != null">
and picture_url= #{pictureUrl}
</if>
</select>
</mapper>
......@@ -14,12 +14,14 @@ router.beforeEach((to, from, next) => {
NProgress.start();
// 如果cookie里有token
if (getToken()) {
/* has token*/
// 如果要去login,就直接去默认页面
if (to.path === "/login") {
next({ path: "/" });
NProgress.done();
} else {
console.log("有");
// 如果没有获得当前用户的所有信息
if (store.getters.roles.length === 0) {
// 判断当前用户是否已拉取完user_info信息
......
......@@ -186,7 +186,7 @@
<div class="el-form-div">
<el-input v-model="form.longitude" placeholder="请输入经度" style="width: 120px" :disabled="readonly"/>
<el-input v-model="form.latitude" placeholder="请输入纬度" style="width: 120px;margin-left: 10px;" :disabled="readonly"/>
<el-button type="primary" style="margin-left: 10px;" plain @click="MapdialogFun">选择经纬度</el-button>
<el-button type="primary" :style="buttonstyle" plain @click="MapdialogFun">选择经纬度</el-button>
</div>
</el-form-item>
......@@ -293,6 +293,7 @@ export default {
eventGradeOptions: [],
// 弹出层标题
title: "",
buttonstyle:"display:none",
//选择经纬度
dialogTableVisible:false,
devicePos:[],
......@@ -562,6 +563,7 @@ export default {
this.reset();
this.open = true;
this.title = "添加事件接报";
this.buttonstyle="margin-left:10px"
},
qiyechang(value){
let obj = {};
......@@ -574,12 +576,14 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.readonly=true;
this.buttonstyle="display:none";
this.reset();
const id = row.id || this.ids
getReceive(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改事件接报";
document.getElementById("jingwei").style.display="none";
});
},
/** 提交按钮 */
......
<!--
* @Author: your name
* @Date: 2022-03-25 13:46:23
* @LastEditTime: 2022-03-25 17:18:05
* @LastEditTime: 2022-04-09 10:38:14
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /gassafety-progress/gassafetyprogress-web/src/views/operationMonitor/monitorData/component/charsData.vue
......@@ -30,15 +30,27 @@
<div class="middle flex">
<div class="first">正常</div>
<div>高爆</div>
<div>低爆</div>
<!-- 2是探测器,探测器只有报警,没有高低报 -->
<template v-if="index != 2">
<div>高报</div>
<div>低报</div>
</template>
<template v-else>
<div>报警</div>
</template>
<div class="last">离线数</div>
</div>
<div class="bottom flex">
<div class="first">1234</div>
<div>1234</div>
<div>1231</div>
<!-- 2是探测器,探测器只有报警,没有高低报 -->
<template v-if="index != 2">
<div>123321</div>
<div>12321</div>
</template>
<template v-else>
<div>12312</div>
</template>
<div class="last">534534</div>
</div>
</div>
......@@ -49,10 +61,10 @@
<script>
export default {
name: "charsData",
props:{
cardList:{
type:Array,
}
props: {
cardList: {
type: Array,
},
},
data() {
return {
......@@ -63,9 +75,8 @@ export default {
</script>
<style lang="scss" scoped>
.top-card {
margin-bottom:22px;
margin-bottom: 22px;
& > div {
flex: 1;
margin-right: 20px;
......@@ -141,6 +152,4 @@ export default {
display: flex;
justify-content: space-between;
}
</style>
\ No newline at end of file
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