Commit 47bb5fb9 authored by zhangjianqian's avatar zhangjianqian

4.隐患排查库,风险点关联“安全风险分区动态展示”中的“风险信息管理”的各辨识部位相关联(多选)

parent 8d9b7f3d
...@@ -28,6 +28,8 @@ public class THiddenLibrary extends BaseEntity ...@@ -28,6 +28,8 @@ public class THiddenLibrary extends BaseEntity
@Excel(name = "风险点") @Excel(name = "风险点")
private String riskPoint; private String riskPoint;
private String riskPointName;
/** 检查项目 */ /** 检查项目 */
@Excel(name = "检查项目") @Excel(name = "检查项目")
private String inspectTerm; private String inspectTerm;
...@@ -44,6 +46,14 @@ public class THiddenLibrary extends BaseEntity ...@@ -44,6 +46,14 @@ public class THiddenLibrary extends BaseEntity
@Excel(name = "内容以及标准") @Excel(name = "内容以及标准")
private String libraryContent; private String libraryContent;
public String getRiskPointName() {
return riskPointName;
}
public void setRiskPointName(String riskPointName) {
this.riskPointName = riskPointName;
}
public String getDeptName() { public String getDeptName() {
return deptName; return deptName;
} }
......
...@@ -58,4 +58,6 @@ public interface TRiskManagerMapper ...@@ -58,4 +58,6 @@ public interface TRiskManagerMapper
* @return 结果 * @return 结果
*/ */
public int deleteTRiskManagerByIds(Long[] ids); public int deleteTRiskManagerByIds(Long[] ids);
public String selectNamesByid(String[] ids);
} }
package com.zehong.system.service.impl; package com.zehong.system.service.impl;
import java.util.List; import java.util.List;
import com.zehong.system.mapper.TRiskManagerMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zehong.system.mapper.THiddenLibraryMapper; import com.zehong.system.mapper.THiddenLibraryMapper;
...@@ -18,6 +20,8 @@ public class THiddenLibraryServiceImpl implements ITHiddenLibraryService ...@@ -18,6 +20,8 @@ public class THiddenLibraryServiceImpl implements ITHiddenLibraryService
{ {
@Autowired @Autowired
private THiddenLibraryMapper tHiddenLibraryMapper; private THiddenLibraryMapper tHiddenLibraryMapper;
@Autowired
private TRiskManagerMapper tRiskManagerMapper;
/** /**
* 查询隐患排查库 * 查询隐患排查库
...@@ -40,7 +44,14 @@ public class THiddenLibraryServiceImpl implements ITHiddenLibraryService ...@@ -40,7 +44,14 @@ public class THiddenLibraryServiceImpl implements ITHiddenLibraryService
@Override @Override
public List<THiddenLibrary> selectTHiddenLibraryList(THiddenLibrary tHiddenLibrary) public List<THiddenLibrary> selectTHiddenLibraryList(THiddenLibrary tHiddenLibrary)
{ {
return tHiddenLibraryMapper.selectTHiddenLibraryList(tHiddenLibrary); List<THiddenLibrary> list = tHiddenLibraryMapper.selectTHiddenLibraryList(tHiddenLibrary);
for (THiddenLibrary t :list){
if(t.getRiskPoint()!=null&&!t.getRiskPoint().equals("")){
String name = tRiskManagerMapper.selectNamesByid(t.getRiskPoint().split(","));
t.setRiskPointName(name);
}
}
return list;
} }
/** /**
......
...@@ -3,8 +3,10 @@ package com.zehong.system.service.impl; ...@@ -3,8 +3,10 @@ package com.zehong.system.service.impl;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import com.zehong.system.domain.THiddenLibrary;
import com.zehong.system.domain.THiddenTroubleWork; import com.zehong.system.domain.THiddenTroubleWork;
import com.zehong.system.mapper.THiddenTroubleWorkMapper; import com.zehong.system.mapper.THiddenTroubleWorkMapper;
import com.zehong.system.mapper.TRiskManagerMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zehong.system.mapper.THiddenTroubleAssessmentMapper; import com.zehong.system.mapper.THiddenTroubleAssessmentMapper;
...@@ -25,6 +27,8 @@ public class THiddenTroubleAssessmentServiceImpl implements ITHiddenTroubleAsses ...@@ -25,6 +27,8 @@ public class THiddenTroubleAssessmentServiceImpl implements ITHiddenTroubleAsses
private THiddenTroubleAssessmentMapper tHiddenTroubleAssessmentMapper; private THiddenTroubleAssessmentMapper tHiddenTroubleAssessmentMapper;
@Autowired @Autowired
private THiddenTroubleWorkMapper tHiddenTroubleWorkMapper; private THiddenTroubleWorkMapper tHiddenTroubleWorkMapper;
@Autowired
private TRiskManagerMapper tRiskManagerMapper;
/** /**
* 查询排查评估 * 查询排查评估
...@@ -52,7 +56,14 @@ public class THiddenTroubleAssessmentServiceImpl implements ITHiddenTroubleAsses ...@@ -52,7 +56,14 @@ public class THiddenTroubleAssessmentServiceImpl implements ITHiddenTroubleAsses
@Override @Override
public List<THiddenTroubleAssessment> selectTHiddenTroubleAssessmentList(THiddenTroubleAssessment tHiddenTroubleAssessment) public List<THiddenTroubleAssessment> selectTHiddenTroubleAssessmentList(THiddenTroubleAssessment tHiddenTroubleAssessment)
{ {
return tHiddenTroubleAssessmentMapper.selectTHiddenTroubleAssessmentList(tHiddenTroubleAssessment); List<THiddenTroubleAssessment> list = tHiddenTroubleAssessmentMapper.selectTHiddenTroubleAssessmentList(tHiddenTroubleAssessment);
for(THiddenTroubleAssessment at : list){
if(at.getRiskPoint()!=null&&!at.getRiskPoint().equals("")){
String name = tRiskManagerMapper.selectNamesByid(at.getRiskPoint().split(","));
at.setRiskPoint(name);
}
}
return list;
} }
/** /**
......
...@@ -83,4 +83,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -83,4 +83,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
<select id="selectNamesByid" parameterType="string" resultType="string">
SELECT GROUP_CONCAT(risk_part) FROM t_risk_manager WHERE id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<!--<el-table-column type="selection" width="55" align="center" />--> <!--<el-table-column type="selection" width="55" align="center" />-->
<!--<el-table-column label="风险点" align="center" prop="libraryId" />--> <!--<el-table-column label="风险点" align="center" prop="libraryId" />-->
<el-table-column label="所属部门" align="center" prop="deptName" /> <el-table-column label="所属部门" align="center" prop="deptName" />
<el-table-column label="风险点" align="center" prop="riskPoint" /> <el-table-column label="风险点" align="center" prop="riskPointName" />
<el-table-column label="隐患名称" align="center" prop="inspectTerm" /> <el-table-column label="隐患名称" align="center" prop="inspectTerm" />
<el-table-column label="检查依据" align="center" prop="inspectBasis" /> <el-table-column label="检查依据" align="center" prop="inspectBasis" />
<!--<el-table-column label="排查库标题" align="center" prop="libraryName" />--> <!--<el-table-column label="排查库标题" align="center" prop="libraryName" />-->
...@@ -110,7 +110,15 @@ ...@@ -110,7 +110,15 @@
<!--<el-input v-model="form.deptId" placeholder="请输入部门" />--> <!--<el-input v-model="form.deptId" placeholder="请输入部门" />-->
<!--</el-form-item>--> <!--</el-form-item>-->
<el-form-item label="风险点" prop="riskPoint"> <el-form-item label="风险点" prop="riskPoint">
<el-input v-model="form.riskPoint" placeholder="请输入风险点" /> <!--<el-input v-model="form.riskPoint" placeholder="请输入风险点" />-->
<el-select v-model="form.riskPoint" multiple placeholder="请选择事故类型">
<el-option
v-for="dict in managerList"
:key="dict.id.toString()"
:label="dict.riskPart"
:value="dict.id.toString()"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="隐患名称" prop="inspectTerm"> <el-form-item label="隐患名称" prop="inspectTerm">
<el-input v-model="form.inspectTerm" placeholder="请输入隐患名称" /> <el-input v-model="form.inspectTerm" placeholder="请输入隐患名称" />
...@@ -139,6 +147,8 @@ import Editor from '@/components/Editor'; ...@@ -139,6 +147,8 @@ import Editor from '@/components/Editor';
import { treeselect } from "@/api/system/dept"; import { treeselect } from "@/api/system/dept";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { listManager } from "@/api/system/manager";
export default { export default {
name: "Library", name: "Library",
components: { components: {
...@@ -169,6 +179,7 @@ export default { ...@@ -169,6 +179,7 @@ export default {
open: false, open: false,
// 部门树选项 // 部门树选项
deptOptions: undefined, deptOptions: undefined,
managerList:[],
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
...@@ -176,6 +187,10 @@ export default { ...@@ -176,6 +187,10 @@ export default {
deptId: null, deptId: null,
riskPoint: null, riskPoint: null,
}, },
queryParams2:{
pageNum: 1,
pageSize: 1000,
},
// 表单参数 // 表单参数
form: {}, form: {},
// 表单校验 // 表单校验
...@@ -201,6 +216,7 @@ export default { ...@@ -201,6 +216,7 @@ export default {
created() { created() {
this.getList(); this.getList();
this.getTreeselect(); this.getTreeselect();
this.getManageList();
}, },
methods: { methods: {
/** 查询隐患排查库列表 */ /** 查询隐患排查库列表 */
...@@ -212,6 +228,11 @@ export default { ...@@ -212,6 +228,11 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
getManageList() {
listManager(this.queryParams2).then(response => {
this.managerList = response.rows;
});
},
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false; this.open = false;
...@@ -257,7 +278,9 @@ export default { ...@@ -257,7 +278,9 @@ export default {
this.reset(); this.reset();
const libraryId = row.libraryId || this.ids const libraryId = row.libraryId || this.ids
getLibrary(libraryId).then(response => { getLibrary(libraryId).then(response => {
this.form = response.data; this.form = response.data;
this.form.riskPoint = this.form.riskPoint.split(",");
this.open = true; this.open = true;
this.title = "修改隐患排查库"; this.title = "修改隐患排查库";
}); });
...@@ -266,6 +289,7 @@ export default { ...@@ -266,6 +289,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
this.form.riskPoint = (this.form.riskPoint).join(",");
if (this.form.libraryId != null) { if (this.form.libraryId != null) {
updateLibrary(this.form).then(response => { updateLibrary(this.form).then(response => {
this.msgSuccess("修改成功"); this.msgSuccess("修改成功");
...@@ -328,7 +352,10 @@ export default { ...@@ -328,7 +352,10 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .vue-treeselect{ ::v-deep .vue-treeselect{
width: 200px; width: 230px;
}
::v-deep .el-select{
width: 100%;
} }
::v-deep .el-form-item--medium .el-form-item__content{ ::v-deep .el-form-item--medium .el-form-item__content{
line-height: 34px; line-height: 34px;
......
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
<el-option <el-option
v-for="dict in libraryList" v-for="dict in libraryList"
:key="dict.libraryId" :key="dict.libraryId"
:label="dict.riskPoint+'——'+dict.inspectTerm" :label="dict.riskPointName+'——'+dict.inspectTerm"
:value="parseInt(dict.libraryId)" :value="parseInt(dict.libraryId)"
></el-option> ></el-option>
</el-select> </el-select>
...@@ -646,7 +646,7 @@ export default { ...@@ -646,7 +646,7 @@ export default {
this.getDicts("assessment_level").then(response => { this.getDicts("assessment_level").then(response => {
this.assessmentLevelOptions = response.data; this.assessmentLevelOptions = response.data;
}); });
listLibrary({pageNum:1,pageSize:100}).then(response => { listLibrary({pageNum:1,pageSize:1000}).then(response => {
this.libraryList = response.rows; this.libraryList = response.rows;
}); });
}, },
......
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