Commit ebd1de3f authored by wei's avatar wei

现状风险详情页

parent 2593295d
......@@ -62,7 +62,7 @@ export default {
"riskExecution",
"riskAssess",
"riskApprove",
"riskBigDetail"
],
// cachePage预先定义的缓存页面
otherCache: [],
......
......@@ -166,6 +166,11 @@ const routes = [{
name: 'addPresent',
component: () => import('../views/riskProject/add/addPresent.vue'),
},
{//现状风险详情
path: '/presentDetail',
name: 'presentDetail',
component: () => import('../views/riskProject/taskLedger/presentDetail.vue'),
},
{//风险评估列表详情页
path: '/riskBigDetail',
name: 'riskBigDetail',
......
......@@ -96,7 +96,7 @@
@click="seletGrade('level')"
: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: '风险等级不能为空' }]" />
<van-field
......
<template>
<div>
<!-- 搜索 -->
<van-sticky offset-top="0">
<div class="content-wrap">
<div class="search-wrap">
<van-search v-model="searchVal" placeholder="搜索" @input="onInput"/>
</div>
</div>
</van-sticky>
<div style="margin-bottom: 1.4rem;">
<van-radio-group v-model="radio">
<van-list
......
......@@ -3,48 +3,39 @@
<van-sticky offset-top="0">
<LHeader :text="text"></LHeader>
</van-sticky>
<van-tabs
v-model="active"
color="#2980f7"
animated
:sticky="true"
>
<van-tab title="排序">
<template #title> 排序 <van-icon name="down" /></template>
<div class="con-list" >
<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-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'}">
{{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
>
</div>
</van-overlay>
</van-cell-group>
</div>
</van-tab>
<van-tab title="筛选">
<template #title> 筛选 <van-icon name="filter-o" /></template>
</van-tab>
</van-tabs>
<van-sticky offset-top="1.5rem">
<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)">
<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-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' }">
{{ 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>
</div>
</van-overlay>
</van-cell-group>
</div>
</div>
</template>
......@@ -53,11 +44,12 @@ import LHeader from "@/components/header.vue";
import { timestampToTime, generateId } from "@/utils/format";
import { getFun, postFun } from "@/service/table.js";
export default {
name:'taskLedger',//任务台账
name: 'taskLedger',//任务台账
data() {
return {
text:'任务台账',
text: '任务台账',
active: 0,
searchValue: '',
showIndex: null, // 是否显示遮罩层,
taskList: [], // 是否显示遮罩层,
}
......@@ -72,10 +64,10 @@ export default {
timestampToTimes(time) {
return timestampToTime(new Date(time), "DT2", true);
},
getList(){
getFun('/risk/plan/details/list').then(res=>{
getList() {
getFun('/risk/plan/details/list').then(res => {
console.log('%c [ res ]-77', 'font-size:13px; background:pink; color:#bf2c9f;', res)
this.taskList=res.data
this.taskList = res.data
})
},
//点击列表
......@@ -86,51 +78,60 @@ export default {
}
this.showIndex = index;
},
// 详情
goDetail(item){
// 详情
goDetail(item) {
this.$router.push({
name: "riskTaskList",
params: {
id:item.id,
id: item.id,
},
});
},
onSearch(searchValue) {
}
},
}
</script>
<style scoped lang="less">
.wrap{
height: 100vh;
width: 100vw;
.wrap {
height: 100vh;
width: 100vw;
}
.con-list {
padding: 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
.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: 8px;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
position: relative;
border-radius: 8px;
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%;
}
line-height: 0.8rem;
margin-bottom: 0;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
</style>
This diff is collapsed.
......@@ -21,7 +21,7 @@
: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="请选择" @click="seletType('type')"
<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="请选择"
......
......@@ -81,11 +81,11 @@ export default {
TabDetail
},
created() {
this.inherentId = this.$route.params.id
this.inherentId = this.$route.params.id ||sessionStorage.getItem('inherntId')
},
mounted() {
this.getInherentRiskList(this.$route.params.id)
this.getQuoRiskList(this.$route.params.id)
this.getInherentRiskList(this.inherentId)
this.getQuoRiskList(this.inherentId)
},
methods: {
getInherentRiskList(inherentId){
......@@ -103,24 +103,19 @@ export default {
},
goDetail(item){
console.log(item,'???')
sessionStorage.setItem('inherntId',this.inherentId)
this.$router.push({
name:'taskDetail',
name:'presentDetail',
params:{
isView:false,
// buildingId:,
// planId:,
// floorId:,
// roomId:,
// inherentId:,
// roomName:,
}
})
},
onClick(name){
if(name==='a'){
this.getQuoRiskList(this.$route.params.id)
this.getQuoRiskList(this.inherentId)
}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