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