消息修改
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
import Vue from 'vue'
|
||||
|
||||
export const Bus = new Vue()
|
||||
@@ -43,6 +43,7 @@
|
||||
// import ShowAnnouncement from './ShowAnnouncement'
|
||||
import store from '@/store/'
|
||||
import DynamicNotice from './DynamicNotice'
|
||||
import {Bus} from '@comp/tools/Bus'
|
||||
|
||||
|
||||
export default {
|
||||
@@ -85,8 +86,15 @@
|
||||
this.initWebSocket()
|
||||
// this.heartCheckFun();
|
||||
},
|
||||
created() {
|
||||
Bus.$on('notice-change', () => {
|
||||
// console.log('notice-change')
|
||||
this.loadData()
|
||||
})
|
||||
},
|
||||
destroyed: function () { // 离开页面生命周期函数
|
||||
this.websocketOnclose()
|
||||
Bus.$off('notice-change')
|
||||
},
|
||||
methods: {
|
||||
timerFun() {
|
||||
@@ -136,15 +144,25 @@
|
||||
putAction(this.url.editCementSend,{anntId:record.id}).then((res)=>{
|
||||
if(res.success){
|
||||
this.loadData()
|
||||
Bus.$emit('header-notice-change')
|
||||
}
|
||||
})
|
||||
this.hovered = false
|
||||
const param = JSON.parse(record.busId)
|
||||
if(record.openType==='component'){
|
||||
this.openPath = record.openPage
|
||||
this.formData = {id:record.busId}
|
||||
this.formData = param
|
||||
this.$refs.showDynamNotice.detail(record.openPage)
|
||||
}else{
|
||||
// this.$refs.ShowAnnouncement.detail(record);
|
||||
}else if(record.openType === 'url') {
|
||||
console.log(record.openPage,'url')
|
||||
const param = JSON.parse(record.busId)
|
||||
// 如果是url 跳转页面
|
||||
this.$router.push({
|
||||
path:record.openPage,
|
||||
query:param
|
||||
})
|
||||
}else {
|
||||
this.$refs.ShowAnnouncement.detail(record)
|
||||
}
|
||||
},
|
||||
toMyAnnouncement(){
|
||||
|
||||
Reference in New Issue
Block a user