RelocationPage.vue
2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<template>
<a-card class="tabs-card" :tab-list="tabList" :active-tab-key="activeKey" @tabChange="key => onTabChange(key )" :bordered="false">
<maintain-vehicle-page v-if="activeKey === 'maintainVenue'"></maintain-vehicle-page>
<confirm-vehicle-page v-else-if="activeKey === 'confirmVenue'"></confirm-vehicle-page>
<warehousing-page v-else-if="activeKey === 'warehousing'"></warehousing-page>
<outbound-page v-else-if="activeKey === 'outbound'"></outbound-page>
<template #tabBarExtraContent>
</template>
</a-card>
</template>
<script lang="ts">
import {Component, Vue} from 'vue-facing-decorator';
import WarehousingPage from "@/views/venue/relocation/warehousing/WarehousingPage.vue";
import OutboundPage from "@/views/venue/relocation/outbound/OutboundPage.vue";
import MaintainVehiclePage from "@/views/venue/relocation/maintain/MaintainVehiclePage.vue";
import ConfirmVehiclePage from "@/views/venue/relocation/confirm/ConfirmVehiclePage.vue";
import {Security} from "@/store";
@Component({
components: {ConfirmVehiclePage, MaintainVehiclePage, OutboundPage, WarehousingPage}
})
export default class RelocationPage extends Vue {
tabList = [];
activeKey = '';
@Security.Getter hasPrivilege;
created(): void {
if (this.hasPrivilege('relocation_1')) this.tabList.push({key: 'maintainVenue', tab: '待确认场地'});
if (this.hasPrivilege('relocation_2')) this.tabList.push({key: 'confirmVenue', tab: '已确认场地'});
if (this.hasPrivilege('relocation_3')) this.tabList.push({key: 'warehousing', tab: '入库记录'});
if (this.hasPrivilege('relocation_4')) this.tabList.push({key: 'outbound', tab: '出库记录'});
if (this.tabList.length > 0) this.activeKey = this.tabList[0].key;
if (this.$route.query.venueId) {
this.activeKey = 'confirmVenue';
// this.pagination.queryForm.venueId = this.$route.query.venueId;
// this.vehicleStateIndex = "0";
// this.changeTab(this.vehicleStateIndex);
}
}
onTabChange(value: string) {
this.activeKey = value;
}
}
</script>
<style scoped lang="less">
</style>