Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
agcs2.0-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liang
agcs2.0-web
Commits
1e46d4d2
Commit
1e46d4d2
authored
Mar 01, 2023
by
miaojiale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.科学研究加入pdf预览的提示
2.首页加入pdf预览
parent
d255bbb9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
106 additions
and
54 deletions
+106
-54
index.vue
src/views/Home/PdfDialog/index.vue
+71
-0
index.vue
src/views/Home/PdfView/index.vue
+2
-0
index.vue
src/views/Home/ScientificResearch/index.vue
+9
-52
index.vue
src/views/Home/index.vue
+24
-2
No files found.
src/views/Home/PdfDialog/index.vue
0 → 100644
View file @
1e46d4d2
<
template
>
<div>
<el-dialog
custom-class=
"pdfDialog"
:title=
"''"
:visible.sync=
"showPdf"
:close-on-click-modal=
"true"
:close-on-press-escape=
"false"
:show-close=
"true"
width=
"70%"
:destroy-on-close=
"true"
top=
"10vh"
>
<div
class=
"innerBody"
>
<div
class=
"title"
>
{{
curPdf
.
articleTitle
}}
</div>
<div
class=
"refuteList"
>
<!--
<pdf
:src=
"pdfSrc"
></pdf>
-->
<pdf-view
ref=
"pdfView"
:pdf-src=
"pdfSrc"
></pdf-view>
</div>
</div>
</el-dialog>
</div>
</
template
>
<
script
>
import
PdfView
from
"
../PdfView/index
"
export
default
{
components
:
{
PdfView
},
props
:
{
curPdf
:
{
type
:
Object
,
},
pdfSrc
:
String
,
},
data
()
{
return
{
showPdf
:
false
,
}
},
watch
:
{
showPdf
(
v
)
{
if
(
v
)
{
setTimeout
(()
=>
{
this
.
$refs
.
pdfView
.
loadPDF
()
},
250
)
}
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.innerBody
{
padding
:
0
60px
40px
;
.title
{
font-size
:
24px
;
font-family
:
AlibabaPuHuiTiM
;
color
:
#333333
;
text-align
:
center
;
margin-bottom
:
30px
;
}
.refuteList
{
height
:
600px
;
overflow
:
auto
;
}
}
</
style
>
<
style
lang=
"scss"
>
.pdfDialog
.el-dialog__header
{
// display: none;
padding
:
0px
!
important
;
}
</
style
>
src/views/Home/PdfView/index.vue
View file @
1e46d4d2
...
...
@@ -3,6 +3,7 @@
<div
v-loading=
"loadingPdf"
class=
"pdfEle_wrap"
>
<div
id=
"pdfEle"
></div>
</div>
<!-- 页码 -->
<div
class=
"pdf-render-pager"
>
<div
class=
"prev-next"
@
click=
"goPrevPdf"
>
<i
class=
"el-icon-arrow-left"
></i>
...
...
@@ -10,6 +11,7 @@
<input
v-model=
"curPage"
type=
"text"
title=
"输入页码后按enter即可跳至目标页"
style=
"border: 1px solid #ccc; position: relative; z-index: 9999"
@
keyup.enter=
"handleChangePage"
/>
...
...
src/views/Home/ScientificResearch/index.vue
View file @
1e46d4d2
...
...
@@ -18,6 +18,7 @@
<li
v-for=
"(item, index) in tableData"
:key=
"index"
title=
"点击预览pdf"
@
click=
"setPdf(item)"
>
<div
class=
"left_text"
>
...
...
@@ -46,33 +47,19 @@
</div>
</div>
<!-- 弹窗 -->
<el-dialog
custom-class=
"pdfDialog"
:title=
"''"
:visible.sync=
"showPdf"
:close-on-click-modal=
"true"
:close-on-press-escape=
"false"
:show-close=
"true"
width=
"70%"
:destroy-on-close=
"true"
top=
"10vh"
>
<div
class=
"innerBody"
>
<div
class=
"title"
>
{{
curPdf
.
articleTitle
}}
</div>
<div
class=
"refuteList"
>
<!--
<pdf
:src=
"pdfSrc"
></pdf>
-->
<pdf-view
ref=
"pdfView"
:pdf-src=
"pdfSrc"
></pdf-view>
</div>
</div>
</el-dialog>
<pdf-dialog
ref=
"pdfDialog"
:cur-pdf=
"curPdf"
:pdf-src=
"pdfSrc"
></pdf-dialog>
</div>
</
template
>
<
script
>
import
{
articleList
}
from
"
@/api/operation-management
"
import
paginationMixin
from
"
@/components/TabComponents/mixin
"
import
Pdf
View
from
"
../PdfView/index
"
import
Pdf
Dialog
from
"
../PdfDialog/index.vue
"
export
default
{
components
:
{
Pdf
View
},
components
:
{
Pdf
Dialog
},
mixins
:
[
paginationMixin
],
data
()
{
return
{
...
...
@@ -93,20 +80,10 @@ export default {
},
],
tableData
:
[],
showPdf
:
false
,
curPdf
:
{
articleTitle
:
"
测试pdf
"
},
pdfSrc
:
""
,
}
},
watch
:
{
showPdf
(
v
)
{
if
(
v
)
{
setTimeout
(()
=>
{
this
.
$refs
.
pdfView
.
loadPDF
()
},
250
)
}
},
},
mounted
()
{
if
(
this
.
$route
.
query
.
tabIndex
)
{
this
.
activeBar
=
this
.
$route
.
query
.
tabIndex
...
...
@@ -141,7 +118,7 @@ export default {
})
},
setPdf
(
item
)
{
this
.
showPdf
=
true
this
.
$refs
.
pdfDialog
.
showPdf
=
true
this
.
curPdf
=
item
this
.
pdfSrc
=
"
https://ds.cixincloud.com/geca-api/disease-data/file/info/
"
+
...
...
@@ -234,24 +211,4 @@ export default {
}
}
}
.innerBody
{
padding
:
0
60px
40px
;
.title
{
font-size
:
24px
;
font-family
:
AlibabaPuHuiTiM
;
color
:
#333333
;
text-align
:
center
;
margin-bottom
:
30px
;
}
.refuteList
{
height
:
600px
;
overflow
:
auto
;
}
}
</
style
>
<
style
lang=
"scss"
>
.pdfDialog
.el-dialog__header
{
// display: none;
padding
:
0px
!
important
;
}
</
style
>
src/views/Home/index.vue
View file @
1e46d4d2
...
...
@@ -14,7 +14,11 @@
:name=
"index + 1 + ''"
>
<ul
class=
"tabslist"
>
<li
v-for=
"(item, index) in noticeList"
:key=
"index"
>
<li
v-for=
"(item, index) in noticeList"
:key=
"index"
@
click=
"setPdf(item)"
>
<div
class=
"left"
>
<div
class=
"circle"
></div>
{{
item
.
articleTitle
}}
...
...
@@ -189,16 +193,25 @@
</el-popover>
</ul>
</div>
<!-- 弹窗 -->
<pdf-dialog
ref=
"pdfDialog"
:cur-pdf=
"curPdf"
:pdf-src=
"pdfSrc"
></pdf-dialog>
</div>
</template>
<
script
>
import
{
getRankTotal
,
getCurrentQuarter
}
from
"
@/api/Home
"
import
{
articleList
}
from
"
@/api/operation-management
"
import
Map
from
"
./Map
"
import
PdfDialog
from
"
./PdfDialog/index.vue
"
export
default
{
components
:
{
Map
},
components
:
{
Map
,
PdfDialog
},
data
()
{
return
{
curPdf
:
{},
pdfSrc
:
""
,
fixIndex
:
-
1
,
// videoSrc: require("../../../public/aaa.mp4"),
videoSrc
:
""
,
...
...
@@ -290,6 +303,15 @@ export default {
})
},
methods
:
{
setPdf
(
item
)
{
this
.
$refs
.
pdfDialog
.
showPdf
=
true
this
.
curPdf
=
item
this
.
pdfSrc
=
"
https://ds.cixincloud.com/geca-api/disease-data/file/info/
"
+
item
.
filePath
[
0
].
bucketName
+
"
/
"
+
item
.
filePath
[
0
].
uuidName
},
handleClick
()
{
this
.
getArticleList
(
this
.
curTab
)
},
...
...
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