import request from '@/utils/request'

/**************************** 检查项相关 ****************************/
//检查项目表-列表
export function securityCheckOptionList(data) {
  return request({
    url: '/security/checkOption/list',
    method: 'post',
    data: data
  })
}
//检查项目表-列表-包含已删除
export function securityCheckOptionSelAllList(data) {
  return request({
    url: '/security/checkOption/selAllList',
    method: 'post',
    data: data
  })
}
//检查项目表-修改
export function securityCheckOptionUpdate(data) {
  return request({
    url: '/security/checkOption/update',
    method: 'post',
    data: data
  })
}
//检查项目表-新增
export function securityCheckOptionAdd(data) {
  return request({
    url: '/security/checkOption/add',
    method: 'post',
    data: data
  })
}
//检查项目表-删除
export function securityCheckOptionDelete(data) {
  return request({
    url: '/security/checkOption/delete',
    method: 'post',
    data: data
  })
}
//检查项目表-批量删除
export function securityCheckOptionBatchDelete(data) {
  return request({
    url: '/security/checkOption/batchDelete',
    method: 'post',
    data: data
  })
}

/**************************** 督导组相关 ****************************/

/* 通用接口-人员查询(过滤已选/未选)
   deptId:学院ID
   searchValue:姓名/工号
   filtType:1,//1.过滤 2.不过滤
   selectedUserIds:[],//过滤用户IDS
   userIds:[],//不过滤用户IDS
   page:1,
   pageSize:2,
*/
export function findUserList(data) {
  return request({
    url: '/system/user/findUserList',
    method: 'post',
    data: data
  })
}
//督导组-列表
export function securityCheckGroupList(data) {
  return request({
    url: '/security/checkGroup/list',
    method: 'post',
    data: data
  })
}
//督导组-详情
export function securityCheckGroupDetail(query) {
  return request({
    url: '/security/checkGroup/detail',
    method: 'get',
    params: query
  })
}
//督导组-删除
export function securityCheckGroupDelete(data) {
  return request({
    url: '/security/checkGroup/delete',
    method: 'post',
    data: data
  })
}
//督导组-启用/停用
export function securityCheckGroupEnable(data) {
  return request({
    url: '/security/checkGroup/enable',
    method: 'post',
    data: data
  })
}
//督导组-人员-启用/停用
export function securityCheckGroupUserEnable(data) {
  return request({
    url: '/security/checkGroup/userEnable',
    method: 'post',
    data: data
  })
}
//督导组-新增
export function securityCheckGroupAdd(data) {
  return request({
    url: '/security/checkGroup/add',
    method: 'post',
    data: data
  })
}
//督导组-修改
export function securityCheckGroupUpdate(data) {
  return request({
    url: '/security/checkGroup/update',
    method: 'post',
    data: data
  })
}

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

//随手拍-列表
export function securityCheckPhotoMyList(data) {
  return request({
    url: '/security/checkPhoto/myList',
    method: 'post',
    data: data
  })
}
//随手拍-详情
export function securityCheckPhotoDetail(query) {
  return request({
    url: '/security/checkPhoto/detail',
    method: 'get',
    params: query
  })
}
//随手拍-新增
export function securityCheckPhotoMyAdd(data) {
  return request({
    url: '/security/checkPhoto/myAdd',
    method: 'post',
    data: data
  })
}
//随手拍-删除
export function securityCheckPhotoDelete(data) {
  return request({
    url: '/security/checkPhoto/delete',
    method: 'post',
    data: data
  })
}
//随手拍-隐患列表
export function securityCheckPhotoList(data) {
  return request({
    url: '/security/checkPhoto/list',
    method: 'post',
    data: data
  })
}
//随手拍-隐患整改
export function securityCheckPhotoUpdate(data) {
  return request({
    url: '/security/checkPhoto/update',
    method: 'post',
    data: data
  })
}

/**************************** 检查依据 ****************************/

