import request from '@/utils/request'
/***************************工作台***************************/

//工作台-校级巡查数据
export function schoolWorkCheck(query) {
  return request({
    url: '/security/schoolWork/check',
    method: 'get',
    params: query
  })
}

//工作台-实验室巡查数据
export function schoolWorkSubCheck(query) {
  return request({
    url: '/security/schoolWork/subCheck',
    method: 'get',
    params: query
  })
}

//工作台-待办事项列表
export function todoList(query) {
  return request({
    url: '/security/schoolWork/todoList',
    method: 'get',
    params: query
  })
}

//工作台-待办事项列表-待复核
export function tobeReviewed(query) {
  return request({
    url: '/security/schoolWork/tobeReviewed',
    method: 'get',
    params: query
  })
}

//工作台-存在隐患
export function hiddenCount(query) {
  return request({
    url: '/security/schoolWork/hiddenCount',
    method: 'get',
    params: query
  })
}

//工作台-检查覆盖率
export function yearRate(query) {
  return request({
    url: '/security/schoolWork/yearRate',
    method: 'get',
    params: query
  })
}

//工作台-检查统计
export function checkStatistics(query) {
  return request({
    url: '/security/schoolWork/checkStatistics',
    method: 'get',
    params: query
  })
}

//工作台-已处理隐患
export function hiddenDangerRectify(query) {
  return request({
    url: '/security/schoolWork/hiddenDangerRectify',
    method: 'get',
    params: query
  })
}

//工作台-指标统计(校级)
export function hiddenCountByType(query) {
  return request({
    url: '/security/schoolWork/hiddenCountByType',
    method: 'get',
    params: query
  })
}
//工作台-指标统计(院级)
export function collegCheckHiddenCountByType(query) {
  return request({
    url: '/security/collegCheck/hiddenCountByType',
    method: 'get',
    params: query
  })
}
//附件列表查询-通过计划ID查询附件列表
export function getFindByCheckPlanId(query) {
  return request({
    url: '/zd-security/upload/findByCheckPlanId',
    method: 'get',
    params: query
  })
}
/***************************数据统计***************************/

//数据统计-实验室列表头部数据汇总
export function dataStatisticsSubListTop(data) {
  return request({
    url: '/zd-security/DataStatistics/subListTop',
    method: 'post',
    data: data
  })
}
//数据统计-按实验室查询列表
export function dataStatisticsSubList(data) {
  return request({
    url: '/zd-security/DataStatistics/subList',
    method: 'post',
    data: data
  })
}

//数据统计-安全隐患列表头部数据汇总
export function dataStatisticsHazardListTop(data) {
  return request({
    url: '/zd-security/DataStatistics/hazardListTop',
    method: 'post',
    data: data
  })
}

//数据统计-按安全隐患查询列表
export function dataStatisticsHazardList(data) {
  return request({
    url: '/zd-security/DataStatistics/hazardList',
    method: 'post',
    data: data
  })
}

//数据统计-指标列表头部数据汇总
export function dataStatisticsItemsListTop(data) {
  return request({
    url: '/zd-security/DataStatistics/itemsListTop',
    method: 'post',
    data: data
  })
}

//数据统计-按指标查询列表
export function dataStatisticsItemsList(data) {
  return request({
    url: '/zd-security/DataStatistics/itemsList',
    method: 'post',
    data: data
  })
}

//工作台-查询是否院级用户
export function isSCollege(query) {
  return request({
    url: '/security/collegCheck/isSCollege',
    method: 'get',
    params: query
  })
}

//工作台跳转后-获取当前角色所属院系ID
export function getloginUser(query){
  return request({
    url: '/zd-security/collegCheck/getloginUser',
    method: 'get',
    params: query
  })
}

//工作台跳转后-按指标统计列表
export function hiddenDataItemsSubList(data) {
  return request({
    url: '/zd-security/collegCheck/hiddenDataItemsSubList',
    method: 'post',
    data: data
  })
}

