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



//登录
export const login = (data) => {
	return apiResquest({
		url: `/auth/appletLogin`,
		method: 'POST',
		data: { ...data }
	})
};
//退出登录
export const logout  = (data) => {
    return apiResquest({
        url: `/auth/logout`,
        method: 'GET',
        data: data,
    })
};
//查询公共配置
export const configInfo = (data) => {
	return apiResquest({
		url: `/auth/configInfo`,
		method: 'GET',
		data: data,
	})
};
//获取公共配置的图片
export const getLogoInfo  = (data) => {
    return apiResquest({
        url: `/system/config/info/getConfigByType`,
        method: 'GET',
        data: data,
    })
};
//化学品登录-扫码验证
export const chemicalAioIdentityScanLogin = (data) => {
	return apiResquest({
		url: `/chemical/aio/identity/scanLogin`,
		method: 'GET',
		data: data,
	})
};

//实验室-列表
export const laboratoryAppletSubList = (data) => {
	return apiResquest({
		url: `/laboratory/applet/subList`,
		method: 'POST',
		data: { ...data }
	})
};
//实验室-详情
export const laboratoryAppletGetSubDetailInfo = (data) => {
	return apiResquest({
		url: `/laboratory/applet/getSubDetailInfo`,
		method: 'GET',
		data: data,
	})
};
//实验室-查询喇叭列表
export const iotAppSpeakerFindHorn = (data) => {
	return apiResquest({
		url: `/iot/app/speaker/findHorn`,
		method: 'GET',
		data: data,
	})
};
//实验室-喇叭播放
export const iotAppSpeakerPlayVoice = (data) => {
	return apiResquest({
		url: `/iot/app/speaker/playVoice`,
		method: 'GET',
		data: data,
	})
};


//扫码-查询化学品详情
export const chemicalAppletCabinetDetail = (data) => {
	return apiResquest({
		url: `/chemical/applet/cabinetDetail`,
		method: 'GET',
		data: data,
	})
};
//查询化学品目录清单
export const chemicalAppletGetCabinetByChemical = (data) => {
	return apiResquest({
		url: `/chemical/applet/getCabinetByChemical`,
		method: 'GET',
		data: data,
	})
};
//扫码-查询化学品信息
export const chemicalAppletGetStockDetail = (data) => {
	return apiResquest({
		url: `/chemical/applet/getStockDetail`,
		method: 'GET',
		data: data,
	})
};
//个人中心-获取个人信息
export const systemUserProfile = (data) => {
	return apiResquest({
		url: `/system/user/profile`,
		method: 'GET',
		data: data,
	})
};
//用户修改头像接口
export const systemMineUserEdit = (data) => {
	return apiResquest({
		url: `/system/mine/user/edit`,
		method: 'POST',
		data: { ...data }
	})
};
/*查询用户列表-下拉列表
* userName : '', 名称
* userType: '',  0.系统 1.老师 2.学生
*/
export const systemUserDropList = (data) => {
	return apiResquest({
		url: `/system/user/dropList`,
		method: 'POST',
		data: { ...data }
	})
};




/*                分类获取公共配置
* category        1.系统参数 2.公共配置
* configType      1.基础配置 2.管控一体机 3.化学品终端 4.小程序配置 5.开发配置 6.首页配置
*/
export function getConfigByType(data) {
	return apiResquest({
		url: '/system/config/info/getConfigByType',
		method: 'post',
		data: {
			...data
		}
	})
}

//查询人员身份标识
export const securityDataStatisticsGetUserIdentity = (data) => {
	return apiResquest({
		url: `/security/dataStatistics/getUserIdentity`,
		method: 'GET',
		data: data,
	})
};

//查询小程序布局配置
export const systemAppletLayoutSelect = (data) => {
	return apiResquest({
    url: '/system/applet/layout/select',
		method: 'GET',
		data: data,
	})
};
//查询权限字段
export const systemAppletRolePermission = (data) => {
	return apiResquest({
    url: '/system/applet/role/permission',
		method: 'GET',
		data: data,
	})
};
/* 数据看板 */
//人数统计
export const reportAppStatisticsCountStatistics = (data) => {
	return apiResquest({
    url: '/report/app/statistics/countStatistics',
		method: 'GET',
		data: data,
	})
};
//实验室使用、空闲、异常数量
export const reportAppStatisticsLabStateStatistics = (data) => {
	return apiResquest({
    url: '/report/app/statistics/labStateStatistics',
		method: 'GET',
		data: data,
	})
};
//实验室-图表
export const reportAppStatisticsLabNumberPeople = (data) => {
	return apiResquest({
    url: '/report/app/statistics/labNumberPeople',
		method: 'GET',
		data: data,
	})
};

