WXL (wul)
6 天以前 fb34ba28cb908bd328cf6690ab0b19a56428f4e2
src/views/Satisfaction/sfstatistics/components/FollowupStatistics.vue
@@ -9,7 +9,11 @@
        label-width="100px"
        class="query-form"
      >
        <el-form-item label="满意度类型" prop="satisfactionScope">
        <el-form-item
          v-if="isTongdeOrg"
          label="满意度类型"
          prop="satisfactionScope"
        >
          <el-select
            v-model="satisfactionScope"
            placeholder="默认在院"
@@ -546,7 +550,7 @@
  created() {
    this.orgname = localStorage.getItem("orgname");
    this.queryParams.serviceType = this.isTongdeOrg ? [6] : [2];
    this.initData();
    // 顶部患者表单 / 问题详情分析 tab:默认按当前统计口径加载一次
    this.maybeRefreshCompletedGroups();
@@ -567,6 +571,7 @@
      this.options = (this.$store.getters.tasktypes || []).map((o) =>
        labelFix[o.label] ? { ...o, label: labelFix[o.label] } : o
      );
      console.log(11, this.options);
      // 获取科室列表
      this.flatArraydept = (this.$store.getters.belongDepts || []).map(
@@ -671,7 +676,10 @@
      }
    },
    sortChineseNumber(aRow, bRow) {
      return this.compareWardNames(this.getWardName(aRow), this.getWardName(bRow));
      return this.compareWardNames(
        this.getWardName(aRow),
        this.getWardName(bRow)
      );
    },
    sortHospitalWard(aRow, bRow) {
      return this.compareWardNames(
@@ -984,9 +992,7 @@
      // 病区统计(含统计类型为空的情况)
      if (this.queryParams.statisticaltype != 2) {
        const rawSelected = this.queryParams.leavehospitaldistrictcodes || [];
        const selected = rawSelected.filter(
          (code) => code && code !== "all"
        );
        const selected = rawSelected.filter((code) => code && code !== "all");
        const useAll = !rawSelected.length || rawSelected.includes("all");
        if (!useAll && selected.length) {
@@ -1142,8 +1148,7 @@
    buildCompletedMeta() {
      return {
        dimension:
          this.queryParams.statisticaltype == 2 ? "dept" : "ward",
        dimension: this.queryParams.statisticaltype == 2 ? "dept" : "ward",
        scope: this.satisfactionScope,
        dateRange: [...(this.queryParams.dateRange || [])],
      };
@@ -1151,24 +1156,20 @@
    // 按当前统计类型分组:病区统计 -> 病区,科室统计 -> 科室
    groupCompletedRows(rows) {
      const dimension =
        this.queryParams.statisticaltype == 2 ? "dept" : "ward";
      const dimension = this.queryParams.statisticaltype == 2 ? "dept" : "ward";
      const groupMap = new Map();
      (rows || []).forEach((row) => {
        const name =
          dimension === "ward" ? this.wardNameOf(row) : this.deptNameOf(row);
        const code =
          dimension === "ward"
            ? this.wardCodeOf(row)
            : this.deptCodeOf(row);
          dimension === "ward" ? this.wardCodeOf(row) : this.deptCodeOf(row);
        const key = String(code || name || "unknown");
        if (!groupMap.has(key)) {
          groupMap.set(key, {
            key,
            label:
              name || (dimension === "ward" ? "未分病区" : "未分科室"),
            label: name || (dimension === "ward" ? "未分病区" : "未分科室"),
            rows: [],
          });
        }
@@ -1193,8 +1194,7 @@
      const orderMap = new Map();
      (list || []).forEach((item, index) => {
        const code =
          dimension === "ward" ? item.districtCode : item.deptCode;
        const code = dimension === "ward" ? item.districtCode : item.deptCode;
        if (code) orderMap.set(String(code), index);
      });