소스 검색

修改了 布局细节 人员相关的放在了 头像下来菜单里 别的相关的合并为菜单下拉出现

于添 6 달 전
부모
커밋
41c6f8d799

+ 2 - 2
.env.development

@@ -5,10 +5,10 @@ NODE_ENV = development
 VITE_TITLE = 飞行学院
 
 # 接口地址
-#VITE_API_BASEURL = http://192.168.31.15:9003
+VITE_API_BASEURL = http://192.168.31.14:19004
 #VITE_API_BASEURL = http://192.168.31.80:19003
 #VITE_API_BASEURL = http://192.168.1.235:9003
-VITE_API_BASEURL = http://192.168.1.245:9003
+#VITE_API_BASEURL = http://192.168.1.245:9003
 VITE_FILEURL = http://192.168.1.245:10005/education/
 # VITE_API_BASEURL = http://192.168.31.14:9003
 # VITE_API_BASEURL = http://192.168.31.6:9003

+ 3 - 1
src/utils/newRequest.js

@@ -60,8 +60,10 @@ const error = () => {
 			tool.data.remove('USER_INFO')
 			tool.data.remove('MENU')
 			tool.data.remove('PERMISSIONS')
-			window.location.reload()
+			// window.location.reload()
+			window.location.replace('/tlogin');
 		}
+
 	})
 }
 

+ 3 - 2
src/utils/reSourceRequest.js

@@ -1,4 +1,4 @@
- 
+
 // 统一的请求发送
 import axios from 'axios'
 import qs from 'qs'
@@ -61,7 +61,8 @@ const error = () => {
 			tool.data.remove('USER_INFO')
 			tool.data.remove('MENU')
 			tool.data.remove('PERMISSIONS')
-			window.location.reload()
+			// window.location.reload()
+			window.location.replace('/tlogin');
 		}
 	})
 }

+ 3 - 2
src/utils/request.js

@@ -1,4 +1,4 @@
- 
+
 // 统一的请求发送
 import axios from 'axios'
 import qs from 'qs'
@@ -61,7 +61,8 @@ const error = () => {
 			tool.data.remove('USER_INFO')
 			tool.data.remove('MENU')
 			tool.data.remove('PERMISSIONS')
-			window.location.reload()
+			// window.location.reload()
+			window.location.replace('/tlogin');
 		}
 	})
 }

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

