|
@@ -21,6 +21,7 @@ interface MainStoreState {
|
|
showRowNextBottomDialog: boolean
|
|
showRowNextBottomDialog: boolean
|
|
markerPausedLimit: number
|
|
markerPausedLimit: number
|
|
markerPausedWorker: any
|
|
markerPausedWorker: any
|
|
|
|
+ isRefreshInMarkerPage: boolean
|
|
}
|
|
}
|
|
|
|
|
|
interface MainStoreActions {
|
|
interface MainStoreActions {
|
|
@@ -36,6 +37,7 @@ interface MainStoreActions {
|
|
setPaneSizeConfig: (path: string, size: number) => void
|
|
setPaneSizeConfig: (path: string, size: number) => void
|
|
setRowNextBottomDialogStatus: (bool: boolean) => void
|
|
setRowNextBottomDialogStatus: (bool: boolean) => void
|
|
setMarkerPausedLimit: (time: number) => void
|
|
setMarkerPausedLimit: (time: number) => void
|
|
|
|
+ setIsRefreshInMarkerPage: (bool: boolean) => void
|
|
}
|
|
}
|
|
const useMainStore = defineStore<'main', MainStoreState, Record<string, any>, MainStoreActions>('main', {
|
|
const useMainStore = defineStore<'main', MainStoreState, Record<string, any>, MainStoreActions>('main', {
|
|
state() {
|
|
state() {
|
|
@@ -65,9 +67,13 @@ const useMainStore = defineStore<'main', MainStoreState, Record<string, any>, Ma
|
|
showRowNextBottomDialog: false,
|
|
showRowNextBottomDialog: false,
|
|
markerPausedLimit: 0,
|
|
markerPausedLimit: 0,
|
|
markerPausedWorker: null,
|
|
markerPausedWorker: null,
|
|
|
|
+ isRefreshInMarkerPage: false,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
actions: {
|
|
actions: {
|
|
|
|
+ setIsRefreshInMarkerPage(bool: boolean) {
|
|
|
|
+ this.isRefreshInMarkerPage = bool
|
|
|
|
+ },
|
|
setMarkerPausedLimit(time: number) {
|
|
setMarkerPausedLimit(time: number) {
|
|
if (time > 0 && this.markerPausedLimit == 0 && !this.markerPausedWorker) {
|
|
if (time > 0 && this.markerPausedLimit == 0 && !this.markerPausedWorker) {
|
|
this.markerPausedLimit = time
|
|
this.markerPausedLimit = time
|
|
@@ -80,6 +86,7 @@ const useMainStore = defineStore<'main', MainStoreState, Record<string, any>, Ma
|
|
if (data == 0) {
|
|
if (data == 0) {
|
|
//暂停时间结束时,页面解锁,同时销毁worker
|
|
//暂停时间结束时,页面解锁,同时销毁worker
|
|
this.markerPausedWorker && this.markerPausedWorker.terminate()
|
|
this.markerPausedWorker && this.markerPausedWorker.terminate()
|
|
|
|
+ this.markerPausedWorker = null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -114,8 +121,11 @@ const useMainStore = defineStore<'main', MainStoreState, Record<string, any>, Ma
|
|
},
|
|
},
|
|
setNewMsgs(msgData) {
|
|
setNewMsgs(msgData) {
|
|
this.newMsgs = msgData
|
|
this.newMsgs = msgData
|
|
- if (this.markerPausedLimit == 0 && location.pathname !== '/marking/mark') {
|
|
|
|
|
|
+ if (this.markerPausedLimit == 0 && (location.pathname !== '/marking/mark' || this.isRefreshInMarkerPage)) {
|
|
this.setMarkerPausedLimit(msgData.markerPausedLimit || 0)
|
|
this.setMarkerPausedLimit(msgData.markerPausedLimit || 0)
|
|
|
|
+ if (this.isRefreshInMarkerPage) {
|
|
|
|
+ this.setIsRefreshInMarkerPage(false)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async getMyUserInfo() {
|
|
async getMyUserInfo() {
|