src/views/eam/repair/EamReportAccidentsRegisterList.vue
@@ -26,9 +26,22 @@
      </a-form>
    </div>
    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <a-button @click="handleBatchPrint" type="primary" icon="monitor" :disabled="selectedRowKeys.length===0">批量预览
      </a-button>
    </div>
    <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
      <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{
      selectedRowKeys.length }}</a>项
      <a style="margin-left: 24px" @click="onClearSelected">清空</a>
    </div>
    <!-- table区域-begin -->
    <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
             :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}" @change="handleTableChange">
             :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}" @change="handleTableChange"
             :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
      <!--是否有设备操作证-->
      <template slot="operationCertificate" slot-scope="text">
@@ -55,6 +68,11 @@
        <a-switch v-if="text" checked-children="同意" un-checked-children="不同意" :checked="Boolean(text)" disabled/>
      </template>
      <!--使用部门-->
      <template slot="factoryOrgCode" slot-scope="text,record">
        {{[record.zxfactoryOrgCode_dictText].filter(item=>item).join('/')}}
      </template>
      <span slot="action" slot-scope="text, record">
          <template v-if="record.registerStatus==='PENDING_SUBMIT'">
             <a @click="handleEdit(record)">编辑</a>
@@ -67,6 +85,19 @@
          <a v-else @click="handleDetail(record)">详情</a>
        </span>
      <!--字符串超长截取省略号显示-->
      <span slot="accidentPhenomenon" slot-scope="text">
          <j-ellipsis :value="text" :length="8"/>
      </span>
      <!--字符串超长截取省略号显示-->
      <span slot="measure" slot-scope="text">
          <j-ellipsis :value="text" :length="8"/>
      </span>
      <!--字符串超长截取省略号显示-->
      <span slot="causingResults" slot-scope="text">
          <j-ellipsis :value="text" :length="8"/>
      </span>
    </a-table>
    <!-- table区域-end -->
@@ -76,6 +107,9 @@
    <!--审批窗口-->
    <report-accidents-register-approval-modal ref="reportAccidentsRegisterApprovalModal"
                                              :selectShenpiData="selectedRowData"/>
    <!--批量打印窗口-->
    <eam-accidents-register-batch-print-modal ref="batchPrintModal"/>
  </a-card>
</template>
@@ -86,11 +120,13 @@
  import { getAction } from '@/api/manage'
  import ReportAccidentsRegisterApprovalModal
    from '../../flowable/workflow/repairOrder/ReportAccidentsRegisterApprovalModal'
  import EamAccidentsRegisterBatchPrintModal from './modules/EamAccidentsRegisterBatchPrintModal'
  export default {
    name: 'EamReportAccidentsRegisterList',
    mixins: [JeecgListMixin],
    components: {
      EamAccidentsRegisterBatchPrintModal,
      ReportAccidentsRegisterApprovalModal,
      LxSearchEquipmentSelect,
      EamReportAccidentsRegisterModal
@@ -128,6 +164,12 @@
            title: '设备型号',
            align: 'center',
            dataIndex: 'equipmentModel',
            fixed: 'left'
          },
          {
            title: '使用部门',
            align: 'center',
            scopedSlots: { customRender: 'factoryOrgCode' },
            fixed: 'left'
          },
          {
@@ -188,17 +230,20 @@
          {
            title: '事故现象',
            align: 'center',
            dataIndex: 'accidentPhenomenon'
            dataIndex: 'accidentPhenomenon',
            scopedSlots: { customRender: 'accidentPhenomenon' }
          },
          {
            title: '采取措施',
            align: 'center',
            dataIndex: 'measure'
            dataIndex: 'measure',
            scopedSlots: { customRender: 'measure' }
          },
          {
            title: '造成结果',
            align: 'center',
            dataIndex: 'causingResults'
            dataIndex: 'causingResults',
            scopedSlots: { customRender: 'causingResults' }
          },
          {
            title: '操作工',
@@ -347,6 +392,11 @@
            dataIndex: 'technicalDirectorPartTime'
          },
          {
            title: 'HF编码',
            align: 'center',
            dataIndex: 'hfCode'
          },
          {
            title: '操作',
            dataIndex: 'action',
            align: 'center',
@@ -388,6 +438,11 @@
          })
      },
      // 批量打印
      handleBatchPrint() {
        this.$refs.batchPrintModal.handlePreview(this.selectedRowKeys.join())
      },
      /**
       * 点击详情时触发时触发
       * @param record