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,7 +6,7 @@ | ||
6 | :arrowPointAtCenter="true" | 6 | :arrowPointAtCenter="true" |
7 | overlayClassName="header-notice-wrapper" | 7 | overlayClassName="header-notice-wrapper" |
8 | @visibleChange="handleHoverChange" | 8 | @visibleChange="handleHoverChange" |
9 | - :overlayStyle="{ width: '300px', top: '50px' }"> | 9 | + :overlayStyle="{ width: '350px', top: '50px' }"> |
10 | <template slot="content"> | 10 | <template slot="content"> |
11 | <a-spin :spinning="loadding"> | 11 | <a-spin :spinning="loadding"> |
12 | <a-tabs> | 12 | <a-tabs> |
@@ -30,17 +30,20 @@ | @@ -30,17 +30,20 @@ | ||
30 | </a-list>--> | 30 | </a-list>--> |
31 | <a-list> | 31 | <a-list> |
32 | <a-list-item :key="index" v-for="(record, index) in announcement1"> | 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 | <p style="color: rgba(0,0,0,.45);margin-bottom: 0px">{{ record.createTime }} 发布</p> | 40 | <p style="color: rgba(0,0,0,.45);margin-bottom: 0px">{{ record.createTime }} 发布</p> |
36 | </div> | 41 | </div> |
37 | <div style="text-align: right"> | 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 | </div> | 43 | </div> |
42 | </a-list-item> | 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 | <a-button @click="toMyAnnouncement()" type="dashed" block>查看更多</a-button> | 47 | <a-button @click="toMyAnnouncement()" type="dashed" block>查看更多</a-button> |
45 | </div> | 48 | </div> |
46 | </a-list> | 49 | </a-list> |
@@ -48,17 +51,18 @@ | @@ -48,17 +51,18 @@ | ||
48 | <a-tab-pane :tab="msg2Title" key="2"> | 51 | <a-tab-pane :tab="msg2Title" key="2"> |
49 | <a-list> | 52 | <a-list> |
50 | <a-list-item :key="index" v-for="(record, index) in announcement2"> | 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 | <p style="color: rgba(0,0,0,.45);margin-bottom: 0px">{{ record.createTime }} 发布</p> | 61 | <p style="color: rgba(0,0,0,.45);margin-bottom: 0px">{{ record.createTime }} 发布</p> |
54 | </div> | 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 | </a-list-item> | 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 | <a-button @click="toMyAnnouncement()" type="dashed" block>查看更多</a-button> | 66 | <a-button @click="toMyAnnouncement()" type="dashed" block>查看更多</a-button> |
63 | </div> | 67 | </div> |
64 | </a-list> | 68 | </a-list> |
@@ -96,6 +100,7 @@ export default { | @@ -96,6 +100,7 @@ export default { | ||
96 | listCementByUser: "/sys/annountCement/listByUser", | 100 | listCementByUser: "/sys/annountCement/listByUser", |
97 | editCementSend: "/sys/sysAnnouncementSend/editByAnntIdAndUserId", | 101 | editCementSend: "/sys/sysAnnouncementSend/editByAnntIdAndUserId", |
98 | queryById: "/sys/annountCement/queryById", | 102 | queryById: "/sys/annountCement/queryById", |
103 | + readAllMsg: "sys/sysAnnouncementSend/readAll", | ||
99 | }, | 104 | }, |
100 | hovered: false, | 105 | hovered: false, |
101 | announcement1: [], | 106 | announcement1: [], |
@@ -165,7 +170,7 @@ export default { | @@ -165,7 +170,7 @@ export default { | ||
165 | this.loadding = false | 170 | this.loadding = false |
166 | return | 171 | return |
167 | } | 172 | } |
168 | - this.loadding = true | 173 | + // this.loadding = true |
169 | setTimeout(() => { | 174 | setTimeout(() => { |
170 | this.loadding = false | 175 | this.loadding = false |
171 | }, 200) | 176 | }, 200) |
@@ -199,6 +204,15 @@ export default { | @@ -199,6 +204,15 @@ export default { | ||
199 | path: '/isps/userAnnouncement' | 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 | modalFormOk() { | 216 | modalFormOk() { |
203 | }, | 217 | }, |
204 | handleHoverChange(visible) { | 218 | handleHoverChange(visible) { |
ant-design-vue-jeecg/src/views/system/UserAnnouncementList.vue
@@ -170,7 +170,7 @@ export default { | @@ -170,7 +170,7 @@ export default { | ||
170 | if (res.success) { | 170 | if (res.success) { |
171 | that.$message.success(res.message); | 171 | that.$message.success(res.message); |
172 | that.loadData(); | 172 | that.loadData(); |
173 | - that.syncHeadNotic(); | 173 | + // that.syncHeadNotic(); |
174 | } | 174 | } |
175 | }); | 175 | }); |
176 | } | 176 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementSendController.java
@@ -244,9 +244,9 @@ public class SysAnnouncementSendController { | @@ -244,9 +244,9 @@ public class SysAnnouncementSendController { | ||
244 | updateWrapper.last("where user_id ='" + userId + "'"); | 244 | updateWrapper.last("where user_id ='" + userId + "'"); |
245 | SysAnnouncementSend announcementSend = new SysAnnouncementSend(); | 245 | SysAnnouncementSend announcementSend = new SysAnnouncementSend(); |
246 | sysAnnouncementSendService.update(announcementSend, updateWrapper); | 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 | result.setSuccess(true); | 250 | result.setSuccess(true); |
251 | result.setMessage("全部已读"); | 251 | result.setMessage("全部已读"); |
252 | return result; | 252 | return result; |