@@ -207,7 +207,7 @@ const handleOk = () => {
 		if (exlists &&exlists.length == 1) {
 			if(exlists[0].id){
 				data.courseRelates.push({funcType: 5, relateId: exlists[0].id})
-			}else if(exlist[0].relateId){
+			}else if(exlists[0].relateId){
 				data.courseRelates.push({funcType: 5, relateId: exlists[0].relateId})
 			}
 		}

+ 4 - 4
src/views/courseDetails/index.vue

@@ -46,10 +46,10 @@
 		<!-- tab 导航 -->
 		<a-tabs v-model:activeKey="activeTab" class="course-tabs">
 			<a-tab-pane key="detail" tab="课程详情" />
-			<a-tab-pane key="homework" tab="批改作业" />
-			<a-tab-pane key="test" tab="批改测试" />
-			<a-tab-pane key="student" tab="学员详情" />
-			<a-tab-pane key="stat" tab="学习统计" />
+<!--			<a-tab-pane key="homework" tab="批改作业" />-->
+<!--			<a-tab-pane key="test" tab="批改测试" />-->
+<!--			<a-tab-pane key="student" tab="学员详情" />-->
+<!--			<a-tab-pane key="stat" tab="学习统计" />-->
 		</a-tabs>
 
 		<LessonDetails

+ 1 - 1
src/views/myResources/resourceUpload.vue

@@ -423,7 +423,7 @@
 			await formRef.value.validate()
 			console.log('formState.userfileIds是:提交了', formState.userfileIds)
 			if (!formState.userfileIds) {
-				Modal.error({ content: '请先上传文件!' })
+				Modal.error({ content: '请先上传文件!!' })
 				return
 			}
 			if (props.isState == 1) {

+ 122 - 18
src/views/portal/components/Header.vue

@@ -3,29 +3,51 @@
 		<!-- //根据平台不同传不同参0后台(管理员)1老师2学生   eduIdentity
 		{{userInfo.eduIdentity}}
 		管理员 -->
-		<div style="display: flex; width: 100vw; justify-content: space-between; align-items: center">
-			<div style="display: flex; padding-left: 10%">
-				<a-menu v-model:selectedKeys="current" mode="horizontal" theme="light" style="line-height: 55px">
+		<div style="display: flex; width: 100vw; justify-content: space-between; align-items: center; position: relative">
+			<div style="display: flex; padding-left: 10%; ">
+				<a-menu v-model:selectedKeys="current"  mode="horizontal" theme="light"  >
 					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="">资源中心</a-menu-item>
 					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="portal/personalResources">个人资源</a-menu-item>
-					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="portal/courseManagement">课程管理</a-menu-item>
-					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="answerManagement">问答管理</a-menu-item>
-					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="classManagement">班级管理</a-menu-item>
+					<a-sub-menu  key="">
+						<template #title>
+							<!-- 使用 Ant Design Vue 的图标 -->
+							<span>课程相关</span>
+						</template>
+						<a-menu-item style="margin-left: 1px; margin-right: 1px" key="portal/courseManagement">课程管理</a-menu-item>
+						<a-menu-item style="margin-left: 1px; margin-right: 1px" key="announcementManagement">课程公告发布</a-menu-item>
+						<a-menu-item style="margin-left: 1px; margin-right: 1px" key="courseOpen">课程开课</a-menu-item>
+					</a-sub-menu>
+
+
 
-					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="examinationManagement">考试管理</a-menu-item>
-					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="questionnaireManagement">问卷管理</a-menu-item>
-					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="exampaper">试题管理</a-menu-item>
-					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="student/record/">考试记录</a-menu-item>
-					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="question">题目列表</a-menu-item>
+					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="classManagement">班级管理</a-menu-item>
+<!--					<a-menu-item style="margin-left: 1px; margin-right: 1px"></a-menu-item>-->
+					<a-sub-menu  key="">
+						<template #title>
+							<!-- 使用 Ant Design Vue 的图标 -->
+							<span>考试相关</span>
+						</template>
+						<a-menu-item style="margin-left: 1px; margin-right: 1px" key="examinationManagement">考试管理</a-menu-item>
+						<a-menu-item style="margin-left: 1px; margin-right: 1px" key="questionnaireManagement">问卷管理</a-menu-item>
+						<a-menu-item style="margin-left: 1px; margin-right: 1px" key="exampaper">试卷管理</a-menu-item>
+						<a-menu-item style="margin-left: 1px; margin-right: 1px" key="student/record/">考试批改</a-menu-item>
+						<a-menu-item style="margin-left: 1px; margin-right: 1px" key="question">题目列表</a-menu-item>
+					</a-sub-menu>
 					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="statistics">统计分析</a-menu-item>
-					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="usercenter">个人中心</a-menu-item>
 					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="forum">论坛</a-menu-item>
-<!--					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="portal/courseManagement">站内信</a-menu-item>-->
-					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="announcementManagement">课程公告发布</a-menu-item>
+
 					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="resourceConversionLog">资源转换</a-menu-item>
-					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="courseOpen">课程开课</a-menu-item>
+<!--					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="portal/courseManagement">站内信</a-menu-item>-->
+
+
+
 				</a-menu>
+
 			</div>
+			<div style="width: 50px;  height: 46px; margin-right: 19%;  " >
+				<UserHeader></UserHeader>
+			</div>
+
 
 <!--			<div class="header-right">-->
 <!--				<div style="display: flex">-->
@@ -38,15 +60,17 @@
 <!--					<span style="font-size: 12px; color: #00000083">注册</span>-->
 <!--				</div>-->
 <!--			</div>-->
+			<div class="line" style=""></div>
 		</div>
-		<div class="line" style=""></div>
+
 	</div>
 </template>
 
 <script setup>
 	import { createVNode } from 'vue'
-	import { ExclamationCircleOutlined } from '@ant-design/icons-vue'
+	import {ExclamationCircleOutlined, FolderOutlined} from '@ant-design/icons-vue'
 	import { Modal } from 'ant-design-vue'
+	import UserHeader from '@/views/portal/components/UserHeader.vue'
 	import loginApi from '@/api/auth/loginApi'
 	import { message } from 'ant-design-vue'
 	import { ref } from 'vue'
@@ -67,6 +91,32 @@
 		}
 	)
 
