mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-05 08:51:41 +00:00
[Update] 组织列表页面只显示名称和备注,删掉多余的fields
This commit is contained in:
@@ -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>
|
|
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { GenericListPage } from '@/layout/components'
|
import { GenericListPage } from '@/layout/components'
|
||||||
import OrgFieldsFormatter from './OrgFieldsFormatter'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -14,53 +13,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
url: '/api/v1/orgs/orgs/',
|
url: '/api/v1/orgs/orgs/',
|
||||||
columns: [
|
columns: ['name', 'comment', 'actions']
|
||||||
'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'
|
|
||||||
},
|
},
|
||||||
headerActions: {
|
headerActions: {
|
||||||
hasExport: false,
|
hasExport: false,
|
||||||
|
Reference in New Issue
Block a user