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
8ce0d1e0
Commit
8ce0d1e0
authored
Jul 30, 2025
by
wuqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出添加加载状态
parent
fdc8ea89
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
31 deletions
+22
-31
src/api/podUsOrder.ts
+1
-1
src/views/order/orderTracking/index.vue
+13
-20
src/views/order/podUs/index.vue
+8
-10
No files found.
src/api/podUsOrder.ts
View file @
8ce0d1e0
...
@@ -48,7 +48,7 @@ export function getOrderList(
...
@@ -48,7 +48,7 @@ export function getOrderList(
currentPage
:
number
,
currentPage
:
number
,
pageSize
:
number
,
pageSize
:
number
,
)
{
)
{
return
axios
.
post
<
never
,
BasePaginationData
<
PodUsOrderListData
[]
>>
(
return
axios
.
post
<
never
,
BasePaginationData
<
PodUsOrderListData
>>
(
'/factory/podJomallOrderUs/list_page'
,
'/factory/podJomallOrderUs/list_page'
,
{
{
...
params
,
...
params
,
...
...
src/views/order/orderTracking/index.vue
View file @
8ce0d1e0
...
@@ -286,7 +286,7 @@ const goodsColumns = computed(() => {
...
@@ -286,7 +286,7 @@ const goodsColumns = computed(() => {
},
},
]
]
})
})
const
tableData
=
ref
<
PodUsOrderListData
[]
[]
>
([])
const
tableData
=
ref
<
PodUsOrderListData
[]
>
([])
const
goodsData
=
ref
<
ProductList
[]
>
([])
const
goodsData
=
ref
<
ProductList
[]
>
([])
const
searchVisible
=
ref
(
false
)
const
searchVisible
=
ref
(
false
)
const
goodsLoading
=
ref
(
false
)
const
goodsLoading
=
ref
(
false
)
...
@@ -393,16 +393,11 @@ const submitExportForm = async () => {
...
@@ -393,16 +393,11 @@ const submitExportForm = async () => {
idList
:
[],
idList
:
[],
}
}
// 使用函数封装映射逻辑
// 使用函数封装映射逻辑
const
mapIds
=
(
items
:
PodUsOrderListData
[][]
|
PodUsOrderListData
[])
=>
{
const
mapIds
=
(
items
:
PodUsOrderListData
[])
=>
// 如果是二维数组,先展平成一维数组
items
.
map
((
el
)
=>
Number
(
el
.
id
))
const
flatItems
=
Array
.
isArray
(
items
[
0
])
?
(
items
as
PodUsOrderListData
[][]).
flat
()
:
(
items
as
PodUsOrderListData
[])
return
flatItems
.
map
((
el
)
=>
Number
(
el
.
id
))
}
switch
(
resourceType
)
{
switch
(
resourceType
)
{
case
0
:
case
0
:
params
.
idList
=
mapIds
(
tableData
.
value
.
flat
()
)
params
.
idList
=
mapIds
(
tableData
.
value
as
PodUsOrderListData
[]
)
break
break
case
1
:
case
1
:
params
.
idList
=
mapIds
(
selection
.
value
)
params
.
idList
=
mapIds
(
selection
.
value
)
...
@@ -421,13 +416,11 @@ const submitExportForm = async () => {
...
@@ -421,13 +416,11 @@ const submitExportForm = async () => {
})
})
window
.
open
(
filePath
+
res
.
message
,
'_blank'
)
window
.
open
(
filePath
+
res
.
message
,
'_blank'
)
exportVisible
.
value
=
false
exportVisible
.
value
=
false
//
exportLoading.value = false
exportLoading
.
value
=
false
}
catch
(
e
)
{
}
catch
(
e
)
{
exportVisible
.
value
=
false
exportVisible
.
value
=
false
// exportLoading.value = false
}
finally
{
exportLoading
.
value
=
false
exportLoading
.
value
=
false
}
}
}
}
const
handleSizeChange
=
(
pageSize
:
number
)
=>
{
const
handleSizeChange
=
(
pageSize
:
number
)
=>
{
pagination
.
value
.
pageSize
=
pageSize
pagination
.
value
.
pageSize
=
pageSize
...
@@ -944,12 +937,7 @@ onMounted(() => {
...
@@ -944,12 +937,7 @@ onMounted(() => {
</span>
</span>
</ElFormItem>
</ElFormItem>
<ElFormItem>
<ElFormItem>
<ElButton
<ElButton
type=
"success"
@
click=
"exportData"
>
导出
</ElButton>
:loading=
"exportLoading"
type=
"success"
@
click=
"exportData"
>
导出
</ElButton
>
</ElFormItem>
</ElFormItem>
</ElForm>
</ElForm>
</el-card>
</el-card>
...
@@ -1040,7 +1028,12 @@ onMounted(() => {
...
@@ -1040,7 +1028,12 @@ onMounted(() => {
<
template
#
footer
>
<
template
#
footer
>
<span
class=
"dialog-footer"
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"exportVisible = false"
>
取消
</el-button>
<el-button
@
click=
"exportVisible = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"submitExportForm"
>
确认
</el-button>
<el-button
:loading=
"exportLoading"
type=
"primary"
@
click=
"submitExportForm"
>
确认
</el-button
>
</span>
</span>
</
template
>
</
template
>
</ElDialog>
</ElDialog>
...
...
src/views/order/podUs/index.vue
View file @
8ce0d1e0
...
@@ -489,12 +489,7 @@
...
@@ -489,12 +489,7 @@
</ElButton>
</ElButton>
</span>
</span>
<span
v-if=
"status === 'COMPLETE'"
class=
"item"
>
<span
v-if=
"status === 'COMPLETE'"
class=
"item"
>
<ElButton
<ElButton
type=
"success"
@
click=
"exportData"
>
导出
</ElButton>
:loading=
"exportLoading"
type=
"success"
@
click=
"exportData"
>
导出
</ElButton
>
</span>
</span>
</ElFormItem>
</ElFormItem>
</ElForm>
</ElForm>
...
@@ -1967,7 +1962,12 @@
...
@@ -1967,7 +1962,12 @@
<
template
#
footer
>
<
template
#
footer
>
<
span
class
=
"dialog-footer"
>
<
span
class
=
"dialog-footer"
>
<
el
-
button
@
click
=
"exportVisible = false"
>
取消
<
/el-button
>
<
el
-
button
@
click
=
"exportVisible = false"
>
取消
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"submitExportForm"
>
确认
<
/el-button
>
<
el
-
button
:
loading
=
"exportLoading"
type
=
"primary"
@
click
=
"submitExportForm"
>
确认
<
/el-butto
n
>
<
/span
>
<
/span
>
<
/template
>
<
/template
>
<
/ElDialog
>
<
/ElDialog
>
...
@@ -2150,11 +2150,9 @@ const submitExportForm = async () => {
...
@@ -2150,11 +2150,9 @@ const submitExportForm = async () => {
}
)
}
)
window
.
open
(
filePath
+
res
.
message
,
'_blank'
)
window
.
open
(
filePath
+
res
.
message
,
'_blank'
)
exportVisible
.
value
=
false
exportVisible
.
value
=
false
//
exportLoading.value = false
exportLoading
.
value
=
false
}
catch
(
e
)
{
}
catch
(
e
)
{
exportVisible
.
value
=
false
exportVisible
.
value
=
false
// exportLoading.value = false
}
finally
{
exportLoading
.
value
=
false
exportLoading
.
value
=
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