WXL (wul)
8 天以前 b4fe2c16274a91fee4fb26d91374f95fbe2dbcec
src/views/sfstatistics/percentage/components/CombinedFollowUp.vue
@@ -621,6 +621,46 @@
          </el-table-column>
        </el-table-column>
        <!-- ===== 随访情况(丽水市中医院,从首次随访移入) ===== -->
        <el-table-column align="center" label="随访情况">
          <el-table-column
            label="正常语音"
            align="center"
            width="100"
            prop="taskSituation1"
          />
          <el-table-column
            label="患者拒接或拒访"
            align="center"
            width="100"
            prop="taskSituation2"
          />
          <el-table-column
            label="面访或者接诊"
            align="center"
            width="100"
            prop="taskSituation3"
          />
          <el-table-column
            label="微信随访"
            align="center"
            width="100"
            prop="taskSituation4"
          />
          <el-table-column
            label="随访电话不正确"
            align="center"
            width="100"
            prop="taskSituation5"
          />
          <el-table-column
            label="其他情况不宜随访"
            align="center"
            width="100"
            prop="taskSituation6"
          />
        </el-table-column>
        <!-- ===== 新增计算指标 ===== -->
        <el-table-column
          label="随访率"
@@ -662,6 +702,39 @@
            >
              <span class="button-zx">{{ scope.row.manuallyCalled }}</span>
            </el-button>
          </template>
        </el-table-column>
        <el-table-column
          label="再次随访推送人数"
          align="center"
          prop="againFollowUpPushCount"
        >
          <template slot-scope="scope">
            <el-button
              type="text"
              @click="
                handleViewDetails(
                  scope.row,
                  'againFollowUpPushCountInfo',
                  '再次随访推送列表',
                  '1'
                )
              "
            >
              <span class="button-zx">{{
                scope.row.againFollowUpPushCount
              }}</span>
            </el-button>
          </template>
        </el-table-column>
        <el-table-column
          label="追踪随访推送率"
          align="center"
          prop="againFollowUpPushRate"
          :render-header="TooltipAgainFollowUpPushRate"
        >
          <template slot-scope="scope">
            <span>{{ calculateAgainFollowUpPushRate(scope.row) }}</span>
          </template>
        </el-table-column>
      </el-table>
@@ -979,6 +1052,14 @@
      return ((successAgain / denominator) * 100).toFixed(2) + "%";
    },
    // 追踪随访推送率 = 再次随访推送人数 / 出院人次
    calculateAgainFollowUpPushRate(row) {
      const pushCount = Number(row.againFollowUpPushCount) || 0;
      const discharge = Number(row.dischargeCount) || 0;
      if (discharge <= 0) return "0.00%";
      return ((pushCount / discharge) * 100).toFixed(2) + "%";
    },
    // ===================== 汇总 =====================
    getSummaries(param) {
      const { columns, data } = param;
@@ -1020,6 +1101,19 @@
            sums[index] =
              (values.reduce((a, b) => a + b, 0) / values.length).toFixed(2) +
              "%";
        } else if (prop === "againFollowUpPushRate") {
          const totalPush = data.reduce(
            (s, row) => s + (Number(row.againFollowUpPushCount) || 0),
            0
          );
          const totalDischarge = data.reduce(
            (s, row) => s + (Number(row.dischargeCount) || 0),
            0
          );
          sums[index] =
            totalDischarge > 0
              ? ((totalPush / totalDischarge) * 100).toFixed(2) + "%"
              : "0.00%";
        } else {
          // 数字列求和
          const values = data.map((item) => Number(item[prop]) || 0);
@@ -1714,6 +1808,19 @@
        [h("span", column.label)]
      );
    },
    TooltipAgainFollowUpPushRate(h, { column }) {
      return h(
        "el-tooltip",
        {
          props: {
            content: "再次随访推送人数/出院人次",
            placement: "top",
            effect: "dark",
          },
        },
        [h("span", column.label)]
      );
    },
  },
};
</script>