whx 5 months ago
parent
commit
69f1659ddd
45 changed files with 154 additions and 82 deletions
  1. 8 0
      virgo.wzfrontend/console/src/assets/scss/index.scss
  2. 36 5
      virgo.wzfrontend/console/src/components/message/detail.vue
  3. 1 1
      virgo.wzfrontend/console/src/components/message/modules/inviteDetail.vue
  4. 33 0
      virgo.wzfrontend/console/src/components/message/modules/remindDetail.vue
  5. 7 6
      virgo.wzfrontend/console/src/components/work/operation/remind/edit.vue
  6. 11 1
      virgo.wzfrontend/console/src/httpApi/message.js
  7. 8 2
      virgo.wzfrontend/console/src/layout/components/topNav.vue
  8. 16 1
      virgo.wzfrontend/console/src/layout/work.vue
  9. 0 32
      virgo.wzfrontend/console/src/uitls/chat.js
  10. 3 0
      virgo.wzfrontend/console/src/uitls/message.js
  11. 5 6
      virgo.wzfrontend/console/src/views/message/list.vue
  12. 5 7
      virgo.wzfrontend/console/src/views/work/operation/remind/remind.vue
  13. 1 1
      virgo.wzfrontend/src/main/resources/static/console/index.html
  14. 1 1
      virgo.wzfrontend/src/main/resources/static/console/static/css/9689.de937fcd.css
  15. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/css/app.a1c586ea.css
  16. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/css/app.bfd72a29.css
  17. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/1134.1d992bbf.js
  18. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/130-legacy.5b1d13ef.js
  19. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/1644-legacy.4f2890f4.js
  20. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/1644.32af0c49.js
  21. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/23.05e76568.js
  22. 1 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/258.97fc8042.js
  23. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/3022.44e92e60.js
  24. 1 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/3836-legacy.5aa8ba89.js
  25. 1 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/5259-legacy.e816308e.js
  26. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/5470.c733791b.js
  27. 1 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/5641.1d511878.js
  28. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/5947-legacy.3503133e.js
  29. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/5947.5154d6b4.js
  30. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/6439.03171513.js
  31. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/6439.ec164ba5.js
  32. 1 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/6843-legacy.867bf6aa.js
  33. 1 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/6843.da17bfce.js
  34. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/7402-legacy.c5653fe1.js
  35. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/8554-legacy.251961ce.js
  36. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/9689-legacy.4c740a56.js
  37. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/9689.1db17f20.js
  38. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/9696-legacy.261fcf53.js
  39. 1 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/9733-legacy.d46e6f39.js
  40. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/9816-legacy.a9988d70.js
  41. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/9816.1d0cdf92.js
  42. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/app-legacy.18998e02.js
  43. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/app-legacy.b9838c1c.js
  44. 1 0
      virgo.wzfrontend/src/main/resources/static/console/static/js/app.bd7c652f.js
  45. 0 1
      virgo.wzfrontend/src/main/resources/static/console/static/js/app.f84b20d2.js

+ 8 - 0
virgo.wzfrontend/console/src/assets/scss/index.scss

@@ -1537,4 +1537,12 @@
 	.active{
 		color: $--color-primary;
 	}
+}
+.el-notification{
+	background: #3b3f49 !important;
+	border: none !important;
+	.el-notification__title,
+	.el-notification__content{
+		color: $--color-common;
+	}
 }

+ 36 - 5
virgo.wzfrontend/console/src/components/message/detail.vue

@@ -1,8 +1,15 @@
 <template>
 	<div class="message-detail">
 		<flow-detail v-if="type === 2" :detailId="detail.dataId"></flow-detail>
-		<datacenter-detail v-if="type === 5" :detail="detail"></datacenter-detail>
-		<invite-detail v-if="type === 6" :detail="detail"></invite-detail>
+		<datacenter-detail v-else-if="type === 5" :detail="detail"></datacenter-detail>
+		<invite-detail v-else-if="type === 6" :detail="detail"></invite-detail>
+		<remind-detail v-else-if="type === 7" :detail="detail"></remind-detail>
+		<div class="common-message" v-else>
+			<div class="message-title">{{detail.title}}</div>
+			<div class="message-date"><span>发布时间:</span><span>{{detail.sentTime}}</span></div>
+			<div class="message-content">{{detail.message}} <span class="color-blue" v-if="type === 7">查看详情>></span>
+			</div>
+		</div>
 	</div>
 </template>
 
