Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinjianhui
factory_front
Commits
b366404d
Commit
b366404d
authored
Jun 30, 2025
by
wusiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: podus批量下载添加tif下载
parent
306c9c3e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
35 deletions
+68
-35
src/api/podUsOrder.ts
+1
-1
src/types/api/podUsOrder.ts
+2
-0
src/views/order/podUs/index.vue
+65
-34
No files found.
src/api/podUsOrder.ts
View file @
b366404d
...
@@ -456,7 +456,7 @@ export function batchDownloadApi(currentPage: number, pageSize: number) {
...
@@ -456,7 +456,7 @@ export function batchDownloadApi(currentPage: number, pageSize: number) {
}
}
// 批量下载 下载
// 批量下载 下载
export
function
batchDownloadDownloadApi
(
params
:
{
id
:
number
})
{
export
function
batchDownloadDownloadApi
(
params
:
{
id
:
number
;
type
:
string
})
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
`factory/podUsBatchDownload/download`
,
`factory/podUsBatchDownload/download`
,
{
{
...
...
src/types/api/podUsOrder.ts
View file @
b366404d
...
@@ -69,6 +69,8 @@ export interface PodUsOrderListData {
...
@@ -69,6 +69,8 @@ export interface PodUsOrderListData {
orderNumber
?:
string
orderNumber
?:
string
logisticsWayId
?:
number
|
null
logisticsWayId
?:
number
|
null
logisticsWayName
?:
string
logisticsWayName
?:
string
url
?:
string
|
null
tiffUrl
?:
string
|
null
}
}
export
interface
ProductList
{
export
interface
ProductList
{
id
:
number
id
:
number
...
...
src/views/order/podUs/index.vue
View file @
b366404d
...
@@ -956,16 +956,10 @@
...
@@ -956,16 +956,10 @@
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
template
#
syntheticStatus
=
"{ row
}
"
>
<
div
style
=
"white-space: pre-line"
>
<
el
-
tag
v
-
if
=
"row.syntheticStatus"
type
=
"success"
>
完成
<
/el-tag
>
<
el
-
tag
v
-
else
type
=
"danger"
>
未完成
<
/el-tag
>
<
/div
>
<
/template
>
<
template
#
downloadStatus
=
"{ row
}
"
>
<
template
#
downloadStatus
=
"{ row
}
"
>
<
div
style
=
"white-space: pre-line"
>
<
div
style
=
"white-space: pre-line"
>
<
el
-
tag
v
-
if
=
"row.downloadStatus"
type
=
"success"
>
是
<
/el-tag
>
<
el
-
tag
v
-
if
=
"row.downloadStatus"
type
=
"success"
>
已下载
<
/el-tag
>
<
el
-
tag
v
-
else
type
=
"danger"
>
否
<
/el-tag
>
<
el
-
tag
v
-
else
type
=
"danger"
>
未下载
<
/el-tag
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
template
#
createTime
=
"{ row
}
"
>
<
template
#
createTime
=
"{ row
}
"
>
...
@@ -984,8 +978,23 @@
...
@@ -984,8 +978,23 @@
class
=
"operate-box-vertical"
class
=
"operate-box-vertical"
>
>
<
span
class
=
"operate-item"
>
<
span
class
=
"operate-item"
>
<
ElButton
link
type
=
"primary"
@
click
=
"handleDownload(row)"
>
<
ElButton
下载
:
disabled
=
"!row.url"
link
type
=
"primary"
@
click
=
"handleDownload(row, 'png')"
>
PNG
下载
<
/ElButton
>
<
/span
>
<
span
class
=
"operate-item"
>
<
ElButton
:
disabled
=
"!row.tiffUrl"
link
type
=
"primary"
@
click
=
"handleDownload(row, 'tiff')"
>
TIF
下载
<
/ElButton
>
<
/ElButton
>
<
/span
>
<
/span
>
<
span
class
=
"operate-item"
>
<
span
class
=
"operate-item"
>
...
@@ -1896,7 +1905,7 @@ const handleUpdateAddress = async (row: PodUsOrderListData) => {
...
@@ -1896,7 +1905,7 @@ const handleUpdateAddress = async (row: PodUsOrderListData) => {
updateAddVisible
.
value
=
true
updateAddVisible
.
value
=
true
}
}
// 批量下载 下载
// 批量下载 下载
const
handleDownload
=
async
(
row
:
PodUsOrderListData
)
=>
{
const
handleDownload
=
async
(
row
:
PodUsOrderListData
,
type
:
string
)
=>
{
try
{
try
{
await
showConfirm
(
'确定下载吗?'
,
{
await
showConfirm
(
'确定下载吗?'
,
{
confirmButtonText
:
'确认'
,
confirmButtonText
:
'确认'
,
...
@@ -1906,11 +1915,13 @@ const handleDownload = async (row: PodUsOrderListData) => {
...
@@ -1906,11 +1915,13 @@ const handleDownload = async (row: PodUsOrderListData) => {
}
catch
{
}
catch
{
return
return
}
}
const
loading
=
ElLoading
.
service
({
fullscreen
:
true
,
text
:
'操作中...'
,
background
:
'rgba(0, 0, 0, 0.3)'
,
}
)
try
{
try
{
const
res
=
await
batchDownloadDownloadApi
({
id
:
row
.
id
}
)
const
url
=
filePath
+
(
type
===
'png'
?
row
.
url
:
row
.
tiffUrl
)
if
(
res
.
code
!==
200
||
!
res
.
message
)
return
const
url
=
filePath
+
res
.
message
fetch
(
url
)
fetch
(
url
)
.
then
((
res
)
=>
res
.
blob
())
.
then
((
res
)
=>
res
.
blob
())
...
@@ -1920,11 +1931,16 @@ const handleDownload = async (row: PodUsOrderListData) => {
...
@@ -1920,11 +1931,16 @@ const handleDownload = async (row: PodUsOrderListData) => {
link
.
download
=
url
?
url
.
split
(
'/'
).
pop
()
||
'download'
:
'download'
link
.
download
=
url
?
url
.
split
(
'/'
).
pop
()
||
'download'
:
'download'
link
.
click
()
link
.
click
()
}
)
}
)
ElMessage
.
success
(
'操作成功'
)
.
then
(()
=>
{
batchDownloadDownloadApi
({
id
:
row
.
id
,
type
}
)
ElMessage
.
success
(
'操作成功'
)
search
()
loadTabData
()
}
)
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
e
)
console
.
error
(
e
)
}
finally
{
}
finally
{
search
()
loading
.
close
()
}
}
}
}
// 批量下载 删除
// 批量下载 删除
...
@@ -1938,11 +1954,21 @@ const handleBatchDelete = async (row: PodUsOrderListData) => {
...
@@ -1938,11 +1954,21 @@ const handleBatchDelete = async (row: PodUsOrderListData) => {
}
catch
{
}
catch
{
return
return
}
}
const
res
=
await
batchDownloadDeleteApi
({
id
:
row
.
id
}
)
const
loading
=
ElLoading
.
service
({
if
(
res
.
code
!==
200
)
return
fullscreen
:
true
,
ElMessage
.
success
(
'操作成功'
)
text
:
'操作中...'
,
search
()
background
:
'rgba(0, 0, 0, 0.3)'
,
loadTabData
()
}
)
try
{
const
res
=
await
batchDownloadDeleteApi
({
id
:
row
.
id
}
)
if
(
res
.
code
!==
200
)
return
ElMessage
.
success
(
res
.
message
)
search
()
}
catch
(
e
)
{
console
.
error
(
e
)
}
finally
{
loading
.
close
()
}
}
}
// 批量下载 重新排版
// 批量下载 重新排版
const
handleReComposingDesign
=
async
(
row
:
PodUsOrderListData
)
=>
{
const
handleReComposingDesign
=
async
(
row
:
PodUsOrderListData
)
=>
{
...
@@ -1955,10 +1981,22 @@ const handleReComposingDesign = async (row: PodUsOrderListData) => {
...
@@ -1955,10 +1981,22 @@ const handleReComposingDesign = async (row: PodUsOrderListData) => {
}
catch
{
}
catch
{
return
return
}
}
const
res
=
await
batchDownloadRecomposingApi
({
id
:
row
.
id
}
)
const
loading
=
ElLoading
.
service
({
if
(
res
.
code
!==
200
)
return
fullscreen
:
true
,
ElMessage
.
success
(
res
.
message
)
text
:
'操作中...'
,
search
()
background
:
'rgba(0, 0, 0, 0.3)'
,
}
)
try
{
const
res
=
await
batchDownloadRecomposingApi
({
id
:
row
.
id
}
)
if
(
res
.
code
!==
200
)
return
ElMessage
.
success
(
'操作成功'
)
search
()
loadTabData
()
}
catch
(
e
)
{
console
.
error
(
e
)
}
finally
{
loading
.
close
()
}
}
}
const
tableColumns
=
computed
(()
=>
{
const
tableColumns
=
computed
(()
=>
{
if
(
status
.
value
===
'BATCH_DOWNLOAD'
)
{
if
(
status
.
value
===
'BATCH_DOWNLOAD'
)
{
...
@@ -1970,13 +2008,6 @@ const tableColumns = computed(() => {
...
@@ -1970,13 +2008,6 @@ const tableColumns = computed(() => {
align
:
'center'
,
align
:
'center'
,
}
,
}
,
{
{
label
:
'合成状态'
,
prop
:
'syntheticStatus'
,
slot
:
'syntheticStatus'
,
width
:
150
,
align
:
'center'
,
}
,
{
label
:
'下载状态'
,
label
:
'下载状态'
,
slot
:
'downloadStatus'
,
slot
:
'downloadStatus'
,
width
:
150
,
width
:
150
,
...
@@ -2018,7 +2049,7 @@ const tableColumns = computed(() => {
...
@@ -2018,7 +2049,7 @@ const tableColumns = computed(() => {
{
{
label
:
'操作'
,
label
:
'操作'
,
slot
:
'operate'
,
slot
:
'operate'
,
width
:
2
00
,
width
:
3
00
,
align
:
'center'
,
align
:
'center'
,
fixed
:
'right'
,
fixed
:
'right'
,
prop
:
'operate'
,
prop
:
'operate'
,
...
...
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