import { apiResquest,apiResquestForm,apiResquestJsonList,apiResquestFormVideo,apiResquestTimer } from '@/api/request/request.js'

//项目检查库-树状列表
export const securityCheckOptionList = (data) => {
    return apiResquest({
        url: '/security/checkOption/list',
       method: 'POST',
       data: { ...data }
    })
};
//项目检查库-树状列表-包含被删除的数据
export const securityCheckOptionSelAllList = (data) => {
    return apiResquest({
        url: '/security/checkOption/selAllList',
       method: 'POST',
       data: { ...data }
    })
};
//随手拍-上报
export const securityAppCheckPhotoMyAdd = (data) => {
	return apiResquest({
		url: `/security/appCheckPhoto/myAdd`,
		method: 'POST',
		data: { ...data }
	})
};
//随手拍上报记录-列表
export const securityAppCheckPhotoMyList = (data) => {
	return apiResquest({
		url: `/security/appCheckPhoto/myList`,
		method: 'POST',
		data: { ...data }
	})
};
//随手拍隐患整改-列表
export const securityAppCheckPhotoRectifyList = (data) => {
	return apiResquest({
		url: `/security/appCheckPhoto/rectifyList`,
		method: 'POST',
		data: { ...data }
	})
};
//随手拍-详情
export const securityAppCheckPhotoDetail = (data) => {
	return apiResquest({
		url: `/security/appCheckPhoto/detail`,
		method: 'GET',
		data: data,
	})
};
//随手拍-整改
export const securityAppCheckPhotoUpdate = (data) => {
	return apiResquest({
		url: `/security/appCheckPhoto/update`,
		method: 'POST',
		data: { ...data }
	})
};
//随手拍-实验室检查项列表
export const securityAppCheckPhotoList = (data) => {
	return apiResquest({
		url: `/security/appCheckPhoto/list`,
		method: 'POST',
		data: { ...data }
	})
};
//安全检查-校级检查/学院自查列表
export const securityAppCheckPlanTitleList = (data) => {
    return apiResquest({
        url: '/security/appCheckPlan/titleList',
       method: 'POST',
       data: { ...data }
    })
};
//安全检查-校级检查/学院自查列表
export const securityAppCheckPlanAppTitleList = (data) => {
    return apiResquest({
        url: '/security/appCheckPlan/appTitleList',
       method: 'POST',
       data: { ...data }
    })
};

//获取分级列表
export const laboratoryLevelConfigGetWebLevelTitleList = (data) => {
	return apiResquest({
		url: `/laboratory/levelConfig/getWebLevelTitleList`,
		method: 'POST',
		data: { ...data }
	})
};
//根据条件获取检查任务列表
export const securityAppCheckManageList = (data) => {
    return apiResquest({
        url: '/security/appCheckManage/list',
       method: 'POST',
       data: { ...data }
    })
};
//根据条件获取复查任务列表
export const securityAppCheckDangerReviewSubList = (data) => {
    return apiResquest({
        url: '/security/appCheckDanger/reviewSubList',
       method: 'POST',
       data: { ...data }
    })
};
//根据条件获取整改任务列表
export const securityAppCheckDangerGetCheckDangerSubList = (data) => {
    return apiResquest({
        url: '/security/appCheckDanger/getCheckDangerSubList',
       method: 'POST',
       data: { ...data }
    })
};
//检查计划详情
export const securityAppCheckPlanFindCheckPlan = (data) => {
    return apiResquest({
        url: '/security/appCheckPlan/findCheckPlan',
       method: 'GET',
       data: { ...data }
    })
};
//实验室下-检查任务-检查项列表
export const securityAppCheckSetOptionList = (data) => {
    return apiResquest({
        url: '/security/appCheckSetOption/list',
       method: 'POST',
       data: { ...data }
    })
};
//实验室下-复查验证-检查项列表
export const securityAppCheckDangerReviewList = (data) => {
    return apiResquest({
        url: '/security/appCheckDanger/reviewList',
       method: 'POST',
       data: { ...data }
    })
};
//实验室下-隐患整改-检查项列表
export const securityAppCheckDangerGetCheckDangerSubId = (data) => {
    return apiResquest({
        url: '/security/appCheckDanger/getCheckDangerSubId',
       method: 'POST',
       data: { ...data }
    })
};
//实验室下-隐患整改-隐患详情
export const securityAppCheckDangerGetCheckProDetail = (data) => {
    return apiResquest({
        url: '/security/appCheckDanger/getCheckProDetail',
       method: 'POST',
       data: { ...data }
    })
};
//实验室下-隐患整改-完成整改/暂无法整改
export const securityAppCheckDangerCheckRectify = (data) => {
    return apiResquest({
        url: '/security/appCheckDanger/checkRectify',
       method: 'POST',
       data: { ...data }
    })
};
//实验室下-复查-复查完毕/退回整改
export const securityAppCheckDangerApprove = (data) => {
    return apiResquest({
        url: '/security/appCheckDanger/approve',
       method: 'POST',
       data: { ...data }
    })
};


