Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-gjjs
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
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
fukai
vue-gjjs
Commits
a5bb4881
Commit
a5bb4881
authored
Sep 02, 2021
by
SunJie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
elcs.101
parent
90d2140f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
17 deletions
+40
-17
Show.vue
src/views/Docpan/Show.vue
+40
-17
No files found.
src/views/Docpan/Show.vue
View file @
a5bb4881
<
template
>
<div>
<div
style=
"height:800px;overflow:auto"
>
<div
style=
"height: 800px; overflow: auto"
>
<embed
v-if=
"this.model.docXML"
:src=
"pdf"
type=
"application/pdf"
height=
"100%"
width=
"100%"
/>
<embed
v-if=
"this.model.docXML!=''"
:src=
"pdf"
type=
"application/pdf"
height=
"100%"
width=
"100%"
/>
<el-col><pre
>
{{
this
.
model
.
docTXT
}}
</pre></el-col>
</div>
<el-row
v-if=
"!this.model.docXML"
>
<el-col
v-for=
"(item, index) in model.docTXT"
:key=
"index"
>
<el-col
:offset=
"4"
:span=
"8"
>
{{
item
[
0
]
}}
</el-col>
<el-col
:span=
"12"
>
{{
item
[
1
]
}}
</el-col>
<el-divider></el-divider>
</el-col>
</el-row>
</div>
</div>
</
template
>
<
script
>
import
Api
from
"~/service/Api"
import
Api
from
"~/service/Api"
;
export
default
{
data
()
{
data
()
{
return
{
model
:
{
docXML
:
""
},
pdf
:
"data:application/pdf;base64,"
,
}
model
:
{
docXML
:
""
},
pdf
:
"data:application/pdf;base64,"
,
};
},
created
()
{
this
.
model
.
docXML
=
window
.
sessionStorage
.
docXML
this
.
model
.
docXML
=
window
.
sessionStorage
.
docXML
;
this
.
model
.
docTXT
=
window
.
sessionStorage
.
docTXT
if
(
this
.
model
.
docXML
!=
""
)
Api
.
post
(
"pdf"
,{
"xml"
:
this
.
model
.
docXML
}).
then
(
res
=>
{
.
split
(
"
\
r
\
n"
)
.
filter
((
item
)
=>
item
)
.
map
((
item
)
=>
{
let
idx
=
item
.
indexOf
(
":"
);
return
[
item
.
substring
(
0
,
idx
).
trim
(),
item
.
substring
(
idx
+
1
).
trim
(),
];
});
if
(
this
.
model
.
docXML
!=
""
)
Api
.
post
(
"pdf"
,
{
xml
:
this
.
model
.
docXML
}).
then
((
res
)
=>
{
if
(
res
.
respCode
==
"AAAAAA"
)
{
this
.
pdf
+=
res
.
data
this
.
pdf
+=
res
.
data
;
}
})
}
}
});
},
};
</
script
>
<
style
scoped
>
...
...
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