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