Przeglądaj źródła

飞行学院 教师端更新

husky 5 miesięcy temu
rodzic
commit
e323cf9a4c

+ 2 - 2
.env.development

@@ -5,9 +5,9 @@ NODE_ENV = development
 VITE_TITLE = 飞行学院
 
 # 接口地址
-VITE_API_BASEURL = http://192.168.1.245:9003
+VITE_API_BASEURL = http://192.168.207.179:9003
 # VITE_API_BASEURL = http://192.168.31.81:19003
-VITE_FILEURL = http://192.168.1.245:10005/education/
+VITE_FILEURL = http://192.168.207.179:10005/education/
 # VITE_API_BASEURL = http://192.168.31.14:9003
 # VITE_API_BASEURL = http://192.168.31.6:9003
 

+ 1 - 0
src/api/exam/question/tQuestionApi.js

@@ -4,6 +4,7 @@ const request = (url, ...arg) => baseRequest(`/api/webapp/` + url, ...arg)
 
 export default {
 	pageList: (query) => request('api/admin/question/page', query, 'post'),
+	add: (query) => request('api/admin/question/add', query, 'post'),
 	edit: (query) => request('api/admin/question/edit', query, 'post'),
 	select: (id) => request('api/admin/question/select/' + id, '', 'post'),
 	deleteQuestion: (id) => request('api/admin/question/delete/' + id, '', 'post'),

+ 1 - 0
src/components/UpLoadBreakPoint/index.vue

@@ -858,6 +858,7 @@
 </script>
 
 <style scoped>
+/*大力水手*/
 .mydiv {
 	:deep(.ant-upload-btn) {
 		display: block !important;

+ 4 - 2
src/views/exm/examinationManagement/form.vue

@@ -9,7 +9,7 @@
 			:loading="formLoading"
 			layout="horizontal"
 		>
-			<a-form-item label="任务类型:">
+			<a-form-item label="任务类型:" name="examType" :rules="rules.examType">
 				<a-select v-model:value="form.examType" placeholder="请选择任务类型" @change="examTypeChange" allow-clear>
 					<a-select-option v-for="item in examTypeEnum" :key="item.value" :value="item.value">
 						{{ item.label }}
@@ -17,7 +17,7 @@
 				</a-select>
 			</a-form-item>
 			<a-form-item label="任务标题" name="examName" :rules="rules.examName">
-				<a-input v-model:value="form.examName" placeholder="请输入任务标题" />
+				<a-input v-model:value="form.examName" placeholder="请输入任务标题"  maxlength="50"/>
 			</a-form-item>
 			<a-form-item label="选择试卷" name="paperId" :rules="rules.paperId">
 				<a-input-group compact>
@@ -187,6 +187,7 @@
 	})
 
 	const rules = {
+		examType: [{ required: true, message: '请选择任务类型', trigger: 'blur' }],
 		examName: [{ required: true, message: '请输入考试标题', trigger: 'blur' }],
 		paperId: [{ required: true, message: '请选择试卷', trigger: 'change' }],
 		startTime: [{ required: true, message: '请选择开始时间', trigger: 'change' }],
@@ -418,6 +419,7 @@
 
 	// 初始化
 	onMounted(() => {
+		resetForm()
 		const id = props.id
 		if (id && parseInt(id) !== 0) {
 			formLoading.value = true

+ 1 - 1
src/views/exm/examinationManagement/index.vue

@@ -9,7 +9,7 @@
 				</a-select>
 			</a-form-item>
 			<a-form-item label="任务标题:">
-				<a-input v-model:value="queryParam.examName" placeholder="请输入任务标题" style="min-width: 200px" allowClear />
+				<a-input v-model:value="queryParam.examName" placeholder="请输入任务标题" style="min-width: 200px" allowClear  maxlength="50"/>
 			</a-form-item>
 			<a-form-item label="任务状态:">
 				<a-select style="min-width: 150px" v-model:value="queryParam.examStatus" allowClear placeholder="任务状态">

+ 9 - 0
src/views/exm/question/edit/gap-filling.vue

@@ -339,7 +339,14 @@
 	function submitForm() {
 		formRef.value.validate().then((valid) => {
 			if (valid) {
+				// let score = 0
+				// form.items.forEach((item) => {
+				// 	score+=item.score
+				// })
+				// form.score = score
+
 				formLoading.value = true
+
 				tQuestionApi
 					.edit(form)
 					.then(() => {
@@ -349,6 +356,8 @@
 					.catch(() => {
 						formLoading.value = false
 					})
+
+
 			}
 		})
 	}

+ 1 - 0
src/views/exm/question/index.vue

@@ -210,6 +210,7 @@
 	}
 	const openDrawer = (componentName) => {
 		currentComponentId.value = 0
+		console.log('打开谁',componentName)
 		currentComponent.value = componentMap[componentName]
 		drawerOpen.value = true
 	}

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

@@ -20,7 +20,7 @@
 							max
 							allow-clear
 							show-count
-							:maxlength="100"
+							:maxlength="50"
 						/>
 					</a-form-item>
 				</a-col>
@@ -145,17 +145,18 @@
 
 	// 默认要校验的
 	const formRules = {
-		postTitle: [required('请输入标题')],
+		postTitle: [required('请输入标题'),],
 		typeId: [required('请选择分类')],
-		postContent: [required('请输入内容')]
+		postContent: [required('请输入内容'),{ max: 200, message: '不能超过200个字符' }]
 	}
 
 	const categoryOptions = tool.dictList('MENU_TYPE')
 	const visibleOptions = tool.dictList('MENU_VISIBLE')
 	// 验证并提交数据
 	const onSubmit = () => {
-		submitLoading.value = true
+
 		formRef.value.validate().then(() => {
+			submitLoading.value = true
 			if (formData.value.appointUserArr && formData.value.appointUserArr.length > 1) {
 				formData.value.appointUser = formData.value.appointUserArr.join(',')
 			}

+ 11 - 3
src/views/forum/index.vue

@@ -73,9 +73,15 @@
 						<div class="forum-list-content one-line" v-html="record.postContent"></div>
 					</template>
 					<template v-if="column.dataIndex === 'lastReplyUserAvatar'">
-						<a-tooltip :title="record.lastReplyUserNickName" placement="top">
-							<a-avatar :src="record.lastReplyUserAvatar"></a-avatar>
-						</a-tooltip>
+						<div v-if="record.replyCount==0">
+							<span>无人回复</span>
+						</div>
+						<div v-if="record.replyCount>0">
+							<a-tooltip :title="record.lastReplyUserNickName" placement="top">
+								<a-avatar :src="record.lastReplyUserAvatar"></a-avatar>
+							</a-tooltip>
+						</div>
+
 					</template>
 					<template v-if="column.dataIndex === 'lastReplyTime'">
 						<div>{{ formatDateTime(record.lastReplyTime) }}</div>
@@ -93,6 +99,7 @@
 	import Form from './form.vue'
 	import { parseTime } from '@/utils/exam'
 	import { useRoute, useRouter } from 'vue-router'
+	import EventBus from "@/utils/EventBus";
 	const route = useRoute()
 	const router = useRouter()
 	const formRef = ref()
@@ -335,6 +342,7 @@
 		router.push({
 			path: '/'
 		})
+		EventBus.emit('onSetHeader','')
 	}
 	onMounted(() => {
 		getTypeList()

+ 36 - 7
src/views/myResources/resourceUpload.vue

@@ -201,6 +201,7 @@
 	const majorOptions = ref([]) //专业
 	const courseOptions = ref([]) //课程
 	const userRelateIdss = ref([])
+	const myHot = ref({})
 	// 上传资源模态框
 	const uploadModalVisible = ref(true)
 	// 用户选择模态框
@@ -299,20 +300,46 @@
 	}
 
 	const handleRemoveKeyword = (keywordName, index) => {
-		console.log(keywordName, index)
-		// 1. 从显示列表中删除
-		formState.keywordValue = formState.keywordValue.filter((name) => name !== keywordName)
-		// 2. 更新checkbox的绑定值
-		formState.keyword = HotKeywordsOptions.value
-			.filter((option) => formState.keywordValue.includes(option.label))
-			.map((item) => item.value)
+		console.log(keywordName, index,myHot.value)
+		// // 1. 从显示列表中删除
+		// formState.keywordValue = formState.keywordValue.filter((name) => name !== keywordName)
+		// // console.log('看看点击取消了什么',' formState.keywordValue ',formState.keywordValue)
+		// // formState.keyword
+		// // 2. 更新checkbox的绑定值
+		// formState.keyword = HotKeywordsOptions.value
+			// .filter((option) => formState.keywordValue.includes(option.label))
+			// .map((item) => item.value)
+		// // formState.keyword = formState.keyword.filter((item, i) => i !== index)
+		// // console.log('看看点123123',' formState.keyword ',formState.keyword,' index ',index)
+
+		let myId = myHot.value[keywordName]
+		// console.log('换算出来',formState.keyword,index)
+
+		for (let i = formState.keyword.length-1; i > 0 ; i--) {
+			// console.log('看看',formState.keyword[i] , i , index)
+			if( i == index){
+				formState.keyword.splice(i,1)
+			}
+		}
+		// console.log('换算出来  结果',formState.keyword)
+
+		// formState.keyword.filter((item, i) => item != keywordName)
+		// formState.keyword = [{'专业' : 1}]
+		// formState.keyword.filter((item, i) => item != index)
+		// formState.keyword.filter((option) => formState.keywordValue.includes(option.value))
+		// 	.map((item) => item.label)
+		// console.log('换算出来 剩下',formState.keyword)
+		// console.log('还有吗',formState.keywordValue)
+
 	}
 	const getHotKeywords = () => {
+		myHot.value = {}
 		resourceAuditApi
 			.HotKeywords()
 			.then((res) => {
 				console.log(res.data, '获取热门关键词')
 				HotKeywordsOptions.value = res.data.map((it) => {
+					myHot.value[it.wordName] = it.id
 					return {
 						value: it.id,
 						label: it.wordName
@@ -337,9 +364,11 @@
 	}
 	const handleChangeKeyword = (checkedValues) => {
 		formState.keyword = checkedValues
+		console.log('点击checkbox',checkedValues )
 		formState.keywordValue = HotKeywordsOptions.value
 			.filter((option) => checkedValues.includes(option.value))
 			.map((item) => item.label)
+		console.log('点击checkbox  123 ',formState.keywordValue )
 	}
 	const setPublicStatus = (status) => {
 		formState.authType = status

+ 2 - 0
src/views/notLook/index.vue

@@ -34,6 +34,7 @@
 	import { CloseCircleOutlined } from '@ant-design/icons-vue'
 	import tool from '@/utils/tool'
 	import { useRoute, useRouter } from 'vue-router'
+	import EventBus from "@/utils/EventBus";
 	const router = useRouter()
 	const route = useRoute()
 
@@ -58,6 +59,7 @@
 	const uploadModalVisible = ref(false)
 
 	const goHome = () =>{
+
 		router.replace('/portal')
 	}
 

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

@@ -94,6 +94,7 @@
 	const route = useRoute()
 	const current = ref([route.path.slice(1)]) // 默认选中“资源中心”
 	import tool from '@/utils/tool'
+	import EventBus from "@/utils/EventBus";
 	const emit = defineEmits(['onChangeCurrent'])
 	const userInfo = tool.data.get('USER_INFO')
 	watch(
@@ -133,7 +134,7 @@
 
 
 	const onChangeCurrent = (current) => {
-
+		console.log('收到了呢','原来是啥',current)
 		router.push({
 			path: '/' + current
 		})
@@ -230,7 +231,14 @@
 			}
 		]
 	})
+	const onSetHeader = (data) => {
+		console.log('收到了呢',data,'原来是啥',current.value)
+		current.value = [data]
+	}
 
+	EventBus.off('onSetHeader', onSetHeader)
+	EventBus.on('onSetHeader', onSetHeader)
+	console.log('注册了呢','onSetHeader')
 </script>
 
 <style scoped lang="less">

+ 5 - 4
src/views/portal/components/UserHeader.vue

@@ -15,9 +15,7 @@
 					</div>
 
 				</div>
-				<div>
-					<span style="cursor: pointer;  margin-left: 10px">{{userInfo.name}}</span>
-				</div>
+
 
 			</div>
 
@@ -58,6 +56,9 @@
 
 		</a-dropdown>
 		</a-badge>
+		<div style="display: inline ">
+			<span style="cursor: pointer;  margin-left: 10px">{{userInfo.name}}</span>
+		</div>
 	</div>
 </template>
 
@@ -102,7 +103,7 @@
 
 	const list = ref([
 	]);
-	const x = ref(-40);
+	const x = ref(0);
 	const y = ref(5);
 
 	const xx = ref(15);

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

@@ -244,7 +244,7 @@
 	const courseType = ref('必修')
 	const videoFormat = ref('MP4')
 	const videoDuration = ref('59:34')
-	const videoSize = ref('598M')
+	const videoSize = ref('')
 	const releaseTime = ref('2025-10-01 11:33:59')
 
 	const talkNum = ref(0)
@@ -317,7 +317,7 @@
 					// releaseTime.value = tool.formatTimestamp(itemData.value.uploadTime)
 					releaseTime.value = itemData.value.uploadTime
 
-					videoSize.value = itemData.value.FILESIZE ? itemData.value.FILESIZE + 'b' : ''
+					videoSize.value = bytesToMB(itemData.value.fileSize)
 
 					tags.value = []
 					itemData.value.keywordList.forEach((item) => {
@@ -341,7 +341,16 @@
 			})
 			.catch((err) => {})
 	}
-
+	const bytesToMB = (bytes) => {
+		if (!bytes || isNaN(bytes)) return '0.00 MB'
+		const mb = bytes / (1024 * 1024)
+		return `${mb.toFixed(2)} MB`
+	}
+	const bytesToGB = (bytes) => {
+		if (!bytes || isNaN(bytes)) return '0.00 GB'
+		const gb = bytes / (1024 * 1024 * 1024)
+		return `${gb.toFixed(2)} GB`
+	}
 	const upDataList = (item) => {
 		console.log('upDataList', item)
 		resourcecentreDetail({ id: item.id })

+ 2 - 2
src/views/statisticalAnalysis/analysisLearningBehaviors/index.vue

@@ -73,7 +73,7 @@
 					<div class="stat-label">总观看时长</div>
 					<div class="stat-number">{{ collegeStats.avgStayTime }}</div>
 					<div class="stat-label">平均时长</div>
-					<div class="stat-number">{{ collegeStats.peakWatchUserCount ? peakWatchUserCount.toLocaleString() : '0' }}</div>
+					<div class="stat-number">{{ collegeStats.peakWatchUserCount ? collegeStats.peakWatchUserCount : '0' }}</div>
 					<div class="stat-label">峰值观看人数</div>
 				</div>
 			</div>
@@ -444,7 +444,7 @@
 			})
 			console.log("asdasd",statsResponse.data)
 			// Object.assign(collegeStats, statsResponse.data)
-			collegeStats.value = {...collegeStats,...statsResponse.data}
+			collegeStats.value = {...collegeStats.value,...statsResponse.data}
 			// 获取课程详细统计
 			const detailsResponse = await getCollegeCourseDetails({
 				orgId: collegeFilters.collegeId,

+ 1 - 0
src/views/statisticalAnalysis/analysisTeachingActivities/index.vue

@@ -143,6 +143,7 @@
 	} from '@/api/statisticalAnalysis/analysisTeachingActivities'
 	import tool from '@/utils/tool'
 	const forumType = computed(() => (tool.dictList('FORUM_TYPE')[0].value == 1 ? true : false))
+	console.log('什么呢的',tool.dictList('FORUM_TYPE')[0])
 	// 响应式数据
 	const filters = reactive({
 		courseId: '',

Plik diff jest za duży
+ 0 - 0
stats.html


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików