Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gavel-hafms-vue
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
李苏
gavel-hafms-vue
Commits
1158af1b
Commit
1158af1b
authored
Dec 05, 2023
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分页
parent
45eb65cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
57 deletions
+5
-57
index.vue
src/views/sbysjsp/zhcx/index.vue
+5
-57
No files found.
src/views/sbysjsp/zhcx/index.vue
View file @
1158af1b
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</el-row>
</el-row>
<!-- 表格-->
<!-- 表格-->
<div
class=
"tablePagers"
>
<div
class=
"tablePagers"
>
<TablePager
:operateButtons=
'false'
disableQuery
@
getData=
'getData'
:ref=
"'TablePager'"
:app=
'app'
<TablePager
:operateButtons=
'false'
@
getData=
'getData'
:ref=
"'TablePager'"
:app=
'app'
:query=
'query'
@
selectItem=
'selectItem'
@
getRow=
'getRow'
>
:query=
'query'
@
selectItem=
'selectItem'
@
getRow=
'getRow'
>
</TablePager>
</TablePager>
</div>
</div>
...
@@ -52,6 +52,7 @@
...
@@ -52,6 +52,7 @@
/* 查询参数*/
/* 查询参数*/
queryParams
:
{
queryParams
:
{
lx
:
'C'
,
lx
:
'C'
,
mid
:
''
},
},
/* 表格标题对应参数*/
/* 表格标题对应参数*/
tableTitle
:
[{
tableTitle
:
[{
...
@@ -126,11 +127,6 @@
...
@@ -126,11 +127,6 @@
fieldType
:
"ftString"
,
fieldType
:
"ftString"
,
width
:
160
width
:
160
}
}
]
]
}
}
},
},
...
@@ -181,62 +177,14 @@
...
@@ -181,62 +177,14 @@
/*数据处理*/
/*数据处理*/
showTabData
(
id
)
{
showTabData
(
id
)
{
/* 控制查询loading */
/* 控制查询loading */
this
.
$refs
.
TablePager
.
loading
=
true
this
.
queryParams
.
mid
=
id
doQueryDetail
({
this
.
$refs
[
'TablePager'
].
reLoad
()
mid
:
id
}).
then
(
res
=>
{
if
(
res
.
success
)
{
let
records
=
res
.
data
.
records
||
[]
/* 数据处理*/
let
gs1
=
''
let
gs2
=
''
let
lxh1
=
records
.
filter
(
item
=>
{
if
(
item
.
lxh
==
'1'
)
{
gs1
=
item
.
gsname
return
true
}
})
let
lxh2
=
records
.
filter
(
item
=>
{
if
(
item
.
lxh
==
'2'
)
{
gs2
=
item
.
gsname
return
true
}
})
/* 根据xh合并*/
let
newList
=
lxh1
.
map
(
item1
=>
{
let
newItem
=
{}
lxh2
.
forEach
(
item2
=>
{
if
(
item1
.
xh
==
item2
.
xh
)
{
Object
.
keys
(
item2
).
forEach
(
key
=>
{
let
keyName
=
key
+
'2'
newItem
[
keyName
]
=
item2
[
key
]
})
}
})
/* 最终合并*/
newItem
=
{
...
newItem
,
...
item1
}
return
newItem
})
/* 手动操作表格*/
/* 替换标题*/
// this.$refs.TablePager['newGridList'][1]['label'] = gs1
// this.$refs.TablePager['newGridList'][2]['label'] = gs2
/* 替换数据*/
this
.
$refs
.
TablePager
[
'tableData'
]
=
newList
}
}).
finally
(
e
=>
{
this
.
$refs
.
TablePager
.
loading
=
false
})
},
},
handleClick
(
item
)
{
handleClick
(
item
)
{
this
.
showTabData
(
item
.
name
)
this
.
showTabData
(
item
.
name
)
},
},
/* 基础查询*/
/* 基础查询*/
query
:
doQuery
,
query
:
doQuery
Detail
,
apiDelete
:
doDelete
,
apiDelete
:
doDelete
,
queryDetail
:
doQueryDetail
queryDetail
:
doQueryDetail
},
},
...
...
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