From 44f0822917eb31075a0ad1ce13da389240df35c3 Mon Sep 17 00:00:00 2001
From: cy <1664593601@qq.com>
Date: 星期六, 25 十一月 2023 11:49:53 +0800
Subject: [PATCH] feat: 人员角色编辑
---
admin-web/src/views/systemManger/server/user/editRole.vue | 26 ++++++++++++++++----------
admin-web/src/views/systemManger/server/user/edit.vue | 21 +++++++++++----------
2 files changed, 27 insertions(+), 20 deletions(-)
diff --git a/admin-web/src/views/systemManger/server/user/edit.vue b/admin-web/src/views/systemManger/server/user/edit.vue
index a68d1b5..a97169d 100644
--- a/admin-web/src/views/systemManger/server/user/edit.vue
+++ b/admin-web/src/views/systemManger/server/user/edit.vue
@@ -149,17 +149,18 @@
methods: {
// 鑾峰彇鎵�鏈夎鑹�
getAllRole() {
- const user = this.$store.getters.userInfo
+ // const user = this.$store.getters.userInfo
+ // this.data_scope = 1
+ // if (user.lv == 1) {
+ // this.data_scope = 1
+ // }
+ // if (user.lv == 2) {
+ // this.data_scope = 2
+ // }
+ // if (user.lv == 3) {
+ // this.data_scope = 3
+ // }
this.data_scope = 1
- if (user.lv == 1) {
- this.data_scope = 1
- }
- if (user.lv == 2) {
- this.data_scope = 2
- }
- if (user.lv == 3) {
- this.data_scope = 3
- }
role.listRoleByDataScope({dataScope: this.data_scope}).then(response => {
if (response) {
this.roleOptions = response;
diff --git a/admin-web/src/views/systemManger/server/user/editRole.vue b/admin-web/src/views/systemManger/server/user/editRole.vue
index a487e8b..c3d8432 100644
--- a/admin-web/src/views/systemManger/server/user/editRole.vue
+++ b/admin-web/src/views/systemManger/server/user/editRole.vue
@@ -76,16 +76,22 @@
// 鑾峰彇鎵�鏈夎鑹�
getAllRole() {
const user = this.$store.getters.userInfo
- if (user.lv == 1) {
- this.data_scope = 1
- }
- if (user.lv == 2) {
- this.data_scope = 2
- }
- if (user.lv == 3) {
- this.data_scope = 3
- }
- role.listRoleByDataScope({dataScope: this.data_scope}).then(response => {
+ // debugger
+ // if (user == undefined){
+ // this.data_scope = 1
+ // } else {
+ // if (user.lv==null|| user.lv== 1) {
+ // this.data_scope = 1
+ // }
+ // if (user.lv && user.lv== 2) {
+ // this.data_scope = 2
+ // }
+ // if (user.lv && user.lv== 3) {
+ // this.data_scope = 3
+ // }
+ // }
+ this.data_scope = 1
+ role.listRole({dataScope: this.data_scope}).then(response => {
if (response) {
this.roleOptions = response;
} else {
--
Gitblit v1.9.1