let routeDataList = [
	{	
		id:'1',
		name: "预警记录",
		limits:"",
		route: "mineWarningRecording",
		routeUrl: "/pages_basics/earlyWarningManage/earlyWarningList",
		img: require('@/images/basicsModules/icon_003.png'),
		buttonType:"page",
	},
	{	
		id:'2',
		name: "我的实验室",
		limits:"",
		route: "laboratory",
		routeUrl: "/pages_manage/laboratory/meLaboratory",
		img: require('@/images/basicsModules/icon_002.png'),
		buttonType:"page",
	},
	{
		id:'3',
		name: "预案执行记录",
		limits:"",
		route: "PlanExecuteRecord",
		routeUrl: "/pages_manage/plan/planList",
		img: require('@/images/basicsModules/icon_004.png'),
		buttonType:"page",
	},
	{
		id:'4',
		name: "身份验证",
		limits:"",
		route: "faceImage",
		routeUrl: "/pages_basics/faceImage",
		img: require('@/images/basicsModules/icon_001.png'),
		buttonType:"page",
	}
];

export function getMineConfig(data) {
	let list = JSON.parse(JSON.stringify(data));
	let mineList = [];
	for(let i=0 ; i<list.length; i++){
		let bigObj = {
			type:list[i].type,
			layout:[],
		};
		for(let l=0 ; l<list[i].layout.length; l++){
		console.log('list',list[i].layout[l])
			for(let o=0 ; o<routeDataList.length; o++){
				if(list[i].layout[l].path === routeDataList[o].route){
					bigObj.layout.push({
						limits:routeDataList[o].limits,
						route:routeDataList[o].route,
						routeUrl:routeDataList[o].routeUrl,
						name:routeDataList[o].name,
						img:routeDataList[o].img,
						buttonType:routeDataList[o].buttonType,
					})
				}
			}
		}
		if(bigObj.layout[0]){
			mineList.push(bigObj);
		}
	}
  return mineList;
}
