From 1c8c452183b8b446f6ae1234eb857d10f042f3cb Mon Sep 17 00:00:00 2001
From: yuanjunzhe <1374457292@qq.com>
Date: Sun, 14 Apr 2024 16:53:15 +0800
Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=85=AC=E5=91=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/system/notice.js | 24 ++++-
src/layout/components/Navbar.vue | 139 ++++++++++++++++++++++++++++
src/views/system/dept/index.vue | 2 +
src/views/system/notice/index.vue | 147 +++++++++++++++++++++++++++++-
src/views/system/user/index.vue | 18 ++++
5 files changed, 326 insertions(+), 4 deletions(-)
diff --git a/src/api/system/notice.js b/src/api/system/notice.js
index c274ea5..d0f0ba4 100644
--- a/src/api/system/notice.js
+++ b/src/api/system/notice.js
@@ -9,6 +9,28 @@ export function listNotice(query) {
})
}
+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
+ })
+}
+
// 查询公告详细
export function getNotice(noticeId) {
return request({
@@ -41,4 +63,4 @@ export function delNotice(noticeId) {
url: '/system/notice/' + noticeId,
method: 'delete'
})
-}
\ No newline at end of file
+}
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 7ccea26..a81eb47 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -7,7 +7,9 @@
+
+
+
+
+
+ 全部
+ 通知
+ 公告
+
+
+
+ 全部
+ 已读
+ 未读
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 阅读消息
+
+
+
+
+ 消息发布时间
+
+ {{notice.createTime}}
+
+
+
+
+ 消息发布人
+
+ {{notice.createBy}}
+
+
+
+
+ 消息类型
+
+
+
+
+
+
+ 消息当前状态
+
+
+
+
+
+
+
+
+
+
+
@@ -46,8 +125,51 @@ 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: ['is_read', 'sys_notice_type'],
+ data() {
+ return {
+ noticeVisble: false,
+ noticeInfo: {},
+ noticeAttr: [
+ {
+ createTime: '',
+ createBy: 'admin',
+ noticeType: '1',
+ isRead: '1',
+ noticeTitle: '哈哈',
+ noticeContent: '嘻嘻嘻嘻嘻',
+ noticeId: 1,
+ },
+ {
+ createTime: '',
+ createBy: 'admin',
+ noticeType: '2',
+ isRead: '0',
+ noticeTitle: '哈撒大大哈',
+ noticeContent: '嘻嘻嘻嘻阿尽快嘻',
+ noticeId: 2,
+ },
+ {
+ createTime: '',
+ createBy: 'admin',
+ noticeType: '1',
+ isRead: '0',
+ noticeTitle: '哈哈是',
+ noticeContent: '嘻嘻嘻萨达嘻嘻',
+ noticeId: 3,
+ }
+ ],
+ form: {
+ noticeType: '',
+ isRead: ''
+ },
+ messageTotal: undefined,
+ noticeTableVisible: false
+ }
+ },
components: {
Breadcrumb,
TopNav,
@@ -80,6 +202,23 @@ export default {
}
},
methods: {
+ 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()
+ })
+ },
+ noticeTableList() {
+ this.getNoticeList()
+ this.noticeTableVisible = true
+ },
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
},
diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue
index 56df582..229658a 100644
--- a/src/views/system/dept/index.vue
+++ b/src/views/system/dept/index.vue
@@ -234,7 +234,9 @@ export default {
getList() {
this.loading = true;
listDept(this.queryParams).then(response => {
+ console.log(response.data)
this.deptList = this.handleTree(response.data, "deptId");
+ console.log(this.deptList)
this.loading = false;
});
},
diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue
index edfb938..d9429ca 100644
--- a/src/views/system/notice/index.vue
+++ b/src/views/system/notice/index.vue
@@ -99,6 +99,14 @@
+ 通知详情
+
+
+
+ 公告时间
+
+
+
+
+
@@ -166,23 +187,93 @@
+
+
+
+
+ {{ form.sectionList }}
+
+
+
+
+ {{ form.personnelList }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+