From 858f7500bdd89ecba8604958bd5ccd609767b68c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BF=97=E5=BC=BA?= <357099073@qq.com> Date: Thu, 5 Feb 2026 15:23:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BB=AA=E8=A1=A8=E7=9B=98?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/babyhealth.js | 27 ++ src/views/apps/babyhealth/dashborad/index.vue | 322 +++++++++++------- .../babyhealth/users/components/userEdit.vue | 2 +- 3 files changed, 235 insertions(+), 116 deletions(-) diff --git a/src/api/babyhealth.js b/src/api/babyhealth.js index 7f52eb6..a720979 100644 --- a/src/api/babyhealth.js +++ b/src/api/babyhealth.js @@ -165,4 +165,31 @@ export function deleteUser(id) { url: `/admin/babyhealthUser/${id}`, method: "delete", }); +} + + +/************************************************* + ****************** 仪表盘相关接口 ****************** + *************************************************/ + +/** + * 获取用户列表 + * @returns {Promise} + */ +export function getUserCounts() { + return request({ + url: "/admin/babyhealthDashborad/users", + method: "get", + }); +} + +/** + * 获取宝贝列表 + * @returns {Promise} + */ +export function getBabyCounts() { + return request({ + url: "/admin/babyhealthDashborad/babys", + method: "get", + }); } \ No newline at end of file diff --git a/src/views/apps/babyhealth/dashborad/index.vue b/src/views/apps/babyhealth/dashborad/index.vue index 19b4fbc..eb17b74 100644 --- a/src/views/apps/babyhealth/dashborad/index.vue +++ b/src/views/apps/babyhealth/dashborad/index.vue @@ -1,114 +1,152 @@ - \ No newline at end of file + diff --git a/src/views/apps/babyhealth/users/components/userEdit.vue b/src/views/apps/babyhealth/users/components/userEdit.vue index c24a072..a90ebb0 100644 --- a/src/views/apps/babyhealth/users/components/userEdit.vue +++ b/src/views/apps/babyhealth/users/components/userEdit.vue @@ -106,7 +106,7 @@ import { ElMessage } from "element-plus"; import { Plus } from '@element-plus/icons-vue'; import type { UploadProps, UploadRequestOptions } from 'element-plus'; import { createUser, updateUser, getUserDetail } from "@/api/babyhealth"; -import { uploadAvatar } from '@/api/upload'; +import { uploadAvatar } from '@/api/file'; const props = defineProps({ modelValue: {