mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-28 11:24:25 +00:00
perf: 修改 Domain 列表页面
This commit is contained in:
parent
2ec9c02d0c
commit
bef1e8f49a
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { GenericListPage } from '@/layout/components'
|
import { GenericListPage } from '@/layout/components'
|
||||||
import { DetailFormatter } from '@/components/TableFormatters'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -15,28 +14,26 @@ export default {
|
|||||||
tableConfig: {
|
tableConfig: {
|
||||||
url: '/api/v1/assets/domains/',
|
url: '/api/v1/assets/domains/',
|
||||||
columns: [
|
columns: [
|
||||||
'name', 'asset_count', 'application_count', 'gateway_count', 'date_created',
|
'name', 'asset_count', 'gateway_count', 'comment',
|
||||||
'comment', 'org_name', 'actions'
|
'date_created', 'org_name', 'actions'
|
||||||
],
|
],
|
||||||
columnsShow: {
|
columnsShow: {
|
||||||
min: ['name', 'actions'],
|
min: ['name', 'actions'],
|
||||||
default: ['name', 'asset_count', 'application_count', 'gateway_count', 'comment', 'actions']
|
default: ['name', 'asset_count', 'gateway_count', 'comment', 'actions']
|
||||||
},
|
},
|
||||||
columnsMeta: {
|
columnsMeta: {
|
||||||
asset_count: {
|
asset_count: {
|
||||||
label: this.$t('assets.Assets')
|
prop: 'assets',
|
||||||
},
|
label: this.$t('assets.Assets'),
|
||||||
application_count: {
|
formatter: function(row) {
|
||||||
label: this.$t('assets.Applications')
|
return <span> { row.assets.length } </span>
|
||||||
|
}
|
||||||
},
|
},
|
||||||
gateway_count: {
|
gateway_count: {
|
||||||
|
prop: 'gateways',
|
||||||
label: this.$t('assets.Gateway'),
|
label: this.$t('assets.Gateway'),
|
||||||
formatter: DetailFormatter,
|
formatter: function(row) {
|
||||||
formatterArgs: {
|
return <span> { row.gateways.length } </span>
|
||||||
permissions: 'assets.view_gateway',
|
|
||||||
routeQuery: {
|
|
||||||
activeTab: 'GatewayList'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user