index.vue 763 B

123456789101112131415161718192021222324252627282930
  1. <template>
  2. <div>
  3. <page-header :title="$t('dictionary.dns_zone')" :tabs="cloudEnvOptions" :current-tab.sync="cloudEnv" />
  4. <page-body>
  5. <list :id="listId" :cloudEnv="cloudEnv" />
  6. </page-body>
  7. </div>
  8. </template>
  9. <script>
  10. import _ from 'lodash'
  11. import { getCloudEnvOptions } from '@/utils/common/hypervisor'
  12. import List from './components/List'
  13. export default {
  14. name: 'DnsZoneIndex',
  15. components: {
  16. List,
  17. },
  18. data () {
  19. const cloudEnvOptions = getCloudEnvOptions('compute_engine_brands').filter(val => !['private'].includes(val.key))
  20. const cloudEnv = this.$route.params?.cloudEnv
  21. return {
  22. listId: 'DnsZoneList',
  23. cloudEnvOptions,
  24. cloudEnv: cloudEnv || _.get(cloudEnvOptions, '[0].key'),
  25. }
  26. },
  27. }
  28. </script>