Loading src/App.vue +135 −104 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ import tabBar from "@/components/TabBar"; export default { components: { tabBar, tabBar }, data() { return { Loading @@ -36,16 +36,44 @@ export default { headH: "", screenH: "", transitionName: "slide-left", cachePage: [ 'riskAdd' ], cachePage: ["riskAdd"], // 不需要展示底部tabbar的页面 noTab:["login", "login2", 'addCurrent','addPresent','addInherent','riskInherent',"choose-people","scan",'success','fail','warn','center','reset-pas-two','riskTaskList','riskBigDetail','riskView','resultPage'], noTab: [ "login", "login2", "addCurrent", "addPresent", "addInherent", "riskInherent", "choose-people", "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'], 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', 风险和隐患的上报退回不需要缓存 }; }, Loading @@ -54,14 +82,12 @@ export default { // 这个配合列表路由使用缓存初始缓存页面 this.otherCache = [...this.cachePage]; let tabH = document .getElementsByTagName("html")[0] .style.fontSize.split("px")[0] * 1.33333; 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; document.getElementsByTagName("html")[0].style.fontSize.split("px")[0] * 1.5; +"px"; this.appHeight = sH - tabH + "px"; this.tabH = tabH + "px"; Loading @@ -69,10 +95,8 @@ export default { }, computed: { showTab() { return !this.noTab.includes( this.$route.name ); }, return !this.noTab.includes(this.$route.name); } }, methods: { // 处理缓存的方法 Loading @@ -80,12 +104,15 @@ export default { if (roterToName == markRoterName) { // 从定义缓存列表中移除 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), 1 ); } } else { // 判断有无路由 加入缓存 if (this.cachePage.findIndex(item => item == roterFromName) == -1) { this.cachePage.push(roterFromName) this.cachePage.push(roterFromName); } } } Loading @@ -93,27 +120,34 @@ export default { 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 == "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'){ if (from.name == "save-workbench") { // 如何使从工作台进入列表页面在cachePage里添加页面 if((!this.cachePage.includes(to.name))&&this.listCache.includes(to.name)){ this.cachePage.push(to.name) if ( !this.cachePage.includes(to.name) && this.listCache.includes(to.name) ) { this.cachePage.push(to.name); } } if(to.name=='save-workbench'){ if (to.name == "save-workbench") { // 如何回到工作台默认恢复预定义缓存页面 this.cachePage = [...this.otherCache]; } Loading @@ -127,12 +161,11 @@ export default { } else { this.transitionName = ""; //同级无过渡效果 } }, }, } } }; </script> <style lang="less"> body { background-color: #f0f1f5; Loading Loading @@ -174,8 +207,6 @@ background-color: #f0f1f5; // background-color: #f0f1f5; // overflow: auto; width: 100%; height: auto; -webkit-overflow-scrolling: touch; Loading src/router/index.js +196 −191 Original line number Diff line number Diff line Loading @@ -196,6 +196,11 @@ const routes = [{ name: 'resultPage', component: () => import('../views/riskProject/add/resultPage.vue'), }, {//任务台账 path: '/riskAppvoreText', name: 'riskAppvoreText', component: () => import('../views/riskProject/add/riskAppvoreText.vue'), } ] const router = new VueRouter({ Loading src/views/riskProject/add/riskAppvoreText.vue 0 → 100644 +93 −0 Original line number Diff line number Diff line <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> src/views/riskProject/add/taskList.vue +170 −12 Original line number Diff line number Diff line Loading @@ -44,12 +44,7 @@ <van-step>评估审核</van-step> <van-step>项目完成</van-step> </van-steps> <van-tabs v-model="active" color="#2980f7" animated offset-top="2.93rem" > <van-tabs v-model="active" color="#2980f7" animated offset-top="2.93rem"> <van-tab title="任务详情"> <van-form :scroll-to-error="true" Loading Loading @@ -359,7 +354,7 @@ bottom: 0;" > <div @click="approveTask" @click="approveTask(1)" style="color: #4bced0;font-size: 14px;font-weight: 600;" > <div style="font-size: 22px;"> Loading @@ -375,6 +370,132 @@ <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> </template> Loading @@ -391,11 +512,17 @@ export default { return { text: "任务单", searchValue: "", messageText: "", checkValue: [], plan: 0, showIndex: false, isShowAppvoreList: false, isShowText: false, isHaveNews: false, messageList: [], riskLogList: [], buildingList: [], Loop: "", // 定时器 showIndex: null, // 是否显示遮罩层, active: 0, status: 0, pathAuth: "", Loading @@ -420,12 +547,12 @@ export default { }; }, created() { var planId = this.$route.params.id || sessionStorage.getItem("planId"); this.planId = this.$route.params.id || sessionStorage.getItem("planId"); var buildingId = this.$route.params.buildingId || sessionStorage.getItem("buildingId"); this.pathAuth = sessionStorage.getItem("pathAuth"); this.postList(planId, buildingId); this.getRiskTaskList(planId, buildingId); this.postList(this.planId, buildingId); this.getRiskTaskList(this.planId, buildingId); }, methods: { timestampToTimes(time) { Loading Loading @@ -462,15 +589,43 @@ export default { console.log("删除任务"); }, //审批通过 approveTask() { approveTask(result) { //TODO 审批通过 this.$router.push({ name: "riskAppvoreText", params: { planId: this.planId, buildingIds: this.checkValue, result: result } }); console.log("审批通过"); }, //审批否决 unApproveTask() { if (this.status == 2) { this.lookdetail(this.planId); } else if (this.status == 3) { this.approveTask(0); } //TODO 审批否决 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() { this.$router.push({ name: "riskAdd", Loading Loading @@ -504,6 +659,9 @@ export default { this.messageList = res.data || res.rows; console.log(this.messageList); this.form = this.messageList.detailsDto; this.checkValue = this.messageList.riskBuildingListDtos.map( item => item.buildingId ); this.riskLogList = this.messageList.approveListDtos; console.log(this.messageList.statusKey, 111); switch (this.messageList.statusKey) { Loading Loading
src/App.vue +135 −104 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ import tabBar from "@/components/TabBar"; export default { components: { tabBar, tabBar }, data() { return { Loading @@ -36,16 +36,44 @@ export default { headH: "", screenH: "", transitionName: "slide-left", cachePage: [ 'riskAdd' ], cachePage: ["riskAdd"], // 不需要展示底部tabbar的页面 noTab:["login", "login2", 'addCurrent','addPresent','addInherent','riskInherent',"choose-people","scan",'success','fail','warn','center','reset-pas-two','riskTaskList','riskBigDetail','riskView','resultPage'], noTab: [ "login", "login2", "addCurrent", "addPresent", "addInherent", "riskInherent", "choose-people", "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'], 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', 风险和隐患的上报退回不需要缓存 }; }, Loading @@ -54,14 +82,12 @@ export default { // 这个配合列表路由使用缓存初始缓存页面 this.otherCache = [...this.cachePage]; let tabH = document .getElementsByTagName("html")[0] .style.fontSize.split("px")[0] * 1.33333; 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; document.getElementsByTagName("html")[0].style.fontSize.split("px")[0] * 1.5; +"px"; this.appHeight = sH - tabH + "px"; this.tabH = tabH + "px"; Loading @@ -69,10 +95,8 @@ export default { }, computed: { showTab() { return !this.noTab.includes( this.$route.name ); }, return !this.noTab.includes(this.$route.name); } }, methods: { // 处理缓存的方法 Loading @@ -80,12 +104,15 @@ export default { if (roterToName == markRoterName) { // 从定义缓存列表中移除 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), 1 ); } } else { // 判断有无路由 加入缓存 if (this.cachePage.findIndex(item => item == roterFromName) == -1) { this.cachePage.push(roterFromName) this.cachePage.push(roterFromName); } } } Loading @@ -93,27 +120,34 @@ export default { 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 == "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'){ if (from.name == "save-workbench") { // 如何使从工作台进入列表页面在cachePage里添加页面 if((!this.cachePage.includes(to.name))&&this.listCache.includes(to.name)){ this.cachePage.push(to.name) if ( !this.cachePage.includes(to.name) && this.listCache.includes(to.name) ) { this.cachePage.push(to.name); } } if(to.name=='save-workbench'){ if (to.name == "save-workbench") { // 如何回到工作台默认恢复预定义缓存页面 this.cachePage = [...this.otherCache]; } Loading @@ -127,12 +161,11 @@ export default { } else { this.transitionName = ""; //同级无过渡效果 } }, }, } } }; </script> <style lang="less"> body { background-color: #f0f1f5; Loading Loading @@ -174,8 +207,6 @@ background-color: #f0f1f5; // background-color: #f0f1f5; // overflow: auto; width: 100%; height: auto; -webkit-overflow-scrolling: touch; Loading
src/router/index.js +196 −191 Original line number Diff line number Diff line Loading @@ -196,6 +196,11 @@ const routes = [{ name: 'resultPage', component: () => import('../views/riskProject/add/resultPage.vue'), }, {//任务台账 path: '/riskAppvoreText', name: 'riskAppvoreText', component: () => import('../views/riskProject/add/riskAppvoreText.vue'), } ] const router = new VueRouter({ Loading
src/views/riskProject/add/riskAppvoreText.vue 0 → 100644 +93 −0 Original line number Diff line number Diff line <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>
src/views/riskProject/add/taskList.vue +170 −12 Original line number Diff line number Diff line Loading @@ -44,12 +44,7 @@ <van-step>评估审核</van-step> <van-step>项目完成</van-step> </van-steps> <van-tabs v-model="active" color="#2980f7" animated offset-top="2.93rem" > <van-tabs v-model="active" color="#2980f7" animated offset-top="2.93rem"> <van-tab title="任务详情"> <van-form :scroll-to-error="true" Loading Loading @@ -359,7 +354,7 @@ bottom: 0;" > <div @click="approveTask" @click="approveTask(1)" style="color: #4bced0;font-size: 14px;font-weight: 600;" > <div style="font-size: 22px;"> Loading @@ -375,6 +370,132 @@ <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> </template> Loading @@ -391,11 +512,17 @@ export default { return { text: "任务单", searchValue: "", messageText: "", checkValue: [], plan: 0, showIndex: false, isShowAppvoreList: false, isShowText: false, isHaveNews: false, messageList: [], riskLogList: [], buildingList: [], Loop: "", // 定时器 showIndex: null, // 是否显示遮罩层, active: 0, status: 0, pathAuth: "", Loading @@ -420,12 +547,12 @@ export default { }; }, created() { var planId = this.$route.params.id || sessionStorage.getItem("planId"); this.planId = this.$route.params.id || sessionStorage.getItem("planId"); var buildingId = this.$route.params.buildingId || sessionStorage.getItem("buildingId"); this.pathAuth = sessionStorage.getItem("pathAuth"); this.postList(planId, buildingId); this.getRiskTaskList(planId, buildingId); this.postList(this.planId, buildingId); this.getRiskTaskList(this.planId, buildingId); }, methods: { timestampToTimes(time) { Loading Loading @@ -462,15 +589,43 @@ export default { console.log("删除任务"); }, //审批通过 approveTask() { approveTask(result) { //TODO 审批通过 this.$router.push({ name: "riskAppvoreText", params: { planId: this.planId, buildingIds: this.checkValue, result: result } }); console.log("审批通过"); }, //审批否决 unApproveTask() { if (this.status == 2) { this.lookdetail(this.planId); } else if (this.status == 3) { this.approveTask(0); } //TODO 审批否决 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() { this.$router.push({ name: "riskAdd", Loading Loading @@ -504,6 +659,9 @@ export default { this.messageList = res.data || res.rows; console.log(this.messageList); this.form = this.messageList.detailsDto; this.checkValue = this.messageList.riskBuildingListDtos.map( item => item.buildingId ); this.riskLogList = this.messageList.approveListDtos; console.log(this.messageList.statusKey, 111); switch (this.messageList.statusKey) { Loading