Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf-front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yuzhenWang
yd-csf-front
Commits
c5b88c5f
Commit
c5b88c5f
authored
May 13, 2026
by
yuzhenWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预约附件用pdf插件看
parent
493c352a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
src/views/sign/appointment/components/fileUpload.vue
+3
-9
No files found.
src/views/sign/appointment/components/fileUpload.vue
View file @
c5b88c5f
...
...
@@ -235,7 +235,7 @@
</template>
<
script
setup
name=
"FileUpload"
>
import
{
ref
}
from
'vue'
import
{
ref
,
nextTick
}
from
'vue'
import
{
ElMessage
}
from
'element-plus'
import
{
downloadFilesAsZip
}
from
'@/utils/zipDownload'
// 引入刚才封装的工具
import
CommonDialog
from
'@/components/commonDialog'
...
...
@@ -284,7 +284,7 @@ const pdfCanvasRef = ref(null) // canvas 元素引用
const
pdfDoc
=
ref
(
null
)
// pdf 文档实例
const
pdfCurrentPage
=
ref
(
1
)
// 当前页
const
pdfTotalPages
=
ref
(
0
)
// 总页数
const
pdfScale
=
ref
(
1.
0
)
// 缩放比例
const
pdfScale
=
ref
(
1.
2
)
// 缩放比例
// 渲染指定页
const
renderPdfPage
=
async
pageNum
=>
{
...
...
@@ -404,12 +404,6 @@ const previewFileType = ref('') // 'image', 'pdf', 'unsupported'
// }
function
previewFile
(
file
)
{
const
url
=
file
.
url
||
file
.
fileUrl
// let url = ''
// if (file.fileKey) {
// url = `https://csf-hk.oss-cn-hongkong.aliyuncs.com/PC/test/pdf/2026/05/13/a482331b118142d782ac6ba7697eae15.pdf`
// } else {
// url = file.url
// }
if
(
!
url
)
{
ElMessage
.
warning
(
'文件地址不存在'
)
return
...
...
@@ -424,7 +418,7 @@ function previewFile(file) {
}
else
if
(
ext
===
'pdf'
)
{
previewFileType
.
value
=
'pdf'
previewDialogVisible
.
value
=
true
//
动态加载 PDF(使用 nextTick 确保 canvas 已挂载)
//
确保 DOM 更新后再加载 PDF
nextTick
(()
=>
{
loadPdf
(
previewUrl
.
value
)
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment