From b51180bfbfed8ec8b532938be23291f43d982835 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=AF=BA?= <1253070437@qq.com> Date: Sat, 11 Mar 2023 23:43:28 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=9B=B4=E6=96=B0=E3=80=91=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E7=AE=A1=E7=90=86=E6=A8=A1=E5=9D=97=E4=B8=8B=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E8=AF=A5=E6=A8=A1=E5=9D=97=E5=AF=B9=E5=BA=94=E7=9A=84=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=E9=85=8D=E7=BD=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- snowy-admin-web/src/api/biz/bizUserApi.js | 10 + snowy-admin-web/src/locales/lang/en.js | 14 +- snowy-admin-web/src/locales/lang/zh-cn.js | 10 + snowy-admin-web/src/views/biz/user/impExp.vue | 105 +++++++ snowy-admin-web/src/views/biz/user/index.vue | 256 ++++++++++++------ snowy-admin-web/src/views/sys/user/index.vue | 25 +- 6 files changed, 323 insertions(+), 97 deletions(-) create mode 100644 snowy-admin-web/src/views/biz/user/impExp.vue diff --git a/snowy-admin-web/src/api/biz/bizUserApi.js b/snowy-admin-web/src/api/biz/bizUserApi.js index eff4af13..5b280fa0 100644 --- a/snowy-admin-web/src/api/biz/bizUserApi.js +++ b/snowy-admin-web/src/api/biz/bizUserApi.js @@ -69,5 +69,15 @@ export default { // 给人员授权角色 grantRole(data) { return request('grantRole', data) + }, + // 用户导入 + userImport(data) { + return request('import', data) + }, + // 用户导出 + userExport(data) { + return request('export', data, 'get', { + responseType: 'blob' + }) } } diff --git a/snowy-admin-web/src/locales/lang/en.js b/snowy-admin-web/src/locales/lang/en.js index c7a4d297..0ffd3222 100644 --- a/snowy-admin-web/src/locales/lang/en.js +++ b/snowy-admin-web/src/locales/lang/en.js @@ -18,8 +18,9 @@ export default { batchRemoveButton: 'batch Remove', detailButton: 'detail', searchKey: 'Search Key', - imports: 'import', - more: 'More' + imports: 'Import', + more: 'More', + export: 'Export', }, model: { user: 'user', @@ -58,5 +59,14 @@ export default { userStatus: 'User Status', resetPassword: 'Reset Password', role: 'Role', + batchExportButton: 'Batch Export', + grantRole: 'Grant Role', + grantResource: 'Grant Resource', + grantPermission: 'Grant Permission', + exportUserInfo: 'Export UserInfo', + placeholderNameAndSearchKey: 'Please enter your name or keyword', + placeholderUserStatus: 'Please select status', + popconfirmDeleteUser: 'Are you sure you want to delete it?', + popconfirmResatUserPwd: 'Are you sure you want to reset?' } } diff --git a/snowy-admin-web/src/locales/lang/zh-cn.js b/snowy-admin-web/src/locales/lang/zh-cn.js index 3ddfa113..7ee89578 100644 --- a/snowy-admin-web/src/locales/lang/zh-cn.js +++ b/snowy-admin-web/src/locales/lang/zh-cn.js @@ -22,6 +22,7 @@ export default { searchKey: '关键词', imports: '导入', more: '更多', + export: '导出', }, model: { user: '用户', @@ -60,5 +61,14 @@ export default { userStatus: '用户状态', resetPassword: '重置密码', role: '角色', + batchExportButton: '批量导出', + grantRole: '授权角色', + grantResource: '授权资源', + grantPermission: '授权权限', + exportUserInfo: '导出信息', + placeholderNameAndSearchKey: '请输入姓名或关键词', + placeholderUserStatus: '请选择状态', + popconfirmDeleteUser: '确定要删除吗?', + popconfirmResatUserPwd: '确定要重置吗?' } } diff --git a/snowy-admin-web/src/views/biz/user/impExp.vue b/snowy-admin-web/src/views/biz/user/impExp.vue new file mode 100644 index 00000000..5d1681b6 --- /dev/null +++ b/snowy-admin-web/src/views/biz/user/impExp.vue @@ -0,0 +1,105 @@ + + + diff --git a/snowy-admin-web/src/views/biz/user/index.vue b/snowy-admin-web/src/views/biz/user/index.vue index ce367be2..f18c73a4 100644 --- a/snowy-admin-web/src/views/biz/user/index.vue +++ b/snowy-admin-web/src/views/biz/user/index.vue @@ -14,6 +14,39 @@ + + + + + + + + + + + + {{ + item.name + }} + + + + + + + {{ $t('common.searchButton') }} + + + + {{ $t('common.resetButton') }} + + + + + @@ -108,13 +146,16 @@ :role-global="false" @onBack="roleBack" /> +