Commit 98dcf66f authored by wei's avatar wei

Merge branch 'develop' into dev-lv

parents 59bb8b9c 40c809cf
......@@ -63,7 +63,7 @@ export default {
"riskAssess",
"riskApprove",
"taskList",
"taskDetail",
"taskDetail"
],
// cachePage预先定义的缓存页面
otherCache: [],
......
......@@ -42,8 +42,6 @@ export default {
components: {
// LHeader
},
created() {
},
data() {
return {
text: "选择人员",
......@@ -52,6 +50,9 @@ export default {
seletedItem:{}
};
},
mounted(){
this.seletedItem = this.listdata[0].children[0]
},
methods: {
// 待搜索框内容发生变化
onInput: debounce(function () {
......@@ -62,7 +63,6 @@ export default {
this.itemSel = e
},
clickItem(data) {
console.log(data, 'llll')
this.seletedItem = data
},
save() {
......
......@@ -2,9 +2,9 @@
<div class="wrap" ref="mapmidbox">
<van-sticky v-if="showHeader">
<header class="header">
<span @click="close" class="iconLeft"> 关闭</span>
<span @click="close" class="iconLeft"> 返回</span>
<span>{{text}}</span>
<span @click="confim" class="iconRight" v-show="!isViews">确定</span>
<span @click="confim" class="iconRight" v-show="!isViews">保存</span>
<span class="iconRight" v-show="isViews"></span>
</header>
</van-sticky>
......
......@@ -7,15 +7,16 @@
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
style="position: relative;top: 32%;transform: translateY(-50%);" />
风险信息
</div>
<van-field readonly required name="userName" :value="form.userName" label="评估人" placeholder="请输入" />
<van-field readonly required name="projectId" :value="form.projectId" label="所属项目" placeholder="请输入" />
<van-field readonly required name="projectId" :value="form.projectName" label="所属项目"
placeholder="请输入" />
<van-field readonly required name="buildingName" :value="form.buildingName" label="所属建筑物"
placeholder="请输入" />
<van-field required clickable name="floorId" :value="form.floorId" label="所属楼层" placeholder="请选择"
<van-field required clickable name="floorName" :value="form.floorName" label="所属楼层" placeholder="请选择"
@click="seletFloor('floor')" :rules="[{ required: true, message: '所属楼层不能为空' }]" />
<van-field readonly required name="roomName" :value="form.roomName" label="所属房间" placeholder="请输入"
......@@ -39,7 +40,7 @@
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
style="position: relative;top: 32%;transform: translateY(-50%);" />
风险源图片
</div>
<van-field name="hdPicture1" label="风险源图片">
......@@ -67,7 +68,7 @@
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
style="position: relative;top: 32%;transform: translateY(-50%);" />
技术措施
</div>
<van-field v-model="form.measuresProject" name="measuresProject" label="技术措施" type="textarea" rows="1"
......@@ -98,7 +99,7 @@
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
style="position: relative;top: 32%;transform: translateY(-50%);" />
管理措施
</div>
<van-field v-model="form.measuresAdministration" name="measuresAdministration" label="管理措施"
......@@ -130,7 +131,7 @@
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
style="position: relative;top: 32%;transform: translateY(-50%);" />
应急措施
</div>
<van-field v-model="form.measuresEmergency" name="measuresEmergency" label="应急措施" type="textarea"
......@@ -162,7 +163,7 @@
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
style="position: relative;top: 32%;transform: translateY(-50%);" />
参考依据
</div>
<!-- <van-field
......@@ -177,9 +178,8 @@
:rules="[{ required: true, message: '事故类型不能为空' }]"
/> -->
<div style="margin: 16px 16px 0">
<van-button round block type="info" native-type="submit">上报</van-button>
<van-button round block type="info" native-type="submit">提交</van-button>
</div>
</van-form>
<div style="margin: 10px 16px 0px; padding-bottom: 16px">
......@@ -189,25 +189,27 @@
<van-tab title="现状风险">
<div class="con-list" @touchmove="showIndex = null">
<van-cell-group inset v-for="(item, index) in messageList" :key="index">
<div style="font-size: 0.45rem;padding: 5px 0;">{{ item.title }}</div>
<div style="font-size: 0.45rem;padding: 5px 0;">
{{ item.title }}
</div>
<van-row gutter="">
<van-col span="17">
<van-row gutter="">
<van-col span="9">风险系数</van-col>
<van-col span="15">{{ item.time }}</van-col>
<van-col span="9">风险名称</van-col>
<van-col span="15">{{ item.name }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="9">创建时间:</van-col>
<van-col span="15">{{ item.name }}</van-col>
<van-col span="15">{{ timestampToTimes(item.createTime) }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="9">风险描述:</van-col>
<van-col span="15">{{ item.name }}</van-col>
<van-col span="15">{{ item.describe }}</van-col>
</van-row>
</van-col>
<van-col span="7" :style="{ 'color': item.state == 1 ? '#0069e5' : '#03b615' }">
{{ '●待审批' }}
<van-col span="7" :style="{ color: item.state == 1 ? '#0069e5' : '#03b615' }">
{{ "●待审批" }}
</van-col>
</van-row>
</van-cell-group>
......@@ -221,7 +223,6 @@
暂无数据
</div>
</div>
</van-tab>
</van-tabs>
<van-popup v-model="showTrouble" position="bottom">
......@@ -229,6 +230,20 @@
@cancel="showTrouble = false" />
</van-popup>
<!-- 楼层弹出层 -->
<van-popup v-model="ShowfloorList" position="bottom" :style="{ height: '100%' }">
<selectFloor :listdata="floorSource" @closeSlect="closeSlectfloor" @saveSlect="saveSlectfloor"></selectFloor>
</van-popup>
<!-- 风险源弹出层 -->
<van-popup v-model="ShowSelectList" position="bottom" :style="{ height: '100%' }">
<selectList :listdata="columnsTrouble" @closeSlect="closeSlect" @saveSlect="saveSlect"></selectList>
</van-popup>
<!-- 准事故类型 -->
<van-popup v-model="ShowAccidentList" position="bottom" :style="{ height: '100%' }">
<selectList :listdata="columnsAccident" @closeSlect="closeSlectAccident" @saveSlect="saveSlectAccident">
</selectList>
</van-popup>
<van-popup v-model="showSource" position="bottom">
<van-picker show-toolbar value-key="name" :columns="columnsSource" @confirm="onConSource"
@cancel="showSource = false" />
......@@ -248,16 +263,21 @@
</div>
</div>
<!-- 风险源 -->
<van-popup v-model="visiableSource" round position="bottom" :style="{ height: '30%',display:'flex',flexDirection:'column', }">
<van-popup v-model="visiableSource" round position="bottom"
:style="{ height: '30%', display: 'flex', flexDirection: 'column' }">
<van-button class="btns" @click="nameByselfInput">输入风险源名称</van-button>
<van-button class="btns" @click="importFromList">从风险清单导入</van-button>
<van-button class="btns" @click="cancleSource">取消</van-button>
</van-popup>
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
import SelectList from "@/components/selectList.vue";
import selectFloor from "@/components/selectFloor.vue";
import { timestampToTime, generateId } from "@/utils/format";
// import selectPeople from "@/views/riskTask/selectPeople/index.vue";
import { getFun, postFun } from "@/service/table.js";
// import {
......@@ -273,23 +293,27 @@ export default {
name: "addCurrent",
components: {
LHeader,
SelectList,
selectFloor
},
beforeRouteLeave(to, from, next) {
if (to.name != "matrix-grad") {
}
next();
},
data() {
return {
ShowfloorList: false,
floorSource: [],
ShowAccidentList: false,
ShowSelectList: false,
columnsAccident: [],
inherentId: "",
text: "编辑固有风险",
id: "",
isTimely: 1,
active: 0,
form: {
},
form: {},
projectId: "", // 所属工程
projectName: "", // 所属工程
projectDirectorName: "", // 所属工程
......@@ -341,109 +365,116 @@ export default {
urgentImg: [], //应急措施图片
buildingIds: "", // 退回原因
isShowreturnCause: false,
visiableSource:false,
visiableSource: false
};
},
created() {
if (this.$route.params.inherentId || sessionStorage.getItem("inherentId")) {
this.inherentId = this.$route.params.inherentId || sessionStorage.getItem("inherentId")
this.buildingIds = this.$route.params.buildingId || sessionStorage.getItem("buildingId")
this.inherentId =
this.$route.params.inherentId || sessionStorage.getItem("inherentId");
this.buildingIds =
this.$route.params.buildingId || sessionStorage.getItem("buildingId");
this.postReturnEcho();
}
// this.getList();
this.getFloor();
this.getFXYS();
this.getZSGLX();
},
methods: {
timestampToTimes(time) {
return timestampToTime(new Date(time), "DT2", true);
},
tabList(value) {
console.log('%c [ value ]-527', 'font-size:13px; background:pink; color:#bf2c9f;', value)
console.log(
"%c [ value ]-527",
"font-size:13px; background:pink; color:#bf2c9f;",
value
);
if (value == 1) {
this.getList();
}
},
getFloor() {
getFun(`/risk/plan/floor/list/${this.buildingIds}`)
.then(res => {
// this.$toast.clear();
// this.showSource = true;
let newArr = this.renameKeyInTree(res.data, "name", "text");
this.floorSource = newArr;
})
.catch(() => {
// this.$toast.fail("加载失败,请稍后再试");
});
},
getFXYS() {
getFun(`/risk/plan/dict/data/list?dictType=risk_plan_factor`)
.then(res => {
this.columnsTrouble = res.data;
})
.catch(() => {
// this.$toast.fail("加载失败,请稍后再试");
});
},
getZSGLX() {
getFun(`/risk/plan/dict/data/list?dictType=risk_plan_type`)
.then(res => {
this.columnsAccident = res.data;
})
.catch(() => {
// this.$toast.fail("加载失败,请稍后再试");
});
},
seletFloor(name) {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
this.userPrefix = name
getFun(`/risk/plan/floor/list/${this.buildingIds}`).then((res) => {
this.$toast.clear()
this.showSource = true
this.columnsSource = res.data
}).catch(() => {
this.$toast.fail("加载失败,请稍后再试");
});
this.ShowfloorList = true;
this.userPrefix = name;
},
seletRoom(name) {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
this.userPrefix = name
getFun(`/risk/plan/room/list/${this.form.floorId}`).then((res) => {
this.$toast.clear()
this.showSource = true
this.columnsSource = res.data
}).catch(() => {
this.$toast.fail("加载失败,请稍后再试");
duration: 0
});
this.userPrefix = name;
getFun(`/risk/plan/room/list/${this.form.floorId}`)
.then(res => {
this.$toast.clear();
this.showSource = true;
this.columnsSource = res.data;
})
.catch(() => {
// this.$toast.fail("加载失败,请稍后再试");
});
},
//风险因素
seletFactor(name) {
this.showTrouble = true
this.riskName = name
this.columnsTrouble = [
{
name: '人的因素',
},
{
name: '物的因素',
},
{
name: '环境因素',
},
{
name: '管理因素',
},
]
// this.showTrouble = true;
this.riskName = name;
this.ShowSelectList = true;
},
//准事故类型
seletType(name) {
this.showTrouble = true
this.riskName = name
this.columnsTrouble = [
{
name: '物体打击',
},
{
name: '车辆伤害',
},
{
name: '起重伤害',
},
{
name: '机械伤害',
},
]
// this.showTrouble = true;
this.riskName = name;
this.ShowAccidentList = true;
},
seletGrade(name) {
this.showTrouble = true
this.riskName = name
this.showTrouble = true;
this.riskName = name;
this.columnsTrouble = [
{
name: '重大风险',
name: "重大风险"
},
{
name: '较大风险',
name: "较大风险"
},
{
name: '一般风险',
name: "一般风险"
},
{
name: '较小风险',
},
]
name: "较小风险"
}
];
},
performTasks() {
this.$router.push({
......@@ -451,13 +482,16 @@ export default {
params: {
id: this.inherentId,
// planId:this.planId
buildingId:this.buildingId,
planId:this.inherentId,
floorId:this.form.floorId,
roomName:this.form.roomName,
roomId:this.form.roomId,
},
})
buildingId: this.buildingId,
planId: this.inherentId,
floorId: this.form.floorId,
floorName:this.form.floorName,
projectName:this.form.projectName,
projectId:this.form.projectId,
roomName: this.form.roomName,
roomId: this.form.roomId
}
});
},
// 点击预览图
clickPre(e) {
......@@ -478,7 +512,7 @@ export default {
console.log(res);
this.$toast({
title: "提示",
message: "删除成功!",
message: "删除成功!"
});
} else {
console.log("删除失败");
......@@ -489,11 +523,11 @@ export default {
onSubmit(values) {
let url = "/riskMain/add";
postReAdd(url, formdata)
.then((res) => {
.then(res => {
this.$toast.clear();
this.$toast.success({
message: "提交成功",
duration: 2000,
duration: 2000
});
history.go(-1);
})
......@@ -507,8 +541,12 @@ export default {
// 请求表单数据
getList() {
getFun(`/risk/plan/existing/list/${this.inherentId}`)
.then((res) => {
console.log('%c [ res ]-670', 'font-size:13px; background:pink; color:#bf2c9f;', res)
.then(res => {
console.log(
"%c [ res ]-670",
"font-size:13px; background:pink; color:#bf2c9f;",
res
);
this.messageList = res.data;
})
.catch(() => {
......@@ -522,43 +560,41 @@ export default {
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
duration: 0
});
getFun(`/risk/plan/inherent/details/${this.inherentId}`)
.then((res) => {
this.form = res.data
this.uploaderImg = (res.data.pictureFile || []).map(
(item) => {
return {
...item,
url: item.filePath,
};
}
);
.then(res => {
this.form = res.data;
this.uploaderImg = (res.data.pictureFile || []).map(item => {
return {
...item,
url: item.filePath
};
});
this.measuresProjectFile = (res.data.measuresProjectFile || []).map(
(item) => {
item => {
return {
...item,
url: item.filePath,
};
}
);
this.measuresAdministrationFile = (res.data.measuresAdministrationFile || []).map(
(item) => {
return {
...item,
url: item.filePath,
};
}
);
this.measuresEmergencyFile = (res.data.measuresEmergencyFile || []).map(
(item) => {
return {
...item,
url: item.filePath,
url: item.filePath
};
}
);
this.measuresAdministrationFile = (
res.data.measuresAdministrationFile || []
).map(item => {
return {
...item,
url: item.filePath
};
});
this.measuresEmergencyFile = (
res.data.measuresEmergencyFile || []
).map(item => {
return {
...item,
url: item.filePath
};
});
})
.catch(() => {
this.$toast.clear();
......@@ -587,7 +623,7 @@ export default {
this.trouble = "";
// 请求风险源
postHdSource(`/riskMain/showSourceName?factorType=${this.factor}`).then(
(res) => {
res => {
this.columnsSource = res.data;
}
);
......@@ -603,19 +639,15 @@ export default {
this.showSource = false;
},
seletSource() {
this.visiableSource = true
this.visiableSource = true;
},
//从风险清单列表导入
importFromList(){
},
importFromList() { },
//输入风险源名称
nameByselfInput(){
},
nameByselfInput() { },
//取消风险弹窗
cancleSource(){
this.visiableSource = false
cancleSource() {
this.visiableSource = false;
},
// 事故类型
......@@ -626,7 +658,6 @@ export default {
}
this.form[this.riskName] = value.name;
this.showTrouble = false;
},
// 风险定级
onConSetRank(value) {
......@@ -636,7 +667,7 @@ export default {
if (this.setRank == "矩阵式定级") {
this.showSetRank = false;
this.$router.push({
name: "matrix-grad",
name: "matrix-grad"
});
}
},
......@@ -668,7 +699,7 @@ export default {
// 请求主责人员
let formdata = new FormData();
formdata.append("organizationId", this.mainDutyDeptId);
postHdPeople(`/riskMain/getUserList`, formdata).then((res) => {
postHdPeople(`/riskMain/getUserList`, formdata).then(res => {
this.columnsMainDutyPeopLe = res.data;
});
},
......@@ -685,17 +716,39 @@ export default {
// 选择作业人
goSelPeoTwo(val) {
this.peopleName = val
this.peopleName = val;
this.show = true;
},
onClose() {
this.show = false;
},
onSave(e) {
this.projectDirector = e[0].loginName
this.projectDirectorName = e[0].userName
this.projectDirector = e[0].loginName;
this.projectDirectorName = e[0].userName;
this.show = false;
},
closeSlectfloor() {
this.ShowfloorList = false;
},
saveSlectfloor(data) {
this.form.floorId = data.id;
this.form.floorName = data.text;
this.ShowfloorList = false;
},
closeSlect() {
this.ShowSelectList = false;
},
saveSlect(data) {
this.form.factor = data.join(",");
this.ShowSelectList = false;
},
closeSlectAccident() {
this.ShowAccidentList = false;
},
saveSlectAccident(data) {
this.form.type = data.join(",");
this.ShowAccidentList = false;
},
},
watch: {
// setRank(newVal, oldVal) {
......@@ -705,7 +758,7 @@ export default {
// this.showSetRankMode = false;
// }
// },
},
}
};
</script>
<style lang="less" scoped>
......@@ -744,10 +797,11 @@ export default {
}
}
}
.btns{
margin:10px 10px 0 10px;
border:none;
.btns {
margin: 10px 10px 0 10px;
border: none;
border-bottom: 1px solid #efefef;
color: #2980F7;
color: #2980f7;
}
</style>
<template>
<div>
<LHeader :text="text"></LHeader>
<van-form @submit="onSubmit" :scroll-to-error="true" :show-error="false" validate-trigger="onSubmit">
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
<van-form
@submit="onSubmit"
:scroll-to-error="true"
:show-error="false"
validate-trigger="onSubmit"
>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
风险信息
</div>
<van-field readonly required name="userName" :value="form.userName" label="评估人" placeholder="请输入" />
<van-field readonly required name="projectId" :value="form.projectId" label="所属项目" placeholder="请输入" />
<van-field readonly required name="buildingName" :value="form.buildingName" label="所属建筑物" placeholder="请输入" />
<van-field
readonly
required
name="userName"
:value="form.userName"
label="评估人"
placeholder="请输入"
/>
<van-field
readonly
required
name="projectId"
:value="form.projectId"
label="所属项目"
placeholder="请输入"
/>
<van-field
readonly
required
name="buildingName"
:value="form.buildingName"
label="所属建筑物"
placeholder="请输入 "
/>
<van-field required clickable name="floorName" :value="form.floorName" label="所属楼层" placeholder="请选择"
@click="seletFloor('floor')" :rules="[{ required: true, message: '所属楼层不能为空' }]" />
<van-field
required
clickable
name="floorName"
:value="form.floorName"
label="所属楼层"
placeholder="请选择"
@click="seletFloor('floor')"
:rules="[{ required: true, message: '所属楼层不能为空' }]"
/>
<div style="display: flex;">
<van-field readonly required name="roomName" :value="form.roomName" label="所属房间" placeholder="请输入"
@click="seletRoom('room')" :rules="[{ required: true, message: '所属房间不能为空' }]" />
<van-button style="color: #cccc;background-color: #f0f1f5;" icon="plus" type="info" native-type="button"
@click="tjfjClcik" />
<van-field
readonly
required
name="roomName"
:value="form.roomName"
label="所属房间"
placeholder="请输入"
@click="seletRoom('room')"
:rules="[{ required: true, message: '所属房间不能为空' }]"
/>
<van-button
style="color: #cccc;background-color: #f0f1f5;"
icon="plus"
type="info"
native-type="button"
@click="tjfjClcik"
/>
</div>
<van-field required clickable name="name" v-model="form.name" label="风险源名称" placeholder="请输入"
:rules="[{ required: true, message: '风险源名称不能为空' }]" />
<van-field v-model="form.factor" readonly required name="factor" label="风险因素" placeholder="请选择"
@click="seletFactor('factor')" :rules="[{ required: true, message: '风险因素不能为空' }]" />
<van-field
required
clickable
name="name"
v-model="form.name"
label="风险源名称"
placeholder="请输入"
:rules="[{ required: true, message: '风险源名称不能为空' }]"
/>
<van-field
v-model="form.factor"
readonly
required
name="factor"
label="风险因素"
placeholder="请选择"
@click="seletFactor('factor')"
:rules="[{ required: true, message: '风险因素不能为空' }]"
/>
<van-field readonly v-model="form.type" required name="type" label="准事故类型" placeholder="请选择"
@click="seletType('type')" :rules="[{ required: true, message: '准事故类型不能为空' }]" />
<van-field
readonly
v-model="form.type"
required
name="type"
label="准事故类型"
placeholder="请选择"
@click="seletType('type')"
:rules="[{ required: true, message: '准事故类型不能为空' }]"
/>
<van-field readonly v-model="form.level" required name="level" label="风险等级" placeholder="请选择" @click="seletGrade"
:rules="[{ required: true, message: '风险等级不能为空' }]" />
<van-field
readonly
v-model="form.level"
required
name="level"
label="风险等级"
placeholder="请选择"
@click="seletGrade"
:rules="[{ required: true, message: '风险等级不能为空' }]"
/>
<!-- <van-field readonly v-model="form.level" required name="level" label="风险等级" placeholder="请选择"
@click="seletGrade('level')" :rules="[{ required: true, message: '风险等级不能为空' }]" /> -->
<van-field required name="presenceLocation" v-model="form.presenceLocation" label="存在部位" placeholder="请输入"
:rules="[{ required: true, message: '存在部位不能为空' }]" />
<van-field
required
name="presenceLocation"
v-model="form.presenceLocation"
label="存在部位"
placeholder="请输入"
:rules="[{ required: true, message: '存在部位不能为空' }]"
/>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
风险源图片
</div>
<van-field name="hdPicture1" label="风险源图片">
<template #input>
<van-uploader @delete="deleteFile(...arguments, 'uploaderImg')" multiple :max-count="5" upload-text="最多上传五个"
v-model="uploaderImg">
<van-uploader
@delete="deleteFile(...arguments, 'uploaderImg')"
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="uploaderImg"
>
<template slot="default">
<!-- 11111111111 -->
<div style="
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -56,28 +156,53 @@
align-items: center;
justify-content: center;
flex-direction: column;
">
<img src="@/assets/upload/pic.png" alt="" style="width: 0.64rem; height: 0.64rem" />
"
>
<img
src="@/assets/upload/pic.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
技术措施
</div>
<van-field v-model="form.measuresProject" name="measuresProject" label="技术措施" type="textarea" rows="1" autosize
placeholder="请输入" />
<van-field
v-model="form.measuresProject"
name="measuresProject"
label="技术措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field name="measuresProjectFile[]" label=" ">
<template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="measuresProjectFile" accept="file"
result-type="file" @delete="deleteFile(...arguments, 'measuresProjectFile')">
<van-uploader
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="measuresProjectFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresProjectFile')"
>
<template slot="default">
<!-- 11111111111 -->
<div style="
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -85,45 +210,53 @@
align-items: center;
justify-content: center;
flex-direction: column;
">
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
应采取的管控措施
</div>
<van-field v-model="form.measuresAdministration" name="measuresAdministration" label="" type="textarea" rows="3"
autosize placeholder="请输入" />
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
已采取的管控措施
</div>
<van-field v-model="form.measuresAdministration" name="measuresAdministration" label="" type="textarea" rows="3"
autosize placeholder="请输入" />
<van-field readonly required clickable name="trouble" :value="form.trouble" label="管控责任单位" placeholder="请选择"
@click="showTrouble = true" :rules="[{ required: true, message: '管控责任单位不能为空' }]" />
<van-field readonly required clickable name="trouble" :value="form.trouble" label="管控责任人" placeholder="请选择"
@click="showTrouble = true" :rules="[{ required: true, message: '管控责任人不能为空' }]" />
<!-- <div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
管理措施
</div> -->
<van-field v-model="form.measuresAdministration" name="measuresAdministration" label="上传附件" type="textarea" rows="1"
autosize placeholder="请输入" />
<!-- <van-field name="measuresAdministrationFile[]" label=" ">
</div>
<van-field
v-model="form.measuresAdministration"
name="measuresAdministration"
label="管理措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field name="measuresAdministrationFile[]" label=" ">
<template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="measuresAdministrationFile" accept="file"
result-type="file" @delete="deleteFile(...arguments, 'measuresAdministrationFile')">
<van-uploader
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="measuresAdministrationFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresAdministrationFile')"
>
<template slot="default">
<div style="
<!-- 11111111111 -->
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -131,111 +264,236 @@
align-items: center;
justify-content: center;
flex-direction: column;
">
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field> -->
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
重大危险源描述
</div>
<van-field v-model="form.measuresEmergency" name="measuresEmergency" label="" type="textarea" rows="3" autosize
placeholder="请输入" />
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
</van-field>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
应急措施
</div>
<van-field v-model="form.measuresEmergency" name="measuresEmergency" label="应急措施" type="textarea" rows="1" autosize
placeholder="请输入" />
<van-field
v-model="form.measuresEmergency"
name="measuresEmergency"
label="应急措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field name="measuresEmergencyFile[]" label=" ">
<template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="measuresEmergencyFile" accept="file"
result-type="file" @delete="deleteFile(...arguments, 'measuresEmergencyFile')">
<van-uploader
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="measuresEmergencyFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresEmergencyFile')"
>
<template slot="default">
<div style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
">
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
<!-- 11111111111 -->
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
参考依据
</div>
<van-field readonly required clickable name="trouble" :value="form.trouble" label="参考依据" placeholder="请选择"
@click="showTrouble = true" :rules="[{ required: true, message: '事故类型不能为空' }]" />
<van-dialog v-model="showGradeDialog" title="风险评测配置" :show-cancel-button="false" :show-confirm-button="false">
<!-- <van-field
readonly
required
clickable
name="trouble"
:value="form.trouble"
label="参考依据"
placeholder="请选择"
@click="showTrouble = true"
:rules="[{ required: true, message: '事故类型不能为空' }]"
/> -->
<van-dialog
v-model="showGradeDialog"
title="风险评测配置"
:show-cancel-button="false"
:show-confirm-button="false"
>
<div class="dialogContain">
<van-collapse v-model="activeNames">
<van-collapse-item title="风险模型" name="1">
<van-field readonly required name="level" label="当前风险模型" placeholder="LS风险矩阵评估模型" />
<van-field
readonly
required
name="level"
label="当前风险模型"
placeholder="LS风险矩阵评估模型"
/>
</van-collapse-item>
<van-collapse-item title="风险模型配置" name="2">
<van-popover v-model="showPopover" trigger="click" :actions="columnsRiskRank" @select="onSelect">
<van-popover
v-model="showPopover"
trigger="click"
:actions="columnsRiskRank"
@select="onSelect"
>
<template #reference>
<van-field v-model="possibleValue" readonly required name="level" label="发生的可能性" placeholder="请选择" />
<van-field
v-model="possibleValue"
readonly
required
name="level"
label="发生的可能性"
placeholder="请选择"
/>
</template>
</van-popover>
<van-popover v-model="showPopoveSetRank" trigger="click" :actions="columnsSetRank"
@select="onSelectSetRank">
<van-popover
v-model="showPopoveSetRank"
trigger="click"
:actions="columnsSetRank"
@select="onSelectSetRank"
>
<template #reference>
<van-field v-model="severityValue" readonly required name="level" label="后果严重程度" placeholder="请选择" />
<van-field
v-model="severityValue"
readonly
required
name="level"
label="后果严重程度"
placeholder="请选择"
/>
</template>
</van-popover>
</van-collapse-item>
</van-collapse>
<van-row type="flex" justify="center" style="margin-top:10px">
<van-col span="6"><van-button size="small" plain native-type="button" type="info"
@click="showGradeDialog = false">取消</van-button></van-col>
<van-col span="6"><van-button size="small" type="info" native-type="button"
@click="goResultPage">开始测评</van-button></van-col>
<van-col span="6"
><van-button
size="small"
plain
native-type="button"
type="info"
@click="showGradeDialog = false"
>取消</van-button
></van-col
>
<van-col span="6"
><van-button
size="small"
type="info"
native-type="button"
@click="goResultPage"
>开始测评</van-button
></van-col
>
</van-row>
</div>
</van-dialog>
<van-popup v-model="showTrouble" position="bottom">
<van-picker show-toolbar value-key="name" :columns="columnsTrouble" @confirm="onConTrouble"
@cancel="showTrouble = false" />
<van-picker
show-toolbar
value-key="name"
:columns="columnsTrouble"
@confirm="onConTrouble"
@cancel="showTrouble = false"
/>
</van-popup>
<van-popup v-model="showSource" position="bottom">
<van-picker show-toolbar value-key="name" :columns="columnsSource" @confirm="onConSource"
@cancel="showSource = false" />
<van-picker
show-toolbar
value-key="name"
:columns="columnsSource"
@confirm="onConSource"
@cancel="showSource = false"
/>
</van-popup>
<!-- 楼层弹出层 -->
<van-popup v-model="ShowfloorList" position="bottom" :style="{ height: '100%' }">
<selectFloor :listdata="floorSource" @closeSlect="closeSlectfloor" @saveSlect="saveSlectfloor"></selectFloor>
<van-popup
v-model="ShowfloorList"
position="bottom"
:style="{ height: '100%' }"
>
<selectFloor
:listdata="floorSource"
@closeSlect="closeSlectfloor"
@saveSlect="saveSlectfloor"
></selectFloor>
</van-popup>
<!-- 风险源弹出层 -->
<van-popup v-model="ShowSelectList" position="bottom" :style="{ height: '100%' }">
<selectList :listdata="columnsTrouble" @closeSlect="closeSlect" @saveSlect="saveSlect"></selectList>
<van-popup
v-model="ShowSelectList"
position="bottom"
:style="{ height: '100%' }"
>
<selectList
:listdata="columnsTrouble"
@closeSlect="closeSlect"
@saveSlect="saveSlect"
></selectList>
</van-popup>
<!-- 准事故类型 -->
<van-popup v-model="ShowAccidentList" position="bottom" :style="{ height: '100%' }">
<selectList :listdata="columnsAccident" @closeSlect="closeSlectAccident" @saveSlect="saveSlectAccident">
<van-popup
v-model="ShowAccidentList"
position="bottom"
:style="{ height: '100%' }"
>
<selectList
:listdata="columnsAccident"
@closeSlect="closeSlectAccident"
@saveSlect="saveSlectAccident"
>
</selectList>
</van-popup>
<div style="margin: 16px 16px 0">
<van-button round block type="info" native-type="submit">上报</van-button>
<van-button round block type="info" native-type="submit"
>提交</van-button
>
</div>
</van-form>
<div style="margin: 10px 16px 0px; padding-bottom: 16px">
<van-button round block type="warning" @click.native="cancel">取消</van-button>
<van-button round block type="warning" @click.native="cancel"
>取消</van-button
>
</div>
</div>
</template>
......@@ -287,15 +545,15 @@ export default {
});
},
beforeRouteEnter(to, from, next) {
if (from.name == 'riskInherent') {
sessionStorage.setItem('inherenForm', '')
sessionStorage.setItem('level', '')
if (from.name == "riskInherent") {
sessionStorage.setItem("inherenForm", "");
sessionStorage.setItem("level", "");
}
next()
next();
},
beforeRouteLeave(to, from, next) {
if (to.name != "riskInherent") {
sessionStorage.setItem('inherenForm', JSON.stringify(this.form))
sessionStorage.setItem("inherenForm", JSON.stringify(this.form));
}
next();
},
......@@ -391,33 +649,33 @@ export default {
this.form.userId = userInfo.userId;
this.form.userName = userInfo.userName;
this.form.deptName = userInfo.dept.deptName;
(this.form.projectId = "测试项目")
this.form.projectId = "测试项目";
},
mounted() {
if (sessionStorage.getItem('inherenForm') != '') {
this.form = JSON.parse(sessionStorage.getItem('inherenForm'))
this.form.level = sessionStorage.getItem('level')
if (sessionStorage.getItem("inherenForm") != "") {
this.form = JSON.parse(sessionStorage.getItem("inherenForm"));
this.form.level = sessionStorage.getItem("level");
}
this.getFloor()
this.getFXYS()
this.getZSGLX()
this.getFloor();
this.getFXYS();
this.getZSGLX();
},
methods: {
renameKeyInTree(data, oldKey, newKey) {
let arr = data.map(item => {
const newItem = { ...item };
if (item.hasOwnProperty(oldKey)) {
newItem[newKey] = newItem[oldKey];
delete newItem[oldKey];
}
if (newItem.children && newItem.children.length > 0) {
newItem.children = this.renameKeyInTree(newItem.children, oldKey, newKey);
newItem.children = this.renameKeyInTree(
newItem.children,
oldKey,
newKey
);
}
return newItem;
});
......@@ -429,9 +687,9 @@ export default {
.then(res => {
// this.$toast.clear();
// this.showSource = true;
let newArr = this.renameKeyInTree(res.data, 'name', 'text')
this.floorSource = newArr;
let newArr = this.renameKeyInTree(res.data, "name", "text");
this.floorSource = newArr;
})
.catch(() => {
this.$toast.fail("加载失败,请稍后再试");
......@@ -462,9 +720,8 @@ export default {
// loadingType: "spinner",
// duration: 0
// });
this.ShowfloorList = true
this.ShowfloorList = true;
this.userPrefix = name;
},
seletRoom(name) {
this.$toast.loading({
......@@ -488,14 +745,13 @@ export default {
seletFactor(name) {
// this.showTrouble = true;
this.riskName = name;
this.ShowSelectList = true
this.ShowSelectList = true;
},
//准事故类型
seletType(name) {
// this.showTrouble = true;
this.riskName = name;
this.ShowAccidentList = true
this.ShowAccidentList = true;
},
//风险等级
seletGrade(name) {
......@@ -530,25 +786,26 @@ export default {
// })
// },
closeSlectfloor() {
this.ShowfloorList = false
this.ShowfloorList = false;
},
saveSlectfloor(data) {
this.form.floorName = data.text
this.ShowfloorList = false
this.form.floorId = data.id;
this.form.floorName = data.text;
this.ShowfloorList = false;
},
closeSlect() {
this.ShowSelectList = false
this.ShowSelectList = false;
},
saveSlect(data) {
this.form.factor = data.join(',');
this.ShowSelectList = false
this.form.factor = data.join(",");
this.ShowSelectList = false;
},
closeSlectAccident() {
this.ShowAccidentList = false
this.ShowAccidentList = false;
},
saveSlectAccident(data) {
this.form.type = data.join(',');
this.ShowAccidentList = false
this.form.type = data.join(",");
this.ShowAccidentList = false;
},
onSelect(data) {
this.possibleValue = data.text;
......@@ -801,7 +1058,7 @@ export default {
this.$router.push({
name: "riskView",
params: {
floorId: 18,
floorId: this.form.floorId,
isView: false
}
});
......
<template>
<div>
<LHeader :text="text"></LHeader>
<van-form @submit="onSubmit" :scroll-to-error="true" :show-error="false" validate-trigger="onSubmit">
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
风险信息
</div>
<van-field readonly required name="userName" :value="form.userName" label="评估人" placeholder="请输入" />
<van-field readonly required name="projectId" :value="form.projectId" label="所属项目" placeholder="请输入" />
<van-field readonly required name="buildingName" :value="form.buildingName" label="所属建筑物" placeholder="请输入" />
<div>
<LHeader :text="text"></LHeader>
<van-form
@submit="onSubmit"
:scroll-to-error="true"
:show-error="false"
validate-trigger="onSubmit"
>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
风险信息
</div>
<van-field
readonly
required
name="userName"
:value="form.userName"
label="评估人"
placeholder="请输入"
/>
<van-field
readonly
required
name="projectName"
:value="form.projectName"
label="所属项目"
placeholder="请输入"
/>
<van-field
readonly
required
name="buildingName"
:value="form.buildingName"
label="所属建筑物"
placeholder="请输入"
/>
<van-field required clickable name="floorId" :value="form.floorId" label="所属楼层" placeholder="请选择"
@click="seletFloor('floor')" :rules="[{ required: true, message: '所属楼层不能为空' }]" />
<van-field
required
readonly
name="floorName"
:value="form.floorName"
label="所属楼层"
placeholder="请选择"
:rules="[{ required: true, message: '所属楼层不能为空' }]"
/>
<van-field readonly required name="roomName" :value="form.roomName" label="所属房间" placeholder="请输入"
@click="seletRoom('room')" :rules="[{ required: true, message: '所属房间不能为空' }]" />
<van-field
readonly
required
name="roomName"
:value="form.roomName"
label="所属房间"
placeholder="请输入"
:rules="[{ required: true, message: '所属房间不能为空' }]"
/>
<van-field required name="name" v-model="form.name" label="风险源名称" placeholder="请输入"
:rules="[{ required: true, message: '风险源名称不能为空' }]" />
<van-field readonly v-model="form.factor" required name="factor" label="风险因素" placeholder="请选择"
@click="seletFactor('factor')" :rules="[{ required: true, message: '风险因素不能为空' }]" />
<van-field
required
name="name"
v-model="form.name"
label="风险源名称"
placeholder="请输入"
:rules="[{ required: true, message: '风险源名称不能为空' }]"
/>
<van-field
readonly
v-model="form.factor"
required
name="factor"
label="风险因素"
placeholder="请选择"
@click="seletFactor('factor')"
:rules="[{ required: true, message: '风险因素不能为空' }]"
/>
<van-field readonly v-model="form.type" required name="type" label="准事故类型" placeholder="请选择"
@click="seletType('type')" :rules="[{ required: true, message: '准事故类型不能为空' }]" />
<van-field
readonly
v-model="form.type"
required
name="type"
label="准事故类型"
placeholder="请选择"
@click="seletType('type')"
:rules="[{ required: true, message: '准事故类型不能为空' }]"
/>
<!-- <van-field
<!-- <van-field
readonly
v-model="form.level"
required
......@@ -35,24 +102,49 @@
@click="seletGrade('level')"
:rules="[{ required: true, message: '风险等级不能为空' }]"
/> -->
<van-field readonly v-model="form.level" required name="level" label="风险管控措施评价" placeholder="请选择"
@click="seletGrade" :rules="[{ required: true, message: '风险等级不能为空' }]" />
<!-- <van-field
readonly
v-model="form.level"
required
name="level"
label="风险管控措施评价"
placeholder="请选择"
@click="seletGrade"
:rules="[{ required: true, message: '风险等级不能为空' }]"
/> -->
<van-field required name="presenceLocation" v-model="form.presenceLocation" label="存在部位" placeholder="请输入"
:rules="[{ required: true, message: '存在部位不能为空' }]" />
<van-field
required
name="presenceLocation"
v-model="form.presenceLocation"
label="存在部位"
placeholder="请输入"
:rules="[{ required: true, message: '存在部位不能为空' }]"
/>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
风险源图片
</div>
<van-field name="hdPicture1" label="风险源图片">
<template #input>
<van-uploader @delete="deleteFile(...arguments, 'uploaderImg')" multiple :max-count="5"
upload-text="最多上传五个" v-model="uploaderImg">
<template slot="default">
<!-- 11111111111 -->
<div style="
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
风险源图片
</div>
<van-field name="hdPicture1" label="风险源图片">
<template #input>
<van-uploader
@delete="deleteFile(...arguments, 'uploaderImg')"
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="uploaderImg"
>
<template slot="default">
<!-- 11111111111 -->
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -60,28 +152,53 @@
align-items: center;
justify-content: center;
flex-direction: column;
">
<img src="@/assets/upload/pic.png" alt="" style="width: 0.64rem; height: 0.64rem" />
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
技术措施
</div>
<van-field v-model="form.measuresProject" name="measuresProject" label="技术措施" type="textarea" rows="1" autosize
placeholder="请输入" />
<van-field name="measuresProjectFile[]" label=" ">
<template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="measuresProjectFile" accept="file"
result-type="file" @delete="deleteFile(...arguments, 'measuresProjectFile')">
<template slot="default">
<!-- 11111111111 -->
<div style="
"
>
<img
src="@/assets/upload/pic.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
技术措施
</div>
<van-field
v-model="form.measuresProject"
name="measuresProject"
label="技术措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field name="measuresProjectFile[]" label=" ">
<template #input>
<van-uploader
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="measuresProjectFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresProjectFile')"
>
<template slot="default">
<!-- 11111111111 -->
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -89,46 +206,53 @@
align-items: center;
justify-content: center;
flex-direction: column;
">
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
应采取的管控措施
</div>
<van-field v-model="form.measuresAdministration" name="measuresAdministration" label="" type="textarea" rows="3"
autosize placeholder="请输入" />
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
已采取的管控措施
</div>
<van-field v-model="form.measuresAdministration" name="measuresAdministration" label="" type="textarea" rows="3"
autosize placeholder="请输入" />
<van-field readonly required clickable name="trouble" :value="form.trouble" label="管控责任单位" placeholder="请选择"
@click="showTrouble = true" :rules="[{ required: true, message: '管控责任单位不能为空' }]" />
<van-field readonly required clickable name="trouble" :value="form.trouble" label="管控责任人" placeholder="请选择"
@click="showTrouble = true" :rules="[{ required: true, message: '管控责任人不能为空' }]" />
<!-- <div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
管理措施
</div> -->
<!-- <van-field v-model="form.measuresAdministration" name="measuresAdministration" label="管理措施" type="textarea"
rows="1" autosize placeholder="请输入" /> -->
<van-field name="measuresAdministrationFile[]" label=" ">
<template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="measuresAdministrationFile"
accept="file" result-type="file" @delete="deleteFile(...arguments, 'measuresAdministrationFile')">
<template slot="default">
<!-- 11111111111 -->
<div style="
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
管理措施
</div>
<van-field
v-model="form.measuresAdministration"
name="measuresAdministration"
label="管理措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field name="measuresAdministrationFile[]" label=" ">
<template #input>
<van-uploader
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="measuresAdministrationFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresAdministrationFile')"
>
<template slot="default">
<!-- 11111111111 -->
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -136,28 +260,53 @@
align-items: center;
justify-content: center;
flex-direction: column;
">
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
应急措施
</div>
<van-field v-model="form.measuresEmergency" name="measuresEmergency" label="应急措施" type="textarea" rows="1"
autosize placeholder="请输入" />
<van-field name="measuresEmergencyFile[]" label=" ">
<template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="measuresEmergencyFile" accept="file"
result-type="file" @delete="deleteFile(...arguments, 'measuresEmergencyFile')">
<template slot="default">
<!-- 11111111111 -->
<div style="
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
应急措施
</div>
<van-field
v-model="form.measuresEmergency"
name="measuresEmergency"
label="应急措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field name="measuresEmergencyFile[]" label=" ">
<template #input>
<van-uploader
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="measuresEmergencyFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresEmergencyFile')"
>
<template slot="default">
<!-- 11111111111 -->
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -165,21 +314,31 @@
align-items: center;
justify-content: center;
flex-direction: column;
">
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<!-- v-if="this.$route.params.isView" -->
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
参考依据
</div>
<van-field
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<!-- v-if="this.$route.params.isView" -->
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
参考依据
</div>
<!-- <van-field
readonly
required
name="trouble"
......@@ -188,72 +347,156 @@
placeholder="请选择"
@click="showTrouble = true"
:rules="[{ required: true, message: '事故类型不能为空' }]"
/> -->
<van-popup v-model="showTrouble" position="bottom">
<van-picker
show-toolbar
value-key="name"
:columns="columnsTrouble"
@confirm="onConTrouble"
@cancel="showTrouble = false"
/>
</van-popup>
<van-popup v-model="showSource" position="bottom">
<van-picker
show-toolbar
value-key="name"
:columns="columnsSource"
@confirm="onConSource"
@cancel="showSource = false"
/>
</van-popup>
<!-- 楼层弹出层 -->
<van-popup
v-model="ShowfloorList"
position="bottom"
:style="{ height: '100%' }"
>
<selectFloor
:listdata="floorSource"
@closeSlect="closeSlectfloor"
@saveSlect="saveSlectfloor"
></selectFloor>
</van-popup>
<!-- 风险源弹出层 -->
<van-popup
v-model="ShowSelectList"
position="bottom"
:style="{ height: '100%' }"
>
<selectList
:listdata="columnsTrouble"
@closeSlect="closeSlect"
@saveSlect="saveSlect"
></selectList>
</van-popup>
<!-- 准事故类型 -->
<van-popup
v-model="ShowAccidentList"
position="bottom"
:style="{ height: '100%' }"
>
<selectList
:listdata="columnsAccident"
@closeSlect="closeSlectAccident"
@saveSlect="saveSlectAccident"
>
</selectList>
</van-popup>
<!-- v-if="this.$route.params.isView" -->
<div style="margin: 16px 16px 0">
<van-button round block type="info" native-type="submit"
>提交</van-button
>
</div>
</van-form>
<van-dialog
v-model="showGradeDialog"
title="风险评测配置"
:show-cancel-button="false"
:show-confirm-button="false"
>
<div class="dialogContain">
<van-collapse v-model="activeNames">
<van-collapse-item title="风险模型" name="1">
<van-field
readonly
required
name="level"
label="当前风险模型"
placeholder="LS风险矩阵评估模型"
/>
<van-popup v-model="showTrouble" position="bottom">
<van-picker show-toolbar value-key="name" :columns="columnsTrouble" @confirm="onConTrouble"
@cancel="showTrouble = false" />
</van-popup>
<van-popup v-model="showSource" position="bottom">
<van-picker show-toolbar value-key="name" :columns="columnsSource" @confirm="onConSource"
@cancel="showSource = false" />
</van-popup>
<!-- 风险源弹出层 -->
<van-popup v-model="ShowSelectList" position="bottom" :style="{ height: '100%' }">
<selectList :listdata="columnsTrouble" @closeSlect="closeSlect" @saveSlect="saveSlect"></selectList>
</van-popup>
<!-- 准事故类型 -->
<van-popup v-model="ShowAccidentList" position="bottom" :style="{ height: '100%' }">
<selectList :listdata="columnsAccident" @closeSlect="closeSlectAccident" @saveSlect="saveSlectAccident">
</selectList>
</van-popup>
<!-- v-if="this.$route.params.isView" -->
<div style="margin: 16px 16px 0">
<van-button round block type="info" native-type="submit">上报</van-button>
</div>
</van-form>
<van-dialog v-model="showGradeDialog" title="风险评测配置" :show-cancel-button="false" :show-confirm-button="false">
<div class="dialogContain">
<van-collapse v-model="activeNames">
<van-collapse-item title="风险模型" name="1">
<van-field readonly required name="level" label="当前风险模型" placeholder="LS风险矩阵评估模型" />
</van-collapse-item>
<van-collapse-item title="风险模型配置" name="2">
<van-popover v-model="showPopover" trigger="click" :actions="columnsRiskRank" @select="onSelect">
<template #reference>
<van-field v-model="possibleValue" readonly required name="level" label="发生的可能性"
placeholder="请选择" />
</template>
</van-popover>
<van-popover v-model="showPopoveSetRank" trigger="click" :actions="columnsSetRank"
@select="onSelectSetRank">
<template #reference>
<van-field v-model="severityValue" readonly required name="level" label="后果严重程度"
placeholder="请选择" />
</template>
</van-popover>
</van-collapse-item>
</van-collapse>
<van-row type="flex" justify="center" style="margin-top:10px">
<van-col span="6"><van-button size="small" plain type="info"
@click="showGradeDialog = false">取消</van-button></van-col>
<van-col span="6"><van-button size="small" type="info" @click="goResultPage">开始测评</van-button></van-col>
</van-row>
</div>
</van-dialog>
<!-- v-if="this.$route.params.isView" -->
<div style="margin: 10px 16px 0px; padding-bottom: 16px">
<van-button round block type="warning" @click.native="cancel">取消</van-button>
</div>
</van-collapse-item>
<van-collapse-item title="风险模型配置" name="2">
<van-popover
v-model="showPopover"
trigger="click"
:actions="columnsRiskRank"
@select="onSelect"
>
<template #reference>
<van-field
v-model="possibleValue"
readonly
required
name="level"
label="发生的可能性"
placeholder="请选择"
/>
</template>
</van-popover>
<van-popover
v-model="showPopoveSetRank"
trigger="click"
:actions="columnsSetRank"
@select="onSelectSetRank"
>
<template #reference>
<van-field
v-model="severityValue"
readonly
required
name="level"
label="后果严重程度"
placeholder="请选择"
/>
</template>
</van-popover>
</van-collapse-item>
</van-collapse>
<van-row type="flex" justify="center" style="margin-top:10px">
<van-col span="6"
><van-button
size="small"
plain
type="info"
@click="showGradeDialog = false"
>取消</van-button
></van-col
>
<van-col span="6"
><van-button size="small" type="info" @click="goResultPage"
>开始测评</van-button
></van-col
>
</van-row>
</div>
</van-dialog>
<!-- v-if="this.$route.params.isView" -->
<div style="margin: 10px 16px 0px; padding-bottom: 16px">
<van-button round block type="warning" @click.native="cancel"
>取消</van-button
>
</div>
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
import SelectList from "@/components/selectList.vue";
import selectFloor from "@/components/selectFloor.vue";
// import selectPeople from "@/views/riskTask/selectPeople/index.vue";
import { getUserInfo, getLocalUserInfo } from '@/utils/userInfo'
import { getUserInfo, getLocalUserInfo } from "@/utils/userInfo";
import { getFun, postFun } from "@/service/table.js";
// import {
// getFormList,
......@@ -265,502 +508,528 @@ import { getFun, postFun } from "@/service/table.js";
// postRiskShowMeasures,
// } from "@/service/risk";
export default {
name: "addPresent",
components: {
LHeader,
},
activated() {
name: "addPresent",
components: {
LHeader,
selectFloor,
SelectList
},
activated() {},
beforeRouteEnter(to, from, next) {
if (from.name == "addCurrent") {
sessionStorage.setItem("presentForm", "");
sessionStorage.setItem("level", "");
}
next();
},
beforeRouteLeave(to, from, next) {
if (to.name != "riskInherent") {
sessionStorage.setItem("presentForm", JSON.stringify(this.form));
}
next();
},
data() {
return {
ShowfloorList: false,
floorSource: [],
ShowAccidentList: false,
ShowSelectList: false,
columnsAccident: [],
showPopoveSetRank: false,
activeNames: ["1"],
showPopover: false,
showGradeDialog: false,
taskId: "",
text: "添加现状风险",
id: "",
isTimely: 1,
active: 0,
form: {},
projectId: "", // 所属工程
projectName: "", // 所属工程
projectDirectorName: "", // 所属工程
projectDirector: "", // 所属工程
showProjectName: false,
show: false,
columnsProjectName: [],
factor: "", //风险因素
showFactor: false,
source: "", //风险源
userPrefix: "", //风险源
showSource: false,
columnsSource: [],
trouble: "", //事故类型
showTrouble: false,
columnsTrouble: [],
setRank: "", //风险定级
showSetRank: false,
columnsSetRank: ["矩阵式定级", "其他定级方式"],
riskRank: "", // 风险等级
showRiskRank: false,
columnsRiskRank: ["重大风险", "较大风险", "一般风险", "较小风险"],
showSetRankMode: false, // 是否显示定级方式
setRankMode: "", // 定级方式文字
setRankModeImg: [], // 定级方式图片
uploaderImg: [], // 定级方式图片
location: "", //风险部位
control: "", //管控层级
riskName: "", //管控层级
showControl: false,
columnsControl: ["项目级", "企业级"],
mainDutyDept: "", // 主责部门
mainDutyDeptId: "",
showMainDutyDept: false,
columnsMainDutyDept: [],
mainDutyPeopLe: "", // 主责人员
mainDutyPeopLeId: "",
showMainDutyPeopLe: false,
columnsMainDutyPeopLe: [],
technology: "", //技术措施文字
technologyImg: [], //技术措施图片
administration: "", //管理措施文字
measuresAdministrationFile: [], //管理措施图片
measuresProjectFile: [], //管理措施图片
measuresEmergencyFile: [], //管理措施图片
urgent: "", //应急措施文字
urgentImg: [], //应急措施图片
returnCause: "", // 退回原因
isShowreturnCause: false,
possibleValue: "",
possibleScore: 0,
severityValue: "",
severityScore: 0
};
},
created() {
var userInfo = getUserInfo();
this.form.buildingIds =
this.$route.params.buildingId || sessionStorage.getItem("buildingId");
this.form.planId =
this.$route.params.planId || sessionStorage.getItem("planId");
this.form.buildingName =
this.$route.params.buildingName || sessionStorage.getItem("buildingName");
this.form.userId = userInfo.userId;
this.form.userName = userInfo.userName;
this.form.deptName = userInfo.dept.deptName;
this.form.planId = this.$route.params.planId;
this.form.floorId = this.$route.params.floorId;
this.form.floorName = this.$route.params.floorName;
this.form.projectName = this.$route.params.projectName;
this.form.projectId = this.$route.params.projectId;
this.form.roomId = this.$route.params.roomId;
this.form.inherentId = this.$route.params.id;
this.form.roomName = this.$route.params.roomName;
this.form.buildingName = "1号楼";
this.form.userId = userInfo.userId;
this.form.userName = userInfo.userName;
this.form.deptName = userInfo.dept.deptName;
this.form.projectId = "测试项目";
},
mounted() {
// this.getFloor();
this.getFXYS();
this.getZSGLX();
},
methods: {
// getFloor() {
// getFun(`/risk/plan/floor/list/${this.form.buildingIds}`)
// .then(res => {
// // this.$toast.clear();
// // this.showSource = true;
// let newArr = this.renameKeyInTree(res.data, "name", "text");
// this.floorSource = newArr;
// })
// .catch(() => {
// this.$toast.fail("加载失败,请稍后再试");
// });
// },
getFXYS() {
getFun(`/risk/plan/dict/data/list?dictType=risk_plan_factor`)
.then(res => {
this.columnsTrouble = res.data;
})
.catch(() => {
this.$toast.fail("加载失败,请稍后再试");
});
},
getZSGLX() {
getFun(`/risk/plan/dict/data/list?dictType=risk_plan_type`)
.then(res => {
this.columnsAccident = res.data;
})
.catch(() => {
this.$toast.fail("加载失败,请稍后再试");
});
},
seletFloor(name) {
this.ShowfloorList = true;
this.userPrefix = name;
},
seletRoom(name) {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0
});
this.userPrefix = name;
getFun(`/risk/plan/room/list/${this.form.floorId}`)
.then(res => {
this.$toast.clear();
this.showSource = true;
this.columnsSource = res.data;
})
.catch(() => {
this.$toast.fail("加载失败,请稍后再试");
});
},
//风险因素
seletFactor(name) {
// this.showTrouble = true;
this.riskName = name;
this.ShowSelectList = true;
},
//准事故类型
seletType(name) {
// this.showTrouble = true;
this.riskName = name;
this.ShowAccidentList = true;
},
seletGrade(name) {
this.getGradeList("possibility");
this.getGradeList("severity");
this.showGradeDialog = true;
},
beforeRouteEnter(to, from, next) {
if (from.name == 'addCurrent') {
sessionStorage.setItem('presentForm', '')
sessionStorage.setItem('level', '')
//风险模型配置
getGradeList(type) {
// possibility 可能性 severity 严重性
getFun(`/risk/plan/matrix/${type}/list`).then(res => {
let arr = [];
res.data.forEach(item => {
arr.push({
text: item.title,
type: item.type,
sort: item.sort,
score: item.score
});
});
if (type === "possibility") {
this.columnsRiskRank = arr;
} else {
this.columnsSetRank = arr;
}
next()
});
},
beforeRouteLeave(to, from, next) {
if (to.name != "riskInherent") {
sessionStorage.setItem('presentForm', JSON.stringify(this.form))
closeSlectfloor() {
this.ShowfloorList = false;
},
saveSlectfloor(data) {
this.form.floorId = data.id;
this.form.floorName = data.text;
this.ShowfloorList = false;
},
closeSlect() {
this.ShowSelectList = false;
},
saveSlect(data) {
this.form.factor = data.join(",");
this.ShowSelectList = false;
},
closeSlectAccident() {
this.ShowAccidentList = false;
},
saveSlectAccident(data) {
this.form.type = data.join(",");
this.ShowAccidentList = false;
},
onSelect(data) {
this.possibleValue = data.text;
this.possibleScore = data.score;
},
onSelectSetRank(data) {
this.severityValue = data.text;
this.severityScore = data.score;
},
//开始测评
goResultPage() {
this.$router.replace({
name: "resultPage",
params: {
score: this.severityScore * this.possibleScore
}
next();
},
data() {
return {
ShowAccidentList: false,
ShowSelectList: false,
columnsAccident: [],
showPopoveSetRank: false,
activeNames: ["1"],
showPopover: false,
showGradeDialog: false,
taskId: "",
text: "添加现状风险",
id: "",
isTimely: 1,
active: 0,
form: {
},
projectId: "", // 所属工程
projectName: "", // 所属工程
projectDirectorName: "", // 所属工程
projectDirector: "", // 所属工程
showProjectName: false,
show: false,
columnsProjectName: [],
factor: "", //风险因素
showFactor: false,
source: "", //风险源
userPrefix: "", //风险源
showSource: false,
columnsSource: [],
trouble: "", //事故类型
showTrouble: false,
columnsTrouble: [],
setRank: "", //风险定级
showSetRank: false,
columnsSetRank: ["矩阵式定级", "其他定级方式"],
riskRank: "", // 风险等级
showRiskRank: false,
columnsRiskRank: ["重大风险", "较大风险", "一般风险", "较小风险"],
showSetRankMode: false, // 是否显示定级方式
setRankMode: "", // 定级方式文字
setRankModeImg: [], // 定级方式图片
uploaderImg: [], // 定级方式图片
location: "", //风险部位
control: "", //管控层级
riskName: "", //管控层级
showControl: false,
columnsControl: ["项目级", "企业级"],
mainDutyDept: "", // 主责部门
mainDutyDeptId: "",
showMainDutyDept: false,
columnsMainDutyDept: [],
mainDutyPeopLe: "", // 主责人员
mainDutyPeopLeId: "",
showMainDutyPeopLe: false,
columnsMainDutyPeopLe: [],
technology: "", //技术措施文字
technologyImg: [], //技术措施图片
administration: "", //管理措施文字
measuresAdministrationFile: [], //管理措施图片
measuresProjectFile: [], //管理措施图片
measuresEmergencyFile: [], //管理措施图片
urgent: "", //应急措施文字
urgentImg: [], //应急措施图片
returnCause: "", // 退回原因
isShowreturnCause: false,
possibleValue: "",
possibleScore: 0,
severityValue: "",
severityScore: 0,
};
},
created() {
var userInfo = getUserInfo()
this.form.buildingIds = this.$route.params.id
this.form.planId = this.$route.params.planId
this.form.floorId = this.$route.params.floorId
this.form.roomId = this.$route.params.roomId
this.form.inherentId = this.$route.params.id
this.form.roomName = this.$route.params.roomName
this.form.buildingName = '1号楼'
this.form.userId = userInfo.userId
this.form.userName = userInfo.userName
this.form.deptName = userInfo.dept.deptName
this.form.projectId = '测试项目'
});
},
mounted() {
if (sessionStorage.getItem('presentForm') != '') {
this.form = JSON.parse(sessionStorage.getItem('presentForm'))
this.form.level = sessionStorage.getItem('level')
performTasks() {},
// 点击预览图
clickPre(e) {
console.log(e);
if (e.filePath) {
this.videoUrl = e.filePath;
} else {
this.videoUrl = e.content;
}
},
async deleteFile(val, detail, key) {
// console.log(val,detail)
if (val.fileId) {
let formdata = new FormData();
formdata.append("key", val["fileId"]);
let res = await postFun("/mobile/remove", formdata);
if (res) {
console.log(res);
this.$toast({
title: "提示",
message: "删除成功!"
});
} else {
console.log("删除失败");
this[key].splice(detail.index, 0, val);
}
this.getFXYS();
this.getZSGLX();
},
methods: {
getFXYS() {
getFun(`/risk/plan/dict/data/list?dictType=risk_plan_factor`)
.then(res => {
this.columnsTrouble = res.data;
})
.catch(() => {
this.$toast.fail("加载失败,请稍后再试");
});
},
getZSGLX() {
getFun(`/risk/plan/dict/data/list?dictType=risk_plan_type`)
.then(res => {
this.columnsAccident = res.data;
})
.catch(() => {
this.$toast.fail("加载失败,请稍后再试");
});
},
seletFloor(name) {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
this.userPrefix = name
getFun(`/risk/plan/floor/list/${this.form.buildingIds}`).then((res) => {
this.$toast.clear()
this.showSource = true
this.columnsSource = res.data
}).catch(() => {
this.$toast.fail("加载失败,请稍后再试");
});
},
seletRoom(name) {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
this.userPrefix = name
getFun(`/risk/plan/room/list/${this.form.floorId}`).then((res) => {
this.$toast.clear()
this.showSource = true
this.columnsSource = res.data
}).catch(() => {
this.$toast.fail("加载失败,请稍后再试");
});
},
//风险因素
seletFactor(name) {
// this.showTrouble = true;
this.riskName = name;
this.ShowSelectList = true
},
//准事故类型
seletType(name) {
// this.showTrouble = true;
this.riskName = name;
this.ShowAccidentList = true
},
seletGrade(name) {
this.getGradeList('possibility')
this.getGradeList('severity')
this.showGradeDialog = true
},
//风险模型配置
getGradeList(type) {
// possibility 可能性 severity 严重性
getFun(`/risk/plan/matrix/${type}/list`).then(res => {
let arr = []
res.data.forEach(item => {
arr.push({ text: item.title, type: item.type, sort: item.sort, score: item.score })
})
if (type === 'possibility') {
this.columnsRiskRank = arr
} else {
this.columnsSetRank = arr
}
})
},
closeSlect() {
this.ShowSelectList = false
},
saveSlect(data) {
this.form.factor = data.join(',');
this.ShowSelectList = false
},
closeSlectAccident() {
this.ShowAccidentList = false
},
saveSlectAccident(data) {
this.form.type = data.join(',');
this.ShowAccidentList = false
},
onSelect(data) {
this.possibleValue = data.text
this.possibleScore = data.score
},
onSelectSetRank(data) {
this.severityValue = data.text
this.severityScore = data.score
},
//开始测评
goResultPage() {
this.$router.push({
name: 'resultPage',
params: {
score: this.severityScore * this.possibleScore
}
})
},
performTasks() {
},
// 点击预览图
clickPre(e) {
console.log(e);
if (e.filePath) {
this.videoUrl = e.filePath;
} else {
this.videoUrl = e.content;
}
},
async deleteFile(val, detail, key) {
// console.log(val,detail)
if (val.fileId) {
let formdata = new FormData();
formdata.append("key", val["fileId"]);
let res = await postFun("/mobile/remove", formdata);
if (res) {
console.log(res);
this.$toast({
title: "提示",
message: "删除成功!",
});
} else {
console.log("删除失败");
this[key].splice(detail.index, 0, val);
}
}
},
jsonToFormData(config) {
const formData = new FormData();
//循环传入的值转换formData
Object.keys(config).forEach((key) => {
formData.append(key, config[key]);
})
return formData;
},
onSubmit(values) {
// console.log('%c [ values ]-592', 'font-size:13px; background:pink; color:#bf2c9f;', values)
var formDataJson = this.jsonToFormData(this.form)
// let url = "/risk/plan/inherent";
let url = "/risk/plan/existing";
values.hdPicture1.forEach((item) => {
if (item.file) {
formDataJson.append("pictureFile[]", item.file);
} else {
formDataJson.append("pictureFile[]", item.fileId);
}
});
values['measuresProjectFile[]'].forEach((item) => {
if (item.file) {
formDataJson.append("measuresProjectFile[]", item.file);
} else {
formDataJson.append("measuresProjectFile[]", item.fileId);
}
});
values['measuresEmergencyFile[]'].forEach((item) => {
if (item.file) {
formDataJson.append("measuresEmergencyFile[]", item.file);
} else {
formDataJson.append("measuresEmergencyFile[]", item.fileId);
}
});
values['measuresAdministrationFile[]'].forEach((item) => {
if (item.file) {
formDataJson.append("measuresAdministrationFile[]", item.file);
} else {
formDataJson.append("measuresAdministrationFile[]", item.fileId);
}
});
postFun(url, formDataJson)
.then((res) => {
this.$toast.clear();
this.$toast.success({
message: "提交成功",
duration: 2000,
});
history.go(-1);
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("提交失败,请稍后再试");
});
this.$toast.clear();
},
// 请求已退回详情数据
postReturnEcho() {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
postriskConiCause(`/riskMain/edit/${this.taskId}`)
.then((res) => {
console.log('%c [ res ]-332', 'font-size:13px; background:pink; color:#bf2c9f;', res)
})
.catch(() => {
this.$toast.clear();
});
},
}
},
jsonToFormData(config) {
const formData = new FormData();
//循环传入的值转换formData
Object.keys(config).forEach(key => {
formData.append(key, config[key]);
});
return formData;
},
onSubmit(values) {
// console.log('%c [ values ]-592', 'font-size:13px; background:pink; color:#bf2c9f;', values)
var formDataJson = this.jsonToFormData(this.form);
// let url = "/risk/plan/inherent";
let url = "/risk/plan/existing";
values.hdPicture1.forEach(item => {
if (item.file) {
formDataJson.append("pictureFile[]", item.file);
} else {
formDataJson.append("pictureFile[]", item.fileId);
}
});
values["measuresProjectFile[]"].forEach(item => {
if (item.file) {
formDataJson.append("measuresProjectFile[]", item.file);
} else {
formDataJson.append("measuresProjectFile[]", item.fileId);
}
});
values["measuresEmergencyFile[]"].forEach(item => {
if (item.file) {
formDataJson.append("measuresEmergencyFile[]", item.file);
} else {
formDataJson.append("measuresEmergencyFile[]", item.fileId);
}
});
values["measuresAdministrationFile[]"].forEach(item => {
if (item.file) {
formDataJson.append("measuresAdministrationFile[]", item.file);
} else {
formDataJson.append("measuresAdministrationFile[]", item.fileId);
}
});
postFun(url, formDataJson)
.then(res => {
this.$toast.clear();
this.$toast.success({
message: "提交成功",
duration: 2000
});
history.go(-1);
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("提交失败,请稍后再试");
});
this.$toast.clear();
},
// 所属项目
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 = "";
this.trouble = "";
// 请求风险源
postHdSource(`/riskMain/showSourceName?factorType=${this.factor}`).then(
(res) => {
this.columnsSource = res.data;
}
);
},
// 风险源
onConSource(value) {
if (!value) {
this.showSource = false;
return;
}
this.form[this.userPrefix + "Id"] = value.id;
this.form[this.userPrefix + "Name"] = value.name;
this.showSource = false;
},
// 事故类型
onConTrouble(value) {
console.log('%c [ value ]-653', 'font-size:13px; background:pink; color:#bf2c9f;', value)
if (!value) {
this.showTrouble = false;
return;
}
this.form[this.riskName] = value.name;
this.showTrouble = false;
// 请求已退回详情数据
postReturnEcho() {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0
});
postriskConiCause(`/riskMain/edit/${this.taskId}`)
.then(res => {
console.log(
"%c [ res ]-332",
"font-size:13px; background:pink; color:#bf2c9f;",
res
);
})
.catch(() => {
this.$toast.clear();
});
},
},
// 风险定级
onConSetRank(value) {
this.showSetRank = false;
this.setRank = value;
this.riskRank = "";
if (this.setRank == "矩阵式定级") {
this.showSetRank = false;
this.$router.push({
name: "matrix-grad",
});
}
},
// 自己定义风险等级点击方法
myRiskRank() {
if (this.setRank == "") {
this.$toast("请先选择风险定级");
} else if (this.setRank == "其他定级方式") {
this.showRiskRank = true;
}
},
// 风险等级
onConRiskRank(value) {
this.riskRank = value;
this.showRiskRank = false;
},
// 所属项目
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 = "";
this.trouble = "";
// 请求风险源
postHdSource(`/riskMain/showSourceName?factorType=${this.factor}`).then(
res => {
this.columnsSource = res.data;
}
);
},
// 风险源
onConSource(value) {
if (!value) {
this.showSource = false;
return;
}
this.form[this.userPrefix + "Id"] = value.id;
this.form[this.userPrefix + "Name"] = value.name;
this.showSource = false;
},
// 事故类型
onConTrouble(value) {
console.log(
"%c [ value ]-653",
"font-size:13px; background:pink; color:#bf2c9f;",
value
);
if (!value) {
this.showTrouble = false;
return;
}
this.form[this.riskName] = value.name;
this.showTrouble = false;
},
// 风险定级
onConSetRank(value) {
this.showSetRank = false;
this.setRank = value;
this.riskRank = "";
if (this.setRank == "矩阵式定级") {
this.showSetRank = false;
this.$router.push({
name: "matrix-grad"
});
}
},
// 自己定义风险等级点击方法
myRiskRank() {
if (this.setRank == "") {
this.$toast("请先选择风险定级");
} else if (this.setRank == "其他定级方式") {
this.showRiskRank = true;
}
},
// 风险等级
onConRiskRank(value) {
this.riskRank = value;
this.showRiskRank = false;
},
// 管控层级
onConControl(value) {
this.control = value;
this.showControl = false;
},
// 主责部门
onConMainDutyDept(value) {
this.mainDutyDeptId = value.deptId;
this.mainDutyDept = value.deptName;
this.showMainDutyDept = false;
this.mainDutyPeopLe = "";
// 请求主责人员
let formdata = new FormData();
formdata.append("organizationId", this.mainDutyDeptId);
postHdPeople(`/riskMain/getUserList`, formdata).then((res) => {
this.columnsMainDutyPeopLe = res.data;
});
},
// 主责人员
onConMainDutyPeopLe(value) {
this.mainDutyPeopLeId = value.userId;
this.mainDutyPeopLe = value.userName;
this.showMainDutyPeopLe = false;
},
// 管控层级
onConControl(value) {
this.control = value;
this.showControl = false;
},
// 主责部门
onConMainDutyDept(value) {
this.mainDutyDeptId = value.deptId;
this.mainDutyDept = value.deptName;
this.showMainDutyDept = false;
this.mainDutyPeopLe = "";
// 请求主责人员
let formdata = new FormData();
formdata.append("organizationId", this.mainDutyDeptId);
postHdPeople(`/riskMain/getUserList`, formdata).then(res => {
this.columnsMainDutyPeopLe = res.data;
});
},
// 主责人员
onConMainDutyPeopLe(value) {
this.mainDutyPeopLeId = value.userId;
this.mainDutyPeopLe = value.userName;
this.showMainDutyPeopLe = false;
},
cancel() {
this.$router.go(-1);
},
cancel() {
this.$router.go(-1);
},
// 选择作业人
goSelPeoTwo(val) {
this.peopleName = val
this.show = true;
},
onClose() {
this.show = false;
},
onSave(e) {
this.projectDirector = e[0].loginName
this.projectDirectorName = e[0].userName
this.show = false;
},
},
watch: {
// setRank(newVal, oldVal) {
// if (newVal == "其他定级方式") {
// this.showSetRankMode = true;
// } else {
// this.showSetRankMode = false;
// }
// },
// 选择作业人
goSelPeoTwo(val) {
this.peopleName = val;
this.show = true;
},
onClose() {
this.show = false;
},
onSave(e) {
this.projectDirector = e[0].loginName;
this.projectDirectorName = e[0].userName;
this.show = false;
}
},
watch: {
// setRank(newVal, oldVal) {
// if (newVal == "其他定级方式") {
// this.showSetRankMode = true;
// } else {
// this.showSetRankMode = false;
// }
// },
}
};
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
.con-list {
padding: 0;
background-color: #f0f1f5;
padding: 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
.van-overlay {
position: absolute;
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
</style>
......@@ -205,9 +205,13 @@
</van-checkbox-group>
</div>
<div style="display: flex;justify-content: space-around;">
<van-button native-type="button" type="primary" v-on:click="checkAll">全选</van-button>
<van-button native-type="button" type="info" @click="toggleAll">反选</van-button>
</div>
<van-button native-type="button" type="primary" v-on:click="checkAll"
>全选</van-button
>
<van-button native-type="button" type="info" @click="toggleAll"
>反选</van-button
>
</div>
</van-popup>
<!-- 选择项目小组 -->
......@@ -243,7 +247,7 @@
<!-- 选择时间弹出层 -->
<van-popup v-model="showTime" position="bottom">
<van-datetime-picker
type="datetime"
type="date"
@confirm="onConTime"
@cancel="showTime = false"
:min-date="minDate"
......@@ -253,7 +257,7 @@
<div style="margin: 16px 16px 0">
<van-button round block type="info" native-type="submit"
>上报</van-button
>提交</van-button
>
</div>
</van-form>
......@@ -374,7 +378,7 @@ export default {
"font-size:13px; background:pink; color:#bf2c9f;",
date
);
let time = timestampToTime(date, "DT1", true);
let time = timestampToTime(date, "DT2", true);
this.form[this.timeName] = time;
this.showTime = false;
},
......
......@@ -8,12 +8,32 @@
<van-tabs v-model="active" @change="tabList" color="#2980f7" animated>
<van-tab :title="buildingName">
<van-dropdown-menu z-index="1000">
<van-dropdown-item v-model="value0" @change="changeBuild" :options="option0" get-container="body" />
<van-dropdown-item v-model="value1" @change="changeFloor" :options="option1" get-container="body" />
<van-dropdown-item v-model="value2" @change="changeRoom" :options="option2" get-container="body" />
<van-dropdown-item
v-model="value0"
@change="changeBuild"
:options="option0"
get-container="body"
/>
<van-dropdown-item
v-model="value1"
@change="changeFloor"
:options="option1"
get-container="body"
/>
<van-dropdown-item
v-model="value2"
@change="changeRoom"
:options="option2"
get-container="body"
/>
</van-dropdown-menu>
<div class="con-list">
<van-cell-group inset v-for="(item, index) in messageList" :key="index" @click="touchstart(index, item)">
<van-cell-group
inset
v-for="(item, index) in messageList"
:key="index"
@click="touchstart(index, item)"
>
<div style="font-size: 0.45rem;padding: 5px 0;">
{{ item.name }}
</div>
......@@ -40,27 +60,33 @@
</van-row>
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null">
<van-button round type="primary" @click="goDetail(item)">编辑</van-button>
<van-button round type="primary" @click="goDetail(item)"
>编辑</van-button
>
<!-- <van-button round type="info" @click="goConfirm(item)" v-show="active==0"
>确认</van-button
> -->
</div>
</van-overlay>
</van-cell-group>
<div style="
<div
style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
" v-if="messageList['length'] == 0">
"
v-if="messageList['length'] == 0"
>
暂无数据
</div>
</div>
</van-tab>
</van-tabs>
</div>
<div style="display: flex;
<div
style="display: flex;
justify-content: space-around;
background-color: #fff;
border-top: 1px solid #e3e3e3;
......@@ -68,12 +94,19 @@
width: 100%;
text-align: center;
position: fixed;
bottom: 0;">
<div @click="performTasks" style="color: #4bced0;font-size: 14px;font-weight: 600;">
bottom: 0;"
>
<div
@click="performTasks"
style="color: #4bced0;font-size: 14px;font-weight: 600;"
>
<div style="font-size: 22px;"><van-icon name="plus" /></div>
<div>新增固有风险</div>
</div>
<div @click="endTasks" style="color: #D9001B;font-size: 14px;font-weight: 600;">
<div
@click="endTasks"
style="color: #D9001B;font-size: 14px;font-weight: 600;"
>
<div style="font-size: 22px;"><van-icon name="cross" /></div>
<div>任务执行结束</div>
</div>
......@@ -82,14 +115,14 @@
</template>
<script>
import { Dialog } from 'vant';
import { Dialog } from "vant";
import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
import { timestampToTime, generateId } from "@/utils/format";
export default {
name: "risk-confirme",
components: {
LHeader,
LHeader
},
data() {
return {
......@@ -98,10 +131,10 @@ export default {
planId: 0,
buildingId: 0,
buildingName: "",
value0:'',
value0: "",
value1: 0,
value2: 0,
option0:[],
option0: [],
option1: [],
option2: [],
isHaveNews: false,
......@@ -112,13 +145,15 @@ export default {
active: 1,
form: {},
tabs: [],
floorListData:[]
floorListData: []
};
},
created() {
this.planId = this.$route.params.id || sessionStorage.getItem("planId");
this.buildingId = this.$route.params.buildingId || sessionStorage.getItem("buildingId");
this.buildingName = this.$route.params.buildingName || sessionStorage.getItem("buildingName");
this.buildingId =
this.$route.params.buildingId || sessionStorage.getItem("buildingId");
this.buildingName =
this.$route.params.buildingName || sessionStorage.getItem("buildingName");
this.getRiskList(this.planId);
// this.postList();
},
......@@ -138,9 +173,9 @@ export default {
},
//新增固有风险
performTasks() {
sessionStorage.setItem('buildingId', this.buildingId)
sessionStorage.setItem('planId', this.planId)
sessionStorage.setItem('buildingName', this.buildingName)
sessionStorage.setItem("buildingId", this.buildingId);
sessionStorage.setItem("planId", this.planId);
sessionStorage.setItem("buildingName", this.buildingName);
this.$router.push({
name: "addInherent",
......@@ -156,29 +191,28 @@ export default {
endTasks() {
//toDo
Dialog.confirm({
title: '任务执行结束',
message: '是否任务执行结束',
title: "任务执行结束",
message: "是否任务执行结束"
})
.then(() => {
postFun(
`/risk/plan/submit/${this.planId}/${this.buildingId}`
).then(res => {
// Dialog.alert({
// title: '任务执行结束',
// message: res.msg,
// }).then(() => {
// resolve(res.data);
this.$toast.success(res.msg)
this.$router.push({
name: 'riskAssess'
})
// });
})
postFun(`/risk/plan/submit/${this.planId}/${this.buildingId}`).then(
res => {
// Dialog.alert({
// title: '任务执行结束',
// message: res.msg,
// }).then(() => {
// resolve(res.data);
this.$toast.success(res.msg);
this.$router.push({
name: "riskAssess"
});
// });
}
);
})
.catch(() => {
// on cancel
});
},
handadd() {
this.$router.push({
......@@ -193,10 +227,12 @@ export default {
return new Promise((resolve, reject) => {
getFun(`/risk/plan/floor/list/${id}`)
.then(res => {
this.floorListData = res.data
this.option0 = this.changeData(res.data)
this.value0 = res.data[0].name || ''
this.changeBuild(res.data[0].name )
this.floorListData = res.data;
this.changeBuild(res.data[0].name);
this.option0 = this.changeData(res.data);
this.value0 = res.data[0].name || "";
console.log(this.value0, 222);
this.changeBuild();
})
.catch(() => {
this.$toast.fail("加载失败,请稍后再试");
......@@ -209,7 +245,14 @@ export default {
.then(res => {
this.option2 = this.changeData(res.data);
this.value2 = res.data[0].id || 0;
console.log(this.value2, "vlaue2");
resolve(res.data);
let risk = this.riskList(
this.planId,
this.buildingId,
this.value1,
this.value2
);
})
.catch(() => {
this.$toast.fail("加载失败,请稍后再试");
......@@ -237,35 +280,46 @@ export default {
});
});
},
async getRiskList(id) {
getRiskList(id) {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0
});
let floor = await this.floorList(this.buildingId);
let room = await this.roomList(floor[0].id);
let risk = await this.riskList(id, this.buildingId);
let floor = this.floorList(this.buildingId);
let risk = this.riskList(
this.planId,
this.buildingId,
this.value1,
this.value2
);
this.$toast.clear();
},
async tabList(value) {
let floor = await this.floorList(value);
let room = await this.roomList(floor[0].id);
let risk = await this.riskList(this.planId, value);
},
changeBuild(name){
let arr = this.floorListData.map((item)=>{
if(item.name == name){
return item.children
}
});
this.option1 = this.changeData(arr[0])
this.value1 = this.changeData(arr[0]).id
changeBuild() {
if (this.value0) {
console.log(this.floorListData, this.value0, 111);
let arr = this.floorListData.filter(item => item.name == this.value0)[0]
.children;
console.log(arr);
this.option1 = this.changeData(arr);
this.value1 = arr[0].id;
this.roomList(this.value1);
}
},
async changeFloor() {
let room = await this.roomList(this.value1);
let risk = await this.riskList(this.planId, this.buildingId, this.value1, this.value2);
let risk = await this.riskList(
this.planId,
this.buildingId,
this.value1,
this.value2
);
},
async changeRoom() {
let risk = await this.riskList(
......@@ -287,10 +341,10 @@ export default {
},
// 详情
goDetail(data) {
sessionStorage.setItem('buildingId', this.buildingId)
sessionStorage.setItem('planId', this.planId)
sessionStorage.setItem('buildingName', this.buildingName)
sessionStorage.setItem('inherentId', data.businessId || data.id)
sessionStorage.setItem("buildingId", this.buildingId);
sessionStorage.setItem("planId", this.planId);
sessionStorage.setItem("buildingName", this.buildingName);
sessionStorage.setItem("inherentId", data.businessId || data.id);
this.$router.push({
name: "addCurrent",
params: {
......
......@@ -179,7 +179,7 @@
<van-col span="5">
<van-image
width="46"
height="76"
height="74"
src="http://rongtongpc.censoft.com.cn/dev-api/profile/upload/2023/07/08/guyou.png"
/>
<!-- <van-image width="46" height="46" :src="item.avatar" /> -->
......@@ -191,11 +191,11 @@
</van-row>
<van-row gutter="">
<van-col span="9">风险等级:</van-col>
<van-col span="15">{{ item.level}}</van-col>
<van-col span="15">{{ item.level }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="9">上报时间:</van-col>
<van-col span="15">{{timestampToTimes(item.createTime, 'DT2') }}</van-col>
<van-col span="15">{{ timestampToTimes(item.createTime, "DT2") }}</van-col>
</van-row>
</van-col>
</van-col>
......@@ -236,15 +236,22 @@
<van-col span="7"
><span class="field-title">任务节点:</span></van-col
>
<van-col span="17">{{ item.taskName }}{{
item.taskResult && item.taskResult == 1 ? "(审批通过)" : "(审批否决)"
}}</van-col>
<van-col span="17"
>{{ item.taskName
}}{{
item.taskResult
? item.taskResult == 1
? "(审批通过)"
: "(审批否决)"
: ""
}}</van-col
>
</van-row>
<van-row v-show="item.taskResult">
<van-col span="7"
><span class="field-title">审批意见:</span></van-col
>
<van-col span="17">{{item.taskOpinion}}</van-col>
<van-col span="17">{{ item.taskOpinion }}</van-col>
</van-row>
<!-- <van-row>
<van-col span="7"
......@@ -261,7 +268,7 @@
</van-cell-group>
</div>
</van-tab>
<van-tab title="风险评估报告">
<van-tab title="评估报告">
<div
style="height: 1.5rem;
background-color: #fff;
......@@ -766,7 +773,7 @@ export default {
name: "taskDetail",
params: {
id: item.id,
floorId:item.floorId
floorId: item.floorId
}
});
}
......
......@@ -145,7 +145,7 @@ export default {
},
methods: {
timestampToTimes(time) {
return timestampToTime(new Date(time), "DT1", true);
return timestampToTime(new Date(time), "DT2", true);
},
handadd() {
this.$router.push({
......@@ -200,6 +200,7 @@ export default {
});
sessionStorage.setItem("pathAuth", "riskManage");
sessionStorage.setItem("planId", data.id);
sessionStorage.setItem("buildingId", "");
this.showIndex = null;
},
// 确认
......
......@@ -4,34 +4,48 @@
<LHeader :text="text"></LHeader>
</van-sticky>
<van-sticky offset-top="1.5rem">
<van-search v-model="searchValue" show-action placeholder="请输入搜索内容" @search="onSearch">
<van-search
v-model="searchValue"
show-action
placeholder="请输入搜索内容"
@search="onSearch"
>
<template #action>
<div @click="onSearch">搜索</div>
</template>
</van-search>
</van-sticky>
<div class="con-list">
<van-cell-group v-for="(item, index) in taskList" :key="index" inset @click="touchstart(index, item)">
<van-cell-group
v-for="(item, index) in taskList"
:key="index"
inset
@click="touchstart(index, item)"
>
<div style="font-size: 0.45rem;padding: 5px 0;">{{ item.name }}</div>
<van-row gutter="">
<van-col span="17">
<van-row gutter="">
<van-col span="9">发起时间:</van-col>
<van-col span="15">{{ timestampToTimes(item.startTime) }}</van-col>
<van-col span="15">{{
timestampToTimes(item.startTime)
}}</van-col>
</van-row>
<van-row gutter="">
<van-col span="9">处理人员:</van-col>
<van-col span="15">{{ item.leaderUserName }}</van-col>
</van-row>
</van-col>
<van-col span="7" :style="{ 'color': '#03b615' }">
<van-col span="7" :style="{ color: '#03b615' }">
{{ item.state }}
</van-col>
</van-row>
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null">
<van-button round type="primary" @click="goDetail(item)">详情</van-button>
<van-button round type="primary" @click="goDetail(item)"
>详情</van-button
>
</div>
</van-overlay>
</van-cell-group>
......@@ -86,7 +100,8 @@ export default {
id: item.id,
},
});
sessionStorage.setItem("buildingId", "");
},
onSearch(searchValue) {
......
<template>
<div>
<van-sticky offset-top="0">
<LHeader :text="text"></LHeader>
</van-sticky>
<van-form :scroll-to-error="true" :show-error="false" validate-trigger="onSubmit">
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
风险信息
</div>
<van-field readonly required label="评估人" placeholder="请输入" />
<van-field readonly required label="所属项目" placeholder="请输入" />
<van-field readonly required label="所属建筑物" placeholder="请输入" />
<div>
<van-sticky offset-top="0">
<LHeader :text="text"></LHeader>
</van-sticky>
<van-form
:scroll-to-error="true"
:show-error="false"
validate-trigger="onSubmit"
>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
风险信息
</div>
<van-field readonly required label="评估人" placeholder="请输入" />
<van-field readonly required label="所属项目" placeholder="请输入" />
<van-field readonly required label="所属建筑物" placeholder="请输入" />
<van-field required name="floorId" label="所属楼层" placeholder="请选择"
:rules="[{ required: true, message: '所属楼层不能为空' }]" />
<div style="display: flex;">
<van-field readonly required name="roomName" label="所属房间" placeholder="请输入"
:rules="[{ required: true, message: '所属房间不能为空' }]" />
<!-- <van-button style="color: #cccc;background-color: #f0f1f5;" icon="plus" type="info" /> -->
</div>
<van-field required name="name" label="风险源名称" placeholder="请输入"
:rules="[{ required: true, message: '风险源名称不能为空' }]" />
<van-field required name="factor" label="风险因素" placeholder="请选择"
:rules="[{ required: true, message: '风险因素不能为空' }]" />
<van-field required name="type" label="准事故类型" placeholder="请选择"
:rules="[{ required: true, message: '准事故类型不能为空' }]" />
<van-field
required
clickable
name="floorName"
label="所属楼层"
placeholder="请选择"
:rules="[{ required: true, message: '所属楼层不能为空' }]"
/>
<div style="display: flex;">
<van-field
readonly
required
name="roomName"
label="所属房间"
placeholder="请输入"
:rules="[{ required: true, message: '所属房间不能为空' }]"
/>
<!-- <van-button style="color: #cccc;background-color: #f0f1f5;" icon="plus" type="info" /> -->
</div>
<van-field
required
clickable
name="name"
label="风险源名称"
placeholder="请输入"
:rules="[{ required: true, message: '风险源名称不能为空' }]"
/>
<van-field
required
name="factor"
label="风险因素"
placeholder="请选择"
:rules="[{ required: true, message: '风险因素不能为空' }]"
/>
<van-field
required
name="type"
label="准事故类型"
placeholder="请选择"
:rules="[{ required: true, message: '准事故类型不能为空' }]"
/>
<van-field required name="presenceLocation" label="存在部位" placeholder="请输入"
:rules="[{ required: true, message: '存在部位不能为空' }]" />
<van-field readonly required name="level" label="风险管控措施评价" placeholder="请选择"
:rules="[{ required: true, message: '风险等级不能为空' }]" />
<van-field
required
name="presenceLocation"
label="存在部位"
placeholder="请输入"
:rules="[{ required: true, message: '存在部位不能为空' }]"
/>
<van-field
readonly
required
name="level"
label="风险管控措施评价"
placeholder="请选择"
:rules="[{ required: true, message: '风险等级不能为空' }]"
/>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
风险源图片
</div>
<van-field name="hdPicture1" label="风险源图片">
<template #input>
<van-uploader multiple :max-count="5" disabled upload-text="最多上传五个" v-model="uploaderImg">
<template slot="default">
<div style="
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
风险源图片
</div>
<van-field name="hdPicture1" label="风险源图片">
<template #input>
<van-uploader
multiple
:max-count="5"
disabled
upload-text="最多上传五个"
v-model="uploaderImg"
>
<template slot="default">
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -49,26 +109,53 @@
align-items: center;
justify-content: center;
flex-direction: column;
">
<img src="@/assets/upload/pic.png" alt="" style="width: 0.64rem; height: 0.64rem" />
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
现有技术措施
</div>
<van-field disabled name="measuresProject" label="技术措施" type="textarea" rows="1" autosize placeholder="请输入" />
<van-field name="measuresProjectFile[]" label=" ">
<template #input>
<van-uploader disabled multiple :max-count="5" upload-text="最多上传五个" v-model="measuresProjectFile"
accept="file" result-type="file" @delete="deleteFile(...arguments, 'measuresProjectFile')">
<template slot="default">
<div style="
"
>
<img
src="@/assets/upload/pic.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
现有技术措施
</div>
<van-field
disabled
name="measuresProject"
label="技术措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field name="measuresProjectFile[]" label=" ">
<template #input>
<van-uploader
disabled
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="measuresProjectFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresProjectFile')"
>
<template slot="default">
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -76,45 +163,53 @@
align-items: center;
justify-content: center;
flex-direction: column;
">
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
应采取的管控措施
</div>
<van-field v-model="form.measuresAdministration" name="measuresAdministration" label="" type="textarea" rows="3"
autosize placeholder="请输入" />
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
已采取的管控措施
</div>
<van-field v-model="form.measuresAdministration" name="measuresAdministration" label="" type="textarea" rows="3"
autosize placeholder="请输入" />
<van-field readonly required name="trouble" :value="form.trouble" label="管控责任单位" placeholder="请选择"
@click="showTrouble = true" :rules="[{ required: true, message: '管控责任单位不能为空' }]" />
<van-field readonly required name="trouble" :value="form.trouble" label="管控责任人" placeholder="请选择"
@click="showTrouble = true" :rules="[{ required: true, message: '管控责任人不能为空' }]" />
<!-- <div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
现有管理措施
</div> -->
<!-- <van-field disabled name="measuresAdministration" label="管理措施" type="textarea" rows="1" autosize
placeholder="请输入" /> -->
<!-- <van-field name="measuresAdministrationFile[]" label=" ">
<template #input>
<van-uploader disabled multiple :max-count="5" upload-text="最多上传五个" v-model="measuresAdministrationFile"
accept="file" result-type="file" @delete="deleteFile(...arguments, 'measuresAdministrationFile')">
<template slot="default">
<div style="
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
现有管理措施
</div>
<van-field
disabled
name="measuresAdministration"
label="管理措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field name="measuresAdministrationFile[]" label=" ">
<template #input>
<van-uploader
disabled
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="measuresAdministrationFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresAdministrationFile')"
>
<template slot="default">
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -122,26 +217,53 @@
align-items: center;
justify-content: center;
flex-direction: column;
">
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field> -->
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
现有应急措施
</div>
<van-field disabled name="measuresEmergency" label="应急措施" type="textarea" rows="1" autosize placeholder="请输入" />
<van-field name="measuresEmergencyFile[]" label=" ">
<template #input>
<van-uploader disabled multiple :max-count="5" upload-text="最多上传五个" v-model="measuresEmergencyFile"
accept="file" result-type="file" @delete="deleteFile(...arguments, 'measuresEmergencyFile')">
<template slot="default">
<div style="
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
现有应急措施
</div>
<van-field
disabled
name="measuresEmergency"
label="应急措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field name="measuresEmergencyFile[]" label=" ">
<template #input>
<van-uploader
disabled
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="measuresEmergencyFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresEmergencyFile')"
>
<template slot="default">
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -149,169 +271,170 @@
align-items: center;
justify-content: center;
flex-direction: column;
">
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
参考依据
</div>
<van-field readonly required clickable name="trouble" :value="form.trouble" label="参考依据" placeholder="请选择"
@click="showTrouble = true" :rules="[{ required: true, message: '事故类型不能为空' }]" />
</van-form>
</div>
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
参考依据
</div>
</van-form>
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
export default {
// props: ["presentList"],
components: {
LHeader
},
data() {
return {
showPopoveSetRank: false,
activeNames: ["1"],
showPopover: false,
showGradeDialog: false,
taskId: "",
text: "现状风险详情",
id: "",
isTimely: 1,
active: 0,
form: {
},
projectId: "", // 所属工程
projectName: "", // 所属工程
projectDirectorName: "", // 所属工程
projectDirector: "", // 所属工程
showProjectName: false,
show: false,
columnsProjectName: [],
factor: "", //风险因素
showFactor: false,
columnsFactor: [],
messageList: [
{
title: '回显风险源名称',
time: '2022-12-12',
name: 'Mr.周',
state: 1
}
],
source: "", //风险源
userPrefix: "", //风险源
showSource: false,
columnsSource: [],
trouble: "", //事故类型
showTrouble: false,
columnsTrouble: [],
setRank: "", //风险定级
showSetRank: false,
columnsSetRank: ["矩阵式定级", "其他定级方式"],//严重程度
riskRank: "", // 风险等级
showRiskRank: false,
columnsRiskRank: [],//发生可能性
showSetRankMode: false, // 是否显示定级方式
setRankMode: "", // 定级方式文字
setRankModeImg: [], // 定级方式图片
uploaderImg: [], // 定级方式图片
location: "", //风险部位
control: "", //管控层级
riskName: "", //管控层级
showControl: false,
columnsControl: ["项目级", "企业级"],
mainDutyDept: "", // 主责部门
mainDutyDeptId: "",
showMainDutyDept: false,
columnsMainDutyDept: [],
mainDutyPeopLe: "", // 主责人员
mainDutyPeopLeId: "",
showMainDutyPeopLe: false,
columnsMainDutyPeopLe: [],
technology: "", //技术措施文字
technologyImg: [], //技术措施图片
administration: "", //管理措施文字
measuresAdministrationFile: [], //管理措施图片
measuresProjectFile: [], //管理措施图片
measuresEmergencyFile: [], //管理措施图片
urgent: "", //应急措施文字
urgentImg: [], //应急措施图片
returnCause: "", // 退回原因
isShowreturnCause: false,
possibleValue: "",
possibleScore: 0,
severityValue: "",
severityScore: 0,
};
},
created() {
// this.form.buildingIds = this.$route.params.buildingId ||sessionStorage.getItem("buildingId")
// this.form.planId = this.$route.params.planId||sessionStorage.getItem("planId")
// this.form.buildingName = this.$route.params.buildingName||sessionStorage.getItem("buildingName")
// this.form.userId = userInfo.userId
// this.form.userName = userInfo.userName
// this.form.deptName = userInfo.dept.deptName
// this.form.projectId = '测试项目',
// this.form.level = this.$route.params.level ? this.$route.params.level :''
},
methods: {
},
watch: {
},
// props: ["presentList"],
components: {
LHeader
},
data() {
return {
showPopoveSetRank: false,
activeNames: ["1"],
showPopover: false,
showGradeDialog: false,
taskId: "",
text: "现状风险详情",
id: "",
isTimely: 1,
active: 0,
form: {},
projectId: "", // 所属工程
projectName: "", // 所属工程
projectDirectorName: "", // 所属工程
projectDirector: "", // 所属工程
showProjectName: false,
show: false,
columnsProjectName: [],
factor: "", //风险因素
showFactor: false,
columnsFactor: [],
messageList: [
{
title: "回显风险源名称",
time: "2022-12-12",
name: "Mr.周",
state: 1
}
],
source: "", //风险源
userPrefix: "", //风险源
showSource: false,
columnsSource: [],
trouble: "", //事故类型
showTrouble: false,
columnsTrouble: [],
setRank: "", //风险定级
showSetRank: false,
columnsSetRank: ["矩阵式定级", "其他定级方式"], //严重程度
riskRank: "", // 风险等级
showRiskRank: false,
columnsRiskRank: [], //发生可能性
showSetRankMode: false, // 是否显示定级方式
setRankMode: "", // 定级方式文字
setRankModeImg: [], // 定级方式图片
uploaderImg: [], // 定级方式图片
location: "", //风险部位
control: "", //管控层级
riskName: "", //管控层级
showControl: false,
columnsControl: ["项目级", "企业级"],
mainDutyDept: "", // 主责部门
mainDutyDeptId: "",
showMainDutyDept: false,
columnsMainDutyDept: [],
mainDutyPeopLe: "", // 主责人员
mainDutyPeopLeId: "",
showMainDutyPeopLe: false,
columnsMainDutyPeopLe: [],
technology: "", //技术措施文字
technologyImg: [], //技术措施图片
administration: "", //管理措施文字
measuresAdministrationFile: [], //管理措施图片
measuresProjectFile: [], //管理措施图片
measuresEmergencyFile: [], //管理措施图片
urgent: "", //应急措施文字
urgentImg: [], //应急措施图片
returnCause: "", // 退回原因
isShowreturnCause: false,
possibleValue: "",
possibleScore: 0,
severityValue: "",
severityScore: 0
};
},
created() {
// this.form.buildingIds = this.$route.params.buildingId ||sessionStorage.getItem("buildingId")
// this.form.planId = this.$route.params.planId||sessionStorage.getItem("planId")
// this.form.buildingName = this.$route.params.buildingName||sessionStorage.getItem("buildingName")
// this.form.userId = userInfo.userId
// this.form.userName = userInfo.userName
// this.form.deptName = userInfo.dept.deptName
// this.form.projectId = '测试项目',
// this.form.level = this.$route.params.level ? this.$route.params.level :''
},
methods: {},
watch: {}
};
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
.con-list {
padding: 0;
background-color: #f0f1f5;
padding: 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
.van-overlay {
position: absolute;
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
.dialogContain {
width: 100%;
height: 100%;
padding: 10px;
box-sizing: border-box;
width: 100%;
height: 100%;
padding: 10px;
box-sizing: border-box;
}
</style>
<template>
<div>
<van-form :scroll-to-error="true" :show-error="false" validate-trigger="onSubmit">
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
风险信息
</div>
<van-field readonly required :value="InherentRisk.userName" label="评估人" placeholder="请输入" />
<van-field readonly required :value="InherentRisk.projectName" label="所属项目" placeholder="请输入" />
<van-field readonly required :value="InherentRisk.buildingName" label="所属建筑物" placeholder="请输入" />
<div>
<van-form
:scroll-to-error="true"
:show-error="false"
validate-trigger="onSubmit"
>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
风险信息
</div>
<van-field
readonly
required
:value="InherentRisk.userName"
label="评估人"
placeholder="请输入"
/>
<van-field
readonly
required
:value="InherentRisk.projectName"
label="所属项目"
placeholder="请输入"
/>
<van-field
readonly
required
:value="InherentRisk.buildingName"
label="所属建筑物"
placeholder="请输入"
/>
<van-field required clickable name="floorId" :value="InherentRisk.floorName" label="所属楼层" placeholder="请选择"
:rules="[{ required: true, message: '所属楼层不能为空' }]" />
<div style="display: flex;">
<van-field readonly required name="roomName" :value="InherentRisk.roomName" label="所属房间" placeholder="请输入"
:rules="[{ required: true, message: '所属房间不能为空' }]" />
<!-- <van-button style="color: #cccc;background-color: #f0f1f5;" icon="plus" type="info" /> -->
</div>
<van-field required clickable name="name" v-model="InherentRisk.factor" label="风险源名称" placeholder="请输入"
:rules="[{ required: true, message: '风险源名称不能为空' }]" />
<van-field v-model="InherentRisk.factor" required name="factor" label="风险因素" placeholder="请选择"
:rules="[{ required: true, message: '风险因素不能为空' }]" />
<van-field v-model="InherentRisk.type" required name="type" label="准事故类型" placeholder="请选择"
:rules="[{ required: true, message: '准事故类型不能为空' }]" />
<van-field
required
clickable
name="floorName"
:value="InherentRisk.floorName"
label="所属楼层"
placeholder="请选择"
:rules="[{ required: true, message: '所属楼层不能为空' }]"
/>
<div style="display: flex;">
<van-field
readonly
required
name="roomName"
:value="InherentRisk.roomName"
label="所属房间"
placeholder="请输入"
:rules="[{ required: true, message: '所属房间不能为空' }]"
/>
<!-- <van-button style="color: #cccc;background-color: #f0f1f5;" icon="plus" type="info" /> -->
</div>
<van-field
required
clickable
name="name"
v-model="InherentRisk.factor"
label="风险源名称"
placeholder="请输入"
:rules="[{ required: true, message: '风险源名称不能为空' }]"
/>
<van-field
v-model="InherentRisk.factor"
required
name="factor"
label="风险因素"
placeholder="请选择"
:rules="[{ required: true, message: '风险因素不能为空' }]"
/>
<van-field
v-model="InherentRisk.type"
required
name="type"
label="准事故类型"
placeholder="请选择"
:rules="[{ required: true, message: '准事故类型不能为空' }]"
/>
<van-field readonly v-model="InherentRisk.level" required name="level" label="风险等级" placeholder="请选择"
:rules="[{ required: true, message: '风险等级不能为空' }]" />
<van-field
readonly
v-model="InherentRisk.level"
required
name="level"
label="风险等级"
placeholder="请选择"
:rules="[{ required: true, message: '风险等级不能为空' }]"
/>
<van-field required name="presenceLocation" v-model="InherentRisk.presenceLocation" label="存在部位" placeholder="请输入"
:rules="[{ required: true, message: '存在部位不能为空' }]" />
<van-field
required
name="presenceLocation"
v-model="InherentRisk.presenceLocation"
label="存在部位"
placeholder="请输入"
:rules="[{ required: true, message: '存在部位不能为空' }]"
/>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
风险源图片
</div>
<van-field name="hdPicture1" label="风险源图片">
<template #input>
<van-uploader multiple :max-count="5" disabled
upload-text="最多上传五个" v-model="uploaderImg">
<template slot="default">
<div style="
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
风险源图片
</div>
<van-field name="hdPicture1" label="风险源图片">
<template #input>
<van-uploader
multiple
:max-count="5"
disabled
upload-text="最多上传五个"
v-model="uploaderImg"
>
<template slot="default">
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -48,27 +132,54 @@
align-items: center;
justify-content: center;
flex-direction: column;
">
<img src="@/assets/upload/pic.png" alt="" style="width: 0.64rem; height: 0.64rem" />
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
应有技术措施
</div>
<van-field disabled v-model="InherentRisk.measuresProject" name="measuresProject" label="技术措施" type="textarea" rows="1" autosize
placeholder="请输入" />
<van-field name="measuresProjectFile[]" label=" ">
<template #input>
<van-uploader disabled multiple :max-count="5" upload-text="最多上传五个" v-model="measuresProjectFile" accept="file"
result-type="file" @delete="deleteFile(...arguments, 'measuresProjectFile')">
<template slot="default">
<div style="
"
>
<img
src="@/assets/upload/pic.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
应有技术措施
</div>
<van-field
disabled
v-model="InherentRisk.measuresProject"
name="measuresProject"
label="技术措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field name="measuresProjectFile[]" label=" ">
<template #input>
<van-uploader
disabled
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="measuresProjectFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresProjectFile')"
>
<template slot="default">
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -76,27 +187,54 @@
align-items: center;
justify-content: center;
flex-direction: column;
">
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
应有管理措施
</div>
<van-field disabled v-model="InherentRisk.measuresAdministration" name="measuresAdministration" label="管理措施" type="textarea"
rows="1" autosize placeholder="请输入" />
<van-field name="measuresAdministrationFile[]" label=" ">
<template #input>
<van-uploader disabled multiple :max-count="5" upload-text="最多上传五个" v-model="measuresAdministrationFile"
accept="file" result-type="file" @delete="deleteFile(...arguments, 'measuresAdministrationFile')">
<template slot="default">
<div style="
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
应有管理措施
</div>
<van-field
disabled
v-model="InherentRisk.measuresAdministration"
name="measuresAdministration"
label="管理措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field name="measuresAdministrationFile[]" label=" ">
<template #input>
<van-uploader
disabled
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="measuresAdministrationFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresAdministrationFile')"
>
<template slot="default">
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -104,27 +242,54 @@
align-items: center;
justify-content: center;
flex-direction: column;
">
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
应有应急措施
</div>
<van-field disabled v-model="InherentRisk.measuresEmergency" name="measuresEmergency" label="应急措施" type="textarea" rows="1"
autosize placeholder="请输入" />
<van-field name="measuresEmergencyFile[]" label=" ">
<template #input>
<van-uploader disabled multiple :max-count="5" upload-text="最多上传五个" v-model="measuresEmergencyFile" accept="file"
result-type="file" @delete="deleteFile(...arguments, 'measuresEmergencyFile')">
<template slot="default">
<div style="
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
应有应急措施
</div>
<van-field
disabled
v-model="InherentRisk.measuresEmergency"
name="measuresEmergency"
label="应急措施"
type="textarea"
rows="1"
autosize
placeholder="请输入"
/>
<van-field name="measuresEmergencyFile[]" label=" ">
<template #input>
<van-uploader
disabled
multiple
:max-count="5"
upload-text="最多上传五个"
v-model="measuresEmergencyFile"
accept="file"
result-type="file"
@delete="deleteFile(...arguments, 'measuresEmergencyFile')"
>
<template slot="default">
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
......@@ -132,166 +297,166 @@
align-items: center;
justify-content: center;
flex-direction: column;
">
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
参考依据
</div>
<van-field readonly required clickable name="trouble" :value="form.trouble" label="参考依据" placeholder="请选择"
@click="showTrouble = true" :rules="[{ required: true, message: '事故类型不能为空' }]" />
</van-form>
</div>
"
>
<img
src="@/assets/upload/file.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text">最多上传五个</span>
</div>
</template>
</van-uploader>
</template>
</van-field>
<div
style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src="@/assets/accidentIcon/bookmark.svg"
alt=""
style="position: relative;top: 32%;transform: translateY(-50%);"
/>
参考依据
</div>
</van-form>
</div>
</template>
<script>
export default {
props: ["InherentRisk"],
data() {
return {
showPopoveSetRank: false,
activeNames: ["1"],
showPopover: false,
showGradeDialog: false,
taskId: "",
text: "添加固有风险",
id: "",
isTimely: 1,
active: 0,
form: {
},
projectId: "", // 所属工程
projectName: "", // 所属工程
projectDirectorName: "", // 所属工程
projectDirector: "", // 所属工程
showProjectName: false,
show: false,
columnsProjectName: [],
factor: "", //风险因素
showFactor: false,
columnsFactor: [],
messageList: [
{
title: '回显风险源名称',
time: '2022-12-12',
name: 'Mr.周',
state: 1
}
],
source: "", //风险源
userPrefix: "", //风险源
showSource: false,
columnsSource: [],
trouble: "", //事故类型
showTrouble: false,
columnsTrouble: [],
setRank: "", //风险定级
showSetRank: false,
columnsSetRank: ["矩阵式定级", "其他定级方式"],//严重程度
riskRank: "", // 风险等级
showRiskRank: false,
columnsRiskRank: [],//发生可能性
showSetRankMode: false, // 是否显示定级方式
setRankMode: "", // 定级方式文字
setRankModeImg: [], // 定级方式图片
uploaderImg: [], // 定级方式图片
location: "", //风险部位
control: "", //管控层级
riskName: "", //管控层级
showControl: false,
columnsControl: ["项目级", "企业级"],
mainDutyDept: "", // 主责部门
mainDutyDeptId: "",
showMainDutyDept: false,
columnsMainDutyDept: [],
mainDutyPeopLe: "", // 主责人员
mainDutyPeopLeId: "",
showMainDutyPeopLe: false,
columnsMainDutyPeopLe: [],
technology: "", //技术措施文字
technologyImg: [], //技术措施图片
administration: "", //管理措施文字
measuresAdministrationFile: [], //管理措施图片
measuresProjectFile: [], //管理措施图片
measuresEmergencyFile: [], //管理措施图片
urgent: "", //应急措施文字
urgentImg: [], //应急措施图片
returnCause: "", // 退回原因
isShowreturnCause: false,
possibleValue: "",
possibleScore: 0,
severityValue: "",
severityScore: 0,
};
},
created() {
// this.form.buildingIds = this.$route.params.buildingId ||sessionStorage.getItem("buildingId")
// this.form.planId = this.$route.params.planId||sessionStorage.getItem("planId")
// this.form.buildingName = this.$route.params.buildingName||sessionStorage.getItem("buildingName")
// this.form.userId = userInfo.userId
// this.form.userName = userInfo.userName
// this.form.deptName = userInfo.dept.deptName
// this.form.projectId = '测试项目',
// this.form.level = this.$route.params.level ? this.$route.params.level :''
},
methods: {
},
watch: {
},
props: ["InherentRisk"],
data() {
return {
showPopoveSetRank: false,
activeNames: ["1"],
showPopover: false,
showGradeDialog: false,
taskId: "",
text: "添加固有风险",
id: "",
isTimely: 1,
active: 0,
form: {},
projectId: "", // 所属工程
projectName: "", // 所属工程
projectDirectorName: "", // 所属工程
projectDirector: "", // 所属工程
showProjectName: false,
show: false,
columnsProjectName: [],
factor: "", //风险因素
showFactor: false,
columnsFactor: [],
messageList: [
{
title: "回显风险源名称",
time: "2022-12-12",
name: "Mr.周",
state: 1
}
],
source: "", //风险源
userPrefix: "", //风险源
showSource: false,
columnsSource: [],
trouble: "", //事故类型
showTrouble: false,
columnsTrouble: [],
setRank: "", //风险定级
showSetRank: false,
columnsSetRank: ["矩阵式定级", "其他定级方式"], //严重程度
riskRank: "", // 风险等级
showRiskRank: false,
columnsRiskRank: [], //发生可能性
showSetRankMode: false, // 是否显示定级方式
setRankMode: "", // 定级方式文字
setRankModeImg: [], // 定级方式图片
uploaderImg: [], // 定级方式图片
location: "", //风险部位
control: "", //管控层级
riskName: "", //管控层级
showControl: false,
columnsControl: ["项目级", "企业级"],
mainDutyDept: "", // 主责部门
mainDutyDeptId: "",
showMainDutyDept: false,
columnsMainDutyDept: [],
mainDutyPeopLe: "", // 主责人员
mainDutyPeopLeId: "",
showMainDutyPeopLe: false,
columnsMainDutyPeopLe: [],
technology: "", //技术措施文字
technologyImg: [], //技术措施图片
administration: "", //管理措施文字
measuresAdministrationFile: [], //管理措施图片
measuresProjectFile: [], //管理措施图片
measuresEmergencyFile: [], //管理措施图片
urgent: "", //应急措施文字
urgentImg: [], //应急措施图片
returnCause: "", // 退回原因
isShowreturnCause: false,
possibleValue: "",
possibleScore: 0,
severityValue: "",
severityScore: 0
};
},
created() {
// this.form.buildingIds = this.$route.params.buildingId ||sessionStorage.getItem("buildingId")
// this.form.planId = this.$route.params.planId||sessionStorage.getItem("planId")
// this.form.buildingName = this.$route.params.buildingName||sessionStorage.getItem("buildingName")
// this.form.userId = userInfo.userId
// this.form.userName = userInfo.userName
// this.form.deptName = userInfo.dept.deptName
// this.form.projectId = '测试项目',
// this.form.level = this.$route.params.level ? this.$route.params.level :''
},
methods: {},
watch: {}
};
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
.con-list {
padding: 0;
background-color: #f0f1f5;
padding: 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
.van-overlay {
position: absolute;
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
.dialogContain {
width: 100%;
height: 100%;
padding: 10px;
box-sizing: border-box;
width: 100%;
height: 100%;
padding: 10px;
box-sizing: border-box;
}
</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