feat: 管理端补充工作台图表、列表导出与批量操作
- 工作台新增近 7 日预约趋势与订单状态分布图 - 订单/用户/就诊人/陪诊师支持 CSV 导出,逐页拉取规避接口分页上限 - 订单列表增加状态快筛、筛选条件同步地址栏、加载失败重试 - 订单详情支持指派/更换陪诊师,性别值归一到订单枚举 - 用户列表支持批量锁定/解锁,导出补齐就诊人数量与归属信息 - 抽取 useTableQuery 统一分页、搜索与删除后页码回退 - ESLint 开启 vue/no-undef-properties,修复 EChart 扩展只注册一次的问题
This commit is contained in:
@@ -11,20 +11,19 @@ import { storeToRefs } from 'pinia'
|
||||
import { computed, onBeforeMount, onMounted, ref, watch } from 'vue'
|
||||
import { useLayout } from '~/stores/layout'
|
||||
import { getDefaultFontFamily } from '~/utils/helpers'
|
||||
type ChartExtension = Exclude<Parameters<typeof use>[0], unknown[]>
|
||||
|
||||
type PropsType = {
|
||||
getOptions: () => EChartsOption
|
||||
extensions: any[]
|
||||
extensions: ChartExtension[]
|
||||
}
|
||||
|
||||
const props = defineProps<PropsType>()
|
||||
|
||||
let extensionsRegistered = false
|
||||
|
||||
// 每个实例都注册自己的扩展:echarts 的 use 是幂等的,
|
||||
// 用模块级开关会导致第二个图表实例的扩展注册被跳过
|
||||
onBeforeMount(() => {
|
||||
if (!extensionsRegistered) {
|
||||
use(props.extensions)
|
||||
extensionsRegistered = true
|
||||
}
|
||||
use(props.extensions)
|
||||
})
|
||||
|
||||
const layoutStore = useLayout()
|
||||
|
||||
Reference in New Issue
Block a user