qushaowei
2023-10-24 9d3b355061393f9dd031c1d8aaf124564d9c0d19
src/views/eam/SpecialtyMaintenanceOrderList.vue
@@ -1,7 +1,7 @@
<template>
  <a-card
    :bordered="false"
    title="专业保养工单"
    title="预防性保养工单"
  >
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
@@ -126,6 +126,7 @@
        :loading="loading"
        class="j-table-force-nowrap"
        @change="handleTableChange"
        :rowClassName="tableRowClass"
      >
        <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
        <span
@@ -199,7 +200,7 @@
            v-has="'specialtyMaintenanceOrder:assign'"
          >派工</a>
          <a
            v-if="record.status == '2'&& record.assignMode == '3'  && record.inspectionUserName != null  "
            v-if="record.status == '2'&& record.assignMode == '3'  && record.maintenanceUserName != null  "
            @click="handleAssignOrder(record)"
            v-has="'specialtyMaintenanceOrder:assign'"
          >改派</a>
@@ -327,16 +328,7 @@
            return parseInt(index) + 1;
          }
        },
        {
          title: '状态',
          align: "center",
          dataIndex: 'statusName'
        },
        {
          title: '维保方式',
          align: "center",
          dataIndex: 'maintenanceMode'
        },
        {
          title: '保养工单号',
          align: "center",
@@ -344,7 +336,7 @@
          scopedSlots: { customRender: 'num' }
        },
        {
          title: '对象部门',
          title: '使用部门',
          align: "center",
          dataIndex: 'departName',
        },
@@ -372,6 +364,16 @@
          title: '责任班组',
          align: "center",
          dataIndex: 'teamName',
        },
        {
          title: '状态',
          align: "center",
          dataIndex: 'statusName'
        },
        {
          title: '维保方式',
          align: "center",
          dataIndex: 'maintenanceMode'
        },
        // {
        //   title: '工时定额/每小时',
@@ -573,9 +575,44 @@
    //   //清空列表选中
    //   this.onClearSelected()
    // },
    //预警颜色
    tableRowClass(record, index) {
      if ("1" == record.status || "2" == record.status) {
        if (record.yellowWarningTime < record.currentDateTime && record.currentDateTime < record.redWarningTime) {
          return 'yellow'
        } else if (record.redWarningTime < record.currentDateTime && record.currentDateTime < record.planStartTime) {
          return 'error'
        } else if (record.planStartTime < record.currentDateTime) {
          return 'frozenRowClass'
        }
      }
    },
  }
}
</script>
<style scoped>
<style >
@import '~@assets/less/common.less';
.frozenRowClass {
  color: #c9c9c9;
  font-weight: bold;
}
.success {
  color: green;
}
.error {
  color: red;
  font-weight: bold;
}
.yellow {
  color: yellow;
  font-weight: bold;
}
.fontweight {
  font-weight: bold;
}
.ant-table-tbody .red {
  background-color: red !important;
}
</style>