Browse Source

数据筛选修改,提交loading

canghailong 6 tháng trước cách đây
mục cha
commit
d1865e1801

+ 1 - 4
src/components/Comment/index.vue

@@ -117,10 +117,7 @@
 	}
 	function postnotlike(item, l) {
 		forumApi
-			.postPostnotlikeSubmit(
-				{ likeType: 0, targetId:item.replyId, notLikeId:item.replyId },
-				item.isNotLike
-			)
+			.postPostnotlikeSubmit({ likeType: 0, targetId: item.replyId, notLikeId: item.replyId }, item.isNotLike)
 			.then((data) => {
 				item.isNotLike = l
 				emit('successful')

+ 1 - 1
src/views/courseCenter/components/ResourceList.vue

@@ -3,7 +3,7 @@
 		<div class="list-header">
 			<div style="display: flex">
 				<div style="display: flex; justify-content: center; align-items: center">
-					<a-image :width="24" :src="allResource" />
+					<a-image :width="24" :src="allResource" :preview="false" />
 					<span style="font-weight: bold;font-size: 20px;" class="ml-2">共计 {{ total }} 个资源</span>
 				</div>
 

+ 1 - 1
src/views/forum/addForum.vue

@@ -183,10 +183,10 @@
 
 	// 验证并提交数据
 	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(',')
 				}

+ 1 - 1
src/views/forum/form.vue

@@ -147,10 +147,10 @@
 	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(',')
 				}

+ 1 - 1
src/views/forum/replyForm.vue

@@ -81,10 +81,10 @@
 	const visibleOptions = tool.dictList('MENU_VISIBLE')
 	// 验证并提交数据
 	const onSubmit = () => {
+		submitLoading.value = true
 		formRef.value
 			.validate()
 			.then(() => {
-				submitLoading.value = true
 				let params = {}
 				if (formData.value.formType) {
 					params = {

+ 1 - 1
src/views/forum/reportForm.vue

@@ -114,10 +114,10 @@
 	const visibleOptions = tool.dictList('MENU_VISIBLE')
 	// 验证并提交数据
 	const onSubmit = () => {
+		submitLoading.value = true
 		formRef.value
 			.validate()
 			.then(() => {
-				submitLoading.value = true
 				forumApi
 					.reportinfoAdd({
 						...formData.value,

+ 1 - 1
src/views/resourceCenter/components/Correlation.vue

@@ -2,7 +2,7 @@
 	<div>
 		<div class="recommend-container">
 			<div class="flc">
-				<a-image :width="24" :src="resourceIcon" />
+				<a-image :width="24" :src="resourceIcon" :preview="false" />
 				<div style="margin-bottom: 0; font-size: 20px; font-weight: bold; margin-left: 8px">
 					<span>相关</span>
 					<span style="color: #1890ff">课程</span>

+ 1 - 1
src/views/resourceCenter/components/ResourceList.vue

@@ -3,7 +3,7 @@
 		<div class="list-header">
 			<div style="display: flex">
 				<div style="display: flex; justify-content: center; align-items: center">
-					<a-image :width="24" :src="allResource" />
+					<a-image :width="24" :src="allResource" :preview="false"/>
 					<span style="font-weight: bold;font-size: 20px;" class="ml-2">共计 {{ total }} 个资源</span>
 				</div>
 				<div style="width: 20px"></div>

+ 1 - 1
src/views/resourceCenter/components/SidebarRecommend.vue

@@ -2,7 +2,7 @@
 	<div>
 		<div class="recommend-container">
 			<div class="flc">
-				<a-image :width="24" :src="resourceIcon" />
+				<a-image :width="24" :src="resourceIcon" :preview="false" />
 				<div style="margin-bottom: 0; font-size: 20px; font-weight: bold; margin-left: 8px">
 					<span>资源</span>
 					<span style="color: #1890ff">推荐</span>

+ 23 - 7
src/views/student/classCentre/ask.vue

@@ -37,7 +37,11 @@
 						<a-list-item-meta>
 							<template #title>
 								<div class="fcbc">
-									<div class="askName">{{ item.userIdName }}</div>
+									<div class="flc">
+										<div class="askName">{{ item.userIdName }}</div>
+										<div class="askName mr-1 ml-1" v-if="item.infoType">|</div>
+										<div class="askName">{{ infoTypeName(item.infoType) }}</div>
+									</div>
 									<div @click="videoSpeed(item)" style="cursor: pointer">{{ item.videoStopTime }}</div>
 								</div>
 							</template>
@@ -46,8 +50,7 @@
 							</template>
 						</a-list-item-meta>
 						<div v-html="item.info"></div>
-						<div class="fcbc mt-2" v-if="item.userId == userInfo.id">
-							<div>{{ infoTypeName(item.infoType) }}</div>
+						<div class="frc mt-2" v-if="item.userId == userInfo.id">
 							<div class="flc">
 								<div @click="editNote(item)">
 									<a-tooltip title="编辑" :getPopupContainer="(trigger) => trigger.parentElement">
@@ -85,7 +88,15 @@
 			</a-list-item>
 		</template>
 	</a-list>
-	<a-modal v-model:visible="visible" title="编辑" @ok="handleOk" append-to-body width="800px" :zIndex="99999">
+	<a-modal
+		v-model:visible="visible"
+		title="编辑"
+		@ok="handleOk"
+		:confirmLoading="confirmLoading"
+		append-to-body
+		width="800px"
+		:zIndex="99999"
+	>
 		<a-form ref="formRef" :model="formData" :rules="formRules" layout="vertical">
 			<a-row :gutter="16">
 				<a-col :span="24">
@@ -128,6 +139,7 @@
 	const formDataAdd = ref({})
 	const formRefAdd = ref()
 	const submitLoading = ref(false)
+	const confirmLoading = ref(false)
 	// 默认要校验的
 	const formRules = {
 		info: [required('请输入问题')],
@@ -184,7 +196,7 @@
 					return {
 						...r,
 						loading: false,
-						startTime: parseFloat(r.recordTime)/1000 ?? 0,
+						startTime: parseFloat(r.recordTime) / 1000 ?? 0,
 						videoStopTime: formatTime(r.recordTime ?? 0)
 					}
 				})
@@ -196,7 +208,7 @@
 	}
 
 	const editNote = (e) => {
-		formData.value = e
+		formData.value = Object.assign(formData.value, {id:e.id,info:e.info,infoType:e.infoType})
 		visible.value = true
 	}
 	const delNote = (e) => {
@@ -220,6 +232,7 @@
 	}
 	//修改
 	const handleOk = (e) => {
+		confirmLoading.value = true
 		formRef.value.validate().then(() => {
 			classCentre
 				.askSubmitForm(
@@ -234,16 +247,19 @@
 					formRef.value.resetFields()
 					getList()
 				})
+				.finally(() => {
+					confirmLoading.value = false
+				})
 		})
 	}
 	//视频暂停的时间
 	const videoStopTime = ref(0)
 	//添加
 	const submitForm = (e) => {
+		submitLoading.value = true
 		formRefAdd.value
 			.validate()
 			.then(() => {
-				submitLoading.value = true
 				emit('videoStopTime', (e) => {
 					videoStopTime.value = e * 1000
 					classCentre

+ 17 - 4
src/views/student/classCentre/note.vue

@@ -52,7 +52,15 @@
 			</a-list-item>
 		</template>
 	</a-list>
-	<a-modal v-model:visible="visible" title="编辑" @ok="handleOk" append-to-body width="800px" :zIndex="99999">
+	<a-modal
+		v-model:visible="visible"
+		title="编辑"
+		@ok="handleOk"
+		:confirmLoading="confirmLoading"
+		append-to-body
+		width="800px"
+		:zIndex="99999"
+	>
 		<a-form ref="formRef" :model="formData" :rules="formRules" layout="vertical">
 			<a-row :gutter="16">
 				<a-col :span="24">
@@ -79,6 +87,7 @@
 	const formDataAdd = ref({})
 	const formRefAdd = ref()
 	const submitLoading = ref(false)
+	const confirmLoading = ref(false)
 	// 默认要校验的
 	const formRules = {
 		noteContent: [required('请输入笔记')]
@@ -134,7 +143,7 @@
 					return {
 						...r,
 						loading: false,
-						startTime: parseFloat(r.recordTime)/1000 ?? 0,
+						startTime: parseFloat(r.recordTime) / 1000 ?? 0,
 						videoStopTime: formatTime(r.recordTime ?? 0)
 					}
 				})
@@ -145,7 +154,7 @@
 			})
 	}
 	const editNote = (e) => {
-		formData.value = e
+		formData.value = Object.assign(formData.value, { noteId: e.noteId, noteContent: e.noteContent })
 		visible.value = true
 	}
 	const delNote = (e) => {
@@ -164,6 +173,7 @@
 	}
 	// 修改
 	const handleOk = (e) => {
+		confirmLoading.value = true
 		formRef.value.validate().then(() => {
 			classCentre
 				.notesSubmitForm(
@@ -178,16 +188,19 @@
 					formRef.value.resetFields()
 					getList()
 				})
+				.finally(() => {
+					confirmLoading.value = false
+				})
 		})
 	}
 	//视频暂停的时间
 	const videoStopTime = ref(0)
 	//添加
 	const submitForm = (e) => {
+		submitLoading.value = true
 		formRefAdd.value
 			.validate()
 			.then(() => {
-				submitLoading.value = true
 				emit('videoStopTime', (e) => {
 					videoStopTime.value = e * 1000
 					classCentre