From 9b5905872468b7c7caef37372e548fbe665f73ef Mon Sep 17 00:00:00 2001 From: oldHome Date: Fri, 27 Jun 2025 19:57:32 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E7=BC=96=E8=BE=91=E8=A7=92=E8=89=B2=20?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BA=E6=9D=83=E9=99=90=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 6 +++--- src/views/layout/components/main/admin/add.vue | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index e488af7..24a2223 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -336,7 +336,7 @@ const routes = [ meta: { title: '单位管理', icon: 'iconfont icon-a-shanghu_choose2x1', - roles: ['master', 'admin'], + roles: ['master', 'admin', 'editor'], tapName: 'admin' }, children: [ @@ -346,7 +346,7 @@ const routes = [ meta: { title: '单位设置', icon: 'iconfont icon-dianpuguanli', - roles: ['master', 'admin'], + roles: ['master', 'admin', 'editor'], tapName: 'admin' } }, @@ -400,7 +400,7 @@ const routes = [ meta: { title: '账户编辑', icon: 'iconfont icon-huizhi', - roles: ['master', 'admin'], + roles: ['master', 'admin', 'editor'], tapName: 'admin', hidden: true } diff --git a/src/views/layout/components/main/admin/add.vue b/src/views/layout/components/main/admin/add.vue index 0768d9c..44f7c28 100644 --- a/src/views/layout/components/main/admin/add.vue +++ b/src/views/layout/components/main/admin/add.vue @@ -34,7 +34,7 @@ - + 管理员 编辑 @@ -77,7 +77,7 @@ export default { upFile: '', oldFile: '', pwd: '', - role: 'admin' + role: '' }, adminId: this.$route.params.id, // get参数 获取管理员id 没有为添加页面 pageState: 'add', // 页面状态 @@ -121,6 +121,7 @@ export default { this.form.name = data.name this.form.uname = data.uname this.form.oldFile = data.oldFile + this.form.role = data.role if (Object.keys(data).length === 0) { this.$message.warning('清空表单') } @@ -136,7 +137,7 @@ export default { const data = { name: this.admin.name, uname: this.admin.uname, - role: this.admin.role === 5 ? 'admin' : 'editor', + role: (Number(this.admin.role) === 5 || Number(this.admin.role) === 4) ? 'admin' : 'editor', oldFile: this.admin.photo, shop_id: this.admin.shop_id }