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
9901c22c
Commit
9901c22c
authored
May 16, 2019
by
Sweet Zhang
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
09cb8c21
4abe372f
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
11 deletions
+50
-11
questionnair/src/app/ask/ask.component.html
+1
-1
questionnair/src/app/ask/ask.component.ts
+24
-6
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 @
9901c22c
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
<div>
获取家庭分析报告
</div>
<div>
获取家庭分析报告
</div>
</div>
</div>
<div
class=
"content_footer"
*
ngIf=
"curPage != 0 && curPage!=16"
>
<div
class=
"content_footer"
*
ngIf=
"curPage != 0 && curPage!=16"
>
<div
(
click
)="
reducePage
()"
>
<
</div>
<div
(
click
)="
reducePage
()"
style=
"color: #8a8a8a;"
>
<
</div>
<div
<div
(
click
)="
addPage
()"
(
click
)="
addPage
()"
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
...
...
questionnair/src/app/ask/ask.component.ts
View file @
9901c22c
...
@@ -46,7 +46,10 @@ export class AskComponent implements OnInit {
...
@@ -46,7 +46,10 @@ export class AskComponent implements OnInit {
})
})
}
}
reducePage
()
{
reducePage
()
{
// console.log('start', this.curPage)
if
(
this
.
questionInfo
){
this
.
allAnswers
[
this
.
curPage
]
=
this
.
questionInfo
;
this
.
questionInfo
=
null
}
if
(
this
.
curPage
>
0
)
{
if
(
this
.
curPage
>
0
)
{
const
page2Answer
=
this
.
allAnswers
[
1
]
const
page2Answer
=
this
.
allAnswers
[
1
]
if
(
page2Answer
){
if
(
page2Answer
){
...
@@ -85,6 +88,24 @@ export class AskComponent implements OnInit {
...
@@ -85,6 +88,24 @@ export class AskComponent implements OnInit {
}
else
{
}
else
{
return
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
()
{
filterItems
()
{
return
this
.
allAnswers
.
filter
(
item
=>
{
return
this
.
allAnswers
.
filter
(
item
=>
{
...
@@ -97,7 +118,7 @@ export class AskComponent implements OnInit {
...
@@ -97,7 +118,7 @@ export class AskComponent implements OnInit {
}
}
if
(
this
.
questionInfo
){
if
(
this
.
questionInfo
){
this
.
allAnswers
[
this
.
curPage
]
=
this
.
questionInfo
;
this
.
allAnswers
[
this
.
curPage
]
=
this
.
questionInfo
;
this
.
questionInfo
=
null
;
this
.
questionInfo
=
null
}
}
if
(
this
.
curPage
<
16
)
{
if
(
this
.
curPage
<
16
)
{
//判断当前页是否有答案
//判断当前页是否有答案
...
@@ -109,7 +130,6 @@ export class AskComponent implements OnInit {
...
@@ -109,7 +130,6 @@ export class AskComponent implements OnInit {
)
{
)
{
this
.
curPage
++
this
.
curPage
++
this
.
setCurPageData
()
this
.
setCurPageData
()
}
}
}
else
{
}
else
{
this
.
curPage
=
0
this
.
curPage
=
0
...
@@ -123,7 +143,7 @@ export class AskComponent implements OnInit {
...
@@ -123,7 +143,7 @@ export class AskComponent implements OnInit {
pages
:
this
.
filterItems
()
pages
:
this
.
filterItems
()
}
}
}
}
console
.
log
(
answerParam
)
if
(
this
.
curPage
==
16
)
{
if
(
this
.
curPage
==
16
)
{
this
.
commonService
.
saveCustomerAnwers
(
answerParam
).
then
(
res
=>
{
this
.
commonService
.
saveCustomerAnwers
(
answerParam
).
then
(
res
=>
{
// console.log(res)
// console.log(res)
...
@@ -132,7 +152,6 @@ export class AskComponent implements OnInit {
...
@@ -132,7 +152,6 @@ export class AskComponent implements OnInit {
}
}
getAllAnswer
(
e
)
{
getAllAnswer
(
e
)
{
this
.
questionInfo
=
e
;
this
.
questionInfo
=
e
;
console
.
log
(
e
)
if
(
this
.
curPage
==
6
||
this
.
curPage
==
8
){
if
(
this
.
curPage
==
6
||
this
.
curPage
==
8
){
const
page2Answer
=
this
.
allAnswers
[
1
]
const
page2Answer
=
this
.
allAnswers
[
1
]
const
optionId
=
page2Answer
.
questions
[
0
].
options
[
0
].
optionId
const
optionId
=
page2Answer
.
questions
[
0
].
options
[
0
].
optionId
...
@@ -148,7 +167,6 @@ export class AskComponent implements OnInit {
...
@@ -148,7 +167,6 @@ export class AskComponent implements OnInit {
}
}
setCurPageData
()
{
setCurPageData
()
{
const
thePateData
=
this
.
allQues
[
this
.
curPage
]
const
thePateData
=
this
.
allQues
[
this
.
curPage
]
this
.
curPageData
=
thePateData
this
.
curPageData
=
thePateData
const
page2Answer
=
this
.
allAnswers
[
1
]
const
page2Answer
=
this
.
allAnswers
[
1
]
if
(
this
.
curPage
==
2
)
{
if
(
this
.
curPage
==
2
)
{
...
...
questionnair/src/app/page3/page3.component.ts
View file @
9901c22c
...
@@ -57,7 +57,7 @@ export class Page3Component implements OnInit {
...
@@ -57,7 +57,7 @@ export class Page3Component implements OnInit {
//当前选中项
//当前选中项
this
.
curPageData
[
'questions'
][
this
.
curQuesIndex
][
'name'
]
=
this
.
curPageData
[
'questions'
][
this
.
curQuesIndex
][
'name'
]
=
options
.
optionName
options
.
optionName
this
.
selectedNum
=
optionId
}
}
addChild
()
{
addChild
()
{
...
...
questionnair/src/app/page4/page4.component.ts
View file @
9901c22c
...
@@ -45,7 +45,17 @@ export class Page4Component implements OnInit {
...
@@ -45,7 +45,17 @@ export class Page4Component implements OnInit {
}
}
options
.
forEach
(
option
=>
{
options
.
forEach
(
option
=>
{
if
(
option
[
'selected'
])
{
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 @
9901c22c
...
@@ -44,7 +44,17 @@ export class Page5Component implements OnInit {
...
@@ -44,7 +44,17 @@ export class Page5Component implements OnInit {
}
}
options
.
forEach
(
option
=>
{
options
.
forEach
(
option
=>
{
if
(
option
[
'selected'
])
{
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 @
9901c22c
...
@@ -53,6 +53,7 @@ export class Page7Component implements OnInit {
...
@@ -53,6 +53,7 @@ export class Page7Component implements OnInit {
if
(
option
[
'selected'
])
{
if
(
option
[
'selected'
])
{
// console.log(this.selectedObj)
// console.log(this.selectedObj)
this
.
selectedObj
[
question
[
'questionId'
]]
=
option
this
.
selectedObj
[
question
[
'questionId'
]]
=
option
}
}
})
})
})
})
...
...
questionnair/src/styles.css
View file @
9901c22c
...
@@ -95,7 +95,7 @@ ul li,ol li{
...
@@ -95,7 +95,7 @@ ul li,ol li{
.content_footer
div
{
.content_footer
div
{
text-align
:
center
;
text-align
:
center
;
color
:
#ec2d37
;
color
:
#ec2d37
;
font-size
:
2
6
px
;
font-size
:
2
0
px
;
height
:
60px
;
height
:
60px
;
line-height
:
60px
;
line-height
:
60px
;
font-weight
:
bold
;
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