Fixed: Account View

This commit is contained in:
zhaojisen 2025-03-13 13:55:54 +08:00 committed by ZhaoJiSen
parent 804006f853
commit 09836df9fa
3 changed files with 11 additions and 4 deletions

View File

@ -7,7 +7,7 @@
/>
</template>
<script type="text/jsx">
<script>
import AssetTreeTable from '@/components/Apps/AssetTreeTable'
import { AccountInfoFormatter, DetailFormatter } from '@/components/Table/TableFormatters'
import { connectivityMeta } from '@/components/Apps/AccountListTable/const'

View File

@ -39,8 +39,7 @@ export default {
},
methods: {
async getAsyncItems() {
const drawActionMeta = await this.$store.dispatch('common/getDrawerActionMeta')
const userId = drawActionMeta.row.id || 'self'
const userId = this.$route.params.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

@ -133,9 +133,17 @@ export default {
name: {
formatter: DetailFormatter,
formatterArgs: {
route: 'UserDetail',
routeQuery: {
tab: 'Basic'
},
getRoute: ({ row }) => {
this.$route.params.id = row.id
return {
name: 'UserDetail',
params: {
id: row.id
}
}
}
}
},