<template>
	<div style="overflow-y: auto">
		<!-- <img :src="images" style="width: 100%; height: 100%" /> -->
		<a-layout>
			<Header @onChangeCurrent="onChangeCurrent" />
			<div style="width: 71%; margin-left: 10%">
				<!-- <BreadCrumb />
				<ResourceCenter /> -->
				<!-- <ResourceDetails v-if="indexType == 'resourceDetails'" ref="ResourceDetailsRef" /> -->
			</div>
		</a-layout>
		<Footer />
	</div>
</template>

<script setup>
	import Header from './components/Header.vue'
	import BreadCrumb from './components/BreadCrumb.vue'
	import Footer from './components/Footer.vue'
	import ResourceCenter from '@/views/resourceCenter/index.vue'
	import EventBus from '@/utils/EventBus'
	import { useRouter, useRoute } from 'vue-router'
	const router = useRouter()

	const indexType = ref('resourceCenter')

	const images = ref('')
	const ResourceDetailsRef = ref(null)
	const onChangeCurrent = (current) => {
		indexType.value = current

		router.push({
			path: '/' + current
		})
	}

	const handlerItemSidebar = (item) => {
		// emit('handlerItemSidebar', item)
	}

	const handleOpenResourceDetails = (item) => {
		// emit('handlerItemSidebar', item)
		// indexType.value = 'resourceDetails'
		// nextTick(() => {
		// 	console.log('看看呢', ResourceDetailsRef.value, item) /
		// 		// if (ResourceDetailsRef.value) {
		// 		// 	ResourceDetailsRef.value.setData(item)
		// 		// }
		// })
		console.log('看看呢', item)
		router.push({
			path: '/portal/resourceDetails',
			query: {
				id: item.id
			}
		})
	}
	onMounted(() => {
		// setTimeout(() => {
		// 	images.value = 'http://192.168.1.245:10005/education/2025/7/2/1940361083973906434.jpg'
		// }, 10000)
	})
</script>

<style scoped>
	.content {
		/* padding-left: 10%;
		padding-right: 30%; */
	}
</style>
