liusheng
2026-11-02 d6aa663043a23bb37f1c712a19424690c5a2062f
src/views/sfstatistics/percentage/index.vue
@@ -172,6 +172,63 @@
          />
        </el-tab-pane>
        <!-- 出院随访分析:患者表单 + 随访问卷题目占比(表/柱状图/饼图) -->
        <el-tab-pane label="患者随访信息表单" name="followupForm">
          <div v-if="followupTaskName" class="analysis-task-title">
            任务名称:{{ followupTaskName }}
          </div>
          <followup-patient-table
            v-if="activeTab === 'followupForm'"
            ref="followupFormRef"
            :rows="followupRows"
            :meta="followupPatientMeta"
            :loading="followupRowsLoading"
          />
        </el-tab-pane>
        <el-tab-pane label="问题详情占比" name="followupRatio">
          <div v-if="followupTaskName" class="analysis-task-title">
            任务名称:{{ followupTaskName }}
          </div>
          <question-ratio-table
            v-if="activeTab === 'followupRatio'"
            ref="followupRatioRef"
            hide-index
            hide-type
            :topic-list="followupTopics"
            :loading="followupTopicLoading"
          />
        </el-tab-pane>
        <el-tab-pane label="问题详情占比图表" name="followupBar">
          <div v-if="followupTaskName" class="analysis-task-title">
            任务名称:{{ followupTaskName }}
          </div>
          <question-chart
            v-if="activeTab === 'followupBar'"
            ref="followupBarRef"
            view="bar"
            hide-index
            :columns="2"
            :chart-height="320"
            :topic-list="followupTopics"
            :loading="followupTopicLoading"
          />
        </el-tab-pane>
        <el-tab-pane label="问题详情占比饼图" name="followupPie">
          <div v-if="followupTaskName" class="analysis-task-title">
            任务名称:{{ followupTaskName }}
          </div>
          <question-chart
            v-if="activeTab === 'followupPie'"
            ref="followupPieRef"
            view="pie"
            hide-index
            :columns="2"
            :chart-height="320"
            :topic-list="followupTopics"
            :loading="followupTopicLoading"
          />
        </el-tab-pane>
        <el-tab-pane
          label="延续护理统计"
          name="continued"
@@ -230,10 +287,15 @@
import DetailDialog from "./components/DetailDialog.vue";
import TimelyRateDialog from "./components/TimelyRateDialog.vue";
import CombinedFollowUp from "./components/CombinedFollowUp.vue";
import FollowupPatientTable from "./components/FollowupPatientTable.vue";
import QuestionRatioTable from "@/views/Satisfaction/sfstatistics/components/QuestionRatioTable.vue";
import QuestionChart from "@/views/Satisfaction/sfstatistics/components/QuestionChart.vue";
import followupAnalysisMixin from "./followupAnalysisMixin";
import { getSfStatisticsHyperlink } from "@/api/AiCentre/index";
export default {
  name: "Percentage",
  mixins: [followupAnalysisMixin],
  components: {
    FirstFollowUp,
    SecondFollowUp,
@@ -242,6 +304,9 @@
    DetailDialog,
    TimelyRateDialog,
    CombinedFollowUp,
    FollowupPatientTable,
    QuestionRatioTable,
    QuestionChart,
  },
  data() {
    return {
@@ -386,6 +451,17 @@
    },
    handleTabClick(tab) {
      this.activeTab = tab.name;
      if (tab.name === "first") {
        this.setAnalysisVisitCount(1);
      } else if (tab.name === "second") {
        this.setAnalysisVisitCount(2);
      } else if (tab.name === "followupForm") {
        this.loadFollowupAnalysis();
      } else if (
        ["followupRatio", "followupBar", "followupPie"].includes(tab.name)
      ) {
        this.ensureFollowupQuestionStats();
      }
      this.loadCurrentTabData();
    },
@@ -427,6 +503,16 @@
      }
      this.loadCurrentTabData();
      const promise = this.loadFollowupAnalysis(true);
      if (
        ["followupRatio", "followupBar", "followupPie"].includes(
          this.activeTab
        )
      ) {
        if (promise && typeof promise.then === "function") {
          promise.then(() => this.loadFollowupQuestionStats());
        }
      }
    },
    resetQuery() {
@@ -448,6 +534,18 @@
          break;
        case "combined":
          await this.$refs.combinedFollowUp.exportTable();
          break;
        case "followupForm":
          await this.$refs.followupFormRef.exportExcel();
          break;
        case "followupRatio":
          await this.$refs.followupRatioRef.exportExcel();
          break;
        case "followupBar":
          await this.$refs.followupBarRef.exportExcel();
          break;
        case "followupPie":
          await this.$refs.followupPieRef.exportExcel();
          break;
      }
    },
@@ -576,6 +674,13 @@
  border: 1px solid #dcdfe6;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
  .analysis-task-title {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #303133;
  }
  .search-section {
    margin-bottom: 20px;
  }