+
diff --git a/src/layouts/components/topbar/components/SimpleMessagesDropdown.vue b/src/layouts/components/topbar/components/SimpleMessagesDropdown.vue
index 1bfb0ab..02c252b 100644
--- a/src/layouts/components/topbar/components/SimpleMessagesDropdown.vue
+++ b/src/layouts/components/topbar/components/SimpleMessagesDropdown.vue
@@ -20,7 +20,7 @@
-
+
diff --git a/src/types/api.ts b/src/types/api.ts
index 1e26a38..e5f5568 100644
--- a/src/types/api.ts
+++ b/src/types/api.ts
@@ -203,6 +203,31 @@ export type Employee = {
}
}
+export type AttendantApplication = {
+ _id: string
+ userId?: string
+ applicant?: {
+ name?: string
+ mobile?: string
+ /** 仅详情接口返回;列表接口不返回身份证号 */
+ idNumber?: string
+ sex?: string
+ serviceAreas?: string[]
+ introduction?: string
+ }
+ status?: 'pending' | 'approved' | 'rejected'
+ review?: {
+ reviewerId?: string
+ reviewedAt?: number
+ rejectReason?: string
+ }
+ approvedEmployeeId?: string | null
+ meta?: {
+ createtime?: number
+ updatetime?: number
+ }
+}
+
export type PaymentStatusResult = {
paymentStatus: string
orderStatus: string
diff --git a/src/utils/csv.ts b/src/utils/csv.ts
new file mode 100644
index 0000000..87e4ca6
--- /dev/null
+++ b/src/utils/csv.ts
@@ -0,0 +1,23 @@
+export type CsvCell = string | number | null | undefined
+
+const escapeCell = (value: CsvCell): string => {
+ const text = value === null || value === undefined ? '' : String(value)
+ return /[",\n\r]/.test(text) ? `"${text.replace(/"/g, '""')}"` : text
+}
+
+/**
+ * 导出 CSV(带 BOM,Excel 直接打开不乱码)。数据由调用方拼好行数组。
+ */
+export const exportCsv = (filename: string, headers: string[], rows: CsvCell[][]) => {
+ const lines = [headers, ...rows].map((row) => row.map(escapeCell).join(','))
+ const blob = new Blob([`\ufeff${lines.join('\r\n')}`], { type: 'text/csv;charset=utf-8;' })
+ const url = URL.createObjectURL(blob)
+ const link = document.createElement('a')
+ link.href = url
+ link.download = filename
+ document.body.appendChild(link)
+ link.click()
+ link.remove()
+ // 延迟释放,避免部分浏览器在下载启动前就失效
+ setTimeout(() => URL.revokeObjectURL(url), 0)
+}
diff --git a/src/utils/paging.ts b/src/utils/paging.ts
new file mode 100644
index 0000000..4f786ff
--- /dev/null
+++ b/src/utils/paging.ts
@@ -0,0 +1,29 @@
+export type PagedResult = { items: T[]; total: number }
+
+/**
+ * 逐页拉取直到取满 total 或达到 max 上限。
+ * 后端各列表接口对 pageSize 有上限(订单/用户/就诊人 200,员工 100),
+ * 一次性传大 pageSize 会被静默截断,因此导出必须循环翻页。
+ */
+export const fetchAllPages = async (
+ fetchPage: (page: number, pageSize: number) => Promise>,
+ options: { pageSize?: number; max?: number } = {}
+): Promise<{ items: T[]; total: number; truncated: boolean }> => {
+ const pageSize = options.pageSize ?? 200
+ const max = options.max ?? 2000
+ const items: T[] = []
+ let page = 1
+ let total = 0
+
+ while (items.length < max) {
+ const data = await fetchPage(page, pageSize)
+ total = data.total
+ // 空页直接结束,避免 total 与实际不一致时死循环
+ if (!data.items.length) break
+ items.push(...data.items)
+ if (items.length >= total) break
+ page += 1
+ }
+
+ return { items: items.slice(0, max), total, truncated: total > Math.min(items.length, max) }
+}
diff --git a/src/views/admin/dashboard/projects/components/data.ts b/src/views/admin/dashboard/projects/components/data.ts
index 8462038..206ed5f 100644
--- a/src/views/admin/dashboard/projects/components/data.ts
+++ b/src/views/admin/dashboard/projects/components/data.ts
@@ -427,7 +427,7 @@ export const getRevenueChartOptions = (): EChartsOption => {
show: true,
color: getColor('secondary-color'),
margin: 15,
- formatter: function (value: any) {
+ formatter: function (value: number | string) {
return '$' + value
},
},
diff --git a/src/views/attendants/index.vue b/src/views/attendants/index.vue
index 90a3a41..357383c 100644
--- a/src/views/attendants/index.vue
+++ b/src/views/attendants/index.vue
@@ -2,7 +2,17 @@
-
+
+
+ 在职陪诊师
+
+
+ 入驻审核
+ {{ pendingTotal }}
+
+
+
+
@@ -32,6 +42,10 @@
共 {{ total }} 人
+
+
+ {{ exporting ? '导出中...' : '导出 CSV' }}
+
新增陪诊师
@@ -43,6 +57,15 @@
+
+
+
数据加载失败,请检查网络后重试
+
+
+ 重新加载
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+ 共 {{ appTotal }} 条
+
+
+
+
+
+
+
+
+
数据加载失败,请检查网络后重试
+
+
+ 重新加载
+
+
+
+
+
+ {{ data.label }}
+
+
+
+
+
+ {{ (item.applicant?.name || '申').slice(0, 1) }}
+
+
+
{{ item.applicant?.name || '-' }}
+
{{ item.applicant?.mobile || '-' }}
+
+
+
+
+
+
+ {{ (item.applicant?.serviceAreas || []).join('、') || '未填写服务城市' }}
+
+
+ {{ item.applicant?.introduction || '未填写简介' }}
+
+
+
+
+ {{ formatTimestamp(item.meta?.createtime) }}
+
+
+
+
+ {{ APPLICATION_STATUS_LABELS[item.status || 'pending'] }}
+
+
+ {{ item.review.rejectReason }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ formError }}
@@ -256,26 +395,109 @@
停用后将不再出现在用户端陪诊师公示列表中。
+
+
+
+
+
+
+
+ 身份证号:{{ materials.applicantIdNumber || '未填写' }}
+
+
+
资质证书照片
+
![资质证书]()
+
未上传
+
+
+
健康证明照片
+
![健康证明]()
+
未上传
+
+ 有效期至 {{ String(materials.healthCertificate.expireDate).slice(0, 10) }}
+
+
+
+
+
+
+ 申请人:{{ rejectTarget?.applicant?.name || '-' }}
+
+
+
+ 取消
+ 确认驳回
+
+
+
+
+
+ 确定通过 {{ approveTarget?.applicant?.name || '-' }} 的入驻申请吗?
+
+
+ 通过后将自动为其创建(或启用)陪诊师档案,小程序端权限立即生效。
+
+
diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue
index 3d9ce26..1fd8913 100644
--- a/src/views/dashboard/index.vue
+++ b/src/views/dashboard/index.vue
@@ -23,6 +23,36 @@
+
+
+
+
+ 近 7 日预约趋势
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 订单状态分布
+
+
+
+
+
+
+
+
+
+
+
@@ -134,7 +164,12 @@
diff --git a/src/views/profiles/index.vue b/src/views/profiles/index.vue
index 2c7c969..7fefe5b 100644
--- a/src/views/profiles/index.vue
+++ b/src/views/profiles/index.vue
@@ -6,11 +6,11 @@
-
+
-
-
+
+
查询
@@ -19,6 +19,10 @@
共 {{ total }} 位就诊人
+
+
+ {{ exporting ? '导出中...' : '导出 CSV' }}
+
新增就诊人
@@ -37,6 +41,15 @@
+
+
+
数据加载失败,请检查网络后重试
+
+
+ 重新加载
+
+
+
-
+
@@ -196,20 +209,24 @@