From 1dfe004370b7caecb6871ad0dd482d4fe725b8d0 Mon Sep 17 00:00:00 2001 From: Aaron3S Date: Mon, 5 Dec 2022 15:11:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B5=84=E4=BA=A7=E9=80=89=E6=8B=A9for?= =?UTF-8?q?m=20=E5=8C=B9=E9=85=8D=E6=AD=A3=E7=A1=AE=E7=9A=84=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AssetSelect/index.vue | 54 +++++++++++++++------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/src/components/AssetSelect/index.vue b/src/components/AssetSelect/index.vue index 8df5a580c..afac172e9 100644 --- a/src/components/AssetSelect/index.vue +++ b/src/components/AssetSelect/index.vue @@ -92,7 +92,7 @@ export default { select2Config: select2Config, dialogSelect2Config: select2Config, tableConfig: { - url: '/api/v1/assets/assets/?fields_size=mini', + url: '/api/v1/assets/assets/', hasTree: true, hasSelection: false, canSelect: this.canSelect, @@ -114,19 +114,23 @@ export default { } }, { - prop: 'ip', + prop: 'address', label: this.$t('assets.ipDomain'), sortable: 'custom' }, { prop: 'platform', label: this.$t('assets.Platform'), - sortable: true + sortable: true, + formatter: function(row) { + return row.platform.name + } }, { prop: 'protocols', formatter: function(row) { - return {row.protocols?.toString()} + const data = row.protocols.map(p => {p.name}/{p.port} ) + return {data} }, label: this.$t('assets.Protocols') } @@ -199,34 +203,34 @@ export default {