import { requestClient } from '#/api/request';
enum Api {
  querybaseApi = '/taskTemplate/template/list',
  addbaseApi = '/taskTemplate/template',
  stationoperatorapi = '/system/user/stationList',
  editbaseApi = '/taskTemplate/template',
  copybaseApi = '/taskTemplate/template/copy',
  startbaseApi = '/taskTemplate/template/start',
  xiangqigApi = '/taskTemplate/template',
}

// 查询任务模板列表
export function querybaseApilist(params?: any) {
  return requestClient.get(Api.querybaseApi, { params });
}
// 新增任务模板
export function addbaseApi(post: any) {
  return requestClient.post(Api.addbaseApi, post, {
    successMessageMode: 'message',
  });
}
//油站执行人下拉框
export function stationoperatorapi(params?: any) {
  return requestClient.get(Api.stationoperatorapi, {params});
}
// 编辑任务模板
export function editbaseApi(data: any) {
  return requestClient.put(Api.editbaseApi, data, {
    successMessageMode: 'message',
  });
}
//复制任务模板
export function copybaseApi(data: any) {
  return requestClient.post(`${Api.copybaseApi}/${data.id}`);
}
//分发任务模板
export function startbaseApi(data: any) {
  return requestClient.put(`${Api.startbaseApi}/${data.id}`);
}
//查询任务模板详情
export function xiangqigApi(id: any) {
  return requestClient.get(`${Api.xiangqigApi}/${id}`);
}
// // 修改岗位
// export function updatePost(post: Post) {
//   return requestClient.put(Api.baseApi, post, {
//     successMessageMode: 'message',
//   });
// }
// // 删除岗位
// export function deletePost(postId: number[]) {
//   return requestClient.delete(`${Api.baseApi}/${postId.join(',')}`, {
//     successMessageMode: 'message',
//   });
// }
