import { requestClient } from '#/api/request';

enum Api {
  base = '/scheduleTasks/tasks',
  executorApi = '/system/user/stationList',
  // queryrgasstation = '/system/user/stationList',
  queryrtodoaskslist = '/scheduleTasks/tasks/allList',
}

export function transferTask(data: any) {
  return requestClient.put(`${Api.base}/forward`, data, {
    successMessageMode: 'message',
  });
}
// 关闭任务
export function closeTask(data: any) {
  return requestClient.put(`${Api.base}/cancel`, data, {
    successMessageMode: 'message',
  });
}

// 查询待办任务列表
export function querytodoaskslist(params: any) {
  return requestClient.get(Api.queryrtodoaskslist, { params });
}

export function getTaskDetail(id: number) {
  return requestClient.get(`${Api.base}/${id}`);
}

export function addtodoaskslist(data: any) {
  return requestClient.post(Api.base, data, {
    successMessageMode: 'message',
  });
}
// 查询执行人列表
export function queryExecutorList(params: any) {
  return requestClient.get(Api.executorApi, { params });
}
// 查询加油站列表
export function queryGasStationList(params: any) {
  return requestClient.get(Api.executorApi, { params });
}
// //查询知识库查看记录列表
// export function queryrecord(params: any) {
//   return requestClient.get(Api.queryrecord, params);
// }
// //编辑历史
// export function queryPublishRecordlist(params: any) {
//   return requestClient.get(Api.queryPublishRecord, params);
// }
