From f0518795da145676e31e3b2caac8436249d3c1a5 Mon Sep 17 00:00:00 2001
From: yy2205 <2238220225@qq.com>
Date: Sat, 19 Apr 2025 21:00:47 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=89=8D=E7=AB=AF=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E6=B7=BB=E5=8A=A0=E5=8D=95=E9=80=89=E6=97=B6=E9=97=B4?=
=?UTF-8?q?=E5=BF=AB=E6=8D=B7=E9=80=89=E4=B8=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/sta/index.vue | 41 ++++++++++++++++++++++++++++++++++++++---
1 file changed, 38 insertions(+), 3 deletions(-)
diff --git a/src/views/sta/index.vue b/src/views/sta/index.vue
index 32a47c9..8136104 100644
--- a/src/views/sta/index.vue
+++ b/src/views/sta/index.vue
@@ -2,20 +2,23 @@
+
+ {{item.label}}
+
-
- 查询
-
@@ -53,6 +56,7 @@
import {StatisticsApi} from "@/api/inspect/statistics";
import dayjs from "dayjs";
import {PatientApi} from "@/api/inspect/inspectpatient";
+import {formatDate} from "@/utils/formatTime";
const time = ref() // 日期
const data = ref([
@@ -81,6 +85,13 @@ const data = ref([
},
])*/
const data1 = ref([])
+const radioSelector = ref([
+ {value:1,label:'全部'},
+ {value:2,label:'今天'},
+ {value:3,label:'最近一周'},
+ {value:4,label:'最近一个月'},
+])
+const radioType = ref(3) //
const shortcuts = [
{
text: '最近一周',
@@ -109,6 +120,29 @@ const shortcuts = [
},
},
]
+/**
+ * 改变单选框
+ * @param e
+ */
+const changeRadio = (e) => {
+ let end = new Date()
+ let start = new Date()
+ let date = null
+ switch (e){
+ case 1 : date = [];break
+ case 2 : break
+ case 3 : start.setDate(start.getDate() - 7);break
+ case 4 : start.setMonth(start.getMonth() - 1);break
+ default : start.setDate(start.getDate() -7)
+ }
+ console.log(time.value)
+ time.value = [formatDate(start,'YYYY-MM-DD'),formatDate(end,'YYYY-MM-DD')]
+ getList()
+}
+const changeDatePick = () => {
+ radioType.value = null
+ getList()
+}
/**
* 获取统计数据
*/
@@ -158,6 +192,7 @@ const dataProcessing = (data) => {
}
onMounted(()=>{
getList()
+ changeRadio(3)
})