From e8c62bd430b9697d3f954125b7ec9f61f18347a2 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期一, 20 十月 2025 11:19:34 +0800
Subject: [PATCH] 测试完成
---
src/views/sfstatistics/percentage/index.vue | 1226 ++++++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 1,069 insertions(+), 157 deletions(-)
diff --git a/src/views/sfstatistics/percentage/index.vue b/src/views/sfstatistics/percentage/index.vue
index 8b1537d..7647fae 100644
--- a/src/views/sfstatistics/percentage/index.vue
+++ b/src/views/sfstatistics/percentage/index.vue
@@ -1,37 +1,6 @@
<template>
<div class="Questionnairemanagement">
- <!-- 宸︿晶鏍� -->
- <!-- <div class="sidecolumn">
- <div class="sidecolumn-top">
- <div class="top-wj">鎮h�呰寖鍥�</div>
- </div>
-
- <div class="bottom-fl">
- <el-tabs
- tab-position="right"
- v-model="activeName"
- @tab-click="handleClick"
- >
- <el-tab-pane label="鍏ㄩ儴" name="first"></el-tab-pane>
- <el-tab-pane label="浣忛櫌" name="bhospitalized"></el-tab-pane>
- <el-tab-pane label="鍦ㄩ櫌" name="Inhospital"></el-tab-pane>
- <el-tab-pane label="闂ㄨ瘖" name="outpatient"></el-tab-pane>
- <el-tab-pane label="浣撴" name="physical"></el-tab-pane>
- </el-tabs>
- </div>
- </div> -->
- <!-- 鍙充晶鏁版嵁 -->
<div class="leftvlue">
- <!-- <div class="leftvlue-top">
- <el-tabs v-model="topactiveName" @tab-click="tophandleClick">
- <el-tab-pane name="Local">
- <span class="mulsz" slot="label">鎸夊嚭闄㈢梾鍖虹粺璁� </span>
- </el-tab-pane>
- <el-tab-pane name="sharing">
- <span class="mulsz" slot="label">鎸夊嚭闄㈢瀹ょ粺璁� </span>
- </el-tab-pane>
- </el-tabs>
- </div> -->
<div class="leftvlue-bg">
<el-row :gutter="20">
<!--鏍囩鏁版嵁-->
@@ -44,17 +13,6 @@
v-show="showSearch"
label-width="98px"
>
- <!-- <el-form-item label="鍖婚櫌" prop="userName">
- <el-select v-model="queryParams.value1" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in options"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- </el-form-item> -->
<el-form-item label="缁熻绫诲瀷" prop="userName">
<el-select
v-model="queryParams.statisticaltype"
@@ -125,6 +83,7 @@
>
<el-date-picker
v-model="queryParams.dateRange"
+ value-format="yyyy-MM-dd"
type="daterange"
range-separator="鑷�"
start-placeholder="寮�濮嬫棩鏈�"
@@ -148,65 +107,242 @@
>閲嶇疆</el-button
>
</el-form-item>
- </el-form>
-
- <el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
+ <el-col :span="19">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-download"
+ size="medium"
+ @click="handleExport"
+ >瀵煎嚭</el-button
+ >
<el-button
type="primary"
plain
- icon="el-icon-plus"
+ icon="el-icon-data-line"
size="medium"
- @click="addladeltag"
- v-hasPermi="['system:user:add']"
- >鏂板</el-button
+ @click="showChartDialog"
+ >缁熻瓒嬪娍鍥�</el-button
>
</el-col>
-
- <el-col :span="1.5">
- <el-button
- type="danger"
- plain
- icon="el-icon-delete"
- size="medium"
- :disabled="multiple"
- @click="handleDelete"
- v-hasPermi="['system:user:remove']"
- >鍒犻櫎</el-button
- >
- </el-col>
- <el-col :span="1.5">
- <div class="documentf">
- <div class="document">
- <el-button
- type="warning"
- plain
- icon="el-icon-download"
- size="medium"
- @click="handleExport"
- v-hasPermi="['system:user:export']"
- >瀵煎嚭</el-button
- >
- </div>
- </div>
- </el-col>
-
- <!-- <el-col :span="1.5"> </el-col> -->
- </el-row>
- <!-- <right-toolbar
- :showSearch.sync="showSearch"
- @queryTable="getList"
- :columns="columns"
- ></right-toolbar> -->
+ </el-form>
<el-table
v-loading="loading"
:data="userList"
:border="true"
@selection-change="handleSelectionChange"
+ @expand-change="handleRowClick"
+ :row-key="getRowKey"
+ :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"
+ >
+ <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"
+ >
+ <!-- <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
+ >
+ </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"
@@ -245,7 +381,7 @@
</el-table-column>
<el-table-column align="center" label="棣栨鍑洪櫌闅忚">
<el-table-column
- label="搴旈殢璁�"
+ label="闇�闅忚"
align="center"
key="needFollowUp"
prop="needFollowUp"
@@ -288,6 +424,24 @@
</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
+ >
+ </template>
+ </el-table-column>
+ <el-table-column
label="浜哄伐"
align="center"
key="manual"
@@ -311,7 +465,7 @@
</el-table-column>
<el-table-column align="center" label="鍐嶆鍑洪櫌闅忚">
<el-table-column
- label="搴旈殢璁�"
+ label="闇�闅忚"
align="center"
key="needFollowUpAgain"
prop="needFollowUpAgain"
@@ -375,6 +529,52 @@
>
</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>
<!-- <pagination
@@ -388,6 +588,254 @@
</el-row>
</div>
</div>
+ <!-- 缁熻瓒嬪娍鍥惧脊绐� -->
+ <el-dialog
+ title="闅忚缁熻瓒嬪娍鍥�"
+ :visible.sync="chartDialogVisible"
+ width="80%"
+ :close-on-click-modal="false"
+ >
+ <div class="chart-container">
+ <el-row :gutter="20">
+ <el-col :span="12">
+ <div class="chart-title">闅忚鐘舵�佸垎甯�</div>
+ <div id="pieChart" style="width: 100%; height: 400px"></div>
+ </el-col>
+ <el-col :span="12">
+ <div class="chart-title">闅忚瓒嬪娍鍒嗘瀽</div>
+ <div id="barLineChart" style="width: 100%; height: 400px"></div>
+ </el-col>
+ </el-row>
+ </div>
+ </el-dialog>
+ <el-dialog
+ title="鏈強鏃堕殢璁挎偅鑰呮湇鍔�"
+ :visible.sync="SeedetailsVisible"
+ v-loading="Seedloading"
+ width="70%"
+ :close-on-click-modal="false"
+ >
+ <div class="examine-jic">
+ <div class="jic-value">
+ <el-row :gutter="20">
+ <!--鐢ㄦ埛鏁版嵁-->
+ <el-form
+ :model="patientqueryParams"
+ ref="queryForm"
+ size="small"
+ :inline="true"
+ label-width="98px"
+ >
+ <el-form-item label="鎮h�咃細">
+ <el-input
+ v-model="patientqueryParams.name"
+ @keyup.enter.native="handleQuery"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="鎮h�呰瘖鏂細">
+ <el-input
+ v-model="patientqueryParams.leavediagname"
+ @keyup.enter.native="handleQuery"
+ ></el-input>
+ </el-form-item>
+
+ <el-form-item>
+ <el-button
+ type="primary"
+ icon="el-icon-search"
+ size="medium"
+ @click="handleQuery"
+ >鎼滅储</el-button
+ >
+ <el-button
+ icon="el-icon-refresh"
+ size="medium"
+ @click="resetQuery"
+ >鍙栨秷鍒涘缓</el-button
+ >
+ </el-form-item>
+ </el-form>
+ <!-- 閫夋嫨鎮h�呭垪琛� -->
+ <el-table :data="logsheetlist" style="width: 100%">
+ <el-table-column
+ prop="sendname"
+ align="center"
+ label="濮撳悕"
+ width="100"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="taskName"
+ align="center"
+ width="200"
+ show-overflow-tooltip
+ label="浠诲姟鍚嶇О"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="sendstate"
+ align="center"
+ width="200"
+ label="浠诲姟鐘舵��"
+ >
+ <template slot-scope="scope">
+ <div v-if="scope.row.sendstate == 1">
+ <el-tag type="primary" :disable-transitions="false"
+ >琛ㄥ崟宸查鍙�</el-tag
+ >
+ </div>
+ <div v-if="scope.row.sendstate == 2">
+ <el-tag type="primary" :disable-transitions="false"
+ >寰呴殢璁�</el-tag
+ >
+ </div>
+ <div v-if="scope.row.sendstate == 3">
+ <el-tag type="success" :disable-transitions="false"
+ >琛ㄥ崟宸插彂閫�</el-tag
+ >
+ </div>
+ <div v-if="scope.row.sendstate == 4">
+ <el-tag type="info" :disable-transitions="false"
+ >涓嶆墽琛�</el-tag
+ >
+ </div>
+ <div v-if="scope.row.sendstate == 5">
+ <el-tag type="danger" :disable-transitions="false"
+ >鍙戦�佸け璐�</el-tag
+ >
+ </div>
+ <div v-if="scope.row.sendstate == 6">
+ <el-tag type="success" :disable-transitions="false"
+ >宸插畬鎴�</el-tag
+ >
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="visitTime"
+ align="center"
+ label="搴旈殢璁挎椂闂�"
+ width="200"
+ show-overflow-tooltip
+ >
+ </el-table-column>
+ <el-table-column
+ prop="finishtime"
+ align="center"
+ label="闅忚瀹屾垚鏃堕棿"
+ width="200"
+ show-overflow-tooltip
+ >
+ </el-table-column>
+ <el-table-column
+ label="鍑洪櫌鏃ユ湡"
+ width="200"
+ align="center"
+ key="endtime"
+ prop="endtime"
+ >
+ <template slot-scope="scope">
+ <span>{{ formatTime(scope.row.endtime) }}</span>
+ </template></el-table-column
+ >
+ <el-table-column
+ label="璐d换鎶ゅ+"
+ width="120"
+ align="center"
+ key="nurseName"
+ prop="nurseName"
+ />
+ <el-table-column
+ label="涓绘不鍖荤敓"
+ width="120"
+ align="center"
+ key="drname"
+ prop="drname"
+ />
+
+ <el-table-column
+ label="缁撴灉鐘舵��"
+ align="center"
+ key="excep"
+ prop="excep"
+ width="120"
+ >
+ <template slot-scope="scope">
+ <dict-tag
+ :options="dict.type.sys_yujing"
+ :value="scope.row.excep"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="澶勭悊鎰忚"
+ align="center"
+ key="suggest"
+ prop="suggest"
+ width="120"
+ >
+ <template slot-scope="scope">
+ <dict-tag
+ :options="dict.type.sys_suggest"
+ :value="scope.row.suggest"
+ />
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ prop="templatename"
+ align="center"
+ label="鏈嶅姟妯℃澘"
+ width="200"
+ show-overflow-tooltip
+ >
+ </el-table-column>
+ <el-table-column
+ prop="remark"
+ align="center"
+ label="鏈嶅姟璁板綍"
+ width="200"
+ show-overflow-tooltip
+ >
+ </el-table-column>
+
+ <el-table-column
+ prop="bankcardno"
+ align="center"
+ label="鍛煎彨鐘舵��"
+ width="210"
+ >
+ </el-table-column>
+ <el-table-column
+ label="鎿嶄綔"
+ fixed="right"
+ align="center"
+ width="200"
+ class-name="small-padding fixed-width"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="SeedetailsgGo(scope.row)"
+ ><span class="button-zx"
+ ><i class="el-icon-s-order"></i>鏌ョ湅</span
+ ></el-button
+ >
+ </template>
+ </el-table-column>
+ </el-table>
+ </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>
</div>
</template>
@@ -399,7 +847,7 @@
changetagcategory,
} from "@/api/system/label";
import store from "@/store";
-import { getSfStatistics, deptTreeSelect } from "@/api/system/user";
+import { getSfStatistics, selectTimelyRate } from "@/api/system/user";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -428,15 +876,21 @@
},
];
export default {
- name: "questionnaire",
+ name: "Percentage",
dicts: ["sys_normal_disable", "sys_user_sex"],
components: { Treeselect },
data() {
return {
topactiveName: "Local", //椤堕儴閫夋嫨
activeName: "first", //渚ц竟閫夋嫨
+ orgname:'',
+ expands: [],
// 閬僵灞�
loading: false,
+ Seedloading: false,
+ chartDialogVisible: false,
+ pieChart: null,
+ barLineChart: null,
// 閫変腑鏁扮粍
ids: [],
// 闈炲崟涓鐢�
@@ -450,7 +904,8 @@
total: 0,
flatArrayhospit: [],
flatArraydept: [],
-
+ patienttotal: 0,
+ logsheetlist: [],
Statisticallist: [
{
label: "鐥呭尯缁熻",
@@ -461,6 +916,10 @@
value: 2,
},
],
+ patientqueryParams: {
+ pn: 1,
+ ps: 10,
+ },
amendtag: false, //鏄惁淇敼绫诲埆
lstamendtag: false, //鏄惁淇敼鏍囩
scavisible: false, //鍒犻櫎寮规
@@ -488,6 +947,10 @@
postOptions: [],
// 瑙掕壊閫夐」
roleOptions: [],
+ // 瀛樺偍鎵�鏈夌瀹や唬鐮�
+ allDeptCodes: [],
+ // 瀛樺偍鎵�鏈夌梾鍖轰唬鐮�
+ allWardCodes: [],
// 琛ㄥ崟鍙傛暟
form: {},
forms: {
@@ -499,52 +962,8 @@
goQRCodeVisible: false, //浜岀淮鐮佸脊妗�
sidecolumnval: "", //绫诲埆鎼滅储
propss: { multiple: true },
-
- options: [
- {
- value: 1,
- label: "鐩戞祴璇勪及",
- },
- {
- value: 2,
- label: "鍑洪櫌闅忚",
- },
- {
- value: 3,
- label: "闂ㄨ瘖闅忚",
- },
- {
- value: 4,
- label: "瀹f暀鍏虫��",
- },
- {
- value: 5,
- label: "澶嶈瘖绠$悊",
- },
-
- {
- value: 7,
- label: "鎮h�呮姤鍛�",
- },
-
- {
- value: 9,
- label: "浣撴闅忚",
- },
-
- {
- value: 11,
- label: "褰卞儚闅忚",
- },
- {
- value: 12,
- label: "蹇冪數闅忚",
- },
- {
- value: 13,
- label: "涓撶梾闅忚",
- },
- ],
+ SeedetailsVisible: false,
+ options: store.getters.tasktypes,
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now() - 3600 * 1000 * 24;
@@ -564,6 +983,8 @@
serviceType: [2],
dateRange: [],
statisticaltype: 1,
+ leavehospitaldistrictcodes: ["all"], // 榛樿閫変腑鍏ㄩ儴鐥呭尯
+ deptcodes: [], // 榛樿閫変腑鍏ㄩ儴绉戝
},
// 鍒椾俊鎭�
columns: [
@@ -579,18 +1000,70 @@
},
watch: {},
created() {
- this.getList();
this.getDeptTree();
+ this.getList();
+ this.orgname = localStorage.getItem("orgname");
+
},
methods: {
/** 鏌ヨ鏍囩鍒楄〃 */
getList() {
- getSfStatistics(this.queryParams).then((response) => {
+ // 澶勭悊鏌ヨ鍙傛暟
+ const params = {
+ ...this.queryParams,
+ // 濡傛灉閫夋嫨浜�"鍏ㄩ儴"锛屽垯浼犳墍鏈夌梾鍖�/绉戝浠g爜
+ leavehospitaldistrictcodes:
+ this.queryParams.leavehospitaldistrictcodes.includes("all")
+ ? this.allWardCodes
+ : this.queryParams.leavehospitaldistrictcodes,
+ deptcodes: this.queryParams.deptcodes.includes("all")
+ ? this.allDeptCodes
+ : this.queryParams.deptcodes,
+ };
+
+ // 绉婚櫎鍙兘瀛樺湪鐨�"all"鍊�
+ delete params.leavehospitaldistrictcodes.all;
+ delete params.deptcodes.all;
+ getSfStatistics(params).then((response) => {
console.log(response);
// this.total = response.total;
this.userList = response.data;
});
+ },
+ getRowKey(row) {
+ return row.statisticaltype === 1
+ ? row.leavehospitaldistrictcode
+ : row.deptcode;
+ },
+
+ // 澶勭悊琛岀偣鍑诲睍寮�
+ handleRowClick(row) {
+ console.log(row, "row");
+
+ // 濡傛灉宸茬粡灞曞紑鍒欐敹璧�
+ if (this.expands.includes(this.getRowKey(row))) {
+ this.expands = [];
+ return;
+ }
+ // 澶勭悊鏌ヨ鍙傛暟
+ const params = {
+ ...this.queryParams,
+ // 濡傛灉閫夋嫨浜�"鍏ㄩ儴"锛屽垯浼犳墍鏈夌梾鍖�/绉戝浠g爜
+ leavehospitaldistrictcodes: [row.leavehospitaldistrictcode],
+ drcode: "1",
+ };
+ // 濡傛灉璇ヨ杩樻病鏈夊姞杞藉尰鐢熸暟鎹紝鍒欏姞杞�
+ if (!row.doctorStats) {
+ this.loading = true;
+ getSfStatistics(params).then((res) => {
+ this.$set(row, "doctorStats", res.data);
+ this.expands = [this.getRowKey(row)];
+ this.loading = false;
+ });
+ } else {
+ this.expands = [this.getRowKey(row)];
+ }
},
/** 淇敼鏍囩 */
handleUpdate(row) {
@@ -608,23 +1081,31 @@
// 鑾峰彇绉戝鏍�
getDeptTree() {
// 绉戝鍒楄〃
- this.flatArraydept = store.getters.belongDepts.map((dept) => {
- return {
- label: dept.deptName,
- value: dept.deptCode,
- };
- });
- this.flatArrayhospit = store.getters.belongWards.map((dept) => {
- return {
- label: dept.districtName,
- value: dept.districtCode,
- };
- });
- // deptTreeSelect().then((response) => {
- // this.deptOptions = response.data;
- // console.log(this.deptOptions, " this.deptOptions");
- // this.flatArray = this.flattenArray(response.data);
- // });
+ this.flatArraydept = store.getters.belongDepts.map((dept) => {
+ return {
+ label: dept.deptName,
+ value: dept.deptCode,
+ };
+ });
+ // 瀛樺偍鎵�鏈夌瀹や唬鐮�
+ this.allDeptCodes = store.getters.belongDepts.map(
+ (dept) => dept.deptCode
+ );
+
+ // 鐥呭尯鍒楄〃
+ this.flatArrayhospit = store.getters.belongWards.map((ward) => {
+ return {
+ label: ward.districtName,
+ value: ward.districtCode,
+ };
+ });
+
+ // 瀛樺偍鎵�鏈夌梾鍖轰唬鐮�
+ this.allWardCodes = store.getters.belongWards.map(
+ (ward) => ward.districtCode
+ );
+ this.flatArraydept.push({ label: "鍏ㄩ儴", value: "all" });
+ this.flatArrayhospit.push({ label: "鍏ㄩ儴", value: "all" });
},
flattenArray(multiArray) {
let result = [];
@@ -655,6 +1136,41 @@
tagdescription: "",
tagid: "",
};
+ },
+ Seedetails(row) {
+ this.SeedetailsVisible = true;
+ this.Seedloading = true;
+ this.patientqueryParams.starttime = this.parseTime(
+ this.queryParams.dateRange[0]
+ );
+ this.patientqueryParams.endtime = this.parseTime(
+ this.queryParams.dateRange[1]
+ );
+ this.patientqueryParams.deptcode = row.deptcode;
+ selectTimelyRate(this.patientqueryParams).then((response) => {
+ this.logsheetlist = response.data.detail;
+ this.patienttotal = response.data.total;
+ this.Seedloading = false;
+ });
+ },
+ SeedetailsgGo(row) {
+ this.SeedetailsVisible = false;
+ let type = "";
+ if (row.preachformson && row.preachformson.includes("3")) {
+ type = 1;
+ }
+ setTimeout(() => {
+ this.$router.push({
+ path: "/followvisit/record/detailpage/",
+ query: {
+ taskid: row.taskid,
+ patid: row.patid,
+ id: row.id,
+ Voicetype: type,
+ // visitCount: this.topqueryParams.visitCount,
+ },
+ });
+ }, 300);
},
// 娣诲姞/淇敼鏍囩
Maintenancetag() {
@@ -725,12 +1241,14 @@
/** 鎼滅储鎸夐挳鎿嶄綔 */
handleQuery() {
this.queryParams.pageNum = 1;
- console.log();
+ if (!this.queryParams.dateRange) this.queryParams.dateRange = [];
if (this.queryParams.statisticaltype == 1) {
this.queryParams.deptcodes = [];
} else if (this.queryParams.statisticaltype == 2) {
this.queryParams.leavehospitaldistrictcodes = [];
}
+ console.log(this.queryParams.dateRange);
+
this.queryParams.startTime = this.parseTime(
this.queryParams.dateRange[0]
);
@@ -780,6 +1298,354 @@
},
`user_${new Date().getTime()}.xlsx`
);
+ },
+ // 鏄剧ず鍥捐〃寮圭獥
+
+ showChartDialog() {
+ this.chartDialogVisible = true;
+ this.$nextTick(() => {
+ this.initPieChart();
+ this.initBarLineChart();
+ });
+ },
+ // 鍦╩ethods涓慨鏀圭粺璁℃柟娉�
+ showChartDialog() {
+ this.chartDialogVisible = true;
+ this.$nextTick(() => {
+ console.log(this.userList, "this.userList");
+
+ this.initCharts();
+ });
+ },
+
+ // 鏂板鍒濆鍖栧浘琛ㄦ柟娉�
+ initCharts() {
+ this.initPieChart();
+ this.initBarLineChart();
+ },
+
+ // 鍒濆鍖栭ゼ鍥�
+initPieChart() {
+ const echarts = require("echarts");
+ const pieDom = document.getElementById("pieChart");
+ if (!pieDom) return;
+
+ if (this.pieChart) {
+ this.pieChart.dispose();
+ }
+
+ this.pieChart = echarts.init(pieDom);
+
+ // 璁$畻楗煎浘鏁版嵁
+ const followUpData = {
+ pending: 0,
+ success: 0,
+ fail: 0,
+ };
+
+ this.userList.forEach((item) => {
+ followUpData.pending += item.pendingFollowUp || 0;
+ followUpData.success += item.followUpSuccess || 0;
+ followUpData.fail += item.followUpFail || 0;
+ });
+
+ // 浣跨敤鏇寸編瑙傜殑棰滆壊鏂规
+ const pieOption = {
+ title: {
+ text: "闅忚鐘舵�佸垎甯�",
+ left: "center",
+ textStyle: {
+ color: '#333',
+ fontSize: 16
+ }
+ },
+ tooltip: {
+ trigger: "item",
+ formatter: "{a} <br/>{b}: {c} ({d}%)",
+ },
+ legend: {
+ orient: "vertical",
+ left: "left",
+ data: ["寰呴殢璁�", "闅忚鎴愬姛", "闅忚澶辫触"],
+ textStyle: {
+ color: '#666'
+ }
+ },
+ color: ['#FF9D4D', '#36B37E', '#FF5C5C'], // 鏂扮殑閰嶈壊鏂规
+ series: [
+ {
+ name: "闅忚鐘舵��",
+ type: "pie",
+ radius: ["40%", "70%"],
+ avoidLabelOverlap: true,
+ itemStyle: {
+ borderRadius: 10,
+ borderColor: "#fff",
+ borderWidth: 2
+ },
+ label: {
+ show: true,
+ formatter: "{b}: {c} ({d}%)",
+ color: '#333'
+ },
+ emphasis: {
+ label: {
+ show: true,
+ fontSize: "18",
+ fontWeight: "bold"
+ },
+ itemStyle: {
+ shadowBlur: 10,
+ shadowOffsetX: 0,
+ shadowColor: 'rgba(0, 0, 0, 0.5)'
+ }
+ },
+ data: [
+ {
+ value: followUpData.pending,
+ name: "寰呴殢璁�"
+ },
+ {
+ value: followUpData.success,
+ name: "闅忚鎴愬姛"
+ },
+ {
+ value: followUpData.fail,
+ name: "闅忚澶辫触"
+ }
+ ]
+ }
+ ]
+ };
+
+ this.pieChart.setOption(pieOption);
+ window.addEventListener("resize", this.resizePieChart);
+},
+
+// 鍒濆鍖栨煴鐘舵姌绾垮浘
+initBarLineChart() {
+ const echarts = require("echarts");
+ const barDom = document.getElementById("barLineChart");
+ if (!barDom) return;
+
+ if (this.barLineChart) {
+ this.barLineChart.dispose();
+ }
+
+ this.barLineChart = echarts.init(barDom);
+
+ // 鍑嗗鏁版嵁
+ const categories = this.userList.map(
+ (item) => item.leavehospitaldistrictname || item.deptname
+ );
+
+ const dischargeData = this.userList.map(
+ (item) => item.dischargeCount || 0
+ );
+ const followUpData = this.userList.map(
+ (item) => item.followUpNeeded || 0
+ );
+
+ // 鏂板涓ゆ潯鎶樼嚎鏁版嵁
+ const followUpRateData = this.userList.map(item => {
+ if (!item.followUpRate) return 0;
+ // 鍘绘帀鐧惧垎鍙峰苟杞负鏁板瓧
+ const rateStr = String(item.followUpRate).replace('%', '');
+ return parseFloat(rateStr) || 0;
+ });
+
+ const timelyRateData = this.userList.map(item =>
+ item.rate ? (Number(item.rate) * 100).toFixed(2) : 0
+ );
+
+ const option = {
+ title: {
+ text: "绉戝/鐥呭尯闅忚瓒嬪娍",
+ left: "center",
+ textStyle: {
+ color: '#333',
+ fontSize: 16
+ }
+ },
+ tooltip: {
+ trigger: "axis",
+ axisPointer: {
+ type: "cross",
+ crossStyle: {
+ color: "#999",
+ },
+ },
+ },
+ legend: {
+ data: ["鍑洪櫌浜烘", "搴旈殢璁夸汉娆�", "闅忚鐜�(%)", "鍙婃椂鐜�(%)"],
+ top: "bottom",
+ textStyle: {
+ color: '#666'
+ }
+ },
+ color: ['#5470C6', '#91CC75', '#EE6666', '#9A60B4'], // 鏂板绱壊鐢ㄤ簬鍙婃椂鐜�
+ xAxis: {
+ type: "category",
+ data: categories,
+ axisLabel: {
+ interval: 0,
+ rotate: 30,
+ color: '#666'
+ },
+ axisLine: {
+ lineStyle: {
+ color: '#ddd'
+ }
+ }
+ },
+ yAxis: [
+ {
+ type: "value",
+ name: "浜烘",
+ min: 0,
+ axisLabel: {
+ color: '#666'
+ },
+ axisLine: {
+ lineStyle: {
+ color: '#ddd'
+ }
+ },
+ splitLine: {
+ lineStyle: {
+ color: '#f0f0f0'
+ }
+ }
+ },
+ {
+ type: "value",
+ name: "鐧惧垎姣�(%)",
+ min: 0,
+ max: 100,
+ axisLabel: {
+ color: '#666',
+ formatter: '{value}%'
+ },
+ axisLine: {
+ lineStyle: {
+ color: '#ddd'
+ }
+ },
+ splitLine: {
+ show: false
+ }
+ }
+ ],
+ series: [
+ {
+ name: "鍑洪櫌浜烘",
+ type: "bar",
+ barWidth: "25%",
+ data: dischargeData,
+ itemStyle: {
+ borderRadius: [4, 4, 0, 0]
+ }
+ },
+ {
+ name: "搴旈殢璁夸汉娆�",
+ type: "bar",
+ barWidth: "25%",
+ data: followUpData,
+ itemStyle: {
+ borderRadius: [4, 4, 0, 0]
+ }
+ },
+ {
+ name: "闅忚鐜�(%)",
+ type: "line",
+ yAxisIndex: 1,
+ data: followUpRateData,
+ symbolSize: 8,
+ lineStyle: {
+ width: 3
+ },
+ markLine: {
+ silent: true,
+ data: [{
+ yAxis: 80,
+ lineStyle: {
+ color: '#EE6666',
+ type: 'dashed'
+ },
+ // label: {
+ // position: 'end',
+ // formatter: '鐩爣80%'
+ // }
+ }]
+ }
+ },
+ {
+ name: "鍙婃椂鐜�(%)",
+ type: "line",
+ yAxisIndex: 1,
+ data: timelyRateData,
+ symbolSize: 8,
+ lineStyle: {
+ width: 3,
+ type: 'dotted' // 浣跨敤铏氱嚎鍖哄垎
+ },
+ markLine: {
+ silent: true,
+ data: [{
+ yAxis: 90,
+ lineStyle: {
+ color: '#9A60B4',
+ type: 'dashed'
+ },
+ // label: {
+ // position: 'end',
+ // formatter: '鐩爣90%'
+ // }
+ }]
+ }
+ }
+ ],
+ grid: {
+ top: '15%',
+ left: '3%',
+ right: '4%',
+ bottom: '15%',
+ containLabel: true
+ }
+ };
+
+ this.barLineChart.setOption(option);
+ window.addEventListener("resize", this.resizeBarLineChart);
+},
+
+ // 鍥捐〃鍝嶅簲寮忚皟鏁存柟娉�
+ resizePieChart() {
+ if (this.pieChart) {
+ this.pieChart.resize();
+ }
+ },
+
+ resizeBarLineChart() {
+ if (this.barLineChart) {
+ this.barLineChart.resize();
+ }
+ },
+
+ // 鍦ㄧ粍浠堕攢姣佹椂娓呯悊
+ beforeDestroy() {
+ // 绉婚櫎浜嬩欢鐩戝惉
+ window.removeEventListener("resize", this.resizePieChart);
+ window.removeEventListener("resize", this.resizeBarLineChart);
+
+ // 閿�姣佸浘琛ㄥ疄渚�
+ if (this.pieChart) {
+ this.pieChart.dispose();
+ this.pieChart = null;
+ }
+ if (this.barLineChart) {
+ this.barLineChart.dispose();
+ this.barLineChart = null;
+ }
},
},
};
@@ -877,6 +1743,52 @@
font-size: 20px;
}
}
+/* 浣胯鏈夋墜鍨嬫寚閽� */
+.el-table__row {
+ cursor: pointer;
+}
+/* 鍐呭眰鍖荤敓琛ㄦ牸鏍峰紡 */
+.inner-table {
+ // 琛ㄥご鑳屾櫙鑹�
+ ::v-deep .el-table__header-wrapper {
+ background-color: #f0f7ff !important;
+
+ th {
+ background-color: #f0f7ff !important;
+ }
+ }
+
+ // 琛ㄦ牸琛岃儗鏅壊
+ ::v-deep .el-table__body-wrapper {
+ tr {
+ background-color: #f9fbfe !important;
+
+ &:hover {
+ background-color: #e6f1ff !important;
+ }
+ }
+ }
+
+ // 杈规棰滆壊
+ ::v-deep .el-table--border {
+ border-color: #d9e8ff !important;
+
+ td,
+ th {
+ border-color: #d9e8ff !important;
+ }
+ }
+
+ // 鏂戦┈绾规晥鏋�
+ ::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td {
+ background-color: #f5f9ff !important;
+ }
+}
+/* 灞曞紑琛屾牱寮� */
+.el-table__expanded-cell {
+ padding: 10px 0 !important;
+ background: #f8f8f8;
+}
.document {
width: 100px;
height: 50px;
--
Gitblit v1.9.3