Fixed: Domain

This commit is contained in:
zhaojisen 2025-03-11 19:23:59 +08:00
parent 4236405db5
commit f6779e8ca9
2 changed files with 29 additions and 12 deletions

View File

@ -57,9 +57,11 @@ export default {
} }
} }
}, },
async mounted() {
const drawActionMeta = await this.$store.dispatch('common/getDrawerActionMeta')
console.log('drawActionMeta', drawActionMeta)
},
methods: {} methods: {}
} }
</script> </script>
<style>
</style>

View File

@ -2,6 +2,8 @@
<TwoCol> <TwoCol>
<GenericListTable <GenericListTable
ref="ListTable" ref="ListTable"
:create-drawer="createDrawer"
:detail-drawer="detailDrawer"
:header-actions="headerActions" :header-actions="headerActions"
:table-config="tableConfig" :table-config="tableConfig"
/> />
@ -15,7 +17,7 @@
</template> </template>
<script> <script>
import GenericListTable from '@/layout/components/GenericListTable/index' import { GenericListTable } from '@/layout/components'
import GatewayDialog from '@/components/Apps/GatewayDialog' import GatewayDialog from '@/components/Apps/GatewayDialog'
import { connectivityMeta } from '@/components/Apps/AccountListTable/const' import { connectivityMeta } from '@/components/Apps/AccountListTable/const'
import { ArrayFormatter, ChoicesFormatter, DetailFormatter, TagsFormatter } from '@/components/Table/TableFormatters' import { ArrayFormatter, ChoicesFormatter, DetailFormatter, TagsFormatter } from '@/components/Table/TableFormatters'
@ -37,7 +39,11 @@ export default {
} }
}, },
data() { data() {
const vm = this
return { return {
createDrawer: () => import('@/views/assets/Domain/DomainDetail/GatewayCreateUpdate.vue'),
detailDrawer: () => import('@/views/assets/Asset/AssetDetail'),
tableConfig: { tableConfig: {
url: `/api/v1/assets/gateways/?domain=${this.object.id}`, url: `/api/v1/assets/gateways/?domain=${this.object.id}`,
columnsExclude: [ columnsExclude: [
@ -161,14 +167,24 @@ export default {
}.bind(this) }.bind(this)
} }
], ],
createRoute: { onCreate: () => {
name: 'GatewayCreate', vm.$router.push({
query: { query: { domain: vm.object.id }
domain: this.object.id, })
platform_type: 'linux',
category: 'host' this.$refs.ListTable.onCreate()
}
}, },
// createRoute: () => {
// this.$route.query = {
// domain: this.object.id,
// platform_type: 'linux',
// category: 'host'
// }
// return {
// name: 'GatewayCreate'
// }
// },
extraActions: [ extraActions: [
{ {
name: 'GatewayAdd', name: 'GatewayAdd',
@ -222,7 +238,6 @@ export default {
handleAddGatewayDialogClose() { handleAddGatewayDialogClose() {
this.reloadTable() this.reloadTable()
} }
} }
} }
</script> </script>