Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
project_progress
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f8e206b5
authored
Jun 06, 2024
by
liangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复页面
1 parent
3c773bac
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
91 deletions
src/views/checkCompliance/automaticCheck.vue
src/views/managementResult/releaseResult/publicity.vue
src/views/checkCompliance/automaticCheck.vue
View file @
f8e206b
This diff is collapsed.
Click to expand it.
src/views/managementResult/releaseResult/publicity.vue
View file @
f8e206b
<!-- 结果公示 -->
<
template
>
<
template
>
<div>
<div>
<pdf
v-for=
"i in pageCount"
<iframe
src=
"http://192.168.91.1:18000/static/#/assessResult/release/notice"
frameborder=
"0"
style=
"width:100vw;height:100vh;"
id=
"iframe"
></iframe>
:src=
"pdfSrc"
</div>
</
template
>
:key=
"i + 'pdf'"
:page=
"i"
class=
"pdf-item"
></pdf>
</div>
</
template
>
<
script
>
import
pdf
from
'vue-pdf'
export
default
{
data
(){
return
{
pageCount
:
1
,
// 缩放
scale
:
100
,
timer
:
null
,
showPreviewFile
:
false
,
pdfSrc
:
"http://arch-file.oss-cn-beijing.aliyuncs.com/arch-file/665994f479f6157c744951bd.pdf?Expires=1718011134&OSSAccessKeyId=LTAI5tGjidtvVSCvwGxTp8FH&Signature=blOuzxUwnotgqo7mxM9rShOEJ1I%3D"
}
},
components
:{
pdf
},
mounted
(){
this
.
previewFile
()
},
watch
:
{
pdfUrl
:
{
handler
(
newVal
,
oldVal
)
{
if
(
newVal
)
{
this
.
previewFile
()
}
},
immediate
:
false
}
},
methods
:
{
/** pdf加载 */
async
previewFile
()
{
try
{
let
loadingTask
=
pdf
.
createLoadingTask
({
url
:
this
.
pdfUrl
,
CMapReaderFactory
});
loadingTask
.
promise
.
then
(
pdf
=>
{
this
.
pdfUrl
=
loadingTask
this
.
showPreviewFile
=
true
;
this
.
pageCount
=
pdf
.
numPages
;
}).
catch
((
e
)
=>
{
console
.
log
(
"pdf初始化错误"
,
e
);
Notify
(
"文件初始化失败,请返回下载该文件查看"
)
})
}
catch
(
e
)
{
this
.
$router
.
go
(
-
1
)
console
.
log
(
"pdf加载出错了"
,
e
);
}
},
}
<
script
>
export
default
{
data
(){
return
{
}
}
</
script
>
},
<
style
lang=
"scss"
scoped
>
mounted
(){
.process-fileView-pdf-container
{
width
:
100%
;
height
:
100%
;
.pdf-item{
height
:
100vh
;
display
:
block
!important
;
}
.pdf-button-group
{
position
:
fixed
;
top
:
10px
;
right
:
20px
;
.btn-item
{
width
:
50px
;
height
:
50px
;
border-radius
:
100%
;
}
.div-item
{
margin-bottom
:
8px
;
}
::v-deep
.van-button__text
{
line-height
:
20px
;
}
}
}
}
</
style
>
}
</
script
>
<
style
lang=
"scss"
scoped
>
#iframeId
{
width
:
100%
;
height
:
100vh
;
}
</
style
>
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment