<template>

	<a-menu v-model:selectedKeys="current" mode="horizontal" theme="light" style="line-height: 55px">
		<a-menu-item style="margin-left: 10px; margin-right: 10px" key="">学习行为分析</a-menu-item>
		<a-menu-item style="margin-left: 10px; margin-right: 10px" key="AnalysisTeachingActivities">教学活动分析</a-menu-item>
		<a-menu-item style="margin-left: 10px; margin-right: 10px" key="OverviewLearningProgress">学习明细数据</a-menu-item>
		<a-menu-item style="margin-left: 10px; margin-right: 10px" key="VideoAnalysis">视频分析</a-menu-item>
		<!--					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="courseOpen">课程开课</a-menu-item>-->
	</a-menu>

	<AnalysisLearningBehaviors v-if="current == ''"></AnalysisLearningBehaviors>
	<AnalysisTeachingActivities v-if="current == 'AnalysisTeachingActivities'"></AnalysisTeachingActivities>
	<OverviewLearningProgress v-if="current == 'OverviewLearningProgress'"></OverviewLearningProgress>
	<VideoAnalysis v-if="current == 'VideoAnalysis'"></VideoAnalysis>

</template>

<script setup>
	import { ref, onMounted } from 'vue'
	import { PlusOutlined } from '@ant-design/icons-vue'
	import tool from '@/utils/tool'
	import AnalysisLearningBehaviors from '@/views/statisticalAnalysis/analysisLearningBehaviors/index.vue'
	import AnalysisTeachingActivities from '@/views/statisticalAnalysis/analysisTeachingActivities/index.vue'
	import OverviewLearningProgress from '@/views/statisticalAnalysis/overviewLearningProgress/index.vue'
	import VideoAnalysis from '@/views/statisticalAnalysis/videoAnalysis/index.vue'
	import { useRouter } from 'vue-router'
	const router = useRouter()
	//发布按钮状态
	const current = ref('')
	const loading = ref(false) // 列表loading

	const isState = ref(0) // 列表loading
	const listViewRef = ref(null)
	const dialogViewRef = ref(null)

	// 搜索值
	const searchValue = ref('')
	const open = ref(false)

	const handleNewCourse = () => {
		// 在这里添加新建课程的逻辑
		dialogViewRef.value.open()
	}
	const handleAddItem = () => {
		console.log('要去刷新',listViewRef.value)
		// 在这里添加新建课程的逻辑
		listViewRef.value.getList()
	}
	const handlerSearch = (data) => {
		console.log('新建课程')
		// 在这里添加新建课程的逻辑
		listViewRef.value.setList(data)
	}
	const handleEdit = (item) => {
		dialogViewRef.value.edit(item)
	}

	const pagination = reactive({
		pageSize: 10,
		pageNum: 1,
		total: 0
	})
	const onChangeCurrent = (current) => {
		router.push({
			path: '/' + current
		})
	}
	const publishedData = ref()
	//发布确定

	// 上传资源模态框
	const uploadModalVisible = ref(false)

	onMounted(() => {
		// getListData()

		nextTick(()=>{
				// current.value = "AnalysisLearningBehaviors"

		})
	})
</script>

<style scoped>
	.desc p {
		margin-bottom: 1em;
	}
</style>
