Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ai-yunshou-vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
AI云守
ai-yunshou-vue
Commits
9f5fb0be
Commit
9f5fb0be
authored
Sep 10, 2024
by
胡占生
🇨🇳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 点位管理修复 树节点回显问题
parent
884b6aa1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
src/views/videoControl/pointControl/index.vue
src/views/videoControl/pointControl/index.vue
+22
-1
No files found.
src/views/videoControl/pointControl/index.vue
View file @
9f5fb0be
...
...
@@ -343,10 +343,31 @@ function createPoint() {
}
/* 新增子区域 */
function
areaMangerAddBefore
(
data
){
areaManger
.
form
.
value
.
parents
=
[
data
.
id
];
const
parentIds
=
findParentIds
(
areaManger
.
list
.
value
,
data
.
id
);
areaManger
.
form
.
value
.
parents
=
parentIds
;
console
.
log
(
data
)
areaManger
.
toAdd
(
data
)
}
function
findParentIds
(
nodes
,
targetId
,
path
=
[],
result
=
[])
{
for
(
let
node
of
nodes
)
{
// 将当前节点的ID添加到路径中
path
.
push
(
node
.
id
);
// 检查是否找到目标节点
if
(
node
.
id
===
targetId
)
{
// 复制当前路径到结果中(因为路径会被后续迭代修改)
result
.
push
(...
path
);
}
// 如果当前节点有子节点,则递归查找
if
(
node
.
children
)
{
findParentIds
(
node
.
children
,
targetId
,
path
,
result
);
}
// 回溯,移除当前节点ID
path
.
pop
();
}
return
result
;
}
function
configProTime
(
data
)
{
aiAlarmPeriodTime
.
getList
({
regionalLocationId
:
data
.
id
});
algorithmManage
.
getDetail
(
data
.
id
).
then
(({
data
})
=>
{
...
...
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