From e3f1397a801c60bca62e7ec2c161fd5bfd63597e Mon Sep 17 00:00:00 2001
From: sunshine7058 <2564255161@qq.com>
Date: Mon, 15 Apr 2024 14:09:14 +0800
Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=85=AC=E5=91=8A=E4=BC=98?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/system/notice.js | 22 +++++
src/layout/components/Navbar.vue | 99 +++++++++++++++++++++
src/views/system/notice/index.vue | 141 +++++++++++++++++++++++++++++-
3 files changed, 259 insertions(+), 3 deletions(-)
diff --git a/src/api/system/notice.js b/src/api/system/notice.js
index d61a810..18fe23f 100644
--- a/src/api/system/notice.js
+++ b/src/api/system/notice.js
@@ -42,3 +42,25 @@ export function delNotice(noticeId) {
method: 'delete'
})
}
+
+export function updateAsUserDept(id) {
+ return request({
+ url: '/system/userDept/updateAsUserDept?id=' + id,
+ method: 'get'
+ })
+}
+
+export function getNum(id) {
+ return request({
+ url: '/system/userDept/getNum?noticeId=' + id,
+ method: 'get'
+ })
+}
+
+export function getNoticeList(data) {
+ return request({
+ url: '/system/notice/getNoticeList',
+ method: 'post',
+ data
+ })
+}
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 7ccea26..66c8bf1 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -8,6 +8,7 @@
+
+
+ 全部
+ 通知
+ 公告
+
+
+
+ 全部
+ 已读
+ 未读
+
+
+
+
+
+ 阅读消息
+
+
+
+
+ 消息发布时间
+
+ {{ notice.createTime }}
+
+
+
+
+ 消息发布人
+
+ {{ notice.createBy }}
+
+
+
+
+ 消息类型
+
+
+
+
+
+
+ 消息当前状态
+
+
+
+
+
+
+
+
+
+
+
@@ -46,8 +113,23 @@ import Hamburger from '@/components/Hamburger'
import Screenfull from '@/components/Screenfull'
import SizeSelect from '@/components/SizeSelect'
import Search from '@/components/HeaderSearch'
+import {getNoticeList, updateAsUserDept} from "@/api/system/notice"
export default {
+ dicts: ['sys_is_read', 'sys_notice_type'],
+ data() {
+ return {
+ noticeVisble: false,
+ noticeInfo: {},
+ noticeAttr: [],
+ form: {
+ noticeType: '',
+ isRead: ''
+ },
+ messageTotal: undefined,
+ noticeTableVisible: false
+ }
+ },
components: {
Breadcrumb,
TopNav,
@@ -80,6 +162,23 @@ export default {
}
},
methods: {
+ noticeTableList() {
+ this.getNoticeList()
+ this.noticeTableVisible = true
+ },
+ getNoticeList() {
+ getNoticeList(this.form).then(res => {
+ console.log(res)
+ this.noticeAttr = res.data
+ })
+ },
+ readNotice(row) {
+ this.noticeInfo = row
+ this.noticeVisble = true
+ updateAsUserDept(row.id).then(res => {
+ this.getNoticeList()
+ })
+ },
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
},
diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue
index edfb938..9d937cf 100644
--- a/src/views/system/notice/index.vue
+++ b/src/views/system/notice/index.vue
@@ -99,6 +99,13 @@
+ 通知详情
+
+
+ 公告时间
+
+
+
@@ -171,13 +188,72 @@
确 定
取 消
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+