import request from "@/utils/request";

// 查询列表隐患问题清单
export function listQuestion(query) {
  return request({
    url: "/core/question/list",
    method: "get",
    params: query,
  });
}

// 查询详细隐患问题清单
export function getQuestion(id) {
  return request({
    url: "/core/question/" + id,
    method: "get",
  });
}

// 新增隐患问题清单
export function addQuestion(data) {
  return request({
    url: "/core/question",
    method: "post",
    data: data,
  });
}

// 修改隐患问题清单
export function updateQuestion(data) {
  return request({
    url: "/core/question",
    method: "put",
    data: data,
  });
}

// 删除隐患问题清单
export function delQuestion(id) {
  return request({
    url: "/core/question/" + id,
    method: "delete",
  });
}

// 问题确认
export function confirm(data) {
  return request({
    url: "/core/question/confirm/" + data.id,
    method: "put",
    data,
  });
}

// 异议审批
export function confirmDissent(data) {
  return request({
    url: "/core/question/confirmDissent/" + data.id,
    method: "put",
    data,
  });
}

// 整改
export function reform(id) {
  return request({
    url: "/core/question/reform/" + data.id,
    method: "put",
    data,
  });
}
