Commit f887ebde authored by wangqinghua's avatar wangqinghua

日历

parent a01da16d
......@@ -33,7 +33,7 @@ export class ActivityTrackPage {
}
goDetail(item) {
this.navCtrl.push("JoinDetailPage",{id:item.id});
this.navCtrl.push("JoinDetailPage",{id:item.id,name:item.activityName});
}
goBack(){
......
......@@ -5,31 +5,25 @@
</ion-header>
<ion-content class="content">
<div class="activity-title">
2018年体检活动处级以下
{{this.acitivityName}}
</div>
<div class="content-box">
<div class="content-box-item {{type == '1'?'bgc-34b4fc':''}} " (click)="noSign()">
<span class="item-title">未报名</span>
<span class="item-title">全部</span>
<span class="item-count">{{notSign}}人</span>
</div>
<div class="content-box-item {{type == '2'?'bgc-34b4fc':''}}" (click)="hasSign()">
<span class="item-title">报名</span>
<div class="content-box-item {{type == '2'?'bgc-34b4fc':''}}" (click)="noSign()">
<span class="item-title">报名</span>
<span class="item-count">{{waitgoOrder}}人</span>
</div>
<div class="content-box-item {{type == '3'?'bgc-34b4fc':''}}" (click)="waitSure()">
<span class="item-title">待确认</span>
<div class="content-box-item {{type == '3'?'bgc-34b4fc':''}}" (click)="sign()">
<span class="item-title">已报名</span>
<span class="item-count">{{waitSureOrder}}人</span>
</div>
</div>
<div class="content-box">
<div class="content-box-item {{type == '4'?'bgc-34b4fc':''}}" (click)="hasgo()">
<span class="item-title">已出行</span>
<span class="item-count">{{hasgoOrder}}人</span>
</div>
<div class="content-box-item {{type == '5'?'bgc-34b4fc':''}}" (click)="notgo()">
<span class="item-title">未出行</span>
<span class="item-count">{{notgoOrder}}人</span>
<div class="content-box-item {{type == '4'?'bgc-34b4fc':''}}" (click)="notJoin()">
<span class="item-title">不参加</span>
<span class="item-count">{{waitSureOrder}}人</span>
</div>
</div>
......@@ -41,7 +35,7 @@
<img *ngIf="item.user?.gender == '1'||item.user?.gender == null" src="./assets/imgs/head.png" class="person-photo">
<img *ngIf="item.user?.gender == '0'" src="./assets/imgs/head.png" class="person-photo">
<div class="item-box">
<p class="person-name">{{item.username}}
<p class="person-name">{{item.userName}}
<ion-icon class="person-sex-male" *ngIf="item.user?.gender == '1'||item.user?.gender == null" name="male"></ion-icon>
<ion-icon class="person-sex-female" *ngIf="item.user?.gender == '0'" name="female"></ion-icon>
</p>
......
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams, AlertController, ToastController } from 'ionic-angular';
import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams, AlertController, ToastController} from 'ionic-angular';
import { Http, Response, } from '@angular/http';
import {Http, Response,} from '@angular/http';
import { AppService } from '../../../service/appHttpService';
import { ActivityStatisticService } from '../../../service/activityStatisticService';
import {AppService} from '../../../service/appHttpService';
import {ActivityStatisticService} from '../../../service/activityStatisticService';
import {ReplaceApplyPage} from "../replace-apply/replace-apply";
@IonicPage()
@Component({
selector: 'page-joinDetail',
templateUrl: 'joinDetail.html',
selector: 'page-joinDetail',
templateUrl: 'joinDetail.html',
})
export class JoinDetailPage {
items:object[];
items: object[];
users:object[];
users: object[];
isNoSignFlag:boolean = false;
isNoSignFlag: boolean = false;
acitivityid:string;
acitivityid: string;
acitivityName: string;
type = '1';
type = '1';
//待出行
waitgoOrder:number;
//待确认
waitSureOrder:number;
//未出行
notgoOrder:number;
//已出行
hasgoOrder:number;
//未报名
notSign:number;
constructor(public navCtrl: NavController,
public navParams: NavParams,
public alertCtrl: AlertController,
public http: Http,
public appService: AppService,
public toast: ToastController,
public activityStatisticService: ActivityStatisticService) {
}
ionViewDidEnter(){
/** 订单状态 (1.待出行(已报名)、2.待确认(已报名未确认)、3.报名未出行、4.已完成 (3,4均为确认状态))*/
this.acitivityid = this.navParams.get("id"); //活动id
//初始化加载未报备
this.items = [];
//this.role = this.navParams.get("role");
this.activityStatisticService.activityOrderCount(this.acitivityid,(data) => {
this.waitgoOrder = data["waitgoOrder"];
this.waitSureOrder = data["waitSureOrder"];
this.notgoOrder = data["notgoOrder"];
this.hasgoOrder = data["hasgoOrder"];
});
this.appService.ObserverHttpPost("/wisdomgroup/modules/activity/notSignActivityList",{activityid:this.acitivityid})
.subscribe((res: Response) => {
let resultback = res.json();
this.items = resultback;
this.notSign = this.items.length;
}, error => {
this.appService.alert('网络异常!');
}
);
}
conmon(state_value){
this.isNoSignFlag = true;
this.items = [];
this.appService.ObserverHttpPost("/wisdomgroup/modules/order/orderWaitGoWithActivityid",{id:this.acitivityid,state:state_value})
.subscribe((res: Response) => {
let resultback = res.json();
this.items = resultback;
}, error => {
this.appService.alert('网络异常!');
}
);
}
//报名待出行
hasSign(){
this.type = '2';
this.conmon(1);
}
//待确认
waitSure(){
this.type = '3';
this.conmon(2);
}
//已确认未出行
notgo(){
this.type = '5';
this.conmon(3);
}
//已确认出行
hasgo(){
this.type = '4';
this.conmon(4);
}
//未报名
noSign(){
this.type = '1';
this.items = [];
this.isNoSignFlag = false;
this.appService.ObserverHttpPost("/wisdomgroup/modules/activity/notSignActivityList",{activityid:this.acitivityid})
.subscribe((res: Response) => {
let resultback = res.json();
this.items = resultback;
}, error => {
this.appService.alert('网络异常!');
}
);
}
//代报名
goSignUp(item){
this.navCtrl.push('ReplaceApplyPage',{id:this.acitivityid,personInfo:item})
waitgoOrder: number;
//待确认
waitSureOrder: number;
//未出行
notgoOrder: number;
//已出行
hasgoOrder: number;
//未报名
notSign: number;
constructor(public navCtrl: NavController,
public navParams: NavParams,
public alertCtrl: AlertController,
public http: Http,
public appService: AppService,
public toast: ToastController,
public activityStatisticService: ActivityStatisticService) {
}
ionViewDidEnter() {
/** 订单状态 (1.待出行(已报名)、2.待确认(已报名未确认)、3.报名未出行、4.已完成 (3,4均为确认状态))*/
this.acitivityid = this.navParams.get("id"); //活动id
this.acitivityName = this.navParams.get("name"); //活动名称
//初始化加载未报备
this.items = [];
this.activityStatisticService.activityOrderCount(this.acitivityid, (data) => {
this.waitgoOrder = data["waitgoOrder"];
this.waitSureOrder = data["waitSureOrder"];
this.notgoOrder = data["notgoOrder"];
this.hasgoOrder = data["hasgoOrder"];
});
this.appService.ObserverHttpGetAdd("/wisdomgroup/modules/activity/signAll/", this.acitivityid)
.subscribe((res: Response) => {
let resultback = res.json();
this.items = resultback;
this.notSign = this.items.length;
}, error => {
this.appService.alert('网络异常!');
}
);
}
conmon(state_value) {
this.isNoSignFlag = true;
this.items = [];
this.appService.ObserverHttpPost("/wisdomgroup/modules/order/orderWaitGoWithActivityid", {
id: this.acitivityid,
state: state_value
})
.subscribe((res: Response) => {
let resultback = res.json();
this.items = resultback;
}, error => {
this.appService.alert('网络异常!');
}
);
}
//报名待出行
hasSign() {
this.type = '2';
this.conmon(1);
}
//待确认
waitSure() {
this.type = '3';
this.conmon(2);
}
//不参加
notJoin() {
this.isNoSignFlag = true;
this.type = '4';
this.appService.ObserverHttpGet("/wisdomgroup/modules/activityNon", null)
.subscribe((res: Response) => {
this.items = res.json().data;
}, error => {
this.appService.alert('网络异常!');
}
);
}
//已确认未出行
notgo() {
this.type = '5';
this.conmon(3);
}
//已确认出行
hasgo() {
this.type = '4';
this.conmon(4);
}
//未报名
noSign() {
this.type = '2';
this.items = [];
this.isNoSignFlag = false;
this.appService.ObserverHttpPost("/wisdomgroup/modules/activity/notSignActivityList", {activityid: this.acitivityid})
.subscribe((res: Response) => {
let resultback = res.json();
this.items = resultback;
}, error => {
this.appService.alert('网络异常!');
}
);
}
//已报名
sign() {
this.type = '3';
this.items = [];
this.isNoSignFlag = false;
this.appService.ObserverHttpGetAdd("/wisdomgroup/modules/activity/signActivityList/", this.acitivityid)
.subscribe((res: Response) => {
let resultback = res.json();
this.items = resultback;
}, error => {
this.appService.alert('网络异常!');
}
);
}
//代报名
goSignUp(item) {
this.navCtrl.push('ReplaceApplyPage', {id: this.acitivityid, personInfo: item})
}
//不参加
sayNo(item){
this.appService.ObserverHttpPost("/wisdomgroup/modules/activityNon/",item.id)
sayNo(item) {
this.appService.ObserverHttpPostAdd("/wisdomgroup/modules/activityNon/", item.id)
.subscribe((res: Response) => {
}, error => {
......
......@@ -42,9 +42,9 @@
<img src="./assets/imgs/home/icon-bbgz.png" alt="">
<label class="label2-2">报备跟踪</label>
</div>
<div class="card" (click)="goToSurveyManage()">
<img src="./assets/imgs/home/icon-wjgl.png" alt="">
<label class="label2-2 more2-2">问卷管理</label>
<div class="card" (click)="goToMySurvey()">
<img src="./assets/imgs/home/icon-wjtc.png" alt="">
<label class="label2-2 more2-2">问卷调查</label>
</div>
<div class="card" (click)="gotoMore()">
<img src="./assets/imgs/home/icon-more.png" alt="">
......
......@@ -310,7 +310,7 @@ page-home {
content: '';
position: absolute;
top: 23%;
left: -10px;
left: -11px;
width:8px;
height:8px;
border-radius:50%;
......
......@@ -280,6 +280,11 @@ export class HomePage {
});
}
//问卷调查
goToMySurvey(){
this.navCtrl.push('MySurveyPage');
}
goDuty(){
this.navCtrl.push("DutyPage");
}
......
page-mine {
.mine-header{
background-color: #2eb4fc;
background-color: #34b4fc;
padding: 25px 16px
}
......@@ -100,7 +100,7 @@ page-mine {
height: 15px;
}
.list-ios .item-block .item-inner {
border-bottom: 0.55px solid #c8c7cc !important;
border-bottom: 0.55px solid #dddddd !important;
}
......
......@@ -134,6 +134,18 @@ export class AppService {
})
}
ObserverHttpPostAdd(url, params) {
// return this.http.post(AppGlobal.domain+url,params,{ //app
return this.http.post(url+ params, { //本地
headers: new Headers({
// "Accept": "application/json",
"Content-Type": "application/json"
// 'Content-Type':'application/x-www-form-urlencoded,charset=UTF-8'
})
})
}
ObserverHttpPostOption(url,data) {
// return this.http.post(AppGlobal.domain+url,null,{ //app
return this.http.post(url, null,{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment