Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web
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
中汽测评-信息安全测评系统
web
Commits
4bd9bc9d
Commit
4bd9bc9d
authored
Mar 13, 2024
by
jiaxu.yan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 检查报告
parent
c98a7cad
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
129 additions
and
8 deletions
+129
-8
index.vue
src/views/processing/archivedTask/index.vue
+43
-1
index.vue
src/views/processing/processed-review/index.vue
+43
-1
index.vue
src/views/task/on/index.vue
+43
-6
No files found.
src/views/processing/archivedTask/index.vue
View file @
4bd9bc9d
...
...
@@ -185,7 +185,7 @@
type=
"primary"
plain
size=
"mini"
@
click=
"
goNext
(item.id)"
@
click=
"
downloadPdf
(item.id)"
>
检查报告
</el-button
>
<el-button
...
...
@@ -249,6 +249,7 @@
</template>
<
script
>
import
page
from
'@/mixins/page'
import
{
pdfDownload
}
from
'@/api/task/task'
import
{
mapGetters
}
from
'vuex'
export
default
{
dicts
:
[
'sys_scene_type'
,
'task_type'
,
'inspection_item'
],
...
...
@@ -270,6 +271,47 @@ export default {
this
.
$store
.
dispatch
(
'standard/setStandardList'
)
},
methods
:
{
/**
* 检验报告
*/
downloadPdf
(
id
)
{
pdfDownload
({
taskId
:
id
,
type
:
0
}).
then
(
res
=>
{
const
fileUrl
=
process
.
env
.
VUE_APP_IMAGE_API
+
'/vehicle-quality-review-oss/'
+
res
.
data
this
.
download
(
fileUrl
)
})
},
/**
* 下载pdf
*/
download
(
fileUrl
)
{
// 根据pdf文件地址下载
// window.location.href = this.fileUrl
const
xhr
=
new
XMLHttpRequest
()
xhr
.
open
(
'GET'
,
fileUrl
,
true
)
xhr
.
responseType
=
'blob'
xhr
.
onload
=
()
=>
{
if
(
xhr
.
status
===
200
)
{
const
blob
=
new
Blob
([
xhr
.
response
],
{
type
:
'application/pdf'
})
const
url
=
URL
.
createObjectURL
(
blob
)
const
link
=
document
.
createElement
(
'a'
)
link
.
href
=
url
link
.
download
=
'检查报告.pdf'
link
.
click
()
URL
.
revokeObjectURL
(
url
)
}
}
xhr
.
send
()
},
/* 跳转到问卷详情*/
goNext
(
url
)
{
this
.
$router
.
push
({
path
:
url
})
...
...
src/views/processing/processed-review/index.vue
View file @
4bd9bc9d
...
...
@@ -183,7 +183,7 @@
type=
"primary"
plain
size=
"mini"
@
click=
"
goNext
(item.id)"
@
click=
"
downloadPdf
(item.id)"
>
检查报告
</el-button
>
<el-button
...
...
@@ -220,6 +220,7 @@
<
script
>
import
page
from
'@/mixins/page'
import
{
mapGetters
}
from
'vuex'
import
{
pdfDownload
}
from
'@/api/task/task'
export
default
{
mixins
:
[
page
],
dicts
:
[
'inspection_item'
],
...
...
@@ -237,6 +238,47 @@ export default {
this
.
$store
.
dispatch
(
'standard/setStandardList'
)
},
methods
:
{
/**
* 检验报告
*/
downloadPdf
(
id
)
{
pdfDownload
({
taskId
:
id
,
type
:
0
}).
then
(
res
=>
{
const
fileUrl
=
process
.
env
.
VUE_APP_IMAGE_API
+
'/vehicle-quality-review-oss/'
+
res
.
data
this
.
download
(
fileUrl
)
})
},
/**
* 下载pdf
*/
download
(
fileUrl
)
{
// 根据pdf文件地址下载
// window.location.href = this.fileUrl
const
xhr
=
new
XMLHttpRequest
()
xhr
.
open
(
'GET'
,
fileUrl
,
true
)
xhr
.
responseType
=
'blob'
xhr
.
onload
=
()
=>
{
if
(
xhr
.
status
===
200
)
{
const
blob
=
new
Blob
([
xhr
.
response
],
{
type
:
'application/pdf'
})
const
url
=
URL
.
createObjectURL
(
blob
)
const
link
=
document
.
createElement
(
'a'
)
link
.
href
=
url
link
.
download
=
'检查报告.pdf'
link
.
click
()
URL
.
revokeObjectURL
(
url
)
}
}
xhr
.
send
()
},
/* 跳转到问卷详情*/
goNext
(
url
)
{
this
.
$router
.
push
({
path
:
url
})
...
...
src/views/task/on/index.vue
View file @
4bd9bc9d
...
...
@@ -448,7 +448,7 @@
type=
"primary"
plain
size=
"mini"
@
click=
"
goNext
(item.id)"
@
click=
"
downloadPdf
(item.id)"
>
检查报告
</el-button
>
<el-button
...
...
@@ -486,11 +486,7 @@
import
page
from
'@/mixins/page'
import
{
getHourDiff
}
from
'@/utils/diff'
import
{
mapGetters
}
from
'vuex'
import
{
reviewTaskStart
,
reviewCarTaskStart
,
removeTask
}
from
'@/api/task/task'
import
{
reviewTaskStart
,
pdfDownload
,
removeTask
}
from
'@/api/task/task'
import
request
from
'@/utils/request'
export
default
{
dicts
:
[
...
...
@@ -545,6 +541,47 @@ export default {
this
.
$store
.
dispatch
(
'standard/setStandardList'
)
},
methods
:
{
/**
* 检验报告
*/
downloadPdf
(
id
)
{
pdfDownload
({
taskId
:
id
,
type
:
0
}).
then
(
res
=>
{
const
fileUrl
=
process
.
env
.
VUE_APP_IMAGE_API
+
'/vehicle-quality-review-oss/'
+
res
.
data
this
.
download
(
fileUrl
)
})
},
/**
* 下载pdf
*/
download
(
fileUrl
)
{
// 根据pdf文件地址下载
// window.location.href = this.fileUrl
const
xhr
=
new
XMLHttpRequest
()
xhr
.
open
(
'GET'
,
fileUrl
,
true
)
xhr
.
responseType
=
'blob'
xhr
.
onload
=
()
=>
{
if
(
xhr
.
status
===
200
)
{
const
blob
=
new
Blob
([
xhr
.
response
],
{
type
:
'application/pdf'
})
const
url
=
URL
.
createObjectURL
(
blob
)
const
link
=
document
.
createElement
(
'a'
)
link
.
href
=
url
link
.
download
=
'检查报告.pdf'
link
.
click
()
URL
.
revokeObjectURL
(
url
)
}
}
xhr
.
send
()
},
loadData
()
{
this
.
loading
=
true
if
(
this
.
active
===
'0'
)
{
...
...
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