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
4abe372f
Commit
4abe372f
authored
May 16, 2019
by
Chao Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回返键问题
parent
66649675
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
59 additions
and
8 deletions
+59
-8
questionnair/src/app/ask/ask.component.html
+1
-1
questionnair/src/app/ask/ask.component.ts
+22
-2
questionnair/src/app/page2/page2.component.ts
+11
-1
questionnair/src/app/page3/page3.component.ts
+1
-1
questionnair/src/app/page4/page4.component.ts
+11
-1
questionnair/src/app/page5/page5.component.ts
+11
-1
questionnair/src/app/page7/page7.component.ts
+1
-0
questionnair/src/styles.css
+1
-1
No files found.
questionnair/src/app/ask/ask.component.html
View file @
4abe372f
...
...
@@ -79,7 +79,7 @@
<div>
获取家庭分析报告
</div>
</div>
<div
class=
"content_footer"
*
ngIf=
"curPage != 0 && curPage!=16"
>
<div
(
click
)="
reducePage
()"
>
<
</div>
<div
(
click
)="
reducePage
()"
style=
"color: #8a8a8a;"
>
<
</div>
<div
(
click
)="
addPage
()"
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
...
...
questionnair/src/app/ask/ask.component.ts
View file @
4abe372f
...
...
@@ -46,7 +46,10 @@ export class AskComponent implements OnInit {
})
}
reducePage
()
{
// console.log('start', this.curPage)
if
(
this
.
questionInfo
){
this
.
allAnswers
[
this
.
curPage
]
=
this
.
questionInfo
;
this
.
questionInfo
=
null
}
if
(
this
.
curPage
>
0
)
{
const
page2Answer
=
this
.
allAnswers
[
1
]
if
(
page2Answer
){
...
...
@@ -85,6 +88,24 @@ export class AskComponent implements OnInit {
}
else
{
return
}
// if(this.curPage == 6 || this.curPage == 8){
// const page2Answer = this.allAnswers[1]
// const optionId = page2Answer.questions[0].options[0].optionId
// if(optionId==1 || optionId==3){
// if(this.questionInfo['questions'].length>0){
// this.nextBtn = true
// }
// }
// }
// if(this.curPageData['questions'].length == this.questionInfo['questions'].length){
// this.nextBtn = true
// }
console
.
log
(
this
.
questionInfo
)
// if(){
// }
}
filterItems
()
{
return
this
.
allAnswers
.
filter
(
item
=>
{
...
...
@@ -146,7 +167,6 @@ export class AskComponent implements OnInit {
}
setCurPageData
()
{
const
thePateData
=
this
.
allQues
[
this
.
curPage
]
this
.
curPageData
=
thePateData
const
page2Answer
=
this
.
allAnswers
[
1
]
if
(
this
.
curPage
==
2
)
{
...
...
questionnair/src/app/page2/page2.component.ts
View file @
4abe372f
...
...
@@ -50,7 +50,17 @@ export class Page2Component implements OnInit {
}
options
.
forEach
(
option
=>
{
if
(
option
[
'selected'
])
{
this
.
selectedObj
=
option
this
.
selectedObj
=
option
;
const
ret
=
{
pageId
:
this
.
curPageData
[
'pageId'
],
questions
:
[
{
questionId
:
this
.
curPageData
[
'questions'
][
0
].
questionId
,
options
:
[
this
.
selectedObj
]
}
]
}
this
.
getAllAnswer
.
emit
(
ret
);
}
})
}
...
...
questionnair/src/app/page3/page3.component.ts
View file @
4abe372f
...
...
@@ -57,7 +57,7 @@ export class Page3Component implements OnInit {
//当前选中项
this
.
curPageData
[
'questions'
][
this
.
curQuesIndex
][
'name'
]
=
options
.
optionName
this
.
selectedNum
=
optionId
}
addChild
()
{
...
...
questionnair/src/app/page4/page4.component.ts
View file @
4abe372f
...
...
@@ -45,7 +45,17 @@ export class Page4Component implements OnInit {
}
options
.
forEach
(
option
=>
{
if
(
option
[
'selected'
])
{
this
.
selectedObj
=
option
this
.
selectedObj
=
option
;
const
ret
=
{
pageId
:
this
.
curPageData
[
'pageId'
],
questions
:
[
{
questionId
:
this
.
curPageData
[
'questions'
][
0
].
questionId
,
options
:
[
this
.
selectedObj
]
}
]
}
this
.
getAllAnswer
.
emit
(
ret
);
}
})
}
...
...
questionnair/src/app/page5/page5.component.ts
View file @
4abe372f
...
...
@@ -44,7 +44,17 @@ export class Page5Component implements OnInit {
}
options
.
forEach
(
option
=>
{
if
(
option
[
'selected'
])
{
this
.
selectedObj
=
option
this
.
selectedObj
=
option
;
const
ret
=
{
pageId
:
this
.
curPageData
[
'pageId'
],
questions
:
[
{
questionId
:
this
.
curPageData
[
'questions'
][
0
].
questionId
,
options
:
[
this
.
selectedObj
]
}
]
}
this
.
getAllAnswer
.
emit
(
ret
);
}
})
}
...
...
questionnair/src/app/page7/page7.component.ts
View file @
4abe372f
...
...
@@ -53,6 +53,7 @@ export class Page7Component implements OnInit {
if
(
option
[
'selected'
])
{
// console.log(this.selectedObj)
this
.
selectedObj
[
question
[
'questionId'
]]
=
option
}
})
})
...
...
questionnair/src/styles.css
View file @
4abe372f
...
...
@@ -95,7 +95,7 @@ ul li,ol li{
.content_footer
div
{
text-align
:
center
;
color
:
#ec2d37
;
font-size
:
2
6
px
;
font-size
:
2
0
px
;
height
:
60px
;
line-height
:
60px
;
font-weight
:
bold
;
...
...
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