|
|
@@ -49,9 +49,8 @@
|
|
|
</div>
|
|
|
<el-drawer :append-to-body="true" size="35%" title="消息中心" :with-header="false" :title="msg.title"
|
|
|
:visible.sync="msg.open">
|
|
|
- <msg ref="msg" @update-count="getMsgCount" />
|
|
|
+ <msg ref="msg" @update-count="getMsgCount" @close="closeMsg" />
|
|
|
</el-drawer>
|
|
|
-
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -90,6 +89,7 @@ export default {
|
|
|
msgPollingTimer: null, // 轮询定时器
|
|
|
};
|
|
|
},
|
|
|
+
|
|
|
created() {
|
|
|
this.getDoctor();
|
|
|
this.getMsgCount();
|
|
|
@@ -156,6 +156,7 @@ export default {
|
|
|
|
|
|
// 如果消息计数增加了,显示通知弹框
|
|
|
if (this.msgCount > this.previousMsgCount && this.msgCount > 0) {
|
|
|
+
|
|
|
this.$notify({
|
|
|
title: '提示',
|
|
|
message: '您有' + this.msgCount + "条消息通知",
|
|
|
@@ -178,6 +179,9 @@ export default {
|
|
|
// 打开消息后重新获取消息计数来更新角标
|
|
|
this.getMsgCount();
|
|
|
},
|
|
|
+ closeMsg(){
|
|
|
+ this.msg.open = false;
|
|
|
+ },
|
|
|
getDoctor() {
|
|
|
getDoctorDetails().then(response => {
|
|
|
this.doctor = response.data;
|