Commit 19e752f0 authored by zhangjianqian's avatar zhangjianqian

Merge remote-tracking branch 'origin/master'

parents d8cdde92 0580795f
package com.zehong.web.controller.supervise; package com.zehong.web.controller.supervise;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List; import java.util.List;
import com.zehong.common.core.domain.entity.SysUser; import com.zehong.common.core.domain.entity.SysUser;
...@@ -85,6 +87,9 @@ public class THiddenTroubleInfoSController extends BaseController ...@@ -85,6 +87,9 @@ public class THiddenTroubleInfoSController extends BaseController
//获取用户信息 //获取用户信息
SysUser user = SecurityUtils.getLoginUser().getUser(); SysUser user = SecurityUtils.getLoginUser().getUser();
tHiddenTroubleInfo.setBeyondEnterpriseId(user.getDeptId()); tHiddenTroubleInfo.setBeyondEnterpriseId(user.getDeptId());
tHiddenTroubleInfo.setReportPerson(user.getNickName());
SimpleDateFormat dateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
tHiddenTroubleInfo.setReportTime(dateTime.format(new Date()));
return toAjax(tHiddenTroubleInfoService.insertTHiddenTroubleInfo(tHiddenTroubleInfo)); return toAjax(tHiddenTroubleInfoService.insertTHiddenTroubleInfo(tHiddenTroubleInfo));
} }
......
...@@ -55,7 +55,7 @@ public class THiddenTroubleInfo extends BaseEntity ...@@ -55,7 +55,7 @@ public class THiddenTroubleInfo extends BaseEntity
private String hiddenTroubleDescribe; private String hiddenTroubleDescribe;
/** 上报时间 */ /** 上报时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "上报时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "上报时间", width = 30, dateFormat = "yyyy-MM-dd")
private String reportTime; private String reportTime;
......
...@@ -99,7 +99,6 @@ ...@@ -99,7 +99,6 @@
<span v-if="scope.row.hiddenTroubleType == 5">安全距离不足</span> <span v-if="scope.row.hiddenTroubleType == 5">安全距离不足</span>
<span v-if="scope.row.hiddenTroubleType == 6">管道承重</span> <span v-if="scope.row.hiddenTroubleType == 6">管道承重</span>
<span v-if="scope.row.hiddenTroubleType == 7">其他</span> <span v-if="scope.row.hiddenTroubleType == 7">其他</span>
<span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -111,7 +110,7 @@ ...@@ -111,7 +110,7 @@
</el-table-column> </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.hiddenTroubleDescribe">{{ parseTime(scope.row.reportTime, '{y}-{m}-{d}') }}</span> <span v-if="scope.row.reportTime">{{scope.row.reportTime}}</span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -132,7 +131,7 @@ ...@@ -132,7 +131,7 @@
</el-table-column> </el-table-column>
<el-table-column label="隐患处理完成时间" align="center" prop="hiddenTroubleDealFinishTime" width="180"> <el-table-column label="隐患处理完成时间" align="center" prop="hiddenTroubleDealFinishTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.hiddenTroubleDealFinishTime">{{ parseTime(scope.row.hiddenTroubleDealFinishTime, '{y}-{m}-{d}') }}</span> <span v-if="scope.row.hiddenTroubleDealFinishTime">{{ parseTime(scope.row.hiddenTroubleDealFinishTime, '{y}-{m}-{d} {h}:{m}:{s}') }}</span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -156,6 +155,12 @@ ...@@ -156,6 +155,12 @@
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:info:remove']" v-hasPermi="['system:info:remove']"
>删除</el-button> >删除</el-button>
<el-button v-if="scope.row.hiddenTroubleDealStatus != 3"
size="mini"
type="text"
icon="el-icon-news"
@click="handlingHiddenDangers(scope.row)"
>处理隐患</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -167,11 +172,50 @@ ...@@ -167,11 +172,50 @@
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
<!-- 处理隐患对话框 -->
<el-dialog :title="hiddenDangertitle" :visible.sync="hiddenDanger" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="hiddenDangerRules" label-width="140px">
<el-row>
<el-col :span="22" >
<el-form-item label="隐患处理完成时间" prop="hiddenTroubleDealFinishTime">
<el-date-picker clearable size="small"
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="隐患处理情况" prop="hiddenTroubleDealCondition">
<el-input v-model="form.hiddenTroubleDealCondition" type="textarea" placeholder="请输入隐患处理情况" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFormHiddenDanger"> </el-button>
<el-button @click="hiddenDangerCancel"> </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">
<el-row>
<el-col :span="22">
<el-form-item label="隐患名称" prop="hiddenTroubleName">
<el-input v-model="form.hiddenTroubleName" placeholder="请输入隐患名称" />
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="隐患等级" prop="hiddenTroubleLevel"> <el-form-item label="隐患等级" prop="hiddenTroubleLevel">
...@@ -183,14 +227,6 @@ ...@@ -183,14 +227,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11">
<el-form-item label="隐患名称" prop="hiddenTroubleName">
<el-input v-model="form.hiddenTroubleName" placeholder="请输入隐患名称" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="隐患类型" prop="hiddenTroubleType"> <el-form-item label="隐患类型" prop="hiddenTroubleType">
<el-select v-model="form.hiddenTroubleType" placeholder="请选择隐患类型" style="width: 100%;"> <el-select v-model="form.hiddenTroubleType" placeholder="请选择隐患类型" style="width: 100%;">
...@@ -204,24 +240,26 @@ ...@@ -204,24 +240,26 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-col :span="11"> <el-row>
<el-form-item label="隐患描述" prop="hiddenTroubleDescribe"> <el-col :span="22">
<el-input v-model="form.hiddenTroubleDescribe" placeholder="请输入隐患描述" /> <el-form-item label="隐患描述" prop="hiddenTroubleDescribe">
</el-form-item> <el-input v-model="form.hiddenTroubleDescribe" type="textarea" placeholder="请输入隐患描述" />
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="23"> <el-col :span="25">
<el-form-item label="经纬度坐标" prop="longitude"> <el-form-item label="经纬度坐标" prop="longitude">
<el-col :span="9"> <el-col :span="9">
<el-input v-model="form.longitude" placeholder="请输入经度" /> <el-input v-model="form.longitude" placeholder="请输入经度" />
</el-col> </el-col>
<el-col :span="9" style="margin-left: 10px"> <el-col :span="9" style="margin-left: 13px">
<el-input v-model="form.latitude" placeholder="请输入纬度"/> <el-input v-model="form.latitude" placeholder="请输入纬度"/>
</el-col> </el-col>
<el-col :span="3" style="margin-left: 30px"> <el-col :span="4" style="margin-left: 30px">
<el-button type="primary" plain @click="MapdialogFun">选择经纬度</el-button> <el-button type="primary" plain @click="MapdialogFun">选择经纬度</el-button>
</el-col> </el-col>
</el-form-item> </el-form-item>
...@@ -241,28 +279,28 @@ ...@@ -241,28 +279,28 @@
</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%;">
<el-option label="待处理" value="1" /> <el-option label="待处理" value="1" />
<el-option label="处理中" value="2" /> <el-option label="处理中" value="2" />
...@@ -272,29 +310,30 @@ ...@@ -272,29 +310,30 @@
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="隐患处理情况" prop="hiddenTroubleDealCondition"> <el-form-item label="隐患处理完成时间" v-if="form.hiddenTroubleDealStatus==3" prop="hiddenTroubleDealFinishTime">
<el-input v-model="form.hiddenTroubleDealCondition" placeholder="请输入隐患处理情况" /> <el-date-picker clearable size="small"
</el-form-item> v-model="form.hiddenTroubleDealFinishTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择隐患处理完成时间">
</el-date-picker>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="11"> <el-col :span="22">
<el-form-item label="隐患处理完成时间" prop="hiddenTroubleDealFinishTime"> <el-form-item label="隐患处理情况" v-if="form.hiddenTroubleDealStatus==3" prop="hiddenTroubleDealCondition">
<el-date-picker clearable size="small" <el-input v-model="form.hiddenTroubleDealCondition" type="textarea" placeholder="请输入隐患处理情况" />
v-model="form.hiddenTroubleDealFinishTime" </el-form-item>
type="date"
value-format="yyyy-MM-dd"
placeholder="选择隐患处理完成时间">
</el-date-picker>
</el-form-item>
</el-col> </el-col>
</el-row>
<el-col :span="11"> <el-row>
<el-form-item label="备注" prop="remarks"> <el-col :span="22">
<el-input v-model="form.remarks" placeholder="请输入备注" /> <el-form-item label="备注" prop="remarks">
</el-form-item> <el-input v-model="form.remarks" type="textarea" placeholder="请输入备注" />
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -352,8 +391,12 @@ export default { ...@@ -352,8 +391,12 @@ export default {
infoList: [], infoList: [],
// 弹出层标题 // 弹出层标题
title: "", title: "",
//处理隐患弹出层标题
hiddenDangertitle:"",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 是否显示处理隐患弹出层
hiddenDanger:false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
...@@ -371,8 +414,16 @@ export default { ...@@ -371,8 +414,16 @@ export default {
hiddenTroubleName: [ hiddenTroubleName: [
{ required: true, message: "请输入隐患名称", trigger: "blur" }, { required: true, message: "请输入隐患名称", trigger: "blur" },
], ],
hiddenTroubleType: [
} { required: true, message: "请选择隐患类型", trigger: "blur" },
],
},
//隐患处理表单效验
hiddenDangerRules: {
hiddenTroubleDealFinishTime: [
{ required: true, message: "请选择隐患处理完成时间", trigger: "blur" },
]
},
}; };
}, },
created() { created() {
...@@ -440,6 +491,12 @@ export default { ...@@ -440,6 +491,12 @@ export default {
this.reset(); this.reset();
this.fileList = []; this.fileList = [];
}, },
// 处理隐患表单取消按钮
hiddenDangerCancel() {
this.hiddenDanger=false;
this.reset();
this.fileList = [];
},
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
...@@ -454,7 +511,7 @@ export default { ...@@ -454,7 +511,7 @@ export default {
hiddenTroubleDescribe: null, hiddenTroubleDescribe: null,
reportTime: null, reportTime: null,
reportPerson: null, reportPerson: null,
hiddenTroubleDealStatus: null, hiddenTroubleDealStatus: '1',
hiddenTroubleDealCondition: null, hiddenTroubleDealCondition: null,
hiddenTroubleDealFinishTime: null, hiddenTroubleDealFinishTime: null,
isDel: null, isDel: null,
...@@ -482,7 +539,7 @@ export default { ...@@ -482,7 +539,7 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加燃气隐患"; this.title = "添加隐患信息";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
...@@ -503,6 +560,15 @@ export default { ...@@ -503,6 +560,15 @@ export default {
this.devicePos = [response.data.longitude, response.data.latitude]; this.devicePos = [response.data.longitude, response.data.latitude];
}); });
}, },
/**处理隐患按钮操作*/
handlingHiddenDangers(row){
const hiddenTroubleId = row.hiddenTroubleId || this.ids
getInfo(hiddenTroubleId).then(response => {
this.form = response.data;
this.hiddenDanger=true;
this.hiddenDangertitle = "处理隐患信息";
});
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
...@@ -523,6 +589,21 @@ export default { ...@@ -523,6 +589,21 @@ export default {
} }
}); });
}, },
/**处理隐患提交按钮*/
submitFormHiddenDanger(){
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.hiddenTroubleId != null) {
this.form.hiddenTroubleDealStatus = '3';
updateInfo(this.form).then(response => {
this.msgSuccess("修改成功");
this.hiddenDanger = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const hiddenTroubleIds = row.hiddenTroubleId || this.ids; const hiddenTroubleIds = row.hiddenTroubleId || this.ids;
......
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