From 2e0d638664dab21ab1d2a75c67dce34c747d70b2 Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Thu, 23 Dec 2021 16:23:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4&=E4=BC=98=E5=8C=96=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/employee/manage/manage.vue | 25 +++++++++++++++++++++++-- src/store/index.js | 24 +++++++++++++++++------- 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/src/pages/employee/manage/manage.vue b/src/pages/employee/manage/manage.vue index a215fc9..8d94b6b 100644 --- a/src/pages/employee/manage/manage.vue +++ b/src/pages/employee/manage/manage.vue @@ -59,8 +59,19 @@ 权限: - 全部权限 - {{permissionObj[e] || ''}} + 全部权限 + + + {{permissionObj[e] || ''}} + + + @@ -114,11 +125,21 @@ export default { } }, onLoad(){ + }, onShow(){ this.refreshEmployList(); }, methods: { + // 是否全部权限 + isAllAuthor({ + adminLs = [], + localLs = [] + }){ + if(!localLs || !adminLs || !adminLs.length || !localLs.length)return false; + let _unAuthorLs = localLs.filter(ele=>!adminLs.includes(+ele.key)) + return !_unAuthorLs.length + }, // 移除员工 employeeDelete: util.debounce(function(){ let _employeeList = this.employeeInfo.employee || []; diff --git a/src/store/index.js b/src/store/index.js index 792fdc3..9cc9b2d 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -16,22 +16,32 @@ export default new Vuex.Store({ brandInfo: { brand: {} }, + // permissionObj: { // 权限代号对应 + // '1001': '营业额', + // '1002': '收款记录', + // '1003': '经营分析', + // '1004': '预约订单', + // '1005': '会员卡订单', + // '1006': '积分订单', + // '1007': '员工管理', + // '1008': '查询核销', + // '1009': '场地管理', + // '1010': '设备管理', + // '1011': '商品零售', + // '1012': '订单管理', + // '1013': '课程管理', + // }, permissionObj: { // 权限代号对应 '1001': '营业额', '1002': '收款记录', - '1003': '经营分析', - '1004': '预约订单', - '1005': '会员卡订单', - '1006': '积分订单', + '1012': '订单管理', '1007': '员工管理', - '1008': '查询核销', + '1008': '核销查询', '1009': '场地管理', '1010': '设备管理', '1011': '商品零售', - '1012': '订单管理', '1013': '课程管理', }, - // 场地占用提交页面信息 occupyInfo: { storeInfo: {}, // 店铺信息