Commit 833cb49a authored by 薄玉虎's avatar 薄玉虎

Merge branch 'develop' of http://git.censoft.com.cn/BCDH-HSE/bcdh-app into develop

parents 142a54a8 5871728d
...@@ -474,11 +474,21 @@ const routes = [{ ...@@ -474,11 +474,21 @@ const routes = [{
}, },
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskAdd'), 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', path: '/risk-return',
name: 'risk-return', name: 'risk-return',
meta: { meta: {
title: '风险上报', title: '风险上报退回列表',
index: 1 index: 1
}, },
component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskReturn'), component: () => import( /* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskReturn'),
......
...@@ -229,6 +229,42 @@ export function superviseAdd(url, data) { ...@@ -229,6 +229,42 @@ export function superviseAdd(url, data) {
}) })
} }
//延期审批
export function delayList(url, data) {
return request({
url: url,
method: 'post',
data
})
}
//延期审批退回回显
export function delayReturn(url, data) {
return request({
url: url,
method: 'get',
data
})
}
//延期审批添加
export function delayAdd(url, data) {
return request({
url: url,
method: 'post',
data
})
}
//延期审批添加
export function delayEdit(url, data) {
return request({
url: url,
method: 'post',
data
})
}
......
...@@ -295,8 +295,7 @@ export default { ...@@ -295,8 +295,7 @@ export default {
} }
this.getList(); this.getList();
this.$bus.$on("sourceAyy", (res) => { this.$bus.$on("sourceAyy", res => {
console.log(res.join(","));
this.source1 = res.join(","); this.source1 = res.join(",");
}); });
}, },
...@@ -468,30 +467,8 @@ export default { ...@@ -468,30 +467,8 @@ export default {
dangerReturnEcho(`/hdreport/edit/${this.taskId}`) dangerReturnEcho(`/hdreport/edit/${this.taskId}`)
.then((res) => { .then((res) => {
this.$toast.clear(); this.$toast.clear();
let msg = res.data.hdReport; // 对数据进行赋值
// 对数据进行赋值
this.returnCause = res.data.reason; 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(() => { .catch(() => {
this.$toast.clear(); this.$toast.clear();
...@@ -501,6 +478,10 @@ export default { ...@@ -501,6 +478,10 @@ export default {
// 所属工程名称 // 所属工程名称
onConProjectName(value) { onConProjectName(value) {
if(!value){
this.showProjectName = false;
return
}
this.projectId = value.id; this.projectId = value.id;
this.projectName = value.projectName; this.projectName = value.projectName;
this.showProjectName = false; this.showProjectName = false;
...@@ -511,6 +492,10 @@ export default { ...@@ -511,6 +492,10 @@ export default {
}, },
// 适用范围 // 适用范围
onConRange(value) { onConRange(value) {
if(!value){
this.showRange = false;
return
}
this.range = value.hdRange; this.range = value.hdRange;
this.showRange = false; this.showRange = false;
this.type = ""; this.type = "";
...@@ -524,6 +509,10 @@ export default { ...@@ -524,6 +509,10 @@ export default {
}, },
// 隐患类型 // 隐患类型
onConType(value) { onConType(value) {
if(!value){
this.showType = false;
return
}
this.type = value.hdType; this.type = value.hdType;
this.showType = false; this.showType = false;
this.dangerName = ""; this.dangerName = "";
...@@ -539,6 +528,10 @@ export default { ...@@ -539,6 +528,10 @@ export default {
}, },
// 隐患项目名称 // 隐患项目名称
onConDangerName(value) { onConDangerName(value) {
if(!value){
this.showDangerName = false;
return
}
this.dangerName = value.hdName; this.dangerName = value.hdName;
this.showDangerName = false; this.showDangerName = false;
// 请求隐患项目编号和隐患级别 // 请求隐患项目编号和隐患级别
...@@ -556,6 +549,10 @@ export default { ...@@ -556,6 +549,10 @@ export default {
}, },
// 风险源 // 风险源
onConSource(value) { onConSource(value) {
if(!value){
this.showSource = false;
return
}
this.source = value.factor; this.source = value.factor;
this.showSource = false; this.showSource = false;
// 请求风险源第二个字段 // 请求风险源第二个字段
...@@ -590,6 +587,10 @@ export default { ...@@ -590,6 +587,10 @@ export default {
}, },
// 隐患整改人 // 隐患整改人
onConRecPeople(value) { onConRecPeople(value) {
if(!value){
this.showRecPeople = false;
return
}
this.recPeople = value.userName; this.recPeople = value.userName;
this.showRecPeople = false; this.showRecPeople = false;
}, },
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</van-checkbox-group> </van-checkbox-group>
<div class="footer-con"> <div class="footer-con">
<div style="color: #1989fa;">已选择: {{result.length}}</div> <div style="color: #1989fa;">已选择: {{result.length}}</div>
<div> <div>
<van-button type="info" @click="confirm">确定</van-button> <van-button type="info" @click="confirm">确定</van-button>
</div> </div>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<van-field <van-field
readonly readonly
clickable clickable
name="delayTime" name="applyDate"
:value="delayTime" :value="delayTime"
label="延期时间" label="延期时间"
placeholder="点击选择日期" placeholder="点击选择日期"
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<van-field <van-field
v-model="delayApply" v-model="delayApply"
label="延期理由" label="延期理由"
name="delayApply" name="applyReason"
rows="3" rows="3"
type="textarea" type="textarea"
placeholder="请输入" placeholder="请输入"
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import { timestampToTime } from "@/utils/format"; import { timestampToTime } from "@/utils/format";
import { delayAdd } from "@/service/danger";
export default { export default {
components: { components: {
LHeader LHeader
...@@ -70,10 +71,32 @@ export default { ...@@ -70,10 +71,32 @@ export default {
this.taskId = this.$route.params.taskId; this.taskId = this.$route.params.taskId;
}, },
methods: { methods: {
onSubmit(values) { onSubmit(values) {
console.log("submit", values); console.log("submit", values);
}, this.$toast.loading({
message: "提交中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
let formdata = new FormData();
formdata.append("applyDate", values.applyDate);
formdata.append("applyReason", values.applyReason);
formdata.append("taskId", this.taskId);
delayAdd(`/delayApply/add`, formdata)
.then((res) => {
this.$toast.clear();
this.$toast.success({
message: "提交成功",
duration: 2000,
});
history.go(-1);
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("提交失败,请稍后再试");
});
},
// 延期时间 // 延期时间
onConDelayTime(date) { onConDelayTime(date) {
this.delayTime = timestampToTime(date, "DT1", true); this.delayTime = timestampToTime(date, "DT1", true);
......
...@@ -269,11 +269,19 @@ export default { ...@@ -269,11 +269,19 @@ export default {
}, },
onConRect(value) { onConRect(value) {
if(!value){
this.showPickerRect = false;
return
}
this.valueRect = value.userName; this.valueRect = value.userName;
this.rectId = value.userId; this.rectId = value.userId;
this.showPickerRect = false; this.showPickerRect = false;
}, },
onConReview(value) { onConReview(value) {
if(!value){
this.showPickerReview = false;
return
}
this.valueReview = value.userName; this.valueReview = value.userName;
this.reviewId = value.userId; this.reviewId = value.userId;
this.showPickerReview = false; this.showPickerReview = false;
......
...@@ -14,21 +14,21 @@ ...@@ -14,21 +14,21 @@
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="7">所属工程名称:</van-col> <van-col span="7">隐患编号:</van-col>
<van-col span="17">{{ item.proId }}</van-col> <van-col span="17">{{ item.businessId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7">隐患项目名称:</van-col> <van-col span="7">隐患项目名称:</van-col>
<van-col span="17">{{ item.subject }}</van-col> <van-col span="17">{{ item.proId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7">隐患发现时间:</van-col> <van-col span="7">隐患级别:</van-col>
<van-col span="17">{{ item.findTime }}</van-col> <van-col span="17">{{ item.hdLev }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7">隐患级别:</van-col> <van-col span="7">发现时间:</van-col>
<van-col span="17">{{ item.level }}</van-col> <van-col span="17">{{ item.startDate }}</van-col>
</van-row> </van-row>
<!-- *接口对接4 END --> <!-- *接口对接4 END -->
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import { delayList } from "@/service/danger";
...@@ -80,7 +81,29 @@ export default { ...@@ -80,7 +81,29 @@ export default {
}, },
methods: { methods: {
getList() { getList() {
/*接口对接3 START*/
// 例子:
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0
});
delayList("/delayApply/list")
.then(res => {
this.$toast.clear();
this.messageList = res.rows
// 判断有无数据返回
if (this.messageList.length == 0) {
this.isHaveNews = true;
}
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
/*接口对接3 END*/
}, },
onSearch(val) { onSearch(val) {
console.log(val); console.log(val);
......
...@@ -7,26 +7,25 @@ ...@@ -7,26 +7,25 @@
:scroll-to-error="true" :scroll-to-error="true"
validate-trigger="onSubmit" validate-trigger="onSubmit"
> >
<van-field <van-field
v-model="delayTime" v-model="applyDate"
name="delayTime" name="applyDate"
label="延期时间" label="延期时间"
placeholder="请输入" placeholder="请输入"
:rules="[{ required: true, message: '延期时间不能为空' }]" :rules="[{ required: true, message: '延期时间不能为空' }]"
/> />
<van-field <van-field
v-model="delayApply" v-model="applyReason"
readonly readonly
label="延期理由" label="延期理由"
name="delayApply" name="applyReason"
rows="1" rows="1"
autosize autosize
type="textarea" type="textarea"
/> />
<van-field name="isAgree" label="延期是否通过"> <van-field name="isAgree" label="延期是否通过">
<template #input> <template #input>
<van-radio-group <van-radio-group
v-model="isAgree" v-model="isAgree"
...@@ -42,21 +41,20 @@ ...@@ -42,21 +41,20 @@
<van-field <van-field
v-model="opinion" v-model="opinion"
label="理由或者意见" label="理由或者意见"
name="opinion" name="examineReason"
rows="3" rows="3"
type="textarea" type="textarea"
placeholder="请输入" placeholder="请输入"
:rules="[{ required: true, message: '理由或者意见不能为空' }]" :rules="[{ required: true, message: '理由或者意见不能为空' }]"
/> />
<div style="margin: 16px">
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" <van-button round block type="info" native-type="submit"
>保存</van-button >保存</van-button
> >
</div> </div>
</van-form> </van-form>
<div style="margin:10px 16px 0px;padding-bottom:16px"> <div style="margin: 10px 16px 0px; padding-bottom: 16px">
<van-button round block type="warning" @click.native="cancel" <van-button round block type="warning" @click.native="cancel"
>取消</van-button >取消</van-button
> >
...@@ -66,10 +64,11 @@ ...@@ -66,10 +64,11 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import { timestampToTime } from "@/utils/format"; import { delayReturn } from "@/service/danger";
import { delayEdit } from "@/service/danger";
export default { export default {
components: { components: {
LHeader LHeader,
}, },
data() { data() {
return { return {
...@@ -80,27 +79,71 @@ export default { ...@@ -80,27 +79,71 @@ export default {
delayApply: "", // 延迟理由 delayApply: "", // 延迟理由
isAgree: 1, // 延期是否通过 isAgree: 1, // 延期是否通过
opinion: "", //理由或者意见 opinion: "", //理由或者意见
applyDate: "", //延期时间
applyReason: "", //延期理由
}; };
}, },
created() { created() {
this.taskId = this.$route.params.taskId; this.taskId = this.$route.params.taskId;
this.getReturnEcho();
}, },
methods: { methods: {
onSubmit(values) { onSubmit(values) {
console.log("submit", values); console.log("submit", values);
}, this.$toast.loading({
message: "提交中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
let formdata = new FormData();
formdata.append("examineResult", values.examineResult);
formdata.append("examineReason", values.examineReason);
formdata.append("taskId", this.taskId);
delayEdit(`/delayApply/edit`, formdata)
.then((res) => {
this.$toast.clear();
this.$toast.success({
message: "提交成功",
duration: 2000,
});
history.go(-1);
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("提交失败,请稍后再试");
});
},
// 请求已退回详情数据
getReturnEcho() {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
delayReturn(`/delayApply/edit/${this.taskId}`)
.then((res) => {
this.$toast.clear();
// 对数据进行赋值
this.applyDate = res.data.delayApply.applyDate;
this.applyReason = res.data.delayApply.applyReason;
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
selectResult(val) { selectResult(val) {
this.isAgree = val; this.isAgree = val;
}, },
cancel() { cancel() {
this.$router.go(-1); this.$router.go(-1);
} },
} },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
/> />
<van-field name="setRankModeFile" label=" "> <van-field name="setRankModeFile" label=" ">
<template #input> <template #input>
<van-uploader v-model="setRankModeImg" accept="file"/> <van-uploader v-model="setRankModeImg" accept="file" />
</template> </template>
</van-field> </van-field>
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
/> />
<van-field name="technologyFile" label=" "> <van-field name="technologyFile" label=" ">
<template #input> <template #input>
<van-uploader v-model="technologyImg" accept="file"/> <van-uploader v-model="technologyImg" accept="file" />
</template> </template>
</van-field> </van-field>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
/> />
<van-field name="administrationFile" label=" "> <van-field name="administrationFile" label=" ">
<template #input> <template #input>
<van-uploader v-model="administrationImg" accept="file"/> <van-uploader v-model="administrationImg" accept="file" />
</template> </template>
</van-field> </van-field>
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
/> />
<van-field name="urgentFile" label=" "> <van-field name="urgentFile" label=" ">
<template #input> <template #input>
<van-uploader v-model="urgentImg" accept="file"/> <van-uploader v-model="urgentImg" accept="file" />
</template> </template>
</van-field> </van-field>
...@@ -289,7 +289,15 @@ ...@@ -289,7 +289,15 @@
<script> <script>
import LHeader from "@/components/header.vue"; 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 { export default {
components: { components: {
LHeader LHeader
...@@ -298,7 +306,7 @@ export default { ...@@ -298,7 +306,7 @@ export default {
return { return {
taskId: "", taskId: "",
text: "新增风险", text: "新增风险",
id:"", id: "",
projectId: "", // 所属工程 projectId: "", // 所属工程
projectName: "", // 所属工程 projectName: "", // 所属工程
showProjectName: false, showProjectName: false,
...@@ -314,10 +322,10 @@ export default { ...@@ -314,10 +322,10 @@ export default {
columnsTrouble: [], columnsTrouble: [],
setRank: "", //风险定级 setRank: "", //风险定级
showSetRank: false, showSetRank: false,
columnsSetRank: [{ text: '矩阵式定级', disabled: true }, "其他定级方式"], columnsSetRank: ["矩阵式定级", "其他定级方式"],
riskRank: "", // 风险等级 riskRank: "", // 风险等级
showRiskRank: false, showRiskRank: false,
columnsRiskRank:["一般风险", "较小风险", "较大风险", "重大风险"], columnsRiskRank: ["一般风险", "较小风险", "较大风险", "重大风险"],
setRankMode: "", // 定级方式文字 setRankMode: "", // 定级方式文字
setRankModeImg: [], // 定级方式图片 setRankModeImg: [], // 定级方式图片
location: "", //风险部位 location: "", //风险部位
...@@ -371,30 +379,33 @@ export default { ...@@ -371,30 +379,33 @@ export default {
formdata.append("emergencyMeasure", this.urgent); formdata.append("emergencyMeasure", this.urgent);
// 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式 // 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式
values.setRankModeFile.forEach(item => { // 定级方式 values.setRankModeFile.forEach(item => {
// 定级方式
formdata.append("risk1[]", item.file); formdata.append("risk1[]", item.file);
}); });
values.technologyFile.forEach(item => { // 技术措施 values.technologyFile.forEach(item => {
// 技术措施
formdata.append("risk2[]", item.file); formdata.append("risk2[]", item.file);
}); });
values.administrationFile.forEach(item => { // 管理措施 values.administrationFile.forEach(item => {
// 管理措施
formdata.append("risk3[]", item.file); formdata.append("risk3[]", item.file);
}); });
values.urgentFile.forEach(item => { // 应急措施 values.urgentFile.forEach(item => {
// 应急措施
formdata.append("risk4[]", item.file); formdata.append("risk4[]", item.file);
}); });
this.$toast.loading({ this.$toast.loading({
message: "提交中...", message: "提交中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0
}); });
let url = "/riskMain/add" let url = "/riskMain/add";
if(this.taskId){ if (this.taskId) {
formdata.append("id", this.id); formdata.append("id", this.id);
url = `/riskMain/editSave/${this.taskId}` url = `/riskMain/editSave/${this.taskId}`;
} }
postReAdd(url, formdata) postReAdd(url, formdata)
...@@ -444,39 +455,7 @@ export default { ...@@ -444,39 +455,7 @@ export default {
postriskConiCause(`/riskMain/edit/${this.taskId}`) postriskConiCause(`/riskMain/edit/${this.taskId}`)
.then(res => { .then(res => {
this.$toast.clear(); this.$toast.clear();
let msg = res.data.riskMain;
// 对数据进行赋值
this.id = msg.id
this.returnCause = res.data.reason; 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(() => { .catch(() => {
this.$toast.clear(); this.$toast.clear();
...@@ -485,12 +464,20 @@ export default { ...@@ -485,12 +464,20 @@ export default {
// 所属工程名称 // 所属工程名称
onConProjectName(value) { onConProjectName(value) {
if (!value) {
this.showProjectName = false;
return;
}
this.projectId = value.id; this.projectId = value.id;
this.projectName = value.projectName; this.projectName = value.projectName;
this.showProjectName = false; this.showProjectName = false;
}, },
// 风险因素 // 风险因素
onConFactor(value) { onConFactor(value) {
if (!value) {
this.showFactor = false;
return;
}
this.factor = value.factorType; this.factor = value.factorType;
this.showFactor = false; this.showFactor = false;
this.source = ""; this.source = "";
...@@ -502,6 +489,10 @@ export default { ...@@ -502,6 +489,10 @@ export default {
}, },
// 风险源 // 风险源
onConSource(value) { onConSource(value) {
if (!value) {
this.showSource = false;
return;
}
this.source = value.sourceName; this.source = value.sourceName;
this.showSource = false; this.showSource = false;
this.trouble = ""; this.trouble = "";
...@@ -514,43 +505,47 @@ export default { ...@@ -514,43 +505,47 @@ export default {
}, },
// 事故类型 // 事故类型
onConTrouble(value) { onConTrouble(value) {
if (!value) {
this.showTrouble = false;
return;
}
this.trouble = value.accidentType; this.trouble = value.accidentType;
this.showTrouble = false; this.showTrouble = false;
// 请求三个措施 // 请求三个措施
postRiskShowMeasures(`/riskMain/showmeasures/${this.factor}/${this.source}/${this.trouble}`).then(res =>{ postRiskShowMeasures(
console.log(res.data) `/riskMain/showmeasures/${this.factor}/${this.source}/${this.trouble}`
this.technology = res.data[0].measuresProject ).then(res => {
this.administration = res.data[0].measuresAdministration console.log(res.data);
this.urgent = res.data[0].measuresEmergency this.technology = res.data[0].measuresProject;
}) this.administration = res.data[0].measuresAdministration;
this.urgent = res.data[0].measuresEmergency;
});
}, },
// 风险定级 // 风险定级
onConSetRank(value) { onConSetRank(value) {
this.setRank = value; this.setRank = value;
this.riskRank = "" this.riskRank = "";
this.showSetRank = false; this.showSetRank = false;
if (this.setRank == "矩阵式定级") {
this.$router.push({
name: "matrix-grad"
});
}
}, },
// 自己定义风险等级点击方法 // 自己定义风险等级点击方法
myRiskRank(){ myRiskRank() {
console.log(this.setRank); if (this.setRank == "") {
if(this.setRank == ""){ this.$toast("请先选择风险定级");
this.$toast("其他定级方式"); } else if (this.setRank == "其他定级方式") {
}else if(this.setRank == "其他定级方式"){
this.showRiskRank = true; this.showRiskRank = true;
} }
}, },
// 风险等级 // 风险等级
onConRiskRank(value) { onConRiskRank(value) {
this.riskRank = value; this.riskRank = value;
// if (value == "重大风险" || value == "较大风险") {
// this.control = "企业级";
// } else {
// this.control = "项目级";
// }
this.showRiskRank = false; this.showRiskRank = false;
}, },
// 管控层级 // 管控层级
onConControl(value) { onConControl(value) {
this.control = 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