Commit 5d0a24f3 authored by wangqinghua's avatar wangqinghua

文章审核

parent 9bf7404b
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.partyCloud.starter.test" version="0.5.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <widget id="io.ionic.partyCloud.starter.test" version="0.5.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>部机关党建云(测试)</name> <name>部机关党建云(试运行)</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>
<content src="index.html" /> <content src="index.html" />
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<span class="info-span">房间号</span> <span class="info-span">房间号</span>
<div class="info-item-content"> <div class="info-item-content">
<ng-container *ngIf="role == 1 && orgName == nowOrgName"> <ng-container *ngIf="(role == 1 || role == 5) && orgName == nowOrgName">
<label (click)="editFun()"> <label (click)="editFun()">
<input type="text" [(ngModel)]="abbreviation"> <input type="text" [(ngModel)]="abbreviation">
<ion-icon ios="ios-create-outline" md="md-create-outline"></ion-icon> <ion-icon ios="ios-create-outline" md="md-create-outline"></ion-icon>
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
<div class="info-item"> <div class="info-item">
<span class="info-span">座机</span> <span class="info-span">座机</span>
<div class="info-item-content" > <div class="info-item-content" >
<ng-container *ngIf="role == 1 && orgName == nowOrgName"> <ng-container *ngIf="(role == 1 || role == 5) && orgName == nowOrgName">
<label (click)="editFun()"> <label (click)="editFun()">
<input type="text" [(ngModel)]="telephone"> <input type="text" [(ngModel)]="telephone">
<ion-icon ios="ios-create-outline" md="md-create-outline"></ion-icon> <ion-icon ios="ios-create-outline" md="md-create-outline"></ion-icon>
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
<div class="info-item"> <div class="info-item">
<span class="info-span">邮箱</span> <span class="info-span">邮箱</span>
<div class="info-item-content"> <div class="info-item-content">
<ng-container *ngIf="role == 1 && orgName == nowOrgName"> <ng-container *ngIf="(role == 1 || role == 5) && orgName == nowOrgName">
<label (click)="editFun()"> <label (click)="editFun()">
<input type="text" [(ngModel)]="email"> <input type="text" [(ngModel)]="email">
<ion-icon ios="ios-create-outline" md="md-create-outline"></ion-icon> <ion-icon ios="ios-create-outline" md="md-create-outline"></ion-icon>
...@@ -163,4 +163,4 @@ ...@@ -163,4 +163,4 @@
<button class="call-btn" (click)="usualContactSet()">设置分组</button> <button class="call-btn" (click)="usualContactSet()">设置分组</button>
</ion-content> </ion-content>
\ No newline at end of file
...@@ -259,7 +259,7 @@ export class PublishPage { ...@@ -259,7 +259,7 @@ export class PublishPage {
title: this.obj.title, //标题 title: this.obj.title, //标题
plateType: this.obj.type, //分类 plateType: this.obj.type, //分类
source: '上海市委组织部', //来源 source: '上海市委组织部', //来源
publishStatus: status, //已提交 publishStatus: status, //已提交 退回1 发布3
content: `&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;` + content, //内容 content: `&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;` + content, //内容
publishRange: this.obj.publishRange, //范围 publishRange: this.obj.publishRange, //范围
submitter: this.userid, //提交者 submitter: this.userid, //提交者
...@@ -345,7 +345,7 @@ export class PublishPage { ...@@ -345,7 +345,7 @@ export class PublishPage {
}; };
let buttonArr = []; let buttonArr = [];
buttonArr.push(preview); buttonArr.push(preview);
if (this.role == 3) { if (this.role == 3 || this.role == 5) {
buttonArr.push(publish); buttonArr.push(publish);
} else { } else {
buttonArr.push(submit); buttonArr.push(submit);
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<img src="./assets/imgs/home/icon-zbqk.png" alt=""> <img src="./assets/imgs/home/icon-zbqk.png" alt="">
<label class="label2-2">值班情况</label> <label class="label2-2">值班情况</label>
</div> </div>
<ng-container *ngIf="role == 1 || role == 2 || role == 3"> <ng-container *ngIf="role == 1 || role == 2 || role == 3 && role == 5">
<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>
......
import {Injectable} from "@angular/core";import {HttpClient} from "@angular/common/http";import {Http} from "@angular/http";import {Observable} from "rxjs/Observable";import {AppGlobal} from "../../service/http.service";import {CommonService} from "../../provide/common.service"; @Injectable()export class MineService { constructor( private http: HttpClient, //该请求 将结果转为json private commonSer: CommonService, private https: Http, //该请求不转json ) { } //我的发布 myPublish(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/myPublish', data); } //我的收藏 myCollection(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/myCollection', data); } //上传头像 imageUpload(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/common/file/image/upload', data); } //获取个人头像 showImgByFileid(data): Observable<any> { return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/common/file/showImgByFileid/' + data); } //支部积分 orgPointList(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/twissignhistory/orgPointList', this.commonSer.toFormData(data)); } //个人排行榜 personPointList(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/twissignhistory/personPointList', this.commonSer.toFormData(data) ); } //个人积分信息 personPointDetail(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/twissignhistory/personPointDetail', this.commonSer.toFormData(data) ); } } import {Injectable} from "@angular/core";import {HttpClient} from "@angular/common/http";import {Http} from "@angular/http";import {Observable} from "rxjs/Observable";import {AppGlobal} from "../../service/http.service";import {CommonService} from "../../provide/common.service"; @Injectable()export class MineService { constructor( private http: HttpClient, //该请求 将结果转为json private commonSer: CommonService, private https: Http, //该请求不转json ) { } //我的发布 myPublish(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/myPublish', data); } //我的收藏 myCollection(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/myCollection', data); } //我的审核 appCheckList(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/appCheckList', data); } //上传头像 imageUpload(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/common/file/image/upload', data); } //获取个人头像 showImgByFileid(data): Observable<any> { return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/common/file/showImgByFileid/' + data); } //支部积分 orgPointList(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/twissignhistory/orgPointList', this.commonSer.toFormData(data)); } //个人排行榜 personPointList(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/twissignhistory/personPointList', this.commonSer.toFormData(data) ); } //个人积分信息 personPointDetail(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/twissignhistory/personPointDetail', this.commonSer.toFormData(data) ); } }
\ No newline at end of file \ No newline at end of file
......
...@@ -36,10 +36,10 @@ ...@@ -36,10 +36,10 @@
<div *ngIf="footerView" class="stuff-footer"> <div *ngIf="footerView" class="stuff-footer">
<ion-row> <ion-row>
<ion-col col-6> <ion-col col-6 (click)="handle(1)">
<button>退回</button> <button style="background-color: #999999">退回</button>
</ion-col> </ion-col>
<ion-col col-6> <ion-col col-6 (click)="handle(3)">
<button>通过</button> <button>通过</button>
</ion-col> </ion-col>
</ion-row> </ion-row>
......
...@@ -9,6 +9,7 @@ page-verify-handle { ...@@ -9,6 +9,7 @@ page-verify-handle {
.stuff-container { .stuff-container {
padding: 1.5rem; padding: 1.5rem;
background-color: #fff; background-color: #fff;
.stuff-title { .stuff-title {
font-weight: 600; font-weight: 600;
font-size: 2.5rem; font-size: 2.5rem;
...@@ -31,7 +32,8 @@ page-verify-handle { ...@@ -31,7 +32,8 @@ page-verify-handle {
color: #888888; color: #888888;
} }
} }
.stuff-content{
.stuff-content {
line-height: 2.8rem; line-height: 2.8rem;
color: #444444; color: #444444;
font-family: 'SourceHanSans-Light'; font-family: 'SourceHanSans-Light';
...@@ -49,6 +51,16 @@ page-verify-handle { ...@@ -49,6 +51,16 @@ page-verify-handle {
border-top: 1px solid #eeeeee; border-top: 1px solid #eeeeee;
z-index: 9; z-index: 9;
button {
width: 100px;
height: 35px;
line-height: 35px;
background: #e42417;
color: #fff;
border-radius: 5px;
font-size: 1.6rem;
}
[col-2] { [col-2] {
line-height: 4rem; line-height: 4rem;
} }
...@@ -136,6 +148,7 @@ page-verify-handle { ...@@ -136,6 +148,7 @@ page-verify-handle {
margin-top: 1rem; margin-top: 1rem;
padding: 0 1.5rem; padding: 0 1.5rem;
background-color: #fff; background-color: #fff;
.comment-title { .comment-title {
border-bottom: 1px solid #dddddd; border-bottom: 1px solid #dddddd;
font-weight: 500; font-weight: 500;
...@@ -143,7 +156,8 @@ page-verify-handle { ...@@ -143,7 +156,8 @@ page-verify-handle {
margin-bottom: .8rem; margin-bottom: .8rem;
position: relative; position: relative;
} }
.comment-title::after{
.comment-title::after {
content: ''; content: '';
position: absolute; position: absolute;
top: 7px; top: 7px;
...@@ -152,18 +166,20 @@ page-verify-handle { ...@@ -152,18 +166,20 @@ page-verify-handle {
height: 15px; height: 15px;
background-color: #e12724; background-color: #e12724;
} }
[col-10],[col-2]{
[col-10], [col-2] {
padding: 0; padding: 0;
} }
.comment-item { .comment-item {
.contact-img{ .contact-img {
border-radius: 50%; border-radius: 50%;
width: 50px; width: 50px;
height: 50px; height: 50px;
text-align: center; text-align: center;
margin-top: 8px; margin-top: 8px;
} }
.comment-info { .comment-info {
color: #d88f27; color: #d88f27;
font-size: 1.4rem; font-size: 1.4rem;
...@@ -178,10 +194,12 @@ page-verify-handle { ...@@ -178,10 +194,12 @@ page-verify-handle {
color: #333333; color: #333333;
line-height: 1.4rem; line-height: 1.4rem;
} }
.comment-time{
.comment-time {
font-size: 1.4rem; font-size: 1.4rem;
color: #888888; color: #888888;
.repear{
.repear {
color: #3961b3; color: #3961b3;
font-size: 1.2rem; font-size: 1.2rem;
cursor: pointer; cursor: pointer;
......
...@@ -2,6 +2,8 @@ import {Component} from '@angular/core'; ...@@ -2,6 +2,8 @@ import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular'; import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {AppGlobal} from "../../../service/http.service"; import {AppGlobal} from "../../../service/http.service";
import {DomSanitizer} from "@angular/platform-browser"; import {DomSanitizer} from "@angular/platform-browser";
import {TabsService} from "../../tabs/tabs.service";
import {CommonService} from "../../../provide/common.service";
@IonicPage() @IonicPage()
...@@ -15,20 +17,64 @@ export class VerifyHandlePage { ...@@ -15,20 +17,64 @@ export class VerifyHandlePage {
url = AppGlobal.domain + '/wisdomgroup'; url = AppGlobal.domain + '/wisdomgroup';
attachments; //附件 attachments; //附件
footerView = true; footerView = false;
constructor(public navCtrl: NavController, public navParams: NavParams, stuffId;
public sanitizer: DomSanitizer) {
constructor(public navCtrl: NavController, public navParams: NavParams, private commonSer: CommonService,
public sanitizer: DomSanitizer, private tabSer: TabsService) {
} }
ionViewDidLoad() { ionViewDidLoad() {
this.stuffObj = this.navParams.get('stuff'); setTimeout(() => {
if (this.stuffObj.attachments) this.attachments = this.stuffObj.attachments; this.footerView = true;
let con = this.stuffObj.content.replace(/\r?\n/g, "<br />"); }, 300)
this.stuffObj.content = this.sanitizer.bypassSecurityTrustHtml(con); this.stuffId = this.navParams.get('id');
this.getStuff();
}
ionViewWillLeave() {
this.footerView = false;
}
//获取文章信息
getStuff() {
this.tabSer.stuffInfo(this.stuffId).subscribe(
(res) => {
this.stuffObj = res.data;
this.attachments = res.data.attachments;
let con = this.stuffObj.content.replace(/\r?\n/g, "<br />");
this.stuffObj.content = this.sanitizer.bypassSecurityTrustHtml(con);
}
)
} }
handle(){ handle(status) {
let message;
if (status == 1) message = '确定退回当前内容?';
if (status == 3) message = '确定通过当前内容?';
this.commonSer.alert(message, () => {
if (status == 1) {
this.tabSer.stuffPublish(this.stuffId).subscribe(
(res) => {
this.commonSer.toast('已提交');
setTimeout(() => {
this.navCtrl.pop()
}, 800)
}
)
}
if (status == 3) {
this.tabSer.stuffRecall(this.stuffId).subscribe(
(res) => {
this.commonSer.toast('已提交');
setTimeout(() => {
this.navCtrl.pop()
}, 800)
}
)
}
})
} }
} }
...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
</ion-header> </ion-header>
<ion-content class="bgc-e7e8ed"> <ion-content>
<ion-refresher (ionRefresh)="doRefresh($event)"> <ion-refresher (ionRefresh)="doRefresh($event)">
<ion-refresher-content pullingText="下拉刷新" <ion-refresher-content pullingText="下拉刷新"
refreshingSpinner="bubbles"> refreshingSpinner="bubbles">
</ion-refresher-content> </ion-refresher-content>
</ion-refresher> </ion-refresher>
<div class="main-news"> <div class="main-news">
<ng-container *ngFor="let new of collectionList;"> <ng-container *ngFor="let new of checkList;">
<ng-container *ngIf="new.imgUrl"> <ng-container *ngIf="new.imgUrl">
<ion-row class="news-item" (click)="goToDetail(new)"> <ion-row class="news-item" (click)="goToDetail(new)">
<ion-col col-8 class="news-left"> <ion-col col-8 class="news-left">
...@@ -38,13 +38,13 @@ ...@@ -38,13 +38,13 @@
</p> </p>
<p class="news-end"> <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> <span>提交时间:</span><span>{{new.createTime | date:'yyyy-MM-dd'}}</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 && collectionList.length == 0"> <ion-list text-center style="margin-top: 10rem" *ngIf="!isLoad && checkList.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>
暂无审核 暂无审核
......
...@@ -11,12 +11,12 @@ import {StuffDetailPage} from "../../home-pages/stuff-detail/stuff-detail"; ...@@ -11,12 +11,12 @@ import {StuffDetailPage} from "../../home-pages/stuff-detail/stuff-detail";
templateUrl: 'verify.html', templateUrl: 'verify.html',
}) })
export class VerifyPage { export class VerifyPage {
@ViewChild(InfiniteScrollContent) infiniteScrollContent:InfiniteScrollContent; @ViewChild(InfiniteScrollContent) infiniteScrollContent: InfiniteScrollContent;
changeType = 1; changeType = 1;
pageNum = 1; pageNum = 1;
pageCount = 10; pageCount = 10;
collectionList = []; checkList = [];
picture: string = AppGlobal.domain + '/wisdomgroup'; picture: string = AppGlobal.domain + '/wisdomgroup';
isLoad = true; isLoad = true;
...@@ -31,7 +31,7 @@ export class VerifyPage { ...@@ -31,7 +31,7 @@ export class VerifyPage {
this.getList(); this.getList();
} }
change(type){ change(type) {
} }
...@@ -40,9 +40,9 @@ export class VerifyPage { ...@@ -40,9 +40,9 @@ export class VerifyPage {
pageNum: this.pageNum, pageNum: this.pageNum,
pageCount: this.pageCount pageCount: this.pageCount
}; };
this.mineSer.myCollection(data).subscribe( this.mineSer.appCheckList(data).subscribe(
(res) => { (res) => {
this.collectionList = res.data.list; this.checkList = res.data.list;
this.isLoad = false; this.isLoad = false;
this.totalNum = res.data.total; this.totalNum = res.data.total;
} }
...@@ -57,9 +57,9 @@ export class VerifyPage { ...@@ -57,9 +57,9 @@ export class VerifyPage {
pageNum: 1, pageNum: 1,
pageCount: this.pageCount pageCount: this.pageCount
}; };
this.mineSer.myCollection(data).subscribe( this.mineSer.appCheckList(data).subscribe(
(res) => { (res) => {
this.collectionList = res.data.list; this.checkList = res.data.list;
this.totalNum = res.data.total; this.totalNum = res.data.total;
setTimeout(() => { setTimeout(() => {
this.commonSer.toast('刷新成功'); this.commonSer.toast('刷新成功');
...@@ -71,7 +71,7 @@ export class VerifyPage { ...@@ -71,7 +71,7 @@ export class VerifyPage {
//加载更多 //加载更多
doInfinite(e) { doInfinite(e) {
if (this.totalNum == this.collectionList.length) { if (this.totalNum == this.checkList.length) {
this.loadMore = false; this.loadMore = false;
e.enable(false); e.enable(false);
return false; return false;
...@@ -81,11 +81,11 @@ export class VerifyPage { ...@@ -81,11 +81,11 @@ export class VerifyPage {
pageNum: this.pageNum, pageNum: this.pageNum,
pageCount: this.pageCount pageCount: this.pageCount
}; };
this.mineSer.myCollection(data).subscribe( this.mineSer.appCheckList(data).subscribe(
(res) => { (res) => {
this.totalNum = res.data.total; this.totalNum = res.data.total;
res.data.list.forEach(e => { res.data.list.forEach(e => {
this.collectionList.push(e); this.checkList.push(e);
}); });
setTimeout(() => { setTimeout(() => {
e.complete() e.complete()
...@@ -96,7 +96,7 @@ export class VerifyPage { ...@@ -96,7 +96,7 @@ export class VerifyPage {
//查看文章详情 //查看文章详情
goToDetail(item) { goToDetail(item) {
this.navCtrl.push(StuffDetailPage, { this.navCtrl.push("VerifyHandlePage", {
id: item.id id: item.id
}) })
} }
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<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 *ngIf="role == 3" (click)="goTo('VerifyPage')"> <ion-row (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>
......
...@@ -93,8 +93,6 @@ export class ServePage { ...@@ -93,8 +93,6 @@ export class ServePage {
ionViewDidEnter() { ionViewDidEnter() {
//获取权限
this.getRole();
//获取消息数量 //获取消息数量
this.getNewCount(); this.getNewCount();
//获取日历 //获取日历
......
...@@ -144,6 +144,17 @@ export class TabsService { ...@@ -144,6 +144,17 @@ export class TabsService {
return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/save', data); return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/save', data);
} }
//审核通过
stuffPublish(params): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/stuff/publish/' + params);
}
//审核退回
stuffRecall(params): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/stuff/recall/' + params);
}
//获取用户组 //获取用户组
getGroup(): Observable<any> { getGroup(): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/sysmanagement/usergroup/search.ajax'); return this.http.get(AppGlobal.domain + '/wisdomgroup/sysmanagement/usergroup/search.ajax');
...@@ -161,7 +172,7 @@ export class TabsService { ...@@ -161,7 +172,7 @@ export class TabsService {
//我要出题列表 //我要出题列表
findPersonQuestions(data): Observable<any> { findPersonQuestions(data): Observable<any> {
return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/personquestion/findPersonQuestions', this.commonSer.toFormData(data) ); return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/personquestion/findPersonQuestions', this.commonSer.toFormData(data));
} }
//我要出题列表 //我要出题列表
......
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