mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-25 14:25:23 +00:00
Merge branch 'pam' of github.com:jumpserver/lina into pam
This commit is contained in:
@@ -121,11 +121,6 @@ export const accountFieldsMeta = (vm) => {
|
||||
el: {
|
||||
multiple: false,
|
||||
clearable: true,
|
||||
disabled: {
|
||||
get disabled() {
|
||||
return vm.isDisabled
|
||||
}
|
||||
},
|
||||
ajax: {
|
||||
url: `/api/v1/accounts/accounts/su-from-accounts/?account=${vm.account?.id || ''}&asset=${vm.asset?.id || ''}`,
|
||||
transformOption: (item) => {
|
||||
|
@@ -297,14 +297,13 @@ export default {
|
||||
can: () => {
|
||||
return vm.$hasPerm('accounts.add_account') && !this.$store.getters.currentOrgIsRoot
|
||||
},
|
||||
callback: async() => {
|
||||
await this.getAssetDetail()
|
||||
callback: () => {
|
||||
setTimeout(() => {
|
||||
vm.iAsset = this.asset
|
||||
vm.account = {}
|
||||
vm.addTemplate = false
|
||||
vm.showAddDialog = true
|
||||
})
|
||||
// this.iAsset = {}
|
||||
// this.account = {}
|
||||
this.addTemplate = false
|
||||
this.showAddDialog = true
|
||||
}, 200)
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@@ -7,6 +7,7 @@
|
||||
<script>
|
||||
import { DrawerListTable as ListTable } from '@/components'
|
||||
import { toM2MJsonParams } from '@/utils/jms'
|
||||
import { DetailFormatter } from '@/components/Table/TableFormatters'
|
||||
import TwoCol from '@/layout/components/Page/TwoColPage.vue'
|
||||
|
||||
export default {
|
||||
@@ -41,15 +42,10 @@ export default {
|
||||
columnsMeta: {
|
||||
name: {
|
||||
label: this.$t('Asset'),
|
||||
formatter: (row) => {
|
||||
const to = {
|
||||
name: 'AssetDetail',
|
||||
params: { id: row.id }
|
||||
}
|
||||
if (this.$hasPerm('assets.view_asset')) {
|
||||
return <router-link to={to} class='text-link'>{row.name}</router-link>
|
||||
} else {
|
||||
return <span>{row.name}</span>
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
getRoute: ({ row }) => {
|
||||
return { name: 'AssetDetail', params: { id: row.id }}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -68,7 +64,3 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
@@ -8,6 +8,7 @@
|
||||
import { DrawerListTable as ListTable } from '@/components'
|
||||
import { toM2MJsonParams } from '@/utils/jms'
|
||||
import TwoCol from '@/layout/components/Page/TwoColPage.vue'
|
||||
import { DetailFormatter } from '@/components/Table/TableFormatters'
|
||||
|
||||
export default {
|
||||
name: 'User',
|
||||
@@ -44,15 +45,13 @@ export default {
|
||||
columnsMeta: {
|
||||
name: {
|
||||
label: this.$t('Name'),
|
||||
formatter: (row) => {
|
||||
const to = {
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
getRoute: ({ row }) => {
|
||||
return {
|
||||
name: 'UserDetail',
|
||||
params: { id: row.id }
|
||||
}
|
||||
if (this.$hasPerm('users.view_user')) {
|
||||
return <router-link to={to} class='text-link'>{row.name}</router-link>
|
||||
} else {
|
||||
return <span>{row.name}</span>
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -90,7 +89,3 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user