Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
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
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
常超
founder_vue
Commits
0238fda3
Commit
0238fda3
authored
Oct 15, 2021
by
maxiaohan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
比中列表树形回显
parent
4d1554af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
14 deletions
+32
-14
src/views/cxyrd/QueryConfirm.vue
+32
-14
No files found.
src/views/cxyrd/QueryConfirm.vue
View file @
0238fda3
...
...
@@ -668,28 +668,46 @@ export default {
hadnlExpandChange
(
row
,
expanded
)
{
// 获取下标
var
i
=
this
.
list
.
findIndex
(
table
=>
table
.
queryId
===
row
.
queryId
);
// var i = this.tableData.findIndex(table => table.id === row.id);
console
.
log
(
i
);
if
(
expanded
)
{
console
.
info
(
"展开时row数据"
,
this
.
list
[
i
]);
this
.
list
[
i
]
=
{
qid
:
row
.
qid
,
children
:
row
.
children
,
queryId
:
row
.
queryId
};
this
.
$forceUpdate
();
// this.$set(this.tableData[i], "barcode", "");
// 保证临时变量中存在下标属性,方便后续折叠时取值
row
.
index
=
i
;
//
row.index = i;
// // push到临时数组中
// this.arr.push(row);
// 清空表格数据
var
obj
=
{
// var obj = {
// qid: row.qid,
// children: row.children,
// queryId: row.queryId
// };
// this.list[i] = obj;
}
else
{
console
.
info
(
"折叠时row数据"
,
this
.
list
[
i
]);
this
.
list
[
i
]
=
{
qid
:
row
.
qid
,
children
:
row
.
children
,
queryId
:
row
.
queryId
queryId
:
row
.
queryId
,
barcode
:
row
.
children
[
0
].
barcode
,
maxcandidatecnt
:
row
.
children
[
0
].
maxcandidatecnt
,
querytype
:
row
.
children
[
0
].
querytype
,
queryStateName
:
row
.
children
[
0
].
queryStateName
,
hitpossibility
:
row
.
children
[
0
].
hitpossibility
,
queryclass
:
row
.
children
[
0
].
queryclass
,
affirmtime
:
row
.
children
[
0
].
affirmtime
,
requestdatetime
:
row
.
children
[
0
].
requestdatetime
,
userdesc
:
row
.
children
[
0
].
userdesc
};
this
.
list
[
i
]
=
obj
;
}
else
{
console
.
info
(
"折叠时row数据"
,
row
);
var
rowObj
=
row
.
children
[
0
];
rowObj
.
children
=
row
.
children
;
// this.$set(rowObj, "children", row.children);
// // 根据下标取临时变量
// var rowObj = this.arr.find(row => row.index === i);
// 赋值
console
.
info
(
"折叠时rowObj数据"
,
rowObj
);
this
.
list
[
i
]
=
rowObj
;
this
.
$forceUpdate
();
console
.
info
(
"塞完数据的row"
,
this
.
list
[
i
]);
}
},
// table表格选中获取数据
...
...
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