补充租户ID

This commit is contained in:
zhonghua.li
2026-04-24 21:09:34 +08:00
parent 996ff4b491
commit b0d1898329
3 changed files with 20 additions and 5 deletions

View File

@@ -44,3 +44,12 @@ export function syncQweiDepartment() {
}) })
} }
export function syncQweiDepartmentWithTenant(tenantId) {
return request({
url: '/qweiDepartment/sync',
method: 'post',
params: {
tenantId: tenantId || undefined
}
})
}

View File

@@ -38,10 +38,13 @@ export function deleteQweiUser(id) {
}) })
} }
export function syncQweiUser() { export function syncQweiUser(tenantId) {
return request({ return request({
url: '/qweiUser/sync', url: '/qweiUser/sync',
method: 'post' method: 'post',
params: {
tenantId: tenantId || undefined
}
}) })
} }

View File

@@ -204,7 +204,7 @@ import {
addQweiDepartment, addQweiDepartment,
deleteQweiDepartment, deleteQweiDepartment,
getQweiDepartmentList, getQweiDepartmentList,
syncQweiDepartment, syncQweiDepartmentWithTenant,
updateQweiDepartment updateQweiDepartment
} from '@/api/qwei-department' } from '@/api/qwei-department'
import { import {
@@ -214,6 +214,7 @@ import {
syncQweiUser, syncQweiUser,
updateQweiUser updateQweiUser
} from '@/api/qwei-user' } from '@/api/qwei-user'
import { getBusinessHeaders } from '@/utils/business-headers'
export default { export default {
name: 'QweiData', name: 'QweiData',
@@ -417,7 +418,8 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.deptSyncLoading = true this.deptSyncLoading = true
return syncQweiDepartment() const tenantId = getBusinessHeaders()?.['X-Tenant-Id']
return syncQweiDepartmentWithTenant(tenantId)
}).then(() => { }).then(() => {
this.$message.success('同步成功') this.$message.success('同步成功')
this.fetchDeptList() this.fetchDeptList()
@@ -557,7 +559,8 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.userSyncLoading = true this.userSyncLoading = true
return syncQweiUser() const tenantId = getBusinessHeaders()?.['X-Tenant-Id']
return syncQweiUser(tenantId)
}).then(() => { }).then(() => {
this.$message.success('同步成功') this.$message.success('同步成功')
this.fetchUserList() this.fetchUserList()