Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OP54
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
template admin
OP54
Commits
141299b0
Commit
141299b0
authored
Feb 02, 2023
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表单数据刷新
parent
268fb226
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
2 deletions
+30
-2
form.component.html
form/src/app/form/form.component.html
+1
-1
form.component.ts
form/src/app/form/form.component.ts
+29
-1
No files found.
form/src/app/form/form.component.html
View file @
141299b0
...
...
@@ -183,7 +183,7 @@
<div
style=
"margin-right: 20px;width: 150px;text-align: right;"
>
<span
style=
"line-height: 55px;"
>
文字分组
</span>
</div>
<div
style=
"display: flex; justify-items: center; padding-top: 10px"
>
<div
*
ngIf=
"item.titleGroup.length<item.title.length"
style=
"display: flex; justify-items: center; padding-top: 10px"
>
<button
style=
"margin-bottom: 10px;"
nz-button
nzType=
"default"
(
click
)="
addGroup
(
i
)"
>
<span>
增加分组
</span>
</button>
...
...
form/src/app/form/form.component.ts
View file @
141299b0
...
...
@@ -186,13 +186,41 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
deleteGroup
(
i
,
n
)
{
let
item
=
this
.
picArr
.
list
[
i
];
item
.
titleGroup
.
splice
(
n
,
1
);
let
delArr
=
item
.
titleGroupUseWord
[
n
];
item
.
titleGroupUseWord
.
forEach
((
arr
,
index
)
=>
{
if
(
index
==
n
)
return
;
for
(
let
m
=
0
;
m
<
delArr
.
length
;
m
++
)
{
if
(
delArr
[
m
]
==
0
)
arr
[
m
]
=
0
;
}
})
item
.
titleGroupUseWord
.
splice
(
n
,
1
);
let
lastArr
=
[];
item
.
titleGroupUseWord
.
forEach
((
arr
,
index
)
=>
{
for
(
let
m
=
0
;
m
<
arr
.
length
;
m
++
)
{
if
(
arr
[
m
]
==
1
)
{
lastArr
[
m
]
=
1
;
}
else
{
if
(
lastArr
[
m
]
!=
1
)
{
lastArr
[
m
]
=
0
;
}
}
}
})
item
.
titleGroupUseWord
.
push
(
lastArr
);
if
(
item
.
titleGroup
.
length
==
0
)
item
.
titleGroupUseWord
.
length
=
0
;
this
.
save
();
}
onChoseGroup
(
arr
,
i
,
val
,
item
,
n
)
{
console
.
log
(
arr
);
arr
[
i
]
=
val
;
for
(
let
index
=
0
;
index
<
item
.
title
.
split
(
""
).
length
;
index
++
)
{
if
(
n
==
index
)
continue
;
if
(
n
==
index
)
{
if
(
!
item
.
titleGroupUseWord
[
index
])
item
.
titleGroupUseWord
[
index
]
=
[];
item
.
titleGroupUseWord
[
index
][
i
]
=
0
;
console
.
log
(
item
.
titleGroupUseWord
[
index
])
continue
;
}
if
(
!
item
.
titleGroupUseWord
[
index
])
item
.
titleGroupUseWord
[
index
]
=
[];
item
.
titleGroupUseWord
[
index
][
i
]
=
val
;
}
...
...
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