Commit f371c0ac authored by wangqinghua's avatar wangqinghua

color

parent c3431ef6
...@@ -28,7 +28,7 @@ export class DutyPage { ...@@ -28,7 +28,7 @@ export class DutyPage {
nightObj = { nightObj = {
name:'' name:''
}; };
nowDuty; nowDuty = [];
historyDuty; historyDuty;
options: CalendarComponentOptions = { options: CalendarComponentOptions = {
from: new Date(2000, 0, 1), from: new Date(2000, 0, 1),
......
<!--
Generated template for the MyDutyPage page.
See http://ionicframework.com/docs/components/#navigation for more info on
Ionic pages and navigation.
-->
<ion-header> <ion-header>
<ion-navbar> <ion-navbar>
<ion-title>myDuty</ion-title> <ion-title>我的值班</ion-title>
</ion-navbar> </ion-navbar>
</ion-header> </ion-header>
<ion-content padding> <ion-content class="bgc-e7e8ed">
<div class="duty">
<div class="dutyItem" (click)="change(1)">
<span class="{{changeType == 1?'duty-title':''}}">待执行</span>
</div>
<div class="dutyItem" (click)="change(2)">
<span class="{{changeType == 2?'duty-title':''}}">已完成</span>
</div>
</div>
<ng-container *ngIf="changeType == 1">
<div class="duty-content">
<ion-list *ngIf="nowDuty.length > 0">
<ion-item class="dutyItem" class="margin-top-10" *ngFor="let item of nowDuty">
<div class="margin-bottom-15">
<span>{{item.dutyDate | date:'yyyy-MM-dd'}}</span>
<span *ngIf="item.type == 0">白班</span>
<span *ngIf="item.type == 1">夜班</span>
<span float-right class="duty-state">待值班</span>
</div>
<div>
<span class="color-666" style="font-size: 1.5rem">
<span *ngIf="item.type == 1">工作日</span>
<span *ngIf="item.type == 2">节假日</span>
<span *ngIf="item.type == 3">调休</span>
<span *ngIf="item.type == 4">调班</span>
</span>
<span class="span-btn" float-right (click)="dutyDetail(item)" *ngIf="item.applyId">查看详情</span>
<span class="span-btn" float-right (click)="dutyApply(item)" *ngIf="!item.applyId">申请换班</span>
</div>
</ion-item>
</ion-list>
<ion-list text-center style="margin-top: 10rem" *ngIf="nowDuty.length == 0">
<img style="width: 20%;" src="./assets/imgs/no-info.png" alt="">
<p text-center>
暂无值班
</p>
</ion-list>
</div>
</ng-container>
<ng-container *ngIf="changeType == 2">
<div class="duty-content">
<ion-list *ngIf="historyDuty.length > 0">
<ion-item class="dutyItem" class="margin-top-10" *ngFor="let item of nowDuty">
<div class="margin-bottom-15">
<span>{{item.dutyDate | date:'yyyy-MM-dd'}}</span>
<span *ngIf="item.type == 0">白班</span>
<span *ngIf="item.type == 1">夜班</span>
<span float-right class="duty-state">待值班</span>
</div>
<div>
<span class="color-666" style="font-size: 1.5rem">
<span *ngIf="item.type == 1">工作日</span>
<span *ngIf="item.type == 2">节假日</span>
<span *ngIf="item.type == 3">调休</span>
<span *ngIf="item.type == 4">调班</span>
</span>
<span class="span-btn" float-right (click)="dutyDetail(item)" *ngIf="item.applyId">查看详情</span>
<span class="span-btn" float-right (click)="dutyApply(item)" *ngIf="!item.applyId">申请换班</span>
</div>
</ion-item>
</ion-list>
<ion-list text-center style="margin-top: 10rem" *ngIf="historyDuty.length == 0">
<img style="width: 20%;" src="./assets/imgs/no-info.png" alt="">
<p text-center>
暂无值班
</p>
</ion-list>
</div>
</ng-container>
</ion-content> </ion-content>
page-my-duty { page-my-duty {
.list-ios .item-block .item-inner{
border: none;
}
.duty{
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
height: 36px;
background-color: #fff;
}
.duty-state{
border: 1px solid #f8ac56;
font-size: 1.3rem;
border-radius: 4px;
padding: 1px 4px;
color: #f8ac56;
}
.duty div{
width: 50%;
text-align: center;
position: relative;
}
.duty-title{
position: relative;
color: #24bafc;
}
.duty-title::after{
content: '';
position: absolute;
width: 100%;
height: 2px;
background-color: #24bafc;
bottom: -10px;
left: 0px;
}
.span-btn{
background-color: #34b4fc;
font-size: 1.4rem;
padding: 4px 6px;
color: #fff;
border-radius: 3px;
}
.dutyItem > div{
margin-bottom: 10px;
}
.daySpan{
padding: 2px 20px;
background-color: #589bfc;
color: #fff;
border-bottom-right-radius: 5px;
}
.nightSpan{
padding: 4px 20px;
background-color: #4e5e6f;
color: #fff;
border-bottom-right-radius: 5px;
}
.duty-Obj .item-ios p {
margin-bottom: 15px;
}
.duty-Obj .label-ios{
margin: 0;
}
.duty-Obj{
.item-ios.item-block .item-inner{
background-color: #f5f6f7;
}
}
} }
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular'; import { IonicPage, NavController, NavParams } from 'ionic-angular';
import {AppService} from "../../../service/appHttpService";
/**
* Generated class for the MyDutyPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage() @IonicPage()
@Component({ @Component({
...@@ -15,11 +10,54 @@ import { IonicPage, NavController, NavParams } from 'ionic-angular'; ...@@ -15,11 +10,54 @@ import { IonicPage, NavController, NavParams } from 'ionic-angular';
}) })
export class MyDutyPage { export class MyDutyPage {
constructor(public navCtrl: NavController, public navParams: NavParams) { changeType = 1;
nowDuty = [];
historyDuty = [];
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) {
} }
ionViewDidLoad() { ionViewDidLoad() {
console.log('ionViewDidLoad MyDutyPage'); console.log('ionViewDidLoad MyDutyPage');
this.getDuty();
}
change(type){
this.changeType = type;
}
getDuty(){
const data = {
type:0
};
this.appService.ObserverHttpGetOption('/wisdomgroup/schedule/app/getMySchedule',data)
.subscribe((res)=>{
this.nowDuty = res.json();
});
const data1 = {
type:1
};
this.appService.ObserverHttpGetOption('/wisdomgroup/schedule/app/getMySchedule',data1)
.subscribe((res)=>{
this.historyDuty = res.json();
});
}
//提交申请
dutyApply(item){
this.navCtrl.push('DutyApplyPage',{
id:item.id,
date:item.dutyDate
})
}
//申请详情
dutyDetail(item){
this.navCtrl.push('DutyDetailPage',{
"id":item.applyId,
'time':item.dutyDate
})
} }
} }
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<span>参与人员:</span> <span>参与人员:</span>
<span *ngIf="item.groupName">{{item.groupName}}</span> <span *ngIf="item.groupName">{{item.groupName}}</span>
<span *ngIf="!item.groupName">全体人员</span> <span *ngIf="!item.groupName">全体人员</span>
<span float-right class="join" (click)="geToWrite(item)">参与</span> <span *ngIf="item?.writeSelf == 0" float-right class="join" (click)="geToWrite(item)">参与</span>
<span float-right class="look" (click)="goToResult(item)">查看</span> <span *ngIf="item?.writeSelf != 0" float-right class="look" (click)="goToResult(item)">查看</span>
</div> </div>
</div> </div>
</ion-item> </ion-item>
......
...@@ -15,6 +15,7 @@ export class CreatePage { ...@@ -15,6 +15,7 @@ export class CreatePage {
qType; //题目类型 qType; //题目类型
temp; //问卷信息 temp; //问卷信息
titile; //标题 titile; //标题
index = 0; //序号
quesDescList = []; quesDescList = [];
set = { //设置 set = { //设置
lastchange: '1', lastchange: '1',
...@@ -37,8 +38,9 @@ export class CreatePage { ...@@ -37,8 +38,9 @@ export class CreatePage {
option_title: '', //选项文字 option_title: '', //选项文字
canFill: 2, // 1是 2否 canFill: 2, // 1是 2否
isNeed: 1, // 1是 2否 isNeed: 1, // 1是 2否
index: 0 index: this.index
}; //序号 }; //序号
this.index ++;
this.quesDescList.push(option); this.quesDescList.push(option);
} }
...@@ -59,7 +61,7 @@ export class CreatePage { ...@@ -59,7 +61,7 @@ export class CreatePage {
option_title: '否', //选项文字 option_title: '否', //选项文字
canFill: 2, // 1是 2否 canFill: 2, // 1是 2否
isNeed: 1, // 1是 2否 isNeed: 1, // 1是 2否
index: 0 index: 1
}; //序号 }; //序号
this.quesDescList.push(option1); this.quesDescList.push(option1);
this.quesDescList.push(option2); this.quesDescList.push(option2);
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</div> </div>
</div> </div>
<div class="item3" style="padding-top: 0px;"> <div class="item3" style="padding-top: 0px;">
<div class="item3-2" (click)="gotoNotice()"> <div class="item3-2" style="background-color:#f8f8f8;" (click)="gotoNotice()">
<div class="card3" style="width: 15%;"> <div class="card3" style="width: 15%;">
<span class="img-tips"></span> <span class="img-tips"></span>
<img src="./assets/imgs/home/icon-mail.png" alt=""> <img src="./assets/imgs/home/icon-mail.png" alt="">
......
page-mine { page-mine {
.header-ios .toolbar-ios:last-child .toolbar-background-ios {
border-bottom: 1px solid #50c1fd;
}
.label-ios { .label-ios {
margin: 15px 8px 15px 0; margin: 15px 8px 15px 0;
} }
......
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