mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-16 12:57:15 +08:00
feat: 新增用户批量导入功能 (#23)
This commit is contained in:
@@ -25,6 +25,15 @@ export type UserDetailResp = UserResp & {
|
||||
pwdResetTime?: string
|
||||
}
|
||||
|
||||
export interface UserImportResp {
|
||||
importKey: string
|
||||
totalRows: number
|
||||
validRows: number
|
||||
duplicateUserRows: number
|
||||
duplicateEmailRows: number
|
||||
duplicatePhoneRows: number
|
||||
}
|
||||
|
||||
export interface UserQuery {
|
||||
description?: string
|
||||
status?: number
|
||||
|
@@ -30,10 +30,25 @@ export function deleteUser(ids: string | Array<string>) {
|
||||
|
||||
/** @desc 导出用户 */
|
||||
export function exportUser(query: System.UserQuery) {
|
||||
return http.download<any>(`${BASE_URL}/export`, query)
|
||||
return http.download(`${BASE_URL}/export`, query)
|
||||
}
|
||||
|
||||
/** @desc 重置密码 */
|
||||
export function resetUserPwd(data: any, id: string) {
|
||||
return http.patch(`${BASE_URL}/${id}/password`, data)
|
||||
}
|
||||
|
||||
/** @desc 下载用户导入模板 */
|
||||
export function downloadImportUserTemplate() {
|
||||
return http.download(`${BASE_URL}/downloadImportUserTemplate`)
|
||||
}
|
||||
|
||||
/** @desc 解析用户导入数据 */
|
||||
export function parseImportUser(data: FormData) {
|
||||
return http.post(`${BASE_URL}/parseImportUser`, data)
|
||||
}
|
||||
|
||||
/** @desc 导入用户 */
|
||||
export function importUser(data: any) {
|
||||
return http.post(`${BASE_URL}/import`, data)
|
||||
}
|
||||
|
Reference in New Issue
Block a user