Commit cd33bd45 authored by wei's avatar wei

uu

parent ad372ed3
......@@ -40,7 +40,7 @@ export default {
'riskAdd'
],
// 不需要展示底部tabbar的页面
noTab:["login", "login2", 'addCurrent','addPresent','addInherent','riskInherent',"choose-people","scan",'success','fail','warn','center','reset-pas-two','riskTaskList'],
noTab:["login", "login2", 'addCurrent','addPresent','addInherent','riskInherent',"choose-people","scan",'success','fail','warn','center','reset-pas-two','riskTaskList','riskBigDetail'],
// cachePage预先定义的缓存页面
otherCache: [],
// 专门处理列表缓存的页面,这些页面缓存逻辑与其他缓存不一样去详情返回列表缓存,但是进入列表必须刷新,如何有需要缓存的列表请放到这里来。
......
......@@ -11,11 +11,11 @@
<template>
<div>
<van-sticky>
<header class="header">
<van-icon @click="to" name="arrow-left" class="iconColorLeft"/>
<span>{{text}}</span>
<!-- <van-icon name="bars" class="iconColorRight"/> -->
</header>
<header class="header">
<van-icon @click="to" name="arrow-left" class="iconColorLeft"/>
<span>{{text}}</span>
<!-- <van-icon name="bars" class="iconColorRight"/> -->
</header>
</van-sticky>
</div>
</template>
......
......@@ -167,9 +167,9 @@ const routes = [{
component: () => import('../views/riskProject/add/addPresent.vue'),
},
{//风险评估列表详情页
path: '/risk-big-detail',
name: 'risk-big-detail',
component: () => import('../views/riskProject/approve/riskBigDetail.vue'),
path: '/riskBigDetail',
name: 'riskBigDetail',
component: () => import('../views/riskProject/assess/riskBigDetail.vue'),
},
{//执行情况管理
path: '/riskExecution',
......
<template>
<div>
详情页面
</div>
</template>
<script>
export default {
name:'risk-big-detail'
}
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<template>
<!-- 提交 -->
<div>
<van-sticky offset-top="0">
<LHeader :text="text"></LHeader>
</van-sticky>
<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>
<!-- <van-tabs
v-model="active"
@change="
postList(searchValue);
showIndex = null;
"
color="#2980f7"
animated
:sticky="true"
offset-top="2.93rem"
>
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title"> -->
<!-- 提交 -->
<div class="app">
<LHeader :text="text"></LHeader>
<div class="section">
<van-tabs v-model="active" @change="postList" color="#2980f7" animated :sticky="true">
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<!-- 内容列表 -->
<div
class="con-list"
@touchmove="showIndex = null"
>
<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.title}}</div>
<van-row gutter="">
<div class="con-list" v-if="key == active">
<van-cell-group inset v-for="(item, index) in messageList" :key="index">
<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-row>
<van-row gutter="">
<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.time }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="9">处理人员:</van-col>
<van-col span="15">{{ item.name }}</van-col>
</van-row>
</van-col>
<van-col span="7" :style="{'color':item.state == 1 ? '#0069e5':'#03b615'}">
{{ item.state==1?'●未执行':'●已执行' }}
<van-col span="7">
<van-row :style="{ 'color': (active == 0) ? '#f79648' : (active == 1) ? '#0069e5' : '#03b615' }">
{{ item.status }}
</van-row>
<van-row>
<van-button type="info" size="mini" @click="buildDetail(index, item)">楼栋详情</van-button>
</van-row>
</van-col>
</van-row>
<!-- <van-row gutter="">
<van-col span="7">风险源:</van-col>
<van-col span="17">{{ item.riskSource }}</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="info" @click="goConfirm(item)" v-show="active==0"
>确认</van-button
>
</div>
</van-overlay>
<!-- <van-col span="7" :style="{ 'color': item.state == 1 ? '#0069e5' : '#03b615' }">
{{ item.state == 1 ? '●未执行' : '●已执行' }}
</van-col> -->
</van-row>
</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>
</div>
<!-- 暂无数据 -->
<!-- {{messageList}} -->
<!-- </van-tab>
</van-tabs> -->
</van-tab>
</van-tabs>
</div>
</template>
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex">
<div class="wrapper" @click.stop="showIndex = false">
<div class="mark">
<van-cell :border="false" title="待执行楼栋详情" value="X" @click="closeMark"/>
<van-cell-group inset v-for="(item, index) in buildingList" :key="index">
<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">{{ item.createBy }}</van-col>
</van-row>
<van-row gutter="">
<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.time }}</van-col>
</van-row>
</van-col>
<van-col span="7">
<van-row :style="{ 'color': (active == 0) ? '#f79648' : (active == 1) ? '#0069e5' : '#03b615' }">
{{ item.status }}
</van-row>
<van-row>
<van-button type="info" size="mini" @click="todoTask(index, item)">去处理</van-button>
</van-row>
</van-col>
</van-row>
</van-cell-group>
</div>
</div>
</van-overlay>
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
<script>
import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
// import { postriskConList } from "@/service/risk";
export default {
name:'risk-confirme',
components: {
LHeader,
export default {
// name: 'risk-confirme',
components: {
LHeader,
},
data() {
return {
text: "风险评估",
messageList: [
{
title: 'XX项目评估任务单',
time: '2022-12-12',
name: 'Mr.周',
state: 1
}
],
buildingList: [
{
title: 'XX项目评估任务单',
time: '2022-12-12',
name: 'Mr.周',
state: 1
}
],
Loop: "", // 定时器
showIndex: false, // 是否显示遮罩层,
active: 0,
tabs: [
{
title: "待执行",
api: "/risk/plan/task/list",
key: 'running'
},
{
title: "已执行",
api: "/risk/plan/task/list",
key: 'finish'
},
{
title: "已退回",
api: "/risk/plan/task/list",
key: 'return'
},
],
};
},
created() {
this.postList(0);
},
methods: {
handadd() {
this.$router.push({
name: "riskAdd",
params: {
title: '新增'
},
})
},
data() {
return {
text: "风险评估",
searchValue: "",
isHaveNews: false,
messageList: [
{
title:'XX项目评估任务单',
time:'2022-12-12',
name:'Mr.周',
state:1
}
],
Loop: "", // 定时器
showIndex: null, // 是否显示遮罩层,
active: 0,
tabs: [
{
title: "未执行",
api: "/riskConfirm/list",
},
{
title: "已执行",
api: "/riskConfirm/finishList",
},
],
};
postList(name, title) {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
let url =''
if (name == 0) {
url = `/risk/plan/task/list?status=running`
} else if (name == 1) {
url = `/risk/plan/task/list?status=finish`
} else {
url = `/risk/plan/task/list?status=return`
}
getFun(url)
.then((res) => {
this.$toast.clear();
this.messageList = res.data || res.rows;
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
created() {
// this.postList();s
// 楼栋详情
buildDetail(index, item) {
this.showIndex = true;
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
getFun(`/risk/plan/plan/building/list/${item.id}`).then(res => {
this.$toast.clear();
this.buildingList = res.data;
}).catch(() => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
methods: {
handadd(){
this.$router.push({
name: "riskAdd",
params: {
title:'新增'
},
})
// 去处理详情
todoTask(index, data) {
this.$router.push({
name: "riskBigDetail",
params: {
id: data.id,
},
postList(select = "") {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
let formdata = new FormData();
formdata.append("select", select);
postFun(this.tabs[this.active]['api'], formdata)
.then((res) => {
this.$toast.clear();
this.messageList =res.data||res.rows;
// 判断有无数据返回
if (this.messageList.length == 0) {
this.isHaveNews = true;
}
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
onSearch(val) {
this.postList(this.searchValue);
},
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return;
}
this.showIndex = index;
},
// 详情
goDetail(data) {
this.$router.push({
name: "risk-big-detail",
params: {
id: data.businessId||data.id,
},
});
this.showIndex = null;
},
// 确认
goConfirm(data) {
this.$router.push({
name: "risk-affirm",
params: {
data: data,
},
});
this.showIndex = null;
},
});
sessionStorage.setItem('planId', data.id)
this.showIndex = false;
},
};
</script>
<style lang="less" scoped>
#app {
font-family: "";
color: #2c3e50;
}
.con-list {
padding: 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
closeMark(){
console.log('guanbi')
this.showIndex = false;
},
// 确认
goConfirm(data) {
this.$router.push({
name: "risk-affirm",
params: {
data: data,
},
});
},
},
};
</script>
<style lang="less" scoped>
#app {
font-family: "";
color: #2c3e50;
height: 100%;
width: 100%;
}
.app {
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
}
.section {
flex: 1;
width: 100%;
height: 100%;
}
.van-tabs__content {
position: relative;
}
.con-list {
padding: 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
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%;
}
}
line-height: 0.8rem;
margin-bottom: 0;
}
}
/deep/.van-tab__pane{
min-height: 8rem;
}
.van-overlay {
.wrapper {
width: 100%;
height: 100%;
.mark {
margin: 14px;
background: #fff;
border-radius: 5px;
padding: 8px;
box-sizing: border-box;
}
}
</style>
}
/deep/.van-tab__pane {
min-height: 8rem;
}
</style>
\ No newline at end of file
<template>
<!-- 提交 -->
<div>
<van-sticky offset-top="0">
<LHeader :text="text"></LHeader>
</van-sticky>
<div style="margin-bottom: 1.5rem;">
<van-grid :column-num="3" style="background-color: #fff;">
<van-grid-item >
<div>发起人员:</div>
<div>{{messageList.createUserName}}</div>
</van-grid-item>
<van-grid-item >
<div>项目负责人:</div>
<div>{{messageList.leaderUserName}}</div>
</van-grid-item>
<van-grid-item >
<div>任务状态:</div>
<div>{{messageList.status}}</div>
</van-grid-item>
<van-grid-item >
<div>开始时间:</div>
<div>{{timestampToTimes(messageList.startTime)||messageList.startTime}}</div>
</van-grid-item>
<van-grid-item >
<div>结束时间:</div>
<div>{{timestampToTimes(messageList.endTime)||messageList.endTime}}</div>
</van-grid-item>
</van-grid>
<van-steps :active="active" active-icon="success" active-color="#38f" style="margin: 0.26rem 0;">
<van-step>任务发起</van-step>
<van-step>风险评估</van-step>
<van-step>评估审核</van-step>
<van-step>项目完成</van-step>
</van-steps>
<van-tabs v-model="active" color="#2980f7"
animated
:sticky="true"
offset-top="2.93rem">
<van-tab title="任务详情">
<van-form
:scroll-to-error="true"
:show-error="false"
validate-trigger="onSubmit"
>
<van-field
readonly
name="createUserName"
:value="form.createUserName"
label="创建人员"
input-align="right"
:rules="[{ required: true, message: '创建人员不能为空' }]"
/>
<van-field
readonly
name="createDeptName"
:value="form.createDeptName"
label="创建单位"
input-align="right"
:rules="[{ required: true, message: '创建单位不能为空' }]"
/>
<van-field
readonly
name="projectName"
:value="form.projectName"
label="任务名称"
input-align="right"
:rules="[{ required: true, message: '任务名称不能为空' }]"
/>
<van-field
readonly
name="projectName"
:value="form.projectName"
label="关联项目"
input-align="right"
:rules="[{ required: true, message: '关联项目不能为空' }]"
/>
<van-field
readonly
name="buildingNames"
:value="form.buildingNames"
label="评估楼栋"
input-align="right"
:rules="[{ required: true, message: '评估楼栋不能为空' }]"
/>
<van-field
readonly
name="leaderUserName"
:value="form.leaderUserName"
label="项目负责人"
input-align="right"
:rules="[{ required: true, message: '事故类型不能为空' }]"
/>
<van-field
v-model="form.startTime"
readonly
name="location"
label="任务开始时间"
input-align="right"
:formatter="()=>{
return timestampToTimes(form.startTime)
}"
:rules="[{ required: true, message: '任务开始时间不能为空' }]"
/>
<van-field
v-model="form.endTime"
readonly
name="location"
label="任务结束时间"
:formatter="()=>{
return timestampToTimes(form.endTime)
}"
input-align="right"
:rules="[{ required: true, message: '任务结束时间不能为空' }]"
/>
<van-field
clickable
name="workUserNames"
:value="form.workUserNames"
label="执行人员"
input-align="right"
:rules="[{ required: true, message: '执行人员不能为空' }]"
/>
</van-form>
</van-tab>
<van-tab title="风险清单">
</van-tab>
<van-tab title="审核记录">
<div class="journal-wrap">
<van-cell-group inset >
<van-steps direction="vertical" :active="99999" v-if="riskLogList.length>0">
<van-step v-for="(item, index) in riskLogList" :key="index">
<div class="step-wrap">
<van-row>
<van-col span="24"><div class="info-title">{{timestampToTimes(item.startTime)}}</div></van-col>
</van-row>
<van-row>
<van-col span="7"
><span class="field-title">操作人:</span></van-col
>
<van-col span="17">{{item.approvalUserName}}</van-col>
</van-row>
<van-row>
<van-col span="7"
><span class="field-title">审批结果:</span></van-col
>
<van-col span="17">{{item.taskName}}</van-col>
</van-row>
<van-row>
<van-col span="7"
><span class="field-title">岗位:</span></van-col
>
<van-col span="17">{{item.taskResult}}</van-col>
</van-row>
<!-- <van-row>
<van-col span="7"
><span class="field-title">结果:</span></van-col
>
<van-col span="17">{{LogType(item.taskResult)}}</van-col>
</van-row> -->
</div>
</van-step>
</van-steps>
<div style="text-align: center;" v-if="riskLogList.length == 0">暂无数据</div>
</van-cell-group>
</div>
</van-tab>
<van-tab title="风险评估报告">
<div style="height: 1.5rem;
background-color: #fff;
border-bottom: 1px solid #97999a;
display: flex;
justify-content: space-between;
line-height: 1.5rem;
">
<div><van-icon name="column" size="26px"/></div>
<div style="flex-grow:1;line-height: 0.6rem">
<div>风险评估报告.PDF</div>
<div>2019-3-21 10:23 100KB</div>
</div>
<div>
<van-icon name="arrow" size="26px"/>
</div>
</div>
<div style="height: 1.5rem;
background-color: #fff;
border-bottom: 1px solid #97999a;
display: flex;
justify-content: space-between;
line-height: 1.5rem;
">
<div><van-icon name="column" size="26px"/></div>
<div style="flex-grow:1;line-height: 0.6rem">
<div>风险评估报告.PDF</div>
<div>2019-3-21 10:23 100KB</div>
</div>
<div>
<van-icon name="arrow" size="26px"/>
</div>
</div>
</van-tab>
</van-tabs>
</div>
<div style="display: flex;
justify-content: space-around;
background-color: #fff;
border-top: 1px solid #e3e3e3;
height: 1.5rem;
width: 100%;
text-align: center;
position: fixed;
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 style="color: #ec808d;font-size: 14px;font-weight: 600;">
<div style="font-size: 22px;"><van-icon name="success" /></div>
<div>任务完成</div>
</div> -->
</div>
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
import { timestampToTime, generateId } from "@/utils/format";
import { getFun, postFun } from "@/service/table.js";
export default {
name:'riskBigDetail',
components: {
LHeader,
},
data() {
return {
text: "任务单",
searchValue: "",
isHaveNews: false,
messageList: [],
riskLogList:[],
Loop: "", // 定时器
showIndex: null, // 是否显示遮罩层,
active: 0,
form:{
},
tabs: [
],
};
},
created() {
var planId=this.$route.params.id || sessionStorage.getItem('planId')
this.postList(planId);
},
methods: {
timestampToTimes(time){
return timestampToTime(new Date(time),"DT2", true)
},
performTasks(){
this.$router.push({
name: "riskInherent",
params: {
id:this.messageList.id
},
})
},
handadd(){
this.$router.push({
name: "riskAdd",
params: {
title:'新增'
},
})
},
postList(id) {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
getFun(`/risk/plan/details/${id}`)
.then((res) => {
this.$toast.clear();
this.messageList =res.data||res.rows;
this.form= this.messageList.detailsDto
this.riskLogList= this.messageList.approveListDtos
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
onSearch(val) {
this.postList(this.searchValue);
},
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return;
}
this.showIndex = index;
},
// 详情
goDetail(data) {
this.$router.push({
name: "riskBigDetail",
params: {
id: data.businessId||data.id,
},
});
sessionStorage.setItem('planId',data.id)
this.showIndex = null;
},
// 确认
goConfirm(data) {
this.$router.push({
name: "risk-affirm",
params: {
data: data,
},
});
this.showIndex = null;
},
},
};
</script>
<style lang="less" scoped>
#app {
font-family: "";
color: #2c3e50
}
.cell-wrap {
position: relative;
}
p {
font-size: 0.4rem;
font-weight: none;
padding-left: 0.16rem;
margin: 0.186667rem 0;
color: #7f7f7f;
}
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row {
margin-bottom: 0.133333rem;
line-height: 0.64rem;
}
}
.journal-wrap {
position: relative;
}
.supervise-wrap {
position: relative;
}
.info-title {
color: #2980f7;
font-weight: none;
}
.field-title {
color: black;
font-weight: none;
}
.more {
position: absolute;
bottom: 0.32rem;
right: 15px;
color: #2a80f7;
font-weight: none;
z-index: 99;
}
</style>
\ No newline at end of file
......@@ -26,7 +26,7 @@
{{ item.state }}
</van-row>
<van-row>
<van-button type="info" size="mini" @click="lookdetail(index, item)">查看详情</van-button>
<van-button type="info" size="mini" @click="lookdetail(index, item)">执行情况</van-button>
</van-row>
</van-col>
</van-row>
......@@ -45,8 +45,8 @@
<!-- {{messageList}} -->
</van-tab>
</van-tabs>
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex">
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex">
<div class="wrapper" @click.stop="showIndex = false">
</div>
......@@ -199,5 +199,12 @@ export default {
}
}
}
.wrapper {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
</style>
\ No newline at end of file
......@@ -41,6 +41,7 @@ export default {
return {
value: '',
riskList: [
{
key: "1",
// path: "/danger",
......
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