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 @@ + + + 导入数据格式严格按照系统模板进行数据录入,请点击 + 下载模板 + + + + + + + + + 单击或拖动文件到此区域进行上传 + 仅支持xls、xlsx格式文件 + + + + + + 导入总数:{{ impResultData.totalCount }} 条 + 导入成功:{{ impResultData.successCount }} 条 + + 失败条数:{{ impResultData.errorCount }} 条 + + + + + + + + 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') }} + + searchFormRef.resetFields()"> + + {{ $t('common.resetButton') }} + + + + + - - - - - - - - - - - {{ - item.name - }} - - - - - {{ $t('common.searchButton') }} - searchFormRef.resetFields()">{{ - $t('common.resetButton') - }} - - - - {{ $t('common.addButton') }}{{ $t('model.bizUser') }} - - {{ - $t('common.batchRemoveButton') - }} - - - + + + + {{ $t('common.addButton') }}{{ $t('model.user') }} + + + + {{ $t('common.imports') }} + + + + {{ $t('user.batchExportButton') }} + + + + + {{ $t('common.batchRemoveButton') }} + + + @@ -82,18 +103,35 @@ {{ $t('common.editButton') }} - - 角色 - - - 重置密码 - - - + + {{ $t('common.removeButton') }} + + + + {{ $t('common.more') }} + + + + + + + {{ $t('user.resetPassword') }} + + + + {{ $t('user.grantRole') }} + + + + @@ -108,13 +146,16 @@ :role-global="false" @onBack="roleBack" /> +
+ +
单击或拖动文件到此区域进行上传
仅支持xls、xlsx格式文件
导入总数:{{ impResultData.totalCount }} 条
导入成功:{{ impResultData.successCount }} 条
失败条数:{{ impResultData.errorCount }} 条