From 503c2866be64d0769f04afb9728f2f0fd7b90800 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com>
Date: Thu, 13 Apr 2023 07:17:31 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96ui?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/role/index.vue | 43 ++++++++++++++++++++-------------
src/views/system/user/index.vue | 3 +++
2 files changed, 29 insertions(+), 17 deletions(-)
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index 2416d4f..b0c1a43 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -41,7 +41,11 @@
@change="handleStatusChange(scope.row)">
-
+
+
+ {{ scope.row.userNum }}
+
+
@@ -221,24 +225,24 @@ const showRoleScope = ref(false)
const dataScopeOptions = ref([
{
dictValue: '1',
- dictLabel: '全部',
+ dictLabel: '全部'
},
{
dictValue: '2',
- dictLabel: '自定义',
+ dictLabel: '自定义'
},
{
dictValue: '3',
- dictLabel: '本部门',
+ dictLabel: '本部门'
},
{
dictValue: '4',
- dictLabel: '本部门及以下',
+ dictLabel: '本部门及以下'
},
{
dictValue: '5',
- dictLabel: '仅本人',
- },
+ dictLabel: '仅本人'
+ }
])
// 菜单列表
const menuOptions = ref([])
@@ -250,7 +254,7 @@ const queryParams = reactive({
pageSize: 10,
roleName: undefined,
roleKey: undefined,
- status: undefined,
+ status: undefined
})
const searchText = ref('')
@@ -259,12 +263,12 @@ const state = reactive({
rules: {
roleName: [{ required: true, message: '角色名称不能为空', trigger: 'blur' }],
roleKey: [{ required: true, message: '权限字符不能为空', trigger: 'blur' }],
- roleSort: [{ required: true, message: '角色顺序不能为空', trigger: 'blur' }],
+ roleSort: [{ required: true, message: '角色顺序不能为空', trigger: 'blur' }]
},
defaultProps: {
children: 'children',
- label: 'label',
- },
+ label: 'label'
+ }
})
const menuRef = ref()
const deptRef = ref()
@@ -332,7 +336,7 @@ function handleStatusChange(row) {
.$confirm('确认要"' + text + '""' + row.roleName + '"角色吗?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
- type: 'warning',
+ type: 'warning'
})
.then(function () {
return changeRoleStatus(row.roleId, row.status)
@@ -370,7 +374,7 @@ function reset() {
dataScope: '1',
menuCheckStrictly: true,
deptCheckStrictly: true,
- remark: undefined,
+ remark: undefined
})
proxy.resetForm('form')
}
@@ -504,14 +508,19 @@ function handleDataScope(row) {
roleId: row.roleId,
roleName: row.roleName,
roleKey: row.roleKey,
- menuCheckStrictly: row.menuCheckStrictly,
+ menuCheckStrictly: row.menuCheckStrictly
}
}
const router = useRouter()
/** 分配用户操作 */
function handleAuthUser(row) {
const roleId = row.roleId
- router.push({ path: '/system/roleusers', query: { roleId } })
+ var hasPermi = proxy.$auth.hasPermi(['system:role:authorize', 'system:roleusers:list'])
+ if (hasPermi) {
+ router.push({ path: '/system/roleusers', query: { roleId } })
+ } else {
+ proxy.$modal.msgError('你没有权限访问')
+ }
}
/** 提交按钮 */
function submitForm() {
@@ -563,7 +572,7 @@ function handleDelete(row) {
.$confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
- type: 'warning',
+ type: 'warning'
})
.then(function () {
return delRole(roleIds)
@@ -580,7 +589,7 @@ function handleExport() {
.$confirm('是否确认导出所有角色数据项?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
- type: 'warning',
+ type: 'warning'
})
.then(function () {
return exportRole(queryParams)
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 25e2a0b..bd780c1 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -146,6 +146,7 @@
v-if="scope.row.userId !== 1"
text
icon="Key"
+ title="重置密码"
@click="handleResetPwd(scope.row)"
v-hasPermi="['system:user:resetPwd']">
@@ -222,6 +223,8 @@
+ {{ item.roleName }}
+ {{ item.roleKey }}