+	const list = ref([
+	]);
+
+
+
+// 	<a-menu-item style="margin-left: 1px; margin-right: 1px" key="">资源中心</a-menu-item>
+// 	<a-menu-item style="margin-left: 1px; margin-right: 1px" key="portal/personalResources">个人资源</a-menu-item>
+// 	<a-menu-item style="margin-left: 1px; margin-right: 1px" key="portal/courseManagement">课程管理</a-menu-item>
+// 	<a-menu-item style="margin-left: 1px; margin-right: 1px" key="answerManagement">问答管理</a-menu-item>
+// 	<a-menu-item style="margin-left: 1px; margin-right: 1px" key="classManagement">班级管理</a-menu-item>
+//
+// 	<a-menu-item style="margin-left: 1px; margin-right: 1px" key="examinationManagement">考试管理</a-menu-item>
+// 	<a-menu-item style="margin-left: 1px; margin-right: 1px" key="questionnaireManagement">问卷管理</a-menu-item>
+// 	<a-menu-item style="margin-left: 1px; margin-right: 1px" key="exampaper">试卷管理</a-menu-item>
+// 	<a-menu-item style="margin-left: 1px; margin-right: 1px" key="student/record/">考试批改</a-menu-item>
+// 	<a-menu-item style="margin-left: 1px; margin-right: 1px" key="question">题目列表</a-menu-item>
+// 	<a-menu-item style="margin-left: 1px; margin-right: 1px" key="statistics">统计分析</a-menu-item>
+// 	<a-menu-item style="margin-left: 1px; margin-right: 1px" key="usercenter">个人中心</a-menu-item>
+// 	<a-menu-item style="margin-left: 1px; margin-right: 1px" key="forum">论坛</a-menu-item>
+// <!--					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="portal/courseManagement">站内信</a-menu-item>-->
+// 	<a-menu-item style="margin-left: 1px; margin-right: 1px" key="announcementManagement">课程公告发布</a-menu-item>
+// 	<a-menu-item style="margin-left: 1px; margin-right: 1px" key="resourceConversionLog">资源转换</a-menu-item>
+// 	<a-menu-item style="margin-left: 10px; margin-right: 10px" key="courseOpen">课程开课</a-menu-item>
+
+
+
 	const onChangeCurrent = (current) => {
 
 		router.push({
@@ -113,6 +163,58 @@
 			})
 		}
 	}
+	onMounted(() => {
+		list.value =[
+			{
+				key: '1',
+				title: '项目信息管理1',
+				path: '/infomationManage',
+				icon:'iconfont icon-information'
+			},
+			{
+				key: '2',
+				title: '安全信息管理2',
+				path: '/safeInfoManage',
+				icon:'iconfont icon-anquan',
+				children: [
+					{
+						key: '2.1',
+						title: '安全风险管理2.1',
+						path: '/safeRisk',
+						icon:'',
+						children: [
+							{
+								key: '2.1.1',
+								title: '风险分类管理2.1.1',
+								path: '/riskClassifyManage',
+								icon:'',
+							},
+							{
+								key: '2.1.2',
+								title: '分类辨识2.1.2',
+								path: '/classifyIdentity',
+								icon:'',
+							}
+						],
+					},
+				],
+			},
+			{
+				key: '3',
+				title: '质量信息管理3',
+				path: '/qualityInfoManage',
+				icon:'iconfont icon-zhiliang',
+				children:[
+					{
+						key: '3.1',
+						title: '质量控制点管理3.1',
+						path: '/controlPointManage',
+						icon:'',
+					}
+				]
+			}
+		]
+	})
 
 </script>
 
@@ -146,7 +248,9 @@
 
 	.line {
 		width: 100%;
-		height: 0.25px;
+		height: 2px;
+		position: absolute;
+		bottom: 0px;
 		background-color: #00000013;
 	}
 </style>

+ 223 - 0
src/views/portal/components/UserHeader.vue

