lyh
10 天以前 2f5227a8f37b5c9be090a20253555411cfa9548c
src/views/eam/repair/EamRepairOrderList.vue
@@ -35,6 +35,7 @@
    <!-- 操作按钮区域 -->
    <div class="table-operator" v-if="isDisplayOperation">
      <a-button type="primary" icon="download" @click="handleExportXls('维修工单台账')">导出</a-button>
      <a-dropdown :disabled="selectedRowKeys.length == 0">
        <a-menu slot="overlay">
          <a-menu-item key="1" @click="handleBatchSubmit">
@@ -61,15 +62,35 @@
               :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"
               :scroll="{x:'max-content'}">
        <span slot="action" slot-scope="text, record">
          <template v-if="record.repairStatus=='PENDING_REPAIR'||record.repairStatus=='UNDER_MAINTENANCE'">
             <a @click="handleFillIn(record)">填报</a>
             <a-divider type="vertical"/>
             <a-popconfirm title="确定提交吗?" @confirm="() => handleSubmit(record.id)">
          <template v-if="record.repairStatus=='PENDING_REPAIR'||record.repairStatus=='UNDER_MAINTENANCE' ||record.repairStatus=='REJECTED'">
            <a-popconfirm v-if="record.claimStatus=='0' || record.claimStatus==null " title="确定提交吗?" @confirm="() => handleClaim(record.id)">
               <a>领取</a>
             </a-popconfirm>
             <a v-if="record.claimStatus=='1'"  @click="handleFillIn(record)">维修</a>
             <a-divider v-if="record.claimStatus=='1'"  type="vertical"/>
             <a-popconfirm v-if="record.claimStatus=='1'" title="确定提交吗?" @confirm="() => handleSubmit(record.id)">
               <a>提交</a>
             </a-popconfirm>
          </template>
          <a v-else @click="handleDetail(record)">详情</a>
        </span>
        <!--字符串超长截取省略号显示-->
        <span slot="faultPhenomenon" slot-scope="text">
          <j-ellipsis :value="text" :length="8"/>
        </span>
        <span slot="faultReason" slot-scope="text">
          <j-ellipsis :value="text" :length="8"/>
        </span>
        <span slot="faultAnalysis" slot-scope="text">
          <j-ellipsis :value="text" :length="8"/>
        </span>
        <span slot="faultProcess" slot-scope="text">
          <j-ellipsis :value="text" :length="8"/>
        </span>
        <span slot="faultPrevent" slot-scope="text">
          <j-ellipsis :value="text" :length="8"/>
        </span>
      </a-table>
    </div>
@@ -146,9 +167,31 @@
            fixed: 'left'
          },
          {
            title: '领取状态',
            align: 'center',
            dataIndex: 'claimStatus_dictText',
            fixed: 'left'
          },
          {
            title: '工单号',
            align: 'center',
            dataIndex: 'repairCode'
            dataIndex: 'repairCode',
          },
          {
            title: '故障类型',
            align: 'center',
            dataIndex: 'faultType_dictText',
          },
          {
            title: '报修人',
            align: 'center',
            dataIndex: 'reportPerson_dictText',
          },
          {
            title: '故障开始时间',
            align: 'center',
            dataIndex: 'faultStartTime',
            width: 200
          },
          {
            title: '维修开始时间',
@@ -163,6 +206,18 @@
            width: 200
          },
          {
            title: '维修时长(小时)',
            align: 'center',
            dataIndex: 'repairDuration',
            width: 200
          },
          {
            title: '故障时长(小时)',
            align: 'center',
            dataIndex: 'faultDuration',
            width: 200
          },
          {
            title: '维修确认',
            align: 'center',
            dataIndex: 'repairConfirm_dictText'
@@ -174,24 +229,34 @@
            width: 200
          },
          {
            title: '故障现象',
            align: 'center',
            dataIndex: 'faultPhenomenon',
            scopedSlots: {customRender: 'faultPhenomenon'},
          },
          {
            title: '故障原因',
            align: 'center',
            dataIndex: 'faultReason'
            dataIndex: 'faultReason',
            scopedSlots: {customRender: 'faultReason'},
          },
          {
            title: '故障分析',
            align: 'center',
            dataIndex: 'faultAnalysis'
            dataIndex: 'faultAnalysis',
            scopedSlots: {customRender: 'faultAnalysis'},
          },
          {
            title: '排故过程',
            align: 'center',
            dataIndex: 'faultProcess'
            dataIndex: 'faultProcess',
            scopedSlots: {customRender: 'faultProcess'},
          },
          {
            title: '预防措施',
            align: 'center',
            dataIndex: 'faultPrevent'
            dataIndex: 'faultPrevent',
            scopedSlots: {customRender: 'faultPrevent'},
          },
          {
            title: '操作工',
@@ -209,8 +274,10 @@
        url: {
          list: '/eam/eamRepairOrder/list',
          submit: '/eam/eamRepairOrder/submit',
          claim: '/eam/eamRepairOrder/claim',
          delete: '/eam/eamRepairOrder/delete',
          deleteBatch: '/eam/eamRepairOrder/deleteBatch'
          deleteBatch: '/eam/eamRepairOrder/deleteBatch',
          exportXlsUrl: "eam/eamRepairOrder/exportXls",
        }
      }
    },
@@ -263,6 +330,29 @@
          })
      },
      /**
       * 点击领取时触发
       * @param id
       */
      handleClaim(id){
        this.loading = true
        getAction(this.url.claim, { id })
          .then(res => {
            if (res.success) {
              this.$notification.success({
                message: '消息',
                description: res.message
              })
              this.loadData()
            } else {
              this.$notification.warning({
                message: '消息',
                description: res.message
              })
              this.loading = false
            }
          })
      },
      // 批量提交时触发
      handleBatchSubmit() {