mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-24 04:33:06 +00:00
perf 账号列表展示
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ListTable from '@/components/ListTable/index'
|
import ListTable from '@/components/ListTable/index'
|
||||||
import { ActionsFormatter, DetailFormatter, DisplayFormatter } from '@/components/TableFormatters'
|
import { ActionsFormatter, DisplayFormatter } from '@/components/TableFormatters'
|
||||||
import ShowSecretInfo from './ShowSecretInfo'
|
import ShowSecretInfo from './ShowSecretInfo'
|
||||||
import UpdateSecretInfo from './UpdateSecretInfo'
|
import UpdateSecretInfo from './UpdateSecretInfo'
|
||||||
import AddAccount from './AddAccount'
|
import AddAccount from './AddAccount'
|
||||||
@@ -85,22 +85,26 @@ export default {
|
|||||||
},
|
},
|
||||||
columnsMeta: {
|
columnsMeta: {
|
||||||
hostname: {
|
hostname: {
|
||||||
prop: 'hostname',
|
|
||||||
label: this.$t('assets.Hostname'),
|
label: this.$t('assets.Hostname'),
|
||||||
showOverflowTooltip: true,
|
showOverflowTooltip: true,
|
||||||
formatter: DetailFormatter,
|
formatter: function(row, column, cellValue, index) {
|
||||||
formatterArgs: {
|
const to = {
|
||||||
can: this.$hasPerm('assets.view_asset'),
|
|
||||||
getRoute({ row }) {
|
|
||||||
return {
|
|
||||||
name: 'AssetDetail',
|
name: 'AssetDetail',
|
||||||
params: { id: row.asset }
|
params: { id: row.asset.id }
|
||||||
}
|
}
|
||||||
|
if (vm.$hasPerm('assets.view_asset')) {
|
||||||
|
return <router-link to={ to } >{ row.asset.name }</router-link>
|
||||||
|
} else {
|
||||||
|
return <span>{ row.asset.name }</span>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ip: {
|
ip: {
|
||||||
width: '120px'
|
width: '120px',
|
||||||
|
label: this.$t('assets.ip'),
|
||||||
|
formatter: function(row, column, cellValue, index) {
|
||||||
|
return <span>{ row.asset.ip }</span>
|
||||||
|
}
|
||||||
},
|
},
|
||||||
username: {
|
username: {
|
||||||
showOverflowTooltip: true
|
showOverflowTooltip: true
|
||||||
|
Reference in New Issue
Block a user