@@ -10,14 +17,15 @@
 	import flowDetail from '@/components/flow/flowDetail'
 	import inviteDetail from './modules/inviteDetail'
 	import datacenterDetail from './modules/datacenterDetail'
-
+	import remindDetail from './modules/remindDetail'
 	export default {
 		props: ['type', 'detail'],
 		components: {
 			inviteDetail,
 			flowDetail,
-			datacenterDetail
-		},
+			datacenterDetail,
+			remindDetail
+		}
 	}
 </script>
 
@@ -25,5 +33,28 @@
 	.message-detail {
 		width: 100%;
 		height: 100%;
+
+		.message-title {
+			font-size: 22px;
+			font-weight: 450;
+		}
+
+		.common-message {
+			padding: 10px;
+		}
+
+		.message-date {
+			color: $--color-gray;
+			padding-bottom: 15px;
+			border-bottom: 1px solid $--color-border;
+		}
+
+		.message-content {
+			margin-top: 15px;
+		}
+
+		.color-blue {
+			cursor: pointer;
+		}
 	}
 </style>

+ 1 - 1
virgo.wzfrontend/console/src/components/message/modules/inviteDetail.vue

@@ -5,7 +5,7 @@
 				<div class="hui-detail-title">消息内容</div>
 				<div class="hui-detail-content">
 					<div class="hui-detail-item">
-						<div class="hui-detail-value"> {{detail.sendUserName}}邀请{{detail.message}}</div>
+						<div class="hui-detail-value">{{detail.sendUserName}}邀请{{detail.message}}</div>
 					</div>
 				</div>
 			</div>

+ 33 - 0
virgo.wzfrontend/console/src/components/message/modules/remindDetail.vue

@@ -0,0 +1,33 @@
+<template>
+	<div class="common-message">
+		<div class="message-title">{{detail.title}}</div>
+		<div class="message-date"><span>发布时间:</span><span>{{detail.sentTime}}</span></div>
+		<div class="message-content">{{detail.message}}<span class="color-blue" @click="drawer = true">查看详情>></span>
+		</div>
+		<el-drawer title="提醒详情" :visible.sync="drawer" :size="400" :append-to-body="true">
+			<detail v-if="drawer" :detailId="detailId"></detail>
+		</el-drawer>
+	</div>
+</template>
+
+<script>
+	import detail from '@/components/work/operation/remind/detail'
+	export default {
+		props: ['detail'],
+		data() {
+			return {
+				detailId: '',
+				drawer: false,
+			}
+		},
+		created() {
+			this.detailId = this.detail.dataId;
+		},
+		components: {
+			detail
+		}
+	}
+</script>
+
+<style>
+</style>

+ 7 - 6
virgo.wzfrontend/console/src/components/work/operation/remind/edit.vue

@@ -54,12 +54,13 @@
 				}, {
 					validator: (rule, value, callback) => {
 						//获取下一分钟的时间
-						const nextMinute = this.$dayjs().add(5, 'minute');
-						if (new Date(value).getTime() <= new Date(nextMinute).getTime()) {
-							callback(new Error("提醒时间应至少设置当前时间的5分钟之后"));
-						} else {
-							callback();
-						}
+						// const nextMinute = this.$dayjs().add(5, 'minute');
+						// if (new Date(value).getTime() <= new Date(nextMinute).getTime()) {
+						// 	callback(new Error("提醒时间应至少设置当前时间的5分钟之后"));
+						// } else {
+						// 	callback();
+						// }
+						callback();
 					}
 				}]
 			}

+ 11 - 1
virgo.wzfrontend/console/src/httpApi/message.js

@@ -9,7 +9,7 @@ export function getMessagePageListByQuery(currPage, pageSize, data) {
 		method: 'post',
 		data: data
 	})
