diff --git a/front/src/assets/mynoticeView/all.png b/front/src/assets/mynoticeView/all.png
new file mode 100644
index 00000000..ba1003fc
Binary files /dev/null and b/front/src/assets/mynoticeView/all.png differ
diff --git a/front/src/assets/mynoticeView/comment.png b/front/src/assets/mynoticeView/comment.png
new file mode 100644
index 00000000..6bb4f32c
Binary files /dev/null and b/front/src/assets/mynoticeView/comment.png differ
diff --git a/front/src/assets/mynoticeView/notice.png b/front/src/assets/mynoticeView/notice.png
new file mode 100644
index 00000000..57f3b79b
Binary files /dev/null and b/front/src/assets/mynoticeView/notice.png differ
diff --git a/front/src/router/index.js b/front/src/router/index.js
index 40584e34..235b7f3b 100644
--- a/front/src/router/index.js
+++ b/front/src/router/index.js
@@ -138,6 +138,16 @@ export const constantRoutes = [
icon: 'error-warning-line',
},
},
+ {
+ path: '/mynoticeView',
+ name: 'mynoticeView',
+ hidden: true,
+ component: () => import('@/views/mynoticeView'),
+ meta: {
+ title: '我的消息',
+ icon: 'error-warning-line',
+ },
+ },
{
path: '/WorkDynDetails',
name: 'WorkDynDetails',
diff --git a/front/src/views/home/components/header.vue b/front/src/views/home/components/header.vue
index 84106d79..ecbfd950 100644
--- a/front/src/views/home/components/header.vue
+++ b/front/src/views/home/components/header.vue
@@ -59,20 +59,15 @@
-
+
-
- {{ item.content }}
- {{ item.title }}
-
-
- 设为已读
-
+ {{ item.content }}
+
查看更多
@@ -113,7 +108,7 @@
import { ref, onMounted, onBeforeUnmount, defineProps } from 'vue'
import { recordRoute } from '@/config'
import { useRoute, useRouter } from 'vue-router'
- import { getUser, mynotice, mynoticeRead } from '@/api/home'
+ import { getUser, mynotice } from '@/api/home'
import { useStore } from 'vuex'
import { getSgcTotal } from '@/api/home'
import mybus from '@/myplugins/mybus'
@@ -243,15 +238,20 @@
mynotice({ page: 1, limit: 999, readStatus: 0 }).then((res) => {
console.log('我的消息', res.data.data)
mynoticeNum.value = res.data.data.total
- mynoticeData.value = res.data.data.list
+ mynoticeData.value = res.data.data.list.splice(0, 3)
})
}
- const read = (item) => {
- mynoticeRead(item.id).then((res) => {
- console.log('已读', res)
- getMynotice()
+ const goToView = () => {
+ router.push({
+ path: '/mynoticeView',
})
}
+ // const read = (item) => {
+ // mynoticeRead(item.id).then((res) => {
+ // console.log('已读', res)
+ // getMynotice()
+ // })
+ // }
onMounted(() => {
getSgcTotal().then((res) => {
console.log('初始化========================>', res.data.data.count)
@@ -397,7 +397,7 @@
}
}
.mynotice {
- width: 2.5rem;
+ width: 4rem;
height: 3rem;
background: #eee;
border-radius: 0.05rem;
@@ -405,24 +405,33 @@
top: 0.45rem;
right: 3.1rem;
overflow-y: scroll;
+ .bottom {
+ cursor: pointer;
+ width: 100%;
+ text-align: center;
+ color: #000;
+ font-size: 0.16rem;
+ }
}
.mynotice::-webkit-scrollbar {
display: none;
}
:deep(.ant-list-item) {
border-bottom: 0.01rem solid #ccc;
+ padding: 0.1rem;
}
:deep(.ant-list-item-meta-title) {
- display: flex;
- justify-content: space-around;
- align-items: center;
- padding: 0 0.05rem;
+ // display: flex;
+ // justify-content: space-around;
+ // align-items: center;
+ // padding: 0 0.05rem;
a {
- width: 1.5rem;
- // 超出显示...
+ width: 3.8rem;
overflow: hidden;
text-overflow: ellipsis;
- white-space: nowrap;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
}
button {
width: 0.7rem;
diff --git a/front/src/views/mynoticeView/components/NoticeList.vue b/front/src/views/mynoticeView/components/NoticeList.vue
new file mode 100644
index 00000000..7e4db574
--- /dev/null
+++ b/front/src/views/mynoticeView/components/NoticeList.vue
@@ -0,0 +1,260 @@
+
+
+
+
+
+
+
+
{{ nav.title + '(' + nav.num + ')' }}
+
+
+
+
搜索
+
+
+
+
+
+
搜索
+
重置
+
+
+
+
+
+ 全部消息
+ 已读消息
+ 未读消息
+
+
+
+
全选
+
+ 共
+ 2
+ 条消息
+
+
+
+
标记为已读
+
+
+
+
+
+
+
+
+ {{ item.title }}
+
+ {{ '发布时间:' + item.time }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/front/src/views/mynoticeView/index.vue b/front/src/views/mynoticeView/index.vue
new file mode 100644
index 00000000..8b012893
--- /dev/null
+++ b/front/src/views/mynoticeView/index.vue
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+