diff --git a/admin/src/app/views/auth/components/edit-role.vue b/admin/src/app/views/auth/components/edit-role.vue
index 63fc0285..ff85f573 100644
--- a/admin/src/app/views/auth/components/edit-role.vue
+++ b/admin/src/app/views/auth/components/edit-role.vue
@@ -24,6 +24,17 @@
:show-word-limit="true"
/>
+
+
+
+
+
+ 销售
+ 老师
+ 主管
+
+
+
@@ -142,6 +153,7 @@ const initialFormData = {
role_id: 0,
role_name: '',
status: 1,
+ role_key:'',
rules: [],
}
const formData: Record = reactive({ ...initialFormData })
diff --git a/admin/src/app/views/auth/role.vue b/admin/src/app/views/auth/role.vue
index 6193b95d..69a5b9ba 100644
--- a/admin/src/app/views/auth/role.vue
+++ b/admin/src/app/views/auth/role.vue
@@ -56,6 +56,15 @@
}}
+
+
+
+ 销售
+ 老师
+ 主管
+
+
+
request->params([
['role_name', ''],
['rules', []],
+ ['role_key',''],
['status', RoleStatusDict::ON],
]);
$this->validate($data, 'app\validate\sys\Role.add');
@@ -73,6 +74,7 @@ class Role extends BaseAdminController
$data = $this->request->params([
['role_name', ''],
['rules', []],
+ ['role_key',''],
['status', RoleStatusDict::ON],
]);
$this->validate($data, 'app\validate\sys\Role.edit');
diff --git a/niucloud/app/service/admin/sys/RoleService.php b/niucloud/app/service/admin/sys/RoleService.php
index 8474b493..b4c11dc5 100644
--- a/niucloud/app/service/admin/sys/RoleService.php
+++ b/niucloud/app/service/admin/sys/RoleService.php
@@ -46,7 +46,7 @@ class RoleService extends BaseAdminService
if(isset($data['role_name']) && $data['role_name'] !== '') {
$where[] = ['role_name', 'like', "%".$this->model->handelSpecialCharacter($data['role_name'])."%"];
}
- $field = 'role_id,role_name,status,create_time';
+ $field = 'role_id,role_name,role_key,status,create_time';
$search_model = $this->model->where($where)->field($field)->order('create_time desc')->append(['status_name']);
return $this->pageQuery($search_model);
}
@@ -71,7 +71,7 @@ class RoleService extends BaseAdminService
$where = array(
['status', '=', 1]
);
- return $this->model->where($where)->field('role_id,role_name,status,create_time')->select()->toArray();
+ return $this->model->where($where)->field('role_id,role_name,role_key,status,create_time')->select()->toArray();
}
/**