From f84328c40e4df8a9f2d506fac0a88f47d1ecf788 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 11 Sep 2023 13:31:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=89=A9=E4=B8=9A=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/vc-index/index-header.vue | 19 +++++++++++++++---- components/vc-index/index-undo.vue | 22 +++++++++++++++++----- components/vc-index/work-function.vue | 19 ++++++++++++++++++- 3 files changed, 50 insertions(+), 10 deletions(-) diff --git a/components/vc-index/index-header.vue b/components/vc-index/index-header.vue index 312f013..410e38e 100644 --- a/components/vc-index/index-header.vue +++ b/components/vc-index/index-header.vue @@ -28,25 +28,36 @@ icon: '/static/image/index/i_complaint.png', name: '投诉待办', url: '/pages/complaintList/complaintList', - undoCount:_data.complaint + undoCount:_data.complaint, + pri:'502021012519810021' }, { icon: '/static/image/index/i_repair.png', name: '报修待办', url: '/pages/repairDispatch/repairDispatch', - undoCount:_data.repair + undoCount:_data.repair, + pri:'502021012507510017' }, { icon: '/static/image/index/i_inspection.png', name: '待巡检', url: '/pages/inspection/inspection', - undoCount:_data.inspectionTaskCount + undoCount:_data.inspectionTaskCount, + pri:'502021012567490019' }, { icon: '/static/image/index/i_machine.png', name: '设备保养', url: '/pages/maintainance/maintainance', - undoCount:_data.maintainanceTaskCount + undoCount:_data.maintainanceTaskCount, + pri:'502022110923120007' }] }, _toPage: function(_item) { + if(!this.java110Context.hasPrivilege(_item.pri)){ + uni.showToast({ + icon:'none', + title:'无权限,联系管理员' + }); + return ; + } uni.navigateTo({ url: _item.url }) diff --git a/components/vc-index/index-undo.vue b/components/vc-index/index-undo.vue index a5b4546..351a15e 100644 --- a/components/vc-index/index-undo.vue +++ b/components/vc-index/index-undo.vue @@ -31,30 +31,42 @@ icon: '/static/image/index_apply_audit.png', name: '采购待办', url: '/pages/resource/purchaseApplyAuditOrders', - undoCount:_data.purchase + undoCount:_data.purchase, + pri:'502021052747070004' }, { icon: '/static/image/index_itemout_audit.png', name: '领用待办', url: '/pages/resource/itemOutAuditOrders', - undoCount:_data.collection + undoCount:_data.collection, + pri:'502021052762260006' }, { icon: '/static/image/index_allocation.png', name: '调拨待办', url: '/pages/resource/allocationStorehouseAuditOrders', - undoCount:_data.allocation + undoCount:_data.allocation, + pri:'502021052707250008' }, { icon: '/static/image/index_complaint.png', name: '物品放行', url: '/pages/itemRelease/itemRelease', - undoCount:_data.itemReleaseCount + undoCount:_data.itemReleaseCount, + pri:'502023011673900012' }, { icon: '/static/image/index_repair.png', name: '访客待办', url: '/pages/visit/visit', - undoCount:_data.visitUndoCount + undoCount:_data.visitUndoCount, + pri:'502023012597990035' }] }, _toPage: function(_item) { + if(!this.java110Context.hasPrivilege(_item.pri)){ + uni.showToast({ + icon:'none', + title:'无权限,联系管理员' + }); + return ; + } uni.navigateTo({ url: _item.url }) diff --git a/components/vc-index/work-function.vue b/components/vc-index/work-function.vue index 962306c..7832aee 100644 --- a/components/vc-index/work-function.vue +++ b/components/vc-index/work-function.vue @@ -33,6 +33,17 @@ data() { return { real_list: [], + real_list_noshow:[ + '/pages/complaintList/complaintList', + '/pages/repairDispatch/repairDispatch', + '/pages/inspection/inspection', + '/pages/maintainance/maintainance', + '/pages/resource/purchaseApplyAuditOrders', + '/pages/resource/itemOutAuditOrders', + '/pages/resource/allocationStorehouseAuditOrders', + '/pages/itemRelease/itemRelease', + '/pages/visit/visit', + ], reportMenus:[] }; }, @@ -55,7 +66,13 @@ console.log(_data); _data.forEach(_menu=>{ if(_menu.name == "物业手机版"){ - _that.real_list = _menu.childs; + let _childs = []; + _menu.childs.forEach(item=>{ + if(_that.real_list_noshow.indexOf(item.href) < 0){ + _childs.push(item); + } + }) + _that.real_list = _childs; } if(_menu.name == "手机报表"){ _that.reportMenus = _menu.childs;