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
a9408b0f
Commit
a9408b0f
authored
Sep 30, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
签到
parent
fc23324e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
158 additions
and
35 deletions
+158
-35
survey-preview.html
src/pages/mySurvey/survey-preview/survey-preview.html
+31
-3
survey-preview.scss
src/pages/mySurvey/survey-preview/survey-preview.scss
+94
-0
survey-preview.ts
src/pages/mySurvey/survey-preview/survey-preview.ts
+28
-23
survey-write.ts
src/pages/mySurvey/survey-write/survey-write.ts
+3
-7
list.html
src/pages/surveyManage/list/list.html
+2
-2
No files found.
src/pages/mySurvey/survey-preview/survey-preview.html
View file @
a9408b0f
...
...
@@ -7,10 +7,38 @@
</ion-header>
<ion-content>
<p>
提交成功
</p>
<ion-content
class=
"bgc-e7e8ed"
>
<ion-list>
<ion-item>
<ion-label
class=
"padding-left-16"
>
{{survey?.title}}
</ion-label>
</ion-item>
<div
class=
"question-list"
>
<ion-item
*
ngFor=
"let item of contentList;let i = index"
(
click
)="
itemEdit
(
i
)"
>
<div
class=
"item-content"
>
<p>
{{i +1}}.{{item.title}}
</p>
<ng-container
*
ngIf=
"item.quesType == 1"
>
<p><span
class=
"input-radio {{item.option.answerdesc == '0'?'select-raio':''}} "
></span>
是
</p>
<p><span
class=
"input-radio {{item.option.answerdesc == '1'?'select-raio':''}}"
></span>
否
</p>
</ng-container>
<ng-container
*
ngIf=
"item.quesType == 2"
>
<ng-container
*
ngFor=
" let option1 of item.quesDesc"
>
<p><span
class=
"input-radio"
></span>
{{option1.option_title}}
</p>
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"item.quesType == 3"
>
<ng-container
*
ngFor=
" let option2 of item.quesDesc"
>
<p><span
class=
"input-check"
></span>
{{option2.option_title}}
</p>
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"item.quesType == 4"
>
<div
class=
"textarea-div"
></div>
</ng-container>
</div>
</ion-item>
</div>
</ion-list>
<ng-container
*
ngIf=
"survey?.isOpenName == '否'"
>
<button
class=
"submit-btn submit"
(
click
)="
goToResult
()"
>
提交
</button>
<button
class=
"submit-btn submit"
(
click
)="
goToResult
()"
>
查看问卷结果
</button>
</ng-container>
</ion-content>
src/pages/mySurvey/survey-preview/survey-preview.scss
View file @
a9408b0f
page-survey-preview
{
.submit
{
border
:
1px
solid
#34b4fc
;
background-color
:
#34b4fc
;
margin-top
:
20px
;
}
.list-ios
.item-block
.item-inner
,
.list-ios
>
.item-block
:first-child
,
.list-ios
>
.item-block
:last-child
,
.list-ios
>
.item-wrapper
:last-child
.item-block
{
border
:
none
;
padding
:
0
;
}
.label-ios
{
margin
:
0
;
}
.question-list
{
margin-top
:
10px
;
ion-item
{
margin-bottom
:
8px
;
padding
:
0
;
.item-content
{
padding
:
11px
16px
;
p
{
margin-bottom
:
10px
;
}
}
}
}
.item-opra
,
.footter-opr
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
padding
:
11px
0
;
background-color
:
#fff
;
img
{
width
:
26px
;
}
}
.footter-opr
{
border-top
:
1px
solid
#cccccc
;
}
.item-opra
>
div
,
.footter-opr
>
div
{
width
:
25%
;
text-align
:
center
;
}
.item-opra
{
border-top
:
1px
solid
#ddd
;
height
:
5rem
;
span
{
padding
:
6px
16px
;
border
:
1px
solid
#ddd
;
border-radius
:
4px
;
font-size
:
1
.3rem
;
}
}
.input-radio
{
border
:
1px
solid
#ddd
;
display
:
inline-block
;
border-radius
:
50%
;
width
:
1
.2rem
;
height
:
1
.2rem
;
margin-right
:
8px
;
vertical-align
:
sub
;
}
.select-raio
{
position
:
relative
;
}
.
select-raio
:
:
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
;
}
.textarea-div
{
height
:
5rem
;
border-radius
:
2px
;
border
:
1px
solid
#ddd
;
}
}
src/pages/mySurvey/survey-preview/survey-preview.ts
View file @
a9408b0f
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
AppService
}
from
"../../../service/appHttpService"
;
import
{
Storage
}
from
"@ionic/storage"
;
import
{
Storage
}
from
"@ionic/storage"
;
import
{
SurveyResultPage
}
from
"../survey-result/survey-result"
;
@
IonicPage
()
@
Component
({
selector
:
'page-survey-preview'
,
templateUrl
:
'survey-preview.html'
,
selector
:
'page-survey-preview'
,
templateUrl
:
'survey-preview.html'
,
})
export
class
SurveyPreviewPage
{
item
;
userId
;
survey
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
public
appService
:
AppService
,
public
storage
:
Storage
)
{
}
item
;
userId
;
survey
;
contentList
;
ionViewDidLoad
()
{
this
.
item
=
this
.
navParams
.
get
(
'item'
);
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
public
appService
:
AppService
,
public
storage
:
Storage
)
{
}
this
.
getInfo
()
}
ionViewDidLoad
()
{
this
.
item
=
this
.
navParams
.
get
(
'item'
);
this
.
getInfo
()
}
getInfo
(){
this
.
storage
.
get
(
'user'
).
then
((
res
)
=>
{
getInfo
()
{
this
.
storage
.
get
(
'user'
).
then
((
res
)
=>
{
console
.
log
(
res
);
this
.
userId
=
res
.
id
;
const
data
=
{
userId
:
this
.
userId
,
id
:
this
.
item
.
id
userId
:
this
.
userId
,
id
:
this
.
item
.
id
};
this
.
appService
.
ObserverHttpPost
(
'/wisdomgroup/modules/question/showOnApp'
,
data
)
.
subscribe
((
res
)
=>
{
this
.
appService
.
ObserverHttpPost
(
'/wisdomgroup/modules/question/showOnApp'
,
data
)
.
subscribe
((
res
)
=>
{
this
.
survey
=
res
.
json
().
data
;
this
.
contentList
=
res
.
json
().
data
.
ques
.
datalist
;
for
(
let
i
=
0
;
i
<
this
.
contentList
.
length
;
i
++
){
this
.
contentList
[
i
].
quesDesc
=
JSON
.
parse
(
this
.
contentList
[
i
].
quesDesc
);
}
})
});
}
goToResult
(){
this
.
navCtrl
.
push
(
'SurveyResultPage'
,{
item
:
this
.
survey
});
goToResult
()
{
this
.
navCtrl
.
push
(
'SurveyResultPage'
,
{
item
:
this
.
survey
});
}
}
src/pages/mySurvey/survey-write/survey-write.ts
View file @
a9408b0f
...
...
@@ -2,12 +2,6 @@ import { Component } from '@angular/core';
import
{
IonicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
AppService
}
from
"../../../service/appHttpService"
;
/**
* Generated class for the SurveyWritePage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@
IonicPage
()
@
Component
({
...
...
@@ -75,7 +69,9 @@ export class SurveyWritePage {
'array'
:
JSON
.
stringify
(
arrData
)
}
this
.
appService
.
ObserverHttpPost
(
'/wisdomgroup/modules/question/create/quesuser'
,
qData
)
.
subscribe
((
res
)
=>
{})
.
subscribe
((
res
)
=>
{
this
.
navCtrl
.
pop
();
})
}
}
src/pages/surveyManage/list/list.html
View file @
a9408b0f
...
...
@@ -47,11 +47,11 @@
<ion-footer
*
ngIf=
"showOp"
>
<div
class=
"footter-opr"
>
<div
(
click
)="
look
()"
><span>
查看
</span></div>
<div
*
ngIf=
"swiperIndex == 0"
(
click
)="
look
()"
><span>
查看
</span></div>
<div
*
ngIf=
"swiperIndex == 1"
(
click
)="
overDue
()"
><span>
设为过期
</span></div>
<div
*
ngIf=
"swiperIndex == 0"
(
click
)="
release
()"
><span>
发布
</span></div>
<div
*
ngIf=
"swiperIndex == 1 || swiperIndex == 2"
(
click
)="
result
()"
><span>
结果
</span></div>
<div
(
click
)="
copy
()"
><span>
复制
</span></div>
<div
*
ngIf=
"swiperIndex == 0"
(
click
)="
copy
()"
><span>
复制
</span></div>
<div
(
click
)="
delete
()"
><span>
删除
</span></div>
</div>
<ion-toolbar>
...
...
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