From b3661292cb6fe99f1c63600c5bb2415cbcf69636 Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Tue, 21 Apr 2026 18:48:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=92=88=E5=AF=B9=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=88=B0=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E5=AF=BC=E8=87=B4=E4=B8=80=E7=9B=B4=E8=BD=AC=E5=9C=88?= =?UTF-8?q?=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.js | 2 +- src/views/user/user-table/index.vue | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/permission.js b/src/permission.js index b832f73..98ff92b 100644 --- a/src/permission.js +++ b/src/permission.js @@ -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 diff --git a/src/views/user/user-table/index.vue b/src/views/user/user-table/index.vue index 5ddb2c2..81e9029 100644 --- a/src/views/user/user-table/index.vue +++ b/src/views/user/user-table/index.vue @@ -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(() => {