//实验室下-复查验证-检查项查询
export const securityAppCheckSetOptionGetReviewList = (data) => {
    return apiResquest({
        url: '/security/appCheckSetOption/getReviewList',
       method: 'POST',
       data: { ...data }
    })
};
//实验室下-隐患整改-检查项查询
// export const securityAppCheckDangerGetCheckDangerSubId = (data) => {
//     return apiResquest({
//         url: '/security/appCheckDanger/getCheckDangerSubId',
//        method: 'POST',
//        data: { ...data }
//     })
// };
//查询计划内实验室下-未检查的检查项
export const securityCheckSetOptionUnCheckList = (data) => {
    return apiResquest({
        url: '/security/checkSetOption/unCheckList',
       method: 'GET',
       data: { ...data }
    })
};
//开始检查-提交-详情
export const securityAppCheckPlanCheckInfo = (data) => {
    return apiResquest({
        url: '/security/appCheckPlan/checkInfo',
       method: 'POST',
       data: { ...data }
    })
};
//开始检查-保存草稿-详情
export const securityDraftFindBySetOptionId = (data) => {
    return apiResquest({
        url: '/security/appDraft/findBySetOptionId',
       method: 'GET',
       data: { ...data }
    })
};
//开始检查-提交
export const securityAppCheckSetOptionCheckCommit = (data) => {
    return apiResquest({
        url: '/security/appCheckSetOption/checkCommit',
       method: 'POST',
       data: { ...data }
    })
};
//获取检查项在当前实验室出现的次数
export const securityAppCheckPhotoGetCheckNumBySub = (data) => {
    return apiResquest({
        url: '/security/appCheckPhoto/getCheckNumBySub',
       method: 'GET',
       data: { ...data }
    })
};
//检查项-检查完成
export const securityAppCheckSetOptionFinishCheck = (data) => {
    return apiResquest({
        url: '/security/appCheckSetOption/finishCheck',
       method: 'GET',
       data: { ...data }
    })
};

//隐患整改列表
export const securityAppCheckDangerGetCheckDangerBySub = (data) => {
    return apiResquest({
        url: '/security/appCheckDanger/getCheckDangerBySub',
       method: 'POST',
       data: { ...data }
    })
};

































//实验室-列表-获取学院列表下拉列表
export const systemDeptDropList = (data) => {
	return apiResquest({
		url: `/system/dept/dropList`,
		method: 'POST',
		data: { ...data }
	})
};
//查询楼栋楼层
export const laboratoryBigViewGetBuildByBigView = (data) => {
	return apiResquest({
		url: `/laboratory/bigView/getBuildByBigView`,
		method: 'GET',
		data: data,
	})
};


/*根据校区/楼栋/楼层查询实验室列表
  deptId:'校区查询'
  buildId:'楼栋查询'
  floorId:'楼层查询'
*/
//实验室-列表
export const laboratorySubRelInfoGetListByFloor = (data) => {
	return apiResquest({
		url: `/laboratory/subRelInfo/getListByFloor`,
		method: 'POST',
		data: { ...data }
	})
};

//根据学院id查询实验室列表
export const laboratorySubRelInfoGetRelList = (data) => {
	return apiResquest({
		url: `/laboratory/subRelInfo/getRelList`,
		method: 'POST',
		data: { ...data }
	})
};
//根据学院id查询实验室列表-带权限
export const laboratorySubRelInfoGetRelListByCondition = (data) => {
	return apiResquest({
		url: `/laboratory/subRelInfo/getRelListByCondition`,
		method: 'POST',
		data: { ...data }
	})
};
//字典
export const getDicts = (dictType) => {
	return apiResquest({
		url: '/system/dict/item/option?dictCode=' + dictType,
		method: 'get',
	})
};


