From a78c4c8208a4a05dd54781443c08336f142a2dd6 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 10 四月 2026 10:57:49 +0800
Subject: [PATCH] 测试完成
---
src/views/sfstatistics/percentage/index.vue | 2686 ++++++++++++++++++++++++++++++++++++-----------------------
1 files changed, 1,631 insertions(+), 1,055 deletions(-)
diff --git a/src/views/sfstatistics/percentage/index.vue b/src/views/sfstatistics/percentage/index.vue
index f94291b..9483d21 100644
--- a/src/views/sfstatistics/percentage/index.vue
+++ b/src/views/sfstatistics/percentage/index.vue
@@ -61,7 +61,7 @@
</el-select>
</el-form-item>
- <el-form-item label="缁熻绫诲瀷" prop="userName">
+ <el-form-item label="鏈嶅姟绫诲瀷" prop="userName">
<el-select
v-model="queryParams.serviceType"
multiple
@@ -90,7 +90,6 @@
end-placeholder="缁撴潫鏃ユ湡"
:default-time="['00:00:00', '23:59:59']"
>
- >
</el-date-picker>
</el-form-item>
@@ -109,712 +108,814 @@
>閲嶇疆</el-button
>
</el-form-item>
- <el-col :span="19">
- <el-button
- type="warning"
- plain
- icon="el-icon-download"
- size="medium"
- @click="exportTable"
- >瀵煎嚭</el-button
- >
- <el-button
- type="primary"
- plain
- icon="el-icon-data-line"
- size="medium"
- @click="showChartDialog"
- >缁熻瓒嬪娍鍥�</el-button
- >
- </el-col>
- </el-form>
- <div class="your-table-container">
- <el-table
- ref="exportTable"
- id="exportTableid"
- v-loading="loading"
- :data="userList"
- :border="true"
- @selection-change="handleSelectionChange"
- @expand-change="handleRowClick"
- :row-key="getRowKey"
- show-summary
- :summary-method="getSummaries"
- :expand-row-keys="expands"
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-download"
+ size="medium"
+ @click="exportTable"
+ >瀵煎嚭</el-button
>
- <!-- 灞曞紑琛岀澶村垪 -->
- <el-table-column type="expand">
- <template slot-scope="props">
- <el-table
- :data="props.row.doctorStats"
- border
- style="width: 95%; margin: 0 auto"
- class="inner-table"
- show-summary
- :summary-method="getInnerSummaries"
+ <el-button
+ type="primary"
+ plain
+ icon="el-icon-data-line"
+ size="medium"
+ @click="showChartDialog"
+ >缁熻瓒嬪娍鍥�</el-button
+ >
+ </el-form>
+
+ <!-- 鏂板锛歍ab鏍囩椤� -->
+ <el-tabs v-model="activeTab" @tab-click="handleTabClick">
+ <el-tab-pane label="棣栨闅忚" name="first">
+ <div class="your-table-container">
+ <el-table
+ ref="exportTable"
+ id="exportTableid"
+ v-loading="loading"
+ :data="firstFollowUpList"
+ :border="true"
+ @selection-change="handleSelectionChange"
+ @expand-change="handleRowClick"
+ :row-key="getRowKey"
+ show-summary
+ :summary-method="getSummaries"
+ :expand-row-keys="expands"
+ >
+ <!-- 灞曞紑琛岀澶村垪 -->
+ <el-table-column type="expand">
+ <template slot-scope="props">
+ <el-table
+ :data="props.row.doctorStats"
+ border
+ style="width: 95%; margin: 0 auto"
+ class="inner-table"
+ show-summary
+ :summary-method="getInnerSummaries"
+ >
+ <el-table-column
+ label="鍖荤敓濮撳悕"
+ prop="drname"
+ align="center"
+ />
+ <el-table-column
+ label="绉戝"
+ width="120"
+ prop="deptname"
+ align="center"
+ />
+ <el-table-column
+ label="鍑洪櫌浜烘"
+ prop="dischargeCount"
+ align="center"
+ />
+ <el-table-column
+ label="鍑洪櫌浜烘"
+ align="center"
+ key="dischargeCount"
+ prop="dischargeCount"
+ >
+ </el-table-column>
+
+ <el-table-column
+ label="鏃犻渶闅忚浜烘"
+ align="center"
+ width="100"
+ key="nonFollowUp"
+ prop="nonFollowUp"
+ >
+ </el-table-column>
+ <el-table-column
+ label="搴旈殢璁夸汉娆�"
+ align="center"
+ width="100"
+ key="followUpNeeded"
+ prop="followUpNeeded"
+ >
+ </el-table-column>
+ <el-table-column align="center" label="棣栨鍑洪櫌闅忚">
+ <el-table-column
+ label="闇�闅忚"
+ align="center"
+ key="needFollowUp"
+ prop="needFollowUp"
+ >
+ </el-table-column>
+ <el-table-column
+ label="寰呴殢璁�"
+ align="center"
+ key="pendingFollowUp"
+ prop="pendingFollowUp"
+ >
+ </el-table-column>
+ <el-table-column
+ label="闅忚鎴愬姛"
+ align="center"
+ key="followUpSuccess"
+ prop="followUpSuccess"
+ >
+ </el-table-column>
+ <el-table-column
+ label="闅忚澶辫触"
+ align="center"
+ key="followUpFail"
+ prop="followUpFail"
+ >
+ </el-table-column>
+ <el-table-column
+ label="闅忚鐜�"
+ align="center"
+ width="120"
+ key="followUpRate"
+ prop="followUpRate"
+ >
+ </el-table-column>
+ <el-table-column
+ v-if="orgname != '涓芥按甯備腑鍖婚櫌'"
+ label="鍙婃椂鐜�"
+ align="center"
+ width="120"
+ key="rate"
+ prop="rate"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="Seedetails(scope.row)"
+ ><span class="button-zx"
+ >{{
+ (Number(scope.row.rate) * 100).toFixed(2)
+ }}%</span
+ ></el-button
+ >
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="浜哄伐"
+ align="center"
+ key="manual"
+ prop="manual"
+ >
+ </el-table-column>
+ <el-table-column
+ label="鐭俊"
+ align="center"
+ key="sms"
+ prop="sms"
+ >
+ </el-table-column>
+ <el-table-column
+ label="寰俊"
+ align="center"
+ key="weChat"
+ prop="weChat"
+ >
+ </el-table-column>
+ </el-table-column>
+ </el-table>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鍑洪櫌鐥呭尯"
+ align="center"
+ sortable
+ key="leavehospitaldistrictname"
+ prop="leavehospitaldistrictname"
+ width="150"
+ :show-overflow-tooltip="true"
+ :sort-method="sortChineseNumber"
+ />
+ <el-table-column
+ label="绉戝"
+ align="center"
+ key="deptname"
+ prop="deptname"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="鍑洪櫌浜烘"
+ align="center"
+ key="dischargeCount"
+ prop="dischargeCount"
+ >
+ </el-table-column>
+
+ <el-table-column
+ label="鏃犻渶闅忚浜烘"
+ align="center"
+ width="100"
+ key="nonFollowUp"
+ prop="nonFollowUp"
+ >
+ </el-table-column>
+ <el-table-column
+ label="搴旈殢璁夸汉娆�"
+ align="center"
+ width="100"
+ key="followUpNeeded"
+ prop="followUpNeeded"
+ >
+ </el-table-column>
+ <el-table-column align="center" label="棣栨鍑洪櫌闅忚">
+ <el-table-column
+ label="闇�闅忚"
+ align="center"
+ key="needFollowUp"
+ prop="needFollowUp"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ viewDetails(
+ scope.row.needFollowUpInfo,
+ scope.row.leavehospitaldistrictname +
+ '闇�闅忚鍒楄〃'
+ )
+ "
+ ><span class="button-zx">{{
+ scope.row.needFollowUp
+ }}</span></el-button
+ >
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="寰呴殢璁�"
+ align="center"
+ key="pendingFollowUp"
+ prop="pendingFollowUp"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ viewDetails(
+ scope.row.pendingFollowUpInfo,
+ scope.row.leavehospitaldistrictname +
+ '寰呴殢璁垮垪琛�'
+ )
+ "
+ ><span class="button-zx">{{
+ scope.row.pendingFollowUp
+ }}</span></el-button
+ >
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="闅忚鎴愬姛"
+ align="center"
+ key="followUpSuccess"
+ prop="followUpSuccess"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ viewDetails(
+ scope.row.followUpSuccessInfo,
+ scope.row.leavehospitaldistrictname +
+ '闅忚鎴愬姛鍒楄〃'
+ )
+ "
+ ><span class="button-zx">{{
+ scope.row.followUpSuccess
+ }}</span></el-button
+ >
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="闅忚澶辫触"
+ align="center"
+ key="followUpFail"
+ prop="followUpFail"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ viewDetails(
+ scope.row.followUpFailInfo,
+ scope.row.leavehospitaldistrictname +
+ '闅忚澶辫触鍒楄〃'
+ )
+ "
+ ><span class="button-zx">{{
+ scope.row.followUpFail
+ }}</span></el-button
+ >
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="闅忚鐜�"
+ align="center"
+ width="120"
+ key="followUpRate"
+ prop="followUpRate"
+ >
+ </el-table-column>
+ <el-table-column
+ v-if="orgname != '涓芥按甯備腑鍖婚櫌'"
+ label="鍙婃椂鐜�"
+ align="center"
+ width="120"
+ key="rate"
+ prop="rate"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="Seedetails(scope.row)"
+ ><span class="button-zx"
+ >{{
+ (Number(scope.row.rate) * 100).toFixed(2)
+ }}%</span
+ ></el-button
+ >
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="浜哄伐"
+ align="center"
+ key="manual"
+ prop="manual"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ viewDetails(
+ scope.row.manualInfo,
+ scope.row.leavehospitaldistrictname +
+ '浜哄伐闅忚鍒楄〃'
+ )
+ "
+ ><span class="button-zx">{{
+ scope.row.manual
+ }}</span></el-button
+ >
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鐭俊"
+ align="center"
+ key="sms"
+ prop="sms"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ viewDetails(
+ scope.row.smsInfo,
+ scope.row.leavehospitaldistrictname +
+ '鐭俊闅忚鍒楄〃'
+ )
+ "
+ ><span class="button-zx">{{
+ scope.row.sms
+ }}</span></el-button
+ >
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="寰俊"
+ align="center"
+ key="weChat"
+ prop="weChat"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ viewDetails(
+ scope.row.weChatInfo,
+ scope.row.leavehospitaldistrictname +
+ '寰俊闅忚鍒楄〃'
+ )
+ "
+ ><span class="button-zx">{{
+ scope.row.weChat
+ }}</span></el-button
+ >
+ </template>
+ </el-table-column>
+ </el-table-column>
+
+ <!-- 闅忚鎯呭喌鍒楋紙浠呬附姘村競涓尰闄㈡樉绀猴級 -->
+ <el-table-column
+ v-if="orgname == '涓芥按甯備腑鍖婚櫌'"
+ align="center"
+ label="闅忚鎯呭喌"
>
<el-table-column
- label="鍖荤敓濮撳悕"
- prop="drname"
+ label="姝e父璇煶"
align="center"
- />
- <el-table-column
- label="绉戝"
- width="120"
- prop="deptname"
+ width="100"
+ key="taskSituation1"
+ prop="taskSituation1"
+ >
+ </el-table-column
+ ><el-table-column
+ label="鎮h�呮嫆鎺ユ垨鎷掕"
align="center"
- />
- <el-table-column
- label="鍑洪櫌浜烘"
- prop="dischargeCount"
+ width="100"
+ key="taskSituation2"
+ prop="taskSituation2"
+ >
+ </el-table-column
+ ><el-table-column
+ label="闈㈣鎴栬�呮帴璇�"
align="center"
- />
- <el-table-column
- label="鍑洪櫌浜烘"
+ width="100"
+ key="taskSituation3"
+ prop="taskSituation3"
+ >
+ </el-table-column
+ ><el-table-column
+ label="寰俊闅忚"
align="center"
- key="dischargeCount"
- prop="dischargeCount"
+ width="100"
+ key="taskSituation4"
+ prop="taskSituation4"
+ >
+ </el-table-column
+ ><el-table-column
+ label="闅忚鐢佃瘽涓嶆纭�"
+ align="center"
+ width="100"
+ key="taskSituation5"
+ prop="taskSituation5"
+ >
+ </el-table-column
+ ><el-table-column
+ label="鍏朵粬鎯呭喌涓嶅疁闅忚"
+ align="center"
+ width="100"
+ key="taskSituation6"
+ prop="taskSituation6"
>
</el-table-column>
+ </el-table-column>
+ </el-table>
+ </div>
+ </el-tab-pane>
- <el-table-column
- label="鏃犻渶闅忚浜烘"
- align="center"
- width="100"
- key="nonFollowUp"
- prop="nonFollowUp"
- >
- </el-table-column>
- <el-table-column
- label="搴旈殢璁夸汉娆�"
- align="center"
- width="100"
- key="followUpNeeded"
- prop="followUpNeeded"
- >
- </el-table-column>
- <el-table-column align="center" label="棣栨鍑洪櫌闅忚">
- <el-table-column
- label="闇�闅忚"
- align="center"
- key="needFollowUp"
- prop="needFollowUp"
+ <el-tab-pane label="鍐嶆闅忚" name="second">
+ <div class="your-table-container">
+ <el-table
+ ref="exportTableSecond"
+ id="exportTableidSecond"
+ v-loading="loadingSecond"
+ :data="secondFollowUpList"
+ :border="true"
+ @selection-change="handleSelectionChangeSecond"
+ @expand-change="handleRowClickSecond"
+ :row-key="getRowKey"
+ show-summary
+ :summary-method="getSummariesSecond"
+ :expand-row-keys="expandsSecond"
+ >
+ <!-- 灞曞紑琛岀澶村垪 -->
+ <el-table-column type="expand">
+ <template slot-scope="props">
+ <el-table
+ :data="props.row.doctorStats"
+ border
+ style="width: 95%; margin: 0 auto"
+ class="inner-table"
+ show-summary
+ :summary-method="getInnerSummariesSecond"
>
- </el-table-column>
- <el-table-column
- label="寰呴殢璁�"
- align="center"
- key="pendingFollowUp"
- prop="pendingFollowUp"
- >
- </el-table-column>
- <el-table-column
- label="闅忚鎴愬姛"
- align="center"
- key="followUpSuccess"
- prop="followUpSuccess"
- >
- </el-table-column>
- <el-table-column
- label="闅忚澶辫触"
- align="center"
- key="followUpFail"
- prop="followUpFail"
- >
- </el-table-column>
- <el-table-column
- label="闅忚鐜�"
- align="center"
- width="120"
- key="followUpRate"
- prop="followUpRate"
- >
- <!-- <template slot-scope="scope">
- <span
- >{{
- (Number(scope.row.followUpRate) * 100).toFixed(2)
- }}%</span
- >
- </template> -->
- </el-table-column>
- <el-table-column
- label="鍙婃椂鐜�"
- align="center"
- width="120"
- key="rate"
- prop="rate"
- >
- <template slot-scope="scope">
- <el-button
- size="medium"
- type="text"
- @click="Seedetails(scope.row)"
- ><span class="button-zx"
- >{{
- (Number(scope.row.rate) * 100).toFixed(2)
- }}%</span
- ></el-button
+ <el-table-column
+ label="鍖荤敓濮撳悕"
+ prop="drname"
+ align="center"
+ />
+ <el-table-column
+ label="绉戝"
+ width="120"
+ prop="deptname"
+ align="center"
+ />
+ <el-table-column
+ label="鍑洪櫌浜烘"
+ prop="dischargeCount"
+ align="center"
+ />
+ <el-table-column
+ label="鍑洪櫌浜烘"
+ align="center"
+ key="dischargeCount"
+ prop="dischargeCount"
+ >
+ </el-table-column>
+
+ <el-table-column
+ label="鏃犻渶闅忚浜烘"
+ align="center"
+ width="100"
+ key="nonFollowUp"
+ prop="nonFollowUp"
+ >
+ </el-table-column>
+ <el-table-column
+ label="搴旈殢璁夸汉娆�"
+ align="center"
+ width="100"
+ key="followUpNeeded"
+ prop="followUpNeeded"
+ >
+ </el-table-column>
+ <el-table-column align="center" label="鍐嶆鍑洪櫌闅忚">
+ <el-table-column
+ label="闇�闅忚"
+ align="center"
+ key="needFollowUpAgain"
+ prop="needFollowUpAgain"
>
- </template>
- </el-table-column>
- <el-table-column
- label="浜哄伐"
- align="center"
- key="manual"
- prop="manual"
- >
- </el-table-column>
- <el-table-column
- label="鐭俊"
- align="center"
- key="sms"
- prop="sms"
- >
- </el-table-column>
- <el-table-column
- label="寰俊"
- align="center"
- key="weChat"
- prop="weChat"
- >
- </el-table-column>
- </el-table-column>
- <el-table-column align="center" label="鍐嶆鍑洪櫌闅忚">
- <el-table-column
- label="闇�闅忚"
- align="center"
- key="needFollowUpAgain"
- prop="needFollowUpAgain"
- >
- </el-table-column>
- <el-table-column
- label="寰呴殢璁�"
- align="center"
- key="pendingFollowUpAgain"
- prop="pendingFollowUpAgain"
- >
- </el-table-column>
- <el-table-column
- label="闅忚鎴愬姛"
- align="center"
- key="followUpSuccessAgain"
- prop="followUpSuccessAgain"
- >
- </el-table-column>
- <el-table-column
- label="闅忚澶辫触"
- align="center"
- key="followUpFailAgain"
- prop="followUpFailAgain"
- >
- </el-table-column>
- <el-table-column
- label="闅忚鐜�"
- align="center"
- width="120"
- key="followUpRateAgain"
- prop="followUpRateAgain"
- >
- <!-- <template slot-scope="scope">
- <span
- >{{
- (Number(scope.row.FollowUpRateAgain) * 100).toFixed(2)
- }}%</span
- >
- </template> -->
- </el-table-column>
- <el-table-column
- label="浜哄伐"
- align="center"
- key="manualAgain"
- prop="manualAgain"
- >
- </el-table-column>
- <el-table-column
- label="鐭俊"
- align="center"
- key="smsAgain"
- prop="smsAgain"
- >
- </el-table-column>
- <el-table-column
- label="寰俊"
- align="center"
- key="weChatAgain"
- prop="weChatAgain"
- >
- </el-table-column>
- </el-table-column>
- </el-table>
- </template>
- </el-table-column>
- <el-table-column
- label="鍑洪櫌鐥呭尯"
- align="center"
- sortable
- key="leavehospitaldistrictname"
- prop="leavehospitaldistrictname"
- width="150"
- :show-overflow-tooltip="true"
- :sort-method="sortChineseNumber"
- />
- <el-table-column
- label="绉戝"
- align="center"
- key="deptname"
- prop="deptname"
- :show-overflow-tooltip="true"
- />
- <el-table-column
- label="鍑洪櫌浜烘"
- align="center"
- key="dischargeCount"
- prop="dischargeCount"
- >
- </el-table-column>
+ </el-table-column>
+ <el-table-column
+ label="寰呴殢璁�"
+ align="center"
+ key="pendingFollowUpAgain"
+ prop="pendingFollowUpAgain"
+ >
+ </el-table-column>
+ <el-table-column
+ label="闅忚鎴愬姛"
+ align="center"
+ key="followUpSuccessAgain"
+ prop="followUpSuccessAgain"
+ >
+ </el-table-column>
+ <el-table-column
+ label="闅忚澶辫触"
+ align="center"
+ key="followUpFailAgain"
+ prop="followUpFailAgain"
+ >
+ </el-table-column>
+ <el-table-column
+ label="闅忚鐜�"
+ align="center"
+ width="120"
+ key="followUpRateAgain"
+ prop="followUpRateAgain"
+ >
+ </el-table-column>
+ <el-table-column
+ label="浜哄伐"
+ align="center"
+ key="manualAgain"
+ prop="manualAgain"
+ >
+ </el-table-column>
+ <el-table-column
+ label="鐭俊"
+ align="center"
+ key="smsAgain"
+ prop="smsAgain"
+ >
+ </el-table-column>
+ <el-table-column
+ label="寰俊"
+ align="center"
+ key="weChatAgain"
+ prop="weChatAgain"
+ >
+ </el-table-column>
+ </el-table-column>
+ </el-table>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鍑洪櫌鐥呭尯"
+ align="center"
+ sortable
+ key="leavehospitaldistrictname"
+ prop="leavehospitaldistrictname"
+ width="150"
+ :show-overflow-tooltip="true"
+ :sort-method="sortChineseNumber"
+ />
+ <el-table-column
+ label="绉戝"
+ align="center"
+ key="deptname"
+ prop="deptname"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="鍑洪櫌浜烘"
+ align="center"
+ key="dischargeCount"
+ prop="dischargeCount"
+ >
+ </el-table-column>
- <el-table-column
- label="鏃犻渶闅忚浜烘"
- align="center"
- width="100"
- key="nonFollowUp"
- prop="nonFollowUp"
- >
- </el-table-column>
- <el-table-column
- label="搴旈殢璁夸汉娆�"
- align="center"
- width="100"
- key="followUpNeeded"
- prop="followUpNeeded"
- >
- </el-table-column>
- <el-table-column align="center" label="棣栨鍑洪櫌闅忚">
- <el-table-column
- label="闇�闅忚"
- align="center"
- key="needFollowUp"
- prop="needFollowUp"
- >
- <template slot-scope="scope">
- <el-button
- size="medium"
- type="text"
- @click="
- viewDetails(
- scope.row.needFollowUpInfo,
- scope.row.leavehospitaldistrictname + '闇�闅忚鍒楄〃'
- )
- "
- ><span class="button-zx">{{
- scope.row.needFollowUp
- }}</span></el-button
+ <el-table-column
+ label="鏃犻渶闅忚浜烘"
+ align="center"
+ width="100"
+ key="nonFollowUp"
+ prop="nonFollowUp"
+ >
+ </el-table-column>
+ <el-table-column
+ label="搴旈殢璁夸汉娆�"
+ align="center"
+ width="100"
+ key="followUpNeeded"
+ prop="followUpNeeded"
+ >
+ </el-table-column>
+ <el-table-column align="center" label="鍐嶆鍑洪櫌闅忚">
+ <el-table-column
+ label="闇�闅忚"
+ align="center"
+ key="needFollowUpAgain"
+ prop="needFollowUpAgain"
>
- </template>
- </el-table-column>
- <el-table-column
- label="寰呴殢璁�"
- align="center"
- key="pendingFollowUp"
- prop="pendingFollowUp"
- >
- <template slot-scope="scope">
- <el-button
- size="medium"
- type="text"
- @click="
- viewDetails(
- scope.row.pendingFollowUpInfo,
- scope.row.leavehospitaldistrictname + '寰呴殢璁垮垪琛�'
- )
- "
- ><span class="button-zx">{{
- scope.row.pendingFollowUp
- }}</span></el-button
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ viewDetails(
+ scope.row.needFollowUpAgainInfo,
+ scope.row.leavehospitaldistrictname +
+ '鍐嶆闅忚闇�闅忚鍒楄〃'
+ )
+ "
+ ><span class="button-zx">{{
+ scope.row.needFollowUpAgain
+ }}</span></el-button
+ >
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="寰呴殢璁�"
+ align="center"
+ key="pendingFollowUpAgain"
+ prop="pendingFollowUpAgain"
>
- </template>
- </el-table-column>
- <el-table-column
- label="闅忚鎴愬姛"
- align="center"
- key="followUpSuccess"
- prop="followUpSuccess"
- >
- <template slot-scope="scope">
- <el-button
- size="medium"
- type="text"
- @click="
- viewDetails(
- scope.row.followUpSuccessInfo,
- scope.row.leavehospitaldistrictname + '闅忚鎴愬姛鍒楄〃'
- )
- "
- ><span class="button-zx">{{
- scope.row.followUpSuccess
- }}</span></el-button
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ viewDetails(
+ scope.row.pendingFollowUpAgainInfo,
+ scope.row.leavehospitaldistrictname +
+ '鍐嶆闅忚寰呴殢璁垮垪琛�'
+ )
+ "
+ ><span class="button-zx">{{
+ scope.row.pendingFollowUpAgain
+ }}</span></el-button
+ >
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="闅忚鎴愬姛"
+ align="center"
+ key="followUpSuccessAgain"
+ prop="followUpSuccessAgain"
>
- </template>
- </el-table-column>
- <el-table-column
- label="闅忚澶辫触"
- align="center"
- key="followUpFail"
- prop="followUpFail"
- >
- <template slot-scope="scope">
- <el-button
- size="medium"
- type="text"
- @click="
- viewDetails(
- scope.row.followUpFailInfo,
- scope.row.leavehospitaldistrictname + '闅忚澶辫触鍒楄〃'
- )
- "
- ><span class="button-zx">{{
- scope.row.followUpFail
- }}</span></el-button
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ viewDetails(
+ scope.row.followUpSuccessAgainInfo,
+ scope.row.leavehospitaldistrictname +
+ '鍐嶆闅忚闅忚鎴愬姛鍒楄〃'
+ )
+ "
+ ><span class="button-zx">{{
+ scope.row.followUpSuccessAgain
+ }}</span></el-button
+ >
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="闅忚澶辫触"
+ align="center"
+ key="followUpFailAgain"
+ prop="followUpFailAgain"
>
- </template>
- </el-table-column>
- <el-table-column
- label="闅忚鐜�"
- align="center"
- width="120"
- key="followUpRate"
- prop="followUpRate"
- >
- <!-- <template slot-scope="scope">
- <span
- >{{
- (Number(scope.row.followUpRate) * 100).toFixed(2)
- }}%</span
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ viewDetails(
+ scope.row.followUpFailAgainInfo,
+ scope.row.leavehospitaldistrictname +
+ '鍐嶆闅忚闅忚澶辫触鍒楄〃'
+ )
+ "
+ ><span class="button-zx">{{
+ scope.row.followUpFailAgain
+ }}</span></el-button
+ >
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="闅忚鐜�"
+ align="center"
+ width="120"
+ key="followUpRateAgain"
+ prop="followUpRateAgain"
>
- </template> -->
- </el-table-column>
- <el-table-column
- label="鍙婃椂鐜�"
- align="center"
- width="120"
- key="rate"
- prop="rate"
- >
- <template slot-scope="scope">
- <el-button
- size="medium"
- type="text"
- @click="Seedetails(scope.row)"
- ><span class="button-zx"
- >{{
- (Number(scope.row.rate) * 100).toFixed(2)
- }}%</span
- ></el-button
+ </el-table-column>
+ <el-table-column
+ label="浜哄伐"
+ align="center"
+ key="manualAgain"
+ prop="manualAgain"
>
- </template>
- </el-table-column>
- <el-table-column
- label="浜哄伐"
- align="center"
- key="manual"
- prop="manual"
- >
- <template slot-scope="scope">
- <el-button
- size="medium"
- type="text"
- @click="
- viewDetails(
- scope.row.manualInfo,
- scope.row.leavehospitaldistrictname + '浜哄伐闅忚鍒楄〃'
- )
- "
- ><span class="button-zx">{{
- scope.row.manual
- }}</span></el-button
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ viewDetails(
+ scope.row.manualAgainInfo,
+ scope.row.leavehospitaldistrictname +
+ '鍐嶆闅忚浜哄伐闅忚鍒楄〃'
+ )
+ "
+ ><span class="button-zx">{{
+ scope.row.manualAgain
+ }}</span></el-button
+ >
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鐭俊"
+ align="center"
+ key="smsAgain"
+ prop="smsAgain"
>
- </template>
- </el-table-column>
- <el-table-column
- label="鐭俊"
- align="center"
- key="sms"
- prop="sms"
- >
- <template slot-scope="scope">
- <el-button
- size="medium"
- type="text"
- @click="
- viewDetails(
- scope.row.smsInfo,
- scope.row.leavehospitaldistrictname + '鐭俊闅忚鍒楄〃'
- )
- "
- ><span class="button-zx">{{
- scope.row.sms
- }}</span></el-button
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ viewDetails(
+ scope.row.smsAgainInfo,
+ scope.row.leavehospitaldistrictname +
+ '鍐嶆闅忚鐭俊闅忚鍒楄〃'
+ )
+ "
+ ><span class="button-zx">{{
+ scope.row.smsAgain
+ }}</span></el-button
+ >
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="寰俊"
+ align="center"
+ key="weChatAgain"
+ prop="weChatAgain"
>
- </template>
- </el-table-column>
- <el-table-column
- label="寰俊"
- align="center"
- key="weChat"
- prop="weChat"
- >
- <template slot-scope="scope">
- <el-button
- size="medium"
- type="text"
- @click="
- viewDetails(
- scope.row.weChatInfo,
- scope.row.leavehospitaldistrictname + '寰俊闅忚鍒楄〃'
- )
- "
- ><span class="button-zx">{{
- scope.row.weChat
- }}</span></el-button
- >
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column align="center" label="鍐嶆鍑洪櫌闅忚">
- <el-table-column
- label="闇�闅忚"
- align="center"
- key="needFollowUpAgain"
- prop="needFollowUpAgain"
- >
- <template slot-scope="scope">
- <el-button
- size="medium"
- type="text"
- @click="
- viewDetails(
- scope.row.needFollowUpAgainInfo,
- scope.row.leavehospitaldistrictname +
- '鍐嶆闅忚闇�闅忚鍒楄〃'
- )
- "
- ><span class="button-zx">{{
- scope.row.needFollowUpAgain
- }}</span></el-button
- >
- </template>
- </el-table-column>
- <el-table-column
- label="寰呴殢璁�"
- align="center"
- key="pendingFollowUpAgain"
- prop="pendingFollowUpAgain"
- >
- <template slot-scope="scope">
- <el-button
- size="medium"
- type="text"
- @click="
- viewDetails(
- scope.row.pendingFollowUpAgainInfo,
- scope.row.leavehospitaldistrictname +
- '鍐嶆闅忚寰呴殢璁垮垪琛�'
- )
- "
- ><span class="button-zx">{{
- scope.row.pendingFollowUpAgain
- }}</span></el-button
- >
- </template>
- </el-table-column>
- <el-table-column
- label="闅忚鎴愬姛"
- align="center"
- key="followUpSuccessAgain"
- prop="followUpSuccessAgain"
- >
- <template slot-scope="scope">
- <el-button
- size="medium"
- type="text"
- @click="
- viewDetails(
- scope.row.followUpSuccessAgainInfo,
- scope.row.leavehospitaldistrictname +
- '鍐嶆闅忚闅忚鎴愬姛鍒楄〃'
- )
- "
- ><span class="button-zx">{{
- scope.row.followUpSuccessAgain
- }}</span></el-button
- >
- </template>
- </el-table-column>
- <el-table-column
- label="闅忚澶辫触"
- align="center"
- key="followUpFailAgain"
- prop="followUpFailAgain"
- >
- <template slot-scope="scope">
- <el-button
- size="medium"
- type="text"
- @click="
- viewDetails(
- scope.row.followUpFailAgainInfo,
- scope.row.leavehospitaldistrictname +
- '鍐嶆闅忚闅忚澶辫触鍒楄〃'
- )
- "
- ><span class="button-zx">{{
- scope.row.followUpFailAgain
- }}</span></el-button
- >
- </template>
- </el-table-column>
- <el-table-column
- label="闅忚鐜�"
- align="center"
- width="120"
- key="followUpRateAgain"
- prop="followUpRateAgain"
- >
- <!-- <template slot-scope="scope">
- <span
- >{{
- (Number(scope.row.FollowUpRateAgain) * 100).toFixed(2)
- }}%</span
- >
- </template> -->
- </el-table-column>
- <el-table-column
- label="浜哄伐"
- align="center"
- key="manualAgain"
- prop="manualAgain"
- >
- <template slot-scope="scope">
- <el-button
- size="medium"
- type="text"
- @click="
- viewDetails(
- scope.row.manualAgainInfo,
- scope.row.leavehospitaldistrictname +
- '鍐嶆闅忚浜哄伐闅忚鍒楄〃'
- )
- "
- ><span class="button-zx">{{
- scope.row.manualAgain
- }}</span></el-button
- >
- </template>
- </el-table-column>
- <el-table-column
- label="鐭俊"
- align="center"
- key="smsAgain"
- prop="smsAgain"
- >
- <template slot-scope="scope">
- <el-button
- size="medium"
- type="text"
- @click="
- viewDetails(
- scope.row.smsAgainInfo,
- scope.row.leavehospitaldistrictname +
- '鍐嶆闅忚鐭俊闅忚鍒楄〃'
- )
- "
- ><span class="button-zx">{{
- scope.row.smsAgain
- }}</span></el-button
- >
- </template>
- </el-table-column>
- <el-table-column
- label="寰俊"
- align="center"
- key="weChatAgain"
- prop="weChatAgain"
- >
- <template slot-scope="scope">
- <el-button
- size="medium"
- type="text"
- @click="
- viewDetails(
- scope.row.weChatAgainInfo,
- scope.row.leavehospitaldistrictname +
- '鍐嶆闅忚寰俊闅忚鍒楄〃'
- )
- "
- ><span class="button-zx">{{
- scope.row.weChatAgain
- }}</span></el-button
- >
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column
- v-if="orgname == '涓芥按甯備腑鍖婚櫌'"
- align="center"
- label="闅忚鎯呭喌"
- >
- <el-table-column
- label="姝e父璇煶"
- align="center"
- width="100"
- key="taskSituation1"
- prop="taskSituation1"
- >
- </el-table-column
- ><el-table-column
- label="鎮h�呮嫆鎺ユ垨鎷掕"
- align="center"
- width="100"
- key="taskSituation2"
- prop="taskSituation2"
- >
- </el-table-column
- ><el-table-column
- label="闈㈣鎴栬�呮帴璇�"
- align="center"
- width="100"
- key="taskSituation3"
- prop="taskSituation3"
- >
- </el-table-column
- ><el-table-column
- label="寰俊闅忚"
- align="center"
- width="100"
- key="taskSituation4"
- prop="taskSituation4"
- >
- </el-table-column
- ><el-table-column
- label="闅忚鐢佃瘽涓嶆纭�"
- align="center"
- width="100"
- key="taskSituation5"
- prop="taskSituation5"
- >
- </el-table-column
- ><el-table-column
- label="鍏朵粬鎯呭喌涓嶅疁闅忚"
- align="center"
- width="100"
- key="taskSituation6"
- prop="taskSituation6"
- >
- </el-table-column>
- </el-table-column>
- </el-table>
- </div>
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ viewDetails(
+ scope.row.weChatAgainInfo,
+ scope.row.leavehospitaldistrictname +
+ '鍐嶆闅忚寰俊闅忚鍒楄〃'
+ )
+ "
+ ><span class="button-zx">{{
+ scope.row.weChatAgain
+ }}</span></el-button
+ >
+ </template>
+ </el-table-column>
+ </el-table-column>
+ </el-table>
+ </div>
+ </el-tab-pane>
+ </el-tabs>
+ <!-- 鍘熸潵鐨勫垎椤电粍浠朵繚鐣欙紙濡傛灉闇�瑕侊級 -->
<!-- <pagination
v-show="total > 0"
:total="total"
@@ -1069,7 +1170,7 @@
:total="patienttotal"
:page.sync="patientqueryParams.pn"
:limit.sync="patientqueryParams.ps"
- @pagination="Seedetails"
+ @pagination="Seedetailstion"
/>
</div>
</div>
@@ -1298,13 +1399,6 @@
</el-table>
</div>
</el-row>
- <pagination
- v-show="patienttotal > 0 && this.patientqueryParams.allhosp != 6"
- :total="patienttotal"
- :page.sync="patientqueryParams.pn"
- :limit.sync="patientqueryParams.ps"
- @pagination="Seedetails"
- />
</div>
</div>
</el-dialog>
@@ -1326,6 +1420,7 @@
import { saveAs } from "file-saver";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+
const shortcuts = [
{
text: "浠婂ぉ",
@@ -1350,41 +1445,52 @@
},
},
];
+
export default {
name: "Percentage",
dicts: ["sys_normal_disable", "sys_user_sex"],
components: { Treeselect },
data() {
return {
- topactiveName: "Local", //椤堕儴閫夋嫨
- activeName: "first", //渚ц竟閫夋嫨
+ // 鏂板锛歍ab鏍囩椤垫帶鍒�
+ activeTab: "first", // 褰撳墠婵�娲荤殑tab锛宖irst-棣栨闅忚锛宻econd-鍐嶆闅忚
+
+ // 鍒嗙鐨勬暟鎹垪琛�
+ firstFollowUpList: [], // 棣栨闅忚鏁版嵁
+ secondFollowUpList: [], // 鍐嶆闅忚鏁版嵁
+
+ // 鍒嗙鐨勫姞杞界姸鎬�
+ loading: false, // 棣栨闅忚琛ㄦ牸鍔犺浇鐘舵��
+ loadingSecond: false, // 鍐嶆闅忚琛ㄦ牸鍔犺浇鐘舵��
+
+ // 鍒嗙鐨勫睍寮�鐘舵��
+ expands: [], // 棣栨闅忚琛ㄦ牸灞曞紑琛�
+ expandsSecond: [], // 鍐嶆闅忚琛ㄦ牸灞曞紑琛�
+
+ // 鍒嗙鐨勯�夋嫨鐘舵��
+ ids: [], // 棣栨闅忚閫変腑椤�
+ idsSecond: [], // 鍐嶆闅忚閫変腑椤�
+
orgname: "",
- expands: [],
infotitlelist: [],
- currentDisplayList: [], // 褰撳墠鏄剧ず鐨勬暟鎹�
- loadIndex: 0, // 褰撳墠宸插姞杞界殑鏁版嵁绱㈠紩
- pageSize: 100, // 姣忔鍔犺浇鐨勬暟鎹噺
- isLoading: false, // 闃叉婊氬姩鏃堕噸澶嶅姞杞�
- // 閬僵灞�
- loading: false,
+ currentDisplayList: [],
+ loadIndex: 0,
+ pageSize: 100,
+ isLoading: false,
+
Seedloading: false,
chartDialogVisible: false,
infotitleVisible: false,
- searchName: "", // 鎼滅储鍏抽敭璇�
+ searchName: "",
infotitloading: false,
infotitle: "",
pieChart: null,
barLineChart: null,
- // 閫変腑鏁扮粍
- ids: [],
- // 闈炲崟涓鐢�
+
single: true,
- // 闈炲涓鐢�
multiple: true,
- // 鏄剧ず鎼滅储鏉′欢
showSearch: true,
- idds: "", //鍒嗙被id
- // 鎬绘潯鏁�
+ idds: "",
total: 0,
flatArrayhospit: [],
flatArraydept: [],
@@ -1404,12 +1510,11 @@
pn: 1,
ps: 10,
},
- amendtag: false, //鏄惁淇敼绫诲埆
- lstamendtag: false, //鏄惁淇敼鏍囩
- scavisible: false, //鍒犻櫎寮规
- deleteVisible: false, //鍒嗙被鍒犻櫎寮规
- deletefenl: "楂樿鍘�", //鍒犻櫎椤�
- //淇敼娣诲姞鏍囩寮规鏁版嵁
+ amendtag: false,
+ lstamendtag: false,
+ scavisible: false,
+ deleteVisible: false,
+ deletefenl: "楂樿鍘�",
tagform: {
isupload: "",
tagname: "",
@@ -1419,33 +1524,23 @@
classifyform: {
categoryname: "",
},
- // 鏍囩琛ㄦ牸鏁版嵁
- userList: [],
- // 寮瑰嚭灞傛爣棰�
title: "",
- // 鏄惁鏄剧ず寮瑰嚭灞�
open: false,
- // 鏃ユ湡鑼冨洿
dateRange: [],
- // 宀椾綅閫夐」
postOptions: [],
- // 瑙掕壊閫夐」
roleOptions: [],
- // 瀛樺偍鎵�鏈夌瀹や唬鐮�
allDeptCodes: [],
- // 瀛樺偍鎵�鏈夌梾鍖轰唬鐮�
allWardCodes: [],
checkboxlist: [],
- // 琛ㄥ崟鍙傛暟
form: {},
forms: {
name: "",
},
numberlb: 22,
- dialogFormVisible: false, //娣诲姞銆佷慨鏀圭被鍒脊妗�
- lstamendtagVisible: false, //娣诲姞銆佷慨鏀规爣绛惧脊妗�
- goQRCodeVisible: false, //浜岀淮鐮佸脊妗�
- sidecolumnval: "", //绫诲埆鎼滅储
+ dialogFormVisible: false,
+ lstamendtagVisible: false,
+ goQRCodeVisible: false,
+ sidecolumnval: "",
propss: { multiple: true },
SeedetailsVisible: false,
options: store.getters.tasktypes,
@@ -1461,15 +1556,14 @@
},
shortcuts: shortcuts,
},
- // 鏌ヨ鏍囩鍒楄〃鍙傛暟
queryParams: {
serviceType: [2],
dateRange: [],
statisticaltype: 1,
- leavehospitaldistrictcodes: ["all"], // 榛樿閫変腑鍏ㄩ儴鐥呭尯
- deptcodes: [], // 榛樿閫変腑鍏ㄩ儴绉戝
+ leavehospitaldistrictcodes: ["all"],
+ deptcodes: [],
+ visitCount: 1, // 鏂板锛氶殢璁挎鏁板弬鏁帮紝1-棣栨锛�2-鍐嶆
},
- // 鍒椾俊鎭�
columns: [
{ key: 0, label: `鏍囩缂栧彿`, visible: true },
{ key: 1, label: `鏍囩鍚嶇О`, visible: true },
@@ -1484,18 +1578,19 @@
watch: {},
created() {
this.getDeptTree();
- this.getList();
+ this.getFirstFollowUpList(); // 榛樿鍔犺浇棣栨闅忚鏁版嵁
this.checkboxlist = store.getters.checkboxlist;
this.orgname = localStorage.getItem("orgname");
},
methods: {
- /** 鏌ヨ鏍囩鍒楄〃 */
- getList() {
- // 澶勭悊鏌ヨ鍙傛暟
+ /** 鏌ヨ棣栨闅忚鍒楄〃 */
+ async getFirstFollowUpList() {
+ this.loading = true;
+ this.queryParams.visitCount = 1; // 璁剧疆闅忚娆℃暟涓洪娆�
+
const params = {
...this.queryParams,
- // 濡傛灉閫夋嫨浜�"鍏ㄩ儴"锛屽垯浼犳墍鏈夌梾鍖�/绉戝浠g爜
leavehospitaldistrictcodes:
this.queryParams.leavehospitaldistrictcodes.includes("all")
? this.allWardCodes
@@ -1504,17 +1599,64 @@
? this.allDeptCodes
: this.queryParams.deptcodes,
};
- this.loading = true;
- // 绉婚櫎鍙兘瀛樺湪鐨�"all"鍊�
+
delete params.leavehospitaldistrictcodes.all;
delete params.deptcodes.all;
- getSfStatistics(params).then((response) => {
- this.loading = false;
+ try {
+ const response = await getSfStatistics(params);
+ this.firstFollowUpList = this.customSort(response.data);
this.total = response.total;
- // this.userList = response.data;
- this.userList = this.customSort(response.data);
- });
+ } catch (error) {
+ console.error("鑾峰彇棣栨闅忚鏁版嵁澶辫触:", error);
+ this.$message.error("鑾峰彇棣栨闅忚鏁版嵁澶辫触");
+ } finally {
+ this.loading = false;
+ }
+ },
+
+ /** 鏌ヨ鍐嶆闅忚鍒楄〃 */
+ async getSecondFollowUpList() {
+ this.loadingSecond = true;
+ this.queryParams.visitCount = 2; // 璁剧疆闅忚娆℃暟涓哄啀娆�
+
+ const params = {
+ ...this.queryParams,
+ leavehospitaldistrictcodes:
+ this.queryParams.leavehospitaldistrictcodes.includes("all")
+ ? this.allWardCodes
+ : this.queryParams.leavehospitaldistrictcodes,
+ deptcodes: this.queryParams.deptcodes.includes("all")
+ ? this.allDeptCodes
+ : this.queryParams.deptcodes,
+ };
+
+ delete params.leavehospitaldistrictcodes.all;
+ delete params.deptcodes.all;
+
+ try {
+ const response = await getSfStatistics(params);
+ this.secondFollowUpList = this.customSort(response.data);
+ this.total = response.total;
+ } catch (error) {
+ console.error("鑾峰彇鍐嶆闅忚鏁版嵁澶辫触:", error);
+ this.$message.error("鑾峰彇鍐嶆闅忚鏁版嵁澶辫触");
+ } finally {
+ this.loadingSecond = false;
+ }
+ },
+
+ /** Tab鍒囨崲浜嬩欢 */
+ handleTabClick(tab) {
+ if (tab.name === "first") {
+ if (this.firstFollowUpList.length === 0) {
+ this.getFirstFollowUpList();
+ }
+ } else if (tab.name === "second") {
+ if (this.secondFollowUpList.length === 0) {
+ this.getSecondFollowUpList();
+ }
+ }
},
sortChineseNumber(aRow, bRow) {
const a = aRow.leavehospitaldistrictname;
@@ -1729,6 +1871,7 @@
: this.queryParams.deptcodes,
leavehospitaldistrictcodes: [row.leavehospitaldistrictcode],
drcode: "1",
+ visitCount: 1, // 璁剧疆涓洪娆¢殢璁�
};
// 绉婚櫎鍙兘瀛樺湪鐨�"all"鍊�
@@ -1990,6 +2133,13 @@
this.Seedloading = false;
});
},
+ Seedetailstion() {
+ selectTimelyRate(this.patientqueryParams).then((response) => {
+ this.logsheetlist = response.data.detail;
+ this.patienttotal = response.data.total;
+ this.Seedloading = false;
+ });
+ },
viewDetails(row, title) {
this.infotitleVisible = true;
this.infotitle = title;
@@ -2137,7 +2287,7 @@
row.isupload = row.isupload === "0" ? "1" : "0";
});
},
- /** 鎼滅储鎸夐挳鎿嶄綔 */
+ /** 鎼滅储鎸夐挳鎿嶄綔 - 淇敼涓烘悳绱㈠綋鍓嶆縺娲荤殑tab鏁版嵁 */
handleQuery() {
this.queryParams.pageNum = 1;
if (!this.queryParams.dateRange) this.queryParams.dateRange = [];
@@ -2146,14 +2296,20 @@
} else if (this.queryParams.statisticaltype == 2) {
this.queryParams.leavehospitaldistrictcodes = [];
}
- console.log(this.queryParams.dateRange);
this.queryParams.startTime = this.parseTime(
this.queryParams.dateRange[0]
);
this.queryParams.endTime = this.parseTime(this.queryParams.dateRange[1]);
- this.getList();
+
+ // 鏍规嵁褰撳墠婵�娲荤殑tab鍔犺浇瀵瑰簲鏁版嵁
+ if (this.activeTab === "first") {
+ this.getFirstFollowUpList();
+ } else {
+ this.getSecondFollowUpList();
+ }
},
+
/** 閲嶇疆鎸夐挳鎿嶄綔 */
resetQuery() {
this.queryParams.dateRange = [];
@@ -2189,337 +2345,77 @@
.catch(() => {});
},
// 瀵煎嚭鏂规硶
- // 鏇挎崲鎮ㄥ師鏉ョ殑 exportTable 鏂规硶
+
async exportTable() {
try {
// 1. 鑾峰彇骞舵牸寮忓寲鏃ユ湡鑼冨洿
- let dateRangeString = ""; // 鐢ㄤ簬鏂囦欢鍚�
- let sheetNameSuffix = ""; // 鐢ㄤ簬宸ヤ綔琛ㄥ悕
+ let dateRangeString = "";
+ let sheetNameSuffix = "";
- // 妫�鏌ユ槸鍚﹀瓨鍦ㄩ�変腑鐨勬棩鏈熻寖鍥�
if (
this.queryParams.dateRange &&
this.queryParams.dateRange.length === 2
) {
- const startDateStr = this.queryParams.dateRange[0]; // 寮�濮嬫棩鏈熷瓧绗︿覆锛屼緥濡� "2026-01-01 00:00:00"
- const endDateStr = this.queryParams.dateRange[1]; // 缁撴潫鏃ユ湡瀛楃涓�
-
- // 鏍煎紡鍖栨棩鏈熶负 YYYY-MM-DD锛堝幓鎺夋椂闂撮儴鍒嗭級
+ const startDateStr = this.queryParams.dateRange[0];
+ const endDateStr = this.queryParams.dateRange[1];
const formatDateForDisplay = (dateTimeStr) => {
- return dateTimeStr.split(" ")[0]; // 鍙栫┖鏍煎墠鐨勯儴鍒嗭紝鍗� "YYYY-MM-DD"
+ return dateTimeStr.split(" ")[0];
};
-
const startDateFormatted = formatDateForDisplay(startDateStr);
const endDateFormatted = formatDateForDisplay(endDateStr);
-
- // 鏋勫缓鏃ユ湡鑼冨洿瀛楃涓�
dateRangeString = `${startDateFormatted}鑷�${endDateFormatted}`;
sheetNameSuffix = `${startDateFormatted}鑷�${endDateFormatted}`;
} else {
- // 濡傛灉娌℃湁閫夋嫨鏃ユ湡鑼冨洿锛屽垯浣跨敤褰撳墠鏈堜唤浣滀负澶囬�夋柟妗�
const now = new Date();
const currentMonth = now.getMonth() + 1;
dateRangeString = `${currentMonth}鏈坄;
sheetNameSuffix = `${currentMonth}鏈坄;
}
- // 2. 鍔ㄦ�佹瀯寤烘枃浠跺悕鍜屽伐浣滆〃鍚�
- const excelName = `鍑洪櫌闅忚缁熻琛╛${dateRangeString}.xlsx`;
- const worksheetName = `闅忚缁熻_${sheetNameSuffix}`; // 宸ヤ綔琛ㄥ悕涓嶈兘瓒呰繃31涓瓧绗2](@ref)
- // 鍒涘缓鏂扮殑宸ヤ綔绨垮拰宸ヤ綔琛�
- const workbook = new ExcelJS.Workbook();
- const worksheet = workbook.addWorksheet(worksheetName); // 浣跨敤鍔ㄦ�佸伐浣滆〃鍚�
- // 瀹氫箟鏍峰紡锛堟柊澧炴�绘爣棰樻牱寮忥級
- const titleStyle = {
- font: {
- name: "寰蒋闆呴粦",
- size: 16,
- bold: true,
- color: { argb: "FF000000" },
- },
- fill: {
- type: "pattern",
- pattern: "solid",
- fgColor: { argb: "FFE6F3FF" },
- },
- alignment: {
- vertical: "middle",
- horizontal: "center",
- wrapText: true,
- },
- border: {
- top: { style: "thin", color: { argb: "FFD0D0D0" } },
- left: { style: "thin", color: { argb: "FFD0D0D0" } },
- bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
- right: { style: "thin", color: { argb: "FFD0D0D0" } },
- },
- };
- // 瀹氫箟鏍峰紡
- const headerStyle = {
- font: {
- name: "寰蒋闆呴粦",
- size: 11,
- bold: true,
- color: { argb: "FF000000" },
- },
- fill: {
- type: "pattern",
- pattern: "solid",
- fgColor: { argb: "FFF5F7FA" },
- },
- alignment: {
- vertical: "middle",
- horizontal: "center",
- wrapText: true,
- },
- border: {
- top: { style: "thin", color: { argb: "FFD0D0D0" } },
- left: { style: "thin", color: { argb: "FFD0D0D0" } },
- bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
- right: { style: "thin", color: { argb: "FFD0D0D0" } },
- },
- };
+ // 2. 鏍规嵁褰撳墠婵�娲荤殑tab纭畾瀵煎嚭鐨勬暟鎹�
+ const isFirstFollowUp = this.activeTab === "first";
+ let excelName, worksheetName, dataToExport;
- const cellStyle = {
- font: {
- name: "瀹嬩綋",
- size: 10,
- color: { argb: "FF000000" },
- },
- alignment: {
- vertical: "middle",
- horizontal: "center",
- },
- border: {
- top: { style: "thin", color: { argb: "FFD0D0D0" } },
- left: { style: "thin", color: { argb: "FFD0D0D0" } },
- bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
- right: { style: "thin", color: { argb: "FFD0D0D0" } },
- },
- };
+ if (isFirstFollowUp) {
+ excelName = `棣栨鍑洪櫌闅忚缁熻琛╛${dateRangeString}.xlsx`;
+ worksheetName = `棣栨闅忚缁熻_${sheetNameSuffix}`;
+ dataToExport = this.firstFollowUpList;
- const summaryStyle = {
- font: {
- name: "瀹嬩綋",
- size: 10,
- bold: true,
- color: { argb: "FF409EFF" },
- },
- fill: {
- type: "pattern",
- pattern: "solid",
- fgColor: { argb: "FFF5F7FA" },
- },
- alignment: {
- vertical: "middle",
- horizontal: "center",
- },
- border: {
- top: { style: "thin", color: { argb: "FFD0D0D0" } },
- left: { style: "thin", color: { argb: "FFD0D0D0" } },
- bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
- right: { style: "thin", color: { argb: "FFD0D0D0" } },
- },
- };
- // 1. 娣诲姞鎬绘爣棰樿锛堢涓�琛岋級
- worksheet.mergeCells(1, 1, 1, 23); // 鍚堝苟A1鍒癢1鐨勬墍鏈夊垪[1,4](@ref)
- const titleCell = worksheet.getCell(1, 1);
- titleCell.value = `${sheetNameSuffix}鍑洪櫌闅忚缁熻琛╜; // 浣跨敤鏂囦欢鍚嶄綔涓烘�绘爣棰�
- titleCell.style = titleStyle;
- worksheet.getRow(1).height = 35; // 璁剧疆鎬绘爣棰樿楂�
- // 1. 棣栧厛锛屽垱寤哄苟璁剧疆绗簩琛岋紙瀛愯〃澶达級鐨勬墍鏈夊崟鍏冩牸
- const secondRowHeaders = [
- "", // A2 灞曞紑鍒楀崰浣嶏紙鍏跺�煎皢鐢辩涓�琛屽悎骞跺悗鐨勪富鍗曞厓鏍煎喅瀹氾級
- "鍑洪櫌鐥呭尯",
- "绉戝",
- "鍑洪櫌浜烘",
- "鏃犻渶闅忚浜烘",
- "搴旈殢璁夸汉娆�", // B2 to F2
- // 棣栨鍑洪櫌闅忚瀛愯〃澶�
- "闇�闅忚",
- "寰呴殢璁�",
- "闅忚鎴愬姛",
- "闅忚澶辫触",
- "闅忚鐜�",
- "鍙婃椂鐜�",
- "浜哄伐",
- "鐭俊",
- "寰俊",
- // 鍐嶆鍑洪櫌闅忚瀛愯〃澶�
- "闇�闅忚",
- "寰呴殢璁�",
- "闅忚鎴愬姛",
- "闅忚澶辫触",
- "闅忚鐜�",
- "浜哄伐",
- "鐭俊",
- "寰俊",
- ];
-
- // 娣诲姞绗簩琛岋紙鍘熺涓�琛屼笅绉伙級
- secondRowHeaders.forEach((header, index) => {
- const cell = worksheet.getCell(3, index + 1); // 鏀逛负绗�3琛�
- cell.value = header;
- cell.style = headerStyle;
- });
-
- // 3. 璋冩暣鍘熷悎骞跺崟鍏冩牸浣嶇疆锛堝師绗�1琛屽悎骞跺崟鍏冩牸涓嬬Щ鍒扮2琛岋級
- // 鍚堝苟 A2:A3
- worksheet.mergeCells(2, 1, 3, 1);
- worksheet.getCell(2, 1).value = "";
- worksheet.getCell(2, 1).style = headerStyle;
-
- // 鍚堝苟 B2:B3
- worksheet.mergeCells(2, 2, 3, 2);
- worksheet.getCell(2, 2).value = "鍑洪櫌鐥呭尯";
- worksheet.getCell(2, 2).style = headerStyle;
-
- // 鍚堝苟 C2:C3
- worksheet.mergeCells(2, 3, 3, 3);
- worksheet.getCell(2, 3).value = "绉戝";
- worksheet.getCell(2, 3).style = headerStyle;
-
- // 鍚堝苟 D2:D3
- worksheet.mergeCells(2, 4, 3, 4);
- worksheet.getCell(2, 4).value = "鍑洪櫌浜烘";
- worksheet.getCell(2, 4).style = headerStyle;
-
- // 鍚堝苟 E2:E3
- worksheet.mergeCells(2, 5, 3, 5);
- worksheet.getCell(2, 5).value = "鏃犻渶闅忚浜烘";
- worksheet.getCell(2, 5).style = headerStyle;
-
- // 鍚堝苟 F2:F3
- worksheet.mergeCells(2, 6, 3, 6);
- worksheet.getCell(2, 6).value = "搴旈殢璁夸汉娆�";
- worksheet.getCell(2, 6).style = headerStyle;
-
- // 4. 璋冩暣妯悜鍚堝苟鏍囬浣嶇疆锛堜笅绉诲埌绗�2琛岋級
- // 棣栨鍑洪櫌闅忚锛堝悎骞禛2:O2锛�
- worksheet.mergeCells(2, 7, 2, 15); // G2:O2
- worksheet.getCell(2, 7).value = "棣栨鍑洪櫌闅忚";
- worksheet.getCell(2, 7).style = headerStyle;
-
- // 鍐嶆鍑洪櫌闅忚锛堝悎骞禤2:W2锛�
- worksheet.mergeCells(2, 16, 2, 23); // P2:W2
- worksheet.getCell(2, 16).value = "鍐嶆鍑洪櫌闅忚";
- worksheet.getCell(2, 16).style = headerStyle;
-
- // 5. 璁剧疆琛岄珮
- worksheet.getRow(1).height = 35; // 鎬绘爣棰樿楂�
- worksheet.getRow(2).height = 28; // 鍘熺涓�琛屼笅绉�
- worksheet.getRow(3).height = 25; // 鍘熺浜岃涓嬬Щ
-
- // 6. 娣诲姞鏁版嵁琛岋紙娉ㄦ剰琛岀储寮曢渶瑕�+1锛屽洜涓轰笂闈㈡彃鍏ヤ簡涓�琛岋級
- this.userList.forEach((item, rowIndex) => {
- const dataRow = worksheet.addRow(
- [
- "", // 灞曞紑鍒�
- item.leavehospitaldistrictname || "",
- item.deptname || "",
- item.dischargeCount || 0,
- item.nonFollowUp || 0,
- item.followUpNeeded || 0,
- // 棣栨鍑洪櫌闅忚鏁版嵁
- item.needFollowUp || 0,
- item.pendingFollowUp || 0,
- item.followUpSuccess || 0,
- item.followUpFail || 0,
- item.followUpRate || "0%",
- item.rate ? (Number(item.rate) * 100).toFixed(2) + "%" : "0%",
- item.manual || 0,
- item.sms || 0,
- item.weChat || 0,
- // 鍐嶆鍑洪櫌闅忚鏁版嵁
- item.needFollowUpAgain || 0,
- item.pendingFollowUpAgain || 0,
- item.followUpSuccessAgain || 0,
- item.followUpFailAgain || 0,
- item.followUpRateAgain || "0%",
- item.manualAgain || 0,
- item.smsAgain || 0,
- item.weChatAgain || 0,
- ],
- rowIndex + 4
- ); // 浠庣4琛屽紑濮嬫坊鍔犳暟鎹紙鍘熺3琛岋級
-
- // 搴旂敤鏁版嵁琛屾牱寮�
- dataRow.eachCell((cell) => {
- cell.style = cellStyle;
- });
- dataRow.height = 24;
- });
-
- // 娣诲姞鍚堣琛�
- const summaries = this.getSummaries({
- columns: [
- { property: "" },
- { property: "leavehospitaldistrictname" },
- { property: "deptname" },
- { property: "dischargeCount" },
- { property: "nonFollowUp" },
- { property: "followUpNeeded" },
- { property: "needFollowUp" },
- { property: "pendingFollowUp" },
- { property: "followUpSuccess" },
- { property: "followUpFail" },
- { property: "followUpRate" },
- { property: "rate" },
- { property: "manual" },
- { property: "sms" },
- { property: "weChat" },
- { property: "needFollowUpAgain" },
- { property: "pendingFollowUpAgain" },
- { property: "followUpSuccessAgain" },
- { property: "followUpFailAgain" },
- { property: "followUpRateAgain" },
- { property: "manualAgain" },
- { property: "smsAgain" },
- { property: "weChatAgain" },
- ],
- data: this.userList,
- });
-
- const summaryRow = worksheet.addRow(summaries);
- summaryRow.eachCell((cell, colNumber) => {
- cell.style = summaryStyle;
- // 绗竴鍒楁樉绀�"鍚堣"
- if (colNumber === 1) {
- cell.value = "鍚堣";
+ if (!dataToExport || dataToExport.length === 0) {
+ this.$message.warning("鏆傛棤棣栨闅忚鏁版嵁鍙鍑�");
+ return false;
}
- });
- summaryRow.height = 28;
+ } else {
+ excelName = `鍐嶆鍑洪櫌闅忚缁熻琛╛${dateRangeString}.xlsx`;
+ worksheetName = `鍐嶆闅忚缁熻_${sheetNameSuffix}`;
+ dataToExport = this.secondFollowUpList;
- // 璁剧疆鍒楀
- worksheet.columns = [
- { width: 8 }, // 灞曞紑鍒�
- { width: 20 }, // 鍑洪櫌鐥呭尯
- { width: 15 }, // 绉戝
- { width: 12 }, // 鍑洪櫌浜烘
- { width: 12 }, // 鏃犻渶闅忚浜烘
- { width: 12 }, // 搴旈殢璁夸汉娆�
- // 棣栨鍑洪櫌闅忚鍒�
- { width: 10 },
- { width: 10 },
- { width: 10 },
- { width: 10 },
- { width: 12 },
- { width: 12 },
- { width: 8 },
- { width: 8 },
- { width: 8 },
- // 鍐嶆鍑洪櫌闅忚鍒�
- { width: 10 },
- { width: 10 },
- { width: 10 },
- { width: 10 },
- { width: 12 },
- { width: 8 },
- { width: 8 },
- { width: 8 },
- ];
+ if (!dataToExport || dataToExport.length === 0) {
+ this.$message.warning("鏆傛棤鍐嶆闅忚鏁版嵁鍙鍑�");
+ return false;
+ }
+ }
- // 鐢熸垚骞朵笅杞芥枃浠�
+ // 3. 鍒涘缓宸ヤ綔绨垮拰宸ヤ綔琛�
+ const workbook = new ExcelJS.Workbook();
+ const worksheet = workbook.addWorksheet(worksheetName);
+
+ // 4. 鏋勫缓琛ㄦ牸
+ if (isFirstFollowUp) {
+ this.buildFirstFollowUpExportSheet(
+ worksheet,
+ dataToExport,
+ sheetNameSuffix
+ );
+ } else {
+ this.buildSecondFollowUpExportSheet(
+ worksheet,
+ dataToExport,
+ sheetNameSuffix
+ );
+ }
+
+ // 5. 鐢熸垚骞朵笅杞芥枃浠�
const buffer = await workbook.xlsx.writeBuffer();
const blob = new Blob([buffer], {
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
@@ -2534,7 +2430,666 @@
return false;
}
},
+ /** 鏋勫缓棣栨闅忚瀵煎嚭琛ㄦ牸 */
+ buildFirstFollowUpExportSheet(worksheet, data, sheetNameSuffix) {
+ const titleStyle = {
+ font: {
+ name: "寰蒋闆呴粦",
+ size: 16,
+ bold: true,
+ color: { argb: "FF000000" },
+ },
+ fill: {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFE6F3FF" },
+ },
+ alignment: { vertical: "middle", horizontal: "center", wrapText: true },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+ const headerStyle = {
+ font: {
+ name: "寰蒋闆呴粦",
+ size: 11,
+ bold: true,
+ color: { argb: "FF000000" },
+ },
+ fill: {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFF5F7FA" },
+ },
+ alignment: { vertical: "middle", horizontal: "center", wrapText: true },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+
+ const cellStyle = {
+ font: { name: "瀹嬩綋", size: 10, color: { argb: "FF000000" } },
+ alignment: { vertical: "middle", horizontal: "center" },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+
+ const summaryStyle = {
+ font: {
+ name: "瀹嬩綋",
+ size: 10,
+ bold: true,
+ color: { argb: "FF409EFF" },
+ },
+ fill: {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFF5F7FA" },
+ },
+ alignment: { vertical: "middle", horizontal: "center" },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+
+ // 1. 娣诲姞鎬绘爣棰樿
+ worksheet.mergeCells(1, 1, 1, 16); // 鍚堝苟A1鍒癙1
+ const titleCell = worksheet.getCell(1, 1);
+ titleCell.value = `棣栨鍑洪櫌闅忚缁熻琛╛${sheetNameSuffix}`;
+ titleCell.style = titleStyle;
+ worksheet.getRow(1).height = 35;
+
+ // 2. 鍒涘缓琛ㄥご
+ const secondRowHeaders = [
+ "", // A2 灞曞紑鍒楀崰浣�
+ "鍑洪櫌鐥呭尯",
+ "绉戝",
+ "鍑洪櫌浜烘",
+ "鏃犻渶闅忚浜烘",
+ "搴旈殢璁夸汉娆�", // B2 to F2
+ // 棣栨鍑洪櫌闅忚瀛愯〃澶�
+ "闇�闅忚",
+ "寰呴殢璁�",
+ "闅忚鎴愬姛",
+ "闅忚澶辫触",
+ "闅忚鐜�",
+ "鍙婃椂鐜�",
+ "浜哄伐",
+ "鐭俊",
+ "寰俊",
+ ];
+
+ // 娣诲姞绗簩琛�
+ secondRowHeaders.forEach((header, index) => {
+ const cell = worksheet.getCell(3, index + 1);
+ cell.value = header;
+ cell.style = headerStyle;
+ });
+
+ // 3. 鍚堝苟鍗曞厓鏍�
+ // 鍚堝苟 A2:A3, B2:B3, C2:C3, D2:D3, E2:E3, F2:F3
+ for (let i = 1; i <= 6; i++) {
+ worksheet.mergeCells(2, i, 3, i);
+ const cell = worksheet.getCell(2, i);
+ cell.style = headerStyle;
+ }
+
+ // 璁剧疆绗竴琛屽悎骞跺崟鍏冩牸鐨勫��
+ worksheet.getCell(2, 1).value = "";
+ worksheet.getCell(2, 2).value = "鍑洪櫌鐥呭尯";
+ worksheet.getCell(2, 3).value = "绉戝";
+ worksheet.getCell(2, 4).value = "鍑洪櫌浜烘";
+ worksheet.getCell(2, 5).value = "鏃犻渶闅忚浜烘";
+ worksheet.getCell(2, 6).value = "搴旈殢璁夸汉娆�";
+
+ // 4. 鍚堝苟"棣栨鍑洪櫌闅忚"鏍囬
+ worksheet.mergeCells(2, 7, 2, 15); // G2:O2
+ worksheet.getCell(2, 7).value = "棣栨鍑洪櫌闅忚";
+ worksheet.getCell(2, 7).style = headerStyle;
+
+ // 5. 璁剧疆琛岄珮
+ worksheet.getRow(2).height = 28;
+ worksheet.getRow(3).height = 25;
+
+ // 6. 娣诲姞鏁版嵁琛�
+ data.forEach((item, rowIndex) => {
+ const dataRow = worksheet.addRow(
+ [
+ "", // 灞曞紑鍒�
+ item.leavehospitaldistrictname || "",
+ item.deptname || "",
+ item.dischargeCount || 0,
+ item.nonFollowUp || 0,
+ item.followUpNeeded || 0,
+ // 棣栨鍑洪櫌闅忚鏁版嵁
+ item.needFollowUp || 0,
+ item.pendingFollowUp || 0,
+ item.followUpSuccess || 0,
+ item.followUpFail || 0,
+ item.followUpRate || "0%",
+ item.rate ? (Number(item.rate) * 100).toFixed(2) + "%" : "0%",
+ item.manual || 0,
+ item.sms || 0,
+ item.weChat || 0,
+ ],
+ rowIndex + 4
+ );
+
+ // 搴旂敤鏁版嵁琛屾牱寮�
+ dataRow.eachCell((cell) => {
+ cell.style = cellStyle;
+ });
+ dataRow.height = 24;
+ });
+
+ // 7. 娣诲姞鍚堣琛�
+ const summaries = this.getFirstFollowUpSummaries(data);
+ const summaryRow = worksheet.addRow(summaries);
+ summaryRow.eachCell((cell, colNumber) => {
+ cell.style = summaryStyle;
+ if (colNumber === 1) {
+ cell.value = "鍚堣";
+ }
+ });
+ summaryRow.height = 28;
+
+ // 8. 璁剧疆鍒楀
+ worksheet.columns = [
+ { width: 8 }, // 灞曞紑鍒�
+ { width: 20 }, // 鍑洪櫌鐥呭尯
+ { width: 15 }, // 绉戝
+ { width: 12 }, // 鍑洪櫌浜烘
+ { width: 12 }, // 鏃犻渶闅忚浜烘
+ { width: 12 }, // 搴旈殢璁夸汉娆�
+ // 棣栨鍑洪櫌闅忚鍒�
+ { width: 10 }, // 闇�闅忚
+ { width: 10 }, // 寰呴殢璁�
+ { width: 10 }, // 闅忚鎴愬姛
+ { width: 10 }, // 闅忚澶辫触
+ { width: 12 }, // 闅忚鐜�
+ { width: 12 }, // 鍙婃椂鐜�
+ { width: 8 }, // 浜哄伐
+ { width: 8 }, // 鐭俊
+ { width: 8 }, // 寰俊
+ ];
+ },
+
+ /** 棣栨闅忚鏁版嵁鍚堣琛岃绠� */
+ getFirstFollowUpSummaries(data) {
+ const summaries = [
+ "鍚堣",
+ "/",
+ "/",
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ "0%",
+ "0%",
+ 0,
+ 0,
+ 0,
+ ];
+
+ data.forEach((item) => {
+ // 鏁板�煎瓧娈垫眰鍜�
+ summaries[3] += Number(item.dischargeCount) || 0;
+ summaries[4] += Number(item.nonFollowUp) || 0;
+ summaries[5] += Number(item.followUpNeeded) || 0;
+ summaries[6] += Number(item.needFollowUp) || 0;
+ summaries[7] += Number(item.pendingFollowUp) || 0;
+ summaries[8] += Number(item.followUpSuccess) || 0;
+ summaries[9] += Number(item.followUpFail) || 0;
+ summaries[12] += Number(item.manual) || 0;
+ summaries[13] += Number(item.sms) || 0;
+ summaries[14] += Number(item.weChat) || 0;
+ });
+
+ // 璁$畻鐧惧垎姣斿瓧娈电殑骞冲潎鍊�
+ const followUpRateValues = data
+ .map((item) => this.extractPercentageValue(item.followUpRate))
+ .filter((value) => value !== null);
+
+ const rateValues = data
+ .map((item) => this.extractPercentageValue(item.rate))
+ .filter((value) => value !== null);
+
+ if (followUpRateValues.length > 0) {
+ const avgFollowUpRate =
+ followUpRateValues.reduce((sum, val) => sum + val, 0) /
+ followUpRateValues.length;
+ summaries[10] = (avgFollowUpRate * 100).toFixed(2) + "%";
+ }
+
+ if (rateValues.length > 0) {
+ const avgRate =
+ rateValues.reduce((sum, val) => sum + val, 0) / rateValues.length;
+ summaries[11] = (avgRate * 100).toFixed(2) + "%";
+ }
+
+ // 鏍煎紡鍖栨暟瀛�
+ summaries[3] = this.formatNumber(summaries[3]);
+ summaries[4] = this.formatNumber(summaries[4]);
+ summaries[5] = this.formatNumber(summaries[5]);
+ summaries[6] = this.formatNumber(summaries[6]);
+ summaries[7] = this.formatNumber(summaries[7]);
+ summaries[8] = this.formatNumber(summaries[8]);
+ summaries[9] = this.formatNumber(summaries[9]);
+ summaries[12] = this.formatNumber(summaries[12]);
+ summaries[13] = this.formatNumber(summaries[13]);
+ summaries[14] = this.formatNumber(summaries[14]);
+
+ return summaries;
+ },
+
+ /** 鏋勫缓鍐嶆闅忚瀵煎嚭琛ㄦ牸 */
+ buildSecondFollowUpExportSheet(worksheet, data, sheetNameSuffix) {
+ const titleStyle = {
+ font: {
+ name: "寰蒋闆呴粦",
+ size: 16,
+ bold: true,
+ color: { argb: "FF000000" },
+ },
+ fill: {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFE6F3FF" },
+ },
+ alignment: { vertical: "middle", horizontal: "center", wrapText: true },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+
+ const headerStyle = {
+ font: {
+ name: "寰蒋闆呴粦",
+ size: 11,
+ bold: true,
+ color: { argb: "FF000000" },
+ },
+ fill: {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFF5F7FA" },
+ },
+ alignment: { vertical: "middle", horizontal: "center", wrapText: true },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+
+ const cellStyle = {
+ font: { name: "瀹嬩綋", size: 10, color: { argb: "FF000000" } },
+ alignment: { vertical: "middle", horizontal: "center" },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+
+ const summaryStyle = {
+ font: {
+ name: "瀹嬩綋",
+ size: 10,
+ bold: true,
+ color: { argb: "FF409EFF" },
+ },
+ fill: {
+ type: "pattern",
+ pattern: "solid",
+ fgColor: { argb: "FFF5F7FA" },
+ },
+ alignment: { vertical: "middle", horizontal: "center" },
+ border: {
+ top: { style: "thin", color: { argb: "FFD0D0D0" } },
+ left: { style: "thin", color: { argb: "FFD0D0D0" } },
+ bottom: { style: "thin", color: { argb: "FFD0D0D0" } },
+ right: { style: "thin", color: { argb: "FFD0D0D0" } },
+ },
+ };
+
+ // 1. 娣诲姞鎬绘爣棰樿
+ worksheet.mergeCells(1, 1, 1, 15); // 鍚堝苟A1鍒癘1
+ const titleCell = worksheet.getCell(1, 1);
+ titleCell.value = `鍐嶆鍑洪櫌闅忚缁熻琛╛${sheetNameSuffix}`;
+ titleCell.style = titleStyle;
+ worksheet.getRow(1).height = 35;
+
+ // 2. 鍒涘缓琛ㄥご
+ const secondRowHeaders = [
+ "", // A2 灞曞紑鍒楀崰浣�
+ "鍑洪櫌鐥呭尯",
+ "绉戝",
+ "鍑洪櫌浜烘",
+ "鏃犻渶闅忚浜烘",
+ "搴旈殢璁夸汉娆�", // B2 to F2
+ // 鍐嶆鍑洪櫌闅忚瀛愯〃澶�
+ "闇�闅忚",
+ "寰呴殢璁�",
+ "闅忚鎴愬姛",
+ "闅忚澶辫触",
+ "闅忚鐜�",
+ "浜哄伐",
+ "鐭俊",
+ "寰俊",
+ ];
+
+ // 娣诲姞绗簩琛�
+ secondRowHeaders.forEach((header, index) => {
+ const cell = worksheet.getCell(3, index + 1);
+ cell.value = header;
+ cell.style = headerStyle;
+ });
+
+ // 3. 鍚堝苟鍗曞厓鏍�
+ // 鍚堝苟 A2:A3, B2:B3, C2:C3, D2:D3, E2:E3, F2:F3
+ for (let i = 1; i <= 6; i++) {
+ worksheet.mergeCells(2, i, 3, i);
+ const cell = worksheet.getCell(2, i);
+ cell.style = headerStyle;
+ }
+
+ // 璁剧疆绗竴琛屽悎骞跺崟鍏冩牸鐨勫��
+ worksheet.getCell(2, 1).value = "";
+ worksheet.getCell(2, 2).value = "鍑洪櫌鐥呭尯";
+ worksheet.getCell(2, 3).value = "绉戝";
+ worksheet.getCell(2, 4).value = "鍑洪櫌浜烘";
+ worksheet.getCell(2, 5).value = "鏃犻渶闅忚浜烘";
+ worksheet.getCell(2, 6).value = "搴旈殢璁夸汉娆�";
+
+ // 4. 鍚堝苟"鍐嶆鍑洪櫌闅忚"鏍囬
+ worksheet.mergeCells(2, 7, 2, 14); // G2:N2
+ worksheet.getCell(2, 7).value = "鍐嶆鍑洪櫌闅忚";
+ worksheet.getCell(2, 7).style = headerStyle;
+
+ // 5. 璁剧疆琛岄珮
+ worksheet.getRow(2).height = 28;
+ worksheet.getRow(3).height = 25;
+
+ // 6. 娣诲姞鏁版嵁琛�
+ data.forEach((item, rowIndex) => {
+ const dataRow = worksheet.addRow(
+ [
+ "", // 灞曞紑鍒�
+ item.leavehospitaldistrictname || "",
+ item.deptname || "",
+ item.dischargeCount || 0,
+ item.nonFollowUp || 0,
+ item.followUpNeeded || 0,
+ // 鍐嶆鍑洪櫌闅忚鏁版嵁
+ item.needFollowUpAgain || 0,
+ item.pendingFollowUpAgain || 0,
+ item.followUpSuccessAgain || 0,
+ item.followUpFailAgain || 0,
+ item.followUpRateAgain || "0%",
+ item.manualAgain || 0,
+ item.smsAgain || 0,
+ item.weChatAgain || 0,
+ ],
+ rowIndex + 4
+ );
+
+ // 搴旂敤鏁版嵁琛屾牱寮�
+ dataRow.eachCell((cell) => {
+ cell.style = cellStyle;
+ });
+ dataRow.height = 24;
+ });
+
+ // 7. 娣诲姞鍚堣琛�
+ const summaries = this.getSecondFollowUpSummaries(data);
+ const summaryRow = worksheet.addRow(summaries);
+ summaryRow.eachCell((cell, colNumber) => {
+ cell.style = summaryStyle;
+ if (colNumber === 1) {
+ cell.value = "鍚堣";
+ }
+ });
+ summaryRow.height = 28;
+
+ // 8. 璁剧疆鍒楀
+ worksheet.columns = [
+ { width: 8 }, // 灞曞紑鍒�
+ { width: 20 }, // 鍑洪櫌鐥呭尯
+ { width: 15 }, // 绉戝
+ { width: 12 }, // 鍑洪櫌浜烘
+ { width: 12 }, // 鏃犻渶闅忚浜烘
+ { width: 12 }, // 搴旈殢璁夸汉娆�
+ // 鍐嶆鍑洪櫌闅忚鍒�
+ { width: 10 }, // 闇�闅忚
+ { width: 10 }, // 寰呴殢璁�
+ { width: 10 }, // 闅忚鎴愬姛
+ { width: 10 }, // 闅忚澶辫触
+ { width: 12 }, // 闅忚鐜�
+ { width: 8 }, // 浜哄伐
+ { width: 8 }, // 鐭俊
+ { width: 8 }, // 寰俊
+ ];
+ },
+
+ /** 鍐嶆闅忚鏁版嵁鍚堣琛岃绠� */
+ getSecondFollowUpSummaries(data) {
+ const summaries = ["鍚堣", "/", "/", 0, 0, 0, 0, 0, 0, 0, "0%", 0, 0, 0];
+
+ data.forEach((item) => {
+ // 鏁板�煎瓧娈垫眰鍜�
+ summaries[3] += Number(item.dischargeCount) || 0;
+ summaries[4] += Number(item.nonFollowUp) || 0;
+ summaries[5] += Number(item.followUpNeeded) || 0;
+ summaries[6] += Number(item.needFollowUpAgain) || 0;
+ summaries[7] += Number(item.pendingFollowUpAgain) || 0;
+ summaries[8] += Number(item.followUpSuccessAgain) || 0;
+ summaries[9] += Number(item.followUpFailAgain) || 0;
+ summaries[11] += Number(item.manualAgain) || 0;
+ summaries[12] += Number(item.smsAgain) || 0;
+ summaries[13] += Number(item.weChatAgain) || 0;
+ });
+
+ // 璁$畻闅忚鐜囩櫨鍒嗘瘮瀛楁鐨勫钩鍧囧��
+ const followUpRateAgainValues = data
+ .map((item) => this.extractPercentageValue(item.followUpRateAgain))
+ .filter((value) => value !== null);
+
+ if (followUpRateAgainValues.length > 0) {
+ const avgFollowUpRateAgain =
+ followUpRateAgainValues.reduce((sum, val) => sum + val, 0) /
+ followUpRateAgainValues.length;
+ summaries[10] = (avgFollowUpRateAgain * 100).toFixed(2) + "%";
+ }
+
+ // 鏍煎紡鍖栨暟瀛�
+ summaries[3] = this.formatNumber(summaries[3]);
+ summaries[4] = this.formatNumber(summaries[4]);
+ summaries[5] = this.formatNumber(summaries[5]);
+ summaries[6] = this.formatNumber(summaries[6]);
+ summaries[7] = this.formatNumber(summaries[7]);
+ summaries[8] = this.formatNumber(summaries[8]);
+ summaries[9] = this.formatNumber(summaries[9]);
+ summaries[11] = this.formatNumber(summaries[11]);
+ summaries[12] = this.formatNumber(summaries[12]);
+ summaries[13] = this.formatNumber(summaries[13]);
+
+ return summaries;
+ },
+
+ /** 鍐嶆闅忚琛ㄦ牸鐨勫悎璁¤璁$畻鏂规硶 */
+ getSummariesSecond(param) {
+ const { columns, data } = param;
+ const sums = [];
+
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ return;
+ }
+ if (index === 1 || index === 2) {
+ sums[index] = "/";
+ return;
+ }
+
+ if (column.property === "followUpRateAgain") {
+ const percentageValues = data
+ .map((item) => {
+ const value = item[column.property];
+ if (!value || value === "-" || value === "0%") return null;
+ if (typeof value === "string" && value.includes("%")) {
+ const numValue = parseFloat(value.replace("%", "")) / 100;
+ return isNaN(numValue) ? null : numValue;
+ } else {
+ const numValue = parseFloat(value);
+ return isNaN(numValue) ? null : numValue;
+ }
+ })
+ .filter((value) => value !== null && value !== 0);
+
+ if (percentageValues.length > 0) {
+ const average =
+ percentageValues.reduce((sum, value) => sum + value, 0) /
+ percentageValues.length;
+ sums[index] = (average * 100).toFixed(2) + "%";
+ } else {
+ sums[index] = "0.00%";
+ }
+ } else {
+ const values = data.map((item) => {
+ const value = item[column.property];
+ if (value === "-" || value === "" || value === null) return 0;
+ return Number(value) || 0;
+ });
+
+ if (!values.every((value) => isNaN(value))) {
+ sums[index] = values.reduce((prev, curr) => prev + curr, 0);
+ sums[index] = this.formatNumber(sums[index]);
+ } else {
+ sums[index] = "-";
+ }
+ }
+ });
+
+ return sums;
+ },
+ /** 鍐嶆闅忚鍐呴儴琛ㄦ牸鍚堣琛岃绠楁柟娉� */
+ getInnerSummariesSecond(param) {
+ const { columns, data } = param;
+ const sums = [];
+
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = "灏忚";
+ return;
+ }
+
+ if (column.property === "drname" || column.property === "deptname") {
+ sums[index] = "-";
+ return;
+ }
+
+ if (column.property === "followUpRateAgain") {
+ const percentageValues = data
+ .map((item) => {
+ const value = item[column.property];
+ if (!value || value === "-" || value === "0%") return null;
+ if (typeof value === "string" && value.includes("%")) {
+ const numValue = parseFloat(value.replace("%", "")) / 100;
+ return isNaN(numValue) ? null : numValue;
+ } else {
+ const numValue = parseFloat(value);
+ return isNaN(numValue) ? null : numValue;
+ }
+ })
+ .filter((value) => value !== null && value !== 0);
+
+ if (percentageValues.length > 0) {
+ const average =
+ percentageValues.reduce((sum, value) => sum + value, 0) /
+ percentageValues.length;
+ sums[index] = (average * 100).toFixed(2) + "%";
+ } else {
+ sums[index] = "0.00%";
+ }
+ } else {
+ const values = data.map((item) => {
+ const value = item[column.property];
+ if (value === "-" || value === "" || value === null) return 0;
+ return Number(value) || 0;
+ });
+
+ if (!values.every((value) => isNaN(value))) {
+ sums[index] = values.reduce((prev, curr) => prev + curr, 0);
+ sums[index] = this.formatNumber(sums[index]);
+ } else {
+ sums[index] = "-";
+ }
+ }
+ });
+
+ return sums;
+ },
+ /** 鍐嶆闅忚琛ㄦ牸鐨勮鐐瑰嚮灞曞紑 */
+ handleRowClickSecond(row) {
+ if (this.expandsSecond.includes(this.getRowKey(row))) {
+ this.expandsSecond = [];
+ return;
+ }
+
+ const params = {
+ ...this.queryParams,
+ deptcodes: this.queryParams.deptcodes.includes("all")
+ ? this.allDeptCodes
+ : this.queryParams.deptcodes,
+ leavehospitaldistrictcodes: [row.leavehospitaldistrictcode],
+ drcode: "1",
+ visitCount: 2, // 璁剧疆涓哄啀娆¢殢璁�
+ };
+
+ delete params.leavehospitaldistrictcodes.all;
+ delete params.deptcodes.all;
+
+ if (!row.doctorStats) {
+ this.loadingSecond = true;
+ getSfStatistics(params).then((res) => {
+ this.$set(row, "doctorStats", res.data);
+ this.expandsSecond = [this.getRowKey(row)];
+ this.loadingSecond = false;
+ });
+ } else {
+ this.expandsSecond = [this.getRowKey(row)];
+ }
+ },
+
+ /** 鍐嶆闅忚琛ㄦ牸鐨勫閫夋閫変腑鏁版嵁 */
+ handleSelectionChangeSecond(selection) {
+ this.idsSecond = selection.map((item) => item.tagid);
+ this.single = selection.length != 1;
+ this.multiple = !selection.length;
+ },
// 鏄剧ず鍥捐〃寮圭獥
showChartDialog() {
@@ -2892,6 +3447,27 @@
</script>
<style lang="scss" scoped>
+::v-deep .el-tabs__header {
+ margin-bottom: 20px;
+}
+
+::v-deep .el-tabs__item {
+ font-size: 16px;
+ padding: 0 20px;
+ height: 40px;
+ line-height: 40px;
+}
+
+::v-deep .el-tabs__active-bar {
+ height: 3px;
+}
+
+/* Tab鍐呭鍖哄煙鏍峰紡 */
+.el-tab-pane {
+ .your-table-container {
+ margin-top: 10px;
+ }
+}
.sidecolumn {
width: 180px;
min-height: 100vh;
--
Gitblit v1.9.3