lyh
12 小时以前 ae9b400eae985f6b6f2e33f66ee1575f72675898
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
<template>
  <j-modal :title="title" :width="1200" :visible="visible"
           :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @ok="submitForm"
           @cancel="handleCancel" :mask-closable="false" :confirmLoading="confirmLoading" fullscreen>
    <a-spin :spinning="spinning">
      <a-form-model ref='form' :model='model' :labelCol="labelCol" :wrapperCol="wrapperCol" :rules="validatorRules">
        <a-row :gutter="48" id="outer-row">
          <a-col :span="8" class="scroll-col">
            <a-tabs>
              <a-tab-pane tab="基础信息">
                <a-row>
                  <a-col :span='span'>
                    <a-form-model-item label="工单号">
                      <a-input readOnly v-model="model.orderNum"/>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span='span'>
                    <a-form-model-item label="设备编号">
                      <MaintenanceEquipmentSelect v-model="model.equipmentId"
                                                  :maintenanceCategory="'POINT_INSPECTION'"
                                                  disabled @autocompleteForm="autoCompleteForm"/>
                    </a-form-model-item>
                  </a-col>
 
                </a-row>
 
                <a-row>
                  <a-col :span='span'>
                    <a-form-model-item label="规范名称">
                      <a-input readOnly v-model="model.standardName"/>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span='span'>
                    <a-form-model-item label="规范编码">
                      <a-input readOnly v-model="model.standardCode"/>
                    </a-form-model-item>
                  </a-col>
 
                </a-row>
 
                <a-row>
                  <a-col :span='span'>
                    <a-form-model-item label="点检日期">
                      <a-input v-model="model.inspectionDate" readOnly/>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span='span'>
                    <a-form-model-item label="过期时间">
                      <a-input v-model="model.expirationTime" readOnly/>
                    </a-form-model-item>
                  </a-col>
                </a-row>
 
                <a-row>
                  <a-col :span='span'>
                    <a-form-model-item label="保养周期">
                      <a-input v-model="model.maintenancePeriod" readOnly/>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span='span'>
                    <a-form-model-item label="点检人">
                      <a-input v-model="model.operator_dictText" readOnly/>
                    </a-form-model-item>
                  </a-col>
                </a-row>
 
                <a-row>
                  <a-col :span="span*2">
                    <a-form-model-item label="备注" :labelCol="{span:4}" :wrapperCol="{span:20}">
                      <a-textarea v-model="model.remark" rows="3" readOnly/>
                    </a-form-model-item>
                  </a-col>
                </a-row>
              </a-tab-pane>
            </a-tabs>
          </a-col>
 
          <a-col :span="!isDisplayConfirm?16:10" class="scroll-col">
            <a-tabs :active-key="activeTabKey" @change="handleTabChange">
              <a-tab-pane key="1" tab="日点检">
                <j-vxe-table ref="editableDetailTable1" :columns="getColumns()" :rowNumber="false" rowSelection bordered
                             alwaysEdit :toolbar="false" keep-source :height="500"
                             :dataSource="detail.dayInspectionList"
                             @selectRowChange="handleTableSelectRowChange($event,'Day')">
                  <template v-slot:inspectionResult="props">
                    <j-dict-select-tag v-model="props.row.inspectionResult" dictCode="inspection_project_result"
                                       :disabled="isDisableOperation" placeholder="请选择点检结果"
                                       @change="handleInspectionResultSelectChange($event,props.row)"
                                       style="width: 100%"/>
                  </template>
 
                  <template v-slot:exceptionDescription="props">
                    <a-textarea :rows="1" style="resize: none" v-model="props.row.exceptionDescription"
                                :placeholder="props.row.inspectionResult&&props.row.inspectionResult!='NORMAL'?'请输入异常描述':''"
                                :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult=='NORMAL'"/>
                  </template>
 
                  <template v-slot:reportFlag="props">
                    <j-dict-select-tag v-model="props.row.reportFlag"
                                       :disabled="true"
                                       dictCode="yn" style="width: 100%"/>
                  </template>
 
                  <!-- 操作 -->
                  <template v-slot:action="props">
                    <a :class="{ 'disabled-link': shouldDisableRepairButton(props.row) }"
                       @click="!shouldDisableRepairButton(props.row) && handleRepairReporting(props.row)">
                      报修填报
                    </a>
                  </template>
 
                </j-vxe-table>
              </a-tab-pane>
 
              <a-tab-pane key="2" tab="周点检" forceRender>
                <j-vxe-table ref="editableDetailTable2" :rowNumber="false" rowSelection bordered
                             alwaysEdit :toolbar="false" keep-source :height="500"
                             :dataSource="detail.weekInspectionList"  :columns="getColumns()"
                             @selectRowChange="handleTableSelectRowChange($event,'Week')">
                  <template v-slot:inspectionResult="props">
                    <j-dict-select-tag v-model="props.row.inspectionResult" dictCode="inspection_project_result"
                                       :disabled="isDisableOperation||detail.weekInspectionFinishedFlag"
                                       placeholder="请选择点检结果"
                                       @change="handleInspectionResultSelectChange($event,props.row)"
                                       style="width: 100%"/>
                  </template>
 
                  <template v-slot:exceptionDescription="props">
                    <a-textarea :rows="1" style="resize: none" v-model="props.row.exceptionDescription"
                                :placeholder="props.row.inspectionResult&&props.row.inspectionResult!='NORMAL'?'请输入异常描述':''"
                                :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult=='NORMAL'"/>
                  </template>
 
                  <template v-slot:reportFlag="props">
                    <j-dict-select-tag v-model="props.row.reportFlag"
                                       :disabled="true"
                                       dictCode="yn" style="width: 100%"/>
                  </template>
 
 
                  <!-- 操作 -->
                  <template v-slot:action="props">
                    <a :class="{ 'disabled-link': shouldDisableRepairButton(props.row) }"
                       @click="!shouldDisableRepairButton(props.row) && handleRepairReporting(props.row)">
                      报修填报
                    </a>
                  </template>
 
                </j-vxe-table>
              </a-tab-pane>
 
              <template v-if="selectShenpiData.procInstId">
                <a-tab-pane key='3' tab='流程图'>
                  <img :src="imageSrc" v-if="imageSrc"/>
                </a-tab-pane>
              </template>
 
              <a-tab-pane key='4' tab='流转节点'>
                <a-card>
                  <a-timeline style="padding:0 1% 0 12%" >
                    <a-timeline-item color='white' v-for="(item,index1) in hitaskDataSource" :key="index1">
                      <div class="bottom">
                        <p>处理人:{{item.assignee_dictText}}</p>
                        <p v-if="index1 !==0">处理时长:{{item.duration}}</p>
                        <p v-if="item.name !== '提交申请'">处理类型:{{item.sequenceFlowName}}</p>
                        <p v-if="item.description != null">处理意见:{{item.description}}</p>
                        <div class="left_qiu"><span>{{item.taskName}}</span></div>
                      </div>
                    </a-timeline-item>
                  </a-timeline>
                </a-card>
              </a-tab-pane>
 
 
              <a-button
                v-if="activeTabKey=='1'||activeTabKey=='2'"
                :disabled="(activeTabKey=='1'&&selectedDayInspectionRowKeys.length==0)||(activeTabKey=='2'&&selectedWeekInspectionRowKeys.length==0)||(activeTabKey=='2'&&detail.weekInspectionFinishedFlag)||isDisableOperation"
                slot="tabBarExtraContent" type="primary"
                @click="handleSelectAllInspectionResult">批量点检正常
              </a-button>
            </a-tabs>
          </a-col>
 
          <a-col v-if="isDisplayConfirm" :span="6" class="scroll-col">
            <a-tabs>
              <a-tab-pane tab="维修工确认">
                <a-row>
                  <a-col :span="24">
                    <a-form-model-item prop="confirmDealType" label="处理类型">
                      <j-dict-select-tag type='radio' v-model='model.confirmDealType'
                                         dictCode='approved_rejected'
                                         :disabled="disableSubmit||model.inspectionStatus!=='WAIT_CONFIRM'"/>
                    </a-form-model-item>
                  </a-col>
 
                  <a-col :span="24">
                    <a-form-model-item label="处理意见">
                      <a-textarea placeholder="请输入意见"
                                  :disabled="disableSubmit||model.inspectionStatus!=='WAIT_CONFIRM'"
                                  v-model="model.confirmComment"/>
                    </a-form-model-item>
                  </a-col>
                </a-row>
              </a-tab-pane>
            </a-tabs>
          </a-col>
        </a-row>
      </a-form-model>
      <eamReportRepair-modal ref="modalForm"  @ok="handleRepairComplete" @close="handleRepairClose"/>
    </a-spin>
  </j-modal>