-}
+}
 /* 
  * 按照类型获取未读消息统计
  * 
@@ -19,4 +19,14 @@ export function getMessageTest(userId) {
 		url: `/manager/message/countUnread/messageType/${userId}`,
 		method: 'get'
 	})
+}
+/* 
+ * 获取消息列表
+ * 
+ */
+export function getMessageList(userId, messageType) {
+	return request({
+		url: `/manager/message/messageType/${userId}/${messageType}`,
+		method: 'get'
+	})
 }

+ 8 - 2
virgo.wzfrontend/console/src/layout/components/topNav.vue

@@ -83,7 +83,10 @@
 					name: '项目工作台',
 					icon: 'huifont-xiangmugongzuotai1'
 				}],
-				systemCountStatus: false
+				systemCountStatus: false,
+				messageDrawer: false,
+				messageList: [],
+				messageIndex: 0
 			}
 		},
 		created() {
@@ -150,10 +153,13 @@
 			},
 			project() {
 				this.init();
+			},
+			chatList() {
+				this.initMessage();
 			}
 		},
 		computed: {
-			...mapGetters(['user', 'project'])
+			...mapGetters(['user', 'project', 'chatList'])
 		},
 	}
 </script>

+ 16 - 1
virgo.wzfrontend/console/src/layout/work.vue

@@ -71,6 +71,21 @@
 					badge += list[i].unread
 				}
 				this.badge = badge;
+				let systemData = data.filter(node => node.conversationId === 'system' && node.lastMessage.body.text ===
+					'1');
+				if (systemData.length === 0) return;
+				if (!systemData[0].unread) return;
+				let obj = JSON.parse(systemData[0].lastMessage.extra);
+				let notify = this.$notify.info({
+					title: this.$field.findTypeName('remindType', obj.type),
+					message: obj.content,
+					duration: 0,
+					onClick: () => {
+						notify.close();
+						this.$router.push('/message');
+					}
+				});
+				this.$chat.clearConversationUnread('system');
 			},
 			set() {
 				let list = this.$store.getters.menuData.filter(node => node.title === '系统设置');
@@ -99,7 +114,7 @@
 				this.crumbKey = !this.crumbKey;
 			},
 			chatList() {
-				this.countNumber(this.$store.getters.chatList)
+				this.countNumber(this.$store.getters.chatList || [])
 			}
 		},
 	}

+ 0 - 32
virgo.wzfrontend/console/src/uitls/chat.js

@@ -92,7 +92,6 @@ const $chat = {
 			});
 		});
 	},
