feat(template): 新增答题卡模板编辑器及相关功能

- 新增模板详情页面,支持上传PDF/图片作为底稿,并生成可拖拽调整的区域
- 新增模板类型定义、上传钩子及画布组件,支持批量生成区域、旋转、对齐参考线等功能
- 更新模板列表页,适配新的API接口并增加删除功能
- 更新OSS工具函数,修复上传凭证处理逻辑
- 更新公共类型定义,调整分页查询返回结构
- 移除旧的书籍相关API文件,替换为模板API
- 更新依赖项,添加pdfjs-dist、vue3-draggable-resizable等库
- 隐藏页面底部,优化界面显示
This commit is contained in:
2026-01-28 18:00:17 +08:00
parent 78e51d96f6
commit 16d7ecd172
17 changed files with 1207 additions and 266 deletions

View File

@ -274,7 +274,7 @@ async function uploadFile(myFile: FileItem): Promise<FileItem> {
throw new Error('获取上传凭证失败')
}
// 初始化OSS客户端
const client = initOSSClient(tokenData)
const client = initOSSClient(tokenData?.data || {})
let path = typeof props.path === 'string' ? '' : `temp/${Date.now()}`
path = browserPathJoin(path, myFile.file!.name)
// 上传文件
@ -397,8 +397,7 @@ defineExpose({ reset, getLoadState: () => upLoading.value })
class="absolute inset-0 z-20 flex flex-col items-center justify-center bg-black/50 p-1"
>
<NProgress
type="circle" :percentage="item.percentage"
:color="{ stops: ['#E3F2FD', '#2080f0'] }"
type="circle" :percentage="item.percentage" :color="{ stops: ['#E3F2FD', '#2080f0'] }"
style="width: 60px; height: 60px"
>
<template #default>