From feb5a669dced68415bc7e32f237f77bf9842fe8b Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 03 六月 2026 17:42:18 +0800
Subject: [PATCH] 测试完成
---
src/views/sfstatistics/percentage/index.vue | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 56 insertions(+), 1 deletions(-)
diff --git a/src/views/sfstatistics/percentage/index.vue b/src/views/sfstatistics/percentage/index.vue
index dd731d8..b924ce3 100644
--- a/src/views/sfstatistics/percentage/index.vue
+++ b/src/views/sfstatistics/percentage/index.vue
@@ -75,10 +75,12 @@
v-model="queryParams.dateRange"
value-format="yyyy-MM-dd HH:mm:ss"
type="daterange"
+ unlink-panels
range-separator="鑷�"
start-placeholder="寮�濮嬫棩鏈�"
end-placeholder="缁撴潫鏃ユ湡"
:default-time="['00:00:00', '23:59:59']"
+ :picker-options="pickerOptions"
/>
</el-form-item>
@@ -222,10 +224,41 @@
options: this.$store.getters.tasktypes,
queryParams: {
serviceType: [2],
- dateRange: [],
+ dateRange: this.getLastMonthRange(),
statisticaltype: 1,
leavehospitaldistrictcodes: ["all"],
deptcodes: [],
+ },
+ pickerOptions: {
+ shortcuts: [
+ {
+ text: "鏈�杩戜竴鍛�",
+ onClick(picker) {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+ picker.$emit("pick", [start, end]);
+ },
+ },
+ {
+ text: "鏈�杩戜竴涓湀",
+ onClick(picker) {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+ picker.$emit("pick", [start, end]);
+ },
+ },
+ {
+ text: "鏈�杩戜笁涓湀",
+ onClick(picker) {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+ picker.$emit("pick", [start, end]);
+ },
+ },
+ ],
},
flatArrayhospit: [],
flatArraydept: [],
@@ -281,7 +314,29 @@
this.flatArraydept.push({ label: "鍏ㄩ儴", value: "all" });
this.flatArrayhospit.push({ label: "鍏ㄩ儴", value: "all" });
},
+ // 娣诲姞鑾峰彇鏈�杩戜竴涓湀鏃堕棿鑼冨洿鐨勬柟娉�
+ getLastMonthRange() {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+ // 鏍煎紡鍖栦负 yyyy-MM-dd HH:mm:ss
+ const formatDate = (date) => {
+ const year = date.getFullYear();
+ const month = String(date.getMonth() + 1).padStart(2, "0");
+ const day = String(date.getDate()).padStart(2, "0");
+ return `${year}-${month}-${day} 00:00:00`;
+ };
+
+ const formatEndDate = (date) => {
+ const year = date.getFullYear();
+ const month = String(date.getMonth() + 1).padStart(2, "0");
+ const day = String(date.getDate()).padStart(2, "0");
+ return `${year}-${month}-${day} 23:59:59`;
+ };
+
+ return [formatDate(start), formatEndDate(end)];
+ },
handleTabClick(tab) {
this.activeTab = tab.name;
this.loadCurrentTabData();
--
Gitblit v1.9.3