[Update] 组织列表页面只显示名称和备注,删掉多余的fields

This commit is contained in:
jym503558564
2020-05-21 15:40:02 +08:00
parent 62221f9cce
commit 17366886df
2 changed files with 1 additions and 86 deletions

View File

@@ -1,38 +0,0 @@
<template>
<el-popover
placement="bottom"
trigger="click"
>
<span v-for="item in getCellValue" :key="item">{{ item }} <br></span>
<el-button slot="reference" type="text">{{ getCellValueLength }}</el-button>
</el-popover>
</template>
<script>
import BaseFormatter from '@/components/ListTable/formatters/base'
export default {
name: 'LengthFormatter',
extends: BaseFormatter,
data() {
return {
visible: false,
dataContent: this.cellValue
}
},
computed: {
getCellValueLength() {
if (this.cellValue instanceof Array) {
return this.cellValue.length
}
return this.cellValue
},
getCellValue() {
return this.cellValue
}
}
}
</script>
<style scoped>
</style>

View File

@@ -4,7 +4,6 @@
<script>
import { GenericListPage } from '@/layout/components'
import OrgFieldsFormatter from './OrgFieldsFormatter'
export default {
components: {
@@ -14,53 +13,7 @@ export default {
return {
tableConfig: {
url: '/api/v1/orgs/orgs/',
columns: [
'name', 'admins', 'auditors', 'users', 'user_groups', 'assets', 'domains',
'admin_users', 'system_users', 'labels', 'perms', 'comment', 'actions'
],
columnsMeta: {
admins: {
label: this.$t('xpack.Admin'),
formatter: OrgFieldsFormatter
},
auditors: {
label: this.$t('xpack.Auditor'),
formatter: OrgFieldsFormatter
},
users: {
label: this.$t('xpack.User'),
formatter: OrgFieldsFormatter
},
user_groups: {
label: this.$t('xpack.UserGroup'),
formatter: OrgFieldsFormatter
},
assets: {
label: this.$t('xpack.Asset'),
formatter: OrgFieldsFormatter
},
domains: {
label: this.$t('xpack.Domain'),
formatter: OrgFieldsFormatter
},
admin_users: {
label: this.$t('xpack.AdminUser'),
formatter: OrgFieldsFormatter
},
system_users: {
label: this.$t('xpack.SystemUser'),
formatter: OrgFieldsFormatter
},
labels: {
label: this.$t('xpack.Admin'),
formatter: OrgFieldsFormatter
},
perms: {
label: this.$t('xpack.Label'),
formatter: OrgFieldsFormatter
}
},
detailRoute: 'OrganizationDetail'
columns: ['name', 'comment', 'actions']
},
headerActions: {
hasExport: false,