index.vue 938 B

1234567891011121314151617181920212223242526272829303132
  1. <template>
  2. <div>
  3. <page-header :title="$t('dictionary.commonalert')" :current-tab.sync="alertType" :tabs="cloudEnvOptions" />
  4. <page-body>
  5. <commonalert-list ref="list" :alertType="alertType" listId="CommonalertList" />
  6. </page-body>
  7. </div>
  8. </template>
  9. <script>
  10. import KeepAliveMixin from '@/mixins/keepAlive'
  11. import CommonalertList from './components/List'
  12. export default {
  13. name: 'CommonalertsIndex',
  14. components: {
  15. CommonalertList,
  16. },
  17. mixins: [KeepAliveMixin],
  18. data () {
  19. let cloudEnvOptions = [{ key: 'all', label: this.$t('monitor.text_3') }, { key: 'normal', label: this.$t('monitor.text_4') }, { key: 'system', label: this.$t('monitor.text_5') }]
  20. if (!this.$store.getters.isAdminMode) {
  21. cloudEnvOptions = [{ key: 'normal', label: this.$t('monitor.text_4') }]
  22. }
  23. const alertType = cloudEnvOptions[0].key
  24. return {
  25. cloudEnvOptions,
  26. alertType,
  27. }
  28. },
  29. }
  30. </script>