diff --git a/src/api/publicService/index.js b/src/api/publicService/index.js
index c803fdb..7591b3d 100644
--- a/src/api/publicService/index.js
+++ b/src/api/publicService/index.js
@@ -576,6 +576,14 @@
params: query,
});
}
+export function projectNoticeUserPage(query) {
+ return request({
+ url: '/business/projectNoticeUser/page',
+ method: 'get',
+ params: query,
+ });
+}
+
// 项目通知 新增
export function projectNoticeAdd(data) {
return request({
@@ -592,6 +600,13 @@
data: data,
});
}
+export function projectNoticeUserEdit(data) {
+ return request({
+ url: '/business/projectNoticeUser/edit',
+ method: 'put',
+ data: data,
+ });
+}
// 项目通知 删除
export function projectNoticeDel(id) {
@@ -600,3 +615,11 @@
method: 'delete',
});
}
+// 项目人员通知
+export function countUnread(data) {
+ return request({
+ url: '/business/projectNoticeUser/countUnread',
+ method: 'post',
+ data: data,
+ });
+}
diff --git a/src/api/publicService/index.js b/src/api/publicService/index.js
index c803fdb..7591b3d 100644
--- a/src/api/publicService/index.js
+++ b/src/api/publicService/index.js
@@ -576,6 +576,14 @@
params: query,
});
}
+export function projectNoticeUserPage(query) {
+ return request({
+ url: '/business/projectNoticeUser/page',
+ method: 'get',
+ params: query,
+ });
+}
+
// 项目通知 新增
export function projectNoticeAdd(data) {
return request({
@@ -592,6 +600,13 @@
data: data,
});
}
+export function projectNoticeUserEdit(data) {
+ return request({
+ url: '/business/projectNoticeUser/edit',
+ method: 'put',
+ data: data,
+ });
+}
// 项目通知 删除
export function projectNoticeDel(id) {
@@ -600,3 +615,11 @@
method: 'delete',
});
}
+// 项目人员通知
+export function countUnread(data) {
+ return request({
+ url: '/business/projectNoticeUser/countUnread',
+ method: 'post',
+ data: data,
+ });
+}
diff --git a/src/layout/components/HeaderSys/index.vue b/src/layout/components/HeaderSys/index.vue
index eab0e69..45fa42a 100644
--- a/src/layout/components/HeaderSys/index.vue
+++ b/src/layout/components/HeaderSys/index.vue
@@ -14,7 +14,7 @@
-
+
@@ -52,7 +52,12 @@
-
+
+
+
+
@@ -66,6 +71,7 @@
import newsDiaLOG from '@/views/system/user/profile/newsDiaLOG'; //消息通知
import userImg from '@/assets/images/login/user.png'; //默认头像
import xiaoxi from '@/assets/images/login/xiaoxi_icon.png';
+import { countUnread, projectNoticeUserPage } from '@/api/publicService/index';
import bus from '@/utils/mitt';
import { ElMessageBox } from 'element-plus';
import usePermissionStore from '@/store/modules/permission';
@@ -78,6 +84,8 @@
const userStore = useUserStore();
const menuList = ref([]);
const menuList1 = ref([]);
+const tableData = ref({});
+const NumPer = ref('');
const activeIndex = ref('FloodSys');
const router = useRouter();
// 加载对应子菜单
@@ -136,8 +144,20 @@
// 消息弹框
function goNews() {
- console.log('123');
dialogNews.value = true;
+ getDataListA();
+}
+/** 获取查询数据列表 */
+function getDataListA() {
+ projectNoticeUserPage().then(response => {
+ tableData.value = response.data;
+ });
+}
+/** 获取查询人数 */
+function getDataList() {
+ countUnread().then(response => {
+ NumPer.value = response.data;
+ });
}
onMounted(() => {
@@ -156,6 +176,7 @@
bus.on('closeUserCenter', e => {
dialogShow.value = false;
});
+ getDataList();
});
onBeforeUnmount(() => {
bus.off('closeUserCenter');
diff --git a/src/api/publicService/index.js b/src/api/publicService/index.js
index c803fdb..7591b3d 100644
--- a/src/api/publicService/index.js
+++ b/src/api/publicService/index.js
@@ -576,6 +576,14 @@
params: query,
});
}
+export function projectNoticeUserPage(query) {
+ return request({
+ url: '/business/projectNoticeUser/page',
+ method: 'get',
+ params: query,
+ });
+}
+
// 项目通知 新增
export function projectNoticeAdd(data) {
return request({
@@ -592,6 +600,13 @@
data: data,
});
}
+export function projectNoticeUserEdit(data) {
+ return request({
+ url: '/business/projectNoticeUser/edit',
+ method: 'put',
+ data: data,
+ });
+}
// 项目通知 删除
export function projectNoticeDel(id) {
@@ -600,3 +615,11 @@
method: 'delete',
});
}
+// 项目人员通知
+export function countUnread(data) {
+ return request({
+ url: '/business/projectNoticeUser/countUnread',
+ method: 'post',
+ data: data,
+ });
+}
diff --git a/src/layout/components/HeaderSys/index.vue b/src/layout/components/HeaderSys/index.vue
index eab0e69..45fa42a 100644
--- a/src/layout/components/HeaderSys/index.vue
+++ b/src/layout/components/HeaderSys/index.vue
@@ -14,7 +14,7 @@
-
+
@@ -52,7 +52,12 @@
-
+
+
+
+
@@ -66,6 +71,7 @@
import newsDiaLOG from '@/views/system/user/profile/newsDiaLOG'; //消息通知
import userImg from '@/assets/images/login/user.png'; //默认头像
import xiaoxi from '@/assets/images/login/xiaoxi_icon.png';
+import { countUnread, projectNoticeUserPage } from '@/api/publicService/index';
import bus from '@/utils/mitt';
import { ElMessageBox } from 'element-plus';
import usePermissionStore from '@/store/modules/permission';
@@ -78,6 +84,8 @@
const userStore = useUserStore();
const menuList = ref([]);
const menuList1 = ref([]);
+const tableData = ref({});
+const NumPer = ref('');
const activeIndex = ref('FloodSys');
const router = useRouter();
// 加载对应子菜单
@@ -136,8 +144,20 @@
// 消息弹框
function goNews() {
- console.log('123');
dialogNews.value = true;
+ getDataListA();
+}
+/** 获取查询数据列表 */
+function getDataListA() {
+ projectNoticeUserPage().then(response => {
+ tableData.value = response.data;
+ });
+}
+/** 获取查询人数 */
+function getDataList() {
+ countUnread().then(response => {
+ NumPer.value = response.data;
+ });
}
onMounted(() => {
@@ -156,6 +176,7 @@
bus.on('closeUserCenter', e => {
dialogShow.value = false;
});
+ getDataList();
});
onBeforeUnmount(() => {
bus.off('closeUserCenter');
diff --git a/src/views/system/MenuNotifi/Notification.vue b/src/views/system/MenuNotifi/Notification.vue
index cc3b588..187bbd8 100644
--- a/src/views/system/MenuNotifi/Notification.vue
+++ b/src/views/system/MenuNotifi/Notification.vue
@@ -64,7 +64,7 @@
-
+
修改
diff --git a/src/api/publicService/index.js b/src/api/publicService/index.js
index c803fdb..7591b3d 100644
--- a/src/api/publicService/index.js
+++ b/src/api/publicService/index.js
@@ -576,6 +576,14 @@
params: query,
});
}
+export function projectNoticeUserPage(query) {
+ return request({
+ url: '/business/projectNoticeUser/page',
+ method: 'get',
+ params: query,
+ });
+}
+
// 项目通知 新增
export function projectNoticeAdd(data) {
return request({
@@ -592,6 +600,13 @@
data: data,
});
}
+export function projectNoticeUserEdit(data) {
+ return request({
+ url: '/business/projectNoticeUser/edit',
+ method: 'put',
+ data: data,
+ });
+}
// 项目通知 删除
export function projectNoticeDel(id) {
@@ -600,3 +615,11 @@
method: 'delete',
});
}
+// 项目人员通知
+export function countUnread(data) {
+ return request({
+ url: '/business/projectNoticeUser/countUnread',
+ method: 'post',
+ data: data,
+ });
+}
diff --git a/src/layout/components/HeaderSys/index.vue b/src/layout/components/HeaderSys/index.vue
index eab0e69..45fa42a 100644
--- a/src/layout/components/HeaderSys/index.vue
+++ b/src/layout/components/HeaderSys/index.vue
@@ -14,7 +14,7 @@
-
+
@@ -52,7 +52,12 @@
-
+
+
+
+
@@ -66,6 +71,7 @@
import newsDiaLOG from '@/views/system/user/profile/newsDiaLOG'; //消息通知
import userImg from '@/assets/images/login/user.png'; //默认头像
import xiaoxi from '@/assets/images/login/xiaoxi_icon.png';
+import { countUnread, projectNoticeUserPage } from '@/api/publicService/index';
import bus from '@/utils/mitt';
import { ElMessageBox } from 'element-plus';
import usePermissionStore from '@/store/modules/permission';
@@ -78,6 +84,8 @@
const userStore = useUserStore();
const menuList = ref([]);
const menuList1 = ref([]);
+const tableData = ref({});
+const NumPer = ref('');
const activeIndex = ref('FloodSys');
const router = useRouter();
// 加载对应子菜单
@@ -136,8 +144,20 @@
// 消息弹框
function goNews() {
- console.log('123');
dialogNews.value = true;
+ getDataListA();
+}
+/** 获取查询数据列表 */
+function getDataListA() {
+ projectNoticeUserPage().then(response => {
+ tableData.value = response.data;
+ });
+}
+/** 获取查询人数 */
+function getDataList() {
+ countUnread().then(response => {
+ NumPer.value = response.data;
+ });
}
onMounted(() => {
@@ -156,6 +176,7 @@
bus.on('closeUserCenter', e => {
dialogShow.value = false;
});
+ getDataList();
});
onBeforeUnmount(() => {
bus.off('closeUserCenter');
diff --git a/src/views/system/MenuNotifi/Notification.vue b/src/views/system/MenuNotifi/Notification.vue
index cc3b588..187bbd8 100644
--- a/src/views/system/MenuNotifi/Notification.vue
+++ b/src/views/system/MenuNotifi/Notification.vue
@@ -64,7 +64,7 @@
-
+
修改
diff --git a/src/views/system/user/profile/newsDiaLOG.vue b/src/views/system/user/profile/newsDiaLOG.vue
index 101fe63..a0bd2d5 100644
--- a/src/views/system/user/profile/newsDiaLOG.vue
+++ b/src/views/system/user/profile/newsDiaLOG.vue
@@ -2,31 +2,45 @@
-
-
+
+
- 已读
- 未读
+ 已读
+ 未读