DetectionOrderView.vue
3.34 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<template>
<div>
<div class="titleBox">
<a-button style="float: right;" @click="handleBack()">返回列表</a-button>
</div>
<div style="width: 100%;float: left;">
<a-card class="tabs-card" :bordered="false" :tab-list="tabs" :active-tab-key="tabKey"
@tabChange="key => changeTab(key)">
<!-- 检测报告 -->
<div v-if="tabKey === 'REPORT'" style="width: 100%;float: left;">
<orderReport :pageData="pageData.inspectionWORespVO || {}" />
</div>
<!-- 工单详情 -->
<div v-if="tabKey === 'DETAIL'" style="width: 100%;float: left;">
<orderDetails ref="orderDetailsRef" :pageData="pageData.inspectionWORespVO || {}"
:inspectionReportResp="pageData.inspectionReportRespVO || {}" />
</div>
<!-- 操作日志 -->
<div style="width: 100%;float: left;margin-top: 16px;">
<a-descriptions :column="1" size="small" layout="vertical">
<template #title>
<title-tip-icon></title-tip-icon>
操作日志
<div class="title-line"></div>
</template>
<a-descriptions-item label="">
<OperationLog ref="operationLogRef" :operationLogData="pageData" />
</a-descriptions-item>
</a-descriptions>
</div>
</a-card>
</div>
</div>
</template>
<script lang="ts">
import { Component } from 'vue-facing-decorator';
import { PaginationComponent } from "@/components/PaginationComponent";
import { Vehicle } from "lib/src/entity/vehicle/entity/Vehicle";
import { DetectionController } from "@/api/DetectionController";
import TitleDivider from "@/components/TitleDivider.vue";
import TitleTipIcon from "@/components/icons/TitleTipIcon.vue";
import OperationLog from "@/views/detection/order/components/OperationLog.vue";
import orderReport from "@/views/detection/order/components/orderReport.vue";
import orderDetails from "@/views/detection/order/components/orderDetails.vue";
@Component({
components: { TitleDivider, TitleTipIcon, OperationLog, orderReport, orderDetails }
})
export default class DetectionOrderView extends PaginationComponent<Vehicle> {
tabKey = "DETAIL";
routeData: any = {
id: '',
action: ''
};
pageData: any = {};
get tabs() {
let tabs = [
{ key: "REPORT", tab: "检测报告" },
{ key: "DETAIL", tab: "工单详情" },
];
return tabs;
}
changeTab(key: string) {
this.tabKey = key;
}
created(): void {
this.routeData = this.$route.query;
this.getDetailData();
}
getDetailData() {
DetectionController.inspectOrderDetail(this.axios, { id: this.routeData.id }).then(response => {
this.pageData = response.data.data || {};
});
}
handleBack() {
this.$router.back();
}
}
</script>
<style scoped lang="less">
.titleBox {
width: 100%;
height: 32px;
float: left;
}
.title-line {
width: 100%;
height: 1px;
background-color: #F2F4F7;
margin-top: 10px;
}
</style>