import request from '@/utils/request';

/*
 * 分页查询
 */
export const getTaIssue = (params) => request('/api/taIssue', { params });

/*
 * 新增数据
 */
export const postTaIssue = (data) => request('/api/taIssue', { data, method: 'post' });

/*
 * 通过ID查询单条数据
 */
export const getTaIssueById = (id) => request(`/api/taIssue/${id}`);

/*
 * 更新数据
 */
export const putTaIssue = (id, data) => request(`/api/taIssue/${id}`, { data, method: 'put' });

/*
 * 复制数据
 */
export const copyTaIssue = (id) => request(`/api/taIssue/${id}/copy`, { method: 'post' });

/*
 * 通过主键删除数据
 */
export const deleteTaIssue = (id) => request(`/api/taIssue/${id}`, { method: 'delete' });

/*
 * 交办
 */
export const postIssueAssigned = (data) => request('/api/taIssueProcess/assigned', { data, method: 'post' });

/*
 * 驳回
 */
export const postIssueRejct = (data) => request('/api/taIssueProcess/reject', { data, method: 'post' });

/*
 * 获取所有流程节点
 */
export const getIssueProcess = (params) => request('/api/taIssueProcess', { params });