兰宝车间质量管理系统-前端
疯狂的狮子Li
2023-12-26 085ce4cf43e29965e56b3a4e492abe55d0d6948f
update 优化 更改客户端状态接口 使用clientId传参
已修改3个文件
10 ■■■■ 文件已修改
src/api/system/client/index.ts 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/system/client/types.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/client/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/system/client/index.ts
@@ -64,12 +64,12 @@
/**
 * 状态修改
 * @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({
src/api/system/client/types.ts
@@ -7,7 +7,7 @@
  /**
   * 客户端id
   */
  clientId: string | number;
  clientId: string;
  /**
   * 客户端key
src/views/system/client/index.vue
@@ -303,7 +303,7 @@
  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';