@@ -0,0 +1,223 @@
+<template>
+	<div>
+		<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">
+						<img :src="userInfo.avatar" />
+					</a-spin>
+					<!--						<a @click="uploadLogo">-->
+					<!--							<div :class="userInfo.avatar ? 'mask' : 'mask-notImg'"><upload-outlined /></div>-->
+					<!--						</a>-->
+				</div>
+
+			</div>
+			<template #overlay>
+				<a-menu>
+					<a-menu-item @click="onChangeCurrent('usercenter')">
+						个人中心
+					</a-menu-item>
+					<a-menu-item @click="onChangeCurrent('answerManagement')">
+						问答管理
+					</a-menu-item>
+					<a-menu-item @click="handleUser('outLogin')">
+						退出账号
+					</a-menu-item>
+				</a-menu>
+			</template>
+		</a-dropdown>
+
+	</div>
+</template>
+
+<script setup>
+	import { createVNode } from 'vue'
+	import {ExclamationCircleOutlined, FolderOutlined} from '@ant-design/icons-vue'
+	import { Modal } from 'ant-design-vue'
+	import loginApi from '@/api/auth/loginApi'
+	import { message } from 'ant-design-vue'
+	import { ref } from 'vue'
+	import { useRouter, useRoute } from 'vue-router'
+	const router = useRouter()
+	const route = useRoute()
+	const current = ref([route.path.slice(1)]) // 默认选中“资源中心”
+	import tool from '@/utils/tool'
+	const emit = defineEmits(['onChangeCurrent'])
+	import { globalStore } from '@/store'
+
+	const global_store = globalStore()
+
+	const userInfo = computed(() => {
+		return global_store.userInfo
+	})
+
+	// watch(
+	// 	() => current.value,
+	// 	(newVal, oldVal) => {
+	// 		if (newVal != oldVal) {
+	// 			// emit('onChangeCurrent', newVal)
+	// 			onChangeCurrent(newVal)
+	// 		}
+	// 	}
+	// )
+
+	const list = ref([
+	]);
+
+
+
+	const onChangeCurrent = (current) => {
+
+		router.push({
+			path: '/' + current
+		})
+	}
+	const slogin = () =>{
+		router.push({
+			path: '/slogin'
+		})
+	}
+	const handleUser = (key) => {
+		if (key === 'outLogin') {
+			Modal.confirm({
+				title: '提示',
+				content: '确认退出当前用户?',
+				icon: createVNode(ExclamationCircleOutlined),
+				maskClosable: false,
+				onOk() {
+					// 取得缓存中的token
+					const token = tool.data.get('TOKEN')
+					const param = {
+						token: token
+					}
+					message.loading('退出中...', 1)
+					loginApi
+						.logout(param)
+						.then(() => {
+							// 清理掉个人的一些信息
+							tool.data.remove('TOKEN')
+							tool.data.remove('USER_INFO')
+							tool.data.remove('MENU')
+							tool.data.remove('PERMISSIONS')
+							tool.cookie.remove('Token')
+							router.replace({ path: '/tlogin' })
+						})
+						.catch(() => {
+							tool.data.clear()
+							router.replace({ path: '/tlogin' })
+							location.reload()
+						})
+				},
+				onCancel() {}
+			})
+		}
+	}
+	onMounted(() => {
+		list.value =[
+			{
+				key: '1',
+				title: '项目信息管理1',
+				path: '/infomationManage',
+				icon:'iconfont icon-information'
+			},
+			{
+				key: '2',
+				title: '安全信息管理2',
+				path: '/safeInfoManage',
+				icon:'iconfont icon-anquan',
+				children: [
+					{
+						key: '2.1',
+						title: '安全风险管理2.1',
+						path: '/safeRisk',
+						icon:'',
+						children: [
+							{
+								key: '2.1.1',
+								title: '风险分类管理2.1.1',
+								path: '/riskClassifyManage',
+								icon:'',
+							},
+							{
+								key: '2.1.2',
+								title: '分类辨识2.1.2',
+								path: '/classifyIdentity',
+								icon:'',
+							}
+						],
+					},
+				],
+			},
+			{
+				key: '3',
+				title: '质量信息管理3',
+				path: '/qualityInfoManage',
+				icon:'iconfont icon-zhiliang',
+				children:[
+					{
+						key: '3.1',
+						title: '质量控制点管理3.1',
+						path: '/controlPointManage',
+						icon:'',
+					}
+				]
+			}
+		]
+	})
+
+</script>
+
+<style scoped lang="less">
+	.header {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 0 50px;
+	}
+	.headerBtn {
+		display: flex;
+		padding-left: 10%;
+		flex:1;
+		:deep(.ant-menu-horizontal) {
+			line-height: 55px;
+		}
+	}
+	.header-right {
+		display: flex;
+		align-items: center;
+		margin-right: 20%;
+	}
+	.fcbc {
+		display: flex;
+		width: 100%;
+		justify-content: space-between;
+		align-items: center;
+		background-color: #fff;
+	}
+
+	.line {
+		width: 100%;
+		height: 2px;
+		position: absolute;
+		bottom: 0px;
+		background-color: #00000013;
+	}
+	.account-center-avatarHolder {
+		text-align: center;
+		margin-bottom: 14px;
+
+		& > .avatar {
+			margin: 0 auto;
+			width: 35px;
+			height: 35px;
+			margin-bottom: 1px;
+			border-radius: 50%;
+			overflow: hidden;
+
+			img {
+				height: 100%;
+				width: 100%;
+			}
+		}
+	}
+</style>

+ 2 - 0
src/views/resourceCenter/components/Header.vue

@@ -57,6 +57,8 @@
 	.line {
 		width: 100%;
 		height: 0.25px;
+		position: absolute;
+		bottom: 0px;
 		background-color: #00000013;
 	}
 </style>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
stats.html


+ 1 - 1
vite.config.js

@@ -41,7 +41,7 @@ export default defineConfig(({command, mode}) => {
 			port: envConfig.VITE_PORT,
 			proxy: {
 				'/api': {
-					target: 'http://192.168.1.245:9003',
+					target: 'http://192.168.31.14:19004',
 					// target: 'http://192.168.1.235:9003',
 					// target: 'http://192.168.31.15:9003',
 					// target: 'http://192.168.31.15:9003',

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