refactor: TableSwitch组件重构

This commit is contained in:
dap
2025-03-30 14:43:37 +08:00
parent 6c4d15136f
commit 062e999f35
14 changed files with 97 additions and 86 deletions

View File

@@ -59,7 +59,11 @@ export function clientUpdate(data: Partial<Client>) {
* @param data 状态
*/
export function clientChangeStatus(data: any) {
return requestClient.putWithMsg<void>(Api.clientChangeStatus, data);
const requestData = {
clientId: data.clientId,
status: data.status,
};
return requestClient.putWithMsg<void>(Api.clientChangeStatus, requestData);
}
/**

View File

@@ -37,5 +37,9 @@ export function ossConfigRemove(ossConfigIds: IDS) {
// 更改OSS配置的状态
export function ossConfigChangeStatus(data: any) {
return requestClient.putWithMsg(Api.ossConfigChangeStatus, data);
const requestData = {
ossConfigId: data.ossConfigId,
status: data.status,
};
return requestClient.putWithMsg(Api.ossConfigChangeStatus, requestData);
}

View File

@@ -72,7 +72,11 @@ export function roleUpdate(data: Partial<Role>) {
* @returns void
*/
export function roleChangeStatus(data: Partial<Role>) {
return requestClient.putWithMsg<void>(Api.roleChangeStatus, data);
const requestData = {
roleId: data.roleId,
status: data.status,
};
return requestClient.putWithMsg<void>(Api.roleChangeStatus, requestData);
}
/**

View File

@@ -74,7 +74,11 @@ export function packageUpdate(data: Partial<TenantPackage>) {
* @returns void
*/
export function packageChangeStatus(data: Partial<TenantPackage>) {
return requestClient.putWithMsg<void>(Api.packageChangeStatus, data);
const packageId = {
packageId: data.packageId,
status: data.status,
};
return requestClient.putWithMsg<void>(Api.packageChangeStatus, packageId);
}
/**

View File

@@ -67,7 +67,12 @@ export function tenantUpdate(data: Partial<Tenant>) {
* @returns void
*/
export function tenantStatusChange(data: Partial<Tenant>) {
return requestClient.putWithMsg(Api.tenantStatus, data);
const requestData = {
id: data.id,
tenantId: data.tenantId,
status: data.status,
};
return requestClient.putWithMsg(Api.tenantStatus, requestData);
}
/**

View File

@@ -110,7 +110,11 @@ export function userUpdate(data: Partial<User>) {
* @returns void
*/
export function userStatusChange(data: Partial<User>) {
return requestClient.putWithMsg<void>(Api.userStatusChange, data);
const requestData = {
userId: data.userId,
status: data.status,
};
return requestClient.putWithMsg<void>(Api.userStatusChange, requestData);
}
/**