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
| <template>
| <j-modal :title="title" :width="1200" :visible="visible" switchFullscreen centered
| :okButtonProps="{ class:{'jee-hidden': true} }" @cancel="handleCancel"
| cancelText="关闭">
| <a-spin :spinning="spinning">
| <a-tabs default-active-key="1">
| <a-tab-pane tab="操作工" key="1">
| <j-vxe-table rowNumber bordered keep-source :height="500" :dataSource="detail.operatorMaintenanceList"
| :columns="detail.columns"/>
| </a-tab-pane>
| <a-tab-pane tab="维修工" key="2" forceRender>
| <j-vxe-table rowNumber bordered keep-source :height="500" :dataSource="detail.repairerMaintenanceList"
| :columns="detail.columns"/>
| </a-tab-pane>
| </a-tabs>
| </a-spin>
| </j-modal>
| </template>
|
| <script>
| import { getAction, httpAction } from '@/api/manage'
| import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue'
| import { JVXETypes } from '@comp/jeecg/JVxeTable'
|
| export default {
| name: 'EamSecondMaintenanceBatchOrderDetailModal',
| components: { MaintenanceEquipmentSelect },
| data() {
| return {
| title: '预览明细',
| visible: false,
| spinning: false,
| url: {
| standardDetail: '/eam/eamMaintenanceStandardDetail/queryList'
| },
| detail: {
| operatorMaintenanceList: [],
| repairerMaintenanceList: [],
| columns: [
| {
| title: 'ID',
| key: 'id',
| type: JVXETypes.hidden
| },
| {
| title: 'orderId',
| key: 'orderId',
| type: JVXETypes.hidden
| },
| {
| title: '序号',
| key: 'itemCode',
| type: JVXETypes.normal,
| width: 60,
| align: 'center'
| },
| {
| title: '保养项',
| key: 'itemName',
| type: JVXETypes.normal,
| align: 'center'
| }
| ]
| }
| }
| },
| methods: {
| /**
| * 获取保养规范数据
| * @param standardId 规范Id
| */
| loadStandardDetail(standardId) {
| this.spinning = true
| getAction(this.url.standardDetail, { standardId })
| .then(res => {
| if (res.success) {
| this.detail.operatorMaintenanceList = res.result.filter(item => item.itemCategory == 'OPERATOR_MAINTENANCE')
| this.detail.repairerMaintenanceList = res.result.filter(item => item.itemCategory == 'REPAIRER_MAINTENANCE')
| }
| })
| .finally(() => {
| this.spinning = false
| })
| },
|
| handleCancel() {
| this.close()
| },
|
| close() {
| this.$emit('close')
| this.visible = false
| }
|
| }
| }
| </script>
|
|