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
22ab2b7b
Commit
22ab2b7b
authored
Oct 18, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
color
parent
dc813afe
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
124 additions
and
23 deletions
+124
-23
activityDetail.html
src/pages/activity/activityDetail/activityDetail.html
+5
-1
activityDetail.ts
src/pages/activity/activityDetail/activityDetail.ts
+24
-6
activityList.html
src/pages/activity/activityList/activityList.html
+1
-2
activityList.scss
src/pages/activity/activityList/activityList.scss
+3
-3
survey-preview.html
src/pages/mine/mySurvey/survey-preview/survey-preview.html
+2
-2
desicr.html
src/pages/surveyManage/item/desicr/desicr.html
+13
-2
desicr.scss
src/pages/surveyManage/item/desicr/desicr.scss
+3
-0
desicr.ts
src/pages/surveyManage/item/desicr/desicr.ts
+44
-2
edit.html
src/pages/surveyManage/item/edit/edit.html
+10
-5
edit.ts
src/pages/surveyManage/item/edit/edit.ts
+19
-0
No files found.
src/pages/activity/activityDetail/activityDetail.html
View file @
22ab2b7b
...
@@ -31,7 +31,11 @@
...
@@ -31,7 +31,11 @@
<span
*
ngIf=
"activity.applyCount == 0 || !activity.applyCount"
>
{{ batchList.length}}
</span>
<span
*
ngIf=
"activity.applyCount == 0 || !activity.applyCount"
>
{{ batchList.length}}
</span>
<span
*
ngIf=
"activity.applyCount != 0"
>
{{activity.applyCount}}
</span>
<span
*
ngIf=
"activity.applyCount != 0"
>
{{activity.applyCount}}
</span>
个批次)
个批次)
<span
*
ngIf=
"activity?.activityNo == '0'"
(
click
)="
sayNo
()"
class=
"item-type"
>
不想参加
</span>
<ng-container
*
ngIf=
"batch?.order?.orderstate == 1 || batch?.order?.orderstate == 2"
>
<span
*
ngIf=
"activity?.activityNo == '0'"
(
click
)="
sayNo
()"
class=
"item-type"
>
不想参加
</span>
</ng-container>
</ng-container>
</ng-container>
</span>
</span>
...
...
src/pages/activity/activityDetail/activityDetail.ts
View file @
22ab2b7b
...
@@ -96,13 +96,31 @@ export class ActivityDetailPage {
...
@@ -96,13 +96,31 @@ export class ActivityDetailPage {
//不参加
//不参加
sayNo
()
{
sayNo
()
{
this
.
appService
.
ObserverHttpPostAdd
(
"/wisdomgroup/modules/activityNon/admin/"
,
this
.
activityId
)
const
confirm
=
this
.
alertCtrl
.
create
({
.
subscribe
((
res
:
Response
)
=>
{
title
:
'确定不参加该活动?'
,
this
.
navCtrl
.
pop
();
message
:
'选择不参加该活动,之后无法在报名该活动?'
,
},
error
=>
{
buttons
:
[
this
.
appService
.
alert
(
'网络异常!'
);
{
text
:
'取消'
,
handler
:
()
=>
{
console
.
log
(
'Disagree clicked'
);
}
},
{
text
:
'确定'
,
handler
:
()
=>
{
this
.
appService
.
ObserverHttpPostAdd
(
"/wisdomgroup/modules/activityNon/admin/"
,
this
.
activityId
)
.
subscribe
((
res
:
Response
)
=>
{
this
.
navCtrl
.
pop
();
},
error
=>
{
this
.
appService
.
alert
(
'网络异常!'
);
}
);
}
}
}
);
]
});
confirm
.
present
();
}
}
}
}
src/pages/activity/activityList/activityList.html
View file @
22ab2b7b
...
@@ -25,8 +25,7 @@
...
@@ -25,8 +25,7 @@
</div>
</div>
<ng-container
*
ngIf=
"item.activityNo == 1"
>
<ng-container
*
ngIf=
"item.activityNo == 1"
>
<button
ion-button
round
class=
"btn btn2"
>
不参加
</button>
<button
ion-button
round
class=
"btn btn3"
>
不参加
</button>
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"item.activityNo == 0"
>
<ng-container
*
ngIf=
"item.activityNo == 0"
>
<button
ion-button
round
class=
"btn btn1"
*
ngIf=
"item.activityState==2 && item.orderList.length == 0 "
>
可报名
</button>
<button
ion-button
round
class=
"btn btn1"
*
ngIf=
"item.activityState==2 && item.orderList.length == 0 "
>
可报名
</button>
...
...
src/pages/activity/activityList/activityList.scss
View file @
22ab2b7b
...
@@ -47,11 +47,11 @@ page-activityList {
...
@@ -47,11 +47,11 @@ page-activityList {
}
}
.btn2
{
.btn2
{
border
:
1px
solid
#
90da91
;
border
:
1px
solid
#
19b5ff
;
color
:
#
90da91
;
color
:
#
19b5ff
;
}
}
.btn
2
{
.btn
3
{
border
:
1px
solid
#dddddd
;
border
:
1px
solid
#dddddd
;
color
:
#dddddd
;
color
:
#dddddd
;
}
}
...
...
src/pages/mine/mySurvey/survey-preview/survey-preview.html
View file @
22ab2b7b
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
</ion-list>
</ion-list>
<!--0 不公开 1 公开-->
<!--0 不公开 1 公开-->
<
ng-container
*
ngIf=
"survey?.isopen == 1"
>
<
!--<ng-container *ngIf="survey?.isopen == 1">--
>
<button
class=
"submit-btn submit"
(
click
)="
goToResult
()"
>
查看问卷结果
</button>
<button
class=
"submit-btn submit"
(
click
)="
goToResult
()"
>
查看问卷结果
</button>
<
/ng-container
>
<
!--</ng-container>--
>
</ion-content>
</ion-content>
src/pages/surveyManage/item/desicr/desicr.html
View file @
22ab2b7b
<ion-header>
<ion-header>
<ion-navbar>
<ion-navbar>
<ion-title>
创建问卷
</ion-title>
<ion-title
*
ngIf=
"id"
>
编辑问卷
</ion-title>
<ion-title
*
ngIf=
"!id"
>
创建问卷
</ion-title>
</ion-navbar>
</ion-navbar>
</ion-header>
</ion-header>
...
@@ -21,7 +22,17 @@
...
@@ -21,7 +22,17 @@
<ion-label
stacked
>
问卷说明
</ion-label>
<ion-label
stacked
>
问卷说明
</ion-label>
<ion-textarea
[(
ngModel
)]="
desrc
.
explai
"
></ion-textarea>
<ion-textarea
[(
ngModel
)]="
desrc
.
explai
"
></ion-textarea>
</ion-item>
</ion-item>
<ion-item>
<ion-label>
问卷结果公开
</ion-label>
<ion-toggle
disabled
[
checked
]="
true
"
></ion-toggle>
</ion-item>
<!--<ion-item>-->
<!--<ion-label>匿名回答</ion-label>-->
<!--<ion-toggle [(ngModel)]="isans"></ion-toggle>-->
<!--</ion-item>-->
</ion-list>
</ion-list>
<button
class=
"submit-btn submit"
(
click
)="
submitOrder
()"
>
保存
</button>
<button
*
ngIf=
"id"
class=
"submit-btn submit"
(
click
)="
submitEdit
()"
>
保存
</button>
<button
*
ngIf=
"!id"
class=
"submit-btn submit"
(
click
)="
submitOrder
()"
>
保存
</button>
</ion-content>
</ion-content>
src/pages/surveyManage/item/desicr/desicr.scss
View file @
22ab2b7b
...
@@ -7,6 +7,9 @@ page-desicr {
...
@@ -7,6 +7,9 @@ page-desicr {
.list-ios
>
.item-block
:last-child
,
.list-ios
>
.item-wrapper
:last-child
.item-block
{
.list-ios
>
.item-block
:last-child
,
.list-ios
>
.item-wrapper
:last-child
.item-block
{
border
:
none
;
border
:
none
;
}
}
.toggle-ios.toggle-disabled
,
.item-ios.item-toggle-disabled
ion-label
{
opacity
:
1
;
}
.label-ios
+
ion-textarea
.text-input
{
.label-ios
+
ion-textarea
.text-input
{
padding
:
10px
;
padding
:
10px
;
min-height
:
100px
;
min-height
:
100px
;
...
...
src/pages/surveyManage/item/desicr/desicr.ts
View file @
22ab2b7b
...
@@ -13,11 +13,13 @@ import {message} from "../../../../app/main";
...
@@ -13,11 +13,13 @@ import {message} from "../../../../app/main";
})
})
export
class
DesicrPage
{
export
class
DesicrPage
{
id
;
desrc
=
{
desrc
=
{
title
:
''
,
//问卷标题
title
:
''
,
//问卷标题
explai
:
''
,
//问卷说明
explai
:
''
,
//问卷说明
usergroup
:
null
,
//用户组id
usergroup
:
null
,
//用户组id
isopen
:
0
,
//是否公开
isopen
:
1
,
//是否公开
isans
:
1
,
//是否匿名
isans
:
1
,
//是否匿名
state
:
1
//状态
state
:
1
//状态
};
};
...
@@ -29,9 +31,13 @@ export class DesicrPage {
...
@@ -29,9 +31,13 @@ export class DesicrPage {
}
}
ionViewDidLoad
()
{
ionViewDidLoad
()
{
console
.
log
(
'ionViewDidLoad DesicrPage'
);
if
(
this
.
navParams
.
get
(
'id'
)){
this
.
id
=
this
.
navParams
.
get
(
'id'
);
this
.
getDetail
();
}
}
}
//新建
submitOrder
(){
submitOrder
(){
const
toast
=
this
.
toastCtrl
.
create
(
message
);
const
toast
=
this
.
toastCtrl
.
create
(
message
);
if
(
!
this
.
desrc
.
title
){
if
(
!
this
.
desrc
.
title
){
...
@@ -42,6 +48,11 @@ export class DesicrPage {
...
@@ -42,6 +48,11 @@ export class DesicrPage {
if
(
this
.
desrc
.
usergroup
==
null
){
if
(
this
.
desrc
.
usergroup
==
null
){
this
.
desrc
.
usergroup
=
'all'
;
this
.
desrc
.
usergroup
=
'all'
;
}
}
if
(
this
.
desrc
.
isopen
){
this
.
desrc
.
isopen
=
1
;
}
else
{
this
.
desrc
.
isopen
=
0
;
}
this
.
appService
.
ObserverHttpPost
(
'/wisdomgroup/modules/question/create'
,
this
.
desrc
)
this
.
appService
.
ObserverHttpPost
(
'/wisdomgroup/modules/question/create'
,
this
.
desrc
)
.
subscribe
(
.
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
...
@@ -54,6 +65,31 @@ export class DesicrPage {
...
@@ -54,6 +65,31 @@ export class DesicrPage {
)
)
}
}
//编辑
submitEdit
(){
if
(
this
.
desrc
.
isopen
){
this
.
desrc
.
isopen
=
1
;
}
else
{
this
.
desrc
.
isopen
=
0
;
}
const
data
=
{
id
:
this
.
id
,
title
:
this
.
desrc
.
title
,
//问卷标题
explai
:
this
.
desrc
.
explai
,
//问卷说明
usergroup
:
this
.
desrc
.
usergroup
,
//用户组id
isopen
:
this
.
desrc
.
isopen
,
//是否公开
isans
:
this
.
desrc
.
isans
,
//是否匿名
state
:
this
.
desrc
.
state
//状态
};
console
.
log
(
data
);
this
.
appService
.
ObserverHttpPost
(
'/wisdomgroup/modules/question/updateOnApp'
,
data
)
.
subscribe
((
res
)
=>
{
if
(
res
)
{
this
.
navCtrl
.
pop
();
}
})
}
selectPerson
(){
selectPerson
(){
let
modal
=
this
.
modalCtrl
.
create
(
PersonPage
);
let
modal
=
this
.
modalCtrl
.
create
(
PersonPage
);
modal
.
onDidDismiss
(
data
=>
{
modal
.
onDidDismiss
(
data
=>
{
...
@@ -69,4 +105,10 @@ export class DesicrPage {
...
@@ -69,4 +105,10 @@ export class DesicrPage {
modal
.
present
();
modal
.
present
();
}
}
getDetail
(){
this
.
appService
.
ObserverHttpPostAdd
(
'/wisdomgroup/modules/question/edit/'
,
this
.
id
).
subscribe
((
res
)
=>
{
this
.
desrc
=
res
.
json
().
data
;
});
}
}
}
src/pages/surveyManage/item/edit/edit.html
View file @
22ab2b7b
...
@@ -11,7 +11,11 @@
...
@@ -11,7 +11,11 @@
<ion-content
class=
"bgc-e7e8ed"
>
<ion-content
class=
"bgc-e7e8ed"
>
<ion-list>
<ion-list>
<ion-item
class=
"padding-left-16"
>
<ion-item
class=
"padding-left-16"
>
<ion-input
class=
"padding-left-16"
[(
ngModel
)]="
temp
.
title
"
></ion-input>
<!--<ion-input class="padding-left-16" [(ngModel)]="temp.title"></ion-input>-->
<p
class=
"padding-left-10 padding-right-10"
(
click
)="
editQues
()"
>
<span>
{{temp.title}}
</span>
<ion-icon
style=
"font-size: 20px"
float-right
ios=
"ios-create-outline"
md=
"md-create-outline"
></ion-icon>
</p>
<!--<ion-label class="padding-left-16">{{temp.title}}</ion-label>-->
<!--<ion-label class="padding-left-16">{{temp.title}}</ion-label>-->
</ion-item>
</ion-item>
<div
class=
"question-list"
>
<div
class=
"question-list"
>
...
@@ -53,10 +57,6 @@
...
@@ -53,10 +57,6 @@
<img
src=
"./assets/imgs/survey/add.png"
alt=
""
>
<br>
<img
src=
"./assets/imgs/survey/add.png"
alt=
""
>
<br>
<span>
题目
</span>
<span>
题目
</span>
</div>
</div>
<div
(
click
)="
set
()"
>
<img
src=
"./assets/imgs/survey/set.png"
alt=
""
>
<br>
<span>
设置
</span>
</div>
<div
(
click
)="
look
()"
>
<div
(
click
)="
look
()"
>
<img
src=
"./assets/imgs/survey/look.png"
alt=
""
>
<br>
<img
src=
"./assets/imgs/survey/look.png"
alt=
""
>
<br>
<span>
预览
</span>
<span>
预览
</span>
...
@@ -65,5 +65,9 @@
...
@@ -65,5 +65,9 @@
<img
src=
"./assets/imgs/survey/save.png"
alt=
""
>
<br>
<img
src=
"./assets/imgs/survey/save.png"
alt=
""
>
<br>
<span>
保存
</span>
<span>
保存
</span>
</div>
</div>
<div
(
click
)="
release
()"
>
<img
src=
"./assets/imgs/survey/release.png"
>
<br>
<span>
发布
</span>
</div>
</div>
</div>
</ion-footer>
</ion-footer>
\ No newline at end of file
src/pages/surveyManage/item/edit/edit.ts
View file @
22ab2b7b
...
@@ -5,6 +5,7 @@ import {AppService} from "../../../../service/appHttpService";
...
@@ -5,6 +5,7 @@ import {AppService} from "../../../../service/appHttpService";
import
{
message
}
from
"../../../../app/main"
;
import
{
message
}
from
"../../../../app/main"
;
import
{
MinePage
}
from
"../../../tabs/mine/mine"
;
import
{
MinePage
}
from
"../../../tabs/mine/mine"
;
import
{
CreatePage
}
from
"../create/create"
;
import
{
CreatePage
}
from
"../create/create"
;
import
{
DesicrPage
}
from
"../desicr/desicr"
;
@
IonicPage
()
@
IonicPage
()
@
Component
({
@
Component
({
...
@@ -194,4 +195,22 @@ export class EditPage {
...
@@ -194,4 +195,22 @@ export class EditPage {
)
)
}
}
//编辑
editQues
(){
this
.
navCtrl
.
push
(
'DesicrPage'
,{
id
:
this
.
temp
.
id
});
}
//发布
release
(){
this
.
appService
.
alert
(
'确定发布该问卷吗'
,
(
res
)
=>
{
this
.
appService
.
ObserverHttpGetAdd
(
'/wisdomgroup/modules/question/submit/'
,
this
.
temp
.
id
)
.
subscribe
((
res
)
=>
{
this
.
appService
.
popToastView
(
'发布成功'
,
'middle'
,
1000
);
this
.
navCtrl
.
pop
();
})
}
)
}
}
}
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