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
e7ca62de
Commit
e7ca62de
authored
May 21, 2019
by
Chao Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
job页selected
parent
5a811422
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
5 deletions
+12
-5
questionnaire/src/app/age/age.component.ts
+1
-0
questionnaire/src/app/family/family.component.css
+2
-1
questionnaire/src/app/job/job.component.html
+1
-1
questionnaire/src/app/job/job.component.ts
+8
-3
No files found.
questionnaire/src/app/age/age.component.ts
View file @
e7ca62de
...
@@ -88,6 +88,7 @@ export class AgeComponent implements OnInit {
...
@@ -88,6 +88,7 @@ export class AgeComponent implements OnInit {
// console.log(this.curPageData);
// console.log(this.curPageData);
this
.
commonService
.
addAnswer
(
this
.
pageAnswers
);
this
.
commonService
.
addAnswer
(
this
.
pageAnswers
);
this
.
closeToast
();
this
.
closeToast
();
console
.
log
(
this
.
pageAnswers
)
}
}
showToast
(
question
,
idx
)
{
showToast
(
question
,
idx
)
{
...
...
questionnaire/src/app/family/family.component.css
View file @
e7ca62de
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
max-width
:
55%
;
max-width
:
55%
;
}
}
.option_item
li
img
.selected
{
.option_item
li
img
.selected
{
border
:
1
px
solid
#ff0000
;
border
:
2
px
solid
#ff0000
;
border-radius
:
50%
;
border-radius
:
50%
;
}
}
\ No newline at end of file
questionnaire/src/app/job/job.component.html
View file @
e7ca62de
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<div
class=
"questionTitle"
>
{{ this.curPageData?.pageName }}
</div>
<div
class=
"questionTitle"
>
{{ this.curPageData?.pageName }}
</div>
<ul
class=
"jobContent"
>
<ul
class=
"jobContent"
>
<li
<li
[
ngClass
]="{
selected:
selectedOptionId =
=
options
.
optionId
}"
[
ngClass
]="{
selected:
options
['
selected
']
}"
*
ngFor=
"let options of this.curPageData?.questions[0].options"
*
ngFor=
"let options of this.curPageData?.questions[0].options"
(
click
)="
selectedJob
(
options
)"
(
click
)="
selectedJob
(
options
)"
>
>
...
...
questionnaire/src/app/job/job.component.ts
View file @
e7ca62de
...
@@ -58,9 +58,14 @@ export class JobComponent implements OnInit {
...
@@ -58,9 +58,14 @@ export class JobComponent implements OnInit {
}
}
selectedJob
(
option
)
{
selectedJob
(
option
)
{
console
.
log
(
this
.
curPageData
[
'pageId'
])
const
options
=
this
.
curPageData
[
'questions'
][
0
][
'options'
]
this
.
selectedOptionId
=
option
.
optionId
;
for
(
let
i
=
0
;
i
<
options
.
length
;
i
++
)
{
option
.
selected
=
true
;
if
(
option
[
'optionId'
]
==
options
[
i
][
'optionId'
])
{
options
[
i
][
'selected'
]
=
true
;
}
else
{
options
[
i
][
'selected'
]
=
false
;
}
}
this
.
pageAnswers
=
{
this
.
pageAnswers
=
{
pageId
:
this
.
curPageData
[
'pageId'
],
pageId
:
this
.
curPageData
[
'pageId'
],
questions
:
[{
questions
:
[{
...
...
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