lyh
4 天以前 fd268e6d3d6a310e0d35d0cec53e018b8c4ac4d8
src/views/eam/repair/EamReportAccidentsRegisterList.vue
@@ -50,11 +50,11 @@
    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
      <a-button type="primary" icon="download" @click="handleExportXls('设备事故登记表')">导出</a-button>
      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
        <a-button type="primary" icon="import">导入</a-button>
      </a-upload>
<!--      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!--      <a-button type="primary" icon="download" @click="handleExportXls('设备事故登记表')">导出</a-button>-->
<!--      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!--        <a-button type="primary" icon="import">导入</a-button>-->
<!--      </a-upload>-->
      <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
@@ -79,12 +79,14 @@
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        class="j-table-force-nowrap"
        :scroll="{x:'max-content'}"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        @change="handleTableChange">
        <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">编辑</a>
          <a-divider type="vertical" />
          <a-dropdown>
@@ -119,136 +121,151 @@
    components: {
      EamReportAccidentsRegisterModal
    },
    props: {
      isDisplayOperation: {
        type: Boolean,
        default: true
      },
      propsQueryParam: {
        type: Object
      }
    },
    data () {
      return {
        description: '设备事故登记表管理页面',
        disableMixinCreated: true,
        // 表头
        columns: [
          {
            title: '#',
            dataIndex: '',
            key:'rowIndex',
            width:60,
            key: 'rowIndex',
            width: 60,
            align: 'center',
            customRender: function(t, r, index) {
              return parseInt(index) + 1
            },
            fixed: 'left'
          },
          {
            title: '统一编码',
            align: 'center',
            dataIndex: 'equipmentCode',
            fixed: 'left',
            scopedSlots: { customRender: 'equipmentCode' }
          },
          {
            title: '设备名称',
            align: 'center',
            dataIndex: 'equipmentName',
            fixed: 'left'
          },
          {
            title: '设备型号',
            align: 'center',
            dataIndex: 'equipmentModel',
            fixed: 'left'
          },
            {
            title: '是否有设备操作证',
            align:"center",
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
           },
         {
            title: '删除标记',
            align:"center",
            dataIndex: 'delFlag'
           },
         {
            title: '报修ID',
            align:"center",
            dataIndex: 'reportId'
           },
         {
            title: '设备ID',
            align:"center",
            dataIndex: 'equipmentId'
           },
         {
            title: '是否有设备操作证;是 否',
            align:"center",
            dataIndex: 'operationCertificate'
           },
         {
            dataIndex: 'operationCertificate_dictText'
          },
            {
            title: '是否断电重启',
            align:"center",
            dataIndex: 'powerOffRestart'
           },
         {
            dataIndex: 'powerOffRestart_dictText'
          },
            {
            title: '是否为批次首件',
            align:"center",
            dataIndex: 'batchFirstPiece'
           },
         {
            title: '变动因素;填写是或否',
            dataIndex: 'batchFirstPiece_dictText'
          },
            {
            title: '变动因素',
            align:"center",
            dataIndex: 'variableFactors'
           },
         {
            title: '变动因素内容;刀具更换、工艺更改、加工程序更改、刀具补偿值更改、',
            dataIndex: 'variableFactors_dictText'
          },
            {
            title: '变动因素内容',
            align:"center",
            dataIndex: 'variableFactorsValue'
           },
         {
            dataIndex: 'variableFactorsValue_dictText'
          },
            {
            title: '执行程序',
            align:"center",
            dataIndex: 'executeNc'
           },
         {
          },
            {
            title: '事故现象',
            align:"center",
            dataIndex: 'accidentPhenomenon'
           },
         {
          },
            {
            title: '采取措施',
            align:"center",
            dataIndex: 'measure'
           },
         {
          },
            {
            title: '造成结果',
            align:"center",
            dataIndex: 'causingResults'
           },
         {
          },
            {
            title: '操作工',
            align:"center",
            dataIndex: 'confirmer'
           },
         {
          },
            {
            title: '操作工确认时间',
            align:"center",
            dataIndex: 'confirmTime'
           },
         {
          },
            {
            title: '区长',
            align:"center",
            dataIndex: 'district'
           },
         {
          },
            {
            title: '区长确认时间',
            align:"center",
            dataIndex: 'districtTime'
           },
         {
          },
            {
            title: '中心主任',
            align:"center",
            dataIndex: 'centerDirector'
           },
         {
          },
            {
            title: '中心主任确认时间',
            align:"center",
            dataIndex: 'centerDirectorTime'
           },
         {
          },
            {
            title: '维修开始时间',
            align:"center",
            dataIndex: 'reportStartTime'
           },
         {
          },
            {
            title: '设备状态',
            align:"center",
            dataIndex: 'equipmentStatus'
           },
         {
          },
            {
            title: '原因分析',
            align:"center",
            dataIndex: 'causeAnalysis'
           },
         {
          },
            {
            title: '检查结果',
            align:"center",
            dataIndex: 'inspectionResults'
           },
         {
          },
            {
            title: '采取措施',
            align:"center",
            dataIndex: 'takeSteps'
           },
          },
         {
            title: '建议采取措施',
            align:"center",
@@ -274,7 +291,7 @@
            align:"center",
            dataIndex: 'repairConfirmTime'
           },
         {
              {
            title: '维修组长确认',
            align:"center",
            dataIndex: 'repairGroupLeader'
@@ -354,29 +371,33 @@
            align:"center",
            dataIndex: 'technicalDirectorPartTime'
           },
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            scopedSlots: { customRender: 'action' },
          }
        ],
      url: {
        selectRepairOrderData: {},
        url: {
          list: "/eam/eamReportAccidentsRegister/list",
          delete: "/eam/eamReportAccidentsRegister/delete",
          deleteBatch: "/eam/eamReportAccidentsRegister/deleteBatch",
          exportXlsUrl: "eam/eamReportAccidentsRegister/exportXls",
          importExcelUrl: "eam/eamReportAccidentsRegister/importExcel",
       },
        },
    }
  },
  computed: {
    importExcelUrl: function(){
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    }
  },
    created() {
      if (!this.isDisplayOperation) this.queryParam = Object.assign({}, this.propsQueryParam)
      else {
        const operationColumn = {
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          scopedSlots: { customRender: 'action' },
          width: 200,
          fixed: 'right'
        }
        this.columns = [...this.columns, operationColumn]
      }
      this.loadData(1)
    },
    methods: {
    }
  }
</script>