update 优化 更改客户端状态接口 使用clientId传参

This commit is contained in:
疯狂的狮子Li 2023-12-26 00:47:59 +08:00
parent c5daf629d9
commit 085ce4cf43
3 changed files with 5 additions and 5 deletions

View File

@ -64,12 +64,12 @@ export const delClient = (id: string | number | Array<string | number>) => {
/**
*
* @param id ID
* @param clientId id
* @param status
*/
export function changeStatus(id: number | string, status: string) {
export function changeStatus(clientId: string, status: string) {
const data = {
id,
clientId,
status
};
return request({

View File

@ -7,7 +7,7 @@ export interface ClientVO {
/**
* id
*/
clientId: string | number;
clientId: string;
/**
* key

View File

@ -303,7 +303,7 @@ const handleStatusChange = async (row: ClientVO) => {
let text = row.status === '0' ? '启用' : '停用';
try {
await proxy?.$modal.confirm('确认要"' + text + '"吗?');
await changeStatus(row.id, row.status);
await changeStatus(row.clientId, row.status);
proxy?.$modal.msgSuccess(text + '成功');
} catch (err) {
row.status = row.status === '0' ? '1' : '0';