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 @@ + - + - + {{ item.title }} {{ item.value.toLocaleString() }} - - {{ item.isUp ? '↑' : '↓' }} {{ item.percentage }}% - 较上月 - - - - - + + + + + + + + + + {{ item.title }} + {{ item.value.toLocaleString() }} + + - - - + + + + + + + + + + + + + + + + - \ 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: {