mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
perf: 修改授权
This commit is contained in:
@@ -133,6 +133,10 @@ export default {
|
||||
extraQuery: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
showQuickFilters: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -151,7 +155,7 @@ export default {
|
||||
iAsset: this.asset,
|
||||
account: {},
|
||||
secretUrl: '',
|
||||
quickFilters: accountQuickFilters(this),
|
||||
quickFilters: this.showQuickFilters ? accountQuickFilters(this) : [],
|
||||
tableConfig: {
|
||||
url: this.url,
|
||||
permissions: {
|
||||
@@ -205,6 +209,11 @@ export default {
|
||||
platformAttr: 'asset.platform'
|
||||
}
|
||||
},
|
||||
asset: {
|
||||
formatter: function(row) {
|
||||
return row.asset.name
|
||||
}
|
||||
},
|
||||
username: {
|
||||
width: '120px'
|
||||
},
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</template>
|
||||
<template v-else>
|
||||
<!-- 默认插槽内容,全宽 -->
|
||||
<el-col :md="single" :sm="24">
|
||||
<el-col :md="single" :offset="(24 - single)/2" :sm="24">
|
||||
<slot />
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
<AccountListTable
|
||||
ref="ListTable"
|
||||
:asset="object"
|
||||
:columns-default="columns"
|
||||
:has-clone="false"
|
||||
:has-column-actions="false"
|
||||
:has-delete-action="false"
|
||||
:has-export="false"
|
||||
:has-import="false"
|
||||
:has-left-actions="false"
|
||||
:show-quick-filters="false"
|
||||
:url="url"
|
||||
/>
|
||||
</template>
|
||||
<template #right>
|
||||
<IBox :title="$tc('Account')" type="primary">
|
||||
<AccountFormatter
|
||||
:assets="assetIds"
|
||||
@@ -54,7 +54,8 @@ export default {
|
||||
relation: {
|
||||
disabled: false,
|
||||
username: ''
|
||||
}
|
||||
},
|
||||
columns: ['name', 'username', 'secret', 'asset']
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
@@ -20,7 +20,7 @@ import Page from '@/layout/components/Page'
|
||||
import AssetTreeTable from '@/components/Apps/AssetTreeTable'
|
||||
import PermBulkUpdateDialog from './components/PermBulkUpdateDialog'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { AssetPermissionListPageSearchConfigOptions, AssetPermissionTableMeta } from '../const'
|
||||
import { AssetPermissionListPageSearchConfigOptions, AssetPermissionTableMeta } from '../const.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -41,9 +41,16 @@ export default {
|
||||
is_valid: false
|
||||
}
|
||||
},
|
||||
{
|
||||
label: this.$t('Valid'),
|
||||
filter: {
|
||||
is_valid: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: this.$t('Expired'),
|
||||
filter: {
|
||||
is_expired: true
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -55,7 +62,7 @@ export default {
|
||||
{
|
||||
label: this.$t('NoResource'),
|
||||
filter: {
|
||||
no_resource: true
|
||||
is_no_resource: true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -35,7 +35,8 @@ export const AssetPermissionTableMeta = {
|
||||
name: {
|
||||
minWidth: '120px',
|
||||
formatterArgs: {
|
||||
route: 'AssetPermissionDetail'
|
||||
route: 'AssetPermissionDetail',
|
||||
drawer: true
|
||||
}
|
||||
},
|
||||
action: {
|
||||
@@ -65,6 +66,7 @@ export const AssetPermissionTableMeta = {
|
||||
formatterArgs: {
|
||||
async: true,
|
||||
route: 'AssetPermissionDetail',
|
||||
drawer: true,
|
||||
routeQuery: {
|
||||
tab: 'AssetPermissionUser'
|
||||
}
|
||||
@@ -75,6 +77,7 @@ export const AssetPermissionTableMeta = {
|
||||
formatter: AmountFormatter,
|
||||
formatterArgs: {
|
||||
async: true,
|
||||
drawer: true,
|
||||
route: 'AssetPermissionDetail',
|
||||
routeQuery: {
|
||||
tab: 'AssetPermissionUser'
|
||||
@@ -85,6 +88,7 @@ export const AssetPermissionTableMeta = {
|
||||
formatter: AmountFormatter,
|
||||
formatterArgs: {
|
||||
async: true,
|
||||
drawer: true,
|
||||
route: 'AssetPermissionDetail',
|
||||
routeQuery: {
|
||||
tab: 'AssetPermissionAsset'
|
||||
@@ -96,6 +100,7 @@ export const AssetPermissionTableMeta = {
|
||||
formatter: AmountFormatter,
|
||||
formatterArgs: {
|
||||
async: true,
|
||||
drawer: true,
|
||||
route: 'AssetPermissionDetail',
|
||||
routeQuery: {
|
||||
tab: 'AssetPermissionAsset'
|
||||
@@ -106,6 +111,7 @@ export const AssetPermissionTableMeta = {
|
||||
formatter: AmountFormatter,
|
||||
formatterArgs: {
|
||||
cellValueToRemove: ['@SPEC'],
|
||||
drawer: true,
|
||||
getItem(item) {
|
||||
if (item !== '@SPEC') {
|
||||
return AccountLabelMapper[item] || item
|
||||
|
||||
Reference in New Issue
Block a user