| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <template>
- <base-side-page
- @cancel="cancelSidePage"
- :title="$t('compute.pci.passthrough_device_type')"
- icon="passthrough"
- :res-name="detailData.dev_type"
- :actions="params.actions"
- :current-tab="params.windowData.currentTab"
- :tabs="detailTabs"
- :loaded="loaded"
- @tab-change="handleTabChange">
- <template v-slot:actions>
- <actions :options="singleActions" :row="detailData" button-type="link" button-size="small" />
- </template>
- <component
- :is="params.windowData.currentTab"
- :res-id="data.id"
- :id="listId"
- :data="detailData"
- :on-manager="onManager"
- :getParams="getParams"
- @refresh="refresh"
- @single-refresh="singleRefresh"
- @tab-change="handleTabChange" />
- </base-side-page>
- </template>
- <script>
- import SingleActionsMixin from '../mixins/singleActions'
- import ColumnsMixin from '../mixins/columns'
- import PciDetail from './Detail'
- import SidePageMixin from '@/mixins/sidePage'
- import WindowsMixin from '@/mixins/windows'
- import Actions from '@/components/PageList/Actions'
- export default {
- name: 'PciSidePage',
- components: {
- PciDetail,
- Actions,
- },
- mixins: [SidePageMixin, WindowsMixin, ColumnsMixin, SingleActionsMixin],
- data () {
- return {
- detailTabs: [
- { label: this.$t('compute.text_238'), key: 'pci-detail' },
- { label: this.$t('compute.text_240'), key: 'event-drawer' },
- ],
- }
- },
- computed: {
- getParams () {
- return null
- },
- listId () {
- switch (this.params.windowData.currentTab) {
- case 'event-drawer':
- return 'EventListForPciSidePage'
- default:
- return ''
- }
- },
- },
- created () {
- this.initChangeTab()
- },
- methods: {
- initChangeTab () {
- if (this.params.tab) {
- this.handleTabChange(this.params.tab)
- }
- },
- },
- }
- </script>
|