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

//实验室-列表-获取所列表下拉列表
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
    })
};
//项目检查库-树状列表
export const checkOptionListNew = (data) => {
    return apiResquestForm({
        url: '/zd-security/checkOption/list',
        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
    })
};
