File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -311,6 +311,10 @@ const initPage = () => {
311
311
activeValue .value = window .sessionStorage .getItem (' activeValue' )
312
312
}
313
313
setTab (route)
314
+ if (window .sessionStorage .getItem (' needCloseAll' ) === ' true' ) {
315
+ closeAll ()
316
+ window .sessionStorage .removeItem (' needCloseAll' )
317
+ }
314
318
}
315
319
initPage ()
316
320
Original file line number Diff line number Diff line change @@ -118,9 +118,9 @@ import { setUserAuthority } from '@/api/user'
118
118
import { emitter } from ' @/utils/bus.js'
119
119
import { computed , ref , onMounted , nextTick } from ' vue'
120
120
import { useRouter , useRoute } from ' vue-router'
121
- import { useUserStore } from ' @/pinia/modules/user'
122
121
import { useRouterStore } from ' @/pinia/modules/router'
123
122
import { fmtTitle } from ' @/utils/fmtRouterTitle'
123
+ import { useUserStore } from ' @/pinia/modules/user'
124
124
125
125
const router = useRouter ()
126
126
const route = useRoute ()
@@ -202,10 +202,8 @@ const changeUserAuth = async(id) => {
202
202
authorityId: id
203
203
})
204
204
if (res .code === 0 ) {
205
- emitter .emit (' closeAllPage' )
206
- setTimeout (() => {
207
- window .location .reload ()
208
- }, 50 )
205
+ window .sessionStorage .setItem (' needCloseAll' , ' true' )
206
+ window .location .reload ()
209
207
}
210
208
}
211
209
You can’t perform that action at this time.
0 commit comments