feat: 资产选择form 匹配正确的字段

This commit is contained in:
Aaron3S
2022-12-05 15:11:28 +08:00
parent 5aec4f3f44
commit 1dfe004370

View File

@@ -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 <span> {row.protocols?.toString()} </span>
const data = row.protocols.map(p => <el-tag size='mini'>{p.name}/{p.port} </el-tag>)
return <span> {data} </span>
},
label: this.$t('assets.Protocols')
}