import request from '@/utils/request';

// 获取预案列表
export const getPatternList = (params) => {
  return request({
    url: '/api/pattern/list',
    method: 'get',
    params: params
  });
};
// 删除预案
export const deletePatternById = (id) => {
  return request({
    url: '/api/pattern/delete/' + id,
    method: 'delete'
  });
};

// 获取预案信息
export const getPatternInfo = (id) => {
  return request({
    url: '/api/pattern/info/' + id,
    method: 'get'
  });
};
// 预案更新
export const updatePatternInfo = (data) => {
  return request({
    url: '/api/pattern/update/' + data.id,
    method: 'put',
    data: data
  });
};

// 预案更新
export const createPattern = (data) => {
  return request({
    url: '/api/pattern/create',
    method: 'post',
    data: data
  });
};
