Commit 7a526d85 authored by 胡占生's avatar 胡占生 🇨🇳

fix: 风险台账,风险评估,风险审批,任务管理 页面模块新增初始化

parent 26cfc50d
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>第三官网分公司App</title> <title>融通物管安全管理平台</title>
<link rel="stylesheet" href="//at.alicdn.com/t/font_1623819_3g3arzgtlmk.css"> <link rel="stylesheet" href="//at.alicdn.com/t/font_1623819_3g3arzgtlmk.css">
</head> </head>
<body> <body>
......
<!--
* 严肃声明:
* 开源版本请务必保留此注释头信息,若删除我方将保留所有法律责任追究!
* 本系统已申请软件著作权,受国家版权局知识产权以及国家计算机软件著作权保护!
* 可正常分享和学习源码,不得用于违法犯罪活动,违者必究!
* Copyright (c) 2020 陈尼克 all rights reserved.
* 版权所有,侵权必究!
*
-->
<template> <template>
<div id="app"> <div id="app">
<transition> <!-- :style="{ height: showTab ?appHeight:'100%' }" 之前是给id为app-content 设置的内联样式 id="app-content" -->
<keep-alive :include="cachePage"> <div>
<router-view class="router-view" /> <transition :name="transitionName">
</keep-alive> <keep-alive :include="cachePage">
</transition> <router-view class="router-view" />
</keep-alive>
</transition>
</div>
<tab-bar v-if="showTab"></tab-bar>
</div> </div>
</template> </template>
<script> <script>
import tabBar from "@/components/TabBar";
export default { export default {
components: {
tabBar,
},
data() { data() {
return { return {
cachePage: [], appHeight: "",
}; tabH: "",
rempx: 0,
headH: "",
screenH: "",
transitionName: "slide-left",
cachePage: [
'riskAdd'
],
// 不需要展示底部tabbar的页面
noTab:["login", "login2", "choose-people","scan",'success','fail','warn','center','reset-pas-two','riskTaskList'],
// cachePage预先定义的缓存页面
otherCache: [],
// 专门处理列表缓存的页面,这些页面缓存逻辑与其他缓存不一样去详情返回列表缓存,但是进入列表必须刷新,如何有需要缓存的列表请放到这里来。
listCache:['insert-danger','confirme-danger','change-danger','review-danger','stand-book','major-danger','delay-approval',
'my-delay','risk-account','risk-confirme','my-delay'],
// 'report-return', 'risk-return', 风险和隐患的上报退回不需要缓存
};
},
mounted() {
// 这个配合列表路由使用缓存初始缓存页面
this.otherCache=[...this.cachePage];
let tabH =
document
.getElementsByTagName("html")[0]
.style.fontSize.split("px")[0] * 1.33333;
let sH = document.documentElement.clientHeight;
this.headH =
document
.getElementsByTagName("html")[0]
.style.fontSize.split("px")[0] * 1.5;
+"px";
this.appHeight = sH - tabH + "px";
this.tabH = tabH + "px";
this.screenH = sH + "px";
},
computed: {
showTab() {
return !this.noTab.includes(
this.$route.name
);
},
},
methods:{
// 处理缓存的方法
handleCache(roterFromName, roterToName, markRoterName){
if(roterToName == markRoterName){
// 从定义缓存列表中移除
if(this.cachePage.findIndex(item => item == roterFromName) != -1){
this.cachePage.splice(this.cachePage.findIndex(item => item == roterFromName), 1)
}
}else{
// 判断有无路由 加入缓存
if(this.cachePage.findIndex(item => item == roterFromName) == -1){
this.cachePage.push(roterFromName)
}
}
}
},
watch: {
$route(to, from) {
// 列表操作去除缓存,刷新列表页
if(from.name == 'confirme-danger' || to.name=='confirme-danger'){ // 隐患整改页面缓存处理
this.handleCache('confirme-danger', to.name, 'affirm-danger')
}else if(from.name == 'change-danger' || to.name=='change-danger'){ // 隐患整改页面缓存处理
this.handleCache('change-danger', to.name, 'change-info')
}else if(from.name == 'review-danger' || to.name=='review-danger'){ // 隐患复查页面缓存处理
this.handleCache('review-danger', to.name, 'review-add')
}else if(from.name == 'major-danger' || to.name=='major-danger'){ // 企业审批页面缓存处理
this.handleCache('major-danger', to.name, 'major-survey')
}else if(from.name == 'risk-confirme' || to.name=='risk-confirme'){ // 风险确认页面缓存处理
this.handleCache('risk-confirme', to.name, 'risk-affirm')
}
// 列表页面动态添加缓存
if(from.name=='save-workbench'){
// 如何使从工作台进入列表页面在cachePage里添加页面
if((!this.cachePage.includes(to.name))&&this.listCache.includes(to.name)){
this.cachePage.push(to.name)
}
}
if(to.name=='save-workbench'){
// 如何回到工作台默认恢复预定义缓存页面
this.cachePage=[...this.otherCache];
}
// 有主级到次级
if (to.meta.index > from.meta.index) {
this.transitionName = "slide-left"; // 向左滑动
} else if (to.meta.index < from.meta.index) {
// 由次级到主级
this.transitionName = "slide-right";
} else {
this.transitionName = ""; //同级无过渡效果
}
},
}, },
}; };
</script> </script>
<style lang="less"> <style lang="less">
body{ body{
background-color: #f0f1f5; background-color: #f0f1f5;
} }
#app { #app {
font-family: "Avenir", Helvetica, Arial, sans-serif; font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
// text-align: center;
color: #2c3e50; color: #2c3e50;
// box-sizing: border-box;
// overflow: hidden;
// position: relative;
// overflow: hidden;
// height: 100vh;
// background-color: #f0f1f5;
// z-index:999999999999
}
#app-content {
box-sizing: border-box;
overflow: hidden;
position: absolute;
left: 0;
top: 0;
width: 100%;
overflow: hidden;
// padding-bottom: 1.3333rem;
height: 100%; // 此处新增height 为了解决ios适配问题
} }
.router-view { .router-view {
// width: 100%;
// height: 100%;
// position: absolute;
// top: 0;
// bottom: 0;
// margin: 0 auto;
// -webkit-overflow-scrolling: touch;
// background-color: #f0f1f5;
// overflow: auto;
width: 100%; width: 100%;
height: auto; height: auto;
-webkit-overflow-scrolling: touch;
background-color: #f0f1f5;
overflow: auto;
position: absolute; position: absolute;
top: 0; top: 0;
bottom: 0; bottom: 0;
margin: 0 auto; margin: 0 auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
padding-bottom: 50px;
box-sizing: border-box;
}
.slide-right-enter-active,
.slide-right-leave-active,
.slide-left-enter-active,
.slide-left-leave-active {
height: 100%;
will-change: transform;
transition: all 500ms;
position: absolute;
backface-visibility: hidden;
}
.slide-right-enter {
opacity: 0;
transform: translate3d(-100%, 0, 0);
}
.slide-right-leave-active {
opacity: 0;
transform: translate3d(100%, 0, 0);
}
.slide-left-enter {
opacity: 0;
transform: translate3d(100%, 0, 0);
} }
input{ .slide-left-leave-active {
border: none; opacity: 0;
outline: none; transform: translate3d(-100%, 0, 0);
-webkit-appearance: none;
-webkit-appearance: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
} }
</style> </style>
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="70px" height="70px" xmlns="http://www.w3.org/2000/svg">
<defs>
<filter x="319px" y="625px" width="70px" height="70px" filterUnits="userSpaceOnUse" id="filter2">
<feOffset dx="5" dy="5" in="SourceAlpha" result="shadowOffsetInner" />
<feGaussianBlur stdDeviation="5" in="shadowOffsetInner" result="shadowGaussian" />
<feComposite in2="shadowGaussian" operator="atop" in="SourceAlpha" result="shadowComposite" />
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.313725490196078 0 " in="shadowComposite" />
</filter>
<g id="widget3">
<path d="M 38.96484375 28.5481770833333 C 39.3771701388889 28.1358506944444 39.5833333333333 27.6475694444444 39.5833333333333 27.0833333333333 L 39.5833333333333 22.9166666666667 C 39.5833333333333 22.3524305555556 39.3771701388889 21.8641493055556 38.96484375 21.4518229166667 C 38.5525173611111 21.0394965277778 38.0642361111111 20.8333333333333 37.5 20.8333333333333 L 29.1666666666667 20.8333333333333 L 29.1666666666667 12.5 C 29.1666666666667 11.9357638888889 28.9605034722222 11.4474826388889 28.5481770833333 11.03515625 C 28.1358506944444 10.6228298611111 27.6475694444444 10.4166666666667 27.0833333333333 10.4166666666667 L 22.9166666666667 10.4166666666667 C 22.3524305555556 10.4166666666667 21.8641493055556 10.6228298611111 21.4518229166667 11.03515625 C 21.0394965277778 11.4474826388889 20.8333333333333 11.9357638888889 20.8333333333333 12.5 L 20.8333333333333 20.8333333333333 L 12.5 20.8333333333333 C 11.9357638888889 20.8333333333333 11.4474826388889 21.0394965277778 11.03515625 21.4518229166667 C 10.6228298611111 21.8641493055556 10.4166666666667 22.3524305555556 10.4166666666667 22.9166666666667 L 10.4166666666667 27.0833333333333 C 10.4166666666667 27.6475694444444 10.6228298611111 28.1358506944444 11.03515625 28.5481770833333 C 11.4474826388889 28.9605034722222 11.9357638888889 29.1666666666667 12.5 29.1666666666667 L 20.8333333333333 29.1666666666667 L 20.8333333333333 37.5 C 20.8333333333333 38.0642361111111 21.0394965277778 38.5525173611111 21.4518229166667 38.96484375 C 21.8641493055556 39.3771701388889 22.3524305555556 39.5833333333333 22.9166666666667 39.5833333333333 L 27.0833333333333 39.5833333333333 C 27.6475694444444 39.5833333333333 28.1358506944444 39.3771701388889 28.5481770833333 38.96484375 C 28.9605034722222 38.5525173611111 29.1666666666667 38.0642361111111 29.1666666666667 37.5 L 29.1666666666667 29.1666666666667 L 37.5 29.1666666666667 C 38.0642361111111 29.1666666666667 38.5525173611111 28.9605034722222 38.96484375 28.5481770833333 Z M 46.6471354166667 12.451171875 C 48.8823784722222 16.2814670138889 50 20.4644097222222 50 25 C 50 29.5355902777778 48.8823784722222 33.7185329861111 46.6471354166667 37.548828125 C 44.4118923611111 41.3791232638889 41.3791232638889 44.4118923611111 37.548828125 46.6471354166667 C 33.7185329861111 48.8823784722222 29.5355902777778 50 25 50 C 20.4644097222222 50 16.2814670138889 48.8823784722222 12.451171875 46.6471354166667 C 8.62087673611111 44.4118923611111 5.58810763888889 41.3791232638889 3.35286458333333 37.548828125 C 1.11762152777778 33.7185329861111 0 29.5355902777778 0 25 C 0 20.4644097222222 1.11762152777778 16.2814670138889 3.35286458333333 12.451171875 C 5.58810763888889 8.62087673611111 8.62087673611111 5.58810763888888 12.451171875 3.35286458333333 C 16.2814670138889 1.11762152777777 20.4644097222222 0 25 0 C 29.5355902777778 0 33.7185329861111 1.11762152777777 37.548828125 3.35286458333333 C 41.3791232638889 5.58810763888888 44.4118923611111 8.62087673611111 46.6471354166667 12.451171875 Z " fill-rule="nonzero" fill="#333333" stroke="none" fill-opacity="0.898039215686275" transform="matrix(1 0 0 1 324 630 )" />
</g>
</defs>
<g transform="matrix(1 0 0 1 -319 -625 )">
<use xlink:href="#widget3" filter="url(#filter2)" />
<use xlink:href="#widget3" />
</g>
</svg>
\ No newline at end of file
...@@ -105,7 +105,45 @@ const routes = [{ ...@@ -105,7 +105,45 @@ const routes = [{
path: '/work-device', path: '/work-device',
name: 'work-device', name: 'work-device',
component: () => import('../views/createTask/taskSubPage/workDevice'), component: () => import('../views/createTask/taskSubPage/workDevice'),
} },
//风险项目新增
{
path: '/riskAdd',
name: 'riskAdd',
component: () => import('../views/riskProject/add'),
},
//风险项目管理
{
path: '/riskManage',
name: 'riskManage',
component: () => import('../views/riskProject/manage'),
},
//风险项目评估
{
path: '/riskAssess',
name: 'riskAssess',
component: () => import('../views/riskProject/assess'),
},
//风险审批
{
path: '/riskApprove',
name: 'riskApprove',
component: () => import('../views/riskProject/approve'),
},
//风险台账
{
path: '/riskLedger',
name: 'riskLedger',
component: () => import('../views/riskProject/ledger'),
},
//风险台账
{
path: '/riskTaskList',
name: 'riskTaskList',
component: () => import('../views/riskProject/add/taskList.vue'),
},
] ]
const router = new VueRouter({ const router = new VueRouter({
......
import request from '@/utils/axios'
/*get请求*/
export function getFun(url,params) {
return request({
url: url,
method: 'get',
params
})
}
/* post请求 */
export function postFun(url,data) {
return request({
url: url,
method: 'post',
data
})
}
\ No newline at end of file
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
<div class="login" :style="{ backgroundImage: `url(${bg})` }"> <div class="login" :style="{ backgroundImage: `url(${bg})` }">
<div class="title"> <div class="title">
<div class="login-logo"> <div class="login-logo">
第三管网分公司 融通物管安全管理平台
</div> </div>
<div class="login-name">作业人员任务数据填报系统</div> <div class="login-name">Enterprise Business Data Monitoring</div>
</div> </div>
<div class="con" :style="{ backgroundImage: `url(${conBg})` }"> <div class="con" :style="{ backgroundImage: `url(${conBg})` }">
<div class="hello">Hello!</div> <div class="hello">Hello!</div>
<div class="welcome"> <div class="welcome">
欢迎登录<span>作业人员任务数据填报系统</span>! 欢迎登录<span></span>!
</div> </div>
<div class="login-form"> <div class="login-form">
<van-form @submit="onSubmit" :show-error-message="false" validate-trigger="onSubmit"> <van-form @submit="onSubmit" :show-error-message="false" validate-trigger="onSubmit">
...@@ -116,9 +116,8 @@ export default { ...@@ -116,9 +116,8 @@ export default {
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
.login { .login {
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
// background-position: center; background-attachment: fixed;
// background-attachment: fixed;
height: 100vh; height: 100vh;
overflow: hidden; overflow: hidden;
.title{ .title{
......
This diff is collapsed.
<template>
<!-- 提交 -->
<div>
<van-sticky offset-top="0">
<LHeader :text="text"></LHeader>
</van-sticky>
<van-grid :column-num="3">
<van-grid-item v-for="value in 5" :key="value">
<div>发起人员:</div>
<div>李小明</div>
</van-grid-item>
</van-grid>
<van-steps :active="active" active-icon="success" active-color="#38f">
<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="标签 1">
<van-form
:scroll-to-error="true"
:show-error="false"
validate-trigger="onSubmit"
>
<van-field
readonly
name="creatBy"
:value="form.creatBy"
label="创建人员"
:rules="[{ required: true, message: '创建人员不能为空' }]"
/>
<van-field
readonly
name="creatUnit"
:value="form.creatUnit"
label="创建单位"
:rules="[{ required: true, message: '创建单位不能为空' }]"
/>
<van-field
readonly
name="taskName"
:value="form.taskName"
label="任务名称"
:rules="[{ required: true, message: '任务名称不能为空' }]"
/>
<van-field
readonly
name="source"
:value="form.source"
label="关联项目"
:rules="[{ required: true, message: '关联项目不能为空' }]"
/>
<van-field
readonly
name="taskName"
:value="form.taskName"
label="评估楼栋"
:rules="[{ required: true, message: '评估楼栋不能为空' }]"
/>
<van-field
readonly
name="trouble"
:value="form.trouble"
label="项目负责人"
:rules="[{ required: true, message: '事故类型不能为空' }]"
/>
<van-field
v-model="form.startTime"
readonly
name="location"
label="任务开始时间"
type="textarea"
maxlength="255"
rows="1"
autosize
:rules="[{ required: true, message: '任务开始时间不能为空' }]"
/>
<van-field
v-model="form.endTime"
readonly
name="location"
label="任务结束时间"
type="textarea"
maxlength="255"
rows="1"
autosize
:rules="[{ required: true, message: '任务结束时间不能为空' }]"
/>
<van-field
clickable
required
name="control"
:value="form.control"
label="执行人员"
:rules="[{ required: true, message: '执行人员不能为空' }]"
/>
</van-form>
</van-tab>
<van-tab title="标签 2">内容 2</van-tab>
<van-tab title="标签 3">内容 3</van-tab>
<van-tab title="标签 4">内容 4</van-tab>
</van-tabs>
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
export default {
name:'risk-confirme',
components: {
LHeader,
},
data() {
return {
text: "任务单",
searchValue: "",
isHaveNews: false,
messageList: [
{
title:'XX项目评估任务单',
time:'2022-12-12',
name:'Mr.周',
state:1
}
],
Loop: "", // 定时器
showIndex: null, // 是否显示遮罩层,
active: 0,
form:{
},
tabs: [
],
};
},
created() {
// this.postList();s
},
methods: {
handadd(){
this.$router.push({
name: "riskAdd",
params: {
title:'新增'
},
})
},
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;
},
},
};
</script>
<style lang="less" scoped>
#app {
font-family: "";
color: #2c3e50
}
</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="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="">
<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-col>
<van-col span="7" :style="{'color':item.state == 1 ? '#0069e5':'#03b615'}">
{{ '●待审批'}}
</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-cell-group>
<div
style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if="messageList['length']==0"
>
暂无数据
</div>
</div>
<!-- 暂无数据 -->
<!-- {{messageList}} -->
<!-- </van-tab>
</van-tabs> -->
</div>
</template>
<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,
},
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",
},
],
};
},
created() {
// this.postList();s
},
methods: {
handadd(){
this.$router.push({
name: "riskAdd",
params: {
title:'新增'
},
})
},
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;
},
},
};
</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;
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%;
}
}
}
}
/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>
<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="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="">
<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-col>
<van-col span="7" :style="{'color':item.state == 1 ? '#0069e5':'#03b615'}">
{{ item.state==1?'●未执行':'●已执行' }}
</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-cell-group>
<div
style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if="messageList['length']==0"
>
暂无数据
</div>
</div>
<!-- 暂无数据 -->
<!-- {{messageList}} -->
<!-- </van-tab>
</van-tabs> -->
</div>
</template>
<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,
},
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",
},
],
};
},
created() {
// this.postList();s
},
methods: {
handadd(){
this.$router.push({
name: "riskAdd",
params: {
title:'新增'
},
})
},
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;
},
},
};
</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;
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%;
}
}
}
}
/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>
<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="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="">
<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-col>
<van-col span="7" :style="{'color':item.state == 1 ? '#0069e5':'#03b615'}">
{{ '●待审批'}}
</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-cell-group>
<div
style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if="messageList['length']==0"
>
暂无数据
</div>
</div>
<!-- 暂无数据 -->
<!-- {{messageList}} -->
<!-- </van-tab>
</van-tabs> -->
</div>
</template>
<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,
},
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",
},
],
};
},
created() {
// this.postList();s
},
methods: {
handadd(){
this.$router.push({
name: "riskAdd",
params: {
title:'新增'
},
})
},
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;
},
},
};
</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;
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%;
}
}
}
}
/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>
<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="con-list"
@touchmove="showIndex = null"
v-if="key == active"
>
<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="">
<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-col>
<van-col span="7" :style="{'color':item.state == 1 ? '#0069e5':'#03b615'}">
{{ item.state==1?'●未执行':'●已执行' }}
</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-cell-group>
<div
style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if="messageList['length']==0"
>
暂无数据
</div>
</div>
<!-- 暂无数据 -->
<!-- {{messageList}} -->
</van-tab>
</van-tabs>
<div style="width: 60px;position: fixed;right: 5%;top: 80%;" @click="handadd">
<img src="@/assets/accidentIcon/add.svg" alt="" width="100%" >
</div>
</div>
</template>
<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,
},
data() {
return {
text: "任务管理",
searchValue: "",
isHaveNews: false,
messageList: [
{
title:'XX项目评估任务单',
time:'2022-12-12',
name:'Mr.周',
state:1,
id:12
}
],
Loop: "", // 定时器
showIndex: null, // 是否显示遮罩层,
active: 0,
tabs: [
{
title: "未执行",
api: "/riskConfirm/list",
},
{
title: "已执行",
api: "/riskConfirm/finishList",
},
],
};
},
created() {
// this.postList();s
},
methods: {
handadd(){
this.$router.push({
name: "riskAdd",
params: {
title:'新增'
},
})
},
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: "riskTaskList",
params: {
id: data.businessId ||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;
}
.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%;
}
}
}
}
/deep/.van-tab__pane{
min-height: 8rem;
}
</style>
\ No newline at end of file
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<!-- 头部标签 --> <!-- 头部标签 -->
<van-sticky> <van-sticky>
<header class="header-wrap"> <header class="header-wrap">
我的任务 办公控制台
</header> </header>
</van-sticky> </van-sticky>
<van-search <!-- <van-search
v-model="value" v-model="value"
placeholder="搜索" placeholder="搜索"
@search="onSearch" @search="onSearch"
...@@ -14,8 +14,21 @@ ...@@ -14,8 +14,21 @@
<template #right-icon> <template #right-icon>
<van-icon name="add" @click="createdClick"/> <van-icon name="add" @click="createdClick"/>
</template> </template>
</van-search> </van-search> -->
<div class="con">
<van-cell-group inset>
<van-cell value="风险评估管理" />
<van-grid :column-num="5">
<van-grid-item
@click="dangerJump(item.path)"
v-for="item in riskList"
:key="item.key"
:icon="item.imgUrl"
:text="item.text"
/>
</van-grid>
</van-cell-group>
</div>
<!-- tanBar --> <!-- tanBar -->
<tab-bar :index="1"></tab-bar> <tab-bar :index="1"></tab-bar>
</div> </div>
...@@ -30,7 +43,40 @@ export default { ...@@ -30,7 +43,40 @@ export default {
}, },
data() { data() {
return { return {
value:'' value:'',
riskList: [
// {
// key: "1",
// path: "/riskAdd",
// imgUrl: require("@/assets/workbench/risk-report.png"),
// text: "任务创建",
// },
{
key: "2",
// path: "/danger",
path: "/riskManage",
imgUrl: require("@/assets/workbench/risk-report.png"),
text: "任务管理",
},
{
key: "3",
path: "/riskAssess",
imgUrl: require("@/assets/workbench/risk-confirm.png"),
text: "风险评估",
},
{
key: "4",
path: "/riskApprove",
imgUrl: require("@/assets/workbench/risk-account.png"),
text: "风险审批",
},
{
key: "5",
path: "/riskLedger",
imgUrl: require("@/assets/workbench/danger-account.png"),
text: "风险台账",
},
],
}; };
}, },
created() { created() {
...@@ -42,7 +88,17 @@ export default { ...@@ -42,7 +88,17 @@ export default {
}, },
createdClick(){ createdClick(){
this.$router.push('/create-task') this.$router.push('/create-task')
} },
dangerJump(path) {
if (path) {
if(path=='/add-danger'){
sessionStorage.removeItem('obj')
this.$router.push({name:'add-danger',params:{isWorkbenchTo:1}});
}else{
this.$router.push(path);
}
}
},
} }
}; };
</script> </script>
...@@ -57,4 +113,19 @@ export default { ...@@ -57,4 +113,19 @@ export default {
color: white; color: white;
text-align: center; text-align: center;
} }
.con {
// height: calc(100% - 110px);
// height: 100%;
padding: 10px 0 50px 0;
background-color: #f0f1f5;
/deep/ .van-grid-item__content--center {
// padding-left: 0px;
// padding-right: 0px;
padding: 0.22667rem 0px;
}
/deep/ .van-icon__image {
width: auto;
height: 1rem;
}
}
</style> </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