Commit b7db97c9 authored by 杨帆's avatar 杨帆

Dev yf'

parent 18b6124e
...@@ -9,15 +9,15 @@ ...@@ -9,15 +9,15 @@
--> -->
<template> <template>
<div id="app"> <div id="app">
<!-- :style="{ height: showTab ?appHeight:'100%' }" 之前是给id为app-content 设置的内联样式 id="app-content" --> <!-- :style="{ height: showTab ?appHeight:'100%' }" 之前是给id为app-content 设置的内联样式 id="app-content" -->
<div> <div>
<transition :name="transitionName"> <transition :name="transitionName">
<keep-alive :include="cachePage"> <keep-alive :include="cachePage">
<router-view class="router-view" /> <router-view class="router-view" />
</keep-alive> </keep-alive>
</transition> </transition>
</div> </div>
<tab-bar v-if="showTab"></tab-bar> <tab-bar v-if="showTab"></tab-bar>
</div> </div>
</template> </template>
...@@ -26,116 +26,149 @@ import tabBar from "@/components/TabBar"; ...@@ -26,116 +26,149 @@ import tabBar from "@/components/TabBar";
export default { export default {
components: { components: {
tabBar, tabBar
}, },
data() { data() {
return { return {
appHeight: "", appHeight: "",
tabH: "", tabH: "",
rempx: 0, rempx: 0,
headH: "", headH: "",
screenH: "", screenH: "",
transitionName: "slide-left", transitionName: "slide-left",
cachePage: [ cachePage: ["riskAdd"],
'riskAdd' // 不需要展示底部tabbar的页面
], noTab: [
// 不需要展示底部tabbar的页面 "login",
noTab:["login", "login2", 'addCurrent','addPresent','addInherent','riskInherent',"choose-people","scan",'success','fail','warn','center','reset-pas-two','riskTaskList','riskBigDetail','riskView','resultPage'], "login2",
// cachePage预先定义的缓存页面 "addCurrent",
otherCache: [], "addPresent",
// 专门处理列表缓存的页面,这些页面缓存逻辑与其他缓存不一样去详情返回列表缓存,但是进入列表必须刷新,如何有需要缓存的列表请放到这里来。 "addInherent",
listCache:['insert-danger','confirme-danger','change-danger','review-danger','stand-book','major-danger','delay-approval', "riskInherent",
'my-delay','risk-account','risk-confirme','my-delay'], "choose-people",
// 'report-return', 'risk-return', 风险和隐患的上报退回不需要缓存 "scan",
}; "success",
"fail",
"warn",
"center",
"reset-pas-two",
"riskTaskList",
"riskBigDetail",
"riskView",
"resultPage",
"riskAppvoreText"
],
// 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() { mounted() {
// 这个配合列表路由使用缓存初始缓存页面 // 这个配合列表路由使用缓存初始缓存页面
this.otherCache=[...this.cachePage]; this.otherCache = [...this.cachePage];
let tabH = let tabH =
document document.getElementsByTagName("html")[0].style.fontSize.split("px")[0] *
.getElementsByTagName("html")[0] 1.33333;
.style.fontSize.split("px")[0] * 1.33333; let sH = document.documentElement.clientHeight;
let sH = document.documentElement.clientHeight; this.headH =
this.headH = document.getElementsByTagName("html")[0].style.fontSize.split("px")[0] *
document 1.5;
.getElementsByTagName("html")[0] +"px";
.style.fontSize.split("px")[0] * 1.5; this.appHeight = sH - tabH + "px";
+"px"; this.tabH = tabH + "px";
this.appHeight = sH - tabH + "px"; this.screenH = sH + "px";
this.tabH = tabH + "px";
this.screenH = sH + "px";
}, },
computed: { computed: {
showTab() { showTab() {
return !this.noTab.includes( return !this.noTab.includes(this.$route.name);
this.$route.name }
);
},
}, },
methods:{ methods: {
// 处理缓存的方法 // 处理缓存的方法
handleCache(roterFromName, roterToName, markRoterName){ handleCache(roterFromName, roterToName, markRoterName) {
if(roterToName == markRoterName){ if (roterToName == markRoterName) {
// 从定义缓存列表中移除 // 从定义缓存列表中移除
if(this.cachePage.findIndex(item => item == roterFromName) != -1){ if (this.cachePage.findIndex(item => item == roterFromName) != -1) {
this.cachePage.splice(this.cachePage.findIndex(item => item == roterFromName), 1) this.cachePage.splice(
} this.cachePage.findIndex(item => item == roterFromName),
}else{ 1
// 判断有无路由 加入缓存 );
if(this.cachePage.findIndex(item => item == roterFromName) == -1){ }
this.cachePage.push(roterFromName) } else {
} // 判断有无路由 加入缓存
} if (this.cachePage.findIndex(item => item == roterFromName) == -1) {
this.cachePage.push(roterFromName);
}
} }
}
}, },
watch: { watch: {
$route(to, from) { $route(to, from) {
// 列表操作去除缓存,刷新列表页 // 列表操作去除缓存,刷新列表页
if(from.name == 'confirme-danger' || to.name=='confirme-danger'){ // 隐患整改页面缓存处理 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("confirme-danger", to.name, "affirm-danger");
this.handleCache('change-danger', to.name, 'change-info') } else if (from.name == "change-danger" || to.name == "change-danger") {
}else if(from.name == 'review-danger' || to.name=='review-danger'){ // 隐患复查页面缓存处理 // 隐患整改页面缓存处理
this.handleCache('review-danger', to.name, 'review-add') this.handleCache("change-danger", to.name, "change-info");
}else if(from.name == 'major-danger' || to.name=='major-danger'){ // 企业审批页面缓存处理 } else if (from.name == "review-danger" || to.name == "review-danger") {
this.handleCache('major-danger', to.name, 'major-survey') // 隐患复查页面缓存处理
}else if(from.name == 'risk-confirme' || to.name=='risk-confirme'){ // 风险确认页面缓存处理 this.handleCache("review-danger", to.name, "review-add");
this.handleCache('risk-confirme', to.name, 'risk-affirm') } 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'){ if (from.name == "save-workbench") {
// 如何使从工作台进入列表页面在cachePage里添加页面 // 如何使从工作台进入列表页面在cachePage里添加页面
if((!this.cachePage.includes(to.name))&&this.listCache.includes(to.name)){ if (
this.cachePage.push(to.name) !this.cachePage.includes(to.name) &&
} this.listCache.includes(to.name)
} ) {
if(to.name=='save-workbench'){ this.cachePage.push(to.name);
// 如何回到工作台默认恢复预定义缓存页面 }
this.cachePage=[...this.otherCache]; }
} if (to.name == "save-workbench") {
// 如何回到工作台默认恢复预定义缓存页面
this.cachePage = [...this.otherCache];
}
// 有主级到次级 // 有主级到次级
if (to.meta.index > from.meta.index) { if (to.meta.index > from.meta.index) {
this.transitionName = "slide-left"; // 向左滑动 this.transitionName = "slide-left"; // 向左滑动
} else if (to.meta.index < from.meta.index) { } else if (to.meta.index < from.meta.index) {
// 由次级到主级 // 由次级到主级
this.transitionName = "slide-right"; this.transitionName = "slide-right";
} else { } else {
this.transitionName = ""; //同级无过渡效果 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;
...@@ -174,8 +207,6 @@ background-color: #f0f1f5; ...@@ -174,8 +207,6 @@ background-color: #f0f1f5;
// background-color: #f0f1f5; // background-color: #f0f1f5;
// overflow: auto; // overflow: auto;
width: 100%; width: 100%;
height: auto; height: auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
......
...@@ -3,199 +3,204 @@ import VueRouter from 'vue-router' ...@@ -3,199 +3,204 @@ import VueRouter from 'vue-router'
Vue.use(VueRouter) Vue.use(VueRouter)
const routes = [{ const routes = [{
path: '/', path: '/',
redirect: '/login' redirect: '/login'
}, },
// 登录页 // 登录页
{ {
path: '/login', path: '/login',
name: 'login', name: 'login',
component: () => import('../views/login.vue'), component: () => import('../views/login.vue'),
}, },
// 我的地盘页面 // 我的地盘页面
{ {
path: '/my', path: '/my',
name: 'my', name: 'my',
component: () => import('../views/my'), component: () => import('../views/my'),
}, },
{ {
path: '/my-role', path: '/my-role',
name: 'my-role', name: 'my-role',
meta: { meta: {
title: '我的权限' title: '我的权限'
}, },
component: () => import('@/views/my/role') component: () => import('@/views/my/role')
}, },
{ {
path: '/my-reset-pas', path: '/my-reset-pas',
name: 'my-reset-pas', name: 'my-reset-pas',
meta: { meta: {
title: '修改密码' title: '修改密码'
}, },
component: () => import('@/views/my/resetPas') component: () => import('@/views/my/resetPas')
}, },
// 安全工作台页面 // 安全工作台页面
{ {
path: '/save-workbench', path: '/save-workbench',
name: 'save-workbench', name: 'save-workbench',
component: () => import('../views/saveWorkbench'), component: () => import('../views/saveWorkbench'),
}, },
// 创建任务页面 // 创建任务页面
{ {
path: '/create-task', path: '/create-task',
name: 'create-task', name: 'create-task',
component: () => import('../views/createTask'), component: () => import('../views/createTask'),
}, },
// 选择任务类型 // 选择任务类型
{ {
path: '/task-type', path: '/task-type',
name: 'task-type', name: 'task-type',
component: () => import('../views/createTask/taskSubPage/taskType.vue'), component: () => import('../views/createTask/taskSubPage/taskType.vue'),
}, },
// 选择作业任务 // 选择作业任务
{ {
path: '/work-task', path: '/work-task',
name: 'work-task', name: 'work-task',
component: () => import('../views/createTask/taskSubPage/workTask'), component: () => import('../views/createTask/taskSubPage/workTask'),
}, },
// 选择作业综合班 // 选择作业综合班
{ {
path: '/work-class', path: '/work-class',
name: 'work-class', name: 'work-class',
component: () => import('../views/createTask/taskSubPage/workClass'), component: () => import('../views/createTask/taskSubPage/workClass'),
}, },
// 选择作业综合组 // 选择作业综合组
{ {
path: '/work-group', path: '/work-group',
name: 'work-group', name: 'work-group',
component: () => import('../views/createTask/taskSubPage/workGroup'), component: () => import('../views/createTask/taskSubPage/workGroup'),
}, },
// 选择作业负责人 // 选择作业负责人
{ {
path: '/work-leader', path: '/work-leader',
name: 'work-leader', name: 'work-leader',
component: () => import('../views/createTask/taskSubPage/workLeader'), component: () => import('../views/createTask/taskSubPage/workLeader'),
}, },
// 选择作业其他人员 // 选择作业其他人员
{ {
path: '/work-other-per', path: '/work-other-per',
name: 'work-other-per', name: 'work-other-per',
component: () => import('../views/createTask/taskSubPage/workOtherPer'), component: () => import('../views/createTask/taskSubPage/workOtherPer'),
}, },
// 选择微流域 // 选择微流域
{ {
path: '/micro-watersh', path: '/micro-watersh',
name: 'micro-watersh', name: 'micro-watersh',
component: () => import('../views/createTask/taskSubPage/microWatersh'), component: () => import('../views/createTask/taskSubPage/microWatersh'),
}, },
// 选择管段 // 选择管段
{ {
path: '/pipe-section', path: '/pipe-section',
name: 'pipe-section', name: 'pipe-section',
component: () => import('../views/createTask/taskSubPage/pipeSection'), component: () => import('../views/createTask/taskSubPage/pipeSection'),
}, },
// 选择车牌号 // 选择车牌号
{ {
path: '/license-plate', path: '/license-plate',
name: 'license-plate', name: 'license-plate',
component: () => import('../views/createTask/taskSubPage/licensePlate'), component: () => import('../views/createTask/taskSubPage/licensePlate'),
}, },
// 选择手杆爬行器 // 选择手杆爬行器
{ {
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', path: '/riskAdd',
name: 'riskAdd', name: 'riskAdd',
component: () => import('../views/riskProject/add'), component: () => import('../views/riskProject/add'),
}, },
//风险项目管理 //风险项目管理
{ {
path: '/riskManage', path: '/riskManage',
name: 'riskManage', name: 'riskManage',
component: () => import('../views/riskProject/manage'), component: () => import('../views/riskProject/manage'),
}, },
//风险评估 //风险评估
{ {
path: '/riskAssess', path: '/riskAssess',
name: 'riskAssess', name: 'riskAssess',
component: () => import('../views/riskProject/assess'), component: () => import('../views/riskProject/assess'),
}, },
//风险审批 //风险审批
{ {
path: '/riskApprove', path: '/riskApprove',
name: 'riskApprove', name: 'riskApprove',
component: () => import('../views/riskProject/approve'), component: () => import('../views/riskProject/approve'),
}, },
//风险台账 //风险台账
{ {
path: '/riskLedger', path: '/riskLedger',
name: 'riskLedger', name: 'riskLedger',
component: () => import('../views/riskProject/ledger'), component: () => import('../views/riskProject/ledger'),
}, },
//任务单 //任务单
{ {
path: '/riskTaskList', path: '/riskTaskList',
name: 'riskTaskList', name: 'riskTaskList',
component: () => import('../views/riskProject/add/taskList.vue'), component: () => import('../views/riskProject/add/taskList.vue'),
}, },
//固有风险列表 //固有风险列表
{ {
path: '/riskInherent', path: '/riskInherent',
name: 'riskInherent', name: 'riskInherent',
component: () => import('../views/riskProject/add/inherentRisks.vue'), component: () => import('../views/riskProject/add/inherentRisks.vue'),
}, },
//新增固有风险 //新增固有风险
{ {
path: '/addInherent', path: '/addInherent',
name: 'addInherent', name: 'addInherent',
component: () => import('../views/riskProject/add/addInherent.vue'), component: () => import('../views/riskProject/add/addInherent.vue'),
}, },
{//编辑固有风险 {//编辑固有风险
path: '/addCurrent', path: '/addCurrent',
name: 'addCurrent', name: 'addCurrent',
component: () => import('../views/riskProject/add/addCurrent.vue'), component: () => import('../views/riskProject/add/addCurrent.vue'),
}, },
{//新增现状风险 {//新增现状风险
path: '/addPresent ', path: '/addPresent ',
name: 'addPresent', name: 'addPresent',
component: () => import('../views/riskProject/add/addPresent.vue'), component: () => import('../views/riskProject/add/addPresent.vue'),
}, },
{//风险评估列表详情页 {//风险评估列表详情页
path: '/riskBigDetail', path: '/riskBigDetail',
name: 'riskBigDetail', name: 'riskBigDetail',
component: () => import('../views/riskProject/assess/riskBigDetail.vue'), component: () => import('../views/riskProject/assess/riskBigDetail.vue'),
}, },
{//执行情况管理 {//执行情况管理
path: '/riskExecution', path: '/riskExecution',
name: 'riskExecution', name: 'riskExecution',
component: () => import('../views/riskProject/execution/index.vue'), component: () => import('../views/riskProject/execution/index.vue'),
}, },
{//四色图 {//四色图
path: '/riskView', path: '/riskView',
name: 'riskView', name: 'riskView',
component: () => import('../views/drawCanvas/riskView.vue'), component: () => import('../views/drawCanvas/riskView.vue'),
}, },
{//任务台账 {//任务台账
path: '/taskLedger', path: '/taskLedger',
name: 'taskLedger', name: 'taskLedger',
component: () => import('../views/riskProject/taskLedger/index.vue'), component: () => import('../views/riskProject/taskLedger/index.vue'),
}, },
{//任务台账 {//任务台账
path: '/taskDetail', path: '/taskDetail',
name: 'taskDetail', name: 'taskDetail',
component: () => import('../views/riskProject/taskLedger/taskDetail.vue'), component: () => import('../views/riskProject/taskLedger/taskDetail.vue'),
}, },
{//任务台账 {//任务台账
path: '/resultPage', path: '/resultPage',
name: 'resultPage', name: 'resultPage',
component: () => import('../views/riskProject/add/resultPage.vue'), component: () => import('../views/riskProject/add/resultPage.vue'),
}, },
{//任务台账
path: '/riskAppvoreText',
name: 'riskAppvoreText',
component: () => import('../views/riskProject/add/riskAppvoreText.vue'),
}
] ]
const router = new VueRouter({ const router = new VueRouter({
......
<template>
<div>
<LHeader text="备注"></LHeader>
<van-field
v-model="messageText"
rows="10"
autosize
label="备注信息"
type="textarea"
maxlength="500"
placeholder="请输入备注信息"
show-word-limit
/>
<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="appvore"
style="color: #4bced0;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 { getFun, postFun } from "@/service/table.js";
export default {
name: "risk-appvore-text",
components: {
LHeader
},
data() {
return {
messageText: null,
result: null,
buildingIds: [],
planId: 0
};
},
created() {
this.result = this.$route.params.result;
this.buildingIds = this.$route.params.buildingIds;
this.planId = this.$route.params.planId;
},
methods: {
//审批
appvore() {
var buildingDtos = [];
for (let i = 0; i < this.buildingIds.length; i++) {
var buildingDto = {
buildingId: this.buildingIds[0],
taskResult: this.result,
taskOpinion: this.messageText
};
buildingDtos[i] = buildingDto;
}
console.log(buildingDtos);
var params = {
id: this.planId,
taskResult: this.result,
taskOpinion: this.messageText,
buildingDtos: buildingDtos
};
postFun("/risk/plan/approve", params)
.then(res => {
console.log(res);
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
this.$router.replace({
name: "riskApprove",
params: {}
});
}
},
watch: {}
};
</script>
...@@ -44,12 +44,7 @@ ...@@ -44,12 +44,7 @@
<van-step>评估审核</van-step> <van-step>评估审核</van-step>
<van-step>项目完成</van-step> <van-step>项目完成</van-step>
</van-steps> </van-steps>
<van-tabs <van-tabs v-model="active" color="#2980f7" animated offset-top="2.93rem">
v-model="active"
color="#2980f7"
animated
offset-top="2.93rem"
>
<van-tab title="任务详情"> <van-tab title="任务详情">
<van-form <van-form
:scroll-to-error="true" :scroll-to-error="true"
...@@ -359,7 +354,7 @@ ...@@ -359,7 +354,7 @@
bottom: 0;" bottom: 0;"
> >
<div <div
@click="approveTask" @click="approveTask(1)"
style="color: #4bced0;font-size: 14px;font-weight: 600;" style="color: #4bced0;font-size: 14px;font-weight: 600;"
> >
<div style="font-size: 22px;"> <div style="font-size: 22px;">
...@@ -375,6 +370,132 @@ ...@@ -375,6 +370,132 @@
<div>审批否决</div> <div>审批否决</div>
</div> </div>
</div> </div>
<!-- 否决弹出层 -->
<van-popup
v-model="isShowAppvoreList"
closeable
round
position="right"
:style="{ width: '90%', height: '100%' }"
>
<van-cell-group title="审批否决">
<!-- 内容列表 -->
<div class="con-list">
<van-checkbox-group v-model="checkValue">
<van-cell-group
inset
v-for="(item, index) in buildingList"
:key="index"
>
<van-row gutter="">
<van-col span="2">
<van-checkbox :name="item.buildingId" />
</van-col>
<van-col span="14">{{ 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="
{
checkValue = [item.buildingId];
approveTask(0);
}
"
>审批否决</van-button
>
</van-row></van-col
>
</van-row>
</van-cell-group>
</van-checkbox-group>
<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="
{
checkValue = [];
isShowAppvoreList = false;
}
"
style="color: #FB6260;font-size: 14px;font-weight: 600;"
>
<div style="font-size: 22px;"><van-icon name="cross" /></div>
<div>返回</div>
</div>
<div
@click="approveTask(0)"
style="color: #4bced0;font-size: 14px;font-weight: 600;"
>
<div style="font-size: 22px;"><van-icon name="success" /></div>
<div>确认</div>
</div>
</div>
<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> </div>
</template> </template>
...@@ -391,11 +512,17 @@ export default { ...@@ -391,11 +512,17 @@ export default {
return { return {
text: "任务单", text: "任务单",
searchValue: "", searchValue: "",
messageText: "",
checkValue: [],
plan: 0,
showIndex: false,
isShowAppvoreList: false,
isShowText: false,
isHaveNews: false, isHaveNews: false,
messageList: [], messageList: [],
riskLogList: [], riskLogList: [],
buildingList: [],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null, // 是否显示遮罩层,
active: 0, active: 0,
status: 0, status: 0,
pathAuth: "", pathAuth: "",
...@@ -420,12 +547,12 @@ export default { ...@@ -420,12 +547,12 @@ export default {
}; };
}, },
created() { created() {
var planId = this.$route.params.id || sessionStorage.getItem("planId"); this.planId = this.$route.params.id || sessionStorage.getItem("planId");
var buildingId = var buildingId =
this.$route.params.buildingId || sessionStorage.getItem("buildingId"); this.$route.params.buildingId || sessionStorage.getItem("buildingId");
this.pathAuth = sessionStorage.getItem("pathAuth"); this.pathAuth = sessionStorage.getItem("pathAuth");
this.postList(planId, buildingId); this.postList(this.planId, buildingId);
this.getRiskTaskList(planId, buildingId); this.getRiskTaskList(this.planId, buildingId);
}, },
methods: { methods: {
timestampToTimes(time) { timestampToTimes(time) {
...@@ -462,15 +589,43 @@ export default { ...@@ -462,15 +589,43 @@ export default {
console.log("删除任务"); console.log("删除任务");
}, },
//审批通过 //审批通过
approveTask() { approveTask(result) {
//TODO 审批通过 //TODO 审批通过
this.$router.push({
name: "riskAppvoreText",
params: {
planId: this.planId,
buildingIds: this.checkValue,
result: result
}
});
console.log("审批通过"); console.log("审批通过");
}, },
//审批否决 //审批否决
unApproveTask() { unApproveTask() {
if (this.status == 2) {
this.lookdetail(this.planId);
} else if (this.status == 3) {
this.approveTask(0);
}
//TODO 审批否决 //TODO 审批否决
console.log("审批否决"); console.log("审批否决");
}, },
//否决楼栋列表
lookdetail(id) {
this.isShowAppvoreList = true;
getFun("/risk/plan/allocation/building/list/" + id)
.then(res => {
console.log(res);
this.buildingList = res.data;
this.checkValue = this.buildingList.map(item => item.buildingId);
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
handadd() { handadd() {
this.$router.push({ this.$router.push({
name: "riskAdd", name: "riskAdd",
...@@ -504,6 +659,9 @@ export default { ...@@ -504,6 +659,9 @@ export default {
this.messageList = res.data || res.rows; this.messageList = res.data || res.rows;
console.log(this.messageList); console.log(this.messageList);
this.form = this.messageList.detailsDto; this.form = this.messageList.detailsDto;
this.checkValue = this.messageList.riskBuildingListDtos.map(
item => item.buildingId
);
this.riskLogList = this.messageList.approveListDtos; this.riskLogList = this.messageList.approveListDtos;
console.log(this.messageList.statusKey, 111); console.log(this.messageList.statusKey, 111);
switch (this.messageList.statusKey) { switch (this.messageList.statusKey) {
......
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