//检查依据-列表
export function securityCheckBasisList(data) {
  return request({
    url: '/security/checkBasis/list',
    method: 'post',
    data: data
  })
}
//检查依据-新增
export function securityCheckBasisAdd(data) {
  return request({
    url: '/security/checkBasis/add',
    method: 'post',
    data: data
  })
}
//检查依据-编辑
export function securityCheckBasisUpdate(data) {
  return request({
    url: '/security/checkBasis/update',
    method: 'post',
    data: data
  })
}
//检查依据-详情
export function securityCheckBasisDetail(query) {
  return request({
    url: '/security/checkBasis/detail',
    method: 'get',
    params: query
  })
}
//检查依据-删除
export function securityCheckBasisDelete(data) {
  return request({
    url: '/security/checkBasis/delete',
    method: 'post',
    data: data
  })
}
//检查依据-检查指标下拉列表 level级别123 parentId父类ID
export function securityCheckOptionSelList(data) {
  return request({
    url: '/security/checkOption/selList',
    method: 'post',
    data: data
  })
}
//检查依据-查询穿梭框数据 id父级ID 一级与二级 notIds未选中的
export function securityCheckOptionShuttleList(data) {
  return request({
    url: '/security/checkOption/shuttleList',
    method: 'post',
    data: data
  })
}
//检查依据-查询穿梭框数据 id父级ID 一级与二级 ids选中的
export function securityCheckOptionShuttleRightList(data) {
  return request({
    url: '/security/checkOption/shuttleRightList',
    method: 'post',
    data: data
  })
}

