于添 пре 4 месеци
родитељ
комит
49289058e7

+ 7 - 3
src/components/UpLoadImg/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<div class="cover-upload-row">
 		<div v-if="form.coverUrl != ''" class="cover-upload-box">
-			<a-image :src="form.coverUrl" class="cover-img" />
+			<a-image :src="form.coverUrl" class="showImg" />
 		</div>
 		<a-upload
 			:show-upload-list="false"
@@ -190,7 +190,7 @@
 			margin-right: 24px;
 			border: 1px dashed #d9d9d9;
 			cursor: pointer;
-
+			overflow: hidden;
 			.cover-img {
 				width: 100%;
 				height: 100%;
@@ -214,7 +214,11 @@
 			font-size: 13px;
 		}
 	}
-
+	.showImg {
+		width: 100%;
+		height: 100%;
+		border-radius: 8px;
+	}
 	.upload-tip {
 		color: #888;
 		font-size: 13px;

+ 9 - 2
src/views/courseAdd/components/courseProduction/addClassHours.vue

@@ -91,6 +91,7 @@ const handlerUpSrt = (id) => {
 	form.srtUrl = id
 }
 
+
 const setFile = (fileData) => {
 	console.log("设置了文件", fileData)
 	file.value.id = fileData.id
@@ -145,7 +146,10 @@ const getData = (callBack) => {
 
 const open = () => {
 	modeTag.value = 'add'
-	// reset()
+
+}
+const handleReset = () => {
+	reset()
 }
 const reset = () => {
 	console.log("关掉吗")
@@ -162,6 +166,9 @@ const reset = () => {
 		fileNameRef.value.setData({id: "", name: ""})
 		upLoadDocRef.value.setData({id: "", name: ""})
 		UpLoadSrtRef.value.setData({id: "", name: ""})
+
+		emit('handlerEx', null)
+		emit('handlerExs', null)
 	})
 }
 
@@ -273,7 +280,7 @@ const edit = (item) => {
 
 }
 defineExpose({
-	getData, setFile, edit, open, reset
+	getData, setFile, edit, open, reset,handleReset
 })
 
 </script>

+ 3 - 2
src/views/courseAdd/components/courseProduction/index.vue

@@ -37,7 +37,7 @@
 			<div v-for="(lesson, lessonIndex) in chapter.classHours" :key="lessonIndex" class="lesson">
 				<!-- 视频封面 -->
 				<img
-					src="@/assets/images/fileImg/gif.png"
+					:src="sysConfig.FILE_URL+lesson.coverImageUrl"
 					alt="Video Cover"
 					class="video-cover"
 					style="width: 140px; height: 90px"
@@ -91,6 +91,7 @@
 	import { useRoute, useRouter } from 'vue-router'
 	import { del, edit as editApi } from '@/api/hour/index'
 	import tool from '@/utils/tool'
+	import sysConfig from "@/config";
 
 	const router = useRouter()
 	const route = useRoute()
@@ -232,7 +233,7 @@
 	}
 	// 获取章节列表
 	const getList = () => {
-		console.log('获取列表章节')
+		console.log('获取列表章节',props.courseInfoId)
 		courseProductionApi
 			.allList({ courseId: props.courseInfoId })
 			.then((res) => {

+ 3 - 1
src/views/courseAdd/index.vue

@@ -67,7 +67,9 @@
 			})
 		}
 		if(key == '2'){
-
+			nextTick(()=>{
+				courseProductionRef.value.getList()
+			})
 		}
 	}
 

+ 3 - 1
src/views/courseManagement/index.vue

@@ -67,9 +67,11 @@
 		// 		id: item.courseId
 		// 	}
 		// })
+
 		courseModalVisible.value = true
-		courseModalTitle.value = '编辑课程'
 		courseInfoId.value = item.courseId
