Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
allCampaign
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
allCampaign
Commits
aba6a967
Commit
aba6a967
authored
May 21, 2019
by
Chao Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
age selected fix
parent
9fc8d2ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
questionnaire/src/app/age/age.component.ts
+7
-1
No files found.
questionnaire/src/app/age/age.component.ts
View file @
aba6a967
...
@@ -40,7 +40,6 @@ export class AgeComponent implements OnInit {
...
@@ -40,7 +40,6 @@ export class AgeComponent implements OnInit {
}
}
ngOnInit
()
{
ngOnInit
()
{
this
.
lastQuestions
=
this
.
commonService
.
todosCopy
.
filter
(
item
=>
item
.
pageId
==
3
).
pop
();
this
.
commonService
.
surveyInfo
().
then
(
res
=>
{
this
.
commonService
.
surveyInfo
().
then
(
res
=>
{
this
.
curPageData
=
res
[
'data'
][
'survey'
][
'pages'
].
filter
(
item
=>
item
.
pageId
===
3
).
pop
();
this
.
curPageData
=
res
[
'data'
][
'survey'
][
'pages'
].
filter
(
item
=>
item
.
pageId
===
3
).
pop
();
this
.
pageAnswers
.
pageId
=
this
.
curPageData
[
'pageId'
];
this
.
pageAnswers
.
pageId
=
this
.
curPageData
[
'pageId'
];
...
@@ -73,6 +72,13 @@ export class AgeComponent implements OnInit {
...
@@ -73,6 +72,13 @@ export class AgeComponent implements OnInit {
// 如果有孩子,需要考虑是孩子几的年龄
// 如果有孩子,需要考虑是孩子几的年龄
if
(
this
.
curPageData
[
'questions'
][
j
][
'questionSubId'
]
==
this
.
curQues
.
questionSubId
)
{
if
(
this
.
curPageData
[
'questions'
][
j
][
'questionSubId'
]
==
this
.
curQues
.
questionSubId
)
{
this
.
curPageData
[
'questions'
][
j
].
optionName
=
options
.
optionName
;
this
.
curPageData
[
'questions'
][
j
].
optionName
=
options
.
optionName
;
for
(
let
m
=
0
;
m
<
this
.
curPageData
[
'questions'
][
j
].
options
.
length
;
m
++
)
{
if
(
this
.
curPageData
[
'questions'
][
j
].
options
[
m
].
optionId
==
options
.
optionId
)
{
this
.
curPageData
[
'questions'
][
j
].
options
[
m
][
'selected'
]
=
true
;
}
else
{
this
.
curPageData
[
'questions'
][
j
].
options
[
m
][
'selected'
]
=
false
;
}
}
}
}
}
}
}
}
...
...
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