mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-10 02:57:12 +08:00
feat: 重构个人消息中心,支持展示个人公告,并优化相关地址
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
:body-style="{ padding: '15px 20px 13px 20px' }"
|
||||
>
|
||||
<template #extra>
|
||||
<a-link @click="router.replace({ path: '/system/notice' })">更多</a-link>
|
||||
<a-link @click="open">更多</a-link>
|
||||
</template>
|
||||
<a-skeleton v-if="loading" :loading="loading" :animation="true">
|
||||
<a-skeleton-line :rows="5" />
|
||||
@@ -31,16 +31,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
|
||||
<NoticeDetailModal ref="NoticeDetailModalRef" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { type DashboardNoticeResp, listDashboardNotice } from '@/apis'
|
||||
import { useDict } from '@/hooks/app'
|
||||
import NoticeDetailModal from '@/views/system/notice/NoticeDetailModal.vue'
|
||||
|
||||
const router = useRouter()
|
||||
const { notice_type } = useDict('notice_type')
|
||||
|
||||
const dataList = ref<DashboardNoticeResp[]>([])
|
||||
@@ -56,10 +52,15 @@ const getDataList = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const NoticeDetailModalRef = ref<InstanceType<typeof NoticeDetailModal>>()
|
||||
const router = useRouter()
|
||||
// 详情
|
||||
const onDetail = (id: string) => {
|
||||
NoticeDetailModalRef.value?.onDetail(id)
|
||||
const onDetail = (id: number) => {
|
||||
router.push({ path: '/user/notice', query: { id } })
|
||||
}
|
||||
|
||||
// 打开消息中心
|
||||
const open = () => {
|
||||
window.open('/user/message?tab=notice')
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user