Commit 7e898f56 authored by wangqinghua's avatar wangqinghua

党支部

parent bc17df64
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.smart19.starter" version="4.5.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <widget id="io.ionic.smart19.starter.test" version="4.5.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>部机关党建云</name> <name>部机关党建云</name>
<description>组织部党建云平台App.</description> <description>组织部党建云平台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>
......
#Fri Aug 16 15:32:01 CST 2019 #Fri Aug 16 16:35:39 CST 2019
base.0=/Users/ben/gitLab-project/party-build-cloud/platforms/android/app/build/intermediates/transforms/dexMerger/debug/0 base.0=/Users/ben/gitLab-project/party-build-cloud/platforms/android/app/build/intermediates/transforms/dexMerger/debug/0
renamed.0=classes.dex renamed.0=classes.dex
file.0=/Users/ben/gitLab-project/party-build-cloud/platforms/android/app/build/intermediates/transforms/dexMerger/debug/0/classes.dex file.0=/Users/ben/gitLab-project/party-build-cloud/platforms/android/app/build/intermediates/transforms/dexMerger/debug/0/classes.dex
...@@ -46,7 +46,7 @@ page-food-apply { ...@@ -46,7 +46,7 @@ page-food-apply {
.right-arrow { .right-arrow {
position: absolute; position: absolute;
right: 2px; right: 2px;
top: 5px; top: 0;
color: #999; color: #999;
font-size: 1.6rem; font-size: 1.6rem;
} }
......
...@@ -63,7 +63,7 @@ page-rush-buy { ...@@ -63,7 +63,7 @@ page-rush-buy {
.right-arrow { .right-arrow {
position: absolute; position: absolute;
right: 2px; right: 2px;
top: 5px; top: 0;
color: #999; color: #999;
font-size: 1.6rem; font-size: 1.6rem;
} }
......
...@@ -102,7 +102,7 @@ page-hair-apply { ...@@ -102,7 +102,7 @@ page-hair-apply {
.right-arrow { .right-arrow {
position: absolute; position: absolute;
right: 2px; right: 2px;
top: 5px; top: 0;
color: #999; color: #999;
font-size: 1.6rem; font-size: 1.6rem;
} }
......
...@@ -42,7 +42,7 @@ page-room-apply { ...@@ -42,7 +42,7 @@ page-room-apply {
.right-arrow { .right-arrow {
position: absolute; position: absolute;
right: 2px; right: 2px;
top: 5px; top: 0;
color: #999; color: #999;
font-size: 1.6rem; font-size: 1.6rem;
} }
......
...@@ -46,7 +46,7 @@ page-car-apply { ...@@ -46,7 +46,7 @@ page-car-apply {
.right-arrow { .right-arrow {
position: absolute; position: absolute;
right: 2px; right: 2px;
top: 5px; top: 0;
color: #999; color: #999;
font-size: 1.6rem; font-size: 1.6rem;
} }
......
...@@ -40,7 +40,7 @@ page-vistor-apply { ...@@ -40,7 +40,7 @@ page-vistor-apply {
.right-arrow { .right-arrow {
position: absolute; position: absolute;
right: 2px; right: 2px;
top: 5px; top: 0;
color: #999; color: #999;
font-size: 1.6rem; font-size: 1.6rem;
} }
......
...@@ -68,16 +68,16 @@ ...@@ -68,16 +68,16 @@
</div> </div>
</div> </div>
<span class="more" (click)="moreTab()"> <span class="more" (click)="moreTab()">
<ion-icon style="vertical-align: super" name="list"></ion-icon> <ion-icon name="list"></ion-icon>
</span> </span>
</div> </div>
</div> </div>
</div> </div>
<div class="fixed-toolbar"> <div class="fixed-toolbar" style="margin-top: -1px">
<div class="tabs-fixed"> <div class="tabs-fixed">
<div class="scroll-tab" style="padding-right: 0px"> <div class="scroll-tab" style="padding: 0;background-color:#fff;">
<div class="news-content" #newsContent> <div class="news-content" #newsContent>
<div class="tabs-parent"> <div class="tabs-parent" [ngStyle]="{'margin-left':indexParent == '3'?'30px':'0'}">
<div class="tabs-child"> <div class="tabs-child">
<span *ngFor="let ch of childrenList" <span *ngFor="let ch of childrenList"
[ngClass]="{'select':indexChildren == ch.indexChildren}" [ngClass]="{'select':indexChildren == ch.indexChildren}"
...@@ -85,18 +85,22 @@ ...@@ -85,18 +85,22 @@
</div> </div>
</div> </div>
</div> </div>
<span *ngIf="indexParent == '3'" class="moreParty" (click)="moreParty('children')">
<ion-icon name="list"></ion-icon>
</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<ion-slides (ionSlideDidChange)="slideChanged()" [loop]="false"> <ion-slides (ionSlideDidChange)="slideChanged()" [loop]="false">
<ng-container *ngFor="let new of slideArr;let i = index;"> <ng-container *ngFor="let new of slideArr;let i = index;">
<ion-slide> <ion-slide>
<ion-content> <ion-content>
<div class="search-content"> <div class="search-content">
<ng-container *ngFor="let item of slideList[i];"> <ng-container *ngFor="let item of slideList[i];">
<div *ngIf="obj.childrenName != '你问我答'" class="search-item" (click)="goToDetail(item)"> <div [hidden]="branchObj.show" *ngIf="obj.childrenName != '你问我答'" class="search-item"
(click)="goToDetail(item)">
<p class="item-info"> <p class="item-info">
<span class="item-source">{{item.source}}</span> <span class="item-source">{{item.source}}</span>
<span>{{item.publishTime | date:'yyyy-MM-dd'}}</span> <span>{{item.publishTime | date:'yyyy-MM-dd'}}</span>
...@@ -179,6 +183,7 @@ ...@@ -179,6 +183,7 @@
</div> </div>
</div> </div>
</ng-container> </ng-container>
<party-person [hidden]="!branchObj.show" #partyPerson [list]="branchObj.personList"></party-person>
</div> </div>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)"> <ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content <ion-infinite-scroll-content
......
...@@ -21,6 +21,8 @@ import {SwiperComponent} from "../../../components/swiper/swiper"; ...@@ -21,6 +21,8 @@ import {SwiperComponent} from "../../../components/swiper/swiper";
import {timer} from "rxjs/observable/timer"; import {timer} from "rxjs/observable/timer";
import {Storage} from "@ionic/storage"; import {Storage} from "@ionic/storage";
import {FilterComponent} from "../../../components/filter/filter"; import {FilterComponent} from "../../../components/filter/filter";
import {PartyPersonComponent} from "../../../components/party-person/party-person";
import {DiscoverService} from "../../discover-pages/discover.service";
import {AppMainService} from "../../../app/app.service"; import {AppMainService} from "../../../app/app.service";
declare let Swiper: any; declare let Swiper: any;
...@@ -44,6 +46,7 @@ export class DiscoverPage { ...@@ -44,6 +46,7 @@ export class DiscoverPage {
@ViewChild(Content) content: Content; @ViewChild(Content) content: Content;
@ViewChild('slideContent') slideContent: Content; @ViewChild('slideContent') slideContent: Content;
@ViewChild(Slides) slides: Slides; @ViewChild(Slides) slides: Slides;
@ViewChild('partyPerson') partyPerson: PartyPersonComponent;
//所属板块类型: //所属板块类型:
//1党章党规,2系列讲话,3中央精神,4本市部署,5通知公告,6党建动态,7工作提示,8党务参考 //1党章党规,2系列讲话,3中央精神,4本市部署,5通知公告,6党建动态,7工作提示,8党务参考
...@@ -114,6 +117,11 @@ export class DiscoverPage { ...@@ -114,6 +117,11 @@ export class DiscoverPage {
{ {
"name": "支部风采", "type": 13, "indexParent": 3, "children": [ "name": "支部风采", "type": 13, "indexParent": 3, "children": [
{ {
"name": "支部成员",
"type": null,
"indexChildren": '34'
},
{
"name": "支部活动", "name": "支部活动",
"type": 13, "type": 13,
"indexChildren": '32' "indexChildren": '32'
...@@ -122,7 +130,7 @@ export class DiscoverPage { ...@@ -122,7 +130,7 @@ export class DiscoverPage {
"name": "党建联建", "name": "党建联建",
"type": 14, "type": 14,
"indexChildren": '33' "indexChildren": '33'
} },
] ]
}, },
{ {
...@@ -188,6 +196,7 @@ export class DiscoverPage { ...@@ -188,6 +196,7 @@ export class DiscoverPage {
"plateType": null, //分类 "plateType": null, //分类
"parentName": null, "parentName": null,
"childrenName": null, "childrenName": null,
"branchId": null
}; };
resourceType = 1; //1 标题图片 2 轮播图 3 视频 resourceType = 1; //1 标题图片 2 轮播图 3 视频
relatePlateType; //关联主题教育 relatePlateType; //关联主题教育
...@@ -232,8 +241,16 @@ export class DiscoverPage { ...@@ -232,8 +241,16 @@ export class DiscoverPage {
itemWidth; itemWidth;
spanWidth; spanWidth;
branchObj = {
partyList: [],
show: false,
personList: []
};
mineInfo; //登录人信息
constructor(public navCtrl: NavController, public navParams: NavParams, private appMainSer: AppMainService, constructor(public navCtrl: NavController, public navParams: NavParams, private appMainSer: AppMainService,
public commonSer: CommonService, public renderer: Renderer2, public commonSer: CommonService, public renderer: Renderer2, private discoverSer: DiscoverService,
public zone: NgZone, public storage: Storage, private modalCtrl: ModalController, public zone: NgZone, public storage: Storage, private modalCtrl: ModalController,
public tabsSer: TabsService, public emitSer: EmitService) { public tabsSer: TabsService, public emitSer: EmitService) {
// 接收发射过来的数据 // 接收发射过来的数据
...@@ -246,9 +263,14 @@ export class DiscoverPage { ...@@ -246,9 +263,14 @@ export class DiscoverPage {
this.storage.get('userLoginInfo').then((value) => { this.storage.get('userLoginInfo').then((value) => {
this.userId = value.userid; this.userId = value.userid;
}); });
//获取个人信息
this.appMainSer.mineInfo.subscribe(value => {
this.mineInfo = value;
});
this.initSwiper(); this.initSwiper();
this.getBanner(); this.getBanner();
this.scrollHeight(); this.scrollHeight();
this.getBranch();
timer(20).subscribe(() => { timer(20).subscribe(() => {
const htmlFontSize = getComputedStyle(window.document.documentElement)['font-size']; const htmlFontSize = getComputedStyle(window.document.documentElement)['font-size'];
this.itemWidth = htmlFontSize.split("px")[0] * 8; this.itemWidth = htmlFontSize.split("px")[0] * 8;
...@@ -265,6 +287,32 @@ export class DiscoverPage { ...@@ -265,6 +287,32 @@ export class DiscoverPage {
} }
} }
//获取党支部
getBranch() {
this.tabsSer.getBranchList().subscribe(
(res) => {
this.branchObj.partyList = res.data.map(e => {
const d = {
type: e.id,
name: e.name
};
return d;
});
}
)
}
getMemberList(id) {
const data = {
branchId: id
};
this.discoverSer.getMemberList(data).subscribe(
(res) => {
if (res) this.branchObj.personList = res.data;
}
)
}
public dragTo(e) { public dragTo(e) {
if (e.target.scrollLeft > window.screen.width / 3) { if (e.target.scrollLeft > window.screen.width / 3) {
this.toRight = false; this.toRight = false;
...@@ -366,11 +414,13 @@ export class DiscoverPage { ...@@ -366,11 +414,13 @@ export class DiscoverPage {
//父级选择 //父级选择
changeParent(item) { changeParent(item) {
this.newsContent.nativeElement.scrollLeft = 0; //二级菜单滑动重置 if (this.indexParent === item.indexParent) return;
this.indexParent = item.indexParent;
this.obj.parentName = item.name; this.obj.parentName = item.name;
this.obj.childrenName = item.children[0].name; this.obj.childrenName = item.children[0].name;
this.newsContent.nativeElement.scrollLeft = 0; //二级菜单滑动重置
this.indexParent = item.indexParent;
this.toIndex = item.indexParent; this.toIndex = item.indexParent;
this.childrenList = item.children; this.childrenList = item.children;
...@@ -389,6 +439,20 @@ export class DiscoverPage { ...@@ -389,6 +439,20 @@ export class DiscoverPage {
this.tips.nativeElement.style.width = this.tabSpan.nativeElement.offsetWidth + 'px'; this.tips.nativeElement.style.width = this.tabSpan.nativeElement.offsetWidth + 'px';
// 自身div的一半 - 滑块的一半 // 自身div的一半 - 滑块的一半
this.tips.nativeElement.style.left = this.itemWidth * (this.indexParent) + (this.itemWidth - this.spanWidth) / 2 + 'px'; this.tips.nativeElement.style.left = this.itemWidth * (this.indexParent) + (this.itemWidth - this.spanWidth) / 2 + 'px';
if (!this.obj.branchId) this.obj.branchId = this.mineInfo.branchId;
if (item.children[0].name == "支部成员") {
this.moreParty("parent");
if (this.obj.branchId) this.getMemberList(this.obj.branchId);
this.branchObj.show = true;
this.slides.slideTo(this.indexParent, 500);
return false;
} else {
this.branchObj.show = false;
}
if (item.name != "支部风采") this.obj.branchId = null;
const data = { const data = {
pageNum: 1, pageNum: 1,
pageSize: this.pageSize, pageSize: this.pageSize,
...@@ -396,7 +460,8 @@ export class DiscoverPage { ...@@ -396,7 +460,8 @@ export class DiscoverPage {
obj: { obj: {
'plateType': this.obj.plateType, 'plateType': this.obj.plateType,
'resourceType': this.resourceType, 'resourceType': this.resourceType,
"relatePlateType": this.relatePlateType "relatePlateType": this.relatePlateType,
"branchId": this.obj.branchId
} }
}; };
this.tabsSer.stuffPage(data).subscribe( this.tabsSer.stuffPage(data).subscribe(
...@@ -416,7 +481,7 @@ export class DiscoverPage { ...@@ -416,7 +481,7 @@ export class DiscoverPage {
}); });
this.slides.slideTo(this.indexParent, 500); this.slides.slideTo(this.indexParent, 500);
this.slideList[this.indexParent] = this.newList; this.slideList[this.indexParent] = this.newList;
console.log(this.newList); console.log(this.slideList)
} }
) )
} }
...@@ -424,9 +489,20 @@ export class DiscoverPage { ...@@ -424,9 +489,20 @@ export class DiscoverPage {
//子级选择 //子级选择
changeChildren(item) { changeChildren(item) {
this.indexChildren = item.indexChildren; this.indexChildren = item.indexChildren;
this.obj.childrenName = item.name;
if (!this.obj.branchId) this.obj.branchId = this.mineInfo.branchId;
if (item.name === "支部成员") {
if (this.obj.branchId) this.getMemberList(this.obj.branchId);
this.branchObj.show = true;
return false;
} else {
this.branchObj.show = false;
}
if (this.obj.parentName != "支部风采") this.obj.branchId = null;
this.resourceType = item.name == "视频资料" ? 3 : 1; this.resourceType = item.name == "视频资料" ? 3 : 1;
this.isRecent = this.obj.parentName == "最新发布" ? 1 : 0; this.isRecent = this.obj.parentName == "最新发布" ? 1 : 0;
this.obj.childrenName = item.name;
if (this.obj.parentName == "主题教育") { if (this.obj.parentName == "主题教育") {
this.obj.plateType = null; this.obj.plateType = null;
...@@ -448,7 +524,8 @@ export class DiscoverPage { ...@@ -448,7 +524,8 @@ export class DiscoverPage {
obj: { obj: {
'plateType': this.obj.plateType, 'plateType': this.obj.plateType,
'resourceType': this.resourceType, 'resourceType': this.resourceType,
"relatePlateType": this.relatePlateType "relatePlateType": this.relatePlateType,
"branchId": this.obj.branchId
} }
}; };
this.tabsSer.stuffPage(data).subscribe( this.tabsSer.stuffPage(data).subscribe(
...@@ -461,6 +538,8 @@ export class DiscoverPage { ...@@ -461,6 +538,8 @@ export class DiscoverPage {
} }
}); });
this.slideList[this.indexParent] = this.newList; this.slideList[this.indexParent] = this.newList;
console.log(this.slideList);
console.log(this.slideList[this.indexParent]);
} }
) )
} }
...@@ -482,6 +561,15 @@ export class DiscoverPage { ...@@ -482,6 +561,15 @@ export class DiscoverPage {
//下拉刷新 //下拉刷新
doRefresh(e) { doRefresh(e) {
if (this.obj.childrenName === "支部成员") {
if (this.obj.branchId) this.getMemberList(this.obj.branchId);
this.branchObj.show = true;
e.complete();
return false;
} else {
this.branchObj.show = false;
this.obj.branchId = null;
}
this.getBanner(); this.getBanner();
const data = { const data = {
pageNum: 1, pageNum: 1,
...@@ -513,7 +601,6 @@ export class DiscoverPage { ...@@ -513,7 +601,6 @@ export class DiscoverPage {
//上拉加载更多 //上拉加载更多
doInfinite(e) { doInfinite(e) {
console.log('doInfinite:' + this.slideList[this.indexParent].length);
if (this.totalNum == this.slideList[this.indexParent].length || this.totalNum < this.slideList[this.indexParent].length) { if (this.totalNum == this.slideList[this.indexParent].length || this.totalNum < this.slideList[this.indexParent].length) {
e.complete(); e.complete();
return false; return false;
...@@ -572,6 +659,62 @@ export class DiscoverPage { ...@@ -572,6 +659,62 @@ export class DiscoverPage {
} }
} }
//多模块
moreTab() {
let modal = this.modalCtrl.create(FilterComponent, {
list: this.tabsList,
type: this.obj.plateType,
title: '我的频道',
desc: "点击进入频道"
}, {
enterAnimation: 'modal-from-right-enter',
leaveAnimation: 'modal-from-right-leave'
});
modal.onDidDismiss(data => {
if (data) {
this.changeParent(data);
console.log(data);
}
});
modal.present();
}
moreParty(type) {
console.log(type);
let modal = this.modalCtrl.create(FilterComponent, {
list: this.branchObj.partyList,
type: this.obj.branchId,
title: '党支部',
desc: "点击进入党支部"
}, {
enterAnimation: 'modal-from-right-enter',
leaveAnimation: 'modal-from-right-leave'
});
modal.onDidDismiss(data => {
if (data) {
this.obj.branchId = data.type;
let res;
if (this.obj.childrenName === "支部成员") {
res = {
type: null,
indexChildren: '34',
name: "支部成员"
};
} else {
res = {
type: this.obj.plateType,
indexChildren: this.indexChildren,
name: this.obj.childrenName
};
}
this.changeChildren(res);
}
});
modal.present();
}
//消息提醒页面 //消息提醒页面
goToNotice() { goToNotice() {
this.navCtrl.push(NoticePage); this.navCtrl.push(NoticePage);
...@@ -618,25 +761,5 @@ export class DiscoverPage { ...@@ -618,25 +761,5 @@ export class DiscoverPage {
} }
} }
//多模块
moreTab() {
let modal = this.modalCtrl.create(FilterComponent,
{
list: this.tabsList,
type: this.obj.plateType,
title: '我的频道',
desc: '点击进入我的频道'
}, {
enterAnimation: 'modal-from-right-enter',
leaveAnimation: 'modal-from-right-leave'
});
modal.onDidDismiss(data => {
if (data) {
this.changeParent(data)
}
});
modal.present();
}
} }
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