import request from "@/utils/request";

//预警等级
export function getwarningPersonGrade() {
  return request({
    url: "/admin/warning/person/grade",
    method: "get",
  });
}
//人员命中预警
export function getwarningPersonWarningHitType() {
  return request({
    url: "/admin/warning/person/warningHitType",
    method: "get",
  });
}
//布控单位列表--添加时用
export function getwarningPersonOneselfBelowList() {
  return request({
    url: "/admin/warning/person/oneselfBelowList",
    method: "get",
  });
}
//创建单位列表
export function getwarningPersonCreateList() {
  return request({
    url: "/admin/warning/person/createList",
    method: "get",
  });
}
// 布控单位列表--搜索
export function getwarningPersonLogAdminList() {
  return request({
    url: "/admin/warning/person/logAdminList",
    method: "get",
  });
}
// 人员预警记录分页列表
export function getwarningPersonPersonLogPageList(data) {
  return request({
    url: "/admin/warning/person/personLogPageList",
    method: "post",
    data,
  });
}

// 预警来源
export function getwarningPersonWarningSource() {
  return request({
    url: "/admin/warning/person/warningSource",
    method: "get",
  });
}

//=========================================================
// 人员布控名单-分页列表
export function getwarningPersonPageList(data) {
  return request({
    url: "/admin/warning/person/personPageList",
    method: "post",
    data,
  });
}
// 删除布控名单
export function getwarningPersonDelete(warningPersonId) {
  return request({
    url: `/admin/warning/person/personDelete/${warningPersonId}`,
    method: "delete",
  });
}
// 批量删除布控名单
export function getpersonBatchDelete(data) {
  return request({
    url: "/admin/warning/person/personBatchDelete",
    method: "delete",
    params: {
      controlAdminId: data.controlAdminId,
      warningGrade: data.warningGrade,
      name: data.name,
      idNumber: data.idNumber,
      warningType: data.warningType,
      taskName: data.taskName,
      controlStartStartTime: data.controlStartStartTime,
      controlStartEndTime: data.controlStartEndTime,
      taskStatus: data.taskStatus,
      manageName: data.manageName,
      managePhone: data.managePhone,
    },
  });
}
//=========================================================
// 人员布控名单审核分页列表
export function getwarningPersonReviewPageList(data) {
  return request({
    url: "/admin/warning/person/pageList",
    method: "post",
    data,
  });
}
// 添加布控审核
export function getwarningPersonInsert(data) {
  return request({
    url: "/admin/warning/person/insert",
    method: "post",
    data,
  });
}
// 编辑布控审核
export function getwarningPersonRectify(data) {
  return request({
    url: "/admin/warning/person/rectify",
    method: "post",
    data,
  });
}
// 人员名单-分页列表
export function getwarningPersonCheckPageList(data) {
  return request({
    url: "/admin/warning/person/personCheckPageList",
    method: "post",
    data,
  });
}
// 审核详情步骤列表
export function getwarninPersonStepList(data) {
  return request({
    url: "/admin/warning/person/stepList",
    method: "post",
    data,
  });
}
// 布控审核
export function getwarninPersonCheck(data) {
  return request({
    url: "/admin/warning/person/check",
    method: "post",
    data,
  });
}

//=========================================================
// 七类重点预警项
export function getsevenWarningTerm() {
  return request({
    url: "/admin/warning/person/sevenWarningTerm",
    method: "get",
  });
}
// 人员属性预警配置修改
export function getwarningConfigUpdate(data) {
  return request({
    url: "/admin/warning/person/configUpdate",
    method: "post",
    data,
  });
}
// 人员属性预警配置
export function getwarningConfig() {
  return request({
    url: "/admin/warning/person/config",
    method: "get",
  });
}
