import { baseRequest } from '@/utils/request'
const requestInfo = (url, ...arg) => baseRequest(`/dataSystemInfo/` + url, ...arg)
const requestCountPage = (url, ...arg) => baseRequest(`/dataSystemInfo/` + url, ...arg)
const requestRecord = (url, ...arg) => baseRequest(`/mobileInfo/crk/` + url, ...arg)
const requestVive = (url, ...arg) => baseRequest(`/qualityInspection/` + url, ...arg)
const requestData = (url, ...arg) => baseRequest(`/biz/enum/` + url, ...arg)
const request = (url, ...arg) => baseRequest(`/safeStorage/` + url, ...arg)
const request1 = (url, ...arg) => baseRequest(`/dataSystemInfo/` + url, ...arg)
const request2 = (url, ...arg) => baseRequest(`/reserveLayout/` + url, ...arg)
const request3 = (url, ...arg) => baseRequest(`/grainReserves/` + url, ...arg)
const requestSys = (url, ...arg) => baseRequest(`/sys/` + url, ...arg)
const requestUnit = (url, ...arg) => baseRequest(`/basic.info/unitInfo/` + url, ...arg)
// 储备布局-视频监控-视频分析列表
export default {
	recognizetPage(data) {
		return request('ssRiskIntelligentRecognize/page', data, 'get')
	},
	// 首页库区数量分页
	orgInfoCountPage(data) {
		return request1('selectOrgInfoPage', data, 'get')
	},
	// 首页仓房数量分页
	houseCountPage(data) {
		return request1('selectStoreHousePage', data, 'get')
	},
	// 粮食质量管理-出入库质检
	findJyPage(data) {
		return request2('kcswDefault/findJyxxPage', data, 'get')
	},
	// 粮食质量管理-出入库质检-查看
	findJyDetail(data) {
		return request2('kcswDefault/getJyxxDetail', data, 'get')
	},
	// 出入库信息-出入库分析图表
	chartData(data) {
		return request2('kcswDefault/getCrkChartDatas', data, 'get')
	},
	// 字典等级查询
	getAllChildrenData(data) {
		return requestData('getAllChildren', data, 'get')
	},
	// 粮食质量管理-质检报表查询
	reportPage(data) {
		return requestVive('reportPageList', data, 'get')
	},
	// 出入库信息-出入库业务记录
	businessRecordPage(data) {
		return requestRecord('businessRecord', data, 'get')
	},
	// 出入库信息-出入库业务记录-查看
	businessRecordDetail(data) {
		return requestRecord('getBusinessRecordDetail', data, 'get')
	},
	// 库存数量-库存明细
	businessCountPage(data) {
		return requestCountPage('selectKcCountPage', data, 'get')
	},
	// 库存数量-库存图表-等级
	businessGrade(data) {
		return requestCountPage('selectKcGrainGrade', data, 'get')
	},
	// 库存数量-库存图表-性质
	businessNature(data) {
		return requestCountPage('selectKcGrainNature', data, 'get')
	},
	// 库存数量-库存报告-品种查询
	businessGradeRepot(data) {
		return requestCountPage('selectKcGrainGradeRepot', data, 'get')
	},
	// 库存数量-库存报告
	businessNatureRepot(data) {
		return requestCountPage('selectKcGrainNatureRepot', data, 'get')
	},
	// 库存数量-库存报告
	businessSumRepot(data) {
		return requestCountPage('selectKcSumRepot', data, 'get')
	},
	// 库存数量-库存报告
	businessYearRepot(data) {
		return requestCountPage('selectKcYearRepot', data, 'get')
	},
	// 粮食质量管理-粮情检查档案分页
	getArchivePage(data) {
		return request2('grainInspectionArchive/page', data, 'get')
	},
	// 粮食质量管理-粮情检查档案详情
	getArchiveDetail(data) {
		return request2('grainInspectionArchive/detail', data, 'get')
	},
	// 粮食质量管理-粮情检查档案删除
	getArchiveDelete(data) {
		return request2('grainInspectionArchive/delete', data, 'post')
	},
	// 粮食质量管理-粮情检查档案新增
	getArchiveAdd(data) {
		return request2('grainInspectionArchive/add', data, 'post')
	},
	// 粮食质量管理-粮情检查档案编辑
	getArchiveEdit(data) {
		return request2('grainInspectionArchive/edit', data, 'post')
	},
	// 粮食质量管理-粮情检查档案详情带出数据
	getArchiveInfo(data) {
		return request2(
			`grainInspectionArchive/getDetailInfo/${data.reportType}/${data.orgId}/${data.storehouseId}`,
			data,
			'get'
		)
	},
	// 粮食质量管理-粮情检查档案-仓房
	getStoreHouseList(data) {
		return request3(`gopsPlan/getStoreHouseList/${data.orgId}`, data, 'get')
	},
	// 粮食质量管理-粮情检查档案-货位
	getWarehouseList(data) {
		return request3(`gopsPlan/getWarehouseList/${data.storehouseId}`, data, 'get')
	},
	// 粮食质量管理-粮情检查档案-提示人用于查看时
	getUserInfo(data) {
		return requestSys('user/detail', data, 'get')
	},
	// 粮食质量管理-粮情检查档案-库区名称
	getOrgNameList(data) {
		return request3('gopsPlan/getOrgIdList', data, 'get')
	},
	//图形展示
	getGraphData(data) {
		return requestInfo('selectByOrgInfo', data, 'get')
	},
	// /reserveLayout/
	// 粮食质量管理-质检机构分页
	inspectionOrgPage(data) {
		return request2('qualityInspectionOrg/page', data, 'get')
	},
	// 粮食质量管理-质检机构新增
	inspectionOrgAdd(data) {
		return request2('qualityInspectionOrg/add', data, 'post')
	},
	// 粮食质量管理-质检机构编辑
	inspectionOrgEdit(data) {
		return request2('qualityInspectionOrg/edit', data, 'post')
	},
	// 粮食质量管理-质检机构删除
	inspectionOrgDelete(data) {
		return request2('qualityInspectionOrg/delete', data, 'post')
	},
	// 粮食质量管理-质检机构详情
	inspectionOrgDetail(data) {
		return request2('qualityInspectionOrg/detail', data, 'get')
	},
	// 粮食质量管理-质检机构 - 省市县联动接口
	inspectionUnit(data) {
		return requestUnit(`getAreaByParentId/${data.parentId}`, data, 'get')
	}
	//
}
