Commit 9bf7404b authored by wangqinghua's avatar wangqinghua

权限划分

parent d7a4157e
......@@ -73,7 +73,7 @@ export class MoreAppPage {
}
//获取权限
// 返回值int 3-管理员,2-处室领导,1-内勤人员,0-普通用户
// 返回值int :3-管理员,2-处室领导,1-内勤人员,0-普通用户
getRole() {
this.appService.ObserverHttpGet("/wisdomgroup/app/getRoles", null).subscribe((res: Response) => {
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,15 +13,6 @@
refreshingSpinner="bubbles">
</ion-refresher-content>
</ion-refresher>
<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="main-news">
<ng-container *ngFor="let new of collectionList;">
<ng-container *ngIf="new.imgUrl">
......@@ -46,7 +37,8 @@
{{new.title}}
</p>
<p class="news-end">
<!-- <span>收藏时间:</span><span>{{new.publishTime | date:'yyyy-MM-dd'}}</span>-->
<span>提交人:</span><span>{{new.publishTime | date:'yyyy-MM-dd'}}</span>
<span>提交时间:</span><span>{{new.publishTime | date:'yyyy-MM-dd'}}</span>
</p>
</ion-col>
</ion-row>
......@@ -55,42 +47,10 @@
<ion-list text-center style="margin-top: 10rem" *ngIf="!isLoad && collectionList.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-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content
loadingSpinner="bubbles"
......
......@@ -95,11 +95,16 @@ export class HomePage {
}
ionViewDidEnter() {
this.getInter();
this.tabsSer.signNow().subscribe(
(res) => {
this.signObj = res.data;
}
);
}
//获取积分信息
getInter(){
this.tabSer.getUserIntegral().subscribe(
(res) => {
this.mineInfo = res.data;
......@@ -137,7 +142,6 @@ export class HomePage {
on: {
slideChangeTransitionEnd: function () {
that.slideIndex = this.activeIndex + 1;
console.log(this.realIndex);
that.slideTitle = that.slidersItems[this.activeIndex].title;
that.swiperImg.update();
},
......@@ -168,7 +172,7 @@ export class HomePage {
}
scrollHeight() {
const height = this.topHeight.nativeElement.offsetHeight + 48;
const height = this.topHeight.nativeElement.offsetHeight;
this.content.ionScroll.subscribe(($event) => {
this.zone.run(() => {
if (this.content.scrollTop > height) {
......@@ -252,11 +256,12 @@ export class HomePage {
let userid = value.userid;
this.tabsSer.getInfo(userid).subscribe(
(res) => {
if (res.apiResult.data) { //党员展示政治生日
this.partyObj = res.apiResult.data;
//获取是否展示过政治生日
const nowDay = this.datePipe.transform(new Date(), 'yyyy-MM-dd');
const partyBir = localStorage.getItem('partyBir');
if (nowDay == partyBir) {
if (nowDay != partyBir) {
setTimeout(() => {
this.start();
this.isBir = false;
......@@ -264,6 +269,9 @@ export class HomePage {
} else {
this.isBir = true;
}
} else { //非党员不展示政治生日
this.isBir = false;
}
}
);
})
......@@ -324,6 +332,7 @@ export class HomePage {
if (res.errcode == '1000') {
this.commonSer.toast('签到成功');
this.signObj.isSign = 'yes';
this.getInter();
} else {
this.commonSer.toast(res.errmsg);
}
......
......@@ -16,7 +16,7 @@
<ion-content class="bgc-e7e8ed">
<div class="bgc-fff" style="padding: 1rem;">
<div class="mine-box" >
<div class="mine-box">
<div class="mine-item" (click)="goTo('PersonInfoPage')">
<ion-grid>
<ion-row>
......@@ -44,7 +44,7 @@
<ion-grid class="padding-0-10">
<ion-row (click)="goTo('MyActivityListPage')">
<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 class="group-right" col-10>
<span>我的活动</span>
......@@ -53,7 +53,7 @@
</ion-row>
<ion-row (click)="goTo('MyReportPage')">
<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 class="group-right" col-10>
<span>我的报备</span>
......@@ -62,7 +62,7 @@
</ion-row>
<ion-row (click)="goTo('MySurveyPage')">
<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 class="group-right" col-10>
<span>我的问卷</span>
......@@ -71,7 +71,7 @@
</ion-row>
<ion-row (click)="goTo('MyDutyPage')">
<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 class="group-right" col-10>
<span>我的值班</span>
......@@ -80,16 +80,16 @@
</ion-row>
<ion-row (click)="goTo('MyPublishPage')">
<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 class="group-right" col-10>
<span>我的发布</span>
<ion-icon name="ios-arrow-forward"></ion-icon>
</ion-col>
</ion-row>
<ion-row (click)="goTo('VerifyPage')">
<ion-row *ngIf="role == 3" (click)="goTo('VerifyPage')">
<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 class="group-right" col-10>
<span>我的审核</span>
......@@ -98,7 +98,7 @@
</ion-row>
<ion-row (click)="goTo('MyCollectionPage')">
<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 class="group-right" col-10>
<span>我的收藏</span>
......@@ -107,7 +107,7 @@
</ion-row>
<ion-row (click)="goTo('AppraisalsPage')">
<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 class="group-right" col-10>
<span>绩效考核</span>
......@@ -119,7 +119,7 @@
<ion-grid class="padding-0-10">
<ion-row (click)="goTo('VersionPage')">
<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 class="group-right" style="border-bottom: 0px" col-10>
<span>设置</span>
......
......@@ -32,6 +32,7 @@ export class MinePage {
mineInfo;
noReadNum;
role;
picture = '';
picUrl = AppGlobal.domain + '/wisdomgroup/modules/common/file/showImgByFileid/';
......@@ -59,33 +60,27 @@ export class MinePage {
this.user = value;
this.gender = this.user.userDetail.user.gender;
});
this.getversion();
this.tabSer.getUserIntegral().subscribe(
(res) => {
this.mineInfo = res.data;
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) {
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