WXL (wul)
13 小时以前 e9f35f9782f3d99d742c294fe503fc1294f203c4
src/views/followvisit/discharge/index.vue
@@ -243,6 +243,17 @@
            </div>
          </div>
        </el-col>
        <div class="color-legend">
          <span class="legend-item" v-if="orgname == '省立同德翠苑院区'">
            <span class="legend-block legend-blue"></span>未到随访时间
          </span>
          <span class="legend-item">
            <span class="legend-block legend-red"></span>填报内容存在异常
          </span>
          <span class="legend-item">
            <span class="legend-block legend-yellow"></span>填报内容存在警告
          </span>
        </div>
      </el-row>
      <div class="selected-info">
        已选中
@@ -2309,14 +2320,41 @@
        this.getList();
      });
    },
    // 异常列渲染
    // 行颜色渲染:蓝色(未到随访时间) / 红色(异常) / 黄色(警告)
    tableRowClassName({ row, rowIndex }) {
      // 当前时间小于应随访时间且任务状态为待随访 → 整行蓝色(南华大学附属第一医院不生效)
      if (
        this.orgname == "南华大学附属第一医院" &&
        row.sendstate == 2 &&
        this.isBeforeVisitTime(row.visitTime)
      ) {
        return "blue-row";
      }
      if (row.excep == 1) {
        return "warning-row";
      } else if (row.excep == 2) {
        return "remind-row";
      }
      return "";
    },
    // 判断当前时间是否早于应随访时间(按“天”比较)
    isBeforeVisitTime(visitTime) {
      if (!visitTime) return false;
      let date;
      if (typeof visitTime === "number") {
        date = new Date(visitTime);
      } else {
        date = new Date(String(visitTime).replace(/-/g, "/"));
      }
      if (isNaN(date.getTime())) return false;
      const now = new Date();
      const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
      const visitDay = new Date(
        date.getFullYear(),
        date.getMonth(),
        date.getDate()
      );
      return today.getTime() < visitDay.getTime();
    },
    restoreSelection() {
      if (!this.$refs.userform) {
@@ -2549,12 +2587,46 @@
::v-deep.el-table .remind-row {
  background: #fcf5aa;
}
::v-deep.el-table .blue-row {
  background: #c6e2ff;
}
.documentf {
  display: flex;
  justify-content: flex-end;
}
.color-legend {
  float: right;
  display: flex;
  align-items: center;
  height: 40px;
  gap: 16px;
  margin-right: 5px;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  color: #666;
}
.legend-block {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-right: 6px;
}
.legend-blue {
  background: #9cc9fa;
}
.legend-red {
  background: #f1aaaa;
}
.legend-yellow {
  background: #faf18d;
}
.download {
  text-align: center;