+		courseModalTitle.value = '编辑课程'
+
 	}
 	const handleDetail = (item) => {
 		courseDetailModalVisible.value = true

+ 12 - 21
src/views/resourceDetails/components/VideoDetails.vue

@@ -5,7 +5,7 @@
 		<div class="user-info-container">
 			<div class="video-info" style="width: 850px">
 				<div
-					v-if="videoFormat == 'jpg' || videoFormat == 'bmp' || videoFormat == 'png' || videoFormat == 'jpeg'"
+					v-if="['jpg', 'bmp', 'png', 'jpeg'].includes(videoFormat)"
 					style="width: 850px; height: 350px"
 				>
 					<!-- <img :src="imgs + itemData.coverImagePath" style="width: 100%; height: 100%" /> -->
@@ -15,32 +15,14 @@
 				</div>
 				<!-- "wmv","avi","flv","mpeg","mpg","rmvb","mov","mkv" -->
 				<div
-					v-if="
-						videoFormat == 'mkv' ||
-						videoFormat == 'mp4' ||
-						videoFormat == 'wmv' ||
-						videoFormat == 'avi' ||
-						videoFormat == 'flv' ||
-						videoFormat == 'mpeg' ||
-						videoFormat == 'mpg' ||
-						videoFormat == 'rmvb' ||
-						videoFormat == 'mov'
-					"
+					v-else-if="['mkv', 'mp4', 'wmv', 'avi', 'flv', 'mpeg', 'mpg', 'rmvb', 'mov'].includes(videoFormat)"
 					style="width: 850px; height: 350px"
 				>
 					<video :src="resSrc" controls style="width: 100%; height: 100%" />
 				</div>
 				<!-- "doc","docx","ppt","pptx","xls","xlsx" -->
 				<div
-					v-if="
-						videoFormat == 'docx' ||
-						videoFormat == 'doc' ||
-						videoFormat == 'ppt' ||
-						videoFormat == 'pptx' ||
-						videoFormat == 'xls' ||
-						videoFormat == 'xlsx' ||
-						videoFormat == 'pdf'
-					"
+					v-else-if="['docx', 'doc', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(videoFormat)"
 					style="width: 850px; height: 350px"
 				>
 					<!-- <PDF :src="resSrc" :width="850" :height="350" /> -->
@@ -48,6 +30,15 @@
 					<!-- <a-image width="200px" height="220px" :src="pdfRes" :preview="false" @click="handleDownload(resSrc)" /> -->
 					<!-- <a-button type="primary" @click="handleDownload(resSrc)">去预览</a-button> -->
 				</div>
+				<div
+					v-else
+					style="width: 850px; height: 350px;	border: 1px solid #dfe2e5; display: flex; justify-content: center; align-items: center"
+				>
+					<span style="display: block">本资源格式不可预览</span>
+					<!-- <PDF :src="resSrc" :width="850" :height="350" /> -->
+					<!-- <a-image width="200px" height="220px" :src="pdfRes" :preview="false" @click="handleDownload(resSrc)" /> -->
+					<!-- <a-button type="primary" @click="handleDownload(resSrc)">去预览</a-button> -->
+				</div>
 				<div style="height: 20px"></div>
 				<!-- 用户信息部分 -->
 				<div class="user-info" style="display: flex; flex-direction: column">

+ 7 - 0
src/views/statisticalAnalysis/analysisLearningBehaviors/index.vue

@@ -424,6 +424,13 @@
 		if (tabName === 'college') {
 			nextTick(async () => {
 				await initCollegeCharts()
+
+			})
+		}
+		if (tabName === 'student') {
+			nextTick(async () => {
+				await searchStudent()
+
 			})
 		}
 	}

+ 23 - 3
src/views/statisticalAnalysis/overviewLearningProgress/index.vue

@@ -83,7 +83,7 @@
 				<a-table
 					:columns="tableColumns"
 					:data-source="tableData"
-					:pagination="false"
+					:pagination="pagination"
 					:loading="loading"
 					size="small"
 				></a-table>
@@ -120,9 +120,23 @@
 	const filters = reactive({
 		courseId: '',
 		startTime: undefined,
-		endTime: undefined
-	})
+		endTime: undefined,
 
+	})
+	// 分页配置
+	const pagination = reactive({
+		current: 1,
+		size: 10,
+		total: 0,
+		showSizeChanger: true,
+		showQuickJumper: true,
+		showTotal: (total, range) => `显示 ${range[0]}-${range[1]} 条,共 ${total} 条`,
+		onChange: (page, pageSize) => {
+			pagination.current = page
+			pagination.size = pageSize
+			fetchStudyDetail()
+		}
+	})
 	// 统计卡片数据
 	const statsCards = reactive([
 		{
@@ -340,10 +354,16 @@
 		try {
 			const params = {
 				courseId: filters.courseId,
+				current : pagination.current,
+				size : pagination.size,
 				startTime: startDate.value ? startDate.value.format('YYYY-MM-DD') : filters.startTime,
 				endTime: endDate.value ? endDate.value.format('YYYY-MM-DD') : filters.endTime
 			}
 			const data = await overviewLearningProgressApi.getStudyDetail(params)
+
+			pagination.current = data.current
+			pagination.total = data.total
+
 			// 更新表格数据
 			tableData.value = (data.records || []).map((item, index) => ({
 				...item,

+ 5 - 8
src/views/statisticalAnalysis/videoAnalysis/index.vue

@@ -120,7 +120,7 @@
 					<template v-if="column.key === 'finishRate'">
 						<div class="progress-container">
 							<a-progress :percent="record.finishRate * 100" size="small" />
-							<span :class="{ 'low-engagement': record.finishRate * 100 < 50 }"> {{ record.finishRate * 100 }}% </span>
+<!--							<span :class="{ 'low-engagement': record.finishRate * 100 < 50 }"> {{ record.finishRate * 100 }}% </span>-->
 						</div>
 					</template>
 					<template v-else-if="column.key === 'jumpTimeContact'">
@@ -144,16 +144,13 @@
 				<template #bodyCell="{ column, record }">
 					<template v-if="column.key === 'completeRate'">
 						<span
-							:class="{
-								'completion-rate': record.completeRate * 100 >= 70,
-								'low-engagement': record.completeRate * 100 < 70
-							}"
+							class="low-engagement"
 						>
 							{{ record.completeRate * 100 }}%
 						</span>
 					</template>
 					<template v-else-if="column.key === 'jumpOutRate'">
-						<span :class="{ 'low-engagement': record.jumpOutRate * 100 > 25 }"> {{ record.jumpOutRate * 100 }}% </span>
+						<span class="low-engagement"> {{ record.jumpOutRate * 100 }}% </span>
 					</template>
 				</template>
 			</a-table>
@@ -238,7 +235,7 @@
 		showTotal: (total, range) => `显示 ${range[0]}-${range[1]} 条,共 ${total} 条`,
 		onChange: (page, pageSize) => {
 			pagination.current = page
-			pagination.pageSize = pageSize
+			pagination.size = pageSize
 			fetchStudentData()
 		}
 	})
@@ -547,7 +544,7 @@
 			const response = await videoAnalysisApi.studyBehaviorDetailData({
 				...filters,
 				current: pagination.current,
-				pageSize: pagination.pageSize
+				size: pagination.pageSize
 			})
 			const data = response.records || []
 			studentData.value = data.map((r) => {