Commit b37721df authored by wangqinghua's avatar wangqinghua

个人信息编辑

parent 43ae4cc1
...@@ -66,14 +66,13 @@ ...@@ -66,14 +66,13 @@
<div class="main-news"> <div class="main-news">
<ng-container *ngFor="let new of draftList;"> <ng-container *ngFor="let new of draftList;">
<ng-container *ngIf="new.imgUrl"> <ng-container *ngIf="new.imgUrl">
<ion-row class="news-item" (click)="goToDetail(new)"> <ion-row class="news-item" (click)="goTo(new)">
<ion-col col-8 class="news-left"> <ion-col col-8 class="news-left">
<p class="news-title"> <p class="news-title">
{{new.title}} {{new.title}}
<ion-icon *ngIf="new.topTime" class="icon-fire iconfont"></ion-icon>
</p> </p>
<p class="news-end"> <p class="news-end">
<span>保存时间:</span><span>{{new.publishTime | date:'yyyy-MM-dd'}}</span> <span>创建时间:</span><span>{{new.updateTime | date:'yyyy-MM-dd HH:dd:mm'}}</span>
</p> </p>
</ion-col> </ion-col>
<ion-col col-4 class="news-right"> <ion-col col-4 class="news-right">
...@@ -82,20 +81,19 @@ ...@@ -82,20 +81,19 @@
</ion-row> </ion-row>
</ng-container> </ng-container>
<ng-container *ngIf="!new.imgUrl"> <ng-container *ngIf="!new.imgUrl">
<ion-row class="news-item" (click)="goToDetail(new)"> <ion-row class="news-item" (click)="goTo(new)">
<ion-col col-12 class="news-left"> <ion-col col-12 class="news-left">
<p class="news-title"> <p class="news-title">
{{new.title}} {{new.title}}
<ion-icon *ngIf="new.topTime" class="icon-fire iconfont"></ion-icon>
</p> </p>
<p class="news-end"> <p class="news-end">
<span>发布时间:</span><span>{{new.publishTime | date:'yyyy-MM-dd'}}</span> <span>创建时间:</span><span>{{new.updateTime | date:'yyyy-MM-dd HH:dd:mm'}}</span>
</p> </p>
</ion-col> </ion-col>
</ion-row> </ion-row>
</ng-container> </ng-container>
</ng-container> </ng-container>
<ion-list text-center style="margin-top: 10rem" *ngIf=" !isLoad && publicList.length == 0"> <ion-list text-center style="margin-top: 10rem" *ngIf=" !isLoad && draftList.length == 0">
<img style="width: 20%;" src="./assets/imgs/no-info.png" alt=""> <img style="width: 20%;" src="./assets/imgs/no-info.png" alt="">
<p text-center> <p text-center>
暂无发布 暂无发布
......
...@@ -20,16 +20,13 @@ export class MyPublishPage { ...@@ -20,16 +20,13 @@ export class MyPublishPage {
changeType = 1; changeType = 1;
picture: string = AppGlobal.domain + '/wisdomgroup'; picture: string = AppGlobal.domain + '/wisdomgroup';
isLoad = true;
totalNum;
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
public mineSer: MineService, public commonSer: CommonService) { public mineSer: MineService, public commonSer: CommonService) {
} }
ionViewDidLoad() { ionViewDidLoad() {
this.getPublishList();
this.getDraftList(); this.getDraftList();
this.getPublishList();
} }
change(type) { change(type) {
...@@ -47,8 +44,6 @@ export class MyPublishPage { ...@@ -47,8 +44,6 @@ export class MyPublishPage {
this.mineSer.myPublish(data).subscribe( this.mineSer.myPublish(data).subscribe(
(res) => { (res) => {
this.publicList = res.data.list; this.publicList = res.data.list;
this.isLoad = false;
this.totalNum = res.data.total;
} }
) )
} }
...@@ -81,4 +76,8 @@ export class MyPublishPage { ...@@ -81,4 +76,8 @@ export class MyPublishPage {
id: item.id id: item.id
}) })
} }
goTo(item){
this.navCtrl.push('VerifyEditPage', {stuffId: item.id});
}
} }
...@@ -45,13 +45,14 @@ export class VerifyEditPage { ...@@ -45,13 +45,14 @@ export class VerifyEditPage {
}; };
fileList = []; //文件数组 fileList = []; //文件数组
group; //用户组 group = [{groupName: '全体人员', id: null}]; //用户组
userid; //当前登录人的id userid; //当前登录人的id
file; // 文件 file; // 文件
pictrue = AppGlobal.domain + '/wisdomgroup'; pictrue = AppGlobal.domain + '/wisdomgroup';
type = "image"; //视频文章or图片文章 type = "image"; //视频文章or图片文章
role;
caroul; //轮播图 caroul; //轮播图
...@@ -67,15 +68,10 @@ export class VerifyEditPage { ...@@ -67,15 +68,10 @@ export class VerifyEditPage {
ionViewDidLoad() { ionViewDidLoad() {
this.stuffId = this.navParams.get('stuffId'); this.stuffId = this.navParams.get('stuffId');
this.getStuff(); this.getStuff();
this.getRole();
this.storage.get("userLoginInfo").then((value) => { this.storage.get("userLoginInfo").then((value) => {
this.userid = value.userid; this.userid = value.userid;
}); });
//获取用户组
this.tabSer.getGroup().subscribe(
(res) => {
this.group = res.list;
}
)
} }
//获取文章信息 //获取文章信息
...@@ -96,6 +92,16 @@ export class VerifyEditPage { ...@@ -96,6 +92,16 @@ export class VerifyEditPage {
) )
} }
//获取权限
//返回值int :3-管理员,2-处室领导,1-内勤人员,0-普通用户
getRole() {
this.tabsSer.getRoles().subscribe(
(res) => {
this.role = res;
}
)
}
tackePic(resourceType) { tackePic(resourceType) {
const actionSheet = this.actionSheetCtrl.create({ const actionSheet = this.actionSheetCtrl.create({
...@@ -242,6 +248,7 @@ export class VerifyEditPage { ...@@ -242,6 +248,7 @@ export class VerifyEditPage {
//发布 //发布
publish(status) { publish(status) {
let message; let message;
if (status == 1) message = '确定将当前内容保存为草稿?';
if (status == 2) message = '确定提交审核当前内容?'; if (status == 2) message = '确定提交审核当前内容?';
if (status == 3) message = '确定直接发布当前内容?'; if (status == 3) message = '确定直接发布当前内容?';
if (!this.check()) { if (!this.check()) {
...@@ -357,10 +364,22 @@ export class VerifyEditPage { ...@@ -357,10 +364,22 @@ export class VerifyEditPage {
this.publish(2); this.publish(2);
} }
}; };
const draft = {
text: '保存草稿',
role: 'draft',
handler: () => {
this.publish(1);
}
};
let buttonArr = []; let buttonArr = [];
buttonArr.push(preview); buttonArr.push(preview);
if (this.role == 3 || this.role == 5) {
buttonArr.push(publish);
} else {
buttonArr.push(submit);
}
buttonArr.push(publish); buttonArr.push(publish);
buttonArr.push(draft);
buttonArr.push(cancel); buttonArr.push(cancel);
const actionSheet = this.actionSheetCtrl.create({ const actionSheet = this.actionSheetCtrl.create({
......
...@@ -26,7 +26,8 @@ export class EditPersonInfoPage { ...@@ -26,7 +26,8 @@ export class EditPersonInfoPage {
abbreviation : '', abbreviation : '',
telephone : '', telephone : '',
email : '', email : '',
birthDay:null birthDay:null,
job:null
}; };
code:string ; code:string ;
...@@ -53,6 +54,7 @@ export class EditPersonInfoPage { ...@@ -53,6 +54,7 @@ export class EditPersonInfoPage {
this.user = value; this.user = value;
this.gender = this.user.userDetail.user.gender; this.gender = this.user.userDetail.user.gender;
this.userinfo = this.user.userDetail.user; this.userinfo = this.user.userDetail.user;
this.userinfo.job = null;
console.log(this.userinfo); console.log(this.userinfo);
this.userinfo.userId = this.user.id; this.userinfo.userId = this.user.id;
this.getOrgName(this.user.id,result=>{ this.getOrgName(this.user.id,result=>{
......
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