From f12b3e4c7c8d55217cc1d21f814a9a3d5fc57251 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 03 十一月 2026 16:02:21 +0800
Subject: [PATCH] 提交Merge branch 'subtask' of http://116.62.18.175:6699/r/~yxh/smartor-web into subtask
---
src/views/sfstatistics/percentage/index.vue | 185 ++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 176 insertions(+), 9 deletions(-)
diff --git a/src/views/sfstatistics/percentage/index.vue b/src/views/sfstatistics/percentage/index.vue
index ca39454..83946c0 100644
--- a/src/views/sfstatistics/percentage/index.vue
+++ b/src/views/sfstatistics/percentage/index.vue
@@ -14,6 +14,7 @@
<el-select
v-model="queryParams.statisticaltype"
placeholder="璇烽�夋嫨缁熻绫诲瀷"
+ @change="handleQuery"
>
<el-option
v-for="item in Statisticallist"
@@ -57,8 +58,7 @@
<el-form-item label="鏈嶅姟绫诲瀷" prop="userName">
<el-select
- v-model="queryParams.serviceType"
- multiple
+ v-model="serviceTypeSingle"
placeholder="璇烽�夋嫨"
>
<el-option
@@ -132,6 +132,21 @@
<!-- Tab鍒囨崲鍖哄煙 -->
<div class="tab-section">
<el-tabs v-model="activeTab" @tab-click="handleTabClick">
+ <el-tab-pane
+ label="缁煎悎缁熻"
+ v-if="orgname == '涓芥按甯備腑鍖婚櫌'"
+ name="combined"
+ >
+ <CombinedFollowUp
+ ref="combinedFollowUp"
+ :query-params="queryParams"
+ :flat-array-hospit="flatArrayhospit"
+ :flat-array-dept="flatArraydept"
+ :options="options"
+ :orgname="orgname"
+ @view-details="viewDetails"
+ />
+ </el-tab-pane>
<el-tab-pane label="棣栨闅忚" name="first">
<FirstFollowUp
ref="firstFollowUp"
@@ -157,6 +172,63 @@
/>
</el-tab-pane>
+ <!-- 鍑洪櫌闅忚鍒嗘瀽锛氭偅鑰呰〃鍗� + 闅忚闂嵎棰樼洰鍗犳瘮锛堣〃/鏌辩姸鍥�/楗煎浘锛� -->
+ <el-tab-pane label="鎮h�呴殢璁夸俊鎭〃鍗�" 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"
@@ -179,6 +251,7 @@
<ChartDialog
:visible="chartDialogVisible"
:data="chartData"
+ :statisticaltype="queryParams.statisticaltype"
:active-tab="activeTab"
@close="chartDialogVisible = false"
/>
@@ -213,11 +286,16 @@
import ChartDialog from "./components/ChartDialog.vue";
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,
@@ -225,6 +303,10 @@
ChartDialog,
DetailDialog,
TimelyRateDialog,
+ CombinedFollowUp,
+ FollowupPatientTable,
+ QuestionRatioTable,
+ QuestionChart,
},
data() {
return {
@@ -237,11 +319,15 @@
options: this.$store.getters.tasktypes,
queryParams: {
serviceType: [2],
- dateRange: this.getLastMonthRange(),
- dateRangecy: [],
- statisticaltype: 1,
+ dateRange: [],
+ dateRangecy: this.getLastMonthRange(),
+ statisticaltype:
+ localStorage.getItem("orgname") == "缂欎簯鍘夸汉姘戝尰闄�" ||
+ localStorage.getItem("orgname") == "鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�"
+ ? 2
+ : 1,
leavehospitaldistrictcodes: ["all"],
- deptcodes: [],
+ deptcodes: ["all"],
},
pickerOptions: {
shortcuts: [
@@ -296,6 +382,18 @@
pageSize: 10,
},
};
+ },
+ computed: {
+ // 鏈嶅姟绫诲瀷鍗曢�夛細UI 缁戝畾鍗曞�硷紝鍐呴儴浠嶄互鏁扮粍褰㈠紡浼犵粰鍚庣
+ serviceTypeSingle: {
+ get() {
+ const st = this.queryParams.serviceType;
+ return Array.isArray(st) ? st[0] : st;
+ },
+ set(val) {
+ this.queryParams.serviceType = val == null || val === "" ? [] : [val];
+ },
+ },
},
created() {
this.getDeptTree();
@@ -353,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();
},
@@ -367,10 +476,16 @@
case "continued":
this.$refs.continuedCare.loadData();
break;
+ case "combined":
+ this.$refs.combinedFollowUp.loadData();
+ break;
}
},
handleQuery() {
+ if (!this.queryParams.dateRange) this.queryParams.dateRange = [];
+ if (!this.queryParams.dateRangecy) this.queryParams.dateRangecy = [];
+
this.queryParams.startTime = this.parseTime(
this.queryParams.dateRange[0]
);
@@ -388,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() {
@@ -407,6 +532,21 @@
case "continued":
await this.$refs.continuedCare.exportTable();
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;
}
},
@@ -423,6 +563,8 @@
return this.$refs.secondFollowUp.tableData;
case "continued":
return this.$refs.continuedCare.tableData;
+ case "combined":
+ return this.$refs.combinedFollowUp.tableData;
default:
return [];
}
@@ -439,6 +581,7 @@
if (type == 1) {
obj.drcode = row.drcode;
}
+ // 缁熻绫诲瀷锛氱梾鍖虹粺璁�(1)浼犵梾鍖篶ode锛岀瀹ょ粺璁�(2)浼犵瀹ode
if (this.queryParams.statisticaltype == 1) {
obj.leavehospitaldistrictcodes = [row.leavehospitaldistrictcode];
obj.deptcodes = [];
@@ -446,8 +589,23 @@
obj.deptcodes = [row.deptcode];
obj.leavehospitaldistrictcodes = [];
}
- obj.endTime = this.queryParams.endTime;
- obj.startTime = this.queryParams.startTime;
+ // 搴旈殢璁挎椂闂磋寖鍥�
+ 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;
getSfStatisticsHyperlink(obj).then((response) => {
@@ -483,6 +641,8 @@
SeedetailsgGo(row) {
this.SeedetailsVisible = false;
+ this.infotitleVisible = false;
+
let type = "";
if (row.preachformson && row.preachformson.includes("3")) {
type = 1;
@@ -514,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;
}
--
Gitblit v1.9.3