Commit df43f7d7 authored by dlkong's avatar dlkong

Merge branch 'develop' into dev_kdl

parents 1ec2d9e4 d7927ee9
......@@ -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','riskView'],
noTab:["login", "login2", 'addCurrent','addPresent','addInherent','riskInherent',"choose-people","scan",'success','fail','warn','center','reset-pas-two','riskTaskList','riskBigDetail','riskView'],
// 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>
......
......@@ -166,6 +166,16 @@ const routes = [{
name: 'addPresent',
component: () => import('../views/riskProject/add/addPresent.vue'),
},
{//风险评估列表详情页
path: '/riskBigDetail',
name: 'riskBigDetail',
component: () => import('../views/riskProject/assess/riskBigDetail.vue'),
},
{//执行情况管理
path: '/riskExecution',
name: 'riskExecution',
component: () => import('../views/riskProject/execution/index.vue'),
},
{//四色图
path: '/riskView',
name: 'riskView',
......
This diff is collapsed.
This diff is collapsed.
......@@ -61,14 +61,12 @@
<van-field
required
clickable
name="name"
v-model="form.name"
label="风险源名称"
placeholder="请输入"
:rules="[{ required: true, message: '风险源名称不能为空' }]"
/>
<van-field
v-model="form.factor"
required
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<template>
<!-- 提交 -->
<div>
<van-sticky offset-top="0">
<LHeader :text="text"></LHeader>
</van-sticky>
<van-tabs
v-model="active"
@change="postList"
color="#2980f7"
animated
:sticky="true"
>
<van-tab v-for="item in tabs" :key="item.key" :title="item.title">
<!-- 内容列表 -->
<div class="con-list">
<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.leaderUserName }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="9">发起时间:</van-col>
<van-col span="15">{{
timestampToTimes(item.startTime)
}}</van-col>
</van-row>
</van-col>
<van-col span="7">
<van-row
:style="{
color:
active == 0
? '#f79648'
: active == 1
? '#0069e5'
: '#03b615'
}"
>
{{ item.state }}
</van-row>
<van-row>
<van-button
type="info"
size="mini"
@click="lookdetail(index, item)"
>执行情况</van-button
>
</van-row>
</van-col>
</van-row>
</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>
<!-- 长按显示遮罩层 -->
<van-popup
v-model="showIndex"
closeable
round
position="right"
:style="{ width: '90%', height: '100%' }"
>
<van-cell-group title="执行情况">
<!-- 内容列表 -->
<div class="con-list">
<van-cell-group
inset
v-for="(item, index) in buildingList"
:key="index"
>
<van-row gutter="">
<van-col span="16">{{ item.buildingName }}</van-col>
<van-col
span="8"
:style="{
color:
item.status == 'wait'
? '#F79648'
: item.status == 'finish'
? '#03B615'
: '#FF041D'
}"
>{{
item.status == "wait"
? "待评估"
: item.status == "finish"
? "已完成"
: "已退回"
}}</van-col
>
</van-row>
<van-row>
<van-col span="18">
<van-row gutter="">
<van-col span="8">创 建 人:</van-col>
<van-col span="16">{{ item.createUserName }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="8">处理人员:</van-col>
<van-col span="16">{{ item.workUserNames }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="8">发起时间:</van-col>
<van-col span="16"
>{{ timestampToTimes(item.startTime) }}
</van-col>
</van-row>
</van-col>
<van-col span="6">
<van-row>
<van-button
type="info"
size="mini"
@click="todetail(index, item)"
>查看详情</van-button
>
</van-row></van-col
>
</van-row>
</van-cell-group>
<div
style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if="buildingList['length'] == 0"
>
暂无数据
</div>
</div>
</van-cell-group>
</van-popup>
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
import { timestampToTime, generateId } from "@/utils/format";
export default {
name: "risk-execution",
components: {
LHeader
},
data() {
return {
text: "执行情况管理",
searchValue: "",
isHaveNews: false,
messageList: [
{
title: "XX项目评估任务单",
time: "2022-12-12",
name: "Mr.周",
state: 1
}
],
Loop: "", // 定时器
showIndex: false, // 是否显示遮罩层,
active: 0,
// 状态 wait 待评估,running 执行中,finish 已完成
tabs: [
{
title: "待评估",
key: "wait"
},
{
title: "执行中",
key: "running"
},
{
title: "已完成",
key: "finish"
}
],
buildingList: []
};
},
created() {
this.postList(0);
},
methods: {
timestampToTimes(time) {
return timestampToTime(new Date(time), "DT2", true);
},
handadd() {
this.$router.push({
name: "riskAdd",
params: {
title: "新增"
}
});
},
postList(name, title) {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0
});
let url = `/risk/plan/allocation/list?status=wait`;
if (name == 0) {
url = `/risk/plan/allocation/list?status=wait`;
} else if (name == 1) {
url = `/risk/plan/allocation/list?status=running`;
} else {
url = `/risk/plan/allocation/list?status=finish`;
}
getFun(url)
.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);
},
//执行情况
lookdetail(index, item) {
this.showIndex = true;
console.log(item);
getFun("/risk/plan/allocation/building/list/" + item.id)
.then(res => {
console.log(res);
this.buildingList = res.data;
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
//查看详情
todetail(index, item) {
this.$router.push({
name: "riskTaskList",
params: {
id: item.id,
buildingId: item.buildingId
}
});
sessionStorage.setItem("planId", item.id);
sessionStorage.setItem("buildingId", item.buildingId);
this.showIndex = false;;
},
// 详情
goDetail(data) {
this.$router.push({
name: "risk-big-detail",
params: {
id: data.businessId || data.id
}
});
this.showIndex = false;
},
// 确认
goConfirm(data) {
this.$router.push({
name: "risk-affirm",
params: {
data: data
}
});
this.showIndex = false;
}
}
};
</script>
<style lang="less" scoped>
#app {
font-family: "";
color: #2c3e50;
}
.con-list {
padding: 0;
background-color: #f0f1f5;
position: relative;
.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;
line-height: 0.8rem;
margin-bottom: 0;
}
}
}
.wrapper {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
</style>
......@@ -122,7 +122,11 @@
active: 0,
tabs: [
{
title: "未执行",
title: "待执行",
api: "/risk/plan/create/list?status=wait",
},
{
title: "执行中",
api: "/risk/plan/create/list?status=running",
},
{
......
......@@ -42,7 +42,7 @@
<script>
import tabBar from "@/components/TabBar";
import { getFun,postFun } from '@/service/table'
import { getFun, postFun } from '@/service/table'
export default {
components: {
tabBar
......@@ -120,6 +120,7 @@ export default {
this.getMenuList()
},
methods: {
//查询角色菜单列表
getMenuList(){
getFun('/menu/roleMenuTreeselect').then((res) => {
......@@ -137,22 +138,44 @@ export default {
console.log('err==>>',err)
})
},
onSearch(){
workBenchList() {
getFun(`/menu/getMenu`).then(res => {
if (res.code == 200) {
this.powerObj = res.data;
if (this.powerObj.风险评估管理) {
this.finalRiskList = [
...this.riskList
].filter((x) =>
[...this.powerObj.风险评估管理].some(
(y) => (`/${y.path}`) == x.path
)
);
} else {
this.finalRiskList = [];
}
console.log(this.finalRiskList)
} else {
this.powerObj = {}
}
});
},
onSearch() {
},
createdClick(){
this.$router.push('/create-task')
createdClick() {
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);
}
}
},
if (path) {
if (path == '/add-danger') {
sessionStorage.removeItem('obj')
this.$router.push({ name: 'add-danger', params: { isWorkbenchTo: 1 } });
} else {
this.$router.push(path);
}
}
},
}
};
</script>
......@@ -167,20 +190,23 @@ export default {
color: white;
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;
}
// 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;
}
}
.notice-swipe {
height: 40px;
......
......@@ -9,7 +9,8 @@ module.exports = {
proxy: { //配置跨域
'/app-api': {
// target: 'http://192.168.4.232:8080/', //这里是后台的地址
// target: 'http://192.168.10.137:8080/', //这里是后台的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: 'http://192.168.10.137:8080/', //这里是昊哥的地址
target: 'http://192.168.10.36:8080/', //这里是后台的地址
ws: true,
changOrigin: true, //允许跨域
......
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