Commit 9bf7404b authored by wangqinghua's avatar wangqinghua

权限划分

parent d7a4157e
...@@ -73,7 +73,7 @@ export class MoreAppPage { ...@@ -73,7 +73,7 @@ export class MoreAppPage {
} }
//获取权限 //获取权限
// 返回值int 3-管理员,2-处室领导,1-内勤人员,0-普通用户 // 返回值int :3-管理员,2-处室领导,1-内勤人员,0-普通用户
getRole() { getRole() {
this.appService.ObserverHttpGet("/wisdomgroup/app/getRoles", null).subscribe((res: Response) => { this.appService.ObserverHttpGet("/wisdomgroup/app/getRoles", null).subscribe((res: Response) => {
this.role = res.json(); this.role = res.json();
......
<ion-header>
<ion-navbar>
<ion-title>审核</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<div class="stuff">
<div class="stuff-container">
<div class="stuff-title">
{{stuffObj?.title}}
</div>
<div class="stuff-info">
<span class="info-publisher">{{stuffObj?.source}}</span>
<span class="info-time">{{stuffObj?.publishTime | date:'yyyy-MM-dd'}}</span>
</div>
<div class="stuff-content">
<p [innerHTML]="stuffObj?.content"></p>
</div>
<div class="stuff-attachments">
<ng-container *ngFor="let item of attachments">
<div *ngIf="item.resourceType == 3">
<video width="100%" height="100%" [src]="url + item.path" controls="controls">
您的浏览器不支持 html5。
</video>
</div>
</ng-container>
<ng-container *ngFor="let item of attachments">
</ng-container>
</div>
</div>
</div>
</ion-content>
<div *ngIf="footerView" class="stuff-footer">
<ion-row>
<ion-col col-6>
<button>退回</button>
</ion-col>
<ion-col col-6>
<button>通过</button>
</ion-col>
</ion-row>
</div>
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { VerifyHandlePage } from './verify-handle';
@NgModule({
declarations: [
VerifyHandlePage,
],
imports: [
IonicPageModule.forChild(VerifyHandlePage),
],
})
export class VerifyHandlePageModule {}
page-verify-handle {
.stuff {
font-size: 1.8rem;
line-height: 2.4rem;
height: calc(100% - 4rem);
overflow-y: scroll;
background-color: #f3f3f3;
.stuff-container {
padding: 1.5rem;
background-color: #fff;
.stuff-title {
font-weight: 600;
font-size: 2.5rem;
margin-bottom: .5rem;
line-height: 3rem;
color: #4c4c4c;
font-family: 'SourceHanSans-Bold';
}
.stuff-info {
font-size: 1.5rem;
margin-bottom: 1rem;
.info-publisher {
color: #5c5c5c;
margin-right: 1rem;
}
.info-time {
color: #888888;
}
}
.stuff-content{
line-height: 2.8rem;
color: #444444;
font-family: 'SourceHanSans-Light';
}
}
}
.stuff-footer {
position: fixed;
bottom: 0;
height: 4rem;
width: 100%;
text-align: center;
line-height: 3rem;
border-top: 1px solid #eeeeee;
z-index: 9;
[col-2] {
line-height: 4rem;
}
.tip-num {
position: absolute;
right: 15px;
top: 10px;
color: #e12724;
font-size: 1rem;
background: #fff;
display: block;
line-height: 1rem;
border-radius: 5px;
}
ion-icon {
color: #666666;
position: relative;
font-size: 2.5rem;
}
ion-icon.main-color {
color: #e66866;
}
.input {
background: #ddd;
border: 1px solid #ddd;
border-radius: 2px;
height: 2.8rem;
line-height: 2.8rem;
color: #666666;
}
}
.error-text {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
background-color: rgba(0, 0, 0, .2);
z-index: 99;
display: flex;
align-items: center;
justify-content: center;
.error-flex {
text-align: center;
width: 80%;
background-color: #fff;
.error-title {
background-color: #5579bb;
color: #ffffff;
padding: 1rem 0;
}
.content-textarea {
margin-top: 1rem;
padding: 10px;
min-height: 100px;
width: 100%;
border: 1px solid #ddd;
}
.error-footer {
height: 4rem;
.sure, .cancel {
color: #ffffff;
background-color: #fd5151;
width: 50%;
margin-right: 10px;
height: 2.5rem;
line-height: 2.5rem;
border-radius: 5px;
}
}
}
}
.stuff-comment {
margin-top: 1rem;
padding: 0 1.5rem;
background-color: #fff;
.comment-title {
border-bottom: 1px solid #dddddd;
font-weight: 500;
padding-bottom: .8rem;
margin-bottom: .8rem;
position: relative;
}
.comment-title::after{
content: '';
position: absolute;
top: 7px;
left: -8px;
width: 3px;
height: 15px;
background-color: #e12724;
}
[col-10],[col-2]{
padding: 0;
}
.comment-item {
.contact-img{
border-radius: 50%;
width: 50px;
height: 50px;
text-align: center;
margin-top: 8px;
}
.comment-info {
color: #d88f27;
font-size: 1.4rem;
line-height: 1.8rem;
font-weight: 500;
margin-bottom: 5px;
}
.commnet-content {
padding: .1rem 0;
font-size: 1.4rem;
color: #333333;
line-height: 1.4rem;
}
.comment-time{
font-size: 1.4rem;
color: #888888;
.repear{
color: #3961b3;
font-size: 1.2rem;
cursor: pointer;
margin-right: 5px;
}
}
}
.comment-item + .comment-item {
border-top: 1px solid #eee;
margin-top: .5rem;
}
}
}
import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {AppGlobal} from "../../../service/http.service";
import {DomSanitizer} from "@angular/platform-browser";
@IonicPage()
@Component({
selector: 'page-verify-handle',
templateUrl: 'verify-handle.html',
})
export class VerifyHandlePage {
stuffObj;
url = AppGlobal.domain + '/wisdomgroup';
attachments; //附件
footerView = true;
constructor(public navCtrl: NavController, public navParams: NavParams,
public sanitizer: DomSanitizer) {
}
ionViewDidLoad() {
this.stuffObj = this.navParams.get('stuff');
if (this.stuffObj.attachments) this.attachments = this.stuffObj.attachments;
let con = this.stuffObj.content.replace(/\r?\n/g, "<br />");
this.stuffObj.content = this.sanitizer.bypassSecurityTrustHtml(con);
}
handle(){
}
}
...@@ -13,84 +13,44 @@ ...@@ -13,84 +13,44 @@
refreshingSpinner="bubbles"> refreshingSpinner="bubbles">
</ion-refresher-content> </ion-refresher-content>
</ion-refresher> </ion-refresher>
<div class="duty"> <div class="main-news">
<div class="dutyItem" (click)="change(1)"> <ng-container *ngFor="let new of collectionList;">
<span class="{{changeType == 1?'duty-title':''}}">待审核</span> <ng-container *ngIf="new.imgUrl">
</div> <ion-row class="news-item" (click)="goToDetail(new)">
<div class="dutyItem" (click)="change(2)"> <ion-col col-8 class="news-left">
<span class="{{changeType == 2?'duty-title':''}}">已审核</span> <p class="news-title">
</div> {{new.title}}
</div> </p>
<ng-container *ngIf="changeType == 1"> <p class="news-end">
<div class="main-news"> <!-- <span>收藏时间:</span><span>{{new.publishTime | date:'yyyy-MM-dd'}}</span>-->
<ng-container *ngFor="let new of collectionList;"> </p>
<ng-container *ngIf="new.imgUrl"> </ion-col>
<ion-row class="news-item" (click)="goToDetail(new)"> <ion-col col-4 class="news-right">
<ion-col col-8 class="news-left"> <img src="{{picture+new.imgUrl}}">
<p class="news-title"> </ion-col>
{{new.title}} </ion-row>
</p>
<p class="news-end">
<!-- <span>收藏时间:</span><span>{{new.publishTime | date:'yyyy-MM-dd'}}</span>-->
</p>
</ion-col>
<ion-col col-4 class="news-right">
<img src="{{picture+new.imgUrl}}">
</ion-col>
</ion-row>
</ng-container>
<ng-container *ngIf="!new.imgUrl">
<ion-row class="news-item" (click)="goToDetail(new)">
<ion-col col-12 class="news-left">
<p class="news-title">
{{new.title}}
</p>
<p class="news-end">
<!-- <span>收藏时间:</span><span>{{new.publishTime | date:'yyyy-MM-dd'}}</span>-->
</p>
</ion-col>
</ion-row>
</ng-container>
</ng-container> </ng-container>
<ion-list text-center style="margin-top: 10rem" *ngIf="!isLoad && collectionList.length == 0"> <ng-container *ngIf="!new.imgUrl">
<img style="width: 20%;" src="./assets/imgs/no-info.png" alt=""> <ion-row class="news-item" (click)="goToDetail(new)">
<p text-center> <ion-col col-12 class="news-left">
暂无收藏 <p class="news-title">
</p> {{new.title}}
</ion-list> </p>
</div> <p class="news-end">
</ng-container> <span>提交人:</span><span>{{new.publishTime | date:'yyyy-MM-dd'}}</span>
<ng-container *ngIf="changeType == 2"> <span>提交时间:</span><span>{{new.publishTime | date:'yyyy-MM-dd'}}</span>
<div class="duty-content"> </p>
<ion-list *ngIf="historyDuty.length > 0"> </ion-col>
<ion-item class="dutyItem" class="margin-top-10" *ngFor="let item of nowDuty"> </ion-row>
<div class="margin-bottom-15"> </ng-container>
<span>{{item.dutyDate | date:'yyyy-MM-dd'}}</span> </ng-container>
<span *ngIf="item.type == 0">白班</span> <ion-list text-center style="margin-top: 10rem" *ngIf="!isLoad && collectionList.length == 0">
<span *ngIf="item.type == 1">夜班</span> <img style="width: 20%;" src="./assets/imgs/no-info.png" alt="">
<span float-right class="duty-state">待值班</span> <p text-center>
</div> 暂无审核
<div> </p>
<span class="color-666" style="font-size: 1.5rem"> </ion-list>
<span *ngIf="item.type == 1">工作日</span> </div>
<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-infinite-scroll (ionInfinite)="doInfinite($event)"> <ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content <ion-infinite-scroll-content
loadingSpinner="bubbles" loadingSpinner="bubbles"
......
...@@ -95,11 +95,16 @@ export class HomePage { ...@@ -95,11 +95,16 @@ export class HomePage {
} }
ionViewDidEnter() { ionViewDidEnter() {
this.getInter();
this.tabsSer.signNow().subscribe( this.tabsSer.signNow().subscribe(
(res) => { (res) => {
this.signObj = res.data; this.signObj = res.data;
} }
); );
}
//获取积分信息
getInter(){
this.tabSer.getUserIntegral().subscribe( this.tabSer.getUserIntegral().subscribe(
(res) => { (res) => {
this.mineInfo = res.data; this.mineInfo = res.data;
...@@ -137,7 +142,6 @@ export class HomePage { ...@@ -137,7 +142,6 @@ export class HomePage {
on: { on: {
slideChangeTransitionEnd: function () { slideChangeTransitionEnd: function () {
that.slideIndex = this.activeIndex + 1; that.slideIndex = this.activeIndex + 1;
console.log(this.realIndex);
that.slideTitle = that.slidersItems[this.activeIndex].title; that.slideTitle = that.slidersItems[this.activeIndex].title;
that.swiperImg.update(); that.swiperImg.update();
}, },
...@@ -168,7 +172,7 @@ export class HomePage { ...@@ -168,7 +172,7 @@ export class HomePage {
} }
scrollHeight() { scrollHeight() {
const height = this.topHeight.nativeElement.offsetHeight + 48; const height = this.topHeight.nativeElement.offsetHeight;
this.content.ionScroll.subscribe(($event) => { this.content.ionScroll.subscribe(($event) => {
this.zone.run(() => { this.zone.run(() => {
if (this.content.scrollTop > height) { if (this.content.scrollTop > height) {
...@@ -252,17 +256,21 @@ export class HomePage { ...@@ -252,17 +256,21 @@ export class HomePage {
let userid = value.userid; let userid = value.userid;
this.tabsSer.getInfo(userid).subscribe( this.tabsSer.getInfo(userid).subscribe(
(res) => { (res) => {
this.partyObj = res.apiResult.data; if (res.apiResult.data) { //党员展示政治生日
//获取是否展示过政治生日 this.partyObj = res.apiResult.data;
const nowDay = this.datePipe.transform(new Date(), 'yyyy-MM-dd'); //获取是否展示过政治生日
const partyBir = localStorage.getItem('partyBir'); const nowDay = this.datePipe.transform(new Date(), 'yyyy-MM-dd');
if (nowDay == partyBir) { const partyBir = localStorage.getItem('partyBir');
setTimeout(() => { if (nowDay != partyBir) {
this.start(); setTimeout(() => {
this.isBir = false; this.start();
}, 500) this.isBir = false;
} else { }, 500)
this.isBir = true; } else {
this.isBir = true;
}
} else { //非党员不展示政治生日
this.isBir = false;
} }
} }
); );
...@@ -324,6 +332,7 @@ export class HomePage { ...@@ -324,6 +332,7 @@ export class HomePage {
if (res.errcode == '1000') { if (res.errcode == '1000') {
this.commonSer.toast('签到成功'); this.commonSer.toast('签到成功');
this.signObj.isSign = 'yes'; this.signObj.isSign = 'yes';
this.getInter();
} else { } else {
this.commonSer.toast(res.errmsg); this.commonSer.toast(res.errmsg);
} }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<ion-content class="bgc-e7e8ed"> <ion-content class="bgc-e7e8ed">
<div class="bgc-fff" style="padding: 1rem;"> <div class="bgc-fff" style="padding: 1rem;">
<div class="mine-box" > <div class="mine-box">
<div class="mine-item" (click)="goTo('PersonInfoPage')"> <div class="mine-item" (click)="goTo('PersonInfoPage')">
<ion-grid> <ion-grid>
<ion-row> <ion-row>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<ion-grid class="padding-0-10"> <ion-grid class="padding-0-10">
<ion-row (click)="goTo('MyActivityListPage')"> <ion-row (click)="goTo('MyActivityListPage')">
<ion-col class="group-left" col-2> <ion-col class="group-left" col-2>
<img src="./assets/imgs/mine/wdhd.png" > <img src="./assets/imgs/mine/wdhd.png">
</ion-col> </ion-col>
<ion-col class="group-right" col-10> <ion-col class="group-right" col-10>
<span>我的活动</span> <span>我的活动</span>
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</ion-row> </ion-row>
<ion-row (click)="goTo('MyReportPage')"> <ion-row (click)="goTo('MyReportPage')">
<ion-col class="group-left" col-2> <ion-col class="group-left" col-2>
<img src="./assets/imgs/mine/wdbb.png" > <img src="./assets/imgs/mine/wdbb.png">
</ion-col> </ion-col>
<ion-col class="group-right" col-10> <ion-col class="group-right" col-10>
<span>我的报备</span> <span>我的报备</span>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</ion-row> </ion-row>
<ion-row (click)="goTo('MySurveyPage')"> <ion-row (click)="goTo('MySurveyPage')">
<ion-col class="group-left" col-2> <ion-col class="group-left" col-2>
<img src="./assets/imgs/mine/wdwj.png" > <img src="./assets/imgs/mine/wdwj.png">
</ion-col> </ion-col>
<ion-col class="group-right" col-10> <ion-col class="group-right" col-10>
<span>我的问卷</span> <span>我的问卷</span>
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
</ion-row> </ion-row>
<ion-row (click)="goTo('MyDutyPage')"> <ion-row (click)="goTo('MyDutyPage')">
<ion-col class="group-left" col-2> <ion-col class="group-left" col-2>
<img src="./assets/imgs/mine/wdzb.png" > <img src="./assets/imgs/mine/wdzb.png">
</ion-col> </ion-col>
<ion-col class="group-right" col-10> <ion-col class="group-right" col-10>
<span>我的值班</span> <span>我的值班</span>
...@@ -80,16 +80,16 @@ ...@@ -80,16 +80,16 @@
</ion-row> </ion-row>
<ion-row (click)="goTo('MyPublishPage')"> <ion-row (click)="goTo('MyPublishPage')">
<ion-col class="group-left" col-2> <ion-col class="group-left" col-2>
<img src="./assets/imgs/mine/wdfb.png" > <img src="./assets/imgs/mine/wdfb.png">
</ion-col> </ion-col>
<ion-col class="group-right" col-10> <ion-col class="group-right" col-10>
<span>我的发布</span> <span>我的发布</span>
<ion-icon name="ios-arrow-forward"></ion-icon> <ion-icon name="ios-arrow-forward"></ion-icon>
</ion-col> </ion-col>
</ion-row> </ion-row>
<ion-row (click)="goTo('VerifyPage')"> <ion-row *ngIf="role == 3" (click)="goTo('VerifyPage')">
<ion-col class="group-left" col-2> <ion-col class="group-left" col-2>
<img src="./assets/imgs/mine/wdfb.png" > <img src="./assets/imgs/mine/wdfb.png">
</ion-col> </ion-col>
<ion-col class="group-right" col-10> <ion-col class="group-right" col-10>
<span>我的审核</span> <span>我的审核</span>
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
</ion-row> </ion-row>
<ion-row (click)="goTo('MyCollectionPage')"> <ion-row (click)="goTo('MyCollectionPage')">
<ion-col class="group-left" col-2> <ion-col class="group-left" col-2>
<img src="./assets/imgs/mine/wdsc.png" > <img src="./assets/imgs/mine/wdsc.png">
</ion-col> </ion-col>
<ion-col class="group-right" col-10> <ion-col class="group-right" col-10>
<span>我的收藏</span> <span>我的收藏</span>
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
</ion-row> </ion-row>
<ion-row (click)="goTo('AppraisalsPage')"> <ion-row (click)="goTo('AppraisalsPage')">
<ion-col class="group-left" col-2> <ion-col class="group-left" col-2>
<img src="./assets/imgs/mine/jxkh.png" > <img src="./assets/imgs/mine/jxkh.png">
</ion-col> </ion-col>
<ion-col class="group-right" col-10> <ion-col class="group-right" col-10>
<span>绩效考核</span> <span>绩效考核</span>
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
<ion-grid class="padding-0-10"> <ion-grid class="padding-0-10">
<ion-row (click)="goTo('VersionPage')"> <ion-row (click)="goTo('VersionPage')">
<ion-col class="group-left" col-2> <ion-col class="group-left" col-2>
<img src="./assets/imgs/mine/xtsz.png" > <img src="./assets/imgs/mine/xtsz.png">
</ion-col> </ion-col>
<ion-col class="group-right" style="border-bottom: 0px" col-10> <ion-col class="group-right" style="border-bottom: 0px" col-10>
<span>设置</span> <span>设置</span>
......
...@@ -32,6 +32,7 @@ export class MinePage { ...@@ -32,6 +32,7 @@ export class MinePage {
mineInfo; mineInfo;
noReadNum; noReadNum;
role;
picture = ''; picture = '';
picUrl = AppGlobal.domain + '/wisdomgroup/modules/common/file/showImgByFileid/'; picUrl = AppGlobal.domain + '/wisdomgroup/modules/common/file/showImgByFileid/';
...@@ -59,33 +60,27 @@ export class MinePage { ...@@ -59,33 +60,27 @@ export class MinePage {
this.user = value; this.user = value;
this.gender = this.user.userDetail.user.gender; this.gender = this.user.userDetail.user.gender;
}); });
this.getversion();
this.tabSer.getUserIntegral().subscribe( this.tabSer.getUserIntegral().subscribe(
(res) => { (res) => {
this.mineInfo = res.data; this.mineInfo = res.data;
this.picture = res.data.picUrl; this.picture = res.data.picUrl;
} }
) )
this.getRole();
}
//获取权限
// 返回值int :3-管理员,2-处室领导,1-内勤人员,0-普通用户
getRole() {
this.appService.ObserverHttpGet("/wisdomgroup/app/getRoles", null).subscribe((res: Response) => {
this.role = res.json();
}, error => {
this.appService.alert('系统错误!');
});
} }
//前往 //前往
goTo(page) { goTo(page) {
this.navCtrl.push(page); this.navCtrl.push(page);
} }
//获取最新版本信息
getversion() {
//检测是否需要更新
this.appVersion.getVersionNumber().then((version: string) => {
this.version = version;
this.appUpdateService.compariVersion().subscribe(data => {
if (data.code == 200) {
if (data.latestVersion != null && data.latestVersion != version) {
this.isLatest = false;
}
}
});
}).catch(err => {
});
}
} }
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