浏览代码

整体样式扩宽

canghailong 6 月之前
父节点
当前提交
20b8ace426

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

@@ -61,7 +61,6 @@
 							<div>学习进度</div>
 							<a-progress :percent="item.progressVal" />
 						</div>
-						<span style="font-size: 12px">{{ item.majorIdName || '-' }}</span>
 						<span style="font-size: 12px">{{ item.teacherIdName || '-' }}</span>
 					</div>
 				</div>

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

@@ -1,6 +1,6 @@
 <template>
-	<div style="display: flex; justify-content: center">
-		<a-card :bordered="false" style="width: 1200px">
+	<div style="display: flex; justify-content: center" class="main-content-wrapper">
+		<a-card :bordered="false" style="width: 1400px">
 			<a-form ref="formRef" :model="formData" :rules="formRules" layout="vertical">
 				<a-row :gutter="16">
 					<a-col :span="8">

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

@@ -1,6 +1,6 @@
 <template>
 	<div style="display: flex; justify-content: center" class="main-content-wrapper">
-		<div style="width: 1200px">
+		<div style="width: 1400px;">
 			<a-card>
 				<div class="flt">
 					<div class="flex-1">

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

@@ -1,7 +1,7 @@
 <template>
 	<div class="forumTop"></div>
 	<div style="display: flex; justify-content: center" class="main-content-wrapper">
-		<a-card :bordered="false" style="width: 1200px" class="formMount">
+		<a-card :bordered="false" style="width: 1400px" class="formMount">
 			<a-space>
 				<div style="display: flex">
 					<a-tooltip :getPopupContainer="(trigger) => trigger.parentElement">
@@ -61,7 +61,7 @@
 				:row-key="(record) => record.id"
 				:custom-row="customRow"
 				:pagination="false"
-				style="width: 1200px;"
+				style="width: 100%;"
 			>
 				<template #bodyCell="{ column, record }">
 					<template v-if="column.dataIndex === 'postTitle'">
