From 7b38cbd5c0af64e2f11e02d4d2e0ea6cbb1c09f5 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期一, 09 十一月 2026 17:05:06 +0800
Subject: [PATCH] 测试完成
---
src/views/sfstatistics/percentage/index.vue | 165 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 158 insertions(+), 7 deletions(-)
diff --git a/src/views/sfstatistics/percentage/index.vue b/src/views/sfstatistics/percentage/index.vue
index 39b83e2..61d397a 100644
--- a/src/views/sfstatistics/percentage/index.vue
+++ b/src/views/sfstatistics/percentage/index.vue
@@ -57,15 +57,31 @@
</el-form-item>
<el-form-item label="鏈嶅姟绫诲瀷" prop="userName">
- <el-select
- v-model="serviceTypeSingle"
- placeholder="璇烽�夋嫨"
- >
+ <el-select v-model="serviceTypeSingle" placeholder="璇烽�夋嫨">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+
+ <el-form-item label="浠诲姟" prop="taskIds">
+ <el-select
+ v-model="queryParams.taskIds"
+ multiple
+ filterable
+ clearable
+ collapse-tags
+ placeholder="璇烽�夋嫨浠诲姟"
+ style="width: 220px"
+ >
+ <el-option
+ v-for="item in taskList"
+ :key="item.taskid"
+ :label="item.taskName"
+ :value="item.taskid"
/>
</el-select>
</el-form-item>
@@ -172,6 +188,67 @@
/>
</el-tab-pane>
+ <!-- 鍑洪櫌闅忚鍒嗘瀽锛氭偅鑰呰〃鍗� + 闅忚闂嵎棰樼洰鍗犳瘮锛堣〃/鏌辩姸鍥�/楗煎浘锛� -->
+ <el-tab-pane
+ label="鎮h�呴殢璁夸俊鎭〃鍗�"
+ name="followupForm"
+ v-if="isTongdeOrg"
+ >
+ <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 +307,15 @@
import DetailDialog from "./components/DetailDialog.vue";
import TimelyRateDialog from "./components/TimelyRateDialog.vue";
import CombinedFollowUp from "./components/CombinedFollowUp.vue";
-import { getSfStatisticsHyperlink } from "@/api/AiCentre/index";
+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, getTasklist } from "@/api/AiCentre/index";
export default {
name: "Percentage",
+ mixins: [followupAnalysisMixin],
components: {
FirstFollowUp,
SecondFollowUp,
@@ -242,6 +324,9 @@
DetailDialog,
TimelyRateDialog,
CombinedFollowUp,
+ FollowupPatientTable,
+ QuestionRatioTable,
+ QuestionChart,
},
data() {
return {
@@ -254,8 +339,11 @@
options: this.$store.getters.tasktypes,
queryParams: {
serviceType: [2],
- dateRange: [],
- dateRangecy: this.getLastMonthRange(),
+ dateRange:
+ localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌"
+ ? this.getLastMonthRange()
+ : [],
+ dateRangecy: "",
statisticaltype:
localStorage.getItem("orgname") == "缂欎簯鍘夸汉姘戝尰闄�" ||
localStorage.getItem("orgname") == "鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�"
@@ -263,6 +351,7 @@
: 1,
leavehospitaldistrictcodes: ["all"],
deptcodes: ["all"],
+ taskIds: [],
},
pickerOptions: {
shortcuts: [
@@ -297,6 +386,7 @@
},
flatArrayhospit: [],
flatArraydept: [],
+ taskList: [],
allDeptCodes: [],
allWardCodes: [],
showSearch: true,
@@ -332,6 +422,13 @@
},
created() {
this.getDeptTree();
+ // 褰撳墠鏈烘瀯涓轰附姘村競涓尰闄㈡椂锛屽簲闅忚鏃堕棿鑼冨洿榛樿鏈�杩戜竴涓湀骞剁洿鎺ュ簲鐢�
+ if (localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌") {
+ this.queryParams.startTime = this.parseTime(
+ this.queryParams.dateRange[0]
+ );
+ this.queryParams.endTime = this.parseTime(this.queryParams.dateRange[1]);
+ }
this.loadCurrentTabData();
},
methods: {
@@ -360,6 +457,11 @@
this.flatArraydept.push({ label: "鍏ㄩ儴", value: "all" });
this.flatArrayhospit.push({ label: "鍏ㄩ儴", value: "all" });
+
+ // 浠诲姟鍒楄〃锛堢敤浜庝换鍔$瓫閫夛級
+ getTasklist({ pageNum: 1, pageSize: 100 }).then((response) => {
+ this.taskList = response.rows || [];
+ });
},
// 娣诲姞鑾峰彇鏈�杩戜竴涓湀鏃堕棿鑼冨洿鐨勬柟娉�
getLastMonthRange() {
@@ -386,6 +488,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,11 +540,20 @@
}
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() {
this.queryParams.dateRange = [];
this.queryParams.leavehospitaldistrictcodes = [];
+ this.queryParams.taskIds = [];
this.handleQuery();
},
@@ -448,6 +570,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;
}
},
@@ -483,6 +617,7 @@
if (type == 1) {
obj.drcode = row.drcode;
}
+ // 缁熻绫诲瀷锛氱梾鍖虹粺璁�(1)浼犵梾鍖篶ode锛岀瀹ょ粺璁�(2)浼犵瀹ode
if (this.queryParams.statisticaltype == 1) {
obj.leavehospitaldistrictcodes = [row.leavehospitaldistrictcode];
obj.deptcodes = [];
@@ -490,12 +625,21 @@
obj.deptcodes = [row.deptcode];
obj.leavehospitaldistrictcodes = [];
}
+ // 搴旈殢璁挎椂闂磋寖鍥�
if (this.queryParams.endTime) {
obj.endTime = this.queryParams.endTime;
obj.startTime = this.queryParams.startTime;
} else {
obj.startTime = this.parseTime(this.queryParams.dateRange[0]);
obj.endTime = this.parseTime(this.queryParams.dateRange[1]);
+ }
+ // 鍑洪櫌鏃堕棿鑼冨洿
+ if (this.queryParams.hospitalEndTime) {
+ obj.hospitalEndTime = this.queryParams.hospitalEndTime;
+ obj.hospitalStartTime = this.queryParams.hospitalStartTime;
+ } else {
+ obj.hospitalStartTime = this.parseTime(this.queryParams.dateRangecy[0]);
+ obj.hospitalEndTime = this.parseTime(this.queryParams.dateRangecy[1]);
}
obj.statisticaltype = this.queryParams.statisticaltype;
@@ -566,6 +710,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;
}
--
Gitblit v1.9.3