/**************************** 检查计划 ****************************/
//检查计划-列表
export function securityCheckPlanList(data) {
  return request({
    url: '/security/checkPlan/list',
    method: 'post',
    data: data
  })
}
//检查计划-新增
export function securityCheckPlanAdd(data) {
  return request({
    url: '/security/checkPlan/add',
    method: 'post',
    data: data
  })
}
//检查计划-编辑
export function securityCheckPlanUpdate(data) {
  return request({
    url: '/security/checkPlan/update',
    method: 'post',
    data: data
  })
}
//检查计划-删除
export function securityCheckPlanDelete(data) {
  return request({
    url: '/security/checkPlan/delete',
    method: 'post',
    data: data
  })
}
//检查计划-检查批量完成
export function securityCheckSetOptionFinishCheck(query) {
  return request({
    url: '/security/checkSetOption/finishCheck',
    method: 'get',
    params: query
  })
}
//检查项-清除
export function securityCheckSetOptionClearOptionData(query) {
  console.log('query',query)
  return request({
    url: '/security/checkSetOption/clearOptionData',
    method: 'get',
    params: query
  })
}
//检查计划-检查批量完成
export function securityCheckSetOptionFinishCheckBatch(data) {
  return request({
    url: '/security/checkSetOption/finishCheckBatch',
    method: 'post',
    data: data
  })
}
//检查计划-详情
export function securityCheckPlanFindCheckPlan(query) {
  return request({
    url: '/security/checkPlan/findCheckPlan',
    method: 'get',
    params: query
  })
}
//检查计划-查询全校实验室数量
export function laboratorySubRelInfoGetAllSubNum(query) {
  return request({
    url: '/laboratory/subRelInfo/getAllSubNum',
    method: 'get',
    params: query
  })
}
//检查计划-实验室查询穿梭框
export function laboratorySubRelInfoConditionSubjectInfo(data) {
  return request({
    url: '/laboratory/subRelInfo/conditionSubjectInfo',
    method: 'post',
    data: data
  })
}
//检查计划-历史标题列表
export function checkPlanGetHistoryPlanTitles(query) {
  return request({
    url: '/security/checkPlan/getHistoryPlanTitles',
    method: 'get',
    params: query
  })
}
//检查计划-删除历史标题 checkPlanId
export function checkPlanHideHistoryPlanTitle(query) {
  return request({
    url: '/security/checkPlan/hideHistoryPlanTitle',
    method: 'get',
    params: query
  })
}
/**************************** 检查管理/自查管理 ****************************/
//检查管理/自查管理-计划列表
export function securityCheckPlanTitleList(data) {
  return request({
    url: '/security/checkPlan/titleList',
    method: 'post',
    data: data
  })
}
//检查管理/自查管理-计划下实验室列表
export function securityCheckManageList(data) {
  return request({
    url: '/security/checkManage/list',
    method: 'post',
    data: data
  })
}
//检查管理/自查管理-计划下-实验室下-检查项列表
export function securityCheckSetOptionList(data) {
  return request({
    url: '/security/checkSetOption/list',
    method: 'post',
    data: data
  })
}
//查询检查批次是否结束
export function securityCheckPlanSetFindProgress(query) {
  return request({
    url: '/security/checkPlanSet/findProgress',
    method: 'get',
    params: query
  })
}
//检查管理/自查管理-开始检查计划详情
export function securityCheckPlanCheckInfo(data) {
  return request({
    url: '/security/checkPlan/checkInfo',
    method: 'post',
    data: data
  })
}
//检查管理/自查管理-查询计划内实验室下未检查的检查项
export function securityCheckSetOptionUnCheckList(query) {
  return request({
    url: '/security/checkSetOption/unCheckList',
    method: 'get',
    params: query
  })
}
//检查管理/自查管理-开始检查第一次提交
export function securityCheckSetOptionCheckCommit(data) {
  return request({
    url: '/security/checkSetOption/checkCommit',
    method: 'post',
    data: data
  })
}
//检查管理/自查管理-流程详情
export function securityCheckDangerGetDangerId(query) {
  return request({
    url: '/security/checkDanger/getDangerId',
    method: 'get',
    params: query
  })
}
//检查管理/自查管理-草稿查询
export function securityDraftFindBySetOptionId(query) {
  return request({
    url: '/security/draft/findBySetOptionId',
    method: 'get',
    params: query
  })
}
//检查管理/自查管理-批量下载
export function securityCheckPlanBatchDownloadFile(data) {
  return request({
    url: '/security/checkPlan/batchDownloadFile',
    method: 'post',
    data: data
  })
}
/**************************** 安全隐患 ****************************/
// 检查隐患/自查隐患-列表
export function securityCheckDangerList (data) {
  return request({
    url: '/security/checkDanger/list',
    method: 'post',
    data: data
  })
}
// 检查隐患/自查隐患-详情
export function securityCheckDangerDetail (data) {
  return request({
    url: '/security/checkDanger/detail',
    method: 'post',
    data: data
  })
}
// 检查隐患/自查隐患-整改提交
export function securityCheckDangerCheckRectify (data) {
  return request({
    url: '/security/checkDanger/checkRectify',
    method: 'post',
    data: data
  })
}
/**************************** 安全检查-数据统计 ****************************/
// 数据统计列表
export function securityDataStatisticsList(data) {
  return request({
    url: '/security/dataStatistics/list',
    method: 'post',
    data: data
  })
}
// 检查计划-计划明细列表
export function securityCheckDetailsCheckList(data) {
  return request({
    url: '/security/checkDetails/checkList',
    method: 'post',
    data: data
  })
}
// 隐患统计柱状图
export function securityHazardReportColumnPicture (data) {
  return request({
    url: '/security/hazardReport/columnPicture',
    method: 'post',
    data: data
  })
}
// 各单位隐患整改统计-表头部参数
export function reportHazardReportOneHazardGaugeOutfit (query) {
  return request({
    url: '/report/hazardReport/oneHazardGaugeOutfit',
    method: 'get',
    params: query
  })
}
// 各单位隐患整改统计-列表-校级
export function reportHazardReportDeptList (data) {
  return request({
    url: '/security/hazardReport/deptList',
    method: 'post',
    data: data
  })
}
// 各单位隐患整改统计-头部数据-校级
export function reportHazardReportDeptTop (data) {
  return request({
    url: '/security/hazardReport/deptTop',
    method: 'post',
    data: data
  })
}
// 各单位隐患整改统计-查询是否有更新数据-校级
export function securityCheckDangerTodayDangerList (query) {
  return request({
    url: '/security/checkDanger/todayDangerList',
    method: 'get',
    params: query
  })
}
// 各单位隐患整改统计-更细数据-校级
export function reportHazardReportItemsScatterDeptRefresh (query) {
  return request({
    url: '/report/hazardReport/itemsScatterDeptRefresh',
    method: 'get',
    params: query
  })
}
// 一级检查项隐患分布-列表-校级
export function reportHazardReportOneItemsScatter (data) {
  return request({
    url: '/security/checkDanger/oneItemsScatter',
    method: 'post',
    data: data
  })
}
// 一级检查项隐患分布-头部数据-校级
export function reportHazardReportOneItemsScatterTop (data) {
  return request({
    url: '/security/checkDanger/oneItemsScatterTop',
    method: 'post',
    data: data
  })
}

