于添 há 3 meses atrás
pai
commit
bc8317121e

+ 17 - 0
src/api/link/index.js

@@ -0,0 +1,17 @@
+// 文件模块相关接口
+import { moduleRequest } from '@/utils/reSourceRequest'
+
+const request = moduleRequest(`/api/webapp/`)
+	// /disk/courseauditrecord/getStudentTeacher
+	// /disk/courseauditrecord/stuLinkResourceRecordPage
+	// /disk/courseauditrecord/stuLinkResourceRecordAdd
+	// /disk/courseauditrecord/stuLinkResourceRecordEdit
+/**
+ * 获取文件列表相关接口
+ */
+// 获取文件列表(区分文件路径)
+//收藏增加
+export const getStudentTeacher = (p) => request('/disk/courseauditrecord/getStudentTeacher', p, 'get')
+export const stuLinkResourceRecordPage = (p) => request('/disk/courseauditrecord/stuLinkResourceRecordPage', p, 'get')
+export const stuLinkResourceRecordAdd = (p) => request('/disk/courseauditrecord/stuLinkResourceRecordAdd', p, 'post')
+export const stuLinkResourceRecordEdit = (p) => request('/disk/courseauditrecord/stuLinkResourceRecordEdit', p, 'post')

+ 7 - 0
src/router/student.js

@@ -108,6 +108,13 @@ const routes = [
 					title: '超链接'
 				}
 			},
+			{
+				path: 'myFavorites',
+				component: () => import('@/views/student/myFavorites/index.vue'),
+				meta: {
+					title: '我的收藏'
+				}
+			},
 			{
 				path: 'paper/:examType(\\d+)',
 				component: () => import('@/views/student/paper/index.vue'),

+ 27 - 4
src/views/myResources/myResources.vue

@@ -1,5 +1,6 @@
 <template>
-	<a-card>
+	<a-card v-if="visible">
+		<a-button type="primary" style="margin-left: 0px" @click="handleBack">返回</a-button>
 		<!-- 标签页 -->
 		<a-tabs v-model:activeKey="formState.verifyStatus" @change="tabChange">
 			<a-tab-pane key="0,3" tab="未发布" v-if="!pageType"></a-tab-pane>
@@ -92,7 +93,7 @@
 			bordered
 			:row-key="(record) => record.id"
 			:row-selection="rowSelection"
-			:scroll="{ x: 1500, y: 300 }"
+			:scroll="{ x: 1500, y: 600 }"
 		>
 			<template #bodyCell="{ column, text, record }">
 				<template
@@ -278,6 +279,9 @@
 		FileZipOutlined,
 		PlaySquareOutlined
 	} from '@ant-design/icons-vue'
+	const emit = defineEmits(['handleBack'])
+	const visible = ref(false)
+
 	// eslint-disable-next-line vue/no-setup-props-destructure
 	const { pageType } = defineProps({
 		pageType: {
@@ -539,7 +543,7 @@
 			collegeTwoId: formState.collegeTwoId,
 			collegeId: formState.collegeId,
 			collegeThreeId: formState.collegeThreeId,
-			isSelf: !pageType ? 1 : 0
+			isSelf: 0
 		}
 		resourceAuditApi
 			.page(params)
@@ -666,6 +670,10 @@
 		dataSource.value = []
 		getListData()
 	}
+	const handleBack = () => {
+		emit('handleBack')
+	}
+
 	//发布
 	const handlePublish = (record) => {
 		publishedData.value = record
@@ -889,6 +897,16 @@
 	}
 
 	onMounted(() => {
+		// if (pageType == 'economize') {
+		// 	formState.verifyStatus = '1'
+		// }
+		// getOrgTreeSelector()
+		// getFileformat()
+		// getResourceTypeTree()
+		// getListData()
+	})
+	const open = () => {
+		visible.value = true
 		if (pageType == 'economize') {
 			formState.verifyStatus = '1'
 		}
@@ -896,7 +914,12 @@
 		getFileformat()
 		getResourceTypeTree()
 		getListData()
-	})
+	}
+	const close = () => {
+		visible.value = false
+	}
+
+	defineExpose( {open,close})
 </script>
 
 <style scoped>

+ 1 - 0
src/views/portal/components/Header.vue

@@ -17,6 +17,7 @@
 						<a-menu-item key="student/classCollect">课程收藏</a-menu-item>
 					</a-sub-menu>
 					<a-menu-item key="student/link">超链接</a-menu-item>