</template>
 
<script>
  import { getAction, postAction, downFile } from '@api/manage'
  import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue'
  import { JVXETypes } from '@comp/jeecg/JVxeTable'
  import moment from 'moment'
  import EamReportRepairModal from "@views/eam/repair/modules/EamReportRepairList/EamReportRepairModal.vue";
 
  export default {
    name: 'InspectionOrderHandle',
    components: {EamReportRepairModal, MaintenanceEquipmentSelect },
    props: {
      selectShenpiData: {
        type: Object
      }
    },
    data() {
      return {
        span: 12,
        confirmLoading: false,
        spinning: false,
        model: {},
        currentRepairRow: null,
        validatorRules: {
          confirmDealType: [
            { required: true, message: '请选择处理类型' }
          ]
        },
        imageSrc: null,
        labelCol: {
          xs: { span: 24 },
          sm: { span: 8 }
        },
        wrapperCol: {
          xs: { span: 30 },
          sm: { span: 16 }
        },
        visible: false,
        // 表头
        url: {
          diagramView: '/assign/flow/diagramView',
          queryHisTaskList: '/assign/flow/queryHisTaskList',
          approve: '/eam/eamInspectionOrder/approval',
          queryById: '/eam/eamInspectionOrder/queryById',
          detailList: '/eam/eamInspectionOrderDetail/queryList',
          weekInspectionOrderList: '/eam/eamWeekInspectionDetail/queryStandardList'
        },
        detail: {
          columns: [
            {
              title: '序号',
              key: 'itemCode',
              type: JVXETypes.normal,
              width: 60,
              align: 'center',
              fixed: 'left'
            },
            {
              title: '保养项',
              key: 'itemName',
              type: JVXETypes.normal,
              align: 'center',
              fixed: 'left'
            },
            {
              title: '保养要求',
              key: 'itemDemand',
              type: JVXETypes.normal,
              align: 'center',
              fixed: 'left'
            },
            {
              title: '点检结果',
              key: 'inspectionResult',
              type: JVXETypes.slot,
              slotName: 'inspectionResult',
              align: 'center',
              validateRules: [
                { required: true, message: '${title}不能为空' }
              ]
            },
            {
              title: '异常描述',
              key: 'exceptionDescription',
              type: JVXETypes.slot,
              slotName: 'exceptionDescription',
              align: 'center',
              validateRules: [
                { handler: this.customValidator }
              ]
            },
            {
              title: '异常是否报修',
              key: 'reportFlag',
              type: JVXETypes.slot,
              slotName: 'reportFlag',
              align: 'center',
              validateRules: [
                { handler: this.customValidator }
              ]
            },
            {
              title: '操作',
              align: 'center',
              type: JVXETypes.slot,
              slotName: 'action',
              fixed: 'right'
            }
          ],
          dayInspectionList: [],
          weekInspectionList: [],
          weekInspectionFinishedFlag: false
        },
        selectedDayInspectionRowKeys: [],
        selectedWeekInspectionRowKeys: [],
        hitaskDataSource:[],
        disableSubmit: false,
        activeTabKey: '1',
        title: '',
      }
    },
    computed: {
      isDisplayConfirm() {
        return ['WAIT_CONFIRM', 'COMPLETE'].includes(this.model.inspectionStatus)
      },
      isDisableOperation() {
        return this.disableSubmit || this.model.inspectionStatus !== 'UNDER_INSPECTION'
      },
      // 添加操作列显示条件
      shouldShowActionColumn() {
        return this.model.inspectionStatus === 'UNDER_INSPECTION';
      }
    },
    methods: {
      // 添加获取列的方法
      getColumns() {
        const columns = [
          // 基础列定义(序号、保养项等)
          {
            title: '序号',
            key: 'itemCode',
            type: JVXETypes.normal,
            width: 60,
            align: 'center',
            fixed: 'left'
          },
          {
            title: '保养项',
            key: 'itemName',
            type: JVXETypes.normal,
            align: 'center',
            fixed: 'left'
          },
          {
            title: '保养要求',
            key: 'itemDemand',
            type: JVXETypes.normal,
            align: 'center',
            fixed: 'left'
          },
          {
            title: '点检结果',
            key: 'inspectionResult',
            type: JVXETypes.slot,
            slotName: 'inspectionResult',
            align: 'center',
            validateRules: [
              { required: true, message: '${title}不能为空' }
            ]
          },
          {
            title: '异常描述',
            key: 'exceptionDescription',
            type: JVXETypes.slot,
            slotName: 'exceptionDescription',
            align: 'center',
            validateRules: [
              { handler: this.customValidator }
            ]
          },
          {
            title: '异常是否报修',
            key: 'reportFlag',
            type: JVXETypes.slot,
            slotName: 'reportFlag',
            align: 'center',
            validateRules: [
              { handler: this.customValidator }
            ]
          }
        ];
 
        // 仅在点检中状态下添加操作列
        if (this.shouldShowActionColumn) {
          columns.push({
            title: '操作',
            align: 'center',
            type: JVXETypes.slot,
            width: 150,
            slotName: 'action',
            fixed: 'right'
          });
        }
        return columns;
      },
 
      handleApprove(record) {
        this.spinning = true
        this.activeTabKey = '1'
        this.detail.dayInspectionList = this.detail.weekInspectionList = []
        this.getBasicInformationByApi(record)
        this.getFlowChartImageByApi(record)
        this.getFlowTaskListByApi(record)
      },
 
      handleDetail(record) {
        this.spinning = true
        this.activeTabKey = '1'
        this.detail.dayInspectionList = this.detail.weekInspectionList = []
        this.model = Object.assign({}, record)
        this.getDayInspectionOrderListByApi(record.id)
        this.getWeekInspectionOrderListByApi(record.standardId)
        this.getFlowTaskListByApi(record)
      },
 
      /**
       * 获取基础信息
       * @param record 主页面列表行记录
       */
      getBasicInformationByApi(record) {
        const that = this
        getAction(this.url.queryById, { id: record.dataId })
          .then(res => {
            if (res.success) {
              that.model = Object.assign({}, res.result)
              that.model.dataId = record.dataId
              that.model.taskId = record.id
              that.model.userId = record.assignee
              that.model.instanceId = record.procInstId
              this.getDayInspectionOrderListByApi(record.dataId)
              this.getWeekInspectionOrderListByApi(this.model.standardId)
            }
            else {
              that.$notification.warning({
                message: '消息',
                description: res.message
              })
            }
          })
      },
 
      /**
       * 获取流程图
       * @param record 主页面列表行记录
       */
      getFlowChartImageByApi(record) {
        const { processDefinitionId, processInstanceId, processDefinitionKey } = record
        const imageParam = { processDefinitionId, processInstanceId, TaskDefinitionKey: processDefinitionKey }
        const that = this
 
        downFile(this.url.diagramView, imageParam, 'get')
          .then((res => {
            that.imageSrc = window.URL.createObjectURL(new Blob([res]))
          }))
          .catch(err => {
            that.$notification.error({
              message: '消息',
              description: err.message
            })
          })
      },
 
      /**
       * 获取点检工单中的日点检列表
       * @param orderId 工单号
       */
      getDayInspectionOrderListByApi(orderId) {
        if (orderId) {
          getAction(this.url.detailList, { orderId })
            .then(res => {
              if (res.success) {
                this.detail.dayInspectionList = res.result
              }
            })
            .finally(() => {
              this.spinning = false
            })
        }
      },
 
      /**
       * 获取点检工单中的周点检列表
       * @param standardId 规范id
       */
      getWeekInspectionOrderListByApi(standardId) {
        getAction(this.url.weekInspectionOrderList, { standardId, inspectionDate: this.model.inspectionDate })
          .then(res => {
            if (res.success) {
              this.detail.weekInspectionList = res.result.list
              this.detail.weekInspectionFinishedFlag = res.result.weekInsFlag
            }
          })
          .finally(() => {
            this.spinning = false
          })
      },
 
      /**
       * tab栏切换时触发
       * @param tabKey 切换后的tabKey
       */
      handleTabChange(tabKey) {
        if (this.activeTabKey == '1') this.$refs.editableDetailTable1.clearValidate()
        this.activeTabKey = tabKey
      },
 
      // 提交事件
      async submitForm() {
        let errMap = await this.$refs.editableDetailTable1.validateTable()
        if (errMap) {
          if (this.activeTabKey != '1') {
            this.activeTabKey = '1'
            // 内部校验提示因tab切换时定位出现问题因此在此处清楚内部校验提示,增加notification提示
            this.$refs.editableDetailTable1.clearValidate()
            this.$notification.warning({
              message: '消息',
              description: '日点检结果不能为空'
            })
          }
          return
        }
 
        this.$refs.form.validate(valid => {
          if (valid) {
            this.confirmLoading = this.spinning = true
            this.model.tableDetailList = this.$refs.editableDetailTable1.getTableData()
            if (!this.detail.weekInspectionFinishedFlag) this.model.tableWeekDetailList = this.$refs.editableDetailTable2.getTableData()
            const that = this
            postAction(this.url.approve, this.model)
              .then((res) => {
                if (res.success) {
                  that.$notification.success({
                    message: '消息',
                    description: res.message
                  })
                  //刷新表格
                  that.$emit('modalFormOk')
                  that.handleCancel()
                } else {
                  that.$notification.warning({
                    message: '消息',
                    description: res.message
                  })
                }
              })
              .finally(() => {
                that.confirmLoading = this.spinning = false
              })
          } else {
            return false
          }
        })
      },
 
      autoCompleteForm({ standardName, maintenancePeriod, standardCode }) {
        this.$set(this.model, 'standardName', standardName)
        this.$set(this.model, 'maintenancePeriod', maintenancePeriod)
        this.$set(this.model, 'standardCode', standardCode)
      },
 
      // 批量选择所有点检结果
      handleSelectAllInspectionResult() {
        let selectedRowKeys, prefix
        if (this.activeTabKey == '1') {
          selectedRowKeys = this.selectedDayInspectionRowKeys
          prefix = 'day'
        }
        else if (this.activeTabKey == '2') {
          selectedRowKeys = this.selectedWeekInspectionRowKeys
          prefix = 'week'
        }
        else selectedRowKeys = []
        if (selectedRowKeys.length == 0) return
 
        selectedRowKeys.forEach(key => {
          const dataItem = this.detail[prefix + 'InspectionList'].find(item => item.id === key)
          if (dataItem && dataItem.inspectionResult !== 'NORMAL') {
            delete dataItem.exceptionDescription
            delete dataItem.reportFlag
            dataItem.inspectionResult = 'NORMAL'
          }
        })
        this.$refs['editableDetailTable' + this.activeTabKey].clearCheckboxRow()
        this['selected' + prefix.charAt(0).toUpperCase() + prefix.slice(1) + 'InspectionRowKeys'] = []
      },
 
      /**
       * 表格多选框发生改变时触发
       * @param {selectedRowIds} 表格中已选择的ID列表
       * @param key 点检区分key
       */
      handleTableSelectRowChange({ selectedRowIds }, key) {
        this['selected' + key + 'InspectionRowKeys'] = selectedRowIds
      },
 
      /**
       * 点检结果选择器发生改变时触发
       * @param value 改变后的值
       * @param record 保养明细行记录
       */
      handleInspectionResultSelectChange(value, record) {
        if (record.exceptionDescription) delete record.exceptionDescription
        if (record.reportFlag) delete record.reportFlag
      },
 
      /**
       * 异常描述与异常是否保修字段自定义校验方法
       * @param cellValue  单元格内的值
       * @param row  当前行记录
       * @param callback 结果回调函数
       */
      customValidator({ cellValue, row }, callback) {
        if (this.activeTabKey == '1' && row.inspectionResult == 'ANOMALY') {
          if (!cellValue) {
            callback(false, '请输入${title}') // false = 未通过,可以跟自定义提示
          } else {
            callback(true) // true = 通过验证
          }
        } else {
          callback(true)
        }
      },
 
      /**
       * 获取流转节点
       * @param record
       */
      getFlowTaskListByApi(record) {
        let parmhis={
          'procInstId': record.procInstId
        }
        getAction(this.url.queryHisTaskList,parmhis).then(res=>{
          this.hitaskDataSource=res.result
        }).finally(
          this.visible = true,
          console.log('this.approveData---->', this.approveData)
        )
      },
 
      // 添加禁用条件判断方法
      shouldDisableRepairButton(row) {
        return this.model.inspectionStatus !== 'UNDER_INSPECTION' ||
          row.inspectionResult !== 'ANOMALY';
      },
 
      /**
       * 异常描述填报故障报修
       * @param exceptionDescription
       */
      handleRepairReporting(row) {
        this.currentRepairRow = row; // 存储当前操作行
        let record = {
          faultDescription: row.exceptionDescription,
          equipmentId: this.model.equipmentId
        }
        this.$refs.modalForm.handleRepair(record)
      },
 
      handleRepairClose(success) {
        if (!success && this.currentRepairRow) {
          this.currentRepairRow = null; // 清除未成功的操作
        }
      },
 
      handleRepairComplete(success) {
        if (success && this.currentRepairRow) {
          this.$set(this.currentRepairRow, 'reportFlag', '1');
          this.$message.success("报修已成功提交");
        }
        this.currentRepairRow = null;
      },
 
      handleCancel() {
        this.selectedDayInspectionRowKeys = this.selectedWeekInspectionRowKeys = []
        this.visible = false
      }
    }
  }
