|
|
@@ -74,9 +74,9 @@ export function toggleUser ({ userId, userName }, enabled) {
|
|
|
}, enabled ? '启用' : '停用')
|
|
|
}
|
|
|
|
|
|
-export function deleteUser (userId) {
|
|
|
+export function deleteUser ({ userId, userName }) {
|
|
|
return messageSend({
|
|
|
- url: `/admin/users/${userId}`,
|
|
|
+ url: `/admin/users/${userId}?userName=${userName}`,
|
|
|
method: 'DELETE'
|
|
|
}, '注销')
|
|
|
}
|
|
|
@@ -88,21 +88,22 @@ export function getUserCredentials (userId) {
|
|
|
}).then(({ data }) => data)
|
|
|
}
|
|
|
|
|
|
-export function deleteUserCredentials (userId, credentialId) {
|
|
|
+export function deleteUserCredentials ({ userId, userName }, credentialId) {
|
|
|
return messageSend({
|
|
|
- url: `/admin/users/${userId}/credentials/${credentialId}`,
|
|
|
+ url: `/admin/users/${userId}/credentials/${credentialId}?userName=${userName}`,
|
|
|
method: 'DELETE'
|
|
|
}, '重置')
|
|
|
}
|
|
|
|
|
|
-export function resetPassword (userId) {
|
|
|
+export function resetPassword ({ userId, userName }) {
|
|
|
return messageSend({
|
|
|
url: `/admin/users/${userId}/resetPassword`,
|
|
|
method: 'PUT',
|
|
|
data: {
|
|
|
type: 'password',
|
|
|
value: process.env.VUE_APP_USER_PASSWORD,
|
|
|
- temporary: true
|
|
|
+ temporary: true,
|
|
|
+ userLabel: userName
|
|
|
}
|
|
|
}, '重置')
|
|
|
}
|
|
|
@@ -375,12 +376,13 @@ export function getUsersByDepartment (query) {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-export function updateUserDepartment (userId, { id, name }) {
|
|
|
+export function updateUserDepartment ({ userId, userName }, { id, name }) {
|
|
|
return tenantRequest({
|
|
|
url: '/admin/users/regrouping',
|
|
|
method: 'PUT',
|
|
|
data: addTenantKey({
|
|
|
userId,
|
|
|
+ userName,
|
|
|
...(id ? { departmentId: id, departmentName: name } : { departmentName: '顶层部门' })
|
|
|
})
|
|
|
})
|