-	sendImage(userId, option, success) {},
 	sendText(userId, content, success, fail) {
 		connect(() => {
 			//创建文字消息
@@ -122,7 +121,6 @@ const $chat = {
 			//监听会话列表更新
 			YeIMUniSDK.getInstance().addEventListener(YeIMUniSDKDefines.EVENT.CONVERSATION_LIST_CHANGED, (
 				list) => {
-				console.log(list);
 				store.dispatch('app/changeChatList', list);
 			});
 		})
@@ -130,36 +128,6 @@ const $chat = {
 	clearConversationUnread(conversationId) {
 		//清除指定会话未读数,并给对方发送已读回执
 		YeIMUniSDK.getInstance().clearConversationUnread(conversationId);
-	},
-	sendSystemMessage() {
-		let timestamp = (new Date()).getTime() + 86400 * 1000; //1000天后过期
-		let sign = md5('system' + timestamp + "50abd47112ebe8c5a73f4694c96a49ce");
-		login({
-			userId: 'system',
-			timestamp: timestamp,
-			sign: sign
-		}).then(res => {
-			if (res.code === 200) {
-				localStorage.setItem('systemChatToken', res.data.token);
-				sendSystem({
-					body: {
-						text: "2"
-					},
-					conversationId: "4",
-					conversationType: "private",
-					extra: "",
-					from: 'system',
-					fromUserInfo: {},
-					isDeleted: 0,
-					isRead: 0,
-					isRevoke: 0,
-					status: "unSend",
-					time: new Date().getTime(),
-					to: 1,
-					type: "text",
-				})
-			}
-		})
 	}
 }
 export default $chat;

+ 3 - 0
virgo.wzfrontend/console/src/uitls/message.js

@@ -128,6 +128,9 @@ const messageType = [{
 }, {
 	id: 6,
 	name: '项目邀请'
+}, {
+	id: 7,
+	name: '提醒消息'
 }];
 
 export default {

+ 5 - 6
virgo.wzfrontend/console/src/views/message/list.vue

@@ -1,7 +1,7 @@
 <template>
-	<div class="hui-flex hui-content">
-		<div class="hui-content-title">
-			<div class="hui-title-item active">消息通知</div>
+	<div class="hui-flex hui-content">
+		<div class="hui-content-title">
+			<div class="hui-title-item active">消息通知</div>
 		</div>
 		<div class="hui-flex-box hui-flex hui-table">
 			<div class="hui-flex-box">
@@ -31,7 +31,7 @@
 						<template slot-scope="scope">
 							<div class="hui-table-tag">
 								<div class="hui-tag">
-									<!-- <div>{{messageType(scope.row.messageType).name}}</div> -->
+									<div>{{messageType(scope.row.messageType).name}}</div>
 								</div>
 							</div>
 						</template>
@@ -101,8 +101,7 @@
 				this.item = item;
 				this.drawer = true;
 			},
-			messageType(type) {
-				console.log(this.$msg);
+			messageType(type) {
 				return this.$msg.messageType.filter(item => item.id === type)[0];
 			},
 			currentChange(pageIndex) {

+ 5 - 7
virgo.wzfrontend/console/src/views/work/operation/remind/remind.vue

@@ -26,10 +26,8 @@
 						<el-table-column label="状态">
 							<template slot-scope="scope">
 								<div class="hui-table-tag">
-									<div class="hui-tag hui-tag-info" v-if="!scope.row.status">待提醒</div>
-									<div class="hui-tag" v-else-if="scope.row.status === 1">待处理</div>
-									<div class="hui-tag hui-tag-warning" v-else-if="scope.row.status === 2">处理中</div>
-									<div class="hui-tag hui-tag-success" v-else>已处理</div>
+									<div class="hui-tag hui-tag-info" v-if="!scope.row.state">待提醒</div>
+									<div class="hui-tag" v-else>已提醒</div>
 								</div>
 							</template>
 						</el-table-column>
@@ -41,11 +39,11 @@
 										详情
 									</span>
 									<span class="table-operation" v-permission="'/work/order/clear/update'"
-										v-if="!scope.row.status" @click="updateItem(scope.row)">
+										v-if="!scope.row.state" @click="updateItem(scope.row)">
 										编辑
 									</span>
 									<span class="table-operation" v-permission="'/work/order/clear/delete'"
-										v-if="!scope.row.status" @click="deleteItem(scope.row)">
+										v-if="!scope.row.state" @click="deleteItem(scope.row)">
 										删除
 									</span>
 								</div>
@@ -68,7 +66,7 @@
 			<edit v-if="visible" @callback="callback" :isUpdate="isUpdate" :detailId="detailId" :type="type"></edit>
 		</el-dialog>
 		<el-drawer title="提醒详情" :visible.sync="drawer" :size="400" :append-to-body="true">
-			<detail v-if="drawer" :detailId="detailId" @callback="callback"></detail>
+			<detail v-if="drawer" :detailId="detailId"></detail>
 		</el-drawer>
 	</div>
 </template>

File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/console/index.html


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/console/static/css/9689.de937fcd.css


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/css/app.a1c586ea.css


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/css/app.bfd72a29.css


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/1134.1d992bbf.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/130-legacy.5b1d13ef.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/1644-legacy.4f2890f4.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/1644.32af0c49.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/23.05e76568.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/258.97fc8042.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/3022.44e92e60.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/3836-legacy.5aa8ba89.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/5259-legacy.e816308e.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/5470.c733791b.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/5641.1d511878.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/5947-legacy.3503133e.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/5947.5154d6b4.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/6439.03171513.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/6439.ec164ba5.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/6843-legacy.867bf6aa.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/6843.da17bfce.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/7402-legacy.c5653fe1.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/8554-legacy.251961ce.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/9689-legacy.4c740a56.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/9689.1db17f20.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/9696-legacy.261fcf53.js


File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/9733-legacy.d46e6f39.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/9816-legacy.a9988d70.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/9816.1d0cdf92.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/app-legacy.18998e02.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/app-legacy.b9838c1c.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/console/static/js/app.bd7c652f.js


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/console/static/js/app.f84b20d2.js