补充租户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({
url: '/qweiUser/sync',
method: 'post'
method: 'post',
params: {
tenantId: tenantId || undefined
}
})
}

View File

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