From 6176a3e0885e712bad19e22409a45dab67816464 Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 4 Sep 2024 18:24:00 +0800 Subject: [PATCH] perf: support change gateway platform --- .../assets/Domain/DomainDetail/GatewayCreateUpdate.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/views/assets/Domain/DomainDetail/GatewayCreateUpdate.vue b/src/views/assets/Domain/DomainDetail/GatewayCreateUpdate.vue index e772013e8..1c3c614d9 100644 --- a/src/views/assets/Domain/DomainDetail/GatewayCreateUpdate.vue +++ b/src/views/assets/Domain/DomainDetail/GatewayCreateUpdate.vue @@ -11,11 +11,10 @@ export default { BaseAssetCreateUpdate }, data() { - const platformType = this.$route.query.platform_type return { url: '/api/v1/assets/gateways/', updateInitial: async(initial) => { - const url = `/api/v1/assets/platforms/?name=Gateway` + const url = `/api/v1/assets/platforms/?name__startswith=Gateway` const platform = await this.$axios.get(url) initial.platform = parseInt(platform[0].id) initial.domain = this.$route.query.domain @@ -26,11 +25,10 @@ export default { disabled: true }, platform: { - disabled: true, el: { multiple: false, ajax: { - url: `/api/v1/assets/platforms/?type=${platformType}`, + url: `/api/v1/assets/platforms/?name__startswith=Gateway`, transformOption: (item) => { return { label: item.name, value: item.id } }