fix: 针对刷新页面获取不到系统导致一直转圈的处理
This commit is contained in:
parent
628879f602
commit
b3661292cb
@ -54,7 +54,7 @@ router.beforeEach(async(to, from, next) => {
|
||||
}).catch(err => {
|
||||
console.error(err)
|
||||
})
|
||||
store.dispatch('user/buttonPermissions')
|
||||
await store.dispatch('user/buttonPermissions')
|
||||
next()
|
||||
} catch (error) {
|
||||
// remove token and go to login page to re-login
|
||||
|
||||
@ -966,6 +966,7 @@ export default {
|
||||
allCountryList: [],
|
||||
rangeDate: "",
|
||||
listLoading: true,
|
||||
hasInitializedSysOrigin: false,
|
||||
searchLoading: false,
|
||||
clickUserId: "",
|
||||
|
||||
@ -994,17 +995,23 @@ export default {
|
||||
this.listQuery.startCreateDate = "";
|
||||
this.listQuery.endCreateDate = "";
|
||||
}
|
||||
},
|
||||
permissionsSysOriginPlatforms: {
|
||||
immediate: true,
|
||||
handler(newVal) {
|
||||
if (this.hasInitializedSysOrigin || !newVal || newVal.length <= 0) {
|
||||
return;
|
||||
}
|
||||
const querySystem = newVal[0];
|
||||
this.hasInitializedSysOrigin = true;
|
||||
this.listQuery.sysOrigins = [querySystem.value];
|
||||
this.renderData(true);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
const that = this;
|
||||
const querySystem = this.permissionsSysOriginPlatforms[0];
|
||||
if (!querySystem) {
|
||||
return;
|
||||
}
|
||||
that.listQuery.sysOrigins = [querySystem.value];
|
||||
that.renderData(true);
|
||||
// that.loadCountryAlls()
|
||||
this.loadOpenCountry();
|
||||
setTimeout(() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user