@@ -361,7 +361,7 @@
 	}
 
 	.one-line {
-		max-width: 700px;
+		max-width: 900px;
 		display: -webkit-box;
 		-webkit-box-orient: vertical;
 		-webkit-line-clamp: 1;

+ 51 - 51
src/views/portal/components/Header.vue

@@ -2,52 +2,53 @@
 	<!-- //根据平台不同传不同参 0后台(管理员)1老师 2学生   eduIdentity
 	{{userInfo.eduIdentity}}
 	管理员 -->
-	<div v-if="userInfo.eduIdentity == 2" class="fcbc">
-		<div class="headerBtn">
-			<a-menu v-model:selectedKeys="current" mode="horizontal" @select="menuSelect">
-				<a-menu-item key="student/resourceCenter">资源中心</a-menu-item>
-				<a-menu-item key="student/courseCenter">课程中心</a-menu-item>
-				<a-sub-menu key="myList">
-					<template #title>我的</template>
-					<a-menu-item key="student/paper/1">我的任务</a-menu-item>
-					<a-menu-item key="student/paper/2">章节测验</a-menu-item>
-					<a-menu-item key="student/paper/3">调查问卷</a-menu-item>
-					<a-menu-item key="student/paper/4">我的作业</a-menu-item>
-					<a-menu-item key="student/classCollect">课程收藏</a-menu-item>
-				</a-sub-menu>
-			</a-menu>
-		</div>
-		<div class="header-right">
-			<a-dropdown v-if="userInfo">
-				<div class="cur flc">
-					<a-avatar :src="userInfo.avatar">
-						<template #icon><UserOutlined /></template>
-					</a-avatar>
-					<div class="ml-2">{{ userInfo.name }}</div>
+	<div class="fcc headerBox">
+		<div class="fcbc" style="width: 1400px">
+			<div class="headerBtn">
+				<a-menu v-model:selectedKeys="current" mode="horizontal" @select="menuSelect">
+					<a-menu-item key="student/resourceCenter">资源中心</a-menu-item>
+					<a-menu-item key="student/courseCenter">课程中心</a-menu-item>
+					<a-sub-menu key="myList">
+						<template #title>我的</template>
+						<a-menu-item key="student/paper/1">我的任务</a-menu-item>
+						<a-menu-item key="student/paper/2">章节测验</a-menu-item>
+						<a-menu-item key="student/paper/3">调查问卷</a-menu-item>
+						<a-menu-item key="student/paper/4">我的作业</a-menu-item>
+						<a-menu-item key="student/classCollect">课程收藏</a-menu-item>
+					</a-sub-menu>
+				</a-menu>
+			</div>
+			<div class="header-right">
+				<a-dropdown v-if="userInfo">
+					<div class="cur flc">
+						<a-avatar :src="userInfo.avatar">
+							<template #icon><UserOutlined /></template>
+						</a-avatar>
+						<div class="ml-2">{{ userInfo.name }}</div>
+					</div>
+					<template #overlay>
+						<a-menu>
+							<a-menu-item key="1" @click="jump('/userInfo')">个人中心</a-menu-item>
+							<a-menu-item key="2">
+								<router-link :to="{ path: '/forum' }" target="_blank">论坛</router-link>
+							</a-menu-item>
+							<a-menu-item key="3" @click="jump('/inSsiteMessage')">站内信</a-menu-item>
+							<a-menu-item key="4" @click="jump('/classNotice')">课程公告</a-menu-item>
+							<a-menu-item key="5" @click="jump('/learningFootprint')">学习足迹</a-menu-item>
+							<a-menu-item key="7" @click="jump('/passwordRetrieve')">密码找回</a-menu-item>
+							<a-menu-item key="7" @click="jump('/activate')">激活</a-menu-item>
+							<a-menu-item key="8" @click="outLogin()">退出登录</a-menu-item>
+						</a-menu>
+					</template>
+				</a-dropdown>
+				<div class="flc" v-if="!userInfo">
+					<UserOutlined :style="{ fontSize: '16px', color: '#00000083' }" />
+					<div class="ml-2 cur" @click="jump('/slogin')">登录</div>
 				</div>
-				<template #overlay>
-					<a-menu>
-						<a-menu-item key="1" @click="jump('/userInfo')">个人中心</a-menu-item>
-						<a-menu-item key="2">
-							<router-link :to="{ path: '/forum' }" target="_blank">论坛</router-link>
-						</a-menu-item>
-						<a-menu-item key="3" @click="jump('/inSsiteMessage')">站内信</a-menu-item>
-						<a-menu-item key="4" @click="jump('/classNotice')">课程公告</a-menu-item>
-						<a-menu-item key="5" @click="jump('/learningFootprint')">学习足迹</a-menu-item>
-						<a-menu-item key="7" @click="jump('/passwordRetrieve')">密码找回</a-menu-item>
-						<a-menu-item key="7" @click="jump('/activate')">激活</a-menu-item>
-						<a-menu-item key="8" @click="outLogin()">退出登录</a-menu-item>
-					</a-menu>
-				</template>
-			</a-dropdown>
-			<div class="flc" v-if="!userInfo">
-				<UserOutlined :style="{ fontSize: '16px', color: '#00000083' }" />
-				<div class="ml-2 cur" @click="jump('/slogin')">登录</div>
+				<headerIcon></headerIcon>
 			</div>
-			<headerIcon></headerIcon>
 		</div>
 	</div>
-	<div class="line"></div>
 </template>
 
 <script setup>
@@ -123,6 +124,9 @@
 </script>
 
 <style scoped lang="less">
+	.headerBox {
+		background-color: #fff;
+	}
 	.header {
 		display: flex;
 		align-items: center;
@@ -131,7 +135,6 @@
 	}
 	.headerBtn {
 		display: flex;
-		padding-left: 10%;
 		flex: 1;
 		:deep(.ant-menu-horizontal) {
 			line-height: 55px;
@@ -140,25 +143,22 @@
 	.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;
 	}
 	.flc {
 		display: flex;
 		align-items: center;
 	}
+	.fcc {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
 	.cur {
 		cursor: pointer;
 	}
-	.line {
-		width: 100%;
-		height: 0.25px;
-		background-color: #00000013;
-	}
 </style>

+ 2 - 2
src/views/portal/components/headerIcon.vue

@@ -1,8 +1,8 @@
 <template>
-	<a-badge :count="bellNum" class="ml-3 cur" @click="jump('/inSsiteMessage')">
+	<a-badge :count="bellNum" class="ml-6 cur" @click="jump('/inSsiteMessage')">
 		<bell-outlined style="font-size: 20px" />
 	</a-badge>
-	<a-badge :count="notiNum" class="ml-3 cur" @click="jump('/classNotice')">
+	<a-badge :count="notiNum" class="ml-6 cur" @click="jump('/classNotice')">
 		<notification-outlined style="font-size: 20px" />
 	</a-badge>
 </template>

+ 1 - 1
src/views/portal/index.vue

@@ -4,7 +4,7 @@
 			<Header />
 			<a-layout-content class="main-content-wrapper">
 				<div class="flc">
-					<router-view v-slot="{ Component }" :key="route.fullPath" style="width: 1200px;min-height: 90vh;"></router-view>
+					<router-view v-slot="{ Component }" :key="route.fullPath" style="width: 1400px;min-height: 90vh;"></router-view>
 				</div>
 			</a-layout-content>
 		</a-layout>

+ 17 - 3
src/views/student/classCollect/index.vue

@@ -41,13 +41,16 @@
 					</div>
 					<div style="display: flex; flex-direction: column; padding: 5px 10px">
 						<span style="font-size: 16px; font-weight: bold">{{ item.courseName || '-' }}</span>
-						<span style="font-size: 12px">{{ item.majorIdName || '-' }}</span>
+						<div>
+							<div>学习进度</div>
+							<a-progress :percent="item.progressVal" />
+						</div>
 						<span style="font-size: 12px">{{ item.teacherIdName || '-' }}</span>
 					</div>
 				</div>
 			</a-col>
 		</a-row>
-		<div style="display: flex; width: 100%; align-items: center; justify-content: center;" class="mt-4">
+		<div style="display: flex; width: 100%; align-items: center; justify-content: center" class="mt-4">
 			<a-pagination
 				v-model:current="pagination.current"
 				v-model:pageSize="pagination.size"
@@ -59,6 +62,7 @@
 </template>
 <script setup name="classCollect">
 	import classCentre from '@/api/student/classCentre'
+	import { getFinishRate } from '@/api/studentCourseCenter'
 	import { useRoute, useRouter } from 'vue-router'
 	import sysConfig from '@/config/index'
 	const router = useRouter()
@@ -74,7 +78,17 @@
 				current: pagination.value.current,
 				size: pagination.value.pageSize
 			})
-			.then((data) => {
+			.then(async (data) => {
+				for (let index = 0; index < data.records.length; index++) {
+					let progressRes = 0
+					try {
+						progressRes = await getFinishRate({ courseId: data.records[index].courseId })
+					} catch (error) {
+						progressRes = 0
+					}
+					data.records[index].progressVal = progressRes?.data.finishRate * 100 ?? 0
+				}
+
 				listData.value = data.records
 				pagination.value.total = data.total
 			})

+ 1 - 1
src/views/student/style.less

@@ -99,7 +99,7 @@
 	position: relative;
 }
 .app-item-contain {
-	max-width: 1200px;
+	max-width: 100%;
 	margin: 0 auto;
 	background-color: #fff;
 	border-radius: 8px;