Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-ces
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqinghua
wisdom-ces
Commits
55d4605b
Commit
55d4605b
authored
Oct 17, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
color
parent
3025e2b6
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
87 additions
and
29 deletions
+87
-29
question-detail.html
src/pages/mine/mySurvey/question-detail/question-detail.html
+3
-3
survey-preview.html
src/pages/mine/mySurvey/survey-preview/survey-preview.html
+3
-1
survey-preview.ts
src/pages/mine/mySurvey/survey-preview/survey-preview.ts
+2
-1
survey-result.html
src/pages/mine/mySurvey/survey-result/survey-result.html
+1
-1
survey-write.html
src/pages/mine/mySurvey/survey-write/survey-write.html
+25
-5
survey-write.scss
src/pages/mine/mySurvey/survey-write/survey-write.scss
+52
-17
survey-write.ts
src/pages/mine/mySurvey/survey-write/survey-write.ts
+1
-1
No files found.
src/pages/mine/mySurvey/question-detail/question-detail.html
View file @
55d4605b
...
@@ -13,12 +13,12 @@
...
@@ -13,12 +13,12 @@
</ion-header>
</ion-header>
<ion-content>
<ion-content
padding
>
<p>
(问答){{this.item?.title}}
</p>
<p>
(问答){{this.item?.title}}
</p>
<ion-list>
<ion-list>
<ion-item
*
ngFor=
"let item of question"
>
<ion-item
*
ngFor=
"let item of question"
>
<p
>
{{item.createUsername}}
</p>
<p
class=
"padding-10-0"
>
<span
class=
"color-24bafc"
>
·
</span>
{{item.createUsername}}
</p>
<p>
{{item.answerdesc}}
</p>
<p
class=
"padding-10-0"
>
{{item.answerdesc}}
</p>
</ion-item>
</ion-item>
</ion-list>
</ion-list>
</ion-content>
</ion-content>
src/pages/mine/mySurvey/survey-preview/survey-preview.html
View file @
55d4605b
...
@@ -15,7 +15,9 @@
...
@@ -15,7 +15,9 @@
<div
class=
"question-list"
>
<div
class=
"question-list"
>
<ion-item
*
ngFor=
"let item of contentList;let i = index"
>
<ion-item
*
ngFor=
"let item of contentList;let i = index"
>
<div
class=
"item-content"
>
<div
class=
"item-content"
>
<p>
{{i +1}}、
<p>
<span
class=
"color-red"
*
ngIf=
"item.isAns == 1"
>
*
</span>
{{i +1}}、
<span
*
ngIf=
"item.quesType == 1"
>
(判断)
</span>
<span
*
ngIf=
"item.quesType == 1"
>
(判断)
</span>
<span
*
ngIf=
"item.quesType == 2"
>
(单选)
</span>
<span
*
ngIf=
"item.quesType == 2"
>
(单选)
</span>
<span
*
ngIf=
"item.quesType == 3"
>
(多选)
</span>
<span
*
ngIf=
"item.quesType == 3"
>
(多选)
</span>
...
...
src/pages/mine/mySurvey/survey-preview/survey-preview.ts
View file @
55d4605b
...
@@ -38,10 +38,11 @@ export class SurveyPreviewPage {
...
@@ -38,10 +38,11 @@ export class SurveyPreviewPage {
this
.
contentList
=
res
.
json
().
data
.
ques
.
datalist
;
this
.
contentList
=
res
.
json
().
data
.
ques
.
datalist
;
this
.
contentList
.
forEach
(
res
=>
{
this
.
contentList
.
forEach
(
res
=>
{
res
.
quesDesc
=
JSON
.
parse
(
res
.
quesDesc
);
res
.
quesDesc
=
JSON
.
parse
(
res
.
quesDesc
);
if
(
res
.
quesType
==
3
){
if
(
res
.
quesType
==
3
&&
res
.
option
){
res
.
option
.
answerdesc
=
res
.
option
.
answerdesc
.
split
(
','
);
res
.
option
.
answerdesc
=
res
.
option
.
answerdesc
.
split
(
','
);
}
}
});
});
console
.
log
(
this
.
contentList
);
})
})
});
});
...
...
src/pages/mine/mySurvey/survey-result/survey-result.html
View file @
55d4605b
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
</ion-header>
</ion-header>
<ion-content>
<ion-content
padding=
""
>
<p
class=
"text-center"
>
提交成功!感谢你的参与!
</p>
<p
class=
"text-center"
>
提交成功!感谢你的参与!
</p>
<p
class=
"text-center"
>
问卷结果公开
</p>
<p
class=
"text-center"
>
问卷结果公开
</p>
<ion-list>
<ion-list>
...
...
src/pages/mine/mySurvey/survey-write/survey-write.html
View file @
55d4605b
...
@@ -25,21 +25,41 @@
...
@@ -25,21 +25,41 @@
<span
*
ngIf=
"item.quesType == 4"
>
(问答)
</span>
<span
*
ngIf=
"item.quesType == 4"
>
(问答)
</span>
{{item.title}}
{{item.title}}
</p>
</p>
<div
class=
"padding-0-
16
"
>
<div
class=
"padding-0-
30
"
>
<ng-container
*
ngIf=
"item.quesType == 1"
>
<ng-container
*
ngIf=
"item.quesType == 1"
>
<p
class=
"input-radio"
><input
[(
ngModel
)]="
item
.
answerdesc
"
name=
"{{item.questionQueId}}"
value=
"0"
type=
"radio"
>
是
</p>
<p>
<p
class=
"input-radio"
><input
[(
ngModel
)]="
item
.
answerdesc
"
name=
"{{item.questionQueId}}"
value=
"1"
type=
"radio"
>
否
</p>
<label>
<input
[(
ngModel
)]="
item
.
answerdesc
"
name=
"{{item.questionQueId}}"
value=
"0"
type=
"radio"
>
是
<span
class=
"input-radio"
></span>
</label>
</p>
<p>
<label>
<input
[(
ngModel
)]="
item
.
answerdesc
"
name=
"{{item.questionQueId}}"
value=
"1"
type=
"radio"
>
否
<span
class=
"input-radio"
></span>
</label>
</p>
</ng-container>
</ng-container>
<!--单选题-->
<!--单选题-->
<ng-container
*
ngIf=
"item.quesType == 2"
>
<ng-container
*
ngIf=
"item.quesType == 2"
>
<ng-container
*
ngFor=
" let option1 of item.quesDesc;let optIndex = index;"
>
<ng-container
*
ngFor=
" let option1 of item.quesDesc;let optIndex = index;"
>
<p><input
[(
ngModel
)]="
item
.
answerdesc
"
type=
"radio"
value=
"{{optIndex}}"
name=
"{{item.questionQueId}}"
>
{{option1.option_title}}
</p>
<p>
<label>
<input
[(
ngModel
)]="
item
.
answerdesc
"
type=
"radio"
value=
"{{optIndex}}"
name=
"{{item.questionQueId}}"
>
{{option1.option_title}}
<span
class=
"input-radio"
></span>
</label>
</p>
</ng-container>
</ng-container>
</ng-container>
</ng-container>
<!--多选题-->
<!--多选题-->
<ng-container
*
ngIf=
"item.quesType == 3"
>
<ng-container
*
ngIf=
"item.quesType == 3"
>
<ng-container
*
ngFor=
" let option2 of item.quesDesc;let quesIndex = index;"
>
<ng-container
*
ngFor=
" let option2 of item.quesDesc;let quesIndex = index;"
>
<p><input
type=
"checkbox"
(
change
)="
mutiSelect
(
i
,
quesIndex
)"
value=
"{{quesIndex}}"
>
{{option2.option_title}}
</p>
<p>
<label>
<input
type=
"checkbox"
(
change
)="
mutiSelect
(
i
,
quesIndex
)"
value=
"{{quesIndex}}"
>
{{option2.option_title}}
<span
class=
"input-check"
></span>
</label>
</p>
</ng-container>
</ng-container>
</ng-container>
</ng-container>
<!--问答题-->
<!--问答题-->
...
...
src/pages/mine/mySurvey/survey-write/survey-write.scss
View file @
55d4605b
...
@@ -2,23 +2,58 @@ page-survey-write {
...
@@ -2,23 +2,58 @@ page-survey-write {
.item-ios
p
{
.item-ios
p
{
margin
:
15px
0
;
margin
:
15px
0
;
}
}
//input[type='radio']{
.input-radio
{
// display: none;
border
:
1px
solid
#ddd
;
//}
display
:
inline-block
;
//.input-radio{
border-radius
:
50%
;
// position: relative;
width
:
1
.2rem
;
// padding-left: 1.8rem;
height
:
1
.2rem
;
//}
margin-right
:
8px
;
//.input-radio::after{
vertical-align
:
sub
;
// content: '';
position
:
absolute
;
// position: absolute;
top
:
1px
;
// top: 3px;
left
:
-20px
;
// left: 0px;
}
// width: 12px;
label
{
// height: 12px;
position
:
relative
;
// border-radius: 50%;
input
{
// border: 1px solid #ddd;
display
:
none
;
//}
}
}
input
:checked
+
.input-radio
::after
{
content
:
''
;
position
:
absolute
;
width
:
0
.7rem
;
top
:
2px
;
height
:
0
.7rem
;
border-radius
:
50%
;
background-color
:
#333
;
left
:
2px
;
}
.input-check
{
border
:
1px
solid
#ddd
;
display
:
inline-block
;
width
:
1
.2rem
;
height
:
1
.2rem
;
margin-right
:
8px
;
vertical-align
:
text-top
;
border-radius
:
2px
;
position
:
absolute
;
top
:
1px
;
left
:
-20px
;
}
input
:checked
+
.input-check
::after
{
content
:
'\2713'
;
position
:
absolute
;
width
:
0
.7rem
;
top
:
-4px
;
height
:
0
.7rem
;
font-size
:
1
.5rem
;
font-weight
:
bold
;
}
.content-textarea
{
.content-textarea
{
padding
:
10px
;
padding
:
10px
;
min-height
:
100px
;
min-height
:
100px
;
...
...
src/pages/mine/mySurvey/survey-write/survey-write.ts
View file @
55d4605b
...
@@ -71,7 +71,7 @@ export class SurveyWritePage {
...
@@ -71,7 +71,7 @@ export class SurveyWritePage {
'questionId'
:
this
.
ansArr
[
i
].
questionId
,
'questionId'
:
this
.
ansArr
[
i
].
questionId
,
'questionQueId'
:
this
.
ansArr
[
i
].
questionQueId
,
'questionQueId'
:
this
.
ansArr
[
i
].
questionQueId
,
'answerdesc'
:
this
.
ansArr
[
i
].
answerdesc
,
'answerdesc'
:
this
.
ansArr
[
i
].
answerdesc
,
'isans'
:
this
.
ansArr
[
i
].
is
a
ns
'isans'
:
this
.
ansArr
[
i
].
is
A
ns
};
};
arrData
.
push
(
data
);
arrData
.
push
(
data
);
}
}
...
...
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