From db187766ccd35f254a19f0dee3d62478f3be194e Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Tue, 21 Jun 2022 16:55:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E7=9A=84=E6=B6=88=E6=81=AF=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/assets/mynoticeView/all.png | Bin 0 -> 1644 bytes front/src/assets/mynoticeView/comment.png | Bin 0 -> 1849 bytes front/src/assets/mynoticeView/notice.png | Bin 0 -> 1990 bytes front/src/router/index.js | 10 + front/src/views/home/components/header.vue | 53 ++-- .../mynoticeView/components/NoticeList.vue | 260 ++++++++++++++++++ front/src/views/mynoticeView/index.vue | 18 ++ 7 files changed, 319 insertions(+), 22 deletions(-) create mode 100644 front/src/assets/mynoticeView/all.png create mode 100644 front/src/assets/mynoticeView/comment.png create mode 100644 front/src/assets/mynoticeView/notice.png create mode 100644 front/src/views/mynoticeView/components/NoticeList.vue create mode 100644 front/src/views/mynoticeView/index.vue diff --git a/front/src/assets/mynoticeView/all.png b/front/src/assets/mynoticeView/all.png new file mode 100644 index 0000000000000000000000000000000000000000..ba1003fc2c88a9cc13663834ed06dcdd0e3ff9a2 GIT binary patch literal 1644 zcmaJ?drT8|94}Ujpr})vf;i8j4jl9zZIPZ7)(0J}6nQy{5~Z{UJ)n2z^?;VmDIh~b zm1PshoXaqZB8rl!$tEfgFsRdk%7iEbd>{^du(9asknD?-S3gl=ktAilG_;_ z^^u3Ww>yW!@lZ!7W7!pQzSDW^H(`pSh+Vvxa2*pzrZPEt8so@}WC{kT&H6Mf7SkJT zn=fM_91eFW9-Yd}l=2hA zT1ZPNFcTh;OJi}lQSpY{41>hT4+{lCtSBpB#uzZ0u4c@6S`Q3#VE z<-bl!r;P>_B#i-LfjH0r!6IOlL;#CnQ7{|;AP_7BAt4A017Q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 z?DXpvo)lHMZcX&v>do)CD4G#oo_^>19eG>79M%}G5e)hwV{OQ*m#6(q2a2Bklt4}m zuCV#>DCyO?ADT|;2NSlWHu$W3vZ-}P(@=w*@Jy}5&ZcPS(Z+#``lzhd#4dbUssZP- zQg^@1=Fvrcld<+{PCj?+$z;S(%~0+~g$D1I&(~z@k8~R<`@|oY?GmmkuIl>8aLg*? zUhE5Sa;Q7UMI$SHf1bA(zinF8F>sS?JEbpSX3!F29XJ&s#SRMm0FdC5>(i z&n_Me=}mE>e)jJ(>29XSjipDY%{a-!lm4^SE}AdRYid2MHZARx7K{vOHsZpVW!-b1&!CAzOGj4TT{$aeEv}?cI zEBpX>?{HcIH^|ZFMTJJhUlsF|9-1_cJpZvjHS~D0>jPgViO2tQ`2sRw-V}1Yb5uc9 z44Vp`gZa-Jt9n;#JM(U>r{9?K*=p@QhZAK4rb8RJ-}=1wdYRRY-=x3CT^)Y5&P6dN z9X&Xa{#A$X#`O(VHKyt#Q)n0Asqc+fUqwfJ(mm%&v$F2qRW{`PZDB~j+TXn}jqPzv zy+;3m^02un?rPlOv(j_d6G|?pvl$+R-(AWw-7RT7WfE~iM~&e@G_&d$v*;0d&*ZV6 zJeZPaaz9x>Kw8u2smv2knhLt%olQ?iXh8XRAkvXlm>SL 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 @@ +
查看更多
@@ -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 @@ + + + + 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 @@ + + + +