refactor(web): 统一 dayjs 导入为集中初始化 — 11 个文件
Some checks failed
CI / security-audit (push) Has been cancelled
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled

所有 health 页面从 import dayjs from 'dayjs' 迁移到
import { dayjs } from '.../utils/dayjs',确保 relativeTime
和 zh-cn locale 全局生效。
This commit is contained in:
iven
2026-04-28 01:47:13 +08:00
parent 5b47f13ecf
commit 4cfbdec5fc
11 changed files with 11 additions and 11 deletions

View File

@@ -20,7 +20,7 @@ import {
EditOutlined,
DeleteOutlined,
} from '@ant-design/icons';
import dayjs from 'dayjs';
import { dayjs } from '../../utils/dayjs';
import { doctorApi, type Doctor, type CreateDoctorReq, type UpdateDoctorReq } from '../../api/health/doctors';
import { AuthButton } from '../../components/AuthButton';

View File

@@ -18,7 +18,7 @@ import {
Empty,
} from 'antd';
import { PlusOutlined, EditOutlined } from '@ant-design/icons';
import dayjs from 'dayjs';
import { dayjs } from '../../utils/dayjs';
import type { Dayjs } from 'dayjs';
import {
appointmentApi,

View File

@@ -1,7 +1,7 @@
import { useState, useEffect, useCallback } from 'react';
import { Table, DatePicker, message } from 'antd';
import type { ColumnsType, TablePaginationConfig } from 'antd/es/table';
import dayjs from 'dayjs';
import { dayjs } from '../../utils/dayjs';
import { followUpApi, type FollowUpRecord } from '../../api/health/followUp';
import { PatientSelect } from './components/PatientSelect';
import { useThemeMode } from '../../hooks/useThemeMode';

View File

@@ -13,7 +13,7 @@ import {
} from 'antd';
import { PlusOutlined, EditOutlined, SwapOutlined, DeleteOutlined } from '@ant-design/icons';
import type { ColumnsType, TablePaginationConfig } from 'antd/es/table';
import dayjs from 'dayjs';
import { dayjs } from '../../utils/dayjs';
import { followUpApi, type FollowUpTask, type CreateFollowUpTaskReq, type UpdateFollowUpTaskReq } from '../../api/health/followUp';
import { StatusTag } from './components/StatusTag';
import { PatientSelect } from './components/PatientSelect';

View File

@@ -23,7 +23,7 @@ import {
DeleteOutlined,
CheckCircleOutlined,
} from '@ant-design/icons';
import dayjs from 'dayjs';
import { dayjs } from '../../utils/dayjs';
import type { Dayjs } from 'dayjs';
import {
pointsApi,

View File

@@ -17,7 +17,7 @@ import {
import {
CheckCircleOutlined,
} from '@ant-design/icons';
import dayjs from 'dayjs';
import { dayjs } from '../../utils/dayjs';
import {
pointsApi,
type PointsOrder,

View File

@@ -21,7 +21,7 @@ import {
EditOutlined,
DeleteOutlined,
} from '@ant-design/icons';
import dayjs from 'dayjs';
import { dayjs } from '../../utils/dayjs';
import {
pointsApi,
type PointsProduct,

View File

@@ -21,7 +21,7 @@ import {
EditOutlined,
DeleteOutlined,
} from '@ant-design/icons';
import dayjs from 'dayjs';
import { dayjs } from '../../utils/dayjs';
import {
pointsApi,
type PointsRule,

View File

@@ -1,7 +1,7 @@
import { useCallback, useState } from 'react';
import { Table, Tag, Button, Modal, Form, Select, DatePicker, Input, message, Popconfirm, Space } from 'antd';
import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons';
import dayjs from 'dayjs';
import { dayjs } from '../../../utils/dayjs';
import type { Dayjs } from 'dayjs';
import { healthDataApi } from '../../../api/health/healthData';
import type { HealthRecord } from '../../../api/health/healthData';

View File

@@ -1,7 +1,7 @@
import { useCallback, useState } from 'react';
import { Table, Tag, Button, Modal, Form, Input, DatePicker, message, Popconfirm, Space } from 'antd';
import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons';
import dayjs from 'dayjs';
import { dayjs } from '../../../utils/dayjs';
import type { Dayjs } from 'dayjs';
import { healthDataApi } from '../../../api/health/healthData';
import type { LabReport } from '../../../api/health/healthData';

View File

@@ -2,7 +2,7 @@ import { useCallback, useState, useMemo } from 'react';
import { Table, Button, Modal, Form, InputNumber, DatePicker, Input, message, Typography, Tooltip, Popconfirm, Space } from 'antd';
import { PlusOutlined, InfoCircleOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons';
import type { Dayjs } from 'dayjs';
import dayjs from 'dayjs';
import { dayjs } from '../../../utils/dayjs';
import { healthDataApi } from '../../../api/health/healthData';
import type { VitalSigns } from '../../../api/health/healthData';
import { VitalSignsChart } from './VitalSignsChart';