mirror of
https://github.com/jumpserver/lina.git
synced 2025-07-17 16:51:16 +00:00
[Update] 修改网域列表组件
This commit is contained in:
parent
4140801eee
commit
13b9449645
@ -1,57 +1,50 @@
|
||||
<template>
|
||||
<Page>
|
||||
<template slot="content">
|
||||
<el-alert type="success"> 这里是一个成功的文案 </el-alert>
|
||||
<el-card>
|
||||
<tables v-bind="tableConfig" />
|
||||
</el-card>
|
||||
</template>
|
||||
</Page>
|
||||
<GenericListPage :table-config="tableConfig" :header-actions="headerActions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Page } from '@/layout/components'
|
||||
import Tables from '@/components/ListTable/index'
|
||||
import { getDomainList } from '@/api/asset'
|
||||
import { GenericListPage } from '@/layout/components'
|
||||
import DetailFormatter from '@/components/DataTable/formatters/DetailFormatter'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Page,
|
||||
Tables
|
||||
GenericListPage
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showTree: true,
|
||||
tableConfig: {
|
||||
getData: getDomainList,
|
||||
hasSelect: true,
|
||||
url: '/api/v1/assets/domains/',
|
||||
columns: [
|
||||
{
|
||||
prop: 'name',
|
||||
label: this.$t('common.name'),
|
||||
key: 'name',
|
||||
link: 'DomainDetail',
|
||||
sortable: true
|
||||
label: this.$t('assets.name'),
|
||||
formatter: DetailFormatter,
|
||||
sortable: true,
|
||||
route: 'DomainDetail'
|
||||
},
|
||||
{
|
||||
prop: 'asset',
|
||||
label: this.$t('assets.asset'),
|
||||
key: 'asset_count'
|
||||
prop: 'asset_count',
|
||||
label: this.$t('assets.asset')
|
||||
},
|
||||
{
|
||||
prop: 'gateway',
|
||||
label: this.$t('assets.gateway'),
|
||||
key: 'gateway_count'
|
||||
prop: 'gateway_count',
|
||||
label: this.$t('assets.gateway')
|
||||
},
|
||||
{
|
||||
prop: 'comment',
|
||||
label: this.$t('assets.comment'),
|
||||
key: 'comment'
|
||||
label: this.$t('assets.comment')
|
||||
}
|
||||
],
|
||||
action: {
|
||||
hasEdit: 'DomainEdit',
|
||||
newClick: 'DomainEdit'
|
||||
tableActions: {
|
||||
hasEdit: true,
|
||||
editRoute: '404'
|
||||
}
|
||||
},
|
||||
headerActions: {
|
||||
hasDelete: false,
|
||||
hasUpdate: false,
|
||||
createRoute: 'DomainCreate'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user