// 检查项统计-一级指标隐患分布 饼图
export function reportHazardItemsOneReportPie (data) {
  return request({
    url: '/security/checkDanger/oneReportPie',
    method: 'post',
    data: data
  })
}
// 检查项统计-一级隐患列表
export function reportHazardItemsOneReportList (data) {
  return request({
    url: '/security/checkDanger/oneReportList',
    method: 'post',
    data: data
  })
}
// 检查项统计-一级隐患数据刷新
export function reportHazardItemsOneReportRefresh (query) {
  return request({
    url: '/report/hazardItems/oneReportRefresh',
    method: 'get',
    params: query
  })
}
// 检查项统计-二级隐患数据刷新
export function reportHazardItemsTwoReportRefresh (query) {
  return request({
    url: '/report/hazardItems/twoReportRefresh',
    method: 'get',
    params: query
  })
}
// 检查项统计-三级隐患数据刷新
export function reportHazardItemsThreeReportRefresh (query) {
  return request({
    url: '/report/hazardItems/threeReportRefresh',
    method: 'get',
    params: query
  })
}

// 检查项统计-二级指标隐患分布 饼图
export function reportHazardItemsTwoReportPie (data) {
  return request({
    url: '/security/checkDanger/twoReportPie',
    method: 'post',
    data: data
  })
}
// 检查项统计-二级隐患列表
export function reportHazardItemsTwoReportList (data) {
  return request({
    url: '/security/checkDanger/twoReportList',
    method: 'post',
    data: data
  })
}
// 检查项统计-三级指标隐患分布 饼图
export function reportHazardItemsThreeReportPie (data) {
  return request({
    url: '/security/checkDanger/threeReportPie',
    method: 'post',
    data: data
  })
}
// 检查项统计-三级隐患列表
export function reportHazardItemsThreeReportList (data) {
  return request({
    url: '/security/checkDanger/threeReportList',
    method: 'post',
    data: data
  })
}
// 一级检查项隐患分布-列表-院级
export function reportHazardItemsOneReportListCollege (data) {
  return request({
    url: '/report/hazardItems/oneReportListCollege',
    method: 'post',
    data: data
  })
}
// 一级检查项隐患分布-头部数据-院级
export function reportHazardItemsOneReportPieCollege (data) {
  return request({
    url: '/report/hazardItems/oneReportPieCollege',
    method: 'post',
    data: data
  })
}
// 二级检查项隐患分布-列表-院级
export function reportHazardItemsTwoReportListCollege (data) {
  return request({
    url: '/report/hazardItems/twoReportListCollege',
    method: 'post',
    data: data
  })
}
// 二级检查项隐患分布-头部数据-院级
export function reportHazardItemsTwoReportPieCollege (data) {
  return request({
    url: '/report/hazardItems/twoReportPieCollege',
    method: 'post',
    data: data
  })
}
// 三级检查项隐患分布-列表-院级
export function reportHazardItemsThreeReportListCollege (data) {
  return request({
    url: '/report/hazardItems/threeReportListCollege',
    method: 'post',
    data: data
  })
}
// 三级检查项隐患分布-头部数据-院级
export function reportHazardItemsThreeReportPieCollege (data) {
  return request({
    url: '/report/hazardItems/threeReportPieCollege',
    method: 'post',
    data: data
  })
}
//隐患统计-隐患统计-列表-院级
export function reportHazardReportDeptListCollege  (data) {
  return request({
    url: '/security/hazardReport/deptListCollege',
    method: 'post',
    data: data
  })
}
//隐患统计-隐患统计-头部-院级
export function reportHazardReportDeptTopCollege (data) {
  return request({
    url: '/security/hazardReport/deptTopCollege',
    method: 'post',
    data: data
  })
}
//隐患统计-一级检查项分布-列表-院级
export function reportHazardReportOneItemsScatterCollege (data) {
  return request({
    url: '/report/hazardReport/oneItemsScatterCollege',
    method: 'post',
    data: data
  })
}
//隐患统计-一级检查项分布-头部-院级
export function reportHazardReportOneItemsScatterCollegeTop (data) {
  return request({
    url: '/report/hazardReport/oneItemsScatterCollegeTop',
    method: 'post',
    data: data
  })
}
//隐患统计-查询校级或者院级计划
export function securityIndexStatisticsGetPlanIds (data) {
  return request({
    url: '/security/indexStatistics/getPlanIds',
    method: 'post',
    data: data
  })
}
/**************************** 校级工作台统计 ****************************/
//工作台-用户身份查询-校级
export function securityIndexStatisticsUserIdentity (query) {
  return request({
    url: '/security/indexStatistics/userIdentity',
    method: 'get',
    params: query
  })
}
//工作台-查询当前用户所属二级单位名称
export function systemDeptDetail (query) {
  return request({
    url: '/system/dept/detail',
    method: 'get',
    params: query
  })
}
//工作台-用户身份查询-院级
export function securityCollegeStatisticsCollegeCheck (data) {
  return request({
    url: '/security/collegeStatistics/collegeCheck',
    method: 'post',
    data: data
  })
}
//工作台-检查数据(检查次数/项目数/通知书数)
export function securityIndexStatisticsCheck (data) {
  return request({
    url: '/security/indexStatistics/check',
    method: 'post',
    data: data
  })
}
//工作台-数据总览
export function securityIndexStatisticsProportionChart (data) {
  return request({
    url: '/security/indexStatistics/proportionChart',
    method: 'post',
    data: data
  })
}
//工作台-整改完成率-柱形图
export function securityIndexStatisticsCompleteRatio (data) {
  return request({
    url: '/security/indexStatistics/completeRatio',
    method: 'post',
    data: data
  })
}
//工作台-未整改隐患
export function securityIndexStatisticsUnresolvedHazard (data) {
  return request({
    url: '/security/indexStatistics/unresolvedHazard',
    method: 'post',
    data: data
  })
}
//工作台-已整改隐患
export function securityIndexStatisticsRectifiedHazard (data) {
  return request({
    url: '/security/indexStatistics/rectifiedHazard',
    method: 'post',
    data: data
  })
}
//工作台-全年指标隐患分布
export function securityIndexStatisticsHazardScatter (data) {
  return request({
    url: '/security/indexStatistics/hazardScatter',
    method: 'post',
    data: data
  })
}
//工作台-检查覆盖率
export function securityIndexStatisticsCheckOverlap (data) {
  return request({
    url: '/security/indexStatistics/checkOverlap',
    method: 'post',
    data: data
  })
}
//工作台-检查结果统计
export function securityIndexStatisticsCheckResults (data) {
  return request({
    url: '/security/indexStatistics/checkResults',
    method: 'post',
    data: data
  })
}
//工作台-年度全校实验室安全检查统计
export function securityIndexStatisticsPlanList (data) {
  return request({
    url: '/security/indexStatistics/planList',
    method: 'post',
    data: data
  })
}
//工作台-各单位全年指标隐患分布表头数据
export function reportSecIndexDataGetGaugeOutfit  (data) {
  return request({
    url: '/report/secIndexData/getGaugeOutfit ',
    method: 'post',
    data: data
  })
}
//工作台-各单位全年指标隐患分布列表
export function reportSecIndexDataDistributionHazard  (data) {
  return request({
    url: '/report/secIndexData/distributionHazard',
    method: 'post',
    data: data
  })
}

