Commit aacba8279f13487b5eb3f1a14a8674f5abe1d20e
1 parent
6255e51d
消息通知页改造优化
Signed-off-by: TanYibin <5491541@qq.com>
Showing
3 changed files
with
34 additions
and
20 deletions
ant-design-vue-jeecg/src/components/tools/HeaderNotice.vue
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | :arrowPointAtCenter="true" |
7 | 7 | overlayClassName="header-notice-wrapper" |
8 | 8 | @visibleChange="handleHoverChange" |
9 | - :overlayStyle="{ width: '300px', top: '50px' }"> | |
9 | + :overlayStyle="{ width: '350px', top: '50px' }"> | |
10 | 10 | <template slot="content"> |
11 | 11 | <a-spin :spinning="loadding"> |
12 | 12 | <a-tabs> |
... | ... | @@ -30,17 +30,20 @@ |
30 | 30 | </a-list>--> |
31 | 31 | <a-list> |
32 | 32 | <a-list-item :key="index" v-for="(record, index) in announcement1"> |
33 | - <div style="margin-left: 5%;width: 80%"> | |
34 | - <p><a @click="showAnnouncement(record)">{{ record.titile }}</a></p> | |
33 | + <div style="margin-left: 5%;width: 100%"> | |
34 | + <p> | |
35 | + <a-tag @click="showAnnouncement(record)" v-if="record.priority === 'L'" color="blue">一般消息</a-tag> | |
36 | + <a-tag @click="showAnnouncement(record)" v-if="record.priority === 'M'" color="orange">重要消息</a-tag> | |
37 | + <a-tag @click="showAnnouncement(record)" v-if="record.priority === 'H'" color="red">紧急消息</a-tag> | |
38 | + <a @click="showAnnouncement(record)">{{ record.titile }}</a> | |
39 | + </p> | |
35 | 40 | <p style="color: rgba(0,0,0,.45);margin-bottom: 0px">{{ record.createTime }} 发布</p> |
36 | 41 | </div> |
37 | 42 | <div style="text-align: right"> |
38 | - <a-tag @click="showAnnouncement(record)" v-if="record.priority === 'L'" color="blue">一般消息</a-tag> | |
39 | - <a-tag @click="showAnnouncement(record)" v-if="record.priority === 'M'" color="orange">重要消息</a-tag> | |
40 | - <a-tag @click="showAnnouncement(record)" v-if="record.priority === 'H'" color="red">紧急消息</a-tag> | |
41 | 43 | </div> |
42 | 44 | </a-list-item> |
43 | - <div style="margin-top: 5px;text-align: center"> | |
45 | + <div style="margin-top: 5px;text-align: center; display: flex; justify-content: space-between;"> | |
46 | + <a-button @click="readAll()" type="dashed" block style="margin-right: 12px;">全部标注已读</a-button> | |
44 | 47 | <a-button @click="toMyAnnouncement()" type="dashed" block>查看更多</a-button> |
45 | 48 | </div> |
46 | 49 | </a-list> |
... | ... | @@ -48,17 +51,18 @@ |
48 | 51 | <a-tab-pane :tab="msg2Title" key="2"> |
49 | 52 | <a-list> |
50 | 53 | <a-list-item :key="index" v-for="(record, index) in announcement2"> |
51 | - <div style="margin-left: 5%;width: 80%"> | |
52 | - <p><a @click="showAnnouncement(record)">{{ record.titile }}</a></p> | |
54 | + <div style="margin-left: 5%;width: 100%"> | |
55 | + <p> | |
56 | + <a-tag @click="showAnnouncement(record)" v-if="record.priority === 'L'" color="blue">一般消息</a-tag> | |
57 | + <a-tag @click="showAnnouncement(record)" v-if="record.priority === 'M'" color="orange">重要消息</a-tag> | |
58 | + <a-tag @click="showAnnouncement(record)" v-if="record.priority === 'H'" color="red" >紧急消息</a-tag> | |
59 | + <a @click="showAnnouncement(record)">{{ record.titile }}</a> | |
60 | + </p> | |
53 | 61 | <p style="color: rgba(0,0,0,.45);margin-bottom: 0px">{{ record.createTime }} 发布</p> |
54 | 62 | </div> |
55 | - <div style="text-align: right"> | |
56 | - <a-tag @click="showAnnouncement(record)" v-if="record.priority === 'L'" color="blue">一般消息</a-tag> | |
57 | - <a-tag @click="showAnnouncement(record)" v-if="record.priority === 'M'" color="orange">重要消息</a-tag> | |
58 | - <a-tag @click="showAnnouncement(record)" v-if="record.priority === 'H'" color="red">紧急消息</a-tag> | |
59 | - </div> | |
60 | 63 | </a-list-item> |
61 | - <div style="margin-top: 5px;text-align: center"> | |
64 | + <div style="margin-top: 5px;text-align: center; display: flex; justify-content: space-between;"> | |
65 | + <a-button @click="readAll()" type="dashed" block style="margin-right: 12px;">全部标注已读</a-button> | |
62 | 66 | <a-button @click="toMyAnnouncement()" type="dashed" block>查看更多</a-button> |
63 | 67 | </div> |
64 | 68 | </a-list> |
... | ... | @@ -96,6 +100,7 @@ export default { |
96 | 100 | listCementByUser: "/sys/annountCement/listByUser", |
97 | 101 | editCementSend: "/sys/sysAnnouncementSend/editByAnntIdAndUserId", |
98 | 102 | queryById: "/sys/annountCement/queryById", |
103 | + readAllMsg: "sys/sysAnnouncementSend/readAll", | |
99 | 104 | }, |
100 | 105 | hovered: false, |
101 | 106 | announcement1: [], |
... | ... | @@ -165,7 +170,7 @@ export default { |
165 | 170 | this.loadding = false |
166 | 171 | return |
167 | 172 | } |
168 | - this.loadding = true | |
173 | + // this.loadding = true | |
169 | 174 | setTimeout(() => { |
170 | 175 | this.loadding = false |
171 | 176 | }, 200) |
... | ... | @@ -199,6 +204,15 @@ export default { |
199 | 204 | path: '/isps/userAnnouncement' |
200 | 205 | }); |
201 | 206 | }, |
207 | + readAll() { | |
208 | + var that = this; | |
209 | + putAction(that.url.readAllMsg).then((res) => { | |
210 | + if (res.success) { | |
211 | + that.$message.success(res.message); | |
212 | + that.loadData(); | |
213 | + } | |
214 | + }); | |
215 | + }, | |
202 | 216 | modalFormOk() { |
203 | 217 | }, |
204 | 218 | handleHoverChange(visible) { |
... | ... |
ant-design-vue-jeecg/src/views/system/UserAnnouncementList.vue
huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementSendController.java
... | ... | @@ -244,9 +244,9 @@ public class SysAnnouncementSendController { |
244 | 244 | updateWrapper.last("where user_id ='" + userId + "'"); |
245 | 245 | SysAnnouncementSend announcementSend = new SysAnnouncementSend(); |
246 | 246 | sysAnnouncementSendService.update(announcementSend, updateWrapper); |
247 | - JSONObject socketParams = new JSONObject(); | |
248 | - socketParams.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC); | |
249 | - webSocket.sendMessage(socketParams.toJSONString()); | |
247 | +// JSONObject socketParams = new JSONObject(); | |
248 | +// socketParams.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC); | |
249 | +// webSocket.sendMessage(socketParams.toJSONString()); | |
250 | 250 | result.setSuccess(true); |
251 | 251 | result.setMessage("全部已读"); |
252 | 252 | return result; |
... | ... |