1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-05 06:51:23 +08:00

the function of modify top have been completed and modify the manageTable index

This commit is contained in:
cccccyb
2023-05-20 02:32:51 +08:00
parent b1f4ad07a8
commit e122933bb9
10 changed files with 144 additions and 64 deletions

View File

@@ -12,6 +12,31 @@ export interface IAddFormData {
content: string
receivers: []
}
export interface INotice {
content: string
createTime: string
endTime: string
id: string
modifyTime: string
priority: number
receivers: []
sendTime: string
title: string
top: number
isRead: number
noticeType: {
id: string
name: string
enable: number
}
sender: {
id: string
username: string
enable: number
}
senderId: string
typeId: string
}
export const useNoticeStore = defineStore('notice', {
state: () => {
return {
@@ -190,20 +215,30 @@ export const useNoticeStore = defineStore('notice', {
}
})
},
async modifyNoticeIsRead(noticeId: string, readStatus: number) {
await request
.get('/notice/modifyNoticeIsRead', {
noticeId,
readStatus
})
.then((response) => {
if (response.data.code === 20033) {
ElMessage({
message: response.data.msg,
type: 'error'
})
}
})
async modifyNoticeIsRead(notice: INotice) {
await request.put('/notice/modifyNoticeIsRead', notice).then((response) => {
if (response.data.code === 20033) {
ElMessage({
message: response.data.msg,
type: 'error'
})
}
})
},
async modifyTop(notice: INotice) {
await request.put('/notice/updateNoticeTop', notice).then((response) => {
if (response.data.code === 20023) {
ElMessage({
message: response.data.msg,
type: 'success'
})
} else if (response.data.code === 20033) {
ElMessage({
message: response.data.msg,
type: 'error'
})
}
})
}
}
})