//学院人员设备列表
export const reportAppStatisticsPersonDeviceSafety = (data) => {
	return apiResquest({
    url: '/report/app/statistics/personDeviceSafety',
		method: 'GET',
		data: data,
	})
};
//危险源
export const reportAppStatisticsHazardTotalSort = (data) => {
	return apiResquest({
    url: '/report/app/statistics/hazardTotalSort',
		method: 'GET',
		data: data,
	})
};
//危化品
export const reportAppStatisticsChemicalStockSort = (data) => {
	return apiResquest({
    url: '/report/app/statistics/chemicalStockSort',
		method: 'GET',
		data: data,
	})
};
//安全隐患-查询计划标题
export const securityCheckPlanPlantList  = (data) => {
    return apiResquest({
        url: `/security/checkPlan/plantList`,
        method: 'POST',
        data: {...data}
    })
};
//安全隐患-安全隐患排行

export const reportAppStatisticsDangerSort = (data) => {
	return apiResquest({
    url: '/report/app/statistics/dangerSort',
		method: 'GET',
		data: data,
	})
};
//安全隐患-一级指标
export const securityCheckDangerHazardOneCollect = (data) => {
	return apiResquest({
    url: '/security/checkDanger/hazardOneCollect',
		method: 'GET',
		data: data,
	})
};
//安全隐患-暂无法整改
export const securityCheckDangerNotHazardOneCollect = (data) => {
	return apiResquest({
    url: '/security/checkDanger/notHazardOneCollect',
		method: 'POST',
		data: {...data}
	})
};
//安全隐患-预警处置
export const reportAppStatisticsWarningHandle = (data) => {
	return apiResquest({
    url: '/report/app/statistics/warningHandle',
		method: 'GET',
		data: data,
	})
};
//设备管控-top
export const reportAppletReportApiDeviceStatGetDeviceStat = (data) => {
	return apiResquest({
    url: '/report/applet/reportApiDeviceStat/getDeviceStat',
		method: 'GET',
		data: data,
	})
};
//设备管控-安全检查指标
export const reportAppletReportBsEquipDangerCheckList  = (data) => {
    return apiResquest({
        url: `/report/applet/reportBsEquipDanger/checkList`,
        method: 'GET',
        data: data,
    })
};
//设备管控-特种设备与常规冷热设备安全隐患统计
export const reportAppletReportBsEquipDangerList  = (data) => {
    return apiResquest({
        url: `/report/applet/reportBsEquipDanger/list`,
        method: 'POST',
        data: {...data}
    })
};
//设备管控-超期服役设备-统计
export const reportAppletReportApiEquipOverdueList  = (data) => {
    return apiResquest({
        url: `/report/applet/reportApiEquipOverdue/list`,
        method: 'GET',
        data: data,
    })
};
//设备管控-设备使用寿命-统计
export const reportAppletReportApiEquipLifeList  = (data) => {
    return apiResquest({
        url: `/report/applet/reportApiEquipLife/list`,
        method: 'GET',
        data: data,
    })
};
//设备管控-超期服役设备-列表
export const reportAppletReportApiEquipOverdueGetLifePageList  = (data) => {
    return apiResquest({
        url: `/report/applet/reportApiEquipOverdue/getLifePageList`,
        method: 'GET',
        data: data,
    })
};
//设备管控-设备使用寿命-列表
export const reportAppletReportApiEquipLifeGetReportBsEquipLifeList  = (data) => {
    return apiResquest({
         url: `/report/applet/reportApiEquipLife/getReportBsEquipLifeList`,
        method: 'POST',
        data: {...data}
    })
};
//大仪预约-使用使用排行TOP10
export const reportAppletReportApiEquipRankTopList  = (data) => {
    return apiResquest({
        url: `/report/applet/reportApiEquipRank/topList`,
        method: 'GET',
        data: data,
    })
};
//大仪预约-大仪预约排行
export const reportAppletReportBsEquipAppointTopList  = (data) => {
    return apiResquest({
        url: `/report/applet/reportBsEquipAppoint/topList`,
        method: 'GET',
        data: data,
    })
};
//大仪预约-设备总数
export const reportAppletReportBsEquipStatusList  = (data) => {
    return apiResquest({
        url: `/report/applet/reportBsEquipStatus/list`,
        method: 'GET',
        data: data,
    })
};

//笼位预约概况
export const reportAppletReportApiCageRateList  = (data) => {
    return apiResquest({
        url: `/report/applet/reportApiCageRate/list`,
        method: 'GET',
        data: data,
    })
};
//笼位预约-实验室A-B楼
export const reportAppletReportApiCageRateCageRateList  = (data) => {
    return apiResquest({
        url: `/report/applet/reportApiCageRate/cageRateList`,
        method: 'GET',
        data: data,
    })
};
//资源预约情况
export const reportAppletReportApiResourceRateResourceList  = (data) => {
    return apiResquest({
        url: `/report/applet/reportApiResourceRate/resourceList`,
        method: 'GET',
        data: data,
    })
};
//资源室隐患统计
export const reportAppletReportApiResourceRateAnalysisList  = (data) => {
    return apiResquest({
        url: `/report/applet/reportApiResourceRate/analysisList`,
        method: 'GET',
        data: data,
    })
};
/************************扫码相关************************/

