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