WXL (wul)
12 小时以前 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">
        已选中
@@ -311,7 +322,55 @@
          :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          v-if="orgname == '浙江省新华医院'"
          label="任务状态"
          align="center"
          key="sendstate"
          prop="sendstate"
          width="120"
        >
          <template slot-scope="scope">
            <el-tooltip
              class="item"
              effect="dark"
              :content="scope.row.remark"
              placement="top-start"
            >
              <div v-if="scope.row.sendstate == 1">
                <el-tag type="primary" :disable-transitions="false"
                  >表单已领取</el-tag
                >
              </div>
              <div v-if="scope.row.sendstate == 2">
                <el-tag type="primary" :disable-transitions="false"
                  >待随访</el-tag
                >
              </div>
              <div v-if="scope.row.sendstate == 3">
                <el-tag type="success" :disable-transitions="false"
                  >表单已发送</el-tag
                >
              </div>
              <div v-if="scope.row.sendstate == 4">
                <el-tag type="info" :disable-transitions="false">不执行</el-tag>
              </div>
              <div v-if="scope.row.sendstate == 5">
                <el-tag type="danger" :disable-transitions="false"
                  >发送失败</el-tag
                >
              </div>
              <div v-if="scope.row.sendstate == 6">
                <el-tag type="success" :disable-transitions="false"
                  >已完成</el-tag
                >
              </div>
              <div v-if="scope.row.sendstate == 7">
                <el-tag type="danger" :disable-transitions="false">超时</el-tag>
              </div>
            </el-tooltip>
          </template>
        </el-table-column>
        <el-table-column
          label="随访状态"
          align="center"
@@ -460,6 +519,7 @@
          width="120"
        />
        <el-table-column
          v-if="orgname != '浙江省新华医院'"
          label="任务状态"
          align="center"
          key="sendstate"
@@ -1124,7 +1184,7 @@
      inputVisible: false,
      Labelchange: false,
      ycvalue: 0,
      jgvalue: "",
      jgvalue: 0,
      yfsvalue: "",
      inputValue: "",
      preachform: "",
@@ -1295,7 +1355,8 @@
        visitCount: 1,
        scopetype: [],
        managementDoctor:
          localStorage.getItem("orgname") == "缙云县人民医院"||localStorage.getItem("orgname") == "丽水市中医院"
          localStorage.getItem("orgname") == "缙云县人民医院" ||
          localStorage.getItem("orgname") == "丽水市中医院"
            ? store.getters.nickName
            : "",
        leaveldeptcodes: [],
@@ -1496,7 +1557,7 @@
    async getList(refresh) {
      // 默认全部
      this.applyDeptWardScope();
      if (this.endOut == 0) {
      if (this.endOut == 0 && !this.topqueryParams.endSendDateTime) {
        this.topqueryParams.endSendDateTime = this.formatDateToYYYYMMDDHHMMSS(
          this.getEndOfDay()
        );
@@ -1836,16 +1897,12 @@
      if (hasDept && hasWard) {
        if (this.lastScopeType == 1) {
          // 上次选了科室,这次新增病区 → 保留病区
          this.topqueryParams.scopetype = value.filter(
            (item) => item[0] === 2
          );
          this.topqueryParams.scopetype = value.filter((item) => item[0] === 2);
          this.lastScopeType = 2;
          this.$message.warning("科室和病区不能同时选择,已切换为病区");
        } else {
          // 上次选了病区,这次新增科室 → 保留科室
          this.topqueryParams.scopetype = value.filter(
            (item) => item[0] === 1
          );
          this.topqueryParams.scopetype = value.filter((item) => item[0] === 1);
          this.lastScopeType = 1;
          this.$message.warning("科室和病区不能同时选择,已切换为科室");
        }
@@ -2263,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) {
@@ -2413,21 +2497,27 @@
      if (val && val.length) {
        this.transferForm.leavelDeptCode = val[val.length - 1];
        // 从选项树中查找对应名称
        const node = this.findCascaderNode(this.deptOptionsks, this.transferForm.leavelDeptCode);
        this.transferForm.leavelDeptName = node ? node.label : '';
        const node = this.findCascaderNode(
          this.deptOptionsks,
          this.transferForm.leavelDeptCode
        );
        this.transferForm.leavelDeptName = node ? node.label : "";
      } else {
        this.transferForm.leavelDeptCode = '';
        this.transferForm.leavelDeptName = '';
        this.transferForm.leavelDeptCode = "";
        this.transferForm.leavelDeptName = "";
      }
    },
    handleWardCascaderChange(val) {
      if (val && val.length) {
        this.transferForm.leavehospitaldistrictcode = val[val.length - 1];
        const node = this.findCascaderNode(this.deptOptionsbq, this.transferForm.leavehospitaldistrictcode);
        this.transferForm.leavehospitaldistrictname = node ? node.label : '';
        const node = this.findCascaderNode(
          this.deptOptionsbq,
          this.transferForm.leavehospitaldistrictcode
        );
        this.transferForm.leavehospitaldistrictname = node ? node.label : "";
      } else {
        this.transferForm.leavehospitaldistrictcode = '';
        this.transferForm.leavehospitaldistrictname = '';
        this.transferForm.leavehospitaldistrictcode = "";
        this.transferForm.leavehospitaldistrictname = "";
      }
    },
    findCascaderNode(options, code) {
@@ -2483,8 +2573,8 @@
<style lang="scss" scoped>
.el-button--primary.is-plain {
  color: #ffffff;
  background: #409eff;
  border-color: #4fabe9;
  background: #5b7cfa;
  border-color: #5b7cfa;
}
.document {
@@ -2497,10 +2587,44 @@
::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 {
@@ -2717,4 +2841,75 @@
  font-size: 14px;
  color: #666;
}
/* ================= 清新高级简约风 ================= */
.app-container {
  background: #f5f7fb;
  border-radius: 14px;
  padding: 20px;
}
/* 查询表单:白色圆角卡片 */
::v-deep .el-form--inline {
  background: #ffffff;
  border-radius: 14px;
  padding: 22px 22px 8px;
  margin-bottom: 18px;
  box-shadow: 0 2px 12px rgba(31, 45, 61, 0.05);
}
/* 隐藏分割线 */
::v-deep .el-divider {
  display: none;
}
/* 工具栏底部间距 */
.mb8 {
  margin-bottom: 18px;
}
/* 按钮:圆角 + 柔和过渡 */
::v-deep .el-button {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.25s ease;
}
/* 主按钮:清新靛蓝 */
::v-deep .el-button--primary:not(.is-plain) {
  background: #5b7cfa;
  border-color: #5b7cfa;
}
::v-deep .el-button--primary:not(.is-plain):hover,
::v-deep .el-button--primary:not(.is-plain):focus {
  background: #7593fb;
  border-color: #7593fb;
}
/* 表格:白色圆角卡片 + 柔和表头 */
::v-deep .el-table {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(31, 45, 61, 0.05);
}
::v-deep .el-table::before {
  display: none;
}
::v-deep .el-table th {
  background: #f7f9fd !important;
  color: #3f4d63;
  font-weight: 600;
}
::v-deep .el-table td {
  padding: 12px 0;
}
/* 标签圆角 */
::v-deep .el-tag {
  border-radius: 6px;
}
/* 分页间距 */
::v-deep .pagination-container {
  padding-top: 18px;
}
</style>