</script>
<style scoped lang="less">
  /deep/ .ant-select-dropdown-menu {
    text-align: left;
  }
 
  /deep/ .ant-spin-nested-loading {
    height: 100%;
 
    .ant-spin-container {
      height: 100%;
 
      .ant-form {
        height: 100%;
 
        #outer-row {
          height: 100%;
 
          .scroll-col {
            height: 100%;
            overflow: auto;
          }
        }
      }
    }
  }
  /* 全局禁选样式 - 作用于整个页面 */
  html.submitting,
  html.submitting body {
    pointer-events: none !important;
    cursor: wait !important;
  }
 
  /* 蒙层效果增强 */
  html.submitting::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    z-index: 9998;
  }
 
  /* 加载指示器 - 更明显的视觉反馈 */
  html.submitting::after {
    content: '提交中...';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1890ff;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 9999;
  }
 
  /* 禁用状态按钮样式 */
  .disabled-btn {
    opacity: 0.6;
    cursor: not-allowed !important;
  }
 
  .shallow-hr {
    border: 0;
    height: 1px; /* 分界线的高度 */
    background-color: rgba(0, 0, 0, 0.1); /* 使用 RGBA 颜色,并设置较低的透明度 */
    margin: 20px 0; /* 分界线上下的外边距 */
  }
  .btn-custom {
    background-color: #4CAF50; /* 绿色背景 */
    color: white; /* 白色文字 */
    border: none; /* 无边框 */
    padding: 5px 15px; /* 内边距 */
    text-align: center; /* 文字居中 */
    text-decoration: none; /* 无下划线 */
    display: inline-block; /* 行内块元素 */
    font-size: 12px; /* 字体大小 */
    margin: 4px 2px; /* 外边距 */
    cursor: pointer; /* 鼠标悬停时显示手型 */
    border-radius: 4px; /* 圆角边框 */
  }
 
  .bold-large-label {
    font-weight: bold;
    font-size: 20px; /* 或你需要的任何大小 */
  }
  .left_qiu{
    position: absolute;
    left: -74px;
    top: 0;
    width:54px;
    border-radius: 50%;
    height:54px;
    font-size: 13px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    background: #0099ff;
    transform: translate(0, 0);
  }
  /deep/ .ant-timeline-item-tail{
    left: -29px !important;
  }
  .left_qiu span{
    width: 3em;
    display: block;
    color: #fff;
    text-align: center;
  }
  .img{
    width: 75%;
  }
 
  .wrap{
    clear: both;
    width: 100%;
    display: flex;
    height: 50px;
    border: 1px solid #ccc;
    /* background-color: aqua; */
  }
  .box{
    width:21%;
    height:50px;
    border-right: 1px solid #ccc;
    line-height: 50px;
    /* background: red; */
    text-align:center;
    margin: auto;
  }
 
 
  /* 添加禁用样式 */
  .disabled-link {
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
    text-decoration: none;
  }
</style>