index.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <base-side-page
  3. @cancel="cancelSidePage"
  4. :title="$t('cloudenv.text_431')"
  5. icon="res-scheduledtask"
  6. :res-name="detailData.name"
  7. :actions="params.actions"
  8. :current-tab="params.windowData.currentTab"
  9. :tabs="detailTabs"
  10. :loaded="loaded"
  11. @tab-change="handleTabChange">
  12. <template v-slot:actions>
  13. <actions :options="singleActions" :row="detailData" button-type="link" button-size="small" />
  14. </template>
  15. <component
  16. :is="params.windowData.currentTab"
  17. :data="detailData"
  18. :res-id="data.id"
  19. :on-manager="onManager"
  20. @side-page-trigger-handle="sidePageTriggerHandle"
  21. @init-side-page-tab="initSidePageTab"
  22. @single-refresh="singleRefresh"
  23. @tab-change="handleTabChange" />
  24. </base-side-page>
  25. </template>
  26. <script>
  27. import SidePageMixin from '@/mixins/sidePage'
  28. import WindowsMixin from '@/mixins/windows'
  29. import Actions from '@/components/PageList/Actions'
  30. import ColumnsMixin from '../mixins/columns'
  31. import SingleActionsMixin from '../mixins/singleActions'
  32. import ScheduledtaskDetail from './Detail'
  33. import RelatedResource from './RelatedResource'
  34. import TaskHistory from './TaskHistory'
  35. export default {
  36. name: 'ScheduledtaskSidePage',
  37. components: {
  38. Actions,
  39. ScheduledtaskDetail,
  40. RelatedResource,
  41. TaskHistory,
  42. },
  43. mixins: [WindowsMixin, SidePageMixin, ColumnsMixin, SingleActionsMixin],
  44. data () {
  45. return {}
  46. },
  47. computed: {
  48. detailTabs () {
  49. const tabs = [
  50. { label: this.$t('cloudenv.text_237'), key: 'scheduledtask-detail' },
  51. { label: this.$t('cloudenv.text_464'), key: 'task-history' },
  52. { label: this.$t('cloudenv.text_454'), key: 'related-resource' },
  53. { label: this.$t('cloudenv.text_15'), key: 'event-drawer' },
  54. ]
  55. return tabs
  56. },
  57. },
  58. }
  59. </script>