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

This commit is contained in:
ibuler
2025-03-05 15:08:43 +08:00
7 changed files with 22 additions and 8 deletions

View File

@@ -168,11 +168,7 @@ export default {
* @param {All} options.value 表单数据
*/
updateValue({ id, value }) {
if (!value) return
this.value = { ...this.value, [id]: value }
this.$nextTick(() => {
this.$refs.elForm.validateField(id)
})
},
/**
* @return {object} key is item's id, value is item's value

View File

@@ -37,7 +37,8 @@ export default {
},
methods: {
async getAsyncItems() {
const userId = this.$route.params.id || 'self'
const drawActionMeta = await this.$store.dispatch('common/getDrawerActionMeta')
const userId = drawActionMeta.row.id || 'self'
const url = `/api/v1/perms/users/${userId}/assets/${this.row.id}`
this.$axios.get(url).then(res => {
this.accountData = res?.permed_accounts || []

View File

@@ -146,6 +146,7 @@ export default {
},
headerActions: {
hasCreate: false,
hasImport: false,
extraMoreActions: [
{
name: 'resolveSelected',

View File

@@ -124,8 +124,8 @@ export default {
this.initial.su_method = this.suMethodLimits[0]
},
async setCategories() {
const category = this.$route.query.category
const type = this.$route.query.type
const category = this.$route.query._category
const type = this.$route.query._type
const state = await this.$store.dispatch('assets/getAssetCategories')
this.fieldsMeta.category_type.el.options = state.assetCategoriesCascader
if (category && type) {

View File

@@ -41,6 +41,7 @@ export default {
date_expired: ''
},
config: {
url: '/api/v1/perms/asset-permissions',
activeMenu: 'AssetPermissionDetail',
submenu: [
{

View File

@@ -1,5 +1,6 @@
import i18n from '@/i18n/i18n'
import AmountFormatter from '@/components/Table/TableFormatters/AmountFormatter.vue'
import DetailFormatter from '@/components/Table/TableFormatters/DetailFormatter.vue'
export const UserAssetPermissionListPageSearchConfigOptions = [
{ label: i18n.t('Name'), value: 'name' },
@@ -33,10 +34,14 @@ export const UserAssetPermissionListPageSearchConfigOptions = [
export const AssetPermissionTableMeta = {
name: {
formatter: DetailFormatter,
minWidth: '120px',
formatterArgs: {
route: 'AssetPermissionDetail',
drawer: true
drawer: true,
routeQuery: {
tab: 'Basic'
}
}
},
action: {

View File

@@ -31,6 +31,7 @@ import InviteUsersDialog from './components/InviteUsersDialog'
import AmountFormatter from '@/components/Table/TableFormatters/AmountFormatter.vue'
import store from '@/store'
import { MFASystemSetting } from '../const'
import DetailFormatter from '@/components/Table/TableFormatters/DetailFormatter.vue'
export default {
components: {
@@ -129,6 +130,15 @@ export default {
]
},
columnsMeta: {
name: {
formatter: DetailFormatter,
formatterArgs: {
route: 'UserDetail',
routeQuery: {
tab: 'Basic'
}
}
},
mfa_level: {
width: '130px',
formatter: (row) => {