pull/480/head
liting 2024-06-16 10:44:48 +08:00
parent 914c39db5e
commit 6e15b825f3
1 changed files with 37 additions and 24 deletions

View File

@ -15,7 +15,7 @@
</el-avatar> </el-avatar>
<div> <div>
<div class="text-14px"> <div class="text-14px">
<Highlight :keys="item.keys.map((v) => t(v))"> <Highlight :keys="item.keys">
{{ item.type }} : {{ item.title }} {{ item.type }} : {{ item.title }}
</Highlight> </Highlight>
</div> </div>
@ -100,7 +100,7 @@ import { formatTime } from '@/utils'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import type { TodoList, Notice, Message } from './types' import type { TodoList, Notice, Message } from './types'
import * as NoticeApi from '@/api/system/notice'
defineOptions({ name: 'Home' }) defineOptions({ name: 'Home' })
@ -179,31 +179,44 @@ const getTodoList = async () => {
TodoList = Object.assign(TodoList, data) TodoList = Object.assign(TodoList, data)
} }
const queryParams = reactive({
pageNo: 1,
pageSize: 100,
title: '',
type: undefined,
status: undefined
})
// //
let notice = reactive<Notice[]>([]) let notice = reactive<Notice[]>([])
const getNotice = async () => { const getNotice = async () => {
const data = [ try {
{ const data = await NoticeApi.getNoticePage(queryParams)
title: '系统升级版本', notice = data.list
type: '通知',
keys: ['通知', '升级'], } finally {
date: new Date() loading.value = false
}, }
{ // const data = [
title: '系统凌晨维护', // {
type: '公告', // title: '',
keys: ['公告', '维护'], // type: '',
date: new Date() // keys: ['', ''],
}, // date: new Date()
{ // },
title: '系统升级版本', // {
type: '通知', // title: '',
keys: ['通知', '升级'], // type: '',
date: new Date() // keys: ['', ''],
}, // date: new Date()
] // },
notice = Object.assign(notice, data) // {
// title: '',
// type: '',
// keys: ['', ''],
// date: new Date()
// },
// ]
// notice = Object.assign(notice, data)
} }
// //
let message = reactive<Message[]>([]) let message = reactive<Message[]>([])