+					<a-menu-item key="student/myFavorites">我的收藏</a-menu-item>
 				</a-menu>
 			</div>
 			<div class="header-right">

+ 29 - 2
src/views/student/classCentre/handouts.vue

@@ -21,6 +21,7 @@
 	import classCentre from '@/api/student/classCentre'
 	import { message } from 'ant-design-vue'
 	import VueOfficePdf from '@vue-office/pdf/lib/v3/vue-office-pdf.mjs'
+	import EventBus from "@/utils/EventBus";
 	const pdfRef = ref(null)
 	const scrollPercent = ref(0)
 	const maxStr = ref(0)
@@ -87,6 +88,7 @@
 		if (el && el.clientHeight == el.scrollHeight) {
 			maxStr.value = 100
 		}
+		console.log('添加了什么埋点呢 addScrollPlan ',props.classDetailParams)
 		classCentre.classPlanAdd({
 			progress: showPdf.value ? maxStr.value : 0,
 			hourId: props.hourId,
@@ -98,13 +100,38 @@
 			...props.classDetailParams
 		})
 	}
+
+	const onClassPlanAdd = (classDetailParams) =>{
+		outNowTimesStr.value = Date.now()
+		const el = pdfRef.value?.$el
+		if (el && el.clientHeight == el.scrollHeight) {
+			maxStr.value = 100
+		}
+		console.log('添加了什么埋点呢 onClassPlanAdd ',props.classDetailParams)
+		classCentre.classPlanAdd({
+			progress: showPdf.value ? maxStr.value : 0,
+			hourId: props.hourId,
+			stayTime: outNowTimesStr.value - nowTimesStr,
+			type: 1,
+			funcType: 2,
+			startTime: parseFloat(props.videoObj?.initialtime ?? 0),
+			endTime: Math.round(props.videoObj.currentTime * 1000),
+			...classDetailParams
+		})
+	}
 	function renderedHandler(e) {
 		showPdf.value = true
 	}
+	onMounted(() => {
+		console.log('添加了什么埋点呢 onMounted ',props.classDetailParams)
+	})
 	onBeforeUnmount(() => {
-		outNowTimesStr.value = Date.now()
-		addScrollPlan(1)
+		// outNowTimesStr.value = Date.now()
+		// addScrollPlan(1)
 	})
+	EventBus.off('onClassPlanAdd',onClassPlanAdd)
+	EventBus.on('onClassPlanAdd',onClassPlanAdd)
+	// EventBus.emit('onClassPlanAdd',classDetailParams.value(1))
 </script>
 <style scoped lang="less">
 	.flc {

+ 2 - 0
src/views/student/classCentre/index.vue

@@ -148,6 +148,7 @@
 	import subtitleBox from './subtitle.vue'
 	import Broadcast from '@/utils/Broadcast.js'
 	import {message} from "ant-design-vue";
+	import EventBus from "@/utils/EventBus";
 
 	const route = useRoute()
 	const router = useRouter()
@@ -383,6 +384,7 @@
 				funcType: 1,
 				...classDetailParams.value(1)
 			})
