Commit ebd1de3f authored by wei's avatar wei

现状风险详情页

parent 2593295d
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
"riskExecution", "riskExecution",
"riskAssess", "riskAssess",
"riskApprove", "riskApprove",
"riskBigDetail"
], ],
// cachePage预先定义的缓存页面 // cachePage预先定义的缓存页面
otherCache: [], otherCache: [],
......
...@@ -166,6 +166,11 @@ const routes = [{ ...@@ -166,6 +166,11 @@ const routes = [{
name: 'addPresent', name: 'addPresent',
component: () => import('../views/riskProject/add/addPresent.vue'), component: () => import('../views/riskProject/add/addPresent.vue'),
}, },
{//现状风险详情
path: '/presentDetail',
name: 'presentDetail',
component: () => import('../views/riskProject/taskLedger/presentDetail.vue'),
},
{//风险评估列表详情页 {//风险评估列表详情页
path: '/riskBigDetail', path: '/riskBigDetail',
name: 'riskBigDetail', name: 'riskBigDetail',
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
@click="seletGrade('level')" @click="seletGrade('level')"
:rules="[{ required: true, message: '风险等级不能为空' }]" :rules="[{ required: true, message: '风险等级不能为空' }]"
/> --> /> -->
<van-field readonly v-model="form.level" required name="level" label="风险等级" placeholder="请选择" <van-field readonly v-model="form.level" required name="level" label="风险管控措施评价" placeholder="请选择"
@click="seletGrade" :rules="[{ required: true, message: '风险等级不能为空' }]" /> @click="seletGrade" :rules="[{ required: true, message: '风险等级不能为空' }]" />
<van-field <van-field
......
<template> <template>
<div> <div>
<!-- 搜索 --> <!-- 搜索 -->
<van-sticky offset-top="0">
<div class="content-wrap"> <div class="content-wrap">
<div class="search-wrap"> <div class="search-wrap">
<van-search v-model="searchVal" placeholder="搜索" @input="onInput"/> <van-search v-model="searchVal" placeholder="搜索" @input="onInput"/>
</div> </div>
</div> </div>
</van-sticky>
<div style="margin-bottom: 1.4rem;"> <div style="margin-bottom: 1.4rem;">
<van-radio-group v-model="radio"> <van-radio-group v-model="radio">
<van-list <van-list
......
...@@ -3,18 +3,16 @@ ...@@ -3,18 +3,16 @@
<van-sticky offset-top="0"> <van-sticky offset-top="0">
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
</van-sticky> </van-sticky>
<van-tabs <van-sticky offset-top="1.5rem">
v-model="active" <van-search v-model="searchValue" show-action placeholder="请输入搜索内容" @search="onSearch">
color="#2980f7" <template #action>
animated <div @click="onSearch">搜索</div>
:sticky="true" </template>
> </van-search>
<van-tab title="排序"> </van-sticky>
<template #title> 排序 <van-icon name="down" /></template> <div class="con-list">
<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>
<div style="font-size: 0.45rem;padding: 5px 0;">{{item.name}}</div>
<van-row gutter=""> <van-row gutter="">
<van-col span="17"> <van-col span="17">
<van-row gutter=""> <van-row gutter="">
...@@ -23,28 +21,21 @@ ...@@ -23,28 +21,21 @@
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="9">处理人员:</van-col> <van-col span="9">处理人员:</van-col>
<van-col span="15">{{item.leaderUserName}}</van-col> <van-col span="15">{{ item.leaderUserName }}</van-col>
</van-row> </van-row>
</van-col> </van-col>
<van-col span="7" :style="{'color':'#03b615'}"> <van-col span="7" :style="{ 'color': '#03b615' }">
{{item.state}} {{ item.state }}
</van-col> </van-col>
</van-row> </van-row>
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null"> <div class="wrapper" @click.stop="showIndex = null">
<van-button round type="primary" @click="goDetail(item)" <van-button round type="primary" @click="goDetail(item)">详情</van-button>
>详情</van-button
>
</div> </div>
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
</div> </div>
</van-tab>
<van-tab title="筛选">
<template #title> 筛选 <van-icon name="filter-o" /></template>
</van-tab>
</van-tabs>
</div> </div>
</template> </template>
...@@ -53,11 +44,12 @@ import LHeader from "@/components/header.vue"; ...@@ -53,11 +44,12 @@ import LHeader from "@/components/header.vue";
import { timestampToTime, generateId } from "@/utils/format"; import { timestampToTime, generateId } from "@/utils/format";
import { getFun, postFun } from "@/service/table.js"; import { getFun, postFun } from "@/service/table.js";
export default { export default {
name:'taskLedger',//任务台账 name: 'taskLedger',//任务台账
data() { data() {
return { return {
text:'任务台账', text: '任务台账',
active: 0, active: 0,
searchValue: '',
showIndex: null, // 是否显示遮罩层, showIndex: null, // 是否显示遮罩层,
taskList: [], // 是否显示遮罩层, taskList: [], // 是否显示遮罩层,
} }
...@@ -72,10 +64,10 @@ export default { ...@@ -72,10 +64,10 @@ export default {
timestampToTimes(time) { timestampToTimes(time) {
return timestampToTime(new Date(time), "DT2", true); return timestampToTime(new Date(time), "DT2", true);
}, },
getList(){ getList() {
getFun('/risk/plan/details/list').then(res=>{ getFun('/risk/plan/details/list').then(res => {
console.log('%c [ res ]-77', 'font-size:13px; background:pink; color:#bf2c9f;', res) console.log('%c [ res ]-77', 'font-size:13px; background:pink; color:#bf2c9f;', res)
this.taskList=res.data this.taskList = res.data
}) })
}, },
//点击列表 //点击列表
...@@ -87,26 +79,32 @@ export default { ...@@ -87,26 +79,32 @@ export default {
this.showIndex = index; this.showIndex = index;
}, },
// 详情 // 详情
goDetail(item){ goDetail(item) {
this.$router.push({ this.$router.push({
name: "riskTaskList", name: "riskTaskList",
params: { params: {
id:item.id, id: item.id,
}, },
}); });
},
onSearch(searchValue) {
} }
}, },
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.wrap{ .wrap {
height: 100vh; height: 100vh;
width: 100vw; width: 100vw;
} }
.con-list {
.con-list {
padding: 0; padding: 0;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 0.26667rem; margin-bottom: 0.26667rem;
...@@ -117,13 +115,16 @@ export default { ...@@ -117,13 +115,16 @@ export default {
box-shadow: 0px 0px 10px 2px #f3f3f3; box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%; width: 90%;
margin: 0.4rem auto; margin: 0.4rem auto;
.van-row { .van-row {
font-size: 0.4rem; font-size: 0.4rem;
line-height: 0.8rem; line-height: 0.8rem;
margin-bottom: 0; margin-bottom: 0;
} }
.van-overlay { .van-overlay {
position: absolute; position: absolute;
.wrapper { .wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -132,5 +133,5 @@ export default { ...@@ -132,5 +133,5 @@ export default {
} }
} }
} }
} }
</style> </style>
<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="请输入" />
<van-field required clickable 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 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: '风险等级不能为空' }]" />
<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;
display: flex;
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="
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>
<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;
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>
<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;
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>
</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: {
},
};
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
.con-list {
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-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
.dialogContain {
width: 100%;
height: 100%;
padding: 10px;
box-sizing: border-box;
}
</style>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
:rules="[{ required: true, message: '风险源名称不能为空' }]" /> :rules="[{ required: true, message: '风险源名称不能为空' }]" />
<van-field v-model="InherentRisk.factor" required name="factor" label="风险因素" placeholder="请选择" <van-field v-model="InherentRisk.factor" required name="factor" label="风险因素" placeholder="请选择"
:rules="[{ required: true, message: '风险因素不能为空' }]" /> :rules="[{ required: true, message: '风险因素不能为空' }]" />
<van-field v-model="InherentRisk.type" required name="type" label="准事故类型" placeholder="请选择" @click="seletType('type')" <van-field v-model="InherentRisk.type" required name="type" label="准事故类型" placeholder="请选择"
:rules="[{ required: true, message: '准事故类型不能为空' }]" /> :rules="[{ required: true, message: '准事故类型不能为空' }]" />
<van-field readonly v-model="InherentRisk.level" required name="level" label="风险等级" placeholder="请选择" <van-field readonly v-model="InherentRisk.level" required name="level" label="风险等级" placeholder="请选择"
......
...@@ -81,11 +81,11 @@ export default { ...@@ -81,11 +81,11 @@ export default {
TabDetail TabDetail
}, },
created() { created() {
this.inherentId = this.$route.params.id this.inherentId = this.$route.params.id ||sessionStorage.getItem('inherntId')
}, },
mounted() { mounted() {
this.getInherentRiskList(this.$route.params.id) this.getInherentRiskList(this.inherentId)
this.getQuoRiskList(this.$route.params.id) this.getQuoRiskList(this.inherentId)
}, },
methods: { methods: {
getInherentRiskList(inherentId){ getInherentRiskList(inherentId){
...@@ -103,24 +103,19 @@ export default { ...@@ -103,24 +103,19 @@ export default {
}, },
goDetail(item){ goDetail(item){
console.log(item,'???') console.log(item,'???')
sessionStorage.setItem('inherntId',this.inherentId)
this.$router.push({ this.$router.push({
name:'taskDetail', name:'presentDetail',
params:{ params:{
isView:false, isView:false,
// buildingId:,
// planId:,
// floorId:,
// roomId:,
// inherentId:,
// roomName:,
} }
}) })
}, },
onClick(name){ onClick(name){
if(name==='a'){ if(name==='a'){
this.getQuoRiskList(this.$route.params.id) this.getQuoRiskList(this.inherentId)
}else if(name==='b'){ }else if(name==='b'){
this.getInherentRiskList(this.$route.params.id) this.getInherentRiskList(this.inherentId)
} }
} }
}, },
......
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