风险管理模块bug修复

main
15036302109 11 months ago
parent 5a052b2264
commit c8789b982e

@ -102,6 +102,17 @@ public class EhsRisk extends BaseEntity
@Excel(name = "巡查责任人电话")
private String inspectionTel;
/** 风险点位置 */
@TableField(exist = false)
private String riskLocation1;// 村 (社区)
@TableField(exist = false)
private String riskLocation2;// 位置
/** 涉及群众数量 */
@TableField(exist = false)
private String peopleQuantity1;// 户
@TableField(exist = false)
private String peopleQuantity2;// 人
}

@ -33,7 +33,16 @@ public class EhsRiskServiceImpl extends ServiceImpl<EhsRiskMapper, EhsRisk> impl
@Override
public EhsRisk selectEhsRiskByRiskId(Long riskId)
{
return ehsRiskMapper.selectEhsRiskByRiskId(riskId);
EhsRisk ehsRisk = ehsRiskMapper.selectEhsRiskByRiskId(riskId);
// 风险点位置
String[] riskLocationArr = ehsRisk.getRiskLocation().split(";");
ehsRisk.setRiskLocation1(riskLocationArr[0]);// 村 (社区)
ehsRisk.setRiskLocation2(riskLocationArr[1]);// 位置
// 涉及群众数量
String[] peopleNumArr = ehsRisk.getPeopleQuantity().split(";");
ehsRisk.setPeopleQuantity1(peopleNumArr[0]);// 户
ehsRisk.setPeopleQuantity2(peopleNumArr[1]);// 人
return ehsRisk;
}
/**

@ -343,13 +343,19 @@
</el-form-item>
</el-col>
</el-row>
<!-- <el-form-item label="风险点位置" prop="riskLocation">
<el-input v-model="form.riskLocation1" placeholder="请输入风险点位置" style="width: 200px;"/>社区
<el-input v-model="form.riskLocation2" placeholder="请输入风险点位置" style="width: 200px;"/>位置
</el-form-item>-->
<el-form-item label="风险点概况" prop="riskDesc">
<el-input v-model="form.riskDesc" type="textarea" placeholder="请输入内容" />
</el-form-item>
<!-- <el-form-item label="涉及群众数量" prop="peopleQuantity">
<el-input v-model="form.peopleQuantity1" placeholder="请输入涉及群众数量" style="width: 200px;"/>
<el-input v-model="form.peopleQuantity2" placeholder="请输入涉及群众数量" style="width: 200px;"/>
</el-form-item>-->
<el-row>
<el-col :span="12">
<el-form-item label="涉及群众数量" prop="peopleQuantity1">
@ -649,17 +655,9 @@
this.reset();
const riskId = row.riskId || this.ids
getEhsRisk(riskId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改风险信息";
//
const split1 = response.data.riskLocation.split(";")
this.form.riskLocation1 = split1[0];
this.form.riskLocation2 = split1[1];
//
const split2 = response.data.peopleQuantity.split(";")
this.form.peopleQuantity1 = split2[0];
this.form.peopleQuantity2 = split2[1];
this.form = response.data;
});
},
/** 提交按钮 */

Loading…
Cancel
Save