/***开展检查***/
//开展检查-获取巡查计划管理列表
export const checkManageList  = (data) => {
    return apiResquest({
        url: `/zd-security/checkManage/appList`,
        method: 'POST',
        data: {...data}
    })
};
//开展检查-根据实验室id查询该实验室有关计划
export const getCheckPlanBySubId = (data) => {
    return apiResquestForm({
        url: '/zd-security/checkManage/getCheckPlanBySubId',
        method: 'GET',
        data: data
    })
};
//开展检查--新增--有计划的时候
export const checkManageUpdate  = (data) => {
    return apiResquest({
        url: `/zd-security/checkManage/appUpdate`,
        method: 'PUT',
        data: {...data}
    })
};
//开展检查--新增-该实验室没有计划的时候
export const checkManageAdd  = (data) => {
    return apiResquest({
        url: `/zd-security/checkManage/add`,
        method: 'POST',
        data: {...data}
    })
};
//开展检查-通过id查询巡查管理
export const findCheckManage = (data) => {
    return apiResquestForm({
        url: '/zd-security/checkManage/appFindCheckManage',
        method: 'GET',
        data: data
    })
};
//开展检查-根据计划id查询附件列表
export const findByPlanIdAttachment = (data) => {
    return apiResquestForm({
        url: '/zd-security/upload/findByCheckPlanId',
        method: 'GET',
        data: data
    })
};
//开展检查-根据实验室id查询该实验室详情
export const subjectFindSubjectInfo = (data) => {
    return apiResquestForm({
        url: '/zd-laboratory/subject/findSubjectInfo',
        method: 'GET',
        data: data
    })
};


//专项检查-根据选择的设备id生成检查项
export const getHazardInfoByJoinIds  = (data) => {
    return apiResquest({
        url: `/zd-security/checkManage/getHazardInfoByJoinIds`,
        method: 'GET',
        data: data,
    })
};
//专项检查-根据选择的检查项查询当前项出现的次数
export const countHazardNum  = (data) => {
    return apiResquest({
        url: `/zd-security/checkHazard/countHazardNum`,
        method: 'GET',
        data: data,
    })
};

//专项检查-根据实验室id查询设备
export const getHazardInfoBySubId  = (data) => {
    return apiResquest({
        url: `/laboratory/hazard/getHazardInfoBySubId`,
        method: 'GET',
        data: data,
    })
};
//巡查计划--检查计划各检查状态数据数量
export const getCheckStatusCount  = (data) => {
    return apiResquest({
        url: `/zd-security/checkPlan/getCheckStatusCount`,
        method: 'GET',
        data: data,
    })
};
//各检查状态数据数量
export const getManageStatusCount  = (data) => {
    return apiResquest({
        url: `/zd-security/checkManage/getManageStatusCount`,
        method: 'GET',
        data: data,
    })
};
//数据统计
export const dataStatistics  = (data) => {
    return apiResquest({
        url: `/security/DataStatistics/countApp`,
        method: 'GET',
        data: data,
    })
};
/* 巡查计划------------------------------ */
//巡查计划--列表
export const checkPlanList  = (data) => {
    return apiResquest({
        url: `/zd-security/checkPlan/appList`,
        method: 'POST',
        data: {...data}
    })
};
//巡查计划--添加
export const checkPlanAdd  = (data) => {
    return apiResquest({
        url: `/zd-security/checkPlan/appAdd`,
        method: 'POST',
        data: {...data}
    })
};
//巡查计划--全校学院/实验室数量
export const getAllSubNum  = (data) => {
    return apiResquest({
        url: `/laboratory/subject/getAllSubNum`,
        method: 'GET',
        data: data,
    })
};
//巡查计划-查询是否院级用户
export const isSCollege  = (data) => {
    return apiResquest({
        url: `/security/collegCheck/isSCollege`,
        method: 'GET',
        data: data,
    })
};
//巡查计划-选择学院-带实验室数量
export const laboratorySubRelInfoConditionCollegeInfo  = (data) => {
    return apiResquest({
        url: `/laboratory/subRelInfo/conditionCollegeInfo`,
        method: 'GET',
        data: data,
    })
};
//巡查计划-选择全校-带学院和实验室数量
export const laboratorySubRelInfoGetAllSubNum  = (data) => {
    return apiResquest({
        url: `/laboratory/subRelInfo/getAllSubNum`,
        method: 'GET',
        data: data,
    })
};

