Pārlūkot izejas kodu

天机只能看的公告

于添 6 mēneši atpakaļ
vecāks
revīzija
cfce40073f

+ 2 - 2
.env.production

@@ -6,9 +6,9 @@ VITE_TITLE = 飞行学院
 
 # 接口地址
 #VITE_API_BASEURL = http://192.168.1.245:19003
-VITE_API_BASEURL = http://192.168.31.14:19004
+VITE_API_BASEURL = http://22.120.128.109:19003
 #VITE_API_BASEURL = http://192.168.31.56:19003
-VITE_FILEURL = http://192.168.31.14:10005/education/
+VITE_FILEURL = http://22.120.128.108:10005/education/
 #VITE_FILEURL = http://192.168.31.56:10005/education/
 # 本地端口
 VITE_PORT = 9000

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

@@ -801,6 +801,7 @@
 
 	onMounted(() => {
 		// getList()
+		pauseFlags.value = {}
 	})
 
 	defineExpose({open})

+ 8 - 0
src/router/whiteList.js

@@ -189,6 +189,14 @@ const constRouters = [
 	{
 		path: '/resourceConversionLog',
 		component: () => import('@/views/resourceConversionLog/index.vue'),
+	},
+	{
+		path: '/myMsg',
+		component: () => import('@/views/myMsg/index.vue'),
+	},
+	{
+		path: '/announcementLookManagement',
+		component: () => import('@/views/announcementLookManagement/index.vue'),
 	}
 	// {
 	// 	path: '/answerManagement',

+ 180 - 0
src/views/announcementLookManagement/components/DialogView.vue

@@ -0,0 +1,180 @@
+<template>
+	<a-modal v-model:visible="visible" :title="title" @ok="handleOk">
+		<a-form
+			:model="formState"
+			:rules="rules"
+			ref="formRef"
+			layout="horizontal"
+			:label-col="{ span: 7 }"
+			:wrapper-col="{ span: 12 }"
+		>
+			<a-form-item label="公告标题" name="title">
+				<a-input v-model:value="formState.title" :disabled="mode == 'look'" placeholder="输入公告标题"/>
+			</a-form-item>
+			<a-form-item label="公告标题" name="platform">
+				<a-radio-group v-model:value="formState.platform" :disabled="mode == 'look'">
+					<a-radio-button value="1">课程</a-radio-button>
+					<a-radio-button value="2">考试</a-radio-button>
+				</a-radio-group>
+			</a-form-item>
+			<a-form-item label="公告内容" name="content" >
+				<a-textarea v-model:value="formState.content" placeholder="输入公告内容" :disabled="mode == 'look'"
+							:auto-size="{ minRows: 5, maxRows: 8 }"/>
+			</a-form-item>
+
+		</a-form>
+	</a-modal>
+</template>
+<script setup>
+import {reactive, ref} from 'vue'
+import resourceAuditApi from '@/api/resourceAudit.js'
+
+const collegeMajorOptions = ref([]) //院系
+const majorIdName = ref([]) //院系回显
+const majorOptions = ref([]) //专业
+const formRef = ref() //专业
+const mode = ref('add') //专业
+const title = ref('添加') //专业
+
+import {addItem, detail, editItem} from '@/api/notice'
+
+const visible = ref(false)
+const emit = defineEmits([ "handleAddItem" ])
+const formState = reactive({
+	noticeId : undefined,
+	title: undefined,
+	content: undefined,
+	platform: undefined,
+})
+const rules = {
+	title: [{required: true, message: '请输入标题', trigger: 'blur'}],
+	content: [{required: true, message: '请输入内容', trigger: 'blur'}],
+	platform: [{required: true, message: '请选择平台', trigger: 'change'}],
+}
+
+watch(
+	() => visible.value,
+	(newVal, oldVal) => {
+		if (newVal == false && formRef.value) {
+			formRef.value.resetFields()
+		}
+	},
+	{deep: true, immediate: true}
+)
+const open = () => {
+
+	visible.value = true
+	mode.value = 'add'
+	title.value = '添加'
+}
+const edit = (item) => {
+	visible.value = true
+	mode.value = 'edit'
+	title.value = '编辑'
+	console.log('编辑内容',item)
+
+
+	detail({noticeId : item.noticeId}).then((res)=>{
+		if(res.code ==200){
+			formState.noticeId = item.noticeId
+			formState.content = res.data.content
+			formState.title = res.data.title
+			formState.platform = res.data.platform +""
+
+		}
+	})
+
+}
+const look = (item) => {
+	visible.value = true
+	mode.value = 'look'
+	title.value = '详情'
+	console.log('编辑内容',item)
+
+
+	detail({noticeId : item.noticeId}).then((res)=>{
+		if(res.code ==200){
+			formState.noticeId = item.noticeId
+			formState.content = res.data.content
+			formState.title = res.data.title
+			formState.platform = res.data.platform+""
+		}
+	})
+
+}
+const handleOk = (e) => {
+	formRef.value.validate().then(() => {
+		let json = JSON.parse(JSON.stringify(formState))
+
+
+		if (mode.value == 'add') {
+			addItem(json).then((res) => {
+					if(res.code == 200){
+						emit("handleAddItem")
+						visible.value = false
+					}
+			})
+		}
+		if (mode.value == 'edit') {
+			editItem(json).then((res) => {
+				if(res.code == 200){
+					emit("handleAddItem")
+					visible.value = false
+				}
+			})
+		}
+	})
+	// console.logckPoint.value = false
+}
+const getOrgTreeSelector = () => {
+	resourceAuditApi
+		.orgList()
+		.then((res) => {
+			console.log(res.data, '获取学院')
+			collegeMajorOptions.value = res.data
+		})
+		.catch((err) => {
+			console.log(err)
+		})
+}
+const changeCollegeMajor = (value, selectedOptions) => {
+	console.log('Selected:', value, selectedOptions)
+	if (!value) {
+		formState.collegeTwoId = ''
+		// majorIdName.value = ''
+		return false
+	}
+	formState.majorId = undefined
+	// majorIdName.value = selectedOptions.map((it) => it.name).join('/')
+	// formState.collegeId = value[0] || null
+	// formState.collegeTwoId = value[1] || null
+	// formState.collegeThreeId = value[2] || null
+	// if (selectedOptions.length) {
+	// 获取选中的最后一级
+	// const lastSelected = selectedOptions[selectedOptions.length - 1]
+	// formState.selectedCollegeMajor = {
+	// 	id: lastSelected.id,
+	// 	name: lastSelected.name,
+	// 	fullPath: selectedOptions.map((opt) => opt.name).join(' / ')
+	// }
+	console.log(formState.collegeTwoId, '最后一级id')
+	getCollegeMajor(formState.collegeTwoId)
+	// }
+}
+const getCollegeMajor = (id) => {
+	resourceAuditApi
+		.zyselect({collegeId: id})
+		.then((res) => {
+			console.log(res.data, '专业下拉数据')
+			majorOptions.value = res.data
+		})
+		.catch((err) => {
+			console.log(err)
+		})
+}
+onMounted(() => {
+	// getOrgTreeSelector()
+})
+
+defineExpose({open,edit,look})
+</script>

+ 262 - 0
src/views/announcementLookManagement/components/ListView.vue

@@ -0,0 +1,262 @@
+<template>
+	<a-table
+		ref="table"
+		:columns="columns"
+		:data-source="dataSources"
+		:row-key="(record) => record.courseId"
+		bordered
+		:expand-row-by-click="true"
+		:pagination="false"
+		size="small"
+	>
+		<template #bodyCell="{ column, text, record }">
+			<template v-if="column.dataIndex === 'content'">
+				<a-popover title="详细内容"
+						   trigger="hover"
+				>
+					<template #content>
+						{{ text }}
+					</template>
+					<template v-if="text.length > 10">
+						<span >{{ text.slice(0, 10) }}...</span>
+					</template>
+				</a-popover>
+				<template v-if="text.length <= 10">
+					<span >{{ text }}</span>
+				</template>
+			</template>
+
+			<template v-if="column.dataIndex === 'action'">
+<!--				<a-button size="small" @click="handleDetail(record)" style="margin-right: 5px">详情</a-button>-->
+				<a-button size="small" @click="handleEdit(record)" style="margin-right: 5px">详情</a-button>
+<!--				<a-popover v-model:visible="popoverVisibles[record.noticeId]" title="确定发布?" trigger="click">-->
+<!--					<template #content>-->
+<!--						<a-button style="margin-right: 10px" type="primary" @click="handlePulish(record)">确定-->
+<!--						</a-button>-->
+<!--						<a-button @click="()=>{	popoverVisibles[record.noticeId] = false}">取消</a-button>-->
+<!--					</template>-->
+<!--					&lt;!&ndash;					<a-button size="small" style="margin-right: 5px">选择</a-button>&ndash;&gt;-->
+<!--					<a-button v-if="record.noticeStatus == 0" size="small" style="margin-right: 5px">发布</a-button>-->
+<!--				</a-popover>-->
+<!--				<a-popover v-model:visible="popoverNotVisibles[record.noticeId]" title="确定取消?" trigger="click">-->
+<!--					<template #content>-->
+<!--						<a-button style="margin-right: 10px" type="primary" @click="handleNotPulish(record)">确定-->
+<!--						</a-button>-->
+<!--						<a-button @click="()=>{	popoverNotVisibles[record.noticeId] = false}">取消</a-button>-->
+<!--					</template>-->
+<!--					&lt;!&ndash;					<a-button size="small" style="margin-right: 5px">选择</a-button>&ndash;&gt;-->
+<!--					<a-button v-if="record.noticeStatus == 1" size="small"  style="margin-right: 5px">取消发布</a-button>-->
+<!--				</a-popover>-->
+
+<!--				<a-popover v-model:visible="popoverDelVisibles[record.noticeId]" title="确定删除?" trigger="click">-->
+<!--					<template #content>-->
+<!--						<a-button style="margin-right: 10px" type="primary" @click="handleDelete(record)">确定-->
+<!--						</a-button>-->
+<!--						<a-button @click="()=>{	popoverDelVisibles[record.noticeId] = false}">取消</a-button>-->
+<!--					</template>-->
+<!--					&lt;!&ndash;					<a-button size="small" style="margin-right: 5px">选择</a-button>&ndash;&gt;-->
+<!--					<a-button size="small" style="margin-right: 5px">删除</a-button>-->
+<!--				</a-popover>-->
+			</template>
+		</template>
+	</a-table>
+	<div style="display: flex; width: 100%; justify-content: flex-end; margin-top: 10px">
+		<a-pagination
+			v-model:current="pagination.current"
+			v-model:pageSize="pagination.size"
+			:total="total"
+			show-less-items
+			@change="handlerChange"
+		/>
+	</div>
+</template>
+
+<script setup>
+import tool from '@/utils/tool'
+import {ref, onMounted} from 'vue'
+import {EyeOutlined, EditOutlined, SnippetsOutlined, DeleteOutlined} from '@ant-design/icons-vue'
+import {list, courceDownList, publish, cancel} from '@/api/notice'
+import {useRouter} from 'vue-router'
+import collegeApi from '@/api/college'
+import {updateCourseStatus} from '@/api/course/courseDetail'
+
+const router = useRouter()
+
+const emit = defineEmits(['handleLook'])
+//发布按钮状态
+const releaseVisible = ref(false)
+const loading = ref(false) // 列表loading
+const dataSources = ref([])
+const popoverVisible = ref({})
+const popoverVisibles = ref({})
+const popoverNotVisibles = ref({})
+const popoverDelVisibles = ref({})
+const formState = ref({
+	name: '',
+	loacl: ''
+}) // 列表loading
+const columns = [
+	{
+		title: '公告标题',
+		dataIndex: 'title',
+		// sorter: true,
+		width: '15%'
+	},
+	{
+		title: '内容',
+		dataIndex: 'content',
+		// sorter: true,
+		width: '15%'
+	},
+	{
+		title: '发布时间',
+		dataIndex: 'createTime',
+		// sorter: true,
+		width: '12%'
+	},
+	{
+		title: '操作',
+		dataIndex: 'action',
+		// sorter: true,
+		width: '10%'
+	}
+]
+// tool.formatTimestamp()
+
+const formatTimestamp = (time) => {
+	return tool.formatTimestamp(time)
+}
+const total = ref(0)
+const pagination = ref({
+	size: 10,
+	current: 1,
+})
+// const onChangeCurrent = (current) => {
+// 	router.push({
+// 		path: '/' + current
+// 	})
+// }
+const handlerChange = (page, pageSize) => {
+	console.log('分页参数', page, pageSize)
+	// pagination.value.size = pageSize
+	// pagination.value.current = page
+
+	getList()
+}
+const handleDetail = (record) => {
+	console.log('查看详情', record)
+	router.push({
+		path: '/portal/courseDetails',
+		query: {
+			id: record.courseId
+		}
+	})
+	// 在这里添加查看详情的逻辑
+}
+
+// 编辑按钮点击事件
+const handleEdit = (record) => {
+	console.log('编辑记录', record)
+	// 在这里添加编辑记录的逻辑
+
+	emit('handleLook', record)
+}
+const handlePulish = (record) => {
+	console.log('编辑记录', record)
+	popoverVisibles.value[record.noticeId] = false
+	publish({noticeId :record.noticeId }).then((res)=>{
+		getList()
+	})
+}
+const handleNotPulish = (record) => {
+	console.log('编辑记录', record)
+	popoverNotVisibles.value[record.noticeId] = false
+	cancel({noticeId :record.noticeId }).then((res)=>{
+		getList()
+	})
+}
+
+// 上架按钮点击事件
+const handleShelf = (record,num) => {
+	console.log('上架记录', record)
+	popoverVisible.value[record.noticeId] = false
+	// 在这里添加上架记录的逻辑
+	// {
+	// 	"courseId": "1948183431150227458",
+	// 	"putawayStatus": 1
+	// }
+	// updateCourseStatus({courseId : record.courseId,putawayStatus : num}).then((res)=>{
+	// 	getList()
+	// })
+
+}
+
+// 删除按钮点击事件
+const handleDelete = (record) => {
+	console.log('删除记录', record)
+	popoverDelVisibles.value[record.noticeId] = false
+	courceDownList({noticeId :record.noticeId }).then((res)=>{
+		getList()
+	})
+	// 在这里添加删除记录的逻辑
+}
+const getList = () => {
+	console.log('获取列表 getList')
+
+	list({...pagination.value}).then((data) => {
+		if (data.code == 200) {
+			console.log('获取列表 新数组', data.data.records)
+			dataSources.value = []
+			dataSources.value = data.data.records
+			console.log('获取列表 最新数组', dataSources.value)
+			pagination.value.current = data.data.current
+			pagination.value.size = data.data.size
+			total.value = data.data.total
+		}
+		// data.records
+	})
+}
+const setList = (search) => {
+	console.log('获取列表 setList',search)
+	// courseName: '',
+	// 	collegeId: '',
+	// 	majorId: '',
+	// 	courseType: '',
+	// 	loacl: []
+	formState.value = search
+	pagination.value.current = 1
+	list({...pagination.value, ...formState.value}).then((data) => {
+		if (data.code == 200) {
+			dataSources.value = data.data.records
+			pagination.value.current = data.data.current
+			pagination.value.size = data.data.size
+			total.value = data.data.total
+		}
+		// data.records
+	})
+}
+
+// 重置按钮点击事件
+onMounted(() => {
+	// getListData()
+	getList()
+})
+
+
+// watch(
+// 	() => dataSources.value,
+// 	(newVal, oldVal) => {
+// 		console.log('数据源变化了 ', ' 新的 ',newVal, '  旧的 ',oldVal)
+// 	},
+// 	{ deep: true, immediate: true }
+// )
+defineExpose({
+	setList,getList
+})
+</script>
+
+<style scoped>
+.desc p {
+	margin-bottom: 1em;
+}
+</style>

+ 166 - 0
src/views/announcementLookManagement/components/QueryView.vue

@@ -0,0 +1,166 @@
+<template>
+	<div style="display: flex; justify-content: space-between; align-items: center">
+		<div>
+			<a-form layout="inline" :model="formState">
+				<a-form-item label="" style="width: 100%">
+					<a-input v-model:value="formState.title" placeholder="请输入标题名称" allowClear />
+				</a-form-item>
+<!--				<a-form-item label="" style="width: 50%">-->
+<!--					<a-range-picker 	v-model:value="formState.time" allowClear />-->
+<!--				</a-form-item>-->
+			</a-form>
+		</div>
+		<div>
+			<a-button type="primary" @click="handleSearch">
+				<template #icon><SearchOutlined /></template>
+				查询
+			</a-button>
+			<a-button style="margin-left: 10px" @click="handleReset">
+				<template #icon><ReloadOutlined /></template>
+				重置
+			</a-button>
+		</div>
+	</div>
+</template>
+
+<script setup>
+	import { ref, onMounted } from 'vue'
+	import { SearchOutlined, ReloadOutlined } from '@ant-design/icons-vue'
+	import { useRouter } from 'vue-router'
+	import collegeApi from '@/api/college'
+	import resourceAuditApi from '@/api/resourceAudit.js'
+	import tool from '@/utils/tool'
+	import Footer from "@/views/portal/components/Footer.vue";
+	const emit = defineEmits([])
+	const router = useRouter()
+	const collegeMajorOptions = ref([]) //院系
+	//发布按钮状态
+	const releaseVisible = ref(false)
+	const loading = ref(false) // 列表loading
+	const COURSE_TYPE = tool.dictTypeList('COURSE_TYPE')
+	const formState = ref({
+		title: undefined,
+		time : [],
+		loacl: []
+	}) // 列表loading
+
+	const options = ref([
+		// {
+		// 	value: 'zhejiang',
+		// 	label: 'Zhejiang',
+		// 	isLeaf: false
+		// },
+		// {
+		// 	value: 'jiangsu',
+		// 	label: 'Jiangsu',
+		// 	isLeaf: false
+		// }
+	])
+
+	// 搜索值
+	const searchValue = ref('')
+
+	const pagination = reactive({
+		pageSize: 10,
+		pageNum: 1,
+		total: 0
+	})
+	// const onChangeCurrent = (current) => {
+	// 	router.push({
+	// 		path: '/' + current
+	// 	})
+	// }
+	const publishedData = ref()
+	//发布确定
+
+	// 上传资源模态框
+	const uploadModalVisible = ref(false)
+	//院系组织查询
+	// const getOrgTreeSelector = () => {
+	// 	resourceAuditApi
+	// 		.orgList()
+	// 		.then((res) => {
+	// 			console.log(res.data, '获取学院')
+	// 			collegeMajorOptions.value = res.data
+	// 		})
+	// 		.catch((err) => {
+	// 			console.log(err)
+	// 		})
+	// }
+	const loadData = (selectedOptions) => {
+		const targetOption = selectedOptions[selectedOptions.length - 1]
+		targetOption.loading = true
+
+		// load options lazily
+		setTimeout(() => {
+			targetOption.loading = false
+			targetOption.children = [
+				{
+					label: `${targetOption.label} Dynamic 1`,
+					value: 'dynamic1'
+				},
+				{
+					label: `${targetOption.label} Dynamic 2`,
+					value: 'dynamic2'
+				}
+			]
+			options.value = [...options.value]
+		}, 1000)
+	}
+	const getList = () => {
+		// collegeApi.treeAll().then((data) => {
+		// 	options.value = data
+		// })
+
+		// resourceAuditApi
+		// 	.orgList()
+		// 	.then((res) => {
+		// 		collegeMajorOptions.value = res.data
+		// 	})
+		// 	.catch((err) => {
+		// 		console.log(err)
+		// 	})
+	}
+	const handleSearch = () => {
+		console.log('执行查询操作', formState.value,COURSE_TYPE)
+		// 在这里添加查询逻辑
+
+		let newJson =  JSON.parse(JSON.stringify(formState.value))
+		console.log('执行查询操作123   ', newJson.loacl.length)
+
+		if(newJson.time.length == 2){
+		 let beginTime =	tool.formatTimesYearMonthDay(newJson.time[0])
+		let endTime=	tool.formatTimesYearMonthDay(newJson.time[1])
+			newJson.beginTime = beginTime
+			newJson.endTime = endTime
+			newJson.time= undefined
+		}
+
+		emit('handlerSearch', newJson)
+	}
+
+	// 重置按钮点击事件
+	const handleReset = () => {
+		formState.value = {
+			courseName: undefined,
+			collegeId: undefined,
+			majorId: undefined,
+			courseType: undefined,
+			time : [],
+			loacl: []
+			// 其他需要重置的字段
+		}
+		emit('handlerSearch', formState.value)
+	}
+	onMounted(() => {
+		// getListData()
+
+		getList()
+	})
+</script>
+
+<style scoped>
+	.desc p {
+		margin-bottom: 1em;
+	}
+</style>

+ 81 - 0
src/views/announcementLookManagement/index.vue

@@ -0,0 +1,81 @@
+<template>
+				<QueryView style="margin-top: 10px" @handlerSearch="handlerSearch"></QueryView>
+				<!-- 新建课程按钮 -->
+<!--				<a-button style="margin-top: 10px" type="primary" @click="handleNewCourse">-->
+<!--					<template #icon>-->
+<!--						<PlusOutlined />-->
+<!--					</template>-->
+<!--					新建-->
+<!--				</a-button>-->
+				<div style="height: 10px"></div>
+				<ListView ref="listViewRef" style="margin-top: 10px" @handleLook="handleLook"></ListView>
+		<DialogView ref="dialogViewRef"  @handleAddItem="handleAddItem"></DialogView>
+</template>
+
+<script setup>
+	import { ref, onMounted } from 'vue'
+	import { PlusOutlined } from '@ant-design/icons-vue'
+	import tool from '@/utils/tool'
+	import Header from '@/views/portal/components/Header.vue'
+	import Footer from '@/views/portal/components/Footer.vue'
+	import QueryView from './components/QueryView.vue'
+	import ListView from './components/ListView.vue'
+	import DialogView from './components/DialogView.vue'
+	import { useRouter } from 'vue-router'
+	const router = useRouter()
+	//发布按钮状态
+	const releaseVisible = ref(false)
+	const loading = ref(false) // 列表loading
+
+	const isState = ref(0) // 列表loading
+	const listViewRef = ref(null)
+	const dialogViewRef = ref(null)
+
+	// 搜索值
+	const searchValue = ref('')
+	const open = ref(false)
+
+	const handleNewCourse = () => {
+		// 在这里添加新建课程的逻辑
+		dialogViewRef.value.open()
+	}
+	const handleAddItem = () => {
+		console.log('要去刷新',listViewRef.value)
+		// 在这里添加新建课程的逻辑
+		listViewRef.value.getList()
+	}
+	const handlerSearch = (data) => {
+		console.log('新建课程')
+		// 在这里添加新建课程的逻辑
+		listViewRef.value.setList(data)
+	}
+	const handleLook = (item) => {
+		dialogViewRef.value.look(item)
+	}
+
+	const pagination = reactive({
+		pageSize: 10,
+		pageNum: 1,
+		total: 0
+	})
+	const onChangeCurrent = (current) => {
+		router.push({
+			path: '/' + current
+		})
+	}
+	const publishedData = ref()
+	//发布确定
+
+	// 上传资源模态框
+	const uploadModalVisible = ref(false)
+
+	onMounted(() => {
+		// getListData()
+	})
+</script>
+
+<style scoped>
+	.desc p {
+		margin-bottom: 1em;
+	}
+</style>

+ 1 - 1
src/views/announcementManagement/components/ListView.vue

@@ -195,7 +195,7 @@ const handleShelf = (record,num) => {
 const handleDelete = (record) => {
 	console.log('删除记录', record)
 	popoverDelVisibles.value[record.noticeId] = false
-	courceDownList({noticeId :record.noticeId }).then((res)=>{
+	courceDownList([{noticeId :record.noticeId }]).then((res)=>{
 		getList()
 	})
 	// 在这里添加删除记录的逻辑

+ 1 - 2
src/views/courseAdd/components/courseInfo.vue

@@ -4,7 +4,6 @@
 		:rules="rules"
 		ref="formRef"
 		layout="horizontal"
-		:label-col="{ span: 2 }"
 		:wrapper-col="{ span: 12 }"
 	>
 		<a-form-item label="教室名称" name="courseName">
@@ -298,7 +297,7 @@
 		// toRaw(quillEditorRef.value).setHTML(props.value)
 		// formState.courseDesc = '<p>默认内容</p>'
 		getOrgTreeSelector()
-		getCourseAllList()
+		// getCourseAllList()
 		getlecturerListSelector()
 		if (props.courseInfoId) {
 			getDetail()

+ 1 - 1
src/views/courseAdd/components/courseProduction/exList.vue

@@ -206,7 +206,7 @@
 	const search = async () => {
 		listLoading.value = true
 		try {
-			const response = await examPaperApi.pageList(queryParam)
+			const response = await examPaperApi.pageList({...queryParam,...{paperType:2}})
 			if (response) {
 				const data = response
 				tableData.value = data.records || []

+ 1 - 1
src/views/courseAdd/components/courseProduction/exLists.vue

@@ -204,7 +204,7 @@
 	const search = async () => {
 		listLoading.value = true
 		try {
-			const response = await examPaperApi.pageList(queryParam)
+			const response = await examPaperApi.pageList({...queryParam,...{paperType:3}})
 			if (response) {
 				const data = response
 				tableData.value = data.records || []

+ 7 - 0
src/views/courseAdd/components/courseProduction/index.vue

@@ -2,6 +2,7 @@
 	<div class="course-chapter">
 		<!-- 添加章节按钮 -->
 		<a-button type="primary" class="add-chapter-btn" @click="showModal">添加章节</a-button>
+		<a-spin :spinning="spinning" >
 
 		<!-- 章节列表 -->
 		<div v-for="(chapter, chapterIndex) in chapters" :key="chapterIndex" class="chapter">
@@ -51,6 +52,8 @@
 				</div>
 			</div>
 		</div>
+
+		</a-spin>
 		<!-- 添加章节模态框 -->
 		<a-modal v-model:visible="modalVisible" :title="dialogTitle" @ok="handleOk" @cancel="handleCancel">
 			<a-form :model="formState" ref="formRef" :rules="rules" :label-col="{ span: 7 }"
@@ -87,6 +90,7 @@ const router = useRouter()
 const route = useRoute()
 const popoverVisible = ref({})
 const formRef = ref(null)
+const spinning = ref(false)
 const modeTag = ref('add')
 const dialogTitle = ref('添加章节')
 const knowledgeOptions = tool.dictList('knowledge')
@@ -237,14 +241,17 @@ const delChapter = (chapterIndex) => {
 }
 // 获取章节列表
 const getList = () => {
+	spinning.value = true
 	courseProductionApi
 		.allList({courseId: props.courseInfoId})
 		.then((res) => {
 			console.log('章节列表', res)
 			chapters.value = res.data
+			spinning.value = false
 		})
 		.catch((err) => {
 			console.log(err)
+			spinning.value = false
 		})
 }
 

+ 1 - 13
src/views/courseAdd/components/courseProduction/resourceUpload.vue

@@ -128,7 +128,7 @@
 		<template v-if="isState == 0">
 			<!-- 资源上传 -->
 			<!-- <UploadModal @success="uploadSuccess"></UploadModal> -->
-			<UpLoadBreakPoint ref="UpLoadBreakPointRef" uploadCount="1" @onSuccess="onSuccess"></UpLoadBreakPoint>
+			<UpLoadBreakPoint ref="UpLoadBreakPointRef" @onSuccess="onSuccess"></UpLoadBreakPoint>
 		</template>
 	</a-modal>
 </template>
@@ -376,17 +376,6 @@ const getOrgTreeSelector = () => {
 		})
 }
 //院系组织查询
-const getCourseAllList = () => {
-	resourceAuditApi
-		.courseAllList()
-		.then((res) => {
-			console.log(res.data, '获取全部课程')
-			courseOptions.value = res.data
-		})
-		.catch((err) => {
-			console.log(err)
-		})
-}
 const changeCollegeMajor = (value, selectedOptions) => {
 	console.log('Selected:', value, selectedOptions)
 	if (!value) {
@@ -616,7 +605,6 @@ const handleChange = ({file, fileList: newFileList}) => {
 }
 onMounted(() => {
 	getOrgTreeSelector()
-	getCourseAllList()
 	getHotKeywords()
 	getResourceTypeTree()
 	if (props.isState == 1) {

+ 12 - 0
src/views/myMsg/index.vue

@@ -0,0 +1,12 @@
+<template>
+	<userMessage></userMessage>
+</template>
+
+<script setup>
+import userMessage from '@/views/sys/user/userTab/userMessage.vue'
+
+</script>
+
+<style scoped>
+
+</style>

+ 7 - 2
src/views/myResources/coverUpload/index.vue

@@ -7,7 +7,7 @@
 				@click="chooseFile"
 				>选择图片</a-button
 			>
-			<span style="margin-left: 10px">仅支持上传jpg/png格式文件,单个文件不能超过500kb</span>
+			<span style="margin-left: 10px">仅支持上传jpg/png格式文件,单个文件不能超过{{props.sizeMax}}kb</span>
 		</div>
 		<a-upload
 			ref="upload"
@@ -25,6 +25,7 @@
 		<div class="preview-area" v-if="previewImageUrl">
 			<a-image
 				:width="200"
+				:height="120"
 				:src="previewImageUrl"
 				:preview="{
 					src: previewImageUrl
@@ -49,6 +50,10 @@
 			required: true,
 			default: null
 		},
+		sizeMax: {
+			type: Number,
+			default: 500
+		},
 		imageUrl: {
 			type: String,
 			required: true,
@@ -97,7 +102,7 @@
 		}
 
 		// 验证文件大小(500KB限制)
-		const isLt500K = file.size / 1024 < 500
+		const isLt500K = file.size / 1024 < props.sizeMax
 		if (!isLt500K) {
 			message.error('文件大小不能超过500KB!')
 			coverFileList.value = []

+ 6 - 6
src/views/myResources/personalResources/index.vue

@@ -68,12 +68,12 @@
 			label: '我的收藏',
 			title: '我的收藏'
 		},
-		{
-			key: 'albums',
-			icon: BookOutlined,
-			label: '我的课程专辑',
-			title: '我的课程专辑'
-		},
+		// {
+		// 	key: 'albums',
+		// 	icon: BookOutlined,
+		// 	label: '我的课程专辑',
+		// 	title: '我的课程专辑'
+		// },
 		// {
 		// 	key: 'questionBank',
 		// 	icon: QuestionCircleOutlined,

+ 0 - 12
src/views/myResources/resourceUpload.vue

@@ -358,17 +358,6 @@
 			})
 	}
 	//院系组织查询
-	const getCourseAllList = () => {
-		resourceAuditApi
-			.courseAllList()
-			.then((res) => {
-				console.log(res.data, '获取全部课程')
-				courseOptions.value = res.data
-			})
-			.catch((err) => {
-				console.log(err)
-			})
-	}
 	const changeCollegeMajor = (value, selectedOptions) => {
 		console.log('Selected:', value, selectedOptions)
 		if (!value) {
@@ -590,7 +579,6 @@
 	}
 	onMounted(() => {
 		getOrgTreeSelector()
-		getCourseAllList()
 		getHotKeywords()
 		getResourceTypeTree()
 		if (props.isState == 1) {

+ 38 - 8
src/views/portal/components/UserHeader.vue

@@ -1,6 +1,9 @@
 <template>
 	<div>
+
+		<a-badge count="5" :offset=[x,y]>
 		<a-dropdown>
+
 			<div v-if="userInfo && userInfo.avatar" class="account-center-avatarHolder" style="margin-top: 5px">
 				<div class="avatar">
 					<a-spin size="small" :spinning="false">
@@ -14,19 +17,43 @@
 			</div>
 			<template #overlay>
 				<a-menu>
-					<a-menu-item @click="onChangeCurrent('usercenter')">
-						个人中心
-					</a-menu-item>
-					<a-menu-item @click="onChangeCurrent('answerManagement')">
-						问答管理
-					</a-menu-item>
+					<div>
+							<a-menu-item @click="onChangeCurrent('usercenter')">
+								个人中心
+							</a-menu-item>
+					</div>
+					<div>
+						<a-badge count="2" :offset=[xx,yy]>
+							<a-menu-item @click="onChangeCurrent('myMsg')">
+								站内信
+							</a-menu-item>
+						</a-badge>
+					</div>
+				<div>
+					<a-badge count="3" :offset=[xx,yy]>
+						<a-menu-item @click="onChangeCurrent('answerManagement')">
+							问答管理
+						</a-menu-item>
+					</a-badge>
+				</div>
+					<div>
+						<a-badge count="3" :offset=[xx,yy]>
+							<a-menu-item @click="onChangeCurrent('announcementLookManagement')">
+								课程公告
+							</a-menu-item>
+						</a-badge>
+					</div>
+				<div>
 					<a-menu-item @click="handleUser('outLogin')">
 						退出账号
 					</a-menu-item>
+				</div>
+
 				</a-menu>
 			</template>
-		</a-dropdown>
 
+		</a-dropdown>
+		</a-badge>
 	</div>
 </template>
 
@@ -63,8 +90,11 @@
 
 	const list = ref([
 	]);
+	const x = ref(0);
+	const y = ref(10);
 
-
+	const xx = ref(0);
+	const yy = ref(15);
 
 	const onChangeCurrent = (current) => {
 

+ 4 - 4
src/views/sys/user/userCenter.vue

@@ -105,10 +105,10 @@
 		// 	key: 'shortcutSetting',
 		// 	tab: '快捷方式'
 		// },
-		{
-			key: 'userMessage',
-			tab: '我的消息'
-		}
+		// {
+		// 	key: 'userMessage',
+		// 	tab: '我的消息'
+		// }
 	]
 	const noTitleKey = ref('accountBasic')
 	const onTabChange = (key) => {

+ 1 - 1
src/views/sys/user/userTab/userMessage.vue

@@ -34,7 +34,7 @@
 </template>
 
 <script setup name="userMessage">
-	import detail from './userMessage/detail.vue'
+	import detail from '@/views/sys/user/userTab/userMessage/detail.vue'
 	import userCenterApi from '@/api/sys/userCenterApi'
 	import tool from '@/utils/tool'
 	import { nextTick } from 'vue'

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
stats.html


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels