src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue
@@ -1,201 +1,184 @@
<template>
  <j-modal
    :title="title"
    :width="1200"
    :visible="visible"
    :okButtonProps="{ class:{'jee-hidden': disableSubmit||!hasInspectionDateArrived} }"
    @ok="submitForm"
    @cancel="handleCancel"
    :mask-closable="false"
    :confirmLoading="confirmLoading"
    switchFullscreen
    centered
  >
  <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='tableRowRecord' :labelCol="labelCol" :wrapperCol="wrapperCol"
                    :rules="validatorRules">
        <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 点检基础信息</a-divider>
        <a-row :gutter="48">
          <a-col :span="8">
            <a-tabs>
              <a-tab-pane tab="基础信息">
                <a-row>
                  <a-col :span='span'>
                    <a-form-model-item label="工单号">
                      <a-input readOnly v-model="tableRowRecord.orderNum"/>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span='span'>
                    <a-form-model-item label="设备编号">
                      <MaintenanceEquipmentSelect v-model="tableRowRecord.equipmentId"
                                                  :maintenanceCategory="'POINT_INSPECTION'"
                                                  disabled @autocompleteForm="autoCompleteForm"/>
                    </a-form-model-item>
                  </a-col>
        <a-row>
          <a-col :span='span'>
            <a-form-model-item label="工单号">
              <a-input readOnly v-model="tableRowRecord.orderNum"/>
            </a-form-model-item>
          </a-col>
          <a-col :span='span'>
            <a-form-model-item label="设备编号">
              <MaintenanceEquipmentSelect v-model="tableRowRecord.equipmentId"
                                          :maintenanceCategory="'POINT_INSPECTION'" disabled
                                          @autocompleteForm="autoCompleteForm"/>
            </a-form-model-item>
          </a-col>
          <a-col :span='span'>
            <a-form-model-item label="标准名称">
              <a-input readOnly v-model="tableRowRecord.standardName"/>
            </a-form-model-item>
          </a-col>
        </a-row>
                </a-row>
        <a-row>
          <a-col :span='span'>
            <a-form-model-item label="标准编码">
              <a-input readOnly v-model="tableRowRecord.standardCode"/>
            </a-form-model-item>
          </a-col>
          <a-col :span='span'>
            <a-form-model-item label="点检日期">
              <a-input v-model="tableRowRecord.inspectionDate" readOnly/>
            </a-form-model-item>
          </a-col>
          <a-col :span='span'>
            <a-form-model-item label="点检过期时间">
              <a-input v-model="tableRowRecord.expirationTime" readOnly/>
            </a-form-model-item>
          </a-col>
        </a-row>
                <a-row>
                  <a-col :span='span'>
                    <a-form-model-item label="规范名称">
                      <a-input readOnly v-model="tableRowRecord.standardName"/>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span='span'>
                    <a-form-model-item label="规范编码">
                      <a-input readOnly v-model="tableRowRecord.standardCode"/>
                    </a-form-model-item>
                  </a-col>
        <a-row>
          <a-col :span='span'>
            <a-form-model-item label="保养周期">
              <a-input v-model="tableRowRecord.maintenancePeriod" readOnly/>
            </a-form-model-item>
                </a-row>
                <a-row>
                  <a-col :span='span'>
                    <a-form-model-item label="点检日期">
                      <a-input v-model="tableRowRecord.inspectionDate" readOnly/>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span='span'>
                    <a-form-model-item label="点检过期时间">
                      <a-input v-model="tableRowRecord.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="tableRowRecord.maintenancePeriod" readOnly/>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span='span'>
                    <a-form-model-item label="点检人">
                      <a-input v-model="tableRowRecord.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="tableRowRecord.remark" rows="3" readOnly/>
                    </a-form-model-item>
                  </a-col>
                </a-row>
              </a-tab-pane>
            </a-tabs>
          </a-col>
          <a-col :span='span'>
            <a-form-model-item label="点检人">
              <a-input v-model="tableRowRecord.operator_dictText" readOnly/>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row>
          <a-col :span="span*3">
            <a-form-model-item label="备注" :labelCol="{span:2}" :wrapperCol="{span:21}">
              <a-textarea v-model="tableRowRecord.remark" rows="3" readOnly/>
            </a-form-model-item>
          </a-col>
        </a-row>
          <a-col :span="!isDisplayConfirm?16:10">
            <a-tabs :active-key="activeTabKey" @change="handleTabChange">
              <a-tab-pane key="1" tab="日点检">
                <j-vxe-table ref="editableDetailTable1" :rowNumber="false" rowSelection bordered
                             alwaysEdit :toolbar="false" keep-source :height="300" :loading="detail.loading"
                             :dataSource="detail.dayInspectionList" :columns="detail.columns"
                             @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>
        <a-row>
          <a-form-model-item prop="imageFilesResult" label="点检图片" :labelCol="{span:2}" :wrapperCol="{span:21}">
            <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3"
                       :disabled="isDisableOperation||!hasInspectionDateArrived"
                       v-model="tableRowRecord.fileList"/>
          </a-form-model-item>
        </a-row>
                  <template v-slot:exceptionDescription="props">
                    <a-textarea style="height: 32px" v-model="props.row.exceptionDescription"
                                :placeholder="props.row.inspectionResult&&props.row.inspectionResult!='NORMAL'?'请输入异常描述':''"
                                :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult=='NORMAL'"/>
                  </template>
        <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">
          保养项信息
        </a-divider>
                  <template v-slot:reportFlag="props">
                    <j-dict-select-tag v-model="props.row.reportFlag"
                                       :placeholder="props.row.inspectionResult&&props.row.inspectionResult!='NORMAL'?'请选择异常是否报修':''"
                                       :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult=='NORMAL'"
                                       dictCode="yn" style="width: 100%"/>
                  </template>
                </j-vxe-table>
              </a-tab-pane>
        <a-tabs v-model="activeTabKey">
          <a-tab-pane key="1" tab="保养项明细">
            <j-vxe-table
              ref="editableDetailTable"
              :rowNumber="false"
              :rowSelection="true"
              :bordered="true"
              :alwaysEdit="true"
              :toolbar="false"
              keep-source
              :height="300"
              :loading="detail.loading"
              :dataSource="detail.dataSource"
              :columns="detail.columns"
              @selectRowChange="handleTableSelectRowChange"
            >
              <template v-slot:inspectionResult="props">
                <j-dict-select-tag v-model="props.row.inspectionResult" dictCode="eam_inspection_result"
                                   :disabled="isDisableOperation"
                                   placeholder="请选择点检结果"
                                   @change="handleInspectionResultSelectChange($event,props.row)"
                                   style="width: 100%"/>
              <a-tab-pane key="2" tab="周点检" forceRender>
                <j-vxe-table ref="editableDetailTable2" :rowNumber="false" rowSelection bordered
                             alwaysEdit :toolbar="false" keep-source :height="300" :loading="detail.loading"
                             :dataSource="detail.weekInspectionList" :columns="detail.columns"
                             @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 style="height: 32px" 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"
                                       :placeholder="props.row.inspectionResult&&props.row.inspectionResult!='NORMAL'?'请选择异常是否报修':''"
                                       :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult=='NORMAL'"
                                       dictCode="yn" style="width: 100%"/>
                  </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>
              <template v-slot:exceptionDescription="props">
                <a-textarea style="height: 32px" v-model="props.row.exceptionDescription"
                            :placeholder="props.row.inspectionResult==='2'?'请输入异常描述':''"
                            :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult==='1'"/>
              </template>
              <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>
              <template v-slot:reportFlag="props">
                <j-dict-select-tag v-model="props.row.reportFlag"
                                   :placeholder="props.row.inspectionResult==='2'?'请选择异常是否报修':''"
                                   :disabled="isDisableOperation||!props.row.inspectionResult||props.row.inspectionResult==='1'"
                                   dictCode="yn"
                                   style="width: 100%"/>
              </template>
            </j-vxe-table>
          </a-tab-pane>
          <a-col v-if="isDisplayConfirm" :span="6">
            <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='tableRowRecord.confirmDealType'
                                         dictCode='approved_rejected'
                                         :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='WAIT_CONFIRM'"/>
                    </a-form-model-item>
                  </a-col>
          <template v-if="selectShenpiData.procInstId">
            <a-tab-pane key='2' tab='流程节点'>
              <a-card :bordered="false">
                <a-timeline>
                  <a-timeline-item v-for="(item,index) in hitaskDataSource" :key="index">
                    <div>
                      <h3 style="font-weight: bold;">{{item.taskName}}</h3>
                      <div>处理人:{{item.assignee_dictText}}</div>
                      <div v-if="index !==0">处理时长:{{item.duration}}</div>
                      <div v-if="item.name !== '提交申请'">处理类型:{{item.sequenceFlowName}}</div>
                      <div v-if="item.description">处理意见:{{item.description}}</div>
                    </div>
                  </a-timeline-item>
                </a-timeline>
              </a-card>
            </a-tab-pane>
            <a-tab-pane key='3' tab='流程图'>
              <img :src="imageSrc" alt="Fetched Image"/>
            </a-tab-pane>
          </template>
          <a-button
            v-if="selectedRowKeys.length>0&&!isDisableOperation&&hasInspectionDateArrived&&activeTabKey==='1'"
            slot="tabBarExtraContent" type="primary"
            @click="handleSelectAllInspectionResult">批量点检正常
          </a-button>
          <!--<a-dropdown slot="tabBarExtraContent" v-if="selectedRowKeys.length>0">-->
          <!--<a-menu slot="overlay">-->
          <!--<a-menu-item key="1" @click="handleSelectAllInspectionResult('正常')">正常</a-menu-item>-->
          <!--<a-menu-item key="2" @click="handleSelectAllInspectionResult('异常')">异常</a-menu-item>-->
          <!--</a-menu>-->
          <!--<a-button> 批量选择点检结果-->
          <!--<a-icon type="down"/>-->
          <!--</a-button>-->
          <!--</a-dropdown>-->
        </a-tabs>
        <template v-if="isDisplayConfirm">
          <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 管理员确认信息
          </a-divider>
          <a-row :gutter="24">
            <a-col :span="12">
              <a-form-model-item prop="confirmDealType" label="处理类型">
                <j-dict-select-tag type='radio' v-model='tableRowRecord.confirmDealType' dictCode='approved_rejected'
                                   :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='WAIT_CONFIRM'"/>
              </a-form-model-item>
            </a-col>
            <a-col :span="12">
              <a-form-model-item prop="confirmComment" label="处理意见">
                <a-textarea placeholder="请输入处理意见"
                            :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='WAIT_CONFIRM'"
                            v-model="tableRowRecord.confirmComment"/>
              </a-form-model-item>
            </a-col>
          </a-row>
        </template>
                  <a-col :span="24">
                    <a-form-model-item prop="confirmComment" label="处理意见">
                      <a-textarea placeholder="请输入处理意见"
                                  :disabled="disableSubmit||tableRowRecord.inspectionStatus!=='WAIT_CONFIRM'"
                                  v-model="tableRowRecord.confirmComment"/>
                    </a-form-model-item>
                  </a-col>
                </a-row>
              </a-tab-pane>
            </a-tabs>
          </a-col>
        </a-row>
      </a-form-model>
    </a-spin>
  </j-modal>
</template>
<script>
  import '@assets/less/TableExpand.less'
  import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage'
  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'
@@ -210,12 +193,10 @@
    },
    data() {
      return {
        span: 8,
        span: 12,
        confirmLoading: false,
        spinning: false,
        tableRowRecord: {},
        assignFileStream: {},
        hitaskDataSource: [],
        validatorRules: {
          confirmDealType: [
            { required: true, message: '请选择处理类型' }
@@ -227,31 +208,29 @@
        imageSrc: null,
        labelCol: {
          xs: { span: 24 },
          sm: { span: 6 }
          sm: { span: 9 }
        },
        wrapperCol: {
          xs: { span: 30 },
          sm: { span: 16 }
          sm: { span: 15 }
        },
        visible: false,
        // 表头
        url: {
          // queryBomDataById: '/eam/eamInspectionOrder/selectVoById',
          diagramView: '/assign/flow/diagramView',
          queryHisTaskList: '/assign/flow/queryHisTaskList',
          approve: '/eam/eamInspectionOrder/approval',
          queryById: '/eam/eamInspectionOrder/queryById',
          detailList: '/eam/eamInspectionOrderDetail/queryList'
          detailList: '/eam/eamInspectionOrderDetail/queryList',
          weekInspectionOrderList: '/eam/eamWeekInspectionDetail/queryStandardList'
        },
        detail: {
          loading: false,
          dataSource: [],
          columns: [
            {
              title: '序号',
              key: 'itemCode',
              type: JVXETypes.normal,
              width: '5%',
              width: 60,
              align: 'center',
              fixed: 'left'
            },
@@ -259,7 +238,6 @@
              title: '保养项',
              key: 'itemName',
              type: JVXETypes.normal,
              width: '15%',
              align: 'center',
              fixed: 'left'
            },
@@ -267,7 +245,6 @@
              title: '保养要求',
              key: 'itemDemand',
              type: JVXETypes.normal,
              width: '15%',
              align: 'center',
              fixed: 'left'
            },
@@ -276,10 +253,9 @@
              key: 'inspectionResult',
              type: JVXETypes.slot,
              slotName: 'inspectionResult',
              width: '15%',
              align: 'center',
              validateRules: [
                { required: true, message: '${title}不能为空!' }
                { required: true, message: '${title}不能为空' }
              ]
            },
            {
@@ -287,7 +263,6 @@
              key: 'exceptionDescription',
              type: JVXETypes.slot,
              slotName: 'exceptionDescription',
              width: '20%',
              align: 'center',
              validateRules: [
                { handler: this.customValidator }
@@ -298,24 +273,24 @@
              key: 'reportFlag',
              type: JVXETypes.slot,
              slotName: 'reportFlag',
              width: '20%',
              align: 'center',
              validateRules: [
                { handler: this.customValidator }
              ]
            }
          ]
          ],
          dayInspectionList: [],
          weekInspectionList: [],
          weekInspectionFinishedFlag: false
        },
        selectedRowKeys: [],
        selectedDayInspectionRowKeys: [],
        selectedWeekInspectionRowKeys: [],
        disableSubmit: false,
        activeTabKey: '1',
        title: ''
      }
    },
    computed: {
      hasInspectionDateArrived() {
        return moment(this.tableRowRecord.inspectionDate).diff(moment(), 'hours') <= 0
      },
      isDisplayConfirm() {
        return ['WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.inspectionStatus)
      },
@@ -334,11 +309,6 @@
          const param = { procInstId }
          const imageParam = { processDefinitionId, processInstanceId, TaskDefinitionKey: processDefinitionKey }
          const that = this
          getAction(this.url.queryHisTaskList, param)
            .then(res => {
              that.hitaskDataSource = res.result
            })
          downFile(this.url.diagramView, imageParam, 'get')
            .then((res => {
@@ -360,22 +330,70 @@
       */
      async getBasicInformation(record) {
        this.activeTabKey = '1'
        this.detail.dataSource = []
        this.detail.dayInspectionList = this.detail.weekInspectionList = []
        this.spinning = true
        const param = { id: record.dataId }
        let res = await getAction(this.url.queryById, param);
        this.tableRowRecord = Object.assign({}, res.result);
        if (this.tableRowRecord.imageFiles) {
          let obj = JSON.parse(this.tableRowRecord.imageFiles)
          this.tableRowRecord.fileList = [...obj]
        }
        await this.loadDetail(record.dataId)
        let res = await getAction(this.url.queryById, param)
        this.tableRowRecord = Object.assign({}, res.result)
        this.getDayInspectionOrderListByApi(record.dataId)
        console.log('record', record)
        this.getWeekInspectionOrderListByApi(this.tableRowRecord.standardId)
      },
      /**
       * 获取点检工单中的日点检列表
       * @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) {
        console.log('standardId-------------------------', standardId)
        getAction(this.url.weekInspectionOrderList, { standardId, inspectionDate: this.tableRowRecord.inspectionDate })
          .then(res => {
            if (res.success) {
              this.detail.weekInspectionList = res.result.list
              this.detail.weekInspectionFinishedFlag = res.result.weekInsFlag
            }
          })
          .finally(() => {
            this.spinning = false
          })
      },
      handleTabChange(tabKey) {
        if (this.activeTabKey == '1') this.$refs.editableDetailTable1.clearValidate()
        this.activeTabKey = tabKey
      },
      // 提交事件
      async submitForm() {
        let errMap = await this.$refs.editableDetailTable.validateTable()
        let errMap = await this.$refs.editableDetailTable1.validateTable()
        if (errMap) {
          console.log('err', errMap)
          if (this.activeTabKey != '1') {
            this.activeTabKey = '1'
            // 内部校验提示因tab切换时定位出现问题因此在此处清楚内部校验提示,增加notification提示
            this.$refs.editableDetailTable1.clearValidate()
            this.$notification.warning({
              message: '消息',
              description: '日点检结果不能为空'
            })
          }
          return
        }
@@ -387,22 +405,26 @@
            flowTaskVo.taskId = this.selectShenpiData.id
            flowTaskVo.userId = this.selectShenpiData.assignee
            flowTaskVo.instanceId = this.selectShenpiData.procInstId
            flowTaskVo.values = this.selectShenpiData.variables
            flowTaskVo.confirmDealType = this.tableRowRecord.confirmDealType
            flowTaskVo.confirmComment = this.tableRowRecord.confirmComment
            flowTaskVo.fileList = this.tableRowRecord.fileList
            flowTaskVo.tableDetailList = this.$refs.editableDetailTable.getTableData()
            flowTaskVo.tableDetailList = this.$refs.editableDetailTable1.getTableData()
            if (!this.detail.weekInspectionFinishedFlag) flowTaskVo.tableWeekDetailList = this.$refs.editableDetailTable2.getTableData()
            const that = this
            console.log('表单提交数据', flowTaskVo)
            httpAction(this.url.approve, flowTaskVo, 'post')
            postAction(this.url.approve, flowTaskVo)
              .then((res) => {
                if (res.success) {
                  that.$message.success(res.message)
                  that.$notification.success({
                    message: '消息',
                    description: res.message
                  })
                  //刷新表格
                  that.$emit('searchReset')
                  that.$emit('modalFormOk')
                  that.handleCancel()
                } else {
                  that.$message.warning(res.message)
                  that.$notification.warning({
                    message: '消息',
                    description: res.message
                  })
                }
              })
              .finally(() => {
@@ -422,24 +444,37 @@
      // 批量选择所有点检结果
      handleSelectAllInspectionResult() {
        this.selectedRowKeys.forEach(key => {
          const dataItem = this.detail.dataSource.find(item => item.id === key)
          if (dataItem && dataItem.inspectionResult !== '1') {
        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 = '1'
            dataItem.inspectionResult = 'NORMAL'
          }
        })
        this.$refs.editableDetailTable.clearCheckboxRow()
        this.selectedRowKeys = []
        this.$refs['editableDetailTable' + this.activeTabKey].clearCheckboxRow()
        this['selected' + prefix.charAt(0).toUpperCase() + prefix.slice(1) + 'InspectionRowKeys'] = []
      },
      /**
       * 表格多选框发生改变时触发
       * @param {selectedRowIds} 表格中已选择的ID列表
       * @param key 点检区分key
       */
      handleTableSelectRowChange({ selectedRowIds }) {
        this.selectedRowKeys = selectedRowIds
      handleTableSelectRowChange({ selectedRowIds }, key) {
        this['selected' + key + 'InspectionRowKeys'] = selectedRowIds
      },
      /**
@@ -452,10 +487,16 @@
        if (record.reportFlag) delete record.reportFlag
      },
      /**
       * 异常描述与异常是否保修字段自定义校验方法
       * @param cellValue  单元格内的值
       * @param row  当前行记录
       * @param callback 结果回调函数
       */
      customValidator({ cellValue, row }, callback) {
        if (row.inspectionResult === '2') {
        if (this.activeTabKey == '1' && row.inspectionResult != 'NORMAL') {
          if (!cellValue) {
            callback(false, '${title}不能为空!') // false = 未通过,可以跟自定义提示
            callback(false, '请输入${title}') // false = 未通过,可以跟自定义提示
          } else {
            callback(true) // true = 通过验证
          }
@@ -465,23 +506,9 @@
      },
      handleCancel() {
        this.selectedRowKeys = []
        this.selectedDayInspectionRowKeys = this.selectedWeekInspectionRowKeys = []
        this.visible = false
      },
      //标准选择变化
      loadDetail(orderId) {
        if (orderId) {
          getAction(this.url.detailList, { orderId: orderId })
            .then(res => {
              if (res.success) {
                this.detail.dataSource = [...res.result]
              }
            })
            .finally(() => {
              this.spinning = false
            })
        }
      },
      }
    }
  }
</script>
@@ -489,6 +516,4 @@
  /deep/ .ant-select-dropdown-menu {
    text-align: left;
  }
  @import '~@assets/less/common.less';
</style>