Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sgaqgl-vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
李苏
sgaqgl-vue
Commits
fb03287d
Commit
fb03287d
authored
Feb 03, 2023
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
多页预览pdf
parent
b407e6b5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
6 deletions
+73
-6
index.vue
src/views/basicData/operationDcManagement/index.vue
+12
-1
index.vue
src/views/basicData/securityDocumentManagement/index.vue
+12
-1
index.vue
src/views/contingency/contingencyManager/index.vue
+13
-1
index.vue
src/views/daily/nros/index.vue
+12
-1
index.vue
src/views/outsourcingDirector/approve/index.vue
+12
-1
index.vue
src/views/outsourcingDirector/declare/index.vue
+12
-1
No files found.
src/views/basicData/operationDcManagement/index.vue
View file @
fb03287d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
width=
"100%"
width=
"100%"
>
>
<div
ref=
'show'
v-if=
"show"
style=
"height: 85vh;width: 100%"
>
<div
ref=
'show'
v-if=
"show"
style=
"height: 85vh;width: 100%"
>
<pdf
v-if=
"showType=='pdf'"
:src=
"url"
></pdf>
<pdf
ref=
"show"
v-if=
"showType=='pdf'"
v-for=
"i in numPages"
:key=
"i"
:src=
"url"
:page=
"i"
></pdf>
<!--
<iframe
v-if=
"showType=='pdf'"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
></iframe>
-->
<!--
<iframe
v-if=
"showType=='pdf'"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
></iframe>
-->
<img
v-if=
"['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
>
<img
v-if=
"['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
>
</div>
</div>
...
@@ -115,6 +115,7 @@
...
@@ -115,6 +115,7 @@
},
},
data
()
{
data
()
{
return
{
return
{
numPages
:
1
,
show
:
false
,
show
:
false
,
isupLoad
:
false
,
isupLoad
:
false
,
treeTitle
:
'文档目录'
,
treeTitle
:
'文档目录'
,
...
@@ -158,6 +159,15 @@
...
@@ -158,6 +159,15 @@
}
}
},
},
methods
:{
methods
:{
getNumPages
(
url
)
{
var
loadingTask
=
pdf
.
createLoadingTask
(
url
)
loadingTask
.
promise
.
then
(
pdf
=>
{
this
.
url
=
loadingTask
this
.
numPages
=
pdf
.
numPages
}).
catch
((
err
)
=>
{
console
.
error
(
'pdf加载失败'
)
})
},
/* 预览 */
/* 预览 */
preview
(
row
){
preview
(
row
){
console
.
log
(
row
)
console
.
log
(
row
)
...
@@ -176,6 +186,7 @@
...
@@ -176,6 +186,7 @@
type
:
'application/'
+
row
.
fileType
+
';charset=UTF-8'
,
type
:
'application/'
+
row
.
fileType
+
';charset=UTF-8'
,
});
});
this
.
url
=
URL
.
createObjectURL
(
blob
)
this
.
url
=
URL
.
createObjectURL
(
blob
)
this
.
getNumPages
(
this
.
url
)
this
.
show
=
true
this
.
show
=
true
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
show
.
addEventListener
(
'contextmenu'
,
function
(
event
)
{
event
.
preventDefault
();
},
false
);
this
.
$refs
.
show
.
addEventListener
(
'contextmenu'
,
function
(
event
)
{
event
.
preventDefault
();
},
false
);
...
...
src/views/basicData/securityDocumentManagement/index.vue
View file @
fb03287d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
width=
"100%"
width=
"100%"
>
>
<div
ref=
'show'
v-if=
"show"
style=
"height: 85vh;width: 100%"
>
<div
ref=
'show'
v-if=
"show"
style=
"height: 85vh;width: 100%"
>
<pdf
v-if=
"showType=='pdf'"
:src=
"url"
></pdf>
<pdf
ref=
"show"
v-if=
"showType=='pdf'"
v-for=
"i in numPages"
:key=
"i"
:src=
"url"
:page=
"i"
></pdf>
<!--
<iframe
v-if=
"showType=='pdf'"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
></iframe>
-->
<!--
<iframe
v-if=
"showType=='pdf'"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
></iframe>
-->
<img
v-if=
"['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
>
<img
v-if=
"['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
>
</div>
</div>
...
@@ -116,6 +116,7 @@
...
@@ -116,6 +116,7 @@
},
},
data
()
{
data
()
{
return
{
return
{
numPages
:
1
,
show
:
false
,
show
:
false
,
isupLoad
:
false
,
isupLoad
:
false
,
treeTitle
:
'文档目录'
,
treeTitle
:
'文档目录'
,
...
@@ -156,6 +157,15 @@
...
@@ -156,6 +157,15 @@
}
}
},
},
methods
:{
methods
:{
getNumPages
(
url
)
{
var
loadingTask
=
pdf
.
createLoadingTask
(
url
)
loadingTask
.
promise
.
then
(
pdf
=>
{
this
.
url
=
loadingTask
this
.
numPages
=
pdf
.
numPages
}).
catch
((
err
)
=>
{
console
.
error
(
'pdf加载失败'
)
})
},
/* 预览 */
/* 预览 */
preview
(
row
){
preview
(
row
){
console
.
log
(
row
)
console
.
log
(
row
)
...
@@ -174,6 +184,7 @@
...
@@ -174,6 +184,7 @@
type
:
'application/'
+
row
.
fileType
+
';charset=UTF-8'
,
type
:
'application/'
+
row
.
fileType
+
';charset=UTF-8'
,
});
});
this
.
url
=
URL
.
createObjectURL
(
blob
)
this
.
url
=
URL
.
createObjectURL
(
blob
)
this
.
getNumPages
(
this
.
url
)
this
.
show
=
true
this
.
show
=
true
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
show
.
addEventListener
(
'contextmenu'
,
function
(
event
)
{
event
.
preventDefault
();
},
false
);
this
.
$refs
.
show
.
addEventListener
(
'contextmenu'
,
function
(
event
)
{
event
.
preventDefault
();
},
false
);
...
...
src/views/contingency/contingencyManager/index.vue
View file @
fb03287d
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
>
>
<div
v-if=
"show"
style=
"height: 85vh;width: 100%"
>
<div
v-if=
"show"
style=
"height: 85vh;width: 100%"
>
<!--
<iframe
v-if=
"showType=='pdf'"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
></iframe>
-->
<!--
<iframe
v-if=
"showType=='pdf'"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
></iframe>
-->
<pdf
ref=
"show"
v-if=
"showType=='pdf'"
:src=
"url"
></pdf>
<pdf
ref=
"show"
v-if=
"showType=='pdf'"
v-for=
"i in numPages"
:key=
"i"
:src=
"url"
:page=
"i"
></pdf>
<img
v-if=
"['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
>
<img
v-if=
"['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
>
</div>
</div>
</el-dialog>
</el-dialog>
...
@@ -113,6 +113,7 @@
...
@@ -113,6 +113,7 @@
},
},
data
()
{
data
()
{
return
{
return
{
numPages
:
1
,
show
:
false
,
show
:
false
,
isupLoad
:
false
,
isupLoad
:
false
,
treeTitle
:
'目录'
,
treeTitle
:
'目录'
,
...
@@ -156,6 +157,16 @@
...
@@ -156,6 +157,16 @@
}
}
},
},
methods
:{
methods
:{
getNumPages
(
url
)
{
var
loadingTask
=
pdf
.
createLoadingTask
(
url
)
loadingTask
.
promise
.
then
(
pdf
=>
{
this
.
url
=
loadingTask
this
.
numPages
=
pdf
.
numPages
}).
catch
((
err
)
=>
{
console
.
error
(
'pdf加载失败'
)
})
},
/* 预览 */
/* 预览 */
preview
(
row
){
preview
(
row
){
console
.
log
(
row
)
console
.
log
(
row
)
...
@@ -174,6 +185,7 @@
...
@@ -174,6 +185,7 @@
type
:
'application/'
+
row
.
fileType
+
';charset=UTF-8'
,
type
:
'application/'
+
row
.
fileType
+
';charset=UTF-8'
,
});
});
this
.
url
=
URL
.
createObjectURL
(
blob
)
this
.
url
=
URL
.
createObjectURL
(
blob
)
this
.
getNumPages
(
this
.
url
)
this
.
show
=
true
this
.
show
=
true
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
show
.
addEventListener
(
'contextmenu'
,
function
(
event
)
{
event
.
preventDefault
();
},
false
);
this
.
$refs
.
show
.
addEventListener
(
'contextmenu'
,
function
(
event
)
{
event
.
preventDefault
();
},
false
);
...
...
src/views/daily/nros/index.vue
View file @
fb03287d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
width=
"100%"
width=
"100%"
>
>
<div
ref=
"show"
v-if=
"show"
style=
"height: 85vh;width: 100%"
>
<div
ref=
"show"
v-if=
"show"
style=
"height: 85vh;width: 100%"
>
<pdf
v-if=
"showType=='pdf'"
:src=
"url"
></pdf>
<pdf
ref=
"show"
v-if=
"showType=='pdf'"
v-for=
"i in numPages"
:key=
"i"
:src=
"url"
:page=
"i"
></pdf>
<!--
<iframe
v-if=
"showType=='pdf'"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
></iframe>
-->
<!--
<iframe
v-if=
"showType=='pdf'"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
></iframe>
-->
<img
v-if=
"['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
>
<img
v-if=
"['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
>
</div>
</div>
...
@@ -115,6 +115,7 @@
...
@@ -115,6 +115,7 @@
},
},
data
()
{
data
()
{
return
{
return
{
numPages
:
1
,
show
:
false
,
show
:
false
,
isupLoad
:
false
,
isupLoad
:
false
,
treeTitle
:
'目录'
,
treeTitle
:
'目录'
,
...
@@ -158,6 +159,15 @@
...
@@ -158,6 +159,15 @@
}
}
},
},
methods
:{
methods
:{
getNumPages
(
url
)
{
var
loadingTask
=
pdf
.
createLoadingTask
(
url
)
loadingTask
.
promise
.
then
(
pdf
=>
{
this
.
url
=
loadingTask
this
.
numPages
=
pdf
.
numPages
}).
catch
((
err
)
=>
{
console
.
error
(
'pdf加载失败'
)
})
},
/* 预览 */
/* 预览 */
preview
(
row
){
preview
(
row
){
console
.
log
(
row
)
console
.
log
(
row
)
...
@@ -176,6 +186,7 @@
...
@@ -176,6 +186,7 @@
type
:
'application/'
+
row
.
fileType
+
';charset=UTF-8'
,
type
:
'application/'
+
row
.
fileType
+
';charset=UTF-8'
,
});
});
this
.
url
=
URL
.
createObjectURL
(
blob
)
this
.
url
=
URL
.
createObjectURL
(
blob
)
this
.
getNumPages
(
this
.
url
)
this
.
show
=
true
this
.
show
=
true
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
show
.
addEventListener
(
'contextmenu'
,
function
(
event
)
{
event
.
preventDefault
();
},
false
);
this
.
$refs
.
show
.
addEventListener
(
'contextmenu'
,
function
(
event
)
{
event
.
preventDefault
();
},
false
);
...
...
src/views/outsourcingDirector/approve/index.vue
View file @
fb03287d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
width=
"100%"
width=
"100%"
>
>
<div
ref=
'show'
v-if=
"show"
style=
"height: 85vh;width: 100%"
>
<div
ref=
'show'
v-if=
"show"
style=
"height: 85vh;width: 100%"
>
<pdf
v-if=
"showType=='pdf'"
:src=
"url"
></pdf>
<pdf
ref=
"show"
v-if=
"showType=='pdf'"
v-for=
"i in numPages"
:key=
"i"
:src=
"url"
:page=
"i"
></pdf>
<!--
<iframe
v-if=
"showType=='pdf'"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
></iframe>
-->
<!--
<iframe
v-if=
"showType=='pdf'"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
></iframe>
-->
<img
v-if=
"['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
>
<img
v-if=
"['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
>
</div>
</div>
...
@@ -114,6 +114,7 @@
...
@@ -114,6 +114,7 @@
},
},
data
()
{
data
()
{
return
{
return
{
numPages
:
1
,
show
:
false
,
show
:
false
,
isupLoad
:
false
,
isupLoad
:
false
,
treeTitle
:
'目录'
,
treeTitle
:
'目录'
,
...
@@ -157,6 +158,15 @@
...
@@ -157,6 +158,15 @@
}
}
},
},
methods
:{
methods
:{
getNumPages
(
url
)
{
var
loadingTask
=
pdf
.
createLoadingTask
(
url
)
loadingTask
.
promise
.
then
(
pdf
=>
{
this
.
url
=
loadingTask
this
.
numPages
=
pdf
.
numPages
}).
catch
((
err
)
=>
{
console
.
error
(
'pdf加载失败'
)
})
},
/* 预览 */
/* 预览 */
preview
(
row
){
preview
(
row
){
console
.
log
(
row
)
console
.
log
(
row
)
...
@@ -175,6 +185,7 @@
...
@@ -175,6 +185,7 @@
type
:
'application/'
+
row
.
fileType
+
';charset=UTF-8'
,
type
:
'application/'
+
row
.
fileType
+
';charset=UTF-8'
,
});
});
this
.
url
=
URL
.
createObjectURL
(
blob
)
this
.
url
=
URL
.
createObjectURL
(
blob
)
this
.
getNumPages
(
this
.
url
)
this
.
show
=
true
this
.
show
=
true
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
show
.
addEventListener
(
'contextmenu'
,
function
(
event
)
{
event
.
preventDefault
();
},
false
);
this
.
$refs
.
show
.
addEventListener
(
'contextmenu'
,
function
(
event
)
{
event
.
preventDefault
();
},
false
);
...
...
src/views/outsourcingDirector/declare/index.vue
View file @
fb03287d
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<div
v-if=
"show"
style=
"height: 85vh;width: 100%"
>
<div
v-if=
"show"
style=
"height: 85vh;width: 100%"
>
<!--
<iframe
v-if=
"showType=='pdf'"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
></iframe>
-->
<!--
<iframe
v-if=
"showType=='pdf'"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
></iframe>
-->
<pdf
ref=
"show"
v-if=
"showType=='pdf'"
:src=
"url"
></pdf>
<pdf
ref=
"show"
v-if=
"showType=='pdf'"
v-for=
"i in numPages"
:key=
"i"
:src=
"url"
:page=
"i"
></pdf>
<img
v-if=
"['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
>
<img
v-if=
"['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
>
</div>
</div>
</el-dialog>
</el-dialog>
...
@@ -116,6 +116,7 @@
...
@@ -116,6 +116,7 @@
},
},
data
()
{
data
()
{
return
{
return
{
numPages
:
1
,
show
:
false
,
show
:
false
,
isupLoad
:
false
,
isupLoad
:
false
,
treeTitle
:
'目录'
,
treeTitle
:
'目录'
,
...
@@ -159,6 +160,15 @@
...
@@ -159,6 +160,15 @@
}
}
},
},
methods
:{
methods
:{
getNumPages
(
url
)
{
var
loadingTask
=
pdf
.
createLoadingTask
(
url
)
loadingTask
.
promise
.
then
(
pdf
=>
{
this
.
url
=
loadingTask
this
.
numPages
=
pdf
.
numPages
}).
catch
((
err
)
=>
{
console
.
error
(
'pdf加载失败'
)
})
},
/* 预览 */
/* 预览 */
preview
(
row
){
preview
(
row
){
console
.
log
(
row
)
console
.
log
(
row
)
...
@@ -177,6 +187,7 @@
...
@@ -177,6 +187,7 @@
type
:
'application/'
+
row
.
fileType
+
';charset=UTF-8'
,
type
:
'application/'
+
row
.
fileType
+
';charset=UTF-8'
,
});
});
this
.
url
=
URL
.
createObjectURL
(
blob
)
this
.
url
=
URL
.
createObjectURL
(
blob
)
this
.
getNumPages
(
this
.
url
)
this
.
show
=
true
this
.
show
=
true
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
show
.
addEventListener
(
'contextmenu'
,
function
(
event
)
{
event
.
preventDefault
();
},
false
);
this
.
$refs
.
show
.
addEventListener
(
'contextmenu'
,
function
(
event
)
{
event
.
preventDefault
();
},
false
);
...
...
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