gaoluyang
2025-05-06 90c8680cbc67d4b2680b1e5af4ad1129a96efa0c
src/views/CNAS/resourceDemand/device/component/management.vue
@@ -33,7 +33,7 @@
    </div>
      <div class="table" v-show="!showData">
         <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 300px)'"
            :page="page" @pagination="pagination"></lims-table>
            :page="page" @pagination="pagination" :row-class-name="tableRowClassName"></lims-table>
      </div>
      <el-dialog :title="isUp ? '设备详情' : '档案修订'" :visible.sync="dialogVisible" width="70%" top="5vh"
         :before-close="handleClose">
@@ -606,6 +606,18 @@
         this.page.size = limit;
         this.getList();
      },
    tableRowClassName({ row }) {
      const today = new Date();
      const targetDate = new Date(row.activationDate);
      const fiveDaysBeforeTarget = new Date(targetDate);
      // 计算前五天的日期
      fiveDaysBeforeTarget.setDate(targetDate.getDate() - 5);
      // 比较时需要确保比较的是完整的日期时间,包含时分秒
      if (today > fiveDaysBeforeTarget) {
        return 'red-row';
      }
      return '';
    },
      refresh() {
         this.queryParams = {};
         this.page.current = 1;