//工作台跳转后-按指标统计顶部数据
export function hiddenDataItemsSubListTop(data) {
  return request({
    url: '/zd-security/collegCheck/hiddenDataItemsSubListTop',
    method: 'post',
    data: data
  })
}


//工作台跳转后-按名称搜索权限下实验室列表
export function laboratorySubRelInfoGetListByDeptId(data){
  return request({
    url: '/laboratory/subRelInfo/getListByDeptId',
    method: 'post',
    data: data
  })
}

//数据统计-按检查内容查询列表
export function dataStatisticsContentList(data) {
  return request({
    url: '/security/DataStatistics/contentList',
    method: 'post',
    data: data
  })
}
//数据统计-按检查内容头部数据汇总
export function dataStatisticsContentListTop(data) {
  return request({
    url: '/security/DataStatistics/hazardContentTop',
    method: 'post',
    data: data
  })
}

/***************************随手拍***************************/

//随手拍-上报记录-列表
export function securityCheckClapList(query) {
  return request({
    url: '/zd-security/checkClap/list',
    method: 'get',
    params: query
  })
}

//随手拍-上报记录-提交
export function checkClapAdd(data) {
  return request({
    url: '/zd-security/checkClap/add',
    method: 'post',
    data: data
  })
}
//随手拍-上报记录-上报记录
export function checkClapMylist(query) {
  return request({
    url: '/zd-security/checkClap/mylist',
    method: 'get',
    params: query
  })
}
/***************************项目检查库***************************/

//项目检查库-树状列表
export function checkOptionList(query) {
  return request({
    url: '/zd-security/checkOption/list',
    method: 'get',
    params: query
  })
}

//项目检查库-添加
export function checkOptionAdd(data) {
  return request({
    url: '/zd-security/checkOption/add',
    method: 'post',
    data: data
  })
}

//项目检查库-编辑
export function checkOptionUpdate(data) {
  return request({
    url: '/zd-security/checkOption/update',
    method: 'post',
    data: data
  })
}

//项目检查库-删除
export function checkOptionDelete(id) {
  return request({
    url: '/zd-security/checkOption/delete/'+id,
    method: 'delete'
  })
}

//项目检查库-批量删除
export function checkOptionBatchDelete(ids) {
  return request({
    url: '/zd-security/checkOption/batchDelete/'+ids,
    method: 'delete'
  })
}

/***************************检查配置***************************/

//检查配置 检查人员/整改人员-列表
export function checkStaffList(query) {
  return request({
    url: '/zd-security/checkStaff/list',
    method: 'get',
    params: query
  })
}

//检查配置 检查人员/整改人员-查询当前配置
export function checkSet(query) {
  return request({
    url: '/zd-security/checkSet/list',
    method: 'get',
    params: query
  })
}

//检查配置 检查人员/整改人员-保存当前配置
export function checkSetAdd(data) {
  return request({
    url: '/zd-security/checkSet/add',
    method: 'post',
    data: data
  })
}

//检查配置 人员列表查询
export function checkStaffUserList(data) {
  return request({
    url: '/zd-security/checkStaffUser/list',
    method: 'post',
    data: data
  })
}
/***************************设备检查配置***************************/
//设备检查配置-列表
export function checkDeviceList(query) {
  return request({
    url: '/security/checkDevice/list',
    method: 'get',
    params: query
  })
}
//设备检查配置-提交
export function checkDeviceAdd(data) {
  return request({
    url: '/security/checkDevice/add',
    method: 'post',
    data: data
  })
}
//设备检查配置-编辑
export function checkDeviceEdit(data) {
  return request({
    url: '/security/checkDevice/edit',
    method: 'post',
    data: data
  })
}
//设备检查配置-详情
export function checkDeviceDetail(query) {
  return request({
    url: '/security/checkDevice/findById',
    method: 'get',
    params: query
  })
}
export function checkDeviceDelete(id) {
  return request({
    url: '/security/checkDevice/'+id,
    method: 'delete'
  })
}
//设备检查配置-新增检查内容列表
export function inspectContentList(query) {
  return request({
    url: '/security/checkDevice/getHazardList',
    method: 'get',
    params: query
  })
}
