Fixed: Fix the issue where adding account information to assets in Pam is not responding.

This commit is contained in:
zhaojisen
2025-02-25 16:41:35 +08:00
committed by ZhaoJiSen
parent f985c75fc5
commit b6ae2aa2f8
2 changed files with 18 additions and 1 deletions

View File

@@ -30,6 +30,12 @@
:visible.sync="gatewayVisible" :visible.sync="gatewayVisible"
/> />
<AccountDiscoverDialog :asset="discoveryDialog.asset" :visible.sync="discoveryDialog.visible" /> <AccountDiscoverDialog :asset="discoveryDialog.asset" :visible.sync="discoveryDialog.visible" />
<AccountCreateUpdate
v-if="showAddDialog"
:asset="asset"
:visible.sync="showAddDialog"
@add="addAccountSuccess"
/>
</div> </div>
</template> </template>
@@ -39,6 +45,7 @@ import AssetBulkUpdateDialog from './AssetBulkUpdateDialog'
import PlatformDialog from '../components/PlatformDialog' import PlatformDialog from '../components/PlatformDialog'
import GatewayDialog from '@/components/Apps/GatewayDialog' import GatewayDialog from '@/components/Apps/GatewayDialog'
import AccountDiscoverDialog from './AccountDiscoverDialog.vue' import AccountDiscoverDialog from './AccountDiscoverDialog.vue'
import AccountCreateUpdate from '@/components/Apps/AccountListTable/AccountCreateUpdate.vue'
import { getDefaultConfig } from './const' import { getDefaultConfig } from './const'
import { mapState } from 'vuex' import { mapState } from 'vuex'
@@ -47,6 +54,7 @@ export default {
ListTable, ListTable,
GatewayDialog, GatewayDialog,
PlatformDialog, PlatformDialog,
AccountCreateUpdate,
AccountDiscoverDialog, AccountDiscoverDialog,
AssetBulkUpdateDialog AssetBulkUpdateDialog
}, },
@@ -139,9 +147,11 @@ export default {
}, },
createProps: {}, createProps: {},
showPlatform: false, showPlatform: false,
showAddDialog: false,
recentPlatforms: recentPlatforms, recentPlatforms: recentPlatforms,
createAction: createAction, createAction: createAction,
gatewayPort: 0, gatewayPort: 0,
asset: {},
gatewayCell: '', gatewayCell: '',
gatewayVisible: false, gatewayVisible: false,
defaultConfig: defaultConfig['tableConfig'], defaultConfig: defaultConfig['tableConfig'],
@@ -264,6 +274,9 @@ export default {
} }
}) })
this.recentPlatforms = platforms this.recentPlatforms = platforms
},
addAccountSuccess() {
this.$refs.ListTable.reloadTable()
} }
} }
} }

View File

@@ -231,7 +231,11 @@ export function getDefaultConfig(vm) {
{ {
name: 'AddAccount', name: 'AddAccount',
title: '添加账号', title: '添加账号',
divided: true divided: true,
callback: ({ row }) => {
vm.asset.id = row.id
vm.showAddDialog = true
}
}, },
{ {
name: 'DiscoverAccounts', name: 'DiscoverAccounts',