/**************************** 复查管理/隐患复查 ****************************/
//复查管理-列表
export function securityCheckDangerReviewList (data) {
  return request({
    url: '/security/checkDanger/reviewList',
    method: 'post',
    data: data
  })
}
//复查管理-督导组信息查询
export function securityCheckDangerGetMemberInfo (data) {
  return request({
    url: '/security/checkDanger/getMemberInfo',
    method: 'post',
    data: data
  })
}
//复查管理-督导组转移查询人员列表
export function securityCheckDangerGetMemberList (data) {
  return request({
    url: '/security/checkDanger/getMemberList',
    method: 'post',
    data: data
  })
}
//复查管理-转移隐患表复查人
export function securityCheckDangerUpdateByReview (data) {
  return request({
    url: '/security/checkDanger/updateByReview',
    method: 'post',
    data: data
  })
}
//复查管理-复查提交
export function securityCheckDangerApprove (data) {
  return request({
    url: '/security/checkDanger/approve',
    method: 'post',
    data: data
  })
}
/**************************** 整改通知/整改报告 ****************************/
//整改通知-列表
export function securityRectifyNoticeList (data) {
  return request({
    url: '/security/rectifyNotice/list',
    method: 'post',
    data: data
  })
}
//整改通知-查看
export function securityRectifyNoticeGetRectifyAdviceNoteView(query) {
  return request({
    url: '/security/rectifyNotice/getRectifyAdviceNoteView',
    method: 'get',
    params: query
  })
}
//整改通知-整改情况列表
export function securityCheckDangerNoPermissList(data) {
  return request({
    url: '/security/checkDanger/noPermissList',
    method: 'post',
    data: data
  })
}
//整改报告-列表
export function securityRectifyReportList (data) {
  return request({
    url: '/security/rectifyReport/list',
    method: 'post',
    data: data
  })
}
//整改报告-提交
export function securityRectifyReportUpdate (data) {
  return request({
    url: '/security/rectifyReport/update',
    method: 'post',
    data: data
  })
}
//整改报告-查看
export function securityRectifyReportGetRectifyReportView (query) {
  return request({
    url: '/security/rectifyReport/getRectifyReportView',
    method: 'get',
    params: query
  })
}
/**************************** 安全检查-公共部分 ****************************/
// 查询用户身份-校级管理员/院级管理员/督导组成员
export function securityDataStatisticsGetUserIdentity(query) {
  return request({
    url: '/security/dataStatistics/getUserIdentity',
    method: 'get',
    params: query
  })
}
// 根据检查项与实验室 查询触发次数 subId实验室ID hazardCheckId检查项ID
export function securityCheckPhotoGetCheckNumBySub(query) {
  return request({
    url: '/security/checkPhoto/getCheckNumBySub',
    method: 'get',
    params: query
  })
}
// 检查依据-下拉列表
export function securityCheckBasisGetList(data) {
  return request({
    url: '/security/checkBasis/getList',
    method: 'post',
    data: data
  })
}
// 督导组模糊查询下拉列表
export function securityCheckGroupFindGroupList(data) {
  return request({
    url: '/security/checkGroup/findGroupList',
    method: 'post',
    data: data
  })
}
//督导组成员查询
export function securityCheckGroupMemberGroupMemberList(data) {
  return request({
    url: '/security/checkGroupMember/groupMemberList',
    method: 'post',
    data: data
  })
}

