diff --git a/src/views/accounts/AccountChangeSecret/Executions/AccountChangeSecretExecutionList.vue b/src/views/accounts/AccountChangeSecret/Executions/AccountChangeSecretExecutionList.vue index deb777321..0a37736c8 100644 --- a/src/views/accounts/AccountChangeSecret/Executions/AccountChangeSecretExecutionList.vue +++ b/src/views/accounts/AccountChangeSecret/Executions/AccountChangeSecretExecutionList.vue @@ -16,8 +16,9 @@ export default { BaseExecutionList }, data() { + const params = new URLSearchParams(this.$route.params).toString() return { - url: '/api/v1/accounts/change-secret-executions/', + url: `/api/v1/accounts/change-secret-executions/?${params}`, detailRoute: 'AccountChangeSecretExecutionDetail', automationRoute: 'AccountChangeSecretDetail', resource: 'changesecretexecution' diff --git a/src/views/accounts/AccountChangeSecret/Overview/CardSummary.vue b/src/views/accounts/AccountChangeSecret/Overview/CardSummary.vue index 9088e707e..7400b0be9 100644 --- a/src/views/accounts/AccountChangeSecret/Overview/CardSummary.vue +++ b/src/views/accounts/AccountChangeSecret/Overview/CardSummary.vue @@ -52,7 +52,14 @@ export default { canDirect: true, count: this.data.total_count_change_secrets, callback: () => { - this.$eventBus.$emit('change-tab', 'AccountChangeSecretList') + this.$eventBus.$emit('change-tab', + { + name: 'AccountChangeSecretList', + payload: { + days: this.days + } + } + ) } } }, @@ -78,7 +85,12 @@ export default { canDirect: true, count: this.data.total_count_change_secret_executions, callback: () => { - this.$eventBus.$emit('change-tab', 'AccountChangeSecretExecutionList') + this.$eventBus.$emit('change-tab', { + name: 'AccountChangeSecretExecutionList', + payload: { + days: this.days + } + }) } } }, diff --git a/src/views/accounts/AccountChangeSecret/index.vue b/src/views/accounts/AccountChangeSecret/index.vue index 39dc8c014..a3b6adebe 100644 --- a/src/views/accounts/AccountChangeSecret/index.vue +++ b/src/views/accounts/AccountChangeSecret/index.vue @@ -53,8 +53,9 @@ export default { this.$eventBus.$off('change-tab', this.handleChangeTab) }, methods: { - handleChangeTab(tab) { - this.config.activeMenu = tab + handleChangeTab({ name, payload }) { + this.config.activeMenu = name + Object.assign(this.$route.params, { ...payload }) } } } diff --git a/src/views/assets/Domain/DomainDetail/GatewayList.vue b/src/views/assets/Domain/DomainDetail/GatewayList.vue index dd6bad0c9..f46774f98 100644 --- a/src/views/assets/Domain/DomainDetail/GatewayList.vue +++ b/src/views/assets/Domain/DomainDetail/GatewayList.vue @@ -51,6 +51,11 @@ export default { createDrawer: () => import('@/views/assets/Domain/DomainDetail/GatewayCreateUpdate.vue'), detailDrawer: () => import('@/views/assets/Asset/AssetDetail'), transObject: {}, + testConfig: { + port: 0, + visible: false, + cell: '' + }, tableConfig: { url: `/api/v1/assets/gateways/?domain=${this.object.id}`, columnsExclude: [ @@ -133,13 +138,13 @@ export default { can: this.$hasPerm('assets.test_assetconnectivity') && !this.$store.getters.currentOrgIsRoot, title: this.$t('TestConnection'), callback: function(val) { - this.visible = true + vm.testConfig.visible = true const port = val.row.protocols.find(item => item.name === 'ssh').port if (!port) { return this.$message.error(this.$tc('BadRequestErrorMsg')) } else { - this.port = port - this.cell = val.row.id + vm.testConfig.port = port + vm.testConfig.cell = val.row.id } }.bind(this) } @@ -205,11 +210,6 @@ export default { vm.$refs.ListTable.onCreate() } }, - testConfig: { - port: 0, - visible: false, - cell: '' - }, addGatewaySetting: { addGatewayDialogVisible: false }