Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TF-MOM-WEB
Project
Project
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
TFMOM
TF-MOM-WEB
Commits
c6135f30
Commit
c6135f30
authored
Jan 03, 2024
by
“lixuyan”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加pdf下载
parent
7ed6b266
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
4 deletions
+47
-4
index.vue
...rc/privateComponents/components/AoProcessDetail/index.vue
+45
-1
index.vue
...rivateComponents/components/AoProcessDetailEdit/index.vue
+2
-3
No files found.
applications/dee-mes/src/privateComponents/components/AoProcessDetail/index.vue
View file @
c6135f30
<
template
>
<div
class=
"task-detail-basicInfo-com"
>
<div
class=
"download-btn"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"seePdf"
>
下载pdf
</el-button>
</div>
<div
v-if=
"loading"
class=
"detail-com"
>
<dee-as-com
:key=
"layConfig.typeName"
...
...
@@ -11,6 +18,7 @@
</
template
>
<
script
>
import
{
downloadFile
}
from
'@/utils/http'
import
{
post
}
from
'@/utils/http'
export
default
{
name
:
'AoProcessDetail'
,
...
...
@@ -26,7 +34,8 @@ export default {
data
()
{
return
{
aoData
:
{},
loading
:
false
loading
:
false
,
seePdfShow
:
false
}
},
computed
:
{
...
...
@@ -41,6 +50,41 @@ export default {
this
.
getData
()
},
methods
:
{
seePdf
()
{
if
(
this
.
basicData
.
id
)
{
if
(
this
.
seePdfShow
)
{
return
}
const
notify
=
this
.
$notify
({
title
:
'提示'
,
message
:
'PDF正在加载中...,请稍后!'
,
duration
:
0
})
this
.
seePdfShow
=
true
downloadFile
(
`/ExtProcessPlan/createPDF?id=
${
this
.
basicData
.
id
}
`
,
'get'
).
then
(
res
=>
{
const
blob
=
new
Blob
([
res
.
data
],
{
type
:
'application/pdf'
})
if
(
window
.
navigator
.
msSaveOrOpenBlob
)
{
navigator
.
msSaveBlob
(
blob
)
}
else
{
var
openUrl
=
URL
.
createObjectURL
(
blob
)
this
.
seePdfShow
=
false
notify
.
close
()
window
.
open
(
openUrl
,
'_blank'
)
}
}).
catch
((
error
)
=>
{
console
.
log
(
error
)
notify
.
close
()
this
.
seePdfShow
=
false
})
}
else
{
this
.
$message
({
message
:
'该AO没有PDF'
,
type
:
'warning'
})
}
},
getData
()
{
const
params
=
{
'searchItems'
:
{
...
...
applications/dee-mes/src/privateComponents/components/AoProcessDetailEdit/index.vue
View file @
c6135f30
<
template
>
<div
class=
"task-detail-basicInfo-com"
>
<div
class=
"download-btn"
@
click=
"seePdf"
>
<div
class=
"download-btn"
>
<el-button
type=
"primary"
plain
size=
"small"
@
click=
"seePdf"
>
下载pdf
</el-button>
</div>
<div
v-if=
"loading"
class=
"detail-com"
>
...
...
@@ -51,7 +51,6 @@ export default {
},
methods
:
{
seePdf
()
{
console
.
log
(
343434
)
if
(
this
.
basicData
.
id
)
{
if
(
this
.
seePdfShow
)
{
return
...
...
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