西海岸-管理后台打开后,新提一个流程、操作一个流程,回到后台管理统计数字有误,缺少刷新,切换菜单也不能刷新
This commit is contained in:
parent
6734eafbdd
commit
09edc0fb05
|
@ -1,8 +1,8 @@
|
|||
<!--
|
||||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-04-11 10:11:40
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-08-25 14:51:36
|
||||
* @LastEditors: Light
|
||||
* @LastEditTime: 2022-12-29 09:59:52
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
|
@ -39,7 +39,8 @@
|
|||
window.SITE_CONFIG['previewUrl'] = _global.config.previewUrl;
|
||||
window.SITE_CONFIG['apiURL'] = _global.config.apiURL;
|
||||
// WebSocket地址
|
||||
window.SITE_CONFIG['socketURL'] =_global.config.socketURL;
|
||||
// window.SITE_CONFIG['socketURL'] =_global.config.socketURL;
|
||||
window.SITE_CONFIG['websocketURL'] = _global.config.websocketURL
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -105,8 +105,9 @@ import { messages } from '@/i18n'
|
|||
import screenfull from 'screenfull'
|
||||
import UpdatePassword from './main-navbar-update-password'
|
||||
import { clearLoginInfo } from '@/utils'
|
||||
// import Cookies from 'js-cookie'
|
||||
// var socket = null
|
||||
import Cookies from 'js-cookie'
|
||||
import bus from '@/views/bus.js'
|
||||
var socket = null
|
||||
export default {
|
||||
inject: ['refresh'],
|
||||
data () {
|
||||
|
@ -120,29 +121,38 @@ export default {
|
|||
UpdatePassword
|
||||
},
|
||||
created () {
|
||||
// var vue = this
|
||||
// socket = new WebSocket(`${window.SITE_CONFIG['socketURL']}?token=${Cookies.get('token')}`)
|
||||
// socket.onopen = function () {}
|
||||
// socket.onerror = function () {
|
||||
// vue.$notify.error({
|
||||
// title: vue.$t('notice.disconnect'),
|
||||
// message: vue.$t('notice.disconnectMessage')
|
||||
// })
|
||||
// }
|
||||
// socket.onmessage = function (evt) {
|
||||
// const result = JSON.parse(evt.data)
|
||||
|
||||
// // 如果是有新文本通知,则提示有新通知
|
||||
// if (result.type === 0) {
|
||||
// vue.messageTip = true
|
||||
// vue.$notify({
|
||||
// title: vue.$t('notice.new'),
|
||||
// message: result.msg,
|
||||
// type: 'info',
|
||||
// duration: 5000
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
const that = this
|
||||
socket = new WebSocket(`${window.SITE_CONFIG.websocketURL}?token=${Cookies.get('ucsToken')}`)
|
||||
socket.onopen = function () {}
|
||||
socket.onerror = function () {}
|
||||
socket.onmessage = function (res) {
|
||||
switch (that.$route.name) {
|
||||
case 'myAgent-CompetencyApplication':
|
||||
console.log('websocket,11')
|
||||
bus.$emit('competencyApplicationInit')
|
||||
break
|
||||
case 'myAgent-AbilityResourceShelf':
|
||||
console.log('websocket,22')
|
||||
bus.$emit('abilityResourceShelfInit')
|
||||
break
|
||||
case 'myAgent-ApplicationforCompetencyRequirements':
|
||||
console.log('websocket,33')
|
||||
bus.$emit('applicationforRequirementsInit')
|
||||
break
|
||||
case 'myAgent-AbilityResourcesRemoved':
|
||||
console.log('websocket,44')
|
||||
bus.$emit('AbilityResourcesRemovedInit')
|
||||
break
|
||||
case 'myAgent-CommentModeration':
|
||||
console.log('websocket,55')
|
||||
bus.$emit('commentInit')
|
||||
break
|
||||
case 'activiti-RoomExamineAdmin':
|
||||
console.log('websocket,66')
|
||||
bus.$emit('roomExamineAdminInit')
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// 未读通知数
|
||||
this.getUnReadCount()
|
||||
|
|
|
@ -215,6 +215,7 @@
|
|||
</el-card>
|
||||
</template>
|
||||
<script>
|
||||
import bus from '@/views/bus.js'
|
||||
import Cookies from 'js-cookie'
|
||||
export default {
|
||||
data () {
|
||||
|
@ -248,6 +249,13 @@ export default {
|
|||
roomNameA: ''
|
||||
}
|
||||
},
|
||||
created () {
|
||||
bus.$off('roomExamineAdminInit')
|
||||
bus.$on('roomExamineAdminInit', () => {
|
||||
this.getSerach()
|
||||
bus.$emit('updateTaskNum')
|
||||
})
|
||||
},
|
||||
mounted () {
|
||||
this.getSerach()
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue