Merge branch 'pam' of github.com:jumpserver/lina into pam

This commit is contained in:
ibuler
2025-03-10 19:22:08 +08:00
4 changed files with 19 additions and 38 deletions

View File

@@ -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) => {

View File

@@ -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)
}
},
{

View File

@@ -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>

View File

@@ -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>