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
fa5bc39a
Commit
fa5bc39a
authored
Sep 25, 2024
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配套明细页表头全量筛选功能,用户自己配置
parent
2cb428bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
2 deletions
+42
-2
index.vue
...ivateComponents/components/MatchRequestItemsCon/index.vue
+42
-2
No files found.
applications/dee-mes/src/privateComponents/components/MatchRequestItemsCon/index.vue
View file @
fa5bc39a
...
...
@@ -5,6 +5,13 @@
-->
<
template
>
<div
v-dee-loading=
"loading"
class=
"MatchRequestItemsCon"
>
<dee-as-com
:lay-config=
"
{
typeName: 'ExtSupportingItem',
layKey: 'MatchRequestItemsSearch'
}"
@searchEvent="searchEvent"
/>
<dee-tools
slot=
"header"
:tools=
"tools"
mode=
"normal"
:collapse=
"false"
/>
<div
class=
"dee-table dee-table-dis-border"
>
<el-table
...
...
@@ -171,11 +178,12 @@ export default {
selectionRows
:
[],
currentRow
:
{},
reqStatusOptions
:
[],
hideMaterial
:
true
hideMaterial
:
true
,
searchParams
:
{}
}
},
computed
:
{
filter
TableData
()
{
raw
TableData
()
{
let
resData
=
[]
if
(
this
.
hideMaterial
)
{
this
.
tableData
.
forEach
(
row
=>
{
...
...
@@ -188,6 +196,9 @@ export default {
}
return
resData
},
filterTableData
()
{
return
this
.
filterTableDataBySearch
(
this
.
rawTableData
,
this
.
searchParams
)
},
tools
()
{
const
data
=
[
// {
...
...
@@ -233,6 +244,35 @@ export default {
this
.
reqStatusOptions
=
res
})
},
searchEvent
(
val
)
{
this
.
searchParams
=
val
},
// 过滤函数
filterTableDataBySearch
(
data
,
filters
)
{
if
(
!
filters
||
!
filters
.
items
||
filters
.
items
.
length
===
0
)
{
return
data
}
return
data
.
filter
(
row
=>
{
let
matches
=
true
filters
.
items
.
forEach
(
filter
=>
{
const
fieldValue
=
this
.
getNestedValue
(
row
,
filter
.
fieldName
)
if
(
filter
.
operator
===
'EQ'
)
{
debugger
matches
=
matches
&&
(
fieldValue
===
filter
.
value
)
}
else
if
(
filter
.
operator
===
'LIKE'
)
{
matches
=
matches
&&
(
fieldValue
&&
fieldValue
.
toString
().
includes
(
filter
.
value
))
}
if
(
!
matches
)
{
return
false
}
})
return
matches
})
},
// 辅助函数,用于获取嵌套字段的值
getNestedValue
(
obj
,
path
)
{
return
path
.
split
(
'.'
).
reduce
((
o
,
i
)
=>
(
o
||
{})[
i
],
obj
)
},
getOuterTableData
()
{
// this.loading = true
get
(
`/ExtSupportingItem/searchByAo?aoId=
${
this
.
basicData
.
extProcessPlanId
}
`
).
then
(
res
=>
{
...
...
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