webpackJsonp([10],{

/***/ 312:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MyReportModule", function() { return MyReportModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__myReport__ = __webpack_require__(338);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};



var MyReportModule = (function () {
    function MyReportModule() {
    }
    MyReportModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["I" /* NgModule */])({
            declarations: [
                __WEBPACK_IMPORTED_MODULE_2__myReport__["a" /* MyReportPage */],
            ],
            imports: [
                __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["h" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_2__myReport__["a" /* MyReportPage */]),
            ],
        })
    ], MyReportModule);
    return MyReportModule;
}());

//# sourceMappingURL=myReport.module.js.map

/***/ }),

/***/ 338:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MyReportPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__service_appHttpService__ = __webpack_require__(19);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__service_activityStatisticService__ = __webpack_require__(55);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ionic_storage__ = __webpack_require__(28);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};





var MyReportPage = (function () {
    function MyReportPage(navCtrl, appService, activityStatisticService, storage) {
        this.navCtrl = navCtrl;
        this.appService = appService;
        this.activityStatisticService = activityStatisticService;
        this.storage = storage;
        this.allReport = [];
        this.processingReport = [];
        this.endReport = [];
        this.menus = ['全部报备', '报备中', '已结束'];
    }
    //初始化加载我的报备
    MyReportPage.prototype.ngOnInit = function () {
        this.getAllMyReport();
        //this.getAllMyProcessingReport();
        //this.getAllMyEndReport();
    };
    //当页面加载的时候触发，只触发一次，当有缓存的的时候，打开页面时不在加载  
    MyReportPage.prototype.ionViewDidLoad = function () {
        this.initSwiper();
    };
    //初始化swiper  
    MyReportPage.prototype.initSwiper = function () {
        this.swiper = new Swiper('.pageMenuSlides .swiper-container', {
            //设置slider容器能够同时显示的slides数量(  
            slidesPreView: 3,
            //slide之间的距离（单位px）  
            spaceBetween: 0,
            //断点设定：根据屏幕宽度设置某参数为不同的值  
            breakpoints: {
                1024: {
                    slidesPerView: 3,
                    spaceBetween: 0
                },
                768: {
                    slidesPerView: 3,
                    spaceBetween: 0
                },
                640: {
                    slidesPerView: 3,
                    spaceBetween: 0
                },
                320: {
                    slidesPerView: 3,
                    spaceBetween: 0
                }
            }
        });
    };
    //选择菜单  
    MyReportPage.prototype.selectPageMenu = function (index) {
        this.setStyle(index);
        //切换页面  
        this.contentSlides.slideTo(index);
    };
    //选择菜单之后设置菜单样式  
    MyReportPage.prototype.setStyle = function (index) {
        //得到菜单的个数  
        var slides = document.getElementsByClassName('pageMenuSlides')[0].getElementsByClassName('swiper-slide');
        //给所有的菜单都设置上swiper-slide样式  
        if (index < slides.length) {
            for (var i = 0; i < slides.length; i++) {
                var s = slides[i];
                s.className = "swiper-slide";
            }
            //给当前菜单设置成这个样式  
            slides[index].className = "swiper-slide bottomLine";
        }
    };
    MyReportPage.prototype.slideChanged = function () {
        //getActiveIndex()获得当前页面的index  
        var index = this.contentSlides.getActiveIndex();
        this.setStyle(index);
        //s切换菜单  
        this.swiper.slideTo(index, 300);
    };
    //获取所有我已结束的报备
    // getAllMyEndReport() {
    //   this.appService.ObserverHttpPost("/wisdomgroup/modules/premanager/getEndPremanagerByUser", null)
    //     .subscribe((res: Response) => {
    //       let data = res.json();
    //       this.endReport = data;
    //     }, error => {
    //       this.appService.alert('网络异常！');
    //     }
    //     );
    // }
    //获取所有我进行中的报备
    // getAllMyProcessingReport() {
    //   this.appService.ObserverHttpPost("/wisdomgroup/modules/premanager/getProcessingPremanagerByUser", null)
    //     .subscribe((res: Response) => {
    //       let data = res.json();
    //       this.processingReport = data;
    //     }, error => {
    //       this.appService.alert('网络异常！');
    //     }
    //     );
    // }
    //获取所有我的报备
    MyReportPage.prototype.getAllMyReport = function () {
        var _this = this;
        this.appService.ObserverHttpPost("/wisdomgroup/modules/premanager/getPremanagerByUser", null)
            .subscribe(function (res) {
            var data = res.json();
            _this.allReport = data;
            _this.allReport.forEach(function (element) {
                if (!element["isOverTimeFlag"]) {
                    _this.processingReport.push(element);
                }
                else {
                    _this.endReport.push(element); //已结束
                }
            });
        }, function (error) {
            _this.appService.alert('网络异常！');
        });
    };
    //跳转到报备页面
    MyReportPage.prototype.goReport = function (report) {
        this.storage.set("premanager", report);
        this.navCtrl.push("OutGoingReportEditPage");
    };
    //跳转到报备查看详情页面
    MyReportPage.prototype.goDetail = function (report) {
        this.navCtrl.push("OutGoingReportViewPage", { premanager: report });
    };
    MyReportPage.prototype.goBack = function () {
        this.navCtrl.popToRoot();
    };
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_8" /* ViewChild */])('contentSlides'),
        __metadata("design:type", __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["m" /* Slides */])
    ], MyReportPage.prototype, "contentSlides", void 0);
    MyReportPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
            selector: 'page-myReport',template:/*ion-inline-start:"/Users/ben/gitLab-project/wisdom-ces/src/pages/myReport/myReport.html"*/'<ion-header>\n	<ion-toolbar>\n		<div class="searchToolBar">\n			<button ion-button clear small navPop style="padding: 0;" (click)="goBack()">\n				<img class="back-btn" src="./assets/imgs/back.png" />\n			</button>\n			<ion-title text-center>\n				我的报备\n			</ion-title>\n		</div>\n\n	</ion-toolbar>\n	<div class="pageMenuSlides">\n		<div class="swiper-container">\n			<div class="swiper-wrapper">\n				<div class="swiper-slide {{i==0?\'bottomLine\':\'\'}}" *ngFor="let item of menus;let i=index;" tappable (click)="selectPageMenu(i)">{{item}}\n					<span *ngIf="i==0" class="menu-index" style="line-height:15px;">{{allReport.length}}</span>\n					<span *ngIf="i==1" class="menu-index" style="line-height:15px;">{{processingReport.length}}</span>\n					<span *ngIf="i==2" class="menu-index" style="line-height:15px;">{{endReport.length}}</span>\n				</div>\n			</div>\n		</div>\n	</div>\n</ion-header>\n<ion-content>\n	<ion-slides #contentSlides (ionSlideDidChange)="slideChanged()">\n		<ion-slide>\n			<ion-content direction="y" scrollbar-y="true">\n				<ion-list>\n					<ion-item *ngFor="let report of allReport">\n						<div class="item">\n							<div class="item-header">\n								<div class="item-header-style">\n									<img src="./assets/imgs/bb.png" class="icon">\n									<span class="item-title">{{report.title}}</span>\n								</div>\n								<button ion-button round class="btn color1" *ngIf="report.reported && report.outStatus==0">不离沪</button>\n								<button ion-button round class="btn color2" *ngIf="report.reported && report.outStatus==1">境内</button>\n								<button ion-button round class="btn color3" *ngIf="report.reported && report.outStatus==2">境外</button>\n								<button ion-button round class="btn color4" *ngIf="report.reported && report.outStatus==3">境内&境外</button>\n\n								<button ion-button round class="btn color4" *ngIf="report.isOverTimeFlag && !report.reported">截止未报备</button>\n\n								<button ion-button round class="btn color4" *ngIf="!report.isOverTimeFlag && !report.reported">未报备</button>\n\n							</div>\n\n						<ion-item *ngIf="!report.isOverTimeFlag && report.reported">\n							<div class="content-box" (click)="goReport(report)" >\n								<div class="content-item-box">\n									<label class="left-title">离沪日期：</label>\n									<div class="data">{{report.leaveDate}}</div>\n								</div>\n								<div class="content-item-box">\n									<label class="left-title">回沪日期：</label>\n									<div class="data">\n										{{report.backDate}}\n									</div>\n								</div>\n								<div class="content-item-box">\n									<label class="left-title">外出地点：</label>\n									<div class="data">\n										{{report.address}}\n									</div>\n								</div>\n							</div>\n						</ion-item>\n\n						<ion-item *ngIf="!report.isOverTimeFlag && !report.reported">\n								<div class="content-box" (click)="goReport(report)" >\n									<div class="content-item-box">\n										<label class="left-title">离沪日期：</label>\n										<div class="data">{{report.leaveDate}}</div>\n									</div>\n									<div class="content-item-box">\n										<label class="left-title">回沪日期：</label>\n										<div class="data">\n											{{report.backDate}}\n										</div>\n									</div>\n									<div class="content-item-box">\n										<label class="left-title">外出地点：</label>\n										<div class="data">\n											{{report.address}}\n										</div>\n									</div>\n								</div>\n							</ion-item>\n\n						<ion-item *ngIf="report.isOverTimeFlag && report.reported">\n								<div class="content-box" (click)="goDetail(report)" >\n									<div class="content-item-box">\n										<label class="left-title">离沪日期：</label>\n										<div class="data">{{report.leaveDate}}</div>\n									</div>\n									<div class="content-item-box">\n										<label class="left-title">回沪日期：</label>\n										<div class="data">\n											{{report.backDate}}\n										</div>\n									</div>\n									<div class="content-item-box">\n										<label class="left-title">外出地点：</label>\n										<div class="data">\n											{{report.address}}\n										</div>\n									</div>\n								</div>\n							</ion-item>\n\n						<ion-item *ngIf="report.isOverTimeFlag && !report.reported">\n								<div class="content-box" (click)="goDetail(report)" >\n									<div class="content-item-box">\n										<label class="left-title">报备已截止</label>\n									</div>\n								</div>\n						</ion-item>\n\n							<div class="right">\n								<button class="reselection" *ngIf="report.isOverTimeFlag && !report.reported" (click)="goDetail(report); $event.stopPropagation()">查看详情</button>\n								<button class="reselection" *ngIf="!report.isOverTimeFlag && report.reported" (click)="goReport(report); $event.stopPropagation()">修改报备</button>\n\n								<button class="reselection" *ngIf="report.isOverTimeFlag && report.reported" (click)="goDetail(report); $event.stopPropagation()">查看详情</button>\n								<button class="reselection" *ngIf="!report.isOverTimeFlag && !report.reported" (click)="goReport(report); $event.stopPropagation()">报备</button>\n							</div>\n						</div>\n					</ion-item>\n				</ion-list>\n			</ion-content>\n		</ion-slide>\n\n		<ion-slide>\n			<ion-content direction="y" scrollbar-y="true">\n				<ion-list>\n					<ion-item *ngFor="let report of processingReport">\n						<div class="item">\n							<div class="item-header">\n								<div class="item-header-style">\n									<img src="./assets/imgs/bb.png" class="icon">\n									<span class="item-title">{{report.title}}</span>\n								</div>\n								<button ion-button round class="btn color1" *ngIf="report.outStatus==0">不离沪</button>\n								<button ion-button round class="btn color2" *ngIf="report.outStatus==1">境内</button>\n								<button ion-button round class="btn color3" *ngIf="report.outStatus==2">境外</button>\n								<button ion-button round class="btn color4" *ngIf="report.outStatus==3">境内&境外</button>\n\n								<button ion-button round class="btn color4" *ngIf="!report.isOverTimeFlag && !report.reported">未报备</button>\n							</div>\n\n							<div class="content-box" (click)="goReport(report)" >\n								<div class="content-item-box">\n									<label class="left-title">离沪日期：</label>\n									<div class="data">{{report.leaveDate}}</div>\n								</div>\n								<div class="content-item-box">\n									<label class="left-title">回沪日期：</label>\n									<div class="data">\n										{{report.backDate}}\n									</div>\n								</div>\n								<div class="content-item-box">\n									<label class="left-title">外出地点：</label>\n									<div class="data">\n										{{report.address}}\n									</div>\n								</div>\n							</div>\n\n							<div class="right">\n								<button class="reselection" *ngIf="!report.isOverTimeFlag && report.reported" (click)="goReport(report); $event.stopPropagation()">修改报备</button>\n								<button class="reselection" *ngIf="!report.isOverTimeFlag && !report.reported" (click)="goReport(report); $event.stopPropagation()">报备</button>\n							</div>\n						</div>\n					</ion-item>\n				</ion-list>\n			</ion-content>\n		</ion-slide>\n\n		<ion-slide>\n			<ion-content direction="y" scrollbar-y="true">\n				<ion-list>\n					<ion-item *ngFor="let report of endReport">\n						<div class="item">\n							<div class="item-header">\n								<div class="item-header-style">\n									<img src="./assets/imgs/bb.png" class="icon">\n									<span class="item-title">{{report.title}}</span>\n								</div>\n								<button ion-button round class="btn color1" *ngIf="report.outStatus==0">不离沪</button>\n								<button ion-button round class="btn color2" *ngIf="report.outStatus==1">境内</button>\n								<button ion-button round class="btn color3" *ngIf="report.outStatus==2">境外</button>\n								<button ion-button round class="btn color4" *ngIf="report.outStatus==3">境内&境外</button>\n\n								<button ion-button round class="btn color4" *ngIf="report.isOverTimeFlag && !report.reported">截止未报备</button>\n							</div>\n\n							<ion-item *ngIf="report.isOverTimeFlag && report.reported">\n									<div class="content-box" (click)="goDetail(report)" >\n										<div class="content-item-box">\n											<label class="left-title">离沪日期：</label>\n											<div class="data">{{report.leaveDate}}</div>\n										</div>\n										<div class="content-item-box">\n											<label class="left-title">回沪日期：</label>\n											<div class="data">\n												{{report.backDate}}\n											</div>\n										</div>\n										<div class="content-item-box">\n											<label class="left-title">外出地点：</label>\n											<div class="data">\n												{{report.address}}\n											</div>\n										</div>\n									</div>\n								</ion-item>\n		\n								<ion-item *ngIf="report.isOverTimeFlag && !report.reported">\n										<div class="content-box" (click)="goDetail(report)" >\n											<div class="content-item-box">\n												<label class="left-title">报备已截止</label>\n											</div>\n										</div>\n								</ion-item>\n\n\n							<div class="right">\n								<button class="reselection" (click)="goDetail(report)">查看详情</button>\n							</div>\n						</div>\n					</ion-item>\n				</ion-list>\n			</ion-content>\n		</ion-slide>\n	</ion-slides>\n</ion-content>'/*ion-inline-end:"/Users/ben/gitLab-project/wisdom-ces/src/pages/myReport/myReport.html"*/,
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["j" /* NavController */],
            __WEBPACK_IMPORTED_MODULE_2__service_appHttpService__["b" /* AppService */],
            __WEBPACK_IMPORTED_MODULE_3__service_activityStatisticService__["a" /* ActivityStatisticService */],
            __WEBPACK_IMPORTED_MODULE_4__ionic_storage__["b" /* Storage */]])
    ], MyReportPage);
    return MyReportPage;
}());

//# sourceMappingURL=myReport.js.map

/***/ })

});
//# sourceMappingURL=10.js.map