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
fa4d8075
Commit
fa4d8075
authored
May 22, 2019
by
Chao Sun
Browse files
Options
Browse Files
Download
Plain Diff
合并
parents
d2f1cc40
02d06881
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
126 additions
and
64 deletions
+126
-64
questionnaire/src/app/age/age.component.ts
+5
-3
questionnaire/src/app/children-health/children-health.component.html
+1
-1
questionnaire/src/app/children-health/children-health.component.ts
+8
-6
questionnaire/src/app/common.service.ts
+18
-0
questionnaire/src/app/disease/disease.component.html
+1
-1
questionnaire/src/app/disease/disease.component.ts
+5
-0
questionnaire/src/app/family/family.component.html
+1
-1
questionnaire/src/app/family/family.component.ts
+27
-38
questionnaire/src/app/health/health.component.html
+1
-1
questionnaire/src/app/health/health.component.ts
+5
-0
questionnaire/src/app/income/income.component.html
+1
-1
questionnaire/src/app/income/income.component.ts
+5
-0
questionnaire/src/app/job/job.component.html
+1
-1
questionnaire/src/app/job/job.component.ts
+4
-2
questionnaire/src/app/live/live.component.html
+2
-2
questionnaire/src/app/live/live.component.ts
+5
-0
questionnaire/src/app/loan/loan.component.html
+3
-3
questionnaire/src/app/loan/loan.component.ts
+5
-0
questionnaire/src/app/smoking/smoking.component.html
+1
-1
questionnaire/src/app/smoking/smoking.component.ts
+5
-0
questionnaire/src/app/social-security/social-security.component.html
+1
-1
questionnaire/src/app/social-security/social-security.component.ts
+5
-0
questionnaire/src/app/transit1/transit1.component.html
+1
-1
questionnaire/src/app/transit1/transit1.component.ts
+7
-0
questionnaire/src/app/transit2/transit2.component.html
+1
-1
questionnaire/src/app/transit2/transit2.component.ts
+7
-0
No files found.
questionnaire/src/app/age/age.component.ts
View file @
fa4d8075
...
@@ -41,6 +41,7 @@ export class AgeComponent implements OnInit {
...
@@ -41,6 +41,7 @@ export class AgeComponent implements OnInit {
}
}
ngOnInit
()
{
ngOnInit
()
{
console
.
log
(
this
.
commonService
.
todosCopy
)
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'
];
...
@@ -161,9 +162,10 @@ export class AgeComponent implements OnInit {
...
@@ -161,9 +162,10 @@ export class AgeComponent implements OnInit {
}
else
{
}
else
{
return
;
return
;
}
}
}
}
before
(){
history
.
go
(
-
1
);
// 上一步
before
()
{
this
.
commonService
.
before
();
}
}
}
}
questionnaire/src/app/children-health/children-health.component.html
View file @
fa4d8075
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
</ul>
</ul>
</div>
</div>
<div
class=
"content_footer"
>
<div
class=
"content_footer"
>
<div
style=
"color: #8a8a8a;"
>
<
</div>
<div
style=
"color: #8a8a8a;"
(
click
)="
before
()"
>
<
</div>
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
(
click
)="
next
()"
>
下一步
</div>
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
(
click
)="
next
()"
>
下一步
</div>
</div>
</div>
</div>
</div>
...
...
questionnaire/src/app/children-health/children-health.component.ts
View file @
fa4d8075
...
@@ -75,12 +75,8 @@ export class ChildrenHealthComponent implements OnInit {
...
@@ -75,12 +75,8 @@ export class ChildrenHealthComponent implements OnInit {
};
};
// console.log(this.pageAnswers);
// console.log(this.pageAnswers);
// console.log(this.curPageData)
// console.log(this.curPageData)
if
(
this
.
curPageData
[
'questions'
].
length
==
this
.
pageAnswers
.
questions
.
length
)
{
if
(
this
.
pageAnswers
.
questions
.
every
(
item
=>
item
.
options
.
length
>
0
))
{
if
(
this
.
pageAnswers
.
questions
.
every
(
item
=>
item
.
options
.
length
>
0
))
{
this
.
nextBtn
=
true
;
this
.
nextBtn
=
true
;
}
else
{
this
.
nextBtn
=
false
;
}
}
else
{
}
else
{
this
.
nextBtn
=
false
;
this
.
nextBtn
=
false
;
}
}
...
@@ -129,6 +125,7 @@ export class ChildrenHealthComponent implements OnInit {
...
@@ -129,6 +125,7 @@ export class ChildrenHealthComponent implements OnInit {
type
:
this
.
type
type
:
this
.
type
}
}
});
});
this
.
nextBtn
=
false
;
this
.
surveyInfo
();
this
.
surveyInfo
();
}
else
{
}
else
{
this
.
router
.
navigate
([
'/disease'
],
{
queryParams
:
{
type
:
this
.
type
}});
this
.
router
.
navigate
([
'/disease'
],
{
queryParams
:
{
type
:
this
.
type
}});
...
@@ -138,4 +135,9 @@ export class ChildrenHealthComponent implements OnInit {
...
@@ -138,4 +135,9 @@ export class ChildrenHealthComponent implements OnInit {
}
}
}
}
// 上一步
before
()
{
this
.
commonService
.
before
();
}
}
}
questionnaire/src/app/common.service.ts
View file @
fa4d8075
...
@@ -132,6 +132,24 @@ export class CommonService {
...
@@ -132,6 +132,24 @@ export class CommonService {
return
this
;
return
this
;
}
}
/**
* 删除所有答案
* @returns {Array<any>}
*/
remove
()
{
this
.
todos
=
[];
sessionStorage
.
removeItem
(
'todos'
);
this
.
todosSource
.
next
(
this
.
todos
);
}
/**
* 返回上一页
* @returns {Array<any>}
*/
before
()
{
history
.
go
(
-
1
);
}
get
todosCopy
()
{
get
todosCopy
()
{
return
this
.
todos
;
return
this
.
todos
;
}
}
...
...
questionnaire/src/app/disease/disease.component.html
View file @
fa4d8075
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
</ul>
</ul>
</div>
</div>
<div
class=
"content_footer"
>
<div
class=
"content_footer"
>
<div
style=
"color: #8a8a8a;"
>
<
</div>
<div
style=
"color: #8a8a8a;"
(
click
)="
before
()"
>
<
</div>
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
(
click
)="
next
()"
>
下一步
</div>
(
click
)="
next
()"
>
下一步
</div>
</div>
</div>
...
...
questionnaire/src/app/disease/disease.component.ts
View file @
fa4d8075
...
@@ -159,4 +159,9 @@ export class DiseaseComponent implements OnInit {
...
@@ -159,4 +159,9 @@ export class DiseaseComponent implements OnInit {
return
return
}
}
}
}
// 上一步
before
()
{
this
.
commonService
.
before
();
}
}
}
questionnaire/src/app/family/family.component.html
View file @
fa4d8075
...
@@ -14,6 +14,6 @@
...
@@ -14,6 +14,6 @@
</div>
</div>
</div>
</div>
<div
class=
"content_footer"
>
<div
class=
"content_footer"
>
<div
style=
"color: #8a8a8a;"
>
<
</div>
<div
style=
"color: #8a8a8a;"
(
click
)="
before
()"
>
<
</div>
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
(
click
)="
next
()"
>
下一步
</div>
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
(
click
)="
next
()"
>
下一步
</div>
</div>
</div>
questionnaire/src/app/family/family.component.ts
View file @
fa4d8075
...
@@ -12,9 +12,11 @@ export class FamilyComponent implements OnInit {
...
@@ -12,9 +12,11 @@ export class FamilyComponent implements OnInit {
selectedOptionId
:
any
;
selectedOptionId
:
any
;
// 上一次的答案
// 上一次的答案
lastQuestions
:
Array
<
any
>
;
lastQuestions
:
Array
<
any
>
;
// 上一次选择的optionId
lastSelectedOptionId
:
any
;
nextBtn
:
boolean
=
false
;
nextBtn
:
boolean
=
false
;
Obj
:
Object
=
{}
targetObj
:
any
=
{};
targetObj
:
Object
=
{}
constructor
(
private
commonService
:
CommonService
,
private
router
:
Router
)
{
constructor
(
private
commonService
:
CommonService
,
private
router
:
Router
)
{
this
.
pageAnswers
=
{
this
.
pageAnswers
=
{
...
@@ -31,48 +33,33 @@ export class FamilyComponent implements OnInit {
...
@@ -31,48 +33,33 @@ export class FamilyComponent implements OnInit {
this
.
lastQuestions
=
this
.
commonService
.
todosCopy
.
filter
(
item
=>
item
.
pageId
==
2
).
pop
();
this
.
lastQuestions
=
this
.
commonService
.
todosCopy
.
filter
(
item
=>
item
.
pageId
==
2
).
pop
();
this
.
commonService
.
surveyInfo
().
then
(
res
=>
{
this
.
commonService
.
surveyInfo
().
then
(
res
=>
{
this
.
curPageData
=
res
[
'data'
][
'survey'
][
'pages'
].
filter
(
item
=>
item
.
pageId
===
2
).
pop
();
this
.
curPageData
=
res
[
'data'
][
'survey'
][
'pages'
].
filter
(
item
=>
item
.
pageId
===
2
).
pop
();
console
.
log
(
this
.
lastQuestions
)
if
(
this
.
lastQuestions
)
{
console
.
log
(
this
.
curPageData
)
this
.
lastSelectedOptionId
=
this
.
lastQuestions
[
'questions'
][
'0'
][
'options'
][
'0'
].
optionId
;
for
(
let
i
=
0
;
i
<
this
.
lastQuestions
[
'questions'
].
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
lastQuestions
[
'questions'
].
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
this
.
curPageData
[
'questions'
].
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
this
.
curPageData
[
'questions'
].
length
;
j
++
)
{
if
(
this
.
lastQuestions
[
'questions'
][
i
].
questionId
==
this
.
curPageData
[
'questions'
][
j
].
questionId
)
{
if
(
this
.
lastQuestions
[
'questions'
][
i
].
questionId
==
this
.
curPageData
[
'questions'
][
j
].
questionId
)
{
this
.
lastQuestions
[
'questions'
][
i
][
'options'
].
forEach
(
option
=>
{
this
.
lastQuestions
[
'questions'
][
i
][
'options'
].
forEach
(
option
=>
{
if
(
Object
.
keys
(
option
).
indexOf
(
'optionId'
)
>-
1
){
if
(
Object
.
keys
(
option
).
indexOf
(
'optionId'
)
>
-
1
)
{
this
.
targetObj
=
option
this
.
targetObj
=
option
;
}
}
// this.curPageData['questions'][j]['options'].forEach(option=>{
console
.
log
(
this
.
targetObj
)
// if(Object.keys(option).indexOf('optionId')>-1){
this
.
selectedFamily
(
this
.
targetObj
);
// this.Obj = option
});
// }
}
// })
// this.Obj['optionId'] = this.targetObj['optionId']
console
.
log
(
this
.
targetObj
)
this
.
selectedFamily
(
this
.
targetObj
);
});
}
}
}
}
}
}
// for (let i = 0; i < this.lastQuestions['questions'].length; i++) {
// for (let j = 0; j < this.curPageData['questions'].length; j++) {
// if (this.lastQuestions['questions'][i].questionId == this.curPageData['questions'][j].questionId) {
// for (let m = 0; m < this.lastQuestions['questions'][i].options.length; m++) {
// for (let n = 0; n < this.curPageData['questions'][i].options.length; n++) {
// if (this.lastQuestions['questions'][i].options[m].optionId == this.curPageData['questions'][i].options[n].optionId) {
// this.selectedFamily(this.curPageData['questions'][i].options[n]);
// }
// }
// }
// }
// }
// }
// console.log(this.curPageData)
});
});
}
}
// 选择家庭结构
// 选择家庭结构
selectedFamily
(
option
)
{
selectedFamily
(
option
)
{
this
.
selectedOptionId
=
option
.
optionId
;
this
.
selectedOptionId
=
option
.
optionId
;
// 如果选择的跟上一次的家庭结构不一样,那么将以前的答案清空
if
(
this
.
lastSelectedOptionId
!=
this
.
selectedOptionId
)
{
this
.
commonService
.
remove
();
}
const
options
=
this
.
curPageData
[
'questions'
][
0
][
'options'
];
const
options
=
this
.
curPageData
[
'questions'
][
0
][
'options'
];
for
(
let
i
=
0
;
i
<
options
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
options
.
length
;
i
++
)
{
if
(
option
[
'optionId'
]
==
options
[
i
][
'optionId'
])
{
if
(
option
[
'optionId'
]
==
options
[
i
][
'optionId'
])
{
...
@@ -91,9 +78,7 @@ export class FamilyComponent implements OnInit {
...
@@ -91,9 +78,7 @@ export class FamilyComponent implements OnInit {
};
};
this
.
commonService
.
addAnswer
(
this
.
pageAnswers
);
this
.
commonService
.
addAnswer
(
this
.
pageAnswers
);
// console.log(this.pageAnswers);
// console.log(this.pageAnswers);
if
(
this
.
pageAnswers
.
questions
[
0
].
options
.
every
((
item
)
=>
{
if
(
this
.
curPageData
[
'questions'
].
length
==
this
.
pageAnswers
.
questions
.
length
)
{
return
item
.
selected
;
}))
{
this
.
nextBtn
=
true
;
this
.
nextBtn
=
true
;
}
else
{
}
else
{
this
.
nextBtn
=
false
;
this
.
nextBtn
=
false
;
...
@@ -107,6 +92,10 @@ export class FamilyComponent implements OnInit {
...
@@ -107,6 +92,10 @@ export class FamilyComponent implements OnInit {
}
else
{
}
else
{
return
;
return
;
}
}
}
// 上一步
before
()
{
this
.
commonService
.
before
();
}
}
}
}
questionnaire/src/app/health/health.component.html
View file @
fa4d8075
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
</ul>
</ul>
</div>
</div>
<div
class=
"content_footer"
>
<div
class=
"content_footer"
>
<div
style=
"color: #8a8a8a;"
>
<
</div>
<div
style=
"color: #8a8a8a;"
(
click
)="
before
()"
>
<
</div>
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
(
click
)="
next
()"
>
下一步
</div>
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
(
click
)="
next
()"
>
下一步
</div>
</div>
</div>
</div>
</div>
...
...
questionnaire/src/app/health/health.component.ts
View file @
fa4d8075
...
@@ -168,4 +168,9 @@ export class HealthComponent implements OnInit {
...
@@ -168,4 +168,9 @@ export class HealthComponent implements OnInit {
}
}
}
}
// 上一步
before
()
{
this
.
commonService
.
before
();
}
}
}
questionnaire/src/app/income/income.component.html
View file @
fa4d8075
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
</div>
</div>
</div>
</div>
<div
class=
"content_footer"
>
<div
class=
"content_footer"
>
<div
style=
"color: #8a8a8a;"
>
<
</div>
<div
style=
"color: #8a8a8a;"
(
click
)="
before
()"
>
<
</div>
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
(
click
)="
next
()"
>
下一步
</div>
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
(
click
)="
next
()"
>
下一步
</div>
</div>
</div>
</div>
</div>
...
...
questionnaire/src/app/income/income.component.ts
View file @
fa4d8075
...
@@ -101,4 +101,9 @@ export class IncomeComponent implements OnInit {
...
@@ -101,4 +101,9 @@ export class IncomeComponent implements OnInit {
return
;
return
;
}
}
}
}
// 上一步
before
()
{
this
.
commonService
.
before
();
}
}
}
questionnaire/src/app/job/job.component.html
View file @
fa4d8075
...
@@ -15,6 +15,6 @@
...
@@ -15,6 +15,6 @@
</div>
</div>
</div>
</div>
<div
class=
"content_footer"
>
<div
class=
"content_footer"
>
<div
style=
"color: #8a8a8a;"
>
<
</div>
<div
style=
"color: #8a8a8a;"
(
click
)="
before
()"
>
<
</div>
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
(
click
)="
next
()"
>
下一步
</div>
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
(
click
)="
next
()"
>
下一步
</div>
</div>
</div>
questionnaire/src/app/job/job.component.ts
View file @
fa4d8075
...
@@ -102,7 +102,9 @@ export class JobComponent implements OnInit {
...
@@ -102,7 +102,9 @@ export class JobComponent implements OnInit {
}
else
{
}
else
{
return
;
return
;
}
}
}
// 上一步
before
()
{
this
.
commonService
.
before
();
}
}
}
}
questionnaire/src/app/live/live.component.html
View file @
fa4d8075
...
@@ -18,13 +18,13 @@
...
@@ -18,13 +18,13 @@
</div>
</div>
</div>
</div>
<div
class=
"content_footer"
>
<div
class=
"content_footer"
>
<div
style=
"color: #8a8a8a;"
>
<
</div>
<div
style=
"color: #8a8a8a;"
(
click
)="
before
()"
>
<
</div>
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
(
click
)="
next
()"
>
下一步
</div>
(
click
)="
next
()"
>
下一步
</div>
</div>
</div>
</div>
</div>
<div
class=
"toastWrapper toast"
*
ngIf=
"isShow"
(
click
)="
closeToast
();"
>
<div
class=
"toastWrapper toast"
*
ngIf=
"isShow"
(
click
)="
closeToast
();"
>
</div>
</div>
<div
class=
"toastContent city"
*
ngIf=
"isShow"
>
<div
class=
"toastContent city"
*
ngIf=
"isShow"
>
<div
class=
"live"
>
所在地区
</div>
<div
class=
"live"
>
所在地区
</div>
...
...
questionnaire/src/app/live/live.component.ts
View file @
fa4d8075
...
@@ -126,4 +126,9 @@ export class LiveComponent implements OnInit {
...
@@ -126,4 +126,9 @@ export class LiveComponent implements OnInit {
return
;
return
;
}
}
}
}
// 上一步
before
()
{
this
.
commonService
.
before
();
}
}
}
questionnaire/src/app/loan/loan.component.html
View file @
fa4d8075
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
</div>
</div>
<ul
class=
"income"
>
<ul
class=
"income"
>
<li
<li
[
ngClass
]="{
selected:
options
['
selected
']
==
true
}"
[
ngClass
]="{
selected:
options
['
selected
']
==
true
}"
*
ngFor=
"let options of this.curPageData?.questions[0]['options']"
*
ngFor=
"let options of this.curPageData?.questions[0]['options']"
(
click
)="
selectedLoan
(
this
.
curPageData
?.
questions
[
0
],
options
)"
(
click
)="
selectedLoan
(
this
.
curPageData
?.
questions
[
0
],
options
)"
>
>
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</div>
</div>
<ul
class=
"income"
>
<ul
class=
"income"
>
<li
<li
[
ngClass
]="{
selected:
options
['
selected
']
==
true
}"
[
ngClass
]="{
selected:
options
['
selected
']
==
true
}"
*
ngFor=
"let options of this.curPageData?.questions[1]['options']"
*
ngFor=
"let options of this.curPageData?.questions[1]['options']"
(
click
)="
selectedLoan
(
this
.
curPageData
?.
questions
[
1
],
options
)"
(
click
)="
selectedLoan
(
this
.
curPageData
?.
questions
[
1
],
options
)"
>
>
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
</ul>
</ul>
</div>
</div>
<div
class=
"content_footer"
>
<div
class=
"content_footer"
>
<div
style=
"color: #8a8a8a;"
>
<
</div>
<div
style=
"color: #8a8a8a;"
(
click
)="
before
()"
>
<
</div>
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
(
click
)="
next
()"
(
click
)="
next
()"
>
下一步
</div>
>
下一步
</div>
...
...
questionnaire/src/app/loan/loan.component.ts
View file @
fa4d8075
...
@@ -105,4 +105,9 @@ export class LoanComponent implements OnInit {
...
@@ -105,4 +105,9 @@ export class LoanComponent implements OnInit {
return
;
return
;
}
}
}
}
// 上一步
before
()
{
this
.
commonService
.
before
();
}
}
}
questionnaire/src/app/smoking/smoking.component.html
View file @
fa4d8075
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
</ul>
</ul>
</div>
</div>
<div
class=
"content_footer"
>
<div
class=
"content_footer"
>
<div
style=
"color: #8a8a8a;"
>
<
</div>
<div
style=
"color: #8a8a8a;"
(
click
)="
before
()"
>
<
</div>
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
(
click
)="
next
()"
>
下一步
</div>
(
click
)="
next
()"
>
下一步
</div>
</div>
</div>
...
...
questionnaire/src/app/smoking/smoking.component.ts
View file @
fa4d8075
...
@@ -158,4 +158,9 @@ export class SmokingComponent implements OnInit {
...
@@ -158,4 +158,9 @@ export class SmokingComponent implements OnInit {
return
;
return
;
}
}
}
}
// 上一步
before
()
{
this
.
commonService
.
before
();
}
}
}
questionnaire/src/app/social-security/social-security.component.html
View file @
fa4d8075
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
</ul>
</ul>
</div>
</div>
<div
class=
"content_footer"
>
<div
class=
"content_footer"
>
<div
style=
"color: #8a8a8a;"
>
<
</div>
<div
style=
"color: #8a8a8a;"
(
click
)="
before
()"
>
<
</div>
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
(
click
)="
next
()"
(
click
)="
next
()"
>
下一步
</div>
>
下一步
</div>
...
...
questionnaire/src/app/social-security/social-security.component.ts
View file @
fa4d8075
...
@@ -105,4 +105,9 @@ export class SocialSecurityComponent implements OnInit {
...
@@ -105,4 +105,9 @@ export class SocialSecurityComponent implements OnInit {
return
;
return
;
}
}
}
}
// 上一步
before
()
{
this
.
commonService
.
before
();
}
}
}
questionnaire/src/app/transit1/transit1.component.html
View file @
fa4d8075
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<img
src=
"assets/images/bg_6.png"
/>
<img
src=
"assets/images/bg_6.png"
/>
</div>
</div>
<div
class=
"content_footer"
>
<div
class=
"content_footer"
>
<div
style=
"color: #8a8a8a;"
>
<
</div>
<div
style=
"color: #8a8a8a;"
(
click
)="
before
()"
>
<
</div>
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
(
click
)="
next
()"
>
下一步
</div>
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
(
click
)="
next
()"
>
下一步
</div>
</div>
</div>
</div>
</div>
questionnaire/src/app/transit1/transit1.component.ts
View file @
fa4d8075
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Router
,
ActivatedRoute
}
from
'@angular/router'
;
import
{
Router
,
ActivatedRoute
}
from
'@angular/router'
;
import
{
CommonService
}
from
"../common.service"
;
@
Component
({
@
Component
({
selector
:
'app-transit1'
,
selector
:
'app-transit1'
,
templateUrl
:
'./transit1.component.html'
,
templateUrl
:
'./transit1.component.html'
,
...
@@ -9,6 +10,7 @@ export class Transit1Component implements OnInit {
...
@@ -9,6 +10,7 @@ export class Transit1Component implements OnInit {
type
:
any
;
type
:
any
;
constructor
(
private
router
:
Router
,
constructor
(
private
router
:
Router
,
private
commonService
:
CommonService
,
private
route
:
ActivatedRoute
)
{
private
route
:
ActivatedRoute
)
{
/**
/**
* 1:单身贵族
* 1:单身贵族
...
@@ -26,4 +28,9 @@ export class Transit1Component implements OnInit {
...
@@ -26,4 +28,9 @@ export class Transit1Component implements OnInit {
next
()
{
next
()
{
this
.
router
.
navigate
([
'/income'
],
{
queryParams
:
{
type
:
this
.
type
}})
this
.
router
.
navigate
([
'/income'
],
{
queryParams
:
{
type
:
this
.
type
}})
}
}
// 上一步
before
()
{
this
.
commonService
.
before
();
}
}
}
questionnaire/src/app/transit2/transit2.component.html
View file @
fa4d8075
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<img
src=
"assets/images/bg_10.png"
/>
<img
src=
"assets/images/bg_10.png"
/>
</div>
</div>
<div
class=
"content_footer"
>
<div
class=
"content_footer"
>
<div
style=
"color: #8a8a8a;"
>
<
</div>
<div
style=
"color: #8a8a8a;"
(
click
)="
before
()"
>
<
</div>
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
<div
[
ngStyle
]="{
color:
nextBtn =
=
false
?
'#
8a8a8a
'
:
'#
ec2d37
'
}"
(
click
)="
next
()"
(
click
)="
next
()"
>
下一步
</div>
>
下一步
</div>
...
...
questionnaire/src/app/transit2/transit2.component.ts
View file @
fa4d8075
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
ActivatedRoute
,
Router
}
from
"@angular/router"
;
import
{
ActivatedRoute
,
Router
}
from
"@angular/router"
;
import
{
CommonService
}
from
"../common.service"
;
@
Component
({
@
Component
({
selector
:
'app-transit2'
,
selector
:
'app-transit2'
,
...
@@ -11,6 +12,7 @@ export class Transit2Component implements OnInit {
...
@@ -11,6 +12,7 @@ export class Transit2Component implements OnInit {
type
:
any
;
type
:
any
;
constructor
(
private
router
:
Router
,
constructor
(
private
router
:
Router
,
private
commonService
:
CommonService
,
private
route
:
ActivatedRoute
)
{
private
route
:
ActivatedRoute
)
{
this
.
type
=
this
.
route
.
snapshot
.
queryParams
[
'type'
];
this
.
type
=
this
.
route
.
snapshot
.
queryParams
[
'type'
];
}
}
...
@@ -21,4 +23,9 @@ export class Transit2Component implements OnInit {
...
@@ -21,4 +23,9 @@ export class Transit2Component implements OnInit {
next
()
{
next
()
{
this
.
router
.
navigate
([
'/health'
],
{
queryParams
:
{
type
:
this
.
type
}});
this
.
router
.
navigate
([
'/health'
],
{
queryParams
:
{
type
:
this
.
type
}});
}
}
// 上一步
before
()
{
this
.
commonService
.
before
();
}
}
}
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