| | |
| | | import "./assets/icons"; |
| | | import "./permission"; |
| | | import { getDicts } from "@/api/system/dict/data"; |
| | | import { getConfigKey, yidu } from "@/api/system/config"; |
| | | import { getConfigKey,yidu } from "@/api/system/config"; |
| | | import { |
| | | parseTime, |
| | | resetForm, |
| | |
| | | }; |
| | | |
| | | // 全局通知方法,添加“已读”按钮 |
| | | Vue.prototype.$showNotification = function (type, title, message, onClick, noticeId) { |
| | | Vue.prototype.$showNotification = function (type, title, message, onClick, noticeId) { |
| | | console.log('触发通知:', { type, title, message, noticeId, noticeIdType: typeof noticeId }); // 调试:记录 noticeId 和类型 |
| | | const h = this.$createElement; |
| | | const notification = this.$notify({ |
| | |
| | | notificationManager.addNotification(notification); // 添加到通知管理 |
| | | }; |
| | | |
| | | |
| | | // 监听路由变化 |
| | | router.afterEach(() => { |
| | | console.log('路由切换完成,当前路径:', router.currentRoute.path); |
| | |
| | | router, |
| | | store, |
| | | render: (h) => h(App), |
| | | mounted() { |
| | | mounted() { |
| | | const token = store.state.user.token || Cookies.get('token') || ''; |
| | | if (token && !isWebSocketInitialized) { |
| | | console.log('初始化 WebSocket,Token:', token); |