Commit 6ecedc78 authored by 王晓倩's avatar 王晓倩
parents 4edd8300 b62ff13c
...@@ -101,6 +101,11 @@ public class THiddenTroubleInfoSController extends BaseController ...@@ -101,6 +101,11 @@ public class THiddenTroubleInfoSController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody THiddenTroubleInfo tHiddenTroubleInfo) public AjaxResult edit(@RequestBody THiddenTroubleInfo tHiddenTroubleInfo)
{ {
//查询燃气信息是否有修改 如果有值证明没有修改 如果没有值证明已经修改
THiddenTroubleInfo tHiddenTroubleInfo1 = tHiddenTroubleInfoService.selectDetails(tHiddenTroubleInfo);
if (tHiddenTroubleInfo1==null){
tHiddenTroubleInfo.setHiddenTroubleDealStatus("1");
}
return toAjax(tHiddenTroubleInfoService.updateTHiddenTroubleInfo(tHiddenTroubleInfo)); return toAjax(tHiddenTroubleInfoService.updateTHiddenTroubleInfo(tHiddenTroubleInfo));
} }
......
...@@ -65,4 +65,11 @@ public interface THiddenTroubleInfoMapper ...@@ -65,4 +65,11 @@ public interface THiddenTroubleInfoMapper
* @return * @return
*/ */
List<THiddenTroubleInfo> selectTHiddenTroubleInfoExcelList(THiddenTroubleInfo tHiddenTroubleInfo); List<THiddenTroubleInfo> selectTHiddenTroubleInfoExcelList(THiddenTroubleInfo tHiddenTroubleInfo);
/**
* 查询燃气信息是否有修改
* @param tHiddenTroubleInfo
* @return
*/
THiddenTroubleInfo selectDetails(THiddenTroubleInfo tHiddenTroubleInfo);
} }
...@@ -65,4 +65,11 @@ public interface ITHiddenTroubleInfoService ...@@ -65,4 +65,11 @@ public interface ITHiddenTroubleInfoService
* @return * @return
*/ */
List<THiddenTroubleInfo> selectTHiddenTroubleInfoExcelList(THiddenTroubleInfo tHiddenTroubleInfo); List<THiddenTroubleInfo> selectTHiddenTroubleInfoExcelList(THiddenTroubleInfo tHiddenTroubleInfo);
/**
* 查询燃气信息是否有修改
* @param tHiddenTroubleInfo
* @return
*/
THiddenTroubleInfo selectDetails(THiddenTroubleInfo tHiddenTroubleInfo);
} }
...@@ -102,4 +102,14 @@ public class THiddenTroubleInfoServiceImpl implements ITHiddenTroubleInfoService ...@@ -102,4 +102,14 @@ public class THiddenTroubleInfoServiceImpl implements ITHiddenTroubleInfoService
public List<THiddenTroubleInfo> selectTHiddenTroubleInfoExcelList(THiddenTroubleInfo tHiddenTroubleInfo) { public List<THiddenTroubleInfo> selectTHiddenTroubleInfoExcelList(THiddenTroubleInfo tHiddenTroubleInfo) {
return tHiddenTroubleInfoMapper.selectTHiddenTroubleInfoExcelList(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" ...@@ -75,6 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
group by hidden_trouble_id desc group by hidden_trouble_id desc
</select> </select>
<insert id="insertTHiddenTroubleInfo" parameterType="THiddenTroubleInfo" useGeneratedKeys="true" keyProperty="hiddenTroubleId"> <insert id="insertTHiddenTroubleInfo" parameterType="THiddenTroubleInfo" useGeneratedKeys="true" keyProperty="hiddenTroubleId">
insert into t_hidden_trouble_info insert into t_hidden_trouble_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -145,4 +146,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -145,4 +146,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{hiddenTroubleId} #{hiddenTroubleId}
</foreach> </foreach>
</update> </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> </mapper>
...@@ -14,12 +14,14 @@ router.beforeEach((to, from, next) => { ...@@ -14,12 +14,14 @@ router.beforeEach((to, from, next) => {
NProgress.start(); NProgress.start();
// 如果cookie里有token // 如果cookie里有token
if (getToken()) { if (getToken()) {
/* has token*/ /* has token*/
// 如果要去login,就直接去默认页面 // 如果要去login,就直接去默认页面
if (to.path === "/login") { if (to.path === "/login") {
next({ path: "/" }); next({ path: "/" });
NProgress.done(); NProgress.done();
} else { } else {
console.log("有");
// 如果没有获得当前用户的所有信息 // 如果没有获得当前用户的所有信息
if (store.getters.roles.length === 0) { if (store.getters.roles.length === 0) {
// 判断当前用户是否已拉取完user_info信息 // 判断当前用户是否已拉取完user_info信息
......
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
<div class="el-form-div"> <div class="el-form-div">
<el-input v-model="form.longitude" placeholder="请输入经度" style="width: 120px" :disabled="readonly"/> <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-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> </div>
</el-form-item> </el-form-item>
...@@ -293,6 +293,7 @@ export default { ...@@ -293,6 +293,7 @@ export default {
eventGradeOptions: [], eventGradeOptions: [],
// 弹出层标题 // 弹出层标题
title: "", title: "",
buttonstyle:"display:none",
//选择经纬度 //选择经纬度
dialogTableVisible:false, dialogTableVisible:false,
devicePos:[], devicePos:[],
...@@ -562,6 +563,7 @@ export default { ...@@ -562,6 +563,7 @@ export default {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加事件接报"; this.title = "添加事件接报";
this.buttonstyle="margin-left:10px"
}, },
qiyechang(value){ qiyechang(value){
let obj = {}; let obj = {};
...@@ -574,12 +576,14 @@ export default { ...@@ -574,12 +576,14 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.readonly=true; this.readonly=true;
this.buttonstyle="display:none";
this.reset(); this.reset();
const id = row.id || this.ids const id = row.id || this.ids
getReceive(id).then(response => { getReceive(id).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改事件接报"; this.title = "修改事件接报";
document.getElementById("jingwei").style.display="none";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2022-03-25 13:46:23 * @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 * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @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 * @FilePath: /gassafety-progress/gassafetyprogress-web/src/views/operationMonitor/monitorData/component/charsData.vue
...@@ -30,15 +30,27 @@ ...@@ -30,15 +30,27 @@
<div class="middle flex"> <div class="middle flex">
<div class="first">正常</div> <div class="first">正常</div>
<div>高爆</div> <!-- 2是探测器,探测器只有报警,没有高低报 -->
<div>低爆</div> <template v-if="index != 2">
<div>高报</div>
<div>低报</div>
</template>
<template v-else>
<div>报警</div>
</template>
<div class="last">离线数</div> <div class="last">离线数</div>
</div> </div>
<div class="bottom flex"> <div class="bottom flex">
<div class="first">1234</div> <div class="first">1234</div>
<div>1234</div> <!-- 2是探测器,探测器只有报警,没有高低报 -->
<div>1231</div> <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 class="last">534534</div>
</div> </div>
</div> </div>
...@@ -49,10 +61,10 @@ ...@@ -49,10 +61,10 @@
<script> <script>
export default { export default {
name: "charsData", name: "charsData",
props:{ props: {
cardList:{ cardList: {
type:Array, type: Array,
} },
}, },
data() { data() {
return { return {
...@@ -63,9 +75,8 @@ export default { ...@@ -63,9 +75,8 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.top-card { .top-card {
margin-bottom:22px; margin-bottom: 22px;
& > div { & > div {
flex: 1; flex: 1;
margin-right: 20px; margin-right: 20px;
...@@ -141,6 +152,4 @@ export default { ...@@ -141,6 +152,4 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
</style> </style>
\ No newline at end of file
...@@ -74,11 +74,6 @@ ...@@ -74,11 +74,6 @@
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="照片" align="center" >
<template scope="List">
<img :src="List.row.pictureUrl" width="100px">
</template>
</el-table-column>
<el-table-column label="隐患名称" align="center" prop="hiddenTroubleName" > <el-table-column label="隐患名称" align="center" prop="hiddenTroubleName" >
<span slot-scope="scope" v-if="scope.row.hiddenTroubleName">{{scope.row.hiddenTroubleName}}</span> <span slot-scope="scope" v-if="scope.row.hiddenTroubleName">{{scope.row.hiddenTroubleName}}</span>
<span v-else>-</span> <span v-else>-</span>
...@@ -108,6 +103,11 @@ ...@@ -108,6 +103,11 @@
<span slot-scope="scope" v-if="scope.row.hiddenTroubleDescribe">{{scope.row.hiddenTroubleDescribe}}</span> <span slot-scope="scope" v-if="scope.row.hiddenTroubleDescribe">{{scope.row.hiddenTroubleDescribe}}</span>
<span v-else>-</span> <span v-else>-</span>
</el-table-column> </el-table-column>
<el-table-column label="照片" align="center" >
<template scope="List">
<img :src="List.row.pictureUrl" width="100px">
</template>
</el-table-column>
<el-table-column label="上报时间" align="center" prop="reportTime" width="180"> <el-table-column label="上报时间" align="center" prop="reportTime" width="180">
<template slot-scope="scope" > <template slot-scope="scope" >
<span v-if="scope.row.reportTime">{{scope.row.reportTime}}</span> <span v-if="scope.row.reportTime">{{scope.row.reportTime}}</span>
...@@ -141,7 +141,13 @@ ...@@ -141,7 +141,13 @@
<!-- </el-table-column>--> <!-- </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"> <template slot-scope="scope">
<el-button <el-button v-if="scope.row.hiddenTroubleDealStatus == 3"
size="mini"
type="text"
icon="el-icon-edit"
@click="details(scope.row)"
>详情</el-button>
<el-button v-if="scope.row.hiddenTroubleDealStatus != 3"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
...@@ -177,8 +183,18 @@ ...@@ -177,8 +183,18 @@
<el-form ref="form" :model="form" :rules="hiddenDangerRules" label-width="140px"> <el-form ref="form" :model="form" :rules="hiddenDangerRules" label-width="140px">
<el-row> <el-row>
<el-col :span="22" > <el-col :span="11">
<el-form-item label="隐患处理完成时间" prop="hiddenTroubleDealFinishTime"> <el-form-item label="隐患处理状态" prop="hiddenTroubleDealStatus">
<el-select v-model="form.hiddenTroubleDealStatus" placeholder="请选择隐患处理状态" style="width: 100%;">
<!-- <el-option label="待处理" value="1" />-->
<el-option label="处理中" value="2" />
<el-option label="已完成" value="3" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="11" >
<el-form-item label="隐患处理完成时间" v-if="form.hiddenTroubleDealStatus==3" prop="hiddenTroubleDealFinishTime">
<el-date-picker clearable size="small" <el-date-picker clearable size="small"
v-model="form.hiddenTroubleDealFinishTime" v-model="form.hiddenTroubleDealFinishTime"
type="datetime" type="datetime"
...@@ -191,7 +207,7 @@ ...@@ -191,7 +207,7 @@
<el-row> <el-row>
<el-col :span="22"> <el-col :span="22">
<el-form-item label="隐患处理情况" prop="hiddenTroubleDealCondition"> <el-form-item label="隐患处理情况" v-if="form.hiddenTroubleDealStatus==3" prop="hiddenTroubleDealCondition">
<el-input v-model="form.hiddenTroubleDealCondition" type="textarea" placeholder="请输入隐患处理情况" /> <el-input v-model="form.hiddenTroubleDealCondition" type="textarea" placeholder="请输入隐患处理情况" />
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -204,6 +220,130 @@ ...@@ -204,6 +220,130 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 燃气隐患详情对话框 -->
<el-dialog :title="detailsTitle" :visible.sync="detailsOpen" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="hiddenDangerRules" label-width="150px">
<el-row>
<el-col :span="22">
<el-form-item label="隐患名称" prop="hiddenTroubleName">
<el-input v-model="form.hiddenTroubleName" placeholder="请输入隐患名称" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="隐患等级" prop="hiddenTroubleLevel">
<el-select v-model="form.hiddenTroubleLevel" placeholder="请选择隐患等级" style="width: 100%;":disabled="true">
<el-option label="I级" value="1" />
<el-option label="II级" value="2" />
<el-option label="III级" value="3" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="隐患类型" prop="hiddenTroubleType">
<el-select v-model="form.hiddenTroubleType" placeholder="请选择隐患类型" style="width: 100%;":disabled="true">
<el-option label="漏气" value="1" />
<el-option label="腐蚀" value="2" />
<el-option label="裂缝" value="3" />
<el-option label="设备故障" value="4" />
<el-option label="安全距离不足" value="5" />
<el-option label="管道承重" value="6" />
<el-option label="其他" value="7" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="隐患描述" prop="hiddenTroubleDescribe">
<el-input v-model="form.hiddenTroubleDescribe" type="textarea" placeholder="请输入隐患描述" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="25">
<el-form-item label="经纬度坐标" prop="longitude" :disabled="true">
<el-col :span="9">
<el-input v-model="form.longitude" placeholder="请输入经度" :disabled="true"/>
</el-col>
<el-col :span="9" style="margin-left: 13px">
<el-input v-model="form.latitude" placeholder="请输入纬度" :disabled="true"/>
</el-col>
<el-col :span="4" style="margin-left: 30px">
<el-button type="primary" plain @click="MapdialogFun" :disabled="true">选择经纬度</el-button>
</el-col>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="上传照片" :disabled="true">
<FileUpload
:disabled="true"
listType="picture"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList">
</FileUpload>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="隐患处理状态" prop="hiddenTroubleDealStatus">
<el-select v-model="form.hiddenTroubleDealStatus" placeholder="请选择隐患处理状态" :disabled="true">
<el-option label="待处理" value="1" />
<el-option label="处理中" value="2" />
<el-option label="已完成" value="3" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="隐患处理完成时间" v-if="form.hiddenTroubleDealStatus==3" prop="hiddenTroubleDealFinishTime">
<el-date-picker clearable size="small" :disabled="true"
v-model="form.hiddenTroubleDealFinishTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择隐患处理完成时间">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="隐患处理情况" v-if="form.hiddenTroubleDealStatus==3" prop="hiddenTroubleDealCondition" >
<el-input v-model="form.hiddenTroubleDealCondition" type="textarea" placeholder="请输入隐患处理情况" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>-->
<!-- <el-col :span="22">-->
<!-- <el-form-item label="备注" prop="remarks">-->
<!-- <el-input v-model="form.remarks" type="textarea" placeholder="请输入备注" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="detailsCancel">取 消</el-button>
</div>
</el-dialog>
<!-- 添加或修改燃气隐患对话框 --> <!-- 添加或修改燃气隐患对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="130px"> <el-form ref="form" :model="form" :rules="rules" label-width="130px">
...@@ -279,29 +419,29 @@ ...@@ -279,29 +419,29 @@
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row>--> <!-- <el-row>-->
<!-- <el-col :span="11">--> <!-- <el-col :span="11">-->
<!-- <el-form-item label="上报时间" prop="reportTime">--> <!-- <el-form-item label="上报时间" prop="reportTime">-->
<!-- <el-date-picker clearable size="small"--> <!-- <el-date-picker clearable size="small"-->
<!-- v-model="form.reportTime"--> <!-- v-model="form.reportTime"-->
<!-- type="date"--> <!-- type="date"-->
<!-- value-format="yyyy-MM-dd"--> <!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="选择上报时间">--> <!-- placeholder="选择上报时间">-->
<!-- </el-date-picker>--> <!-- </el-date-picker>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- <el-col :span="11">--> <!-- <el-col :span="11">-->
<!-- <el-form-item label="上报人" prop="reportPerson">--> <!-- <el-form-item label="上报人" prop="reportPerson">-->
<!-- <el-input v-model="form.reportPerson" placeholder="请输入上报人" />--> <!-- <el-input v-model="form.reportPerson" placeholder="请输入上报人" />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- </el-row>--> <!-- </el-row>-->
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="隐患处理状态" prop="hiddenTroubleDealStatus"> <el-form-item label="隐患处理状态" prop="hiddenTroubleDealStatus">
<el-select v-model="form.hiddenTroubleDealStatus" placeholder="请选择隐患处理状态" style="width: 100%;"> <el-select v-model="form.hiddenTroubleDealStatus" placeholder="请选择隐患处理状态" style="width: 100%;":disabled="true">
<el-option label="待处理" value="1" /> <el-option label="待处理" value="1" />
<el-option label="处理中" value="2" /> <el-option label="处理中" value="2" />
<el-option label="已完成" value="3" /> <el-option label="已完成" value="3" />
...@@ -309,33 +449,33 @@ ...@@ -309,33 +449,33 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="11">--> <!-- <el-col :span="11">-->
<!-- <el-form-item label="隐患处理完成时间" v-if="form.hiddenTroubleDealStatus==3" prop="hiddenTroubleDealFinishTime">--> <!-- <el-form-item label="隐患处理完成时间" v-if="form.hiddenTroubleDealStatus==3" prop="hiddenTroubleDealFinishTime">-->
<!-- <el-date-picker clearable size="small"--> <!-- <el-date-picker clearable size="small"-->
<!-- v-model="form.hiddenTroubleDealFinishTime"--> <!-- v-model="form.hiddenTroubleDealFinishTime"-->
<!-- type="datetime"--> <!-- type="datetime"-->
<!-- value-format="yyyy-MM-dd HH:mm:ss"--> <!-- value-format="yyyy-MM-dd HH:mm:ss"-->
<!-- placeholder="选择隐患处理完成时间">--> <!-- placeholder="选择隐患处理完成时间">-->
<!-- </el-date-picker>--> <!-- </el-date-picker>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
</el-row> </el-row>
<!-- <el-row>--> <!-- <el-row>-->
<!-- <el-col :span="22">--> <!-- <el-col :span="22">-->
<!-- <el-form-item label="隐患处理情况" v-if="form.hiddenTroubleDealStatus==3" prop="hiddenTroubleDealCondition">--> <!-- <el-form-item label="隐患处理情况" v-if="form.hiddenTroubleDealStatus==3" prop="hiddenTroubleDealCondition">-->
<!-- <el-input v-model="form.hiddenTroubleDealCondition" type="textarea" placeholder="请输入隐患处理情况" />--> <!-- <el-input v-model="form.hiddenTroubleDealCondition" type="textarea" placeholder="请输入隐患处理情况" />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- </el-row>--> <!-- </el-row>-->
<!-- <el-row>--> <!-- <el-row>-->
<!-- <el-col :span="22">--> <!-- <el-col :span="22">-->
<!-- <el-form-item label="备注" prop="remarks">--> <!-- <el-form-item label="备注" prop="remarks">-->
<!-- <el-input v-model="form.remarks" type="textarea" placeholder="请输入备注" />--> <!-- <el-input v-model="form.remarks" type="textarea" placeholder="请输入备注" />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- </el-row>--> <!-- </el-row>-->
</el-form> </el-form>
...@@ -345,6 +485,7 @@ ...@@ -345,6 +485,7 @@
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<GetPos <GetPos
:dialogVisible.sync="dialogTableVisibles" :dialogVisible.sync="dialogTableVisibles"
device="" device=""
...@@ -393,10 +534,14 @@ export default { ...@@ -393,10 +534,14 @@ export default {
title: "", title: "",
//处理隐患弹出层标题 //处理隐患弹出层标题
hiddenDangertitle:"", hiddenDangertitle:"",
//详情弹出层标题
detailsTitle:"",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 是否显示处理隐患弹出层 // 是否显示处理隐患弹出层
hiddenDanger:false, hiddenDanger:false,
//详情弹出层
detailsOpen:false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
...@@ -422,7 +567,10 @@ export default { ...@@ -422,7 +567,10 @@ export default {
hiddenDangerRules: { hiddenDangerRules: {
hiddenTroubleDealFinishTime: [ hiddenTroubleDealFinishTime: [
{ required: true, message: "请选择隐患处理完成时间", trigger: "blur" }, { required: true, message: "请选择隐患处理完成时间", trigger: "blur" },
] ],
hiddenTroubleDealCondition: [
{ required: true, message: "请输入隐患处理情况", trigger: "blur" },
],
}, },
}; };
}, },
...@@ -491,6 +639,12 @@ export default { ...@@ -491,6 +639,12 @@ export default {
this.reset(); this.reset();
this.fileList = []; this.fileList = [];
}, },
//详情燃气框关闭
detailsCancel(){
this.detailsOpen = false;
this.reset();
this.fileList = [];
},
// 处理隐患表单取消按钮 // 处理隐患表单取消按钮
hiddenDangerCancel() { hiddenDangerCancel() {
this.hiddenDanger=false; this.hiddenDanger=false;
...@@ -565,10 +719,30 @@ export default { ...@@ -565,10 +719,30 @@ export default {
const hiddenTroubleId = row.hiddenTroubleId || this.ids const hiddenTroubleId = row.hiddenTroubleId || this.ids
getInfo(hiddenTroubleId).then(response => { getInfo(hiddenTroubleId).then(response => {
this.form = response.data; this.form = response.data;
this.form.hiddenTroubleDealStatus='2';
this.hiddenDanger=true; this.hiddenDanger=true;
this.hiddenDangertitle = "处理隐患信息"; this.hiddenDangertitle = "处理隐患信息";
}); });
}, },
/**详情按钮操作*/
details(row){
this.fileList=[]
this.reset();
const hiddenTroubleId = row.hiddenTroubleId || this.ids
getInfo(hiddenTroubleId).then(response => {
this.form = response.data;
this.detailsOpen = true;
//图片回显
if (this.form.pictureUrl) {
this.fileList.push({
name: '照片',
url: this.form.pictureUrl,
});
}
this.detailsTitle = "燃气隐患详情";
this.devicePos = [response.data.longitude, response.data.latitude];
});
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
...@@ -580,6 +754,7 @@ export default { ...@@ -580,6 +754,7 @@ export default {
this.getList(); this.getList();
}); });
} else { } else {
this.form.hiddenTroubleDealStatus='1'
addInfo(this.form).then(response => { addInfo(this.form).then(response => {
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");
this.open = false; this.open = false;
...@@ -594,7 +769,7 @@ export default { ...@@ -594,7 +769,7 @@ export default {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.hiddenTroubleId != null) { if (this.form.hiddenTroubleId != null) {
this.form.hiddenTroubleDealStatus = '3'; // this.form.hiddenTroubleDealStatus = '3';
updateInfo(this.form).then(response => { updateInfo(this.form).then(response => {
this.msgSuccess("修改成功"); this.msgSuccess("修改成功");
this.hiddenDanger = false; this.hiddenDanger = false;
...@@ -607,7 +782,7 @@ export default { ...@@ -607,7 +782,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const hiddenTroubleIds = row.hiddenTroubleId || this.ids; const hiddenTroubleIds = row.hiddenTroubleId || this.ids;
this.$confirm('是否确认删除燃气隐患编号为"' + hiddenTroubleIds + '"的数据项?', "警告", { this.$confirm('是否确认删除隐患名称为"' + row.hiddenTroubleName + '"的数据项?', "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
......
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