+			EventBus.emit('onClassPlanAdd',classDetailParams.value(1))
 		}
 	}
 	const isLike = () => {

+ 2 - 2
src/views/student/learningFootprint/index.vue

@@ -76,11 +76,11 @@
 		},
 		{
 			title: '课时名',
-			dataIndex: 'hourhlame'
+			dataIndex: 'hourName'
 		},
 		{
 			title: '学习时长',
-			dataIndex: 'endTime'
+			dataIndex: 'duration'
 		},
 		{
 			title: '学习进度',

+ 26 - 5
src/views/student/link/index.vue

@@ -1,11 +1,32 @@
-<script setup lang="ts">
+<template>
+	<div style="width: 100%; height: 100%">
+			<ListViewTeacher ref="listViewTeacherRef" @handleIn="handleIn"></ListViewTeacher>
+			<MyResources ref="myResourcesRef" @handleBack="handleBack"></MyResources>
+	</div>
 
-</script>
+</template>
 
-<template>
 
-</template>
+<script setup >
+import ListViewTeacher from './listViewTeacher.vue'
+import MyResources from '@/views/myResources/myResources.vue'
+const listViewTeacherRef = ref(null)
+const myResourcesRef = ref(null)
 
-<style scoped lang="less">
+const handleIn = (data) => {
+	listViewTeacherRef.value.close()
+	myResourcesRef.value.open(data)
+}
+const handleBack = (data) => {
+	myResourcesRef.value.close()
+	listViewTeacherRef.value.open()
+}
+
+onMounted(()=>{
+	listViewTeacherRef.value.open()
+})
+
+</script>
+<style scoped >
 
 </style>

+ 67 - 82
src/views/student/link/listViewTeacher.vue

@@ -1,45 +1,46 @@
 <template>
+		<div v-if="visible">
+			<a-table
+				ref="table"
+				:columns="columns"
+				:data-source="dataSources"
+				bordered
+				:expand-row-by-click="true"
+				:pagination="false"
+				style="width: 100%;  height: 600px"
+			>
+				<template #bodyCell="{ column, text, record }">
+					<template v-if="column.dataIndex === 'action'">
+						<span style="cursor: pointer" @click="handleIn(record)">进入</span>
+					</template>
 
-		<a-table
-			ref="table"
-			:columns="columns"
-			:data-source="dataSources"
-			:row-key="(record) => record.courseId"
-			bordered
-			:expand-row-by-click="true"
-			:pagination="false"
-			size="small"
-		>
-			<template #bodyCell="{ column, text, record }">
-<!--				<template v-if="column.dataIndex === 'createTime'">-->
-<!--					<span>{{ formatDateTime(record.createTime) }}</span>-->
-<!--				</template>-->
-
-<!--				<template v-if="column.dataIndex === 'action'">-->
-<!--	&lt;!&ndash;				<a-button size="small" @click="handleDetail(record)" style="margin-right: 5px">详情</a-button>&ndash;&gt;-->
-<!--	&lt;!&ndash;				<a-button size="small" @click="handleEdit(record)" style="margin-right: 5px">编辑</a-button>&ndash;&gt;-->
-<!--					<a-popover v-model:visible="popoverVisibles[record.collegeId]" title="确定删除?" trigger="click">-->
-<!--						<template #content>-->
-<!--							<a-button style="margin-right: 10px" type="primary" @click="handleShelf(record,1)">确定-->
-<!--							</a-button>-->
-<!--							<a-button @click="()=>{	popoverVisibles[record.collegeId] = false}">取消</a-button>-->
-<!--						</template>-->
-<!--						&lt;!&ndash;					<a-button size="small" style="margin-right: 5px">选择</a-button>&ndash;&gt;-->
-<!--						<a-button size="small" @click="handleDelete(record)" style="margin-right: 5px">删除</a-button>-->
-<!--					</a-popover>-->
-<!--				</template>-->
-			</template>
-		</a-table>
-		<div style="display: flex; width: 100%; justify-content: flex-end; margin-top: 10px">
-			<a-pagination
-				v-model:current="pagination.current"
-				v-model:pageSize="pagination.size"
-				:total="total"
-				show-less-items
-				@change="handlerChange"
-			/>
+					<!--				<template v-if="column.dataIndex === 'action'">-->
+					<!--	&lt;!&ndash;				<a-button size="small" @click="handleDetail(record)" style="margin-right: 5px">详情</a-button>&ndash;&gt;-->
+					<!--	&lt;!&ndash;				<a-button size="small" @click="handleEdit(record)" style="margin-right: 5px">编辑</a-button>&ndash;&gt;-->
+					<!--					<a-popover v-model:visible="popoverVisibles[record.collegeId]" title="确定删除?" trigger="click">-->
+					<!--						<template #content>-->
+					<!--							<a-button style="margin-right: 10px" type="primary" @click="handleShelf(record,1)">确定-->
+					<!--							</a-button>-->
+					<!--							<a-button @click="()=>{	popoverVisibles[record.collegeId] = false}">取消</a-button>-->
+					<!--						</template>-->
+					<!--						&lt;!&ndash;					<a-button size="small" style="margin-right: 5px">选择</a-button>&ndash;&gt;-->
+					<!--						<a-button size="small" @click="handleDelete(record)" style="margin-right: 5px">删除</a-button>-->
+					<!--					</a-popover>-->
+					<!--				</template>-->
+				</template>
+			</a-table>
+			<div style="display: flex; width: 100%; justify-content: flex-end; margin-top: 10px">
+				<a-pagination
+					v-model:current="pagination.current"
+					v-model:pageSize="pagination.size"
+					:total="total"
+					show-less-items
+					@change="handlerChange"
+				/>
+			</div>
 		</div>
 
+
 </template>
 
 <script setup>
@@ -50,55 +51,30 @@ import {parseTime} from "@/utils/exam";
 
 const router = useRouter()
 //网络
-// import { overviewLearningProgressApi } from '@/api/statisticalAnalysis/overviewLearningProgress'
-const emit = defineEmits(['handleEdit'])
+import { getStudentTeacher } from '@/api/link'
+const emit = defineEmits(['handleIn'])
 //发布按钮状态
 const releaseVisible = ref(false)
 const loading = ref(false) // 列表loading
 const dataSources = ref([])
 const popoverVisible = ref({})
 const popoverVisibles = ref({})
-const visible = ref(false)
+const visible = ref(true)
 const formState = ref({
 	name: '',
 	loacl: ''
 }) // 列表loading
 const columns = [
 	{
-		title: '课程课时名称',
-		dataIndex: 'courseHourName',
-		// sorter: true,
-		width: '15%'
-	},
-	{
-		title: '学生名称',
-		dataIndex: 'userName',
+		title: '老师名称',
+		dataIndex: 'teacherName',
 		// sorter: true,
-		width: '15%'
 	},
 	{
-		title: '观看次数',
-		dataIndex: 'viewCount',
+		title: '操作',
+		dataIndex: 'action',
 		// sorter: true,
-		width: '15%'
-	},
-	{
-		title: '课时id',
-		dataIndex: 'hourId',
-		// sorter: true,
-		width: '15%'
-	},
-	{
-		title: '学生id',
-		dataIndex: 'userId',
-		// sorter: true,
-		width: '15%'
-	},
-	{
-		title: '创建日期',
-		dataIndex: 'createDate',
-		// sorter: true,
-		width: '12%'
+		width: '5%'
 	},
 ]
 // tool.formatTimestamp()
@@ -119,6 +95,11 @@ const pagination = ref({
 // 		path: '/' + current
 // 	})
 // }
+const handleIn = (data) => {
+	console.log('进入', data)
+	emit("handleIn",data)
+}
+
 const handlerChange = (page, pageSize) => {
 	console.log('分页参数', page, pageSize)
 	// pagination.value.size = pageSize
@@ -129,11 +110,14 @@ const handlerChange = (page, pageSize) => {
 const handleOk = () => {
 	visible.value = false
 }
-const open = (id) => {
+const open = () => {
 	visible.value = true
 	pagination.value.size = 10
 	pagination.value.current = 1
-	getList(id)
+	getList()
+}
+const close = () => {
+	visible.value = false
 }
 const handleDetail = (record) => {
 	console.log('查看详情', record)
@@ -176,18 +160,16 @@ const handleDelete = (record) => {
 }
 const getList = (id) => {
 	const params = {
-		courseId: id,
-		startTime: undefined,
-		endTime: undefined,
+		// courseId: id,
 		size : pagination.value.size,
 		current : pagination.value.current
 	}
-	overviewLearningProgressApi.getStudyDetailCourseView(params).then((data)=>{
+	getStudentTeacher(params).then((data)=>{
 		console.log('获取列表', data)
-		dataSources.value = data.records
-		pagination.value.current = data.current
-		pagination.value.size = data.size
-		total.value = data.total
+		dataSources.value = data.data.records
+		pagination.value.current = data.data.current
+		pagination.value.size = data.data.size
+		total.value = data.data.total
 	})
 }
 const setList = (search) => {
@@ -214,6 +196,9 @@ const setList = (search) => {
 onMounted(() => {
 	// getListData()
 	// getList()
+	pagination.value.size = 10
+	pagination.value.current = 1
+	getList()
 })
 
 
@@ -225,7 +210,7 @@ onMounted(() => {
 // 	{ deep: true, immediate: true }
 // )
 defineExpose({
-	open
+	open,close
 })
 </script>
 

+ 2 - 1
src/views/myFavorites/index.vue → src/views/student/myFavorites/index.vue

@@ -403,7 +403,8 @@
 	const handlePublish = (record) => {
 		publishedData.value = record;
 		router.push({
-			path: '/portal/resourceDetails',
+			// path: '/portal/resourceDetails',
+			path: '/student/resourceDetails',
 			query: {
 				id: record.resourceId
 			}