import request from "@/utils/request";
export function getList(data) {
  return request({
    url: "/api/v1/prove/page",
    method: "post",
    data,
  });
}

// export function setTitleList(data) {
//   return request({
//     url: "/api/v1/prove/add",
//     method: "post",
//     data,
//   });
// }

export function deleteTitleList(id) {
  return request({
    url: `/api/v1/prove/del/${id}`,
    method: "post",
  });
}

export function getSelectData() {
  return request({
    url: "/api/v1/prove/list",
    method: "post",
  });
}

// ------------临时身份证明----------------
// 须知-新增-编辑
export function noticeAdd(data) {
  return request({
    url: "/api/v1/provisional/proof/notice/add",
    method: "post",
    data
  });
}
// 模版列表
export function noticeList() {
  return request({
    url: "/api/v1/provisional/proof/notice/list",
    method: "get",
  });
}
// 须知列表(分页)
export function noticepage(data) {
  return request({
    url: "/api/v1/provisional/proof/notice/page",
    method: "post",
    data
  });
}
// 须知-删除
export function noticeDel(noticeId) {
  return request({
    url: `/api/v1/provisional/proof/notice/${noticeId}`,
    method: "delete",
  });
}
// 模版-新增编辑
export function templateAdd(data) {
  return request({
    url: "/api/v1/provisional/proof/template/add",
    method: "post",
    data
  });
}
// 模版列表
export function templateList() {
  return request({
    url: "/api/v1/provisional/proof/template/list",
    method: "get",
  });
}
// 模版列表(分页)
export function templatePage(data) {
  return request({
    url: "/api/v1/provisional/proof/template/page",
    method: "post",
    data
  });
}
// 模版-删除
export function templateDel(templateId) {
  return request({
    url: `/api/v1/provisional/proof/template/${templateId}`,
    method: "delete",
  });
}
// 模版-模版详情
export function templateDetail(templateId) {
  return request({
    url: "/api/v1/provisional/proof/template/detail",
    method: "get",
    params:{templateId},
  });
}
// 临证设备配置-添加-编辑
export function deviceAdd(data) {
  return request({
    url: "/api/v1/provisional/proof/device/add",
    method: "post",
    data
  });
}
// 临证设备列表（分页）
export function devicePage(data) {
  return request({
    url: "/api/v1/provisional/proof/device/page",
    method: "post",
    data
  });
}
// 临证设备删除
export function deviceDel(deviceId) {
  return request({
    url: `/api/v1/provisional/proof/device/del/${deviceId}`,
    method: "delete",
  });
}
// 临证设备授权
export function deviceAnable(deviceId) {
  return request({
    url: "/api/v1/provisional/proof/device/enable",
    method: "get",
    params:{deviceId},
  });
}
// 临证设备取消授权
export function deviceDisable(deviceId) {
  return request({
    url: "/api/v1/provisional/proof/device/disable",
    method: "get",
    params:{deviceId},
  });
}
