import request from "@/utils/request";

// 车辆类型
export function getwarningCargrade() {
  return request({
    url: "/admin/warning/car/grade",
    method: "get",
  });
}
// 车辆预警类型
export function getCarwarningHitType() {
  return request({
    url: "/admin/warning/car/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 getwarningCarLogPageList(data) {
  return request({
    url: "/admin/warning/car/carLogPageList",
    method: "post",
    data,
  });
}

//=========================================================
// 车辆布控名单-分页列表
export function getwarningCarPageList(data) {
  return request({
    url: "/admin/warning/car/carPageList",
    method: "post",
    data,
  });
}
// 删除布控名单
export function getwarningCarDelete(warningCarId) {
  return request({
    url: `/admin/warning/car/carDelete/${warningCarId}`,
    method: "delete",
  });
}
// 批量删除布控名单
export function getcarBatchDelete(data) {
  return request({
    url: "/admin/warning/car/carBatchDelete",
    method: "delete",
    params: {
      warningGrade: data.warningGrade,
      carNumber: data.carNumber,
      carType: data.carType,
      controlAdminId: data.controlAdminId,
      controlStartStartTime: data.controlStartStartTime,
      controlStartEndTime: data.controlStartEndTime,
      createAdminId: data.createAdminId,
      manageName: data.manageName,
      managePhone: data.managePhone,
      taskName: data.taskName,
      taskStatus: data.taskStatus,
    },
  });
}

//=========================================================
// 人员布控名单审核分页列表
export function getwarningCarReviewPageList(data) {
  return request({
    url: "/admin/warning/car/pageList",
    method: "post",
    data,
  });
}
// 添加布控审核
export function getwarningCarInsert(data) {
  return request({
    url: "/admin/warning/car/insert",
    method: "post",
    data,
  });
}
// 编辑布控审核
export function getwarningCarRectify(data) {
  return request({
    url: "/admin/warning/car/rectify",
    method: "post",
    data,
  });
}
// 人员名单-分页列表
export function getwarningCarCheckPageList(data) {
  return request({
    url: "/admin/warning/car/carCheckPageList",
    method: "post",
    data,
  });
}
// 审核详情步骤列表
export function getwarninCarStepList(data) {
  return request({
    url: "/admin/warning/car/stepList",
    method: "post",
    data,
  });
}
// 布控审核
export function getwarninCarCheck(data) {
  return request({
    url: "/admin/warning/car/check",
    method: "post",
    data,
  });
}

//=========================================================
// 车辆违章预警项
export function getCarViolationTerm() {
  return request({
    url: "/admin/warning/car/carViolationTerm",
    method: "get",
  });
}
// 车辆年检预警项
export function getCarYearCheckTerm() {
  return request({
    url: "/admin/warning/car/carYearCheckTerm",
    method: "get",
  });
}
// 人员属性预警配置修改
export function getwarningConfigUpdate(data) {
  return request({
    url: "/admin/warning/car/configUpdate",
    method: "post",
    data,
  });
}
// 人员属性预警配置
export function getwarningConfig() {
  return request({
    url: "/admin/warning/car/config",
    method: "get",
  });
}
