Commit c27c1d32 authored by 王李辉's avatar 王李辉

增加退回页面

parent 4fe88fcb
...@@ -253,24 +253,26 @@ const routes = [ ...@@ -253,24 +253,26 @@ const routes = [
component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/my'), component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/my'),
}, },
{ {
path: '/danger', path: '/add-danger',
name: 'danger', name: 'add-danger',
meta: { meta: {
title:'隐患上报', title:'新增隐患',
index: 1 index: 1
}, },
component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/danger/addDanger'), component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/danger/addDanger/addDanger'),
}, },
{ {
path: '/add-danger', path: '/report-return',
name: 'add-danger', name: 'report-return',
meta: { meta: {
title:'新增隐患', title:'隐患上报已退回',
index: 1 index: 1
}, },
component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/danger/addDanger/addDanger'), component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/danger/reportReturn'),
}, },
{ {
path: '/confirme-danger', path: '/confirme-danger',
name: 'confirme-danger', name: 'confirme-danger',
...@@ -393,6 +395,17 @@ const routes = [ ...@@ -393,6 +395,17 @@ const routes = [
}, },
component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskAdd'), component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskAdd'),
}, },
{
path: '/risk-return',
name: 'risk-return',
meta: {
title:'风险上报',
index: 1
},
component: () => import(/* webpackChunkName: "SaveWorkbench" */ '../views/risk/riskReturn'),
},
{ {
path: '/risk-confirme', path: '/risk-confirme',
name: 'risk-confirme', name: 'risk-confirme',
......
<template> <template>
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<van-form <van-form
@submit="onSubmit" @submit="onSubmit"
:scroll-to-error="true" :scroll-to-error="true"
:show-error='false' :show-error="false"
validate-trigger="onSubmit" validate-trigger="onSubmit"
> >
<van-field
v-if="isShowreturnCause"
v-model="returnCause"
readonly
rows="1"
autosize=""
label="退回原因"
name="退回原因"
type="textarea"
/>
<van-field <van-field
readonly readonly
clickable clickable
...@@ -26,7 +39,6 @@ ...@@ -26,7 +39,6 @@
/> />
</van-popup> </van-popup>
<van-field <van-field
readonly readonly
clickable clickable
...@@ -83,7 +95,7 @@ ...@@ -83,7 +95,7 @@
@cancel="showDangerName = false" @cancel="showDangerName = false"
/> />
</van-popup> </van-popup>
<van-field <van-field
v-model="dangerNum" v-model="dangerNum"
readonly readonly
...@@ -119,7 +131,6 @@ ...@@ -119,7 +131,6 @@
/> />
</van-popup> </van-popup>
<van-field <van-field
readonly readonly
clickable clickable
...@@ -159,7 +170,7 @@ ...@@ -159,7 +170,7 @@
</van-popup> </van-popup>
<van-field <van-field
v-model=" location" v-model="location"
name="检查部位" name="检查部位"
label="检查部位" label="检查部位"
placeholder="请输入" placeholder="请输入"
...@@ -242,7 +253,7 @@ ...@@ -242,7 +253,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import { timestampToTime } from '@/utils/format' import { timestampToTime } from "@/utils/format";
export default { export default {
components: { components: {
LHeader LHeader
...@@ -261,19 +272,24 @@ export default { ...@@ -261,19 +272,24 @@ export default {
columnsType: ["隐患类型1", "隐患类型2", "隐患类型3", "隐患类型4"], columnsType: ["隐患类型1", "隐患类型2", "隐患类型3", "隐患类型4"],
dangerName: "", //隐患项目名称 dangerName: "", //隐患项目名称
showDangerName: false, showDangerName: false,
columnsDangerName: ["隐患项目名称1", "隐患项目名称2", "隐患项目名称3", "隐患项目名称4"], columnsDangerName: [
dangerNum: "",//隐患项目编号 "隐患项目名称1",
dangerLevel: "",//隐患项目级别 "隐患项目名称2",
findTime: "",//隐患发现时间 "隐患项目名称3",
"隐患项目名称4"
],
dangerNum: "", //隐患项目编号
dangerLevel: "", //隐患项目级别
findTime: "", //隐患发现时间
showFindTime: false, showFindTime: false,
source: "",// 风险源 source: "", // 风险源
showSource: false, showSource: false,
columnsSource: ["人的因素", "物的因素", "环境因素", "管理因素"], columnsSource: ["人的因素", "物的因素", "环境因素", "管理因素"],
source1: "",// 风险源第二个字段 source1: "", // 风险源第二个字段
showSource1: false, showSource1: false,
columnsSource1: ["人的因素", "物的因素", "环境因素", "管理因素"], columnsSource1: ["人的因素", "物的因素", "环境因素", "管理因素"],
location: "", // 检查部位 location: "", // 检查部位
describe: "",// 隐患描述 describe: "", // 隐患描述
uploaderImg: [], //图像上传 uploaderImg: [], //图像上传
uploaderVideo: [], //视频上传 uploaderVideo: [], //视频上传
expireTime: "", // 隐患到期时间 expireTime: "", // 隐患到期时间
...@@ -281,10 +297,18 @@ export default { ...@@ -281,10 +297,18 @@ export default {
recPeople: "", recPeople: "",
showRecPeople: false, showRecPeople: false,
columnsRecPeople: ["张三", "李四", "王五"] columnsRecPeople: ["张三", "李四", "王五"],
returnCause: "你这不行啊", // 退回原因
isShowreturnCause: false
}; };
}, },
mounted() {},
created() {
if (this.$route.query.status) {
this.isShowreturnCause = true;
this.text = "隐患上报退回"
}
},
methods: { methods: {
onSubmit(values) { onSubmit(values) {
console.log("submit", values); console.log("submit", values);
...@@ -311,7 +335,7 @@ export default { ...@@ -311,7 +335,7 @@ export default {
}, },
// 隐患发现时间 // 隐患发现时间
onConFindTime(date) { onConFindTime(date) {
this.findTime = timestampToTime(date,'DT1',true) this.findTime = timestampToTime(date, "DT1", true);
this.showFindTime = false; this.showFindTime = false;
}, },
// 风险源 // 风险源
...@@ -319,14 +343,14 @@ export default { ...@@ -319,14 +343,14 @@ export default {
this.source = value; this.source = value;
this.showSource = false; this.showSource = false;
}, },
// 风险源第二个字段 // 风险源第二个字段
onConSource1(value) { onConSource1(value) {
this.source1 = value; this.source1 = value;
this.showSource1 = false; this.showSource1 = false;
}, },
// 隐患到期时间 // 隐患到期时间
onConExpireTime(date) { onConExpireTime(date) {
this.expireTime = timestampToTime(date,'DT1',true) this.expireTime = timestampToTime(date, "DT1", true);
this.showExpireTime = false; this.showExpireTime = false;
}, },
// 隐患整改人 // 隐患整改人
...@@ -337,7 +361,7 @@ export default { ...@@ -337,7 +361,7 @@ export default {
cancel() { cancel() {
this.$router.go(-1); this.$router.go(-1);
}, }
} }
}; };
</script> </script>
......
<template>
<div>
<!-- 内容列表 -->
<div class="con-list">
<van-cell-group
inset
v-for="(item, index) in messageList"
:key="index"
@click="read(item)"
@touchstart="touchstart(index, item)"
@touchend.prevent="touchend(index)"
>
<div class="messgae-title">{{ item.noticeTitle }}</div>
<div class="message-content">
{{ item.upcomingUserName }},您好!您有一条来自{{
item.createUserName
}}{{ item.noticeTitle }}相关的待处理任务...
</div>
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop>
<van-button round type="primary" @touchstart="goDetail(item)"
>详情</van-button
>
<van-button round type="info" @touchstart="goDelete(item)"
>修改</van-button
>
</div>
</van-overlay>
</van-cell-group>
</div>
<!-- 加号 -->
<div class="add" @click="goAdd">+</div>
</div>
</template>
<script>
import { dangerReturn } from "@/service/danger";
export default {
data() {
return {
messageList: [
{
noticeTitle: "隐患上报消息",
upcomingUserName: "张某某",
createUserName: "李某某",
noticeTitle: "重要任务"
}
],
Loop: "", // 定时器
showIndex: null // 是否显示遮罩层
};
},
created() {
this.postList()
},
methods: {
// 请求已退回列表数据
postList(){
dangerReturn('hdreport/list').then(res =>{
if(res.code == 0){
console.log(res);
}
})
},
goAdd(){
this.$router.push('/add-danger');
},
read(){},
touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if(this.showIndex != null){
this.showIndex = null;
return
}
this.Loop = setTimeout(() => {
this.showIndex = index
},300); // 这里的1000是指需要长按的时间,单位为ms
},
touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval(this.Loop);
},
// 详情
goDetail(data){
console.log(data);
this.showIndex = null
},
// 删除
goDelete(data){
console.log(data);
this.showIndex = null
},
}
};
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
// 内容
.con-list {
padding: 10px 10px 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.message-content {
margin-top: 10px;
}
.van-overlay{
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
.add{
width: 1.333333rem;
height: 1.333333rem;
color: white;
font-weight: bold;
font-size: 1.48rem;
background-color: #02a7f0;
text-align: center;
line-height: 1.333333rem;
border-radius: 50%;
position: fixed;
right: .533333rem;
bottom: 1.866667rem;
}
</style>
...@@ -2,42 +2,22 @@ ...@@ -2,42 +2,22 @@
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" /> <van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<van-tabs
v-model="active"
color="#247df7"
title-inactive-colo="#d0d1d1"
title-active-color="#000000"
>
<van-tab title="待提交">
<wait-submit></wait-submit>
</van-tab>
<van-tab title="已提交">
<committed></committed>
</van-tab>
<van-tab title="已退回">
<returned></returned> <returned></returned>
</van-tab>
</van-tabs>
</div> </div>
</template> </template>
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import WaitSubmit from "./waitSubmit";
import Returned from "./returned"; import Returned from "./returned";
import Committed from './committed';
export default { export default {
components: { components: {
LHeader: LHeader, LHeader: LHeader,
WaitSubmit,
Returned, Returned,
Committed
}, },
data() { data() {
return { return {
text: "隐患上报", text: "上报退回",
active: "1",
searchValue: "" searchValue: ""
}; };
}, },
......
...@@ -10,12 +10,23 @@ ...@@ -10,12 +10,23 @@
@touchstart="touchstart(index, item)" @touchstart="touchstart(index, item)"
@touchend.prevent="touchend(index)" @touchend.prevent="touchend(index)"
> >
<div class="messgae-title">{{ item.noticeTitle }}</div> <van-row gutter="">
<div class="message-content"> <van-col span="7">所属工程名称:</van-col>
{{ item.upcomingUserName }},您好!您有一条来自{{ <van-col span="17">{{ item.project }}</van-col>
item.createUserName </van-row>
}}{{ item.noticeTitle }}相关的待处理任务... <van-row gutter="">
</div> <van-col span="7">隐患项目名称:</van-col>
<van-col span="17">{{ item.subject }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7">隐患发现时间:</van-col>
<van-col span="17">{{ item.findTime }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7">隐患级别:</van-col>
<van-col span="17">{{ item.level }}</van-col>
</van-row>
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
...@@ -23,16 +34,13 @@ ...@@ -23,16 +34,13 @@
<van-button round type="primary" @touchstart="goDetail(item)" <van-button round type="primary" @touchstart="goDetail(item)"
>详情</van-button >详情</van-button
> >
<van-button round type="info" @touchstart="goDelete(item)" <van-button round type="warning" @touchstart="goDelete(item)"
>修改</van-button >删除</van-button
> >
</div> </div>
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
</div> </div>
<!-- 加号 -->
<div class="add" @click="goAdd">+</div>
</div> </div>
</template> </template>
...@@ -42,10 +50,10 @@ export default { ...@@ -42,10 +50,10 @@ export default {
return { return {
messageList: [ messageList: [
{ {
noticeTitle: "隐患上报消息", project: "朝阳区和平街14区简易住宅楼改造项目",
upcomingUserName: "张某某", subject: "临时用电施工组织设计未对盾构施工用电进行专项说明。",
createUserName: "李某某", findTime: "2021-10-26 16:30:00",
noticeTitle: "重要任务" level: "一般隐患A"
} }
], ],
Loop: "", // 定时器 Loop: "", // 定时器
...@@ -54,21 +62,17 @@ export default { ...@@ -54,21 +62,17 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
read() {},
goAdd(){
this.$router.push('/add-danger');
},
read(){},
touchstart(index, item) { touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器 clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if(this.showIndex != null){ if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return return;
} }
this.Loop = setTimeout(() => { this.Loop = setTimeout(() => {
this.showIndex = index this.showIndex = index;
},300); // 这里的1000是指需要长按的时间,单位为ms }, 300); // 这里的1000是指需要长按的时间,单位为ms
}, },
touchend(index) { touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零 // 这个方法主要是用来将每次手指移出之后将计时器清零
...@@ -76,59 +80,46 @@ export default { ...@@ -76,59 +80,46 @@ export default {
}, },
// 详情 // 详情
goDetail(data){ goDetail(data) {
console.log(data); console.log(data);
this.showIndex = null this.$router.push({
path: '/add-danger',
query: {status: "退回"}
});
this.showIndex = null;
}, },
// 删除 // 删除
goDelete(data){ goDelete(data) {
console.log(data); console.log(data);
this.showIndex = null this.showIndex = null;
}, }
} }
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
// 内容 .con-list {
.con-list { padding: 10px 10px 0;
padding: 10px 10px 0;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 10px; margin-bottom: 10px;
padding: 10px; padding: 10px;
font-size: 13px; font-size: 13px;
position: relative; position: relative;
.van-row{
.message-content { margin-bottom: .133333rem;
margin-top: 10px; line-height: .64rem;
}
} .van-overlay {
.van-overlay{ position: absolute;
position: absolute; .wrapper {
.wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-evenly; justify-content: space-evenly;
height: 100%; height: 100%;
} }
}
} }
} }
.add{ }
width: 1.333333rem;
height: 1.333333rem;
color: white;
font-weight: bold;
font-size: 1.48rem;
background-color: #02a7f0;
text-align: center;
line-height: 1.333333rem;
border-radius: 50%;
position: fixed;
right: .533333rem;
bottom: 1.866667rem;
}
</style> </style>
...@@ -7,6 +7,16 @@ ...@@ -7,6 +7,16 @@
:show-error="false" :show-error="false"
validate-trigger="onSubmit" validate-trigger="onSubmit"
> >
<van-field
v-if="isShowreturnCause"
v-model="returnCause"
readonly
rows="1"
autosize=""
label="退回原因"
name="退回原因"
type="textarea"
/>
<van-field <van-field
readonly readonly
clickable clickable
...@@ -309,9 +319,16 @@ export default { ...@@ -309,9 +319,16 @@ export default {
administrationImg:[],//管理措施图片 administrationImg:[],//管理措施图片
urgent:"", //应急措施文字 urgent:"", //应急措施文字
urgentImg:[],//应急措施图片 urgentImg:[],//应急措施图片
returnCause: "你这不行啊", // 退回原因
isShowreturnCause: false
}; };
}, },
mounted() {}, created() {
if (this.$route.query.status) {
this.isShowreturnCause = true;
this.text = "风险上报退回"
}
},
methods: { methods: {
onSubmit(values) { onSubmit(values) {
console.log("submit", values); console.log("submit", values);
......
<template>
<div>
<LHeader :text="text"></LHeader>
<van-search v-model="searchValue" placeholder="搜索" @search="onSearch" />
<risk-returned></risk-returned>
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
import RiskReturned from "./riskReturned";
export default {
components: {
LHeader: LHeader,
RiskReturned,
},
data() {
return {
text: "上报退回",
searchValue: ""
};
},
mounted() {},
methods: {
onSearch(val) {
console.log(val);
},
}
};
</script>
<style scoped>
/* @import url(); 引入css类 */
</style>
...@@ -10,12 +10,23 @@ ...@@ -10,12 +10,23 @@
@touchstart="touchstart(index, item)" @touchstart="touchstart(index, item)"
@touchend.prevent="touchend(index)" @touchend.prevent="touchend(index)"
> >
<div class="messgae-title">{{ item.noticeTitle }}</div> <van-row gutter="">
<div class="message-content"> <van-col span="7">所属工程名称:</van-col>
{{ item.upcomingUserName }},您好!您有一条来自{{ <van-col span="17">{{ item.project }}</van-col>
item.createUserName </van-row>
}}{{ item.noticeTitle }}相关的待处理任务... <van-row gutter="">
</div> <van-col span="7">隐患项目名称:</van-col>
<van-col span="17">{{ item.subject }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7">隐患发现时间:</van-col>
<van-col span="17">{{ item.findTime }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="7">隐患级别:</van-col>
<van-col span="17">{{ item.level }}</van-col>
</van-row>
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
...@@ -23,16 +34,13 @@ ...@@ -23,16 +34,13 @@
<van-button round type="primary" @touchstart="goDetail(item)" <van-button round type="primary" @touchstart="goDetail(item)"
>详情</van-button >详情</van-button
> >
<van-button round type="info" @touchstart="goDelete(item)" <van-button round type="warning" @touchstart="goDelete(item)"
>修改</van-button >删除</van-button
> >
</div> </div>
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
</div> </div>
<!-- 加号 -->
<div class="add" @click="goAdd">+</div>
</div> </div>
</template> </template>
...@@ -42,10 +50,10 @@ export default { ...@@ -42,10 +50,10 @@ export default {
return { return {
messageList: [ messageList: [
{ {
noticeTitle: "隐患上报消息", project: "朝阳区和平街14区简易住宅楼改造项目",
upcomingUserName: "wang某某", subject: "临时用电施工组织设计未对盾构施工用电进行专项说明。",
createUserName: "李某某", findTime: "2021-10-26 16:30:00",
noticeTitle: "重要任务" level: "一般隐患A"
} }
], ],
Loop: "", // 定时器 Loop: "", // 定时器
...@@ -54,21 +62,17 @@ export default { ...@@ -54,21 +62,17 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
read() {},
goAdd(){
this.$router.push('/add-danger');
},
read(){},
touchstart(index, item) { touchstart(index, item) {
clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器 clearTimeout(this.Loop); //再次清空延时器,防止重复注册定时器
if(this.showIndex != null){ if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return return;
} }
this.Loop = setTimeout(() => { this.Loop = setTimeout(() => {
this.showIndex = index this.showIndex = index;
},300); // 这里的1000是指需要长按的时间,单位为ms }, 300); // 这里的1000是指需要长按的时间,单位为ms
}, },
touchend(index) { touchend(index) {
// 这个方法主要是用来将每次手指移出之后将计时器清零 // 这个方法主要是用来将每次手指移出之后将计时器清零
...@@ -76,59 +80,46 @@ export default { ...@@ -76,59 +80,46 @@ export default {
}, },
// 详情 // 详情
goDetail(data){ goDetail(data) {
console.log(data); console.log(data);
this.showIndex = null this.$router.push({
path: '/risk-add',
query: {status: "退回"}
});
this.showIndex = null;
}, },
// 删除 // 删除
goDelete(data){ goDelete(data) {
console.log(data); console.log(data);
this.showIndex = null this.showIndex = null;
}, }
} }
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
// 内容 .con-list {
.con-list { padding: 10px 10px 0;
padding: 10px 10px 0;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 10px; margin-bottom: 10px;
padding: 10px; padding: 10px;
font-size: 13px; font-size: 13px;
position: relative; position: relative;
.van-row{
.message-content { margin-bottom: .133333rem;
margin-top: 10px; line-height: .64rem;
}
} .van-overlay {
.van-overlay{ position: absolute;
position: absolute; .wrapper {
.wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-evenly; justify-content: space-evenly;
height: 100%; height: 100%;
} }
}
} }
} }
.add{ }
width: 1.333333rem;
height: 1.333333rem;
color: white;
font-weight: bold;
font-size: 1.48rem;
background-color: #02a7f0;
text-align: center;
line-height: 1.333333rem;
border-radius: 50%;
position: fixed;
right: .533333rem;
bottom: 1.866667rem;
}
</style> </style>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<van-cell value="风控分级管控" /> <van-cell value="风控分级管控" />
<van-grid :column-num="5"> <van-grid :column-num="5">
<van-grid-item <van-grid-item
@click="riskJump(item.path)" @click="riskJump(item.path)"
v-for="item in finalRiskList" v-for="item in finalRiskList"
:key="item.key" :key="item.key"
:icon="item.imgUrl" :icon="item.imgUrl"
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<van-cell value="隐患排查治理" /> <van-cell value="隐患排查治理" />
<van-grid :column-num="5"> <van-grid :column-num="5">
<van-grid-item <van-grid-item
@click="dangerJump(item.path)" @click="dangerJump(item.path)"
v-for="item in finalDangerList" v-for="item in finalDangerList"
:key="item.key" :key="item.key"
:icon="item.imgUrl" :icon="item.imgUrl"
...@@ -131,14 +131,14 @@ export default { ...@@ -131,14 +131,14 @@ export default {
text: "风险上报" text: "风险上报"
}, },
{ {
key: "2", key: "3",
path:"/risk-confirme", path: "/risk-confirme",
imgUrl: require("@/assets/workbench/risk-confirm.png"), imgUrl: require("@/assets/workbench/risk-confirm.png"),
text: "风险确认" text: "风险确认"
}, },
{ {
key: "3", key: "4",
path:"/risk-account", path: "/risk-account",
imgUrl: require("@/assets/workbench/risk-account.png"), imgUrl: require("@/assets/workbench/risk-account.png"),
text: "风险台账" text: "风险台账"
} }
...@@ -153,13 +153,7 @@ export default { ...@@ -153,13 +153,7 @@ export default {
text: "隐患上报" text: "隐患上报"
}, },
{ {
key: "2", key: "3",
path: "/add-danger",
imgUrl: require("@/assets/workbench/rectification-notice.png"),
text: "上报退回"
},
{
key: "3",
path: "/confirme-danger", path: "/confirme-danger",
imgUrl: require("@/assets/workbench/danger-confirm.png"), imgUrl: require("@/assets/workbench/danger-confirm.png"),
text: "隐患确认" text: "隐患确认"
...@@ -251,12 +245,12 @@ export default { ...@@ -251,12 +245,12 @@ export default {
this.$router.push(path); this.$router.push(path);
} }
}, },
dangerJump(path){ dangerJump(path) {
if (path) { if (path) {
this.$router.push(path); this.$router.push(path);
} }
}, },
riskJump(path){ riskJump(path) {
if (path) { if (path) {
this.$router.push(path); this.$router.push(path);
} }
...@@ -275,6 +269,19 @@ export default { ...@@ -275,6 +269,19 @@ export default {
this.finalRiskList = [...this.riskList].filter(x => this.finalRiskList = [...this.riskList].filter(x =>
[...this.powerObj.风险分级管控].some(y => y.menuName === x.text) [...this.powerObj.风险分级管控].some(y => y.menuName === x.text)
); );
// 如果有隐患上报权限 则在添加一个 上报退回的权限
this.powerObj.风险分级管控.map(item => {
if (item.menuName == "风险上报") {
let obj = {
key: "2",
path: "/risk-return",
imgUrl: require("@/assets/workbench/plane-approval.png"),
text: "上报退回"
};
this.finalRiskList.splice(1, 0, obj);
}
});
} else { } else {
this.finalRiskList = []; this.finalRiskList = [];
} }
...@@ -283,6 +290,18 @@ export default { ...@@ -283,6 +290,18 @@ export default {
this.finalDangerList = [...this.dangerList].filter(x => this.finalDangerList = [...this.dangerList].filter(x =>
[...this.powerObj.隐患排查治理].some(y => y.menuName === x.text) [...this.powerObj.隐患排查治理].some(y => y.menuName === x.text)
); );
// 如果有隐患上报权限 则在添加一个 上报退回的权限
this.powerObj.隐患排查治理.map(item => {
if (item.menuName == "隐患上报") {
let obj = {
key: "2",
path: "/report-return",
imgUrl: require("@/assets/workbench/rectification-notice.png"),
text: "上报退回"
};
this.finalDangerList.splice(1, 0, obj);
}
});
} else { } else {
this.finalDangerList = []; this.finalDangerList = [];
} }
......
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