1
0
mirror of https://github.com/jumpserver/lina.git synced 2025-05-09 16:46:56 +00:00

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
src/views/assets/Domain/DomainDetail

View File

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

View File

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