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
c2a98a9d
Commit
c2a98a9d
authored
May 15, 2019
by
Chao Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
多选问题
parent
aa5efb33
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
14 deletions
+32
-14
questionnair/src/app/ask/ask.component.ts
+26
-12
questionnair/src/app/page11/page11.component.ts
+5
-2
questionnair/src/app/page3/page3.component.html
+1
-0
No files found.
questionnair/src/app/ask/ask.component.ts
View file @
c2a98a9d
...
...
@@ -7,17 +7,19 @@ import { Options } from 'selenium-webdriver/chrome'
styleUrls
:
[
'./ask.component.css'
]
})
export
class
AskComponent
implements
OnInit
{
allQues
:
Array
<
any
>
curPage
:
number
totalPage
:
number
curQues
:
string
curPageData
:
Object
allAnswers
:
Array
<
any
>
isShowChildAgeBtn
:
boolean
hasMate
:
boolean
allQues
:
Array
<
any
>
;
curPage
:
number
;
totalPage
:
number
;
curQues
:
string
;
curPageData
:
Object
;
allAnswers
:
Array
<
any
>
;
isShowChildAgeBtn
:
boolean
;
hasMate
:
boolean
;
//获取省份
provinceList
:
Array
<
any
>
provinceList
:
Array
<
any
>
;
nextBtn
:
boolean
;
// 暂存问题也信息
questionInfo
:
any
;
constructor
(
private
commonService
:
CommonService
)
{}
ngOnInit
()
{
...
...
@@ -90,6 +92,8 @@ export class AskComponent implements OnInit {
if
(
this
.
nextBtn
===
false
){
return
;
}
console
.
log
(
this
.
questionInfo
)
this
.
allAnswers
[
this
.
curPage
]
=
this
.
questionInfo
;
if
(
this
.
curPage
<
16
)
{
//判断当前页是否有答案
if
(
...
...
@@ -120,13 +124,23 @@ export class AskComponent implements OnInit {
}
}
getAllAnswer
(
e
)
{
this
.
allAnswers
[
this
.
curPage
]
=
e
// console.log(this.allAnswers);
let
result
=
false
;
this
.
questionInfo
=
e
;
console
.
log
(
e
)
const
questions
=
e
.
questions
;
if
(
questions
.
length
>
0
){
for
(
let
i
=
0
;
i
<
questions
.
length
;
i
++
){
let
options
=
questions
[
i
].
options
;
if
(
options
.
length
>
0
){
result
=
true
;
}
}
}
if
(
this
.
curPage
<
16
)
{
//判断当前页是否有答案
if
(
this
.
curPage
==
0
||
this
.
allAnswers
[
this
.
curPage
]
||
result
||
this
.
curPage
==
5
||
this
.
curPage
==
9
)
{
...
...
questionnair/src/app/page11/page11.component.ts
View file @
c2a98a9d
...
...
@@ -107,8 +107,11 @@ export class Page11Component implements OnInit {
// }
// questions[0]['options'].forEach(option => {
// if(option['selected']){
// // this.allOptions[questions] = option
// console.log(this.allOptions)
// console.log(questions)
// this.allOptions = questions[0]['options']
// // console.log(questions[0]['options'])
// // console.log(this.allOptions[question])
// }
// });
}
...
...
questionnair/src/app/page3/page3.component.html
View file @
c2a98a9d
...
...
@@ -16,6 +16,7 @@
<div
class=
"icon"
>
+
</div>
<div
data-toggle=
"modal"
>
增加孩子年龄
</div>
</div>
<div>
{{result}}
</div>
<div
class=
"toastWrapper toast"
*
ngIf=
"isShow"
>
<div
class=
"toastContent"
>
<ul>
...
...
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