소스 검색

论坛类型修改

canghailong 7 달 전
부모
커밋
97a494c2c6
4개의 변경된 파일35개의 추가작업 그리고 27개의 파일을 삭제
  1. 5 4
      src/views/forum/addForum.vue
  2. 5 0
      src/views/forum/index.vue
  3. 7 3
      src/views/student/classCentre/index.vue
  4. 18 20
      src/views/student/paper/index.vue

+ 5 - 4
src/views/forum/addForum.vue

@@ -78,8 +78,8 @@
 		return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
 	}
 
-	const getData = () => {
-		forumApi.forumTypeList().then((data) => {
+	const getData = async () => {
+		await forumApi.forumTypeList().then((data) => {
 			typeOptions.value = data.map((r) => {
 				return {
 					label: r.typeName,
@@ -88,7 +88,7 @@
 				}
 			})
 		})
-		forumApi.allUserList().then((data) => {
+		await forumApi.allUserList().then((data) => {
 			usertypeOptions.value = data.map((r) => {
 				return {
 					label: r.name,
@@ -103,6 +103,7 @@
 		if (route.query.postType == 2) {
 			errorCorrection()
 		}
+		formData.value.typeId = typeOptions.value.filter((r) => r.typeDesc == route.query.postType)[0]?.typeId
 	}
 	onMounted(() => {
 		getData()
@@ -175,7 +176,7 @@
 	function errorCorrection() {
 		errorVal.value = {
 			contentCorrectionParam: {
-				resourceType: route.query.type,
+				resourceType: route.query.postType,
 				resourceId: route.query.id
 			}
 		}

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 5 - 0
src/views/forum/index.vue


+ 7 - 3
src/views/student/classCentre/index.vue

@@ -284,11 +284,14 @@
 		return s
 	}
 	const forumData = computed(() => {
-		let item = findNodeByKey(classTimeList.value, selectedKeys.value[0])
+		let item = findNodeByKey(classTimeList.value, selectedKeys.value[0]) ?? {}
+		if (!item.src) {
+			item.src = classTimeData.value.filter((r) => r.funcType == 1)[0]?.url
+		}
 		return {
 			id: selectedKeys.value[0],
 			title: item?.name,
-			videoUrl: btoa(encodeURIComponent(videoRef.value?.src))
+			videoUrl: btoa(encodeURIComponent(videoRef.value?.src ? videoRef.value.src : item.src))
 		}
 	})
 	const showPdf = ref(true)
@@ -346,7 +349,8 @@
 					endTime: Math.round(videoRef.value.currentTime * 1000),
 					progress: Math.round(progress),
 					hourId: selectedKeys.value[0],
-					stayTime: outNowTimesStr.value - nowTimesStr
+					stayTime: outNowTimesStr.value - nowTimesStr,
+					type: 1
 				})
 				.then((data) => {})
 		}

+ 18 - 20
src/views/student/paper/index.vue

@@ -143,18 +143,20 @@
 			ellipsis: true
 		}
 	]
-	const taskColumns = computed(()=>taskAllColumns.value.filter(r=>r.examType.includes(parseFloat(examType.value))))
+	const taskColumns = computed(() =>
+		taskAllColumns.value.filter((r) => r.examType.includes(parseFloat(examType.value)))
+	)
 	const taskAllColumns = ref([
 		{ title: '问卷名称', dataIndex: 'name', key: 'name', examType: [4] },
 		{ title: '试卷类型', dataIndex: 'paperType', key: 'paperType', width: 120, examType: [4] },
 		{ title: '学科', dataIndex: 'subjectId', key: 'subjectId', width: 120, examType: [4] },
 
-		{ title: '问卷名称', dataIndex: 'examName', key: 'examName',examType:[1,2,3] },
-		{ title: '问卷类型', dataIndex: 'examType', key: 'examType', width: 120,examType:[1,2,3] },
-		{ title: '开始时间', dataIndex: 'startTime', key: 'startTime', width: 180 ,examType:[1,2,3]},
-		{ title: '结束时间', dataIndex: 'endTime', key: 'endTime', width: 180,examType:[1,2,3] },
-		{ title: '状态', dataIndex: 'examStatus', key: 'examStatus', width: 90,examType:[1,2,3] },
-		{ title: '操作', key: 'action', align: 'right', width: 120,examType:[1,2,3,4] }
+		{ title: '问卷名称', dataIndex: 'examName', key: 'examName', examType: [1, 2, 3] },
+		{ title: '问卷类型', dataIndex: 'examType', key: 'examType', width: 120, examType: [1, 2, 3] },
+		{ title: '开始时间', dataIndex: 'startTime', key: 'startTime', width: 180, examType: [1, 2, 3] },
+		{ title: '结束时间', dataIndex: 'endTime', key: 'endTime', width: 180, examType: [1, 2, 3] },
+		{ title: '状态', dataIndex: 'examStatus', key: 'examStatus', width: 90, examType: [1, 2, 3] },
+		{ title: '操作', key: 'action', align: 'right', width: 120, examType: [1, 2, 3, 4] }
 	])
 
 	const statusTextFormatter = (status) => {
@@ -173,21 +175,17 @@
 		taskLoading.value = true
 		try {
 			let res = []
+			const params = {
+				...queryParam.value,
+				size: queryParam.value.pageSize,
+				courseId: route.query.id,
+				paperType: paperType.value,
+				examType: examType.value
+			}
 			if (examType.value == 4) {
-				const params = {
-					...queryParam.value,
-					size: queryParam.value.pageSize,
-					courseId: route.query.id,
-					paperType: paperType.value
-				}
 				res = await examPaperApi.pageList(params)
 			} else {
-				res = await taskApi.pageExamList({
-					...queryParam.value,
-					size: queryParam.value.pageSize,
-					examType: examType.value,
-					courseId: route.query.id
-				})
+				res = await taskApi.pageExamList(params)
 			}
 
 			taskList.value = res?.records || []
@@ -199,7 +197,7 @@
 	// 学科分类
 	const queryParam = ref({
 		current: 1,
-		pageSize: 10,
+		pageSize: 10
 	})
 	const tabId = ref('')
 	const subjectList = ref([])

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.