Commit 06aa8d0a authored by wangqinghua's avatar wangqinghua

图片

parent 2998a412
// http://ionicframework.com/docs/theming/
// App Global Sass
// --------------------------------------------------
// Put style rules here that you want to apply globally. These
// styles are for the entire app and not just one component.
// Additionally, this file can be also used as an entry point
// to import other Sass files to be included in the output CSS.
//
// Shared Sass variables, which can be used to adjust Ionic's
// default Sass variables, belong in "theme/variables.scss".
//
// To declare rules for a specific mode, create a child rule
// for the .md, .ios, or .wp mode classes. The mode class is
// automatically applied to the <body> element in the app.
@import "../theme/icon.scss"; @import "../theme/icon.scss";
.back-button-icon-ios{ .back-button-icon-ios{
...@@ -41,4 +26,50 @@ ...@@ -41,4 +26,50 @@
border: 1px solid #ddd; border: 1px solid #ddd;
border-radius: 4px; border-radius: 4px;
height: 35px; height: 35px;
}
//tabs-icon
ion-icon {
&[class*="custom-"] {
margin: 0 5px 0 0;
vertical-align: middle;
$sz: 20px;
width: $sz;
height: $sz;
}
// custom icons
&[class*="home-on"] {
background: url(../assets/imgs/tabs/icon-home-on.png) no-repeat 50% 50%;
background-size: contain;
}
&[class*="home-off"] {
background: url(../assets/imgs/tabs/icon-home-off.png) no-repeat 50% 50%;
background-size: contain;
}
&[class*="contact-on"] {
background: url(../assets/imgs/tabs/icon-contact-on.png) no-repeat 50% 50%;
background-size: contain;
}
&[class*="contact-off"] {
background: url(../assets/imgs/tabs/icon-contact-off.png) no-repeat 50% 50%;
background-size: contain;
}
&[class*="notice-on"] {
background: url(../assets/imgs/tabs/icon-notice-on.png) no-repeat 50% 50%;
background-size: contain;
}
&[class*="notice-off"] {
background: url(../assets/imgs/tabs/icon-notice-off.png) no-repeat 50% 50%;
background-size: contain;
}
&[class*="owner-on"] {
background: url(../assets/imgs/tabs/icon-onwer-on.png) no-repeat 50% 50%;
background-size: contain;
}
&[class*="owner-off"] {
background: url(../assets/imgs/tabs/icon-owner-off.png) no-repeat 50% 50%;
background-size: contain;
}
} }
\ No newline at end of file
...@@ -4,6 +4,8 @@ page-duty { ...@@ -4,6 +4,8 @@ page-duty {
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
height: 3rem;
background-color: #fff;
} }
.duty div{ .duty div{
width: 50%; width: 50%;
...@@ -20,7 +22,7 @@ page-duty { ...@@ -20,7 +22,7 @@ page-duty {
width: 100%; width: 100%;
height: 2px; height: 2px;
background-color: #24bafc; background-color: #24bafc;
bottom: -8px; bottom: -10px;
left: 0px; left: 0px;
} }
} }
...@@ -19,20 +19,19 @@ export class DutyPage { ...@@ -19,20 +19,19 @@ export class DutyPage {
menuList = [ menuList = [
{name:'值班安排'}, {name:'值班安排'},
{name:'我的值班'}, {name:'我的值班'},
] ];
swiperIndex; swiperIndex;
changeType = 1; changeType = 1;
dayObj; dayObj;
nightObj; nightObj;
nowDuty; nowDuty;
historyDuty; historyDuty;
date: string[] = ['2018-01-01', '2018-01-02', '2018-01-05'];
options: CalendarComponentOptions = { options: CalendarComponentOptions = {
from: new Date(2000, 0, 1), from: new Date(2000, 0, 1),
monthFormat: 'YYYY 年 MM 月 ', monthFormat: 'YYYY 年 MM 月 ',
weekdays: weekDay, weekdays: weekDay,
monthPickerFormat:monthCh, monthPickerFormat:monthCh,
pickMode: 'multi', pickMode: 'single',
color:'danger' color:'danger'
}; };
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
...@@ -65,9 +64,9 @@ export class DutyPage { ...@@ -65,9 +64,9 @@ export class DutyPage {
} }
onChange(e){ onChange(e){
const date = new Date(e.time).toLocaleDateString(); console.log(e);
const date = new Date(e).toLocaleDateString();
this.getDuty(date); this.getDuty(date);
console.log(date);
} }
getDuty(date){ getDuty(date){
......
...@@ -37,8 +37,6 @@ export class LoginPage { ...@@ -37,8 +37,6 @@ export class LoginPage {
} }
ionViewDidLoad(){ ionViewDidLoad(){
alert("123");
this.storage.get("userLoginInfo").then((value)=>{ this.storage.get("userLoginInfo").then((value)=>{
if(value!=null && value != ''){ if(value!=null && value != ''){
this.user = value; this.user = value;
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
<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">
<ion-item *ngFor="let item of qList;let i = index" (click)="itemEdit(i)"> <ion-item *ngFor="let item of contentList;let i = index" (click)="itemEdit(i)">
<div class="item-content"> <div class="item-content">
<p>1.【判断】是否愿意修养</p> <p>{{i +1}}.{{item.title}}</p>
<p><input type="radio"></p> <p><input type="radio"></p>
<p><input type="radio"></p> <p><input type="radio"></p>
</div> </div>
......
...@@ -8,37 +8,43 @@ ...@@ -8,37 +8,43 @@
<div class="swiper-container"> <div class="swiper-container">
<div class="swiper-wrapper"> <div class="swiper-wrapper">
<!-- {{i==0?'bottomLine':''}}是初始化的时候默认选择第一个菜单 --> <!-- {{i==0?'bottomLine':''}}是初始化的时候默认选择第一个菜单 -->
<!--<div class="swiper-slide" *ngFor="let item of menuList;let i=index;" tappable (click)="selectPageMenu(i)">--> <div class="swiper-slide" *ngFor="let item of menuList;let i=index;" tappable (click)="selectPageMenu(i)">
<!--<span class=" {{swiperIndex == i? 'swiper-title':''}} ">--> <span class=" {{swiperIndex == i? 'swiper-title':''}} ">
<!--{{item.name}}--> {{item.name}}
<!--</span>--> </span>
<!--<span></span>--> <span></span>
<!--</div>--> </div>
</div> </div>
</div> </div>
</div> </div>
</ion-header> </ion-header>
<ion-content> <!--<ion-content style="{{showOp == true ? 'height: calc(100vh - 11rem);':''}}">-->
<ion-content [ngStyle]="{ 'height':showOp == true? 'calc(100vh - 11rem)':'' }">
<ion-content direction="y" scrollbar-y="true" class="bgc-e7e8ed"> <ion-content direction="y" scrollbar-y="true" class="bgc-e7e8ed">
<ion-list> <ion-list>
<ion-item class="item-list" *ngFor="let item of contentList.datalist"> <!--<ng-container *ngIf="contentList.datalist.length > 0">-->
<div class="item" (click)="showOpra(item)"> <ion-item class="item-list" *ngFor="let item of contentList.datalist">
<div class="item-header"> <div class="item" (click)="showOpra(item)">
<div class="item-header-style"> <div class="item-header">
<span class="item-title">{{item.title}}</span> <div class="item-header-style">
<span float-right class="btn btn1" *ngIf="item.state==1 ">未发布</span> <span class="item-title">{{item.title}}</span>
<span float-right class="btn btn2" *ngIf="item.state==2 ">已发布</span> <span float-right class="btn btn1" *ngIf="item.state==1 ">未发布</span>
<span float-right class="btn btn3" *ngIf="item.state==3 ">已过期</span> <span float-right class="btn btn2" *ngIf="item.state==2 ">已发布</span>
<span float-right class="btn btn3" *ngIf="item.state==3 ">已过期</span>
</div>
</div>
<div class="content-button">
<span>参与人员:</span>
<span>{{item.groupName}}</span>
</div> </div>
</div> </div>
<div class="content-button"> </ion-item>
<span>参与人员:</span> <!--</ng-container>-->
<span>{{item.groupName}}</span> <!--<ng-container *ngIf="contentList.datalist.length == 0">-->
</div> <!--暂无数据-->
</div> <!--</ng-container>-->
</ion-item>
</ion-list> </ion-list>
</ion-content> </ion-content>
</ion-content> </ion-content>
......
...@@ -5,7 +5,6 @@ page-list { ...@@ -5,7 +5,6 @@ page-list {
.swiper-container{ .swiper-container{
width: 100%; width: 100%;
height: 40px; height: 40px;
border-bottom: 1px solid #dddddd;
} }
.swiper-slide{ .swiper-slide{
//设置菜单栏的颜色 //设置菜单栏的颜色
...@@ -29,7 +28,7 @@ page-list { ...@@ -29,7 +28,7 @@ page-list {
width: 100%; width: 100%;
height: 2px; height: 2px;
background-color: #24bafc; background-color: #24bafc;
bottom: -8px; bottom: -9px;
left: 0px; left: 0px;
} }
} }
...@@ -62,13 +61,18 @@ page-list { ...@@ -62,13 +61,18 @@ page-list {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
height: 100px; height: 11rem;
background-color: #f8f8f8;
border-bottom: 1px solid #bbbbbb;
} }
.footter-opr div{ .footter-opr div{
width: 33%; width: 33%;
text-align: center; display: flex;
justify-content: center;
align-items: center;
} }
.footter-opr div span{ .footter-opr div span{
display: inline-block;
border-radius: 5px; border-radius: 5px;
border: 1px solid #aaa; border: 1px solid #aaa;
padding: 10px 25px; padding: 10px 25px;
......
...@@ -81,6 +81,7 @@ export class ListPage { ...@@ -81,6 +81,7 @@ export class ListPage {
} }
) )
this.swiperIndex = index; this.swiperIndex = index;
this.showOp = false;
//切换页面 //切换页面
// this.contentSlides.slideTo(index); // this.contentSlides.slideTo(index);
} }
......
...@@ -152,12 +152,12 @@ export class HomePage { ...@@ -152,12 +152,12 @@ export class HomePage {
ionViewDidEnter() { ionViewDidEnter() {
setTimeout(() => { setTimeout(() => {
if (this.slidersItems.length > 0) { if (this.slidersItems.length > 0) {
this.slides.freeMode = true; // this.slides.freeMode = true;
this.slides.autoplay = 2000; // this.slides.autoplay = 2000;
this.slides.speed = 500; // this.slides.speed = 500;
this.slides.loop = true; // this.slides.loop = true;
this.slides.autoplayDisableOnInteraction=false; // this.slides.autoplayDisableOnInteraction=false;
this.slides.startAutoplay(); // this.slides.startAutoplay();
} }
}, 1000) }, 1000)
} }
......
<ion-tabs> <ion-tabs>
<ion-tab *ngFor = "let tabRoot of tabRoots" [root] = "tabRoot.root" tabTitle="{{tabRoot.tabTitle}}" tabIcon="{{tabRoot.tabIcon}}"></ion-tab> <ng-container *ngFor = "let tabRoot of tabRoots;let i = index;">
<ion-tab (ionSelect)="onChange(i)" [root] = "tabRoot.root" tabTitle="{{tabRoot.tabTitle}}" tabIcon="{{ tabsIndex == i ? tabRoot.tabIconOn:tabRoot.tabIconOff }}"></ion-tab>
</ng-container>
</ion-tabs> </ion-tabs>
<!-- <ion-tabs>
<ion-tab [root] = "tab1Root" tabTitle="首页" tabIcon="myhome"></ion-tab>
<ion-tab [root] = "tab2Root" tabTitle="通讯录" tabIcon="mycontact"></ion-tab>
<ion-tab *ngIf="role==1" [root] = "tab3Root" tabTitle="工作台" tabIcon="myworkbench"></ion-tab>
<ion-tab *ngIf="role==1" [root] = "tab4Root" tabTitle="我的" tabIcon="mymine"></ion-tab>
<ion-tab *ngIf="role==0" [root] = "tab4Root" tabTitle="我的" tabIcon="mymine"></ion-tab>
</ion-tabs> -->
<!-- 为什么这么写,为了顺序 -->
...@@ -29,7 +29,7 @@ export class TabsPage { ...@@ -29,7 +29,7 @@ export class TabsPage {
userid: string; userid: string;
roleflag: any; roleflag: any;
tabsIndex;
role: any; role: any;
constructor( constructor(
public navCtrl: NavController, public navCtrl: NavController,
...@@ -44,19 +44,27 @@ export class TabsPage { ...@@ -44,19 +44,27 @@ export class TabsPage {
this.tabRoots = [{ this.tabRoots = [{
root: HomePage, root: HomePage,
tabTitle: '首页', tabTitle: '首页',
tabIcon: 'myhome' tabIconOn: 'custom-home-on',
tabIconOff: 'custom-home-off',
index:0
}, { }, {
root: ContactPage, root: ContactPage,
tabTitle: '通讯录', tabTitle: '通讯录',
tabIcon: 'mycontact' tabIconOn: 'custom-contact-on',
tabIconOff: 'custom-contact-off',
index:1
}, { }, {
root: NoticePage, root: NoticePage,
tabTitle: '消息', tabTitle: '消息',
tabIcon: 'myworkbench' tabIconOn: 'custom-notice-on',
tabIconOff: 'custom-notice-off',
index:2
}, { }, {
root: MinePage, root: MinePage,
tabTitle: '我的', tabTitle: '我的',
tabIcon: 'mymine' tabIconOn: 'custom-owner-on',
tabIconOff: 'custom-owner-off',
index:3
}]; }];
//判断是否密码为初始六个0 //判断是否密码为初始六个0
...@@ -70,6 +78,11 @@ export class TabsPage { ...@@ -70,6 +78,11 @@ export class TabsPage {
} }
onChange(e){
this.tabsIndex =e;
}
// ionViewDidEnter() { // ionViewDidEnter() {
// this.queryUserRole(); // this.queryUserRole();
// } // }
......
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