index.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <base-side-page
  3. @cancel="cancelSidePage"
  4. :title="$t('system.robot_manage')"
  5. icon="res-robot"
  6. :res-name="detailData.name"
  7. :current-tab="params.windowData.currentTab"
  8. :tabs="detailTabs"
  9. :loaded="loaded"
  10. @tab-change="handleTabChange">
  11. <template v-slot:actions>
  12. <actions
  13. :options="singleActions"
  14. :row="detailData"
  15. :before-show-menu="beforeShowMenu"
  16. button-type="link"
  17. button-size="small" />
  18. </template>
  19. <component
  20. :is="params.windowData.currentTab"
  21. :res-id="data.id"
  22. :id="listId"
  23. :data="detailData"
  24. :getParams="getParams"
  25. :on-manager="onManager"
  26. :columns="columns" />
  27. </base-side-page>
  28. </template>
  29. <script>
  30. import SingleActionsMixin from '../mixins/singleActions'
  31. import ColumnsMixin from '../mixins/columns'
  32. import Detail from './Detail'
  33. import SidePageMixin from '@/mixins/sidePage'
  34. import WindowsMixin from '@/mixins/windows'
  35. import Actions from '@/components/PageList/Actions'
  36. export default {
  37. name: 'RobotSidePage',
  38. components: {
  39. Detail,
  40. Actions,
  41. },
  42. mixins: [SidePageMixin, WindowsMixin, ColumnsMixin, SingleActionsMixin],
  43. data () {
  44. return {
  45. detailTabs: [
  46. { label: this.$t('compute.text_238'), key: 'detail' },
  47. { label: this.$t('compute.text_240'), key: 'event-drawer' },
  48. ],
  49. }
  50. },
  51. computed: {
  52. getParams () {
  53. return null
  54. },
  55. listId () {
  56. switch (this.params.windowData.currentTab) {
  57. case 'event-drawer':
  58. return 'EventListForNotifySidePage'
  59. default:
  60. return ''
  61. }
  62. },
  63. hiddenColumns () {
  64. return this.params.hiddenColumns || []
  65. },
  66. },
  67. methods: {
  68. },
  69. }
  70. </script>