import request from "@/utils/request";
const api = "/mosty-api/mosty-yszx";

/**
 * 预警列表
 * @param {*} params
 * @returns
 */
export const getYsList = (data = {}) => {
  return request({
    url: api + "/tbYsGajg/getList",
    method: "POST",
    data
  });
};

// 公安机关要素新增 
export const getYsAdd = (data = {}) => {
  return request({
    url: api + "/tbYsGajg/addGajg",
    method: "POST",
    data
  });
};

// 公安机关要素修改 
export const getYsUpdate = (data = {}) => {
  return request({
    url: api + "/tbYsGajg/editGajg",
    method: "POST",
    data
  });
};

// 删除公安机关要素 /tbYsGajg/{id}
export const getYsDelete = (id) => {
  return request({
    url: `${api}/tbYsGajg/${id}`,
    method: "DELETE"
  });
};
// 通过id查询详情
export const getYsInfo = (id) => {
  return request({
    url: api + `/tbYsGajg/${id}`,
    method: "GET"
  })
}