From 1bc38d188461527257cc61aa3cd91e0ad914e070 Mon Sep 17 00:00:00 2001
From: yy2205 <2238220225@qq.com>
Date: Sun, 20 Apr 2025 17:24:36 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=88=87=E6=8D=A2=E4=B8=BA?=
=?UTF-8?q?=E6=A0=91=E5=BD=A2=E7=BB=93=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/inspect/inspecttemplate/index.vue | 4 +--
src/views/sta/index.vue | 39 +++++++++------------
2 files changed, 18 insertions(+), 25 deletions(-)
diff --git a/src/views/inspect/inspecttemplate/index.vue b/src/views/inspect/inspecttemplate/index.vue
index 78348bc..30b43ad 100644
--- a/src/views/inspect/inspecttemplate/index.vue
+++ b/src/views/inspect/inspecttemplate/index.vue
@@ -329,7 +329,7 @@ const convertToTreeTableData = (listData: TemplateVO[]) => {
result.push(typeItem)
})
-
+
return result
}
@@ -346,4 +346,4 @@ onMounted(() => {
justify-content: space-between;
align-items: center;
}
-
\ No newline at end of file
+
diff --git a/src/views/sta/index.vue b/src/views/sta/index.vue
index 8136104..22de025 100644
--- a/src/views/sta/index.vue
+++ b/src/views/sta/index.vue
@@ -18,27 +18,19 @@
size="big"
@change="changeDatePick"
/>
+
+ 查询
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -86,7 +78,6 @@ const data = ref([
])*/
const data1 = ref([])
const radioSelector = ref([
- {value:1,label:'全部'},
{value:2,label:'今天'},
{value:3,label:'最近一周'},
{value:4,label:'最近一个月'},
@@ -129,7 +120,6 @@ const changeRadio = (e) => {
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
@@ -137,11 +127,11 @@ const changeRadio = (e) => {
}
console.log(time.value)
time.value = [formatDate(start,'YYYY-MM-DD'),formatDate(end,'YYYY-MM-DD')]
- getList()
+ // getList()
}
const changeDatePick = () => {
radioType.value = null
- getList()
+ // getList()
}
/**
* 获取统计数据
@@ -155,6 +145,7 @@ const getList = async ()=>{
}
let resp = await PatientApi.getData(params)
data1.value = dataProcessing(resp)
+ console.log(data1.value)
}
/**
* 统计数据处理
@@ -173,7 +164,7 @@ const dataProcessing = (data) => {
smiflag: 0,
pulflag: 0,
sum: 0,
- list: []
+ children: []
};
}
// 累加各字段值
@@ -184,15 +175,17 @@ const dataProcessing = (data) => {
acc[key].pulflag += current.pulflag;
acc[key].sum += current.sum;
// 将当前对象添加到 list 中(避免引用问题需深拷贝)
- acc[key].list.push({ ...current });
+ let cObj = Object.assign(current,{})
+ delete cObj.orgname
+ acc[key].children.push({ ...cObj });
return acc;
}, {});
return Object.values(result);
}
onMounted(()=>{
- getList()
changeRadio(3)
+ getList()
})