mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-20 02:31:43 +00:00
feat: 资产选择form 匹配正确的字段
This commit is contained in:
@@ -92,7 +92,7 @@ export default {
|
|||||||
select2Config: select2Config,
|
select2Config: select2Config,
|
||||||
dialogSelect2Config: select2Config,
|
dialogSelect2Config: select2Config,
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
url: '/api/v1/assets/assets/?fields_size=mini',
|
url: '/api/v1/assets/assets/',
|
||||||
hasTree: true,
|
hasTree: true,
|
||||||
hasSelection: false,
|
hasSelection: false,
|
||||||
canSelect: this.canSelect,
|
canSelect: this.canSelect,
|
||||||
@@ -114,19 +114,23 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'ip',
|
prop: 'address',
|
||||||
label: this.$t('assets.ipDomain'),
|
label: this.$t('assets.ipDomain'),
|
||||||
sortable: 'custom'
|
sortable: 'custom'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'platform',
|
prop: 'platform',
|
||||||
label: this.$t('assets.Platform'),
|
label: this.$t('assets.Platform'),
|
||||||
sortable: true
|
sortable: true,
|
||||||
|
formatter: function(row) {
|
||||||
|
return row.platform.name
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'protocols',
|
prop: 'protocols',
|
||||||
formatter: function(row) {
|
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')
|
label: this.$t('assets.Protocols')
|
||||||
}
|
}
|
||||||
@@ -199,15 +203,15 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss' scoped>
|
<style lang='scss' scoped>
|
||||||
.el-select {
|
.el-select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page ::v-deep .page-heading {
|
.page ::v-deep .page-heading {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-dialog__wrapper ::v-deep .el-dialog__body {
|
.el-dialog__wrapper ::v-deep .el-dialog__body {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
.tree-table {
|
.tree-table {
|
||||||
@@ -223,10 +227,10 @@ export default {
|
|||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.page ::v-deep .treebox {
|
.page ::v-deep .treebox {
|
||||||
height: inherit !important;
|
height: inherit !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
Reference in New Issue
Block a user