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
fdc8ea89
Commit
fdc8ea89
authored
Jul 29, 2025
by
wuqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ts校验修复
parent
488d5e46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
src/views/order/orderTracking/index.vue
+9
-9
No files found.
src/views/order/orderTracking/index.vue
View file @
fdc8ea89
...
...
@@ -286,7 +286,7 @@ const goodsColumns = computed(() => {
},
]
})
const
tableData
=
ref
<
PodUsOrderListData
[]
>
([])
const
tableData
=
ref
<
PodUsOrderListData
[]
[]
>
([])
const
goodsData
=
ref
<
ProductList
[]
>
([])
const
searchVisible
=
ref
(
false
)
const
goodsLoading
=
ref
(
false
)
...
...
@@ -393,16 +393,16 @@ const submitExportForm = async () => {
idList
:
[],
}
// 使用函数封装映射逻辑
const
mapIds
=
(
items
:
PodUsOrderListData
[]
)
=>
items
.
filter
(
(
el
):
el
is
PodUsOrderListData
&
{
id
:
string
|
number
}
=>
el
.
id
!==
undefined
&&
el
.
id
!==
null
,
)
.
map
((
el
)
=>
Number
(
el
.
id
))
const
mapIds
=
(
items
:
PodUsOrderListData
[]
[]
|
PodUsOrderListData
[])
=>
{
// 如果是二维数组,先展平成一维数组
const
flatItems
=
Array
.
isArray
(
items
[
0
])
?
(
items
as
PodUsOrderListData
[][]).
flat
()
:
(
items
as
PodUsOrderListData
[])
return
flatItems
.
map
((
el
)
=>
Number
(
el
.
id
)
)
}
switch
(
resourceType
)
{
case
0
:
params
.
idList
=
mapIds
(
tableData
.
value
as
PodUsOrderListData
[]
)
params
.
idList
=
mapIds
(
tableData
.
value
.
flat
()
)
break
case
1
:
params
.
idList
=
mapIds
(
selection
.
value
)
...
...
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