Commit 796faca2 authored by 王李辉's avatar 王李辉

风险矩阵

parent 37ca0095
......@@ -474,11 +474,21 @@ const routes = [{
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskAdd'),
},
{
path: '/matrix-grad',
name: 'matrix-grad',
meta: {
title: '矩阵式定级',
index: 1
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskAdd/matrixGrad'),
},
{
path: '/risk-return',
name: 'risk-return',
meta: {
title: '风险上报',
title: '风险上报退回列表',
index: 1
},
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskReturn'),
......
......@@ -295,7 +295,6 @@ export default {
this.getList();
this.$bus.$on("sourceAyy", res => {
console.log(res.join(","));
this.source1 = res.join(",");
});
},
......@@ -464,30 +463,8 @@ export default {
dangerReturnEcho(`/hdreport/edit/${this.taskId}`)
.then(res => {
this.$toast.clear();
let msg = res.data.hdReport;
// 对数据进行赋值
// 对数据进行赋值
this.returnCause = res.data.reason;
this.projectId = msg.proId;
// 对所属工程数组筛选出 相同id 的工程名
let name = this.columnsProjectName.filter(item => {
return item.id == msg.proId;
});
this.projectName = name[0].projectName;
this.range = msg.hdRange;
this.type = msg.hdType;
this.dangerName = msg.hdProjectName;
this.dangerNum = msg.hdProjectId;
this.dangerLevel = msg.hdLev;
this.findTime = msg.hdDiscoveryTime;
this.source = msg.dangerId;
this.source1 = msg.dangerSource;
this.location = msg.hdPosition;
this.describe = msg.hdDescribe;
this.hdPicture1 = msg.hdPicture1;
this.hdVideo1 = msg.hdVideo1;
this.expireTime = msg.hdExpirationTime;
this.recPeople = msg.rectificationUser;
})
.catch(() => {
this.$toast.clear();
......@@ -497,6 +474,10 @@ export default {
// 所属工程名称
onConProjectName(value) {
if(!value){
this.showProjectName = false;
return
}
this.projectId = value.id;
this.projectName = value.projectName;
this.showProjectName = false;
......@@ -507,6 +488,10 @@ export default {
},
// 适用范围
onConRange(value) {
if(!value){
this.showRange = false;
return
}
this.range = value.hdRange;
this.showRange = false;
this.type = "";
......@@ -520,6 +505,10 @@ export default {
},
// 隐患类型
onConType(value) {
if(!value){
this.showType = false;
return
}
this.type = value.hdType;
this.showType = false;
this.dangerName = "";
......@@ -535,6 +524,10 @@ export default {
},
// 隐患项目名称
onConDangerName(value) {
if(!value){
this.showDangerName = false;
return
}
this.dangerName = value.hdName;
this.showDangerName = false;
// 请求隐患项目编号和隐患级别
......@@ -552,6 +545,10 @@ export default {
},
// 风险源
onConSource(value) {
if(!value){
this.showSource = false;
return
}
this.source = value.factor;
this.showSource = false;
// 请求风险源第二个字段
......@@ -586,6 +583,10 @@ export default {
},
// 隐患整改人
onConRecPeople(value) {
if(!value){
this.showRecPeople = false;
return
}
this.recPeople = value.userName;
this.showRecPeople = false;
},
......
......@@ -19,7 +19,7 @@
</van-checkbox-group>
<div class="footer-con">
<div style="color: #1989fa;">已选择: {{result.length}}</div>
<div style="color: #1989fa;">已选择: {{result.length}}</div>
<div>
<van-button type="info" @click="confirm">确定</van-button>
</div>
......
......@@ -267,11 +267,19 @@ export default {
},
onConRect(value) {
if(!value){
this.showPickerRect = false;
return
}
this.valueRect = value.userName;
this.rectId = value.userId;
this.showPickerRect = false;
},
onConReview(value) {
if(!value){
this.showPickerReview = false;
return
}
this.valueReview = value.userName;
this.reviewId = value.userId;
this.showPickerReview = false;
......
......@@ -156,7 +156,7 @@
/>
<van-field name="setRankModeFile" label=" ">
<template #input>
<van-uploader v-model="setRankModeImg" accept="file"/>
<van-uploader v-model="setRankModeImg" accept="file" />
</template>
</van-field>
......@@ -239,7 +239,7 @@
/>
<van-field name="technologyFile" label=" ">
<template #input>
<van-uploader v-model="technologyImg" accept="file"/>
<van-uploader v-model="technologyImg" accept="file" />
</template>
</van-field>
......@@ -254,7 +254,7 @@
/>
<van-field name="administrationFile" label=" ">
<template #input>
<van-uploader v-model="administrationImg" accept="file"/>
<van-uploader v-model="administrationImg" accept="file" />
</template>
</van-field>
......@@ -269,7 +269,7 @@
/>
<van-field name="urgentFile" label=" ">
<template #input>
<van-uploader v-model="urgentImg" accept="file"/>
<van-uploader v-model="urgentImg" accept="file" />
</template>
</van-field>
......@@ -289,7 +289,15 @@
<script>
import LHeader from "@/components/header.vue";
import { getFormList,postHdSource, postHdType, postHdPeople, postReAdd, postriskConiCause,postRiskShowMeasures } from "@/service/risk";
import {
getFormList,
postHdSource,
postHdType,
postHdPeople,
postReAdd,
postriskConiCause,
postRiskShowMeasures
} from "@/service/risk";
export default {
components: {
LHeader
......@@ -298,7 +306,7 @@ export default {
return {
taskId: "",
text: "新增风险",
id:"",
id: "",
projectId: "", // 所属工程
projectName: "", // 所属工程
showProjectName: false,
......@@ -314,10 +322,10 @@ export default {
columnsTrouble: [],
setRank: "", //风险定级
showSetRank: false,
columnsSetRank: [{ text: '矩阵式定级', disabled: true }, "其他定级方式"],
columnsSetRank: ["矩阵式定级", "其他定级方式"],
riskRank: "", // 风险等级
showRiskRank: false,
columnsRiskRank:["一般风险", "较小风险", "较大风险", "重大风险"],
columnsRiskRank: ["一般风险", "较小风险", "较大风险", "重大风险"],
setRankMode: "", // 定级方式文字
setRankModeImg: [], // 定级方式图片
location: "", //风险部位
......@@ -371,30 +379,33 @@ export default {
formdata.append("emergencyMeasure", this.urgent);
// 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式
values.setRankModeFile.forEach(item => { // 定级方式
values.setRankModeFile.forEach(item => {
// 定级方式
formdata.append("risk1[]", item.file);
});
values.technologyFile.forEach(item => { // 技术措施
values.technologyFile.forEach(item => {
// 技术措施
formdata.append("risk2[]", item.file);
});
values.administrationFile.forEach(item => { // 管理措施
values.administrationFile.forEach(item => {
// 管理措施
formdata.append("risk3[]", item.file);
});
values.urgentFile.forEach(item => { // 应急措施
values.urgentFile.forEach(item => {
// 应急措施
formdata.append("risk4[]", item.file);
});
this.$toast.loading({
message: "提交中...",
forbidClick: true,
loadingType: "spinner",
duration: 0
});
let url = "/riskMain/add"
if(this.taskId){
let url = "/riskMain/add";
if (this.taskId) {
formdata.append("id", this.id);
url = `/riskMain/editSave/${this.taskId}`
url = `/riskMain/editSave/${this.taskId}`;
}
postReAdd(url, formdata)
......@@ -444,39 +455,7 @@ export default {
postriskConiCause(`/riskMain/edit/${this.taskId}`)
.then(res => {
this.$toast.clear();
let msg = res.data.riskMain;
// 对数据进行赋值
this.id = msg.id
this.returnCause = res.data.reason;
this.factor = msg.riskFactor;
this.source = msg.riskSource;
this.trouble = msg.accidentType;
this.setRank = msg.riskLevel;
this.riskRank = msg.riskLevel;
this.setRankMode = msg.gradingMethod;
this.location = msg.riskPosition;
this.control = msg.controlLevel;
this.technology = msg.technicalMeasures;
this.administration = msg.managementMeasures;
this.urgent = msg.emergencyMeasure;
// this.projectId = msg.proId;
// 对主责部门和主责人员筛选出 相同id 的工程名
this.mainDutyDeptId = msg.responsibilityDept;
this.mainDutyDept = res.data.ResponsibilityMember.organizationName;
this.mainDutyPeopLeId = msg.responsibilityMember;
// 请求主责人员
let formdata1 = new FormData();
formdata1.append("organizationId", this.mainDutyDeptId);
postHdPeople(`/riskMain/getUserList`, formdata1).then(res => {
this.columnsMainDutyPeopLe = res.data;
let deptMingzi = this.columnsMainDutyPeopLe.filter(item => {
return item.userId == msg.responsibilityMember;
});
this.mainDutyPeopLe = deptMingzi[0].userName;
});
})
.catch(() => {
this.$toast.clear();
......@@ -485,12 +464,20 @@ export default {
// 所属工程名称
onConProjectName(value) {
if (!value) {
this.showProjectName = false;
return;
}
this.projectId = value.id;
this.projectName = value.projectName;
this.showProjectName = false;
},
// 风险因素
onConFactor(value) {
if (!value) {
this.showFactor = false;
return;
}
this.factor = value.factorType;
this.showFactor = false;
this.source = "";
......@@ -502,6 +489,10 @@ export default {
},
// 风险源
onConSource(value) {
if (!value) {
this.showSource = false;
return;
}
this.source = value.sourceName;
this.showSource = false;
this.trouble = "";
......@@ -514,43 +505,47 @@ export default {
},
// 事故类型
onConTrouble(value) {
if (!value) {
this.showTrouble = false;
return;
}
this.trouble = value.accidentType;
this.showTrouble = false;
// 请求三个措施
postRiskShowMeasures(`/riskMain/showmeasures/${this.factor}/${this.source}/${this.trouble}`).then(res =>{
console.log(res.data)
this.technology = res.data[0].measuresProject
this.administration = res.data[0].measuresAdministration
this.urgent = res.data[0].measuresEmergency
})
postRiskShowMeasures(
`/riskMain/showmeasures/${this.factor}/${this.source}/${this.trouble}`
).then(res => {
console.log(res.data);
this.technology = res.data[0].measuresProject;
this.administration = res.data[0].measuresAdministration;
this.urgent = res.data[0].measuresEmergency;
});
},
// 风险定级
onConSetRank(value) {
this.setRank = value;
this.riskRank = ""
this.riskRank = "";
this.showSetRank = false;
if (this.setRank == "矩阵式定级") {
this.$router.push({
name: "matrix-grad"
});
}
},
// 自己定义风险等级点击方法
myRiskRank(){
console.log(this.setRank);
if(this.setRank == ""){
this.$toast("其他定级方式");
}else if(this.setRank == "其他定级方式"){
myRiskRank() {
if (this.setRank == "") {
this.$toast("请先选择风险定级");
} else if (this.setRank == "其他定级方式") {
this.showRiskRank = true;
}
},
// 风险等级
onConRiskRank(value) {
this.riskRank = value;
// if (value == "重大风险" || value == "较大风险") {
// this.control = "企业级";
// } else {
// this.control = "项目级";
// }
this.showRiskRank = false;
},
// 管控层级
onConControl(value) {
this.control = value;
......
<template>
<div>
<!-- 发生可能性 -->
<div class="content-wrap">
<van-checkbox-group v-model="happenSelect">
<van-cell-group>
<van-cell title="发生可能性" is-link arrow-direction="down" />
<van-cell
v-for="(item, index) in happenList"
clickable
:key="item"
:title="item"
@click="happenToggle(index)"
>
<template #right-icon>
<van-checkbox :name="item" ref="happen" />
</template>
</van-cell>
</van-cell-group>
</van-checkbox-group>
</div>
<!-- 后果严重性 -->
<div class="content-wrap">
<van-checkbox-group v-model="resultSelect">
<van-cell-group>
<van-cell title="发生可能性" is-link arrow-direction="down" />
<van-cell
v-for="(item, index) in resultList"
clickable
:key="item"
:title="item"
@click="resultToggle(index)"
>
<template #right-icon>
<van-checkbox :name="item" ref="result" />
</template>
</van-cell>
</van-cell-group>
</van-checkbox-group>
</div>
</div>
</template>
<script>
export default {
data() {
return {
happenList: [
"企业半年内发生2起一般安全生产事故的",
"企业1年内发生3起一般安全生产事故的",
"企业1年内发生1起较大及其以上生产安全事故的",
"超限高层建筑",
"采用新技术、新工艺、新设备、新材料、尚无国家、行业及地方技术标准",
"工程项目施工工期压缩超过30%或者工期压缩未采用技术措施的",
],
happenSelect: [],
resultList: [
"企业半年内发生2起一般安全生产事故的",
"企业1年内发生3起一般安全生产事故的",
"企业1年内发生1起较大及其以上生产安全事故的",
"超限高层建筑",
"采用新技术、新工艺、新设备、新材料、尚无国家、行业及地方技术标准",
"工程项目施工工期压缩超过30%或者工期压缩未采用技术措施的",
],
resultSelect: [],
};
},
mounted() {},
methods: {
happenToggle(index, val) {
this.$refs.happen[index].toggle();
console.log(this.$refs.happen[index].name);
},
resultToggle(index, val) {
this.$refs.result[index].toggle();
console.log(this.$refs.result[index].name);
},
}
};
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
.content-wrap{
margin-bottom: .266667rem;
}
</style>
<template>
<div>
<LHeader :text="text"></LHeader>
<van-tabs v-model="active" @click="onClick" title-inactive-colo="#d0d1d1" color="#247df7"
title-active-color="#000000">
<van-tab title="指标评估">
<target></target>
</van-tab>
<van-tab title="条件评估">
<condition></condition>
</van-tab>
</van-tabs>
<!-- <div style="margin:10px 16px 0px;padding-bottom:16px">
<van-button round block type="info" @click.native="onDefine"
>确认</van-button
>
<br>
<van-button round block type="warning" @click.native="cancel"
>取消</van-button
>
</div> -->
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
import Target from './target.vue';
import Condition from './condition.vue';
export default {
name: "matrix-grad",
components: {
LHeader,
Target,
Condition
},
data() {
return {
text: "矩阵式定级",
active: "0"
};
},
mounted() {},
methods: {
onClick(val) {
console.log(val);
},
onDefine(){
},
cancel() {
this.$router.go(-1);
}
}
};
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
</style>
<template>
<div>
<!-- 发生可能性 -->
<div class="content-wrap">
<van-cell-group>
<van-cell title="发生可能性" is-link arrow-direction="down" />
<van-row>
<van-col span="10">指标</van-col>
<van-col span="8">分级</van-col>
<van-col span="4">可能性</van-col>
<van-col span="2">等级</van-col>
</van-row>
<van-row v-for="(item, index) in happenList" :key="index">
<van-col span="10">{{ item.target }}</van-col>
<van-col span="8">{{ item.grade }}</van-col>
<van-col span="4">{{ item.possibility }}</van-col>
<van-col span="2">{{ item.level }}</van-col>
</van-row>
<van-row>
<van-col span="10">项目部管理能力和水平</van-col>
<van-col span="8" class="border" @click="onClickTarget"
>请选择</van-col
>
<van-col span="4"></van-col>
<van-col span="2"></van-col>
</van-row>
</van-cell-group>
</div>
<!-- 后果严重性 -->
<div class="content-wrap">
<van-cell-group>
<van-cell title="后果严重性" is-link arrow-direction="down" />
<van-row>
<van-col span="10"></van-col>
<van-col span="8">潜在后果</van-col>
<van-col span="4">描述</van-col>
<van-col span="2">等级</van-col>
</van-row>
<van-row>
<van-col span="10">人员伤亡严重性</van-col>
<van-col span="8" class="border" @click="onClickTarget"
>请选择</van-col>
<van-col span="4"></van-col>
<van-col span="2"></van-col>
</van-row>
<van-row v-for="(item, index) in resultList" :key="index">
<van-col span="10">{{ item.target }}</van-col>
<van-col span="8" class="border" @click="onClickTarget"
>请选择</van-col>
<van-col span="4">{{ item.possibility }}</van-col>
<van-col span="2">{{ item.level }}</van-col>
</van-row>
</van-cell-group>
</div>
</div>
</template>
<script>
export default {
data() {
return {
happenList: [
{
target: "全国行业历史发生概率",
grade: "过去2年发生一次以上",
possibility: "很可能",
level: "2"
},
{
target: "本市行业历史发生概率",
grade: "过去5年发生一次以上",
possibility: "很可能",
level: "2"
},
{
target: "本企业历史发生概率",
grade: "过去从未发生",
possibility: "基本很可能",
level: "2"
},
{
target: "企业安全生产管理水平",
grade: "企业安全生产标准化",
possibility: "很可能",
level: "2"
},
{
target: "项目经理管理能力和水平",
grade: "项目经理信用评分比",
possibility: "可能",
level: "2"
}
],
resultList: [
{
target: "经济损失严重性",
grade: "",
possibility: "",
level: ""
},
{
target: "周边敏感目标影响严重性",
grade: "",
possibility: "",
level: ""
},
{
target: "社会关注度",
grade: "",
possibility: "",
level: ""
},
{
target: "基础设施影响",
grade: "",
possibility: "",
level: ""
},
],
value: "",
columns: ["杭州", "宁波", "温州", "嘉兴", "湖州"],
showPicker: false
};
},
mounted() {},
methods: {
onConfirm(value) {
this.value = value;
this.showPicker = false;
},
onClickTarget() {}
}
};
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
.van-cell::after {
right: 0;
left: 0;
}
.content-wrap {
margin-bottom: 0.266667rem;
.van-row {
display: flex;
align-items: center;
.van-col {
height: 0.693333rem;
font-size: 0.3334rem;
padding: 0.106667rem 0;
margin: 0.106667rem 0;
text-align: center;
}
.border {
border: 1px solid #e5e6e7;
}
}
}
</style>
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