From 737179a0ce34147269cccf288fecd0e7bb4c309b Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期三, 11 二月 2026 10:42:19 +0800
Subject: [PATCH] 成绩查询+个人中心
---
src/views/main/home/index.vue | 44 +++++++++++++++++++++++++++++++++++---------
1 files changed, 35 insertions(+), 9 deletions(-)
diff --git a/src/views/main/home/index.vue b/src/views/main/home/index.vue
index 355c457..2cae64e 100644
--- a/src/views/main/home/index.vue
+++ b/src/views/main/home/index.vue
@@ -7,16 +7,15 @@
</el-image>
<div class="main-content">
<el-row justify="space-between">
- <el-card
+ <div
v-for="(item,index) in operationList"
:key="`operation${index}`"
- shadow="hover"
- style="max-width: 270px;"
- class="cursor-p my-4"
+ class="cursor-p my-4 p-0"
+ @click="goOperationPage(item)"
>
- <el-image :src="$getImageUrl(`/home/${item.value}.png`)">
+ <el-image style="max-width: 270px;" :src="$getImageUrl(`/home/${item.value}.png`)">
</el-image>
- </el-card>
+ </div>
</el-row>
<el-row justify="space-between" class="py-2" style="border-bottom: 2px solid var(--el-color-primary);">
@@ -24,7 +23,7 @@
<span style="color: var(--el-color-primary);">閫氱煡</span>
<span>鍏憡</span>
</el-text>
- <el-button text type="primary">鏌ョ湅鍏ㄩ儴>></el-button>
+ <el-button text type="primary" @click="goNoticeList()">鏌ョ湅鍏ㄩ儴>></el-button>
</el-row>
<el-card
@@ -42,7 +41,7 @@
</el-row>
</div>
<div>
- <el-button text type="primary">鐐瑰嚮鏌ョ湅璇︽儏>></el-button>
+ <el-button text type="primary" @click="goNoticeDetail(notice.id)">鐐瑰嚮鏌ョ湅璇︽儏>></el-button>
</div>
</el-row>
</el-card>
@@ -55,7 +54,15 @@
</template>
<script>
+import { useLoginStore } from '@/stores/login.js'
+import { useSessionStore } from '@/stores/session.js'
+import { storeToRefs } from 'pinia';
export default {
+ setup() {
+ const { userInfo } = storeToRefs(useSessionStore())
+ const { loginDialogVisible } = storeToRefs(useLoginStore())
+ return { userInfo, loginDialogVisible }
+ },
data() {
return {
operationList: [
@@ -64,7 +71,7 @@
{ name: "鎴愮哗鏌ヨ", value: 'score' },
{ name: "璇佷功鏌ヨ", value: 'certificate' },
],
- noticeList: []
+ noticeList: [],
}
},
created() {
@@ -76,32 +83,51 @@
this.noticeList =
[
{
+ id: '1',
title: "鍏充簬鍏竷2024骞村箍涓滅渷浜ф暀璇勬妧鑳界敓鎬侀摼閾句富鍩硅偛鍗曚綅鍏ラ�夊悕鍗曠殑閫氱煡",
publishTime: '2024-07-12 14:24:33',
area: '骞夸笢鐪�',
},
{
+ id: '2',
title: "鍏充簬鍏竷2024骞村箍涓滅渷浜ф暀璇勬妧鑳界敓鎬侀摼閾句富鍩硅偛鍗曚綅鍏ラ�夊悕鍗曠殑閫氱煡",
publishTime: '2024-07-12 14:24:33',
area: '骞夸笢鐪�',
},
{
+ id: '3',
title: "鍏充簬鍏竷2024骞村箍涓滅渷浜ф暀璇勬妧鑳界敓鎬侀摼閾句富鍩硅偛鍗曚綅鍏ラ�夊悕鍗曠殑閫氱煡",
publishTime: '2024-07-12 14:24:33',
area: '骞夸笢鐪�',
},
{
+ id: '4',
title: "鍏充簬鍏竷2024骞村箍涓滅渷浜ф暀璇勬妧鑳界敓鎬侀摼閾句富鍩硅偛鍗曚綅鍏ラ�夊悕鍗曠殑閫氱煡",
publishTime: '2024-07-12 14:24:33',
area: '骞夸笢鐪�',
},
{
+ id: '5',
title: "鍏充簬鍏竷2024骞村箍涓滅渷浜ф暀璇勬妧鑳界敓鎬侀摼閾句富鍩硅偛鍗曚綅鍏ラ�夊悕鍗曠殑閫氱煡",
publishTime: '2024-07-12 14:24:33',
area: '骞夸笢鐪�',
},
]
}, 400)
+ },
+ goNoticeDetail(id) {
+ this.$router.push(`/main/noticeDetail/${id}`)
+ },
+ goNoticeList() {
+ this.$router.push('/main/noticeList')
+ },
+ goOperationPage(item) {
+ if (item.value != 'appraisalPlan' && !this.userInfo.id) {
+ this.loginDialogVisible = true
+ this.$message.primary('璇峰厛鐧诲綍')
+ return
+ }
+ this.$router.push(`/main/${item.value}`)
}
}
}
--
Gitblit v1.8.0