//化学品终端-扫码登录
export const chemicalAioVerifyScanLogin  = (data) => {
	return apiResquest({
		url: `/chemical/aio/verify/scanLogin`,
		method: 'GET',
		data: data,
	})
};
//化学品终端-双人认证
export const chemicalAioVerifyAppletLogin  = (data) => {
	return apiResquest({
		url: `/chemical/aio/verify/appletLogin`,
		method: 'GET',
		data: data,
	})
};
//电子信息牌二维码-小程序扫码验证
export const laboratoryAppBoardScanCodeVerification  = (data) => {
	return apiResquest({
		url: `/laboratory/app/board/scanCodeVerification`,
		method: 'POST',
		data: {...data}
	})
};

/************************消息相关************************/

//消息-未读消息数量
export const systemNoticeGetNoticeCount  = (id,data) => {
    return apiResquest({
        url: `/system/notice/getNoticeCount`,
        method: 'GET',
        data: data,
    })
};
//消息-列表
export const systemNoticeGetNoticeList  = (data) => {
    return apiResquest({
        url: `/system/notice/getNoticeList`,
        method: 'GET',
        data: data,
    })
};
//消息-详情
export const systemNoticeGetNoticeDetail  = (data) => {
    return apiResquest({
        url: `/system/notice/getNoticeDetail`,
        method: 'GET',
        data: data,
    })
};

//消息-获取系统消息类型
export const systemNoticeGetNoticeType  = (data) => {
    return apiResquest({
        url: `/system/notice/getNoticeType`,
        method: 'GET',
        data: data,
    })
};

//查询人脸信息与认证状态
export const studentinfoFacemy  = (data) => {
    return apiResquest({
        url: `/base/app/lab/api/studentinfo/my`,
        method: 'GET',
    })
};

/************************未调试************************/


//获取离开检查配置
export const outSubjectPhoto  = (id,data) => {
    return apiResquestForm({
        url: `/base/app/lab/api/outSubjectPhoto`,
        method: 'GET',
        data: data,
    })
};

//分级管控未完成工作列表
export const gradingControl  = (data) => {
    return apiResquest({
        url: `/base/app/lab/manage/havingList`,
        method: 'POST',
        data: {...data}
    })
};
//积分信息
export const examPointsRecordGetMyPointsLogInfo  = (data) => {
    return apiResquest({
        url: `/exam/points/record/getMyPointsLogInfo`,
        method: 'POST',
        data: {...data}
    })
};
//积分信息(新-对接学习考试后的)
export const creditAppletGetMyPointsLogInfo  = (data) => {
    return apiResquest({
        url: `/credit/applet/getMyPointsLogInfo`,
        method: 'POST',
        data: {...data}
    })
};
//实验室-列表-获取学院列表下拉列表
export const systemDeptDropList = (data) => {
	return apiResquest({
		url: `/system/dept/dropList`,
		method: 'POST',
		data: { ...data }
	})
};
//实验室-列表-获取分类下拉列表
export const laboratoryClassTypeGetList = (data) => {
	return apiResquest({
		url: `/laboratory/typeConfig/getList`,
		method: 'POST',
		data: { ...data }
	})
};
//实验室-列表-获取分级
export const laboratoryClassLevelGetList = (data) => {
	return apiResquest({
		url: `/laboratory/levelConfig/getLevelTitleList`,
		method: 'POST',
		data: { ...data }
	})
};
//查询用户信息-(初始密码/手机号/导师/身份)
export const systemUserPersonalData  = (data) => {
    return apiResquest({
        url: `/system/user/personalData`,
        method: 'get',
    })
};
//根据 token 获取用户信息
export const authGetAppletUser  = (data) => {
    return apiResquest({
        url: `/auth/getAppletUser`,
				method: 'POST',
				data: { ...data }
    })
};

//查询是否是同位素实验并且有签退
export const laboratorySubPassOutIsotopeSubSign  = (data) => {
    return apiResquest({
        url: `/laboratory/subPassOut/isotopeSubSign`,
        method: 'GET',
        data: data,
    })
};

//扫码查询-化学品基本信息
export const chemicalAppletSelectStockInfo  = (data) => {
    return apiResquest({
        url: `/chemical/applet/selectStockInfo`,
				method: 'POST',
				data: { ...data }
    })
};
//查询是否是管理员/安全员
export const systemSubjectCheckIsAdminOrSafeUser = (data) => {
	return apiResquest({
		url: `/system/subject/checkIsAdminOrSafeUser`,
		method: 'GET',
		data: data,
	})
};
//查询是否有危废回收相关权限
export const hwmsAppRegisterApprovalIsPermit = (data) => {
	return apiResquest({
		url: `/hwms/app/registerApproval/isPermit`,
		method: 'POST',
		data: { ...data }
	})
};
//查询用户身份-校级/院级/管理员/负责人
export const systemUserGetPost = (data) => {
	return apiResquest({
		url: `/system/user/getPost`,
		method: 'POST',
		data: { ...data }
	})
};