//专项检查/巡查计划-检查类型
export const dangerList  = (data) => {
    return apiResquest({
        url: `/system/dict/data/listNotPower?dictType=lab_hazard_type`,
        method: 'GET',
        data: data,
    })
};
//专项检查/巡查计划-设备查询
export const findDeviceList  = (data) => {
    return apiResquest({
        url: `/laboratory/hazard/queryHazardList`,
        method: 'POST',
        data: {...data}
    })
};
//专项检查/巡查计划-设备确定提交
export const haveHazardInSub  = (data) => {
    return apiResquest({
        url: `/laboratory/hazard/haveHazardInSub`,
        method: 'POST',
        data: {...data}
    })
};
//巡查计划--获取巡查组列表
export const checkGroupList  = (data) => {
    return apiResquest({
        url: `/zd-security/checkGroup/appFindGroupList`,
        method: 'POST',
        data: {...data}
    })
};
//巡查计划--巡查组详情
export const checkGroupDetail  = (data) => {
    return apiResquest({
        url: `/zd-security/checkGroup/appFind`,
        method: 'GET',
        data: data,
    })
};
//巡查计划--详情
export const checkPlanById  = (data) => {
    return apiResquest({
        url: `/zd-security/checkPlan/appFindCheckPlan`,
        method: 'GET',
        data: data,
    })
};
//巡查计划--修改
export const checkPlanEdit  = (data) => {
    return apiResquest({
        url: `/zd-security/checkPlan/appUpdate`,
        method: 'PUT',
        data: {...data}
    })
};
//巡查计划--添加
export const findByCheckPlanId  = (data) => {
    return apiResquest({
        url: `/zd-security/checkManage/appFindByCheckPlanId`,
        method: 'POST',
        data: {...data}
    })
};

//开展检查-安全隐患列表
export const checkHazardAppList = (data) => {
    return apiResquestForm({
        url: '/security/checkHazard/appCheckHazardList',
        method: 'GET',
        data: data
    })
};
//开展检查-安全隐患详情
export const getHazardById = (data) => {
    return apiResquestForm({
        url: '/security/checkHazard/getAppHazardById',
        method: 'GET',
        data: data
    })
};
//开展检查-获取巡查计划管理列表
export const checkHazardAdd  = (data) => {
    return apiResquest({
        url: `/security/checkRectify/addOrApprove`,
        method: 'POST',
        data: {...data}
    })
};
//随手拍-----------------------------------------------------
//随手拍--添加
export const checkClapAdd  = (data) => {
    return apiResquest({
        url: `/security/checkClap/appAdd`,
        method: 'POST',
        data: {...data}
    })
};
//随手拍--管理列表
export const checkClapList  = (data) => {
    return apiResquest({
        url: `/security/checkClap/appList`,
        method: 'GET',
        data: data,
    })
};
//随手拍--上报记录-列表
export const checkClapMylist  = (data) => {
    return apiResquest({
        url: `/security/checkClap/mylist`,
        method: 'GET',
        data: data,
    })
};
//随手拍--获取当前登录人身份信息
export const getUserCollegCheck  = (data) => {
    return apiResquest({
        url: `/security/collegCheck/getloginUser`,
        method: 'GET',
        data: data,
    })
};

//随手拍--详情
export const checkClapById  = (data) => {
    return apiResquest({
        url: `/security/checkClap/appFindById`,
        method: 'GET',
        data: data,
    })
};
//随手拍--整改
export const checkClapRectify  = (data) => {
    return apiResquest({
        url: `/security/checkClap/clapApprove`,
        method: 'POST',
        data: {...data}
    })
};
//根据名称查询实验室
export const subjectList = (data) => {
    return apiResquestForm({
        url: '/laboratory/subject/list/listAdmin',
        method: 'GET',
        data: data
    })
};
//批次下-检查项
export const securityAppCheckPlanSetGetOptionList = (data) => {
    return apiResquest({
        url: '/security/appCheckPlanSet/getOptionList',
        method: 'POST',
        data: {...data}
    })
};
//安全检查-扫码实验室-查询可检查实验室列表
export const securityAppCheckPlanScanCode = (data) => {
    return apiResquest({
        url: '/security/appCheckPlan/scanCode',
        method: 'POST',
        data: {...data}
    })
};
//安全检查-查询可用楼栋楼层级联数据
export const securityAppCheckDangerBuildAndFloorList = (data) => {
    return apiResquest({
        url: '/security/appCheckDanger/buildAndFloorList',
        method: 'POST',
        data: {...data}
    })
};