mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-13 13:49:07 +00:00
[Update] 修改资产授权的显示字段
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
<script>
|
||||
import { DetailCard, ActiveCard } from '@/components'
|
||||
import { toSafeLocalDateStr } from '@/utils/common'
|
||||
// import { toSafeLocalDateStr } from '@/utils/common'
|
||||
|
||||
export default {
|
||||
name: 'AssetPermissionDetail',
|
||||
@@ -52,43 +52,44 @@ export default {
|
||||
},
|
||||
{
|
||||
key: this.$t('perms.UserCount'),
|
||||
value: this.getDataLength(this.object.users)
|
||||
// value: this.getDataLength(this.object.users)
|
||||
value: JSON.stringify(this.object.users_amount)
|
||||
},
|
||||
{
|
||||
key: this.$t('perms.UserGroupCount'),
|
||||
value: this.getDataLength(this.object.user_groups)
|
||||
value: JSON.stringify(this.object.assets_amount)
|
||||
},
|
||||
{
|
||||
key: this.$t('perms.AssetCount'),
|
||||
value: this.getDataLength(this.object.assets)
|
||||
value: JSON.stringify(this.object.users_amount)
|
||||
},
|
||||
{
|
||||
key: this.$t('perms.NodeCount'),
|
||||
value: this.getDataLength(this.object.nodes)
|
||||
value: JSON.stringify(this.object.nodes_amount)
|
||||
},
|
||||
{
|
||||
key: this.$t('perms.SystemUserCount'),
|
||||
value: this.getDataLength(this.object.system_users)
|
||||
value: JSON.stringify(this.object.system_users_amount)
|
||||
},
|
||||
{
|
||||
key: this.$t('perms.DateStart'),
|
||||
value: toSafeLocalDateStr(this.object.date_start)
|
||||
value: 'api没有这个字段'
|
||||
},
|
||||
{
|
||||
key: this.$t('perms.DateExpired'),
|
||||
value: toSafeLocalDateStr(this.object.date_expired)
|
||||
value: 'api没有这个字段'
|
||||
},
|
||||
{
|
||||
key: this.$t('perms.DateCreated'),
|
||||
value: '没有这个字段'
|
||||
value: this.object.date_created
|
||||
},
|
||||
{
|
||||
key: this.$t('perms.CreatedBy'),
|
||||
value: '没有这个字段'
|
||||
value: this.object.created_by
|
||||
},
|
||||
{
|
||||
key: this.$t('common.Comment'),
|
||||
value: this.object.comment
|
||||
value: 'api没有这个字段'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
AssetPermission: {
|
||||
name: '', users: '', user_groups: '', assets: '', nodes: '', system_users: '',
|
||||
name: '', users_amount: 0, user_groups_amount: 0, assets_amount: 0, nodes_amount: 0, system_users_amount: 0,
|
||||
date_start: '', date_expired: ''
|
||||
},
|
||||
config: {
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
<script>
|
||||
import GenericTreeListPage from '@/layout/components/GenericTreeListPage'
|
||||
import { LengthFormatter, ExpandAssetPermissionFormatter } from '@/components/ListTable/formatters/index'
|
||||
import { ExpandAssetPermissionFormatter } from '@/components/ListTable/formatters/index'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -35,35 +35,31 @@ export default {
|
||||
{ label: this.$t('perms.SystemUser'), key: 'system_user' },
|
||||
{ label: '继承(先占位)', key: 'all=0' }
|
||||
],
|
||||
columns: ['expand', 'name', 'users', 'user_groups', 'assets', 'nodes', 'system_users', 'is_active', 'actions'],
|
||||
columns: ['expand', 'name', 'users_amount', 'user_groups_amount', 'assets_amount', 'nodes_amount', 'system_users_amount', 'is_active', 'actions'],
|
||||
columnsMeta: {
|
||||
expand: {
|
||||
type: 'expand',
|
||||
formatter: ExpandAssetPermissionFormatter
|
||||
},
|
||||
users: {
|
||||
formatter: LengthFormatter,
|
||||
users_amount: {
|
||||
label: this.$t('perms.User')
|
||||
},
|
||||
user_groups: {
|
||||
formatter: LengthFormatter,
|
||||
user_groups_amount: {
|
||||
label: this.$t('perms.UserGroups')
|
||||
},
|
||||
assets: {
|
||||
formatter: LengthFormatter,
|
||||
assets_amount: {
|
||||
label: this.$t('perms.Asset')
|
||||
},
|
||||
nodes: {
|
||||
formatter: LengthFormatter,
|
||||
nodes_amount: {
|
||||
label: this.$t('perms.Node')
|
||||
},
|
||||
system_users: {
|
||||
formatter: LengthFormatter,
|
||||
system_users_amount: {
|
||||
label: this.$t('perms.SystemUser')
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
updateRoute: 'AssetPermissionUpdate'
|
||||
updateRoute: 'AssetPermissionUpdate',
|
||||
detailRoute: 'AssetPermissionDetail'
|
||||
}
|
||||
},
|
||||
headerActions: {
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<script>
|
||||
import AssetPermissionTree from './AssetPermissionTree'
|
||||
import AssetPermissionList from './AssetPermissionList'
|
||||
import { LengthFormatter, ExpandAssetPermissionFormatter } from '@/components/ListTable/formatters/index'
|
||||
import { ExpandAssetPermissionFormatter } from '@/components/ListTable/formatters/index'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -39,35 +39,31 @@ export default {
|
||||
{ label: this.$t('perms.SystemUser'), key: 'system_user' },
|
||||
{ label: '继承(先占位)', key: 'all=0' }
|
||||
],
|
||||
columns: ['expand', 'name', 'users', 'user_groups', 'assets', 'nodes', 'system_users', 'is_active', 'actions'],
|
||||
columns: ['expand', 'name', 'users_amount', 'user_groups_amount', 'assets_amount', 'nodes_amount', 'system_users_amount', 'is_active', 'actions'],
|
||||
columnsMeta: {
|
||||
expand: {
|
||||
type: 'expand',
|
||||
formatter: ExpandAssetPermissionFormatter
|
||||
},
|
||||
users: {
|
||||
formatter: LengthFormatter,
|
||||
users_amount: {
|
||||
label: this.$t('perms.User')
|
||||
},
|
||||
user_groups: {
|
||||
formatter: LengthFormatter,
|
||||
user_groups_amount: {
|
||||
label: this.$t('perms.UserGroups')
|
||||
},
|
||||
assets: {
|
||||
formatter: LengthFormatter,
|
||||
assets_amount: {
|
||||
label: this.$t('perms.Asset')
|
||||
},
|
||||
nodes: {
|
||||
formatter: LengthFormatter,
|
||||
nodes_amount: {
|
||||
label: this.$t('perms.Node')
|
||||
},
|
||||
system_users: {
|
||||
formatter: LengthFormatter,
|
||||
system_users_amount: {
|
||||
label: this.$t('perms.SystemUser')
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
updateRoute: 'AssetPermissionUpdate'
|
||||
updateRoute: 'AssetPermissionUpdate',
|
||||
detailRoute: 'AssetPermissionDetail'
|
||||
}
|
||||
},
|
||||
headerActions: {
|
||||
|
Reference in New Issue
Block a user