//计划内督导组成员查询
export function securityMemberPlanMemberList(data) {
  return request({
    url: '/security/member/planMemberList',
    method: 'post',
    data: data
  })
}

//隐患清单-左侧目录列表
export function securityCheckHiddenDangerTitleList(data) {
  return request({
    url: '/security/checkHiddenDanger/titleList',
    method: 'post',
    data: data
  })
}

//隐患清单-右侧数据列表
export function securityCheckHiddenDangerList(data) {
  return request({
    url: '/security/checkHiddenDanger/list',
    method: 'post',
    data: data
  })
}

//根据计划-查询相关学院列表
export function securityMemberGetCollegeList (query) {
  return request({
    url: '/security/member/getCollegeList',
    method: 'get',
    params: query
  })
}

//根据计划-查询当前用户权限范围(督导组/校级管理员)
export function securityCheckHiddenDangerFindCurrentMemberRole (query) {
  return request({
    url: '/security/checkHiddenDanger/findCurrentMemberRole',
    method: 'get',
    params: query
  })
}

//隐患清单-详情
export function securityCheckHiddenDangerFindCheckHiddenDanger (query) {
  return request({
    url: '/security/checkHiddenDanger/findCheckHiddenDanger',
    method: 'get',
    params: query
  })
}

//隐患清单-提交
export function securityCheckHiddenDangerUpdate (data) {
  return request({
    url: '/security/checkHiddenDanger/update',
    method: 'post',
    data: data
  })
}

//隐患清单-批量提交
export function securityCheckHiddenDangerBatchHiddenDangerSubmit (data) {
  return request({
    url: '/security/checkHiddenDanger/batchHiddenDangerSubmit',
    method: 'post',
    data: data
  })
}
//隐患清单-批量提交
export function securityCheckPlanSubPlanCollegeList (data) {
  return request({
    url: '/security/checkPlan/subPlanCollegeList',
    method: 'post',
    data: data
  })
}
