|
@@ -6,7 +6,8 @@ import { tansParams, blobValidate } from '@/utils/ruoyi'
|
|
import cache from '@/plugins/cache'
|
|
import cache from '@/plugins/cache'
|
|
import { saveAs } from 'file-saver'
|
|
import { saveAs } from 'file-saver'
|
|
import useUserStore from '@/store/modules/user'
|
|
import useUserStore from '@/store/modules/user'
|
|
-import notification from '../views/dialog/notification.vue'
|
|
|
|
|
|
+// import notification from '../views/dialog/notification.vue'
|
|
|
|
+import emitter from '../eventBus'
|
|
// import { getCurrentInstance } from 'vue';
|
|
// import { getCurrentInstance } from 'vue';
|
|
// import { reject } from 'lodash-es'
|
|
// import { reject } from 'lodash-es'
|
|
|
|
|
|
@@ -49,7 +50,7 @@ service.interceptors.request.use(
|
|
let requestable = true
|
|
let requestable = true
|
|
let notifications = []
|
|
let notifications = []
|
|
// 当登录状态为已登录时才可以获取公告
|
|
// 当登录状态为已登录时才可以获取公告
|
|
- console.log(config)
|
|
|
|
|
|
+ // console.log(config)
|
|
if (getToken() && !isToken && tenantInfo && config.url != '/ezhizao-dms-sys/getInfo' && config.url != '/ezhizao-dms-sys/getRouters') {
|
|
if (getToken() && !isToken && tenantInfo && config.url != '/ezhizao-dms-sys/getInfo' && config.url != '/ezhizao-dms-sys/getRouters') {
|
|
// 所有条件都具备的情况下需先请求公告
|
|
// 所有条件都具备的情况下需先请求公告
|
|
let url = import.meta.env.VITE_APP_BASE_API + '/business/notification/getUnshowedNotification'
|
|
let url = import.meta.env.VITE_APP_BASE_API + '/business/notification/getUnshowedNotification'
|
|
@@ -236,6 +237,9 @@ export function downloadPdf(url, params, filename, config) {
|
|
}
|
|
}
|
|
|
|
|
|
function showDialog(message) {
|
|
function showDialog(message) {
|
|
|
|
+ // console.log(message, emitter)
|
|
|
|
+ emitter.emit('show-dialog', message)
|
|
|
|
+ console.log(emitter)
|
|
// const instance = getCurrentInstance();
|
|
// const instance = getCurrentInstance();
|
|
// console.log(instance)
|
|
// console.log(instance)
|
|
// if (instance && instance.proxy && instance.proxy.showNotification) {
|
|
// if (instance && instance.proxy && instance.proxy.showNotification) {
|