canghailong пре 6 месеци
родитељ
комит
3ab7f37b50

+ 1 - 1
src/views/student/classCentre/ask.vue

@@ -120,7 +120,7 @@
 	import XnEditor from '@/components/Editor/index.vue'
 	const userInfo = tool.data.get('USER_INFO')
 	const typeOptions = tool.dictList('ANSWER_INFO_TYPE')
-	const infoTypeName = computed(() => (e) => typeOptions.find((r) => r.value == e).label)
+	const infoTypeName = computed(() => (e) => typeOptions.find((r) => r.value == e)?.label)
 	// 表单数据,也就是默认给一些数据
 	const visible = ref(false)
 	const formData = ref({})

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

@@ -2,7 +2,8 @@
 	<a-card>
 		<s-table ref="table" :columns="columns" :data="loadData" bordered :row-key="(record) => record.id">
 			<template #bodyCell="{ column, record }">
-				<template v-if="column.dataIndex == 'endTime'">{{ classTime(record) }}</template>
+				<template v-if="column.dataIndex == 'endTime'">{{ classTime(record.endTime) }}</template>
+				<template v-if="column.dataIndex == 'progress'">{{ record.progress + '%' }}</template>
 				<template v-if="column.dataIndex == 'funcType'">{{ funcTypeName(record.funcType) }}</template>
 				<template v-if="column.dataIndex == 'type'">{{ typeName(record.type) }}</template>
 				<template v-if="column.dataIndex === 'action'">
@@ -56,7 +57,7 @@
 		return `${hours ? hours + '小时' : ''}${minutes ? minutes + '分' : ''}${secondsLeft}秒`
 	}
 	const classTime = computed(() => (e) => {
-		return formatTime(parseFloat(e.endTime ?? 0) / 1000)
+		return formatTime(parseFloat(e ?? 0) / 1000)
 	})
 	const router = useRouter()
 	const columns = [
@@ -76,6 +77,10 @@
 			title: '学习时长',
 			dataIndex: 'endTime'
 		},
+		{
+			title: '学习进度',
+			dataIndex: 'progress'
+		},
 		{
 			title: '文件名',
 			dataIndex: 'fileName'