Commit 9efb07f1 authored by wangqinghua's avatar wangqinghua

color

parent 1943bae7
...@@ -165,5 +165,5 @@ ionic cordova plugin add cordova-plugin-badge ...@@ -165,5 +165,5 @@ ionic cordova plugin add cordova-plugin-badge
"proxyUrl": "http://180.168.156.212:2931/wisdomgroup" "proxyUrl": "http://180.168.156.212:2931/wisdomgroup"
"proxyUrl": "http://10.10.200.26:8080/wisdomgroup" "proxyUrl": "http://10.10.200.11:8080/wisdomgroup"
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.starter" version="1.1.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <widget id="io.ionic.starter" version="1.1.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>智汇19号</name> <name>智汇19号</name>
<description>An awesome Ionic/Cordova app.</description> <description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author> <author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<img src="./assets/imgs/home/icon-zb.png" alt=""> <img src="./assets/imgs/home/icon-zb.png" alt="">
<label class="label2-2">值班情况</label> <label class="label2-2">值班情况</label>
</div> </div>
<ng-container *ngIf="role == 1 || role == 2 || role == 3">
<div class="card" (click)="goActivityTrack()"> <div class="card" (click)="goActivityTrack()">
<img src="./assets/imgs/home/icon-hdgz.png" alt=""> <img src="./assets/imgs/home/icon-hdgz.png" alt="">
<label class="label2-2">活动跟踪</label> <label class="label2-2">活动跟踪</label>
...@@ -33,10 +34,12 @@ ...@@ -33,10 +34,12 @@
<img src="./assets/imgs/home/icon-bbgz.png" alt=""> <img src="./assets/imgs/home/icon-bbgz.png" alt="">
<label class="label2-2">报备跟踪</label> <label class="label2-2">报备跟踪</label>
</div> </div>
</ng-container>
<div class="card" (click)="goToMySurvey()"> <div class="card" (click)="goToMySurvey()">
<img src="./assets/imgs/home/icon-wjtc.png" alt=""> <img src="./assets/imgs/home/icon-wjtc.png" alt="">
<label class="label2-2">问卷调查</label> <label class="label2-2">问卷调查</label>
</div> </div>
<ng-container *ngIf="role == 3">
<div class="card" (click)="goToSurveyManage()"> <div class="card" (click)="goToSurveyManage()">
<img src="./assets/imgs/home/icon-wjgl.png" alt=""> <img src="./assets/imgs/home/icon-wjgl.png" alt="">
<label class="label2-2 more2-2">问卷管理</label> <label class="label2-2 more2-2">问卷管理</label>
...@@ -45,5 +48,6 @@ ...@@ -45,5 +48,6 @@
<img src="./assets/imgs/home/icon-zbhb.png" alt=""> <img src="./assets/imgs/home/icon-zbhb.png" alt="">
<label class="label2-2 more2-2">值班换班</label> <label class="label2-2 more2-2">值班换班</label>
</div> </div>
</ng-container>
</div> </div>
</ion-content> </ion-content>
...@@ -3,6 +3,8 @@ import { IonicPage, NavController, NavParams } from 'ionic-angular'; ...@@ -3,6 +3,8 @@ import { IonicPage, NavController, NavParams } from 'ionic-angular';
import {ListPage} from "../../surveyManage/list/list"; import {ListPage} from "../../surveyManage/list/list";
import {ChangeApplyListPage} from "../../manageDuty/change-apply-list/change-apply-list"; import {ChangeApplyListPage} from "../../manageDuty/change-apply-list/change-apply-list";
import { MySurveyPage } from "../../mine/mySurvey/my-survey/my-survey"; import { MySurveyPage } from "../../mine/mySurvey/my-survey/my-survey";
import {Response} from "@angular/http";
import {AppService} from "../../../service/appHttpService";
@IonicPage() @IonicPage()
...@@ -12,11 +14,23 @@ import { MySurveyPage } from "../../mine/mySurvey/my-survey/my-survey"; ...@@ -12,11 +14,23 @@ import { MySurveyPage } from "../../mine/mySurvey/my-survey/my-survey";
}) })
export class MoreAppPage { export class MoreAppPage {
constructor(public navCtrl: NavController, public navParams: NavParams) { role;
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) {
} }
ionViewDidLoad() { ionViewDidLoad() {
console.log('ionViewDidLoad MoreAppPage'); console.log('ionViewDidLoad MoreAppPage');
this.getRole();
}
//获取权限
getRole(){
this.appService.ObserverHttpGet("/wisdomgroup/app/getRoles", null).subscribe((res: Response) => {
this.role = res.json();
}, error => {
this.appService.alert('系统错误!');
});
} }
//问卷调查 //问卷调查
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
<img src="./assets/imgs/home/icon-zb.png" alt=""> <img src="./assets/imgs/home/icon-zb.png" alt="">
<label class="label2-2">值班情况</label> <label class="label2-2">值班情况</label>
</div> </div>
<ng-container *ngIf="role == 2 || role == 1 || role == 3">
<div class="card" (click)="goActivityTrack()"> <div class="card" (click)="goActivityTrack()">
<img src="./assets/imgs/home/icon-hdgz.png" alt=""> <img src="./assets/imgs/home/icon-hdgz.png" alt="">
<label class="label2-2">活动跟踪</label> <label class="label2-2">活动跟踪</label>
...@@ -42,6 +43,7 @@ ...@@ -42,6 +43,7 @@
<img src="./assets/imgs/home/icon-bbgz.png" alt=""> <img src="./assets/imgs/home/icon-bbgz.png" alt="">
<label class="label2-2">报备跟踪</label> <label class="label2-2">报备跟踪</label>
</div> </div>
</ng-container>
<div class="card" (click)="goToMySurvey()"> <div class="card" (click)="goToMySurvey()">
<img src="./assets/imgs/home/icon-wjtc.png" alt=""> <img src="./assets/imgs/home/icon-wjtc.png" alt="">
<label class="label2-2 more2-2">问卷调查</label> <label class="label2-2 more2-2">问卷调查</label>
......
...@@ -68,6 +68,7 @@ export class HomePage { ...@@ -68,6 +68,7 @@ export class HomePage {
//当前第几周 //当前第几周
weekNo; weekNo;
role;
constructor(public navCtrl: NavController, public activityStatisticService: ActivityStatisticService, constructor(public navCtrl: NavController, public activityStatisticService: ActivityStatisticService,
public appService: AppService, public http: Http, private calendar: Calendar, public storage: Storage, public appService: AppService, public http: Http, private calendar: Calendar, public storage: Storage,
...@@ -97,6 +98,7 @@ export class HomePage { ...@@ -97,6 +98,7 @@ export class HomePage {
this.appService.alert('系统错误!'); this.appService.alert('系统错误!');
}); });
this.getRole();
} }
...@@ -134,6 +136,15 @@ export class HomePage { ...@@ -134,6 +136,15 @@ export class HomePage {
//初始化操作记录 //初始化操作记录
} }
//获取权限
getRole(){
this.appService.ObserverHttpGet("/wisdomgroup/app/getRoles", null).subscribe((res: Response) => {
this.role = res.json();
}, error => {
this.appService.alert('系统错误!');
});
}
goMyActivity() { goMyActivity() {
this.navCtrl.push("MyActivityListPage"); this.navCtrl.push("MyActivityListPage");
} }
......
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