update 优化 更改客户端状态接口 使用clientId传参
This commit is contained in:
parent
c5daf629d9
commit
085ce4cf43
@ -64,12 +64,12 @@ export const delClient = (id: string | number | Array<string | number>) => {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态修改
|
* 状态修改
|
||||||
* @param id ID
|
* @param clientId 客户端id
|
||||||
* @param status 状态
|
* @param status 状态
|
||||||
*/
|
*/
|
||||||
export function changeStatus(id: number | string, status: string) {
|
export function changeStatus(clientId: string, status: string) {
|
||||||
const data = {
|
const data = {
|
||||||
id,
|
clientId,
|
||||||
status
|
status
|
||||||
};
|
};
|
||||||
return request({
|
return request({
|
||||||
|
@ -7,7 +7,7 @@ export interface ClientVO {
|
|||||||
/**
|
/**
|
||||||
* 客户端id
|
* 客户端id
|
||||||
*/
|
*/
|
||||||
clientId: string | number;
|
clientId: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户端key
|
* 客户端key
|
||||||
|
@ -303,7 +303,7 @@ const handleStatusChange = async (row: ClientVO) => {
|
|||||||
let text = row.status === '0' ? '启用' : '停用';
|
let text = row.status === '0' ? '启用' : '停用';
|
||||||
try {
|
try {
|
||||||
await proxy?.$modal.confirm('确认要"' + text + '"吗?');
|
await proxy?.$modal.confirm('确认要"' + text + '"吗?');
|
||||||
await changeStatus(row.id, row.status);
|
await changeStatus(row.clientId, row.status);
|
||||||
proxy?.$modal.msgSuccess(text + '成功');
|
proxy?.$modal.msgSuccess(text + '成功');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
row.status = row.status === '0' ? '1' : '0';
|
row.status = row.status === '0' ? '1' : '0';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user