Commit 80307d8b authored by wangqinghua's avatar wangqinghua

push

parent 2e5ff253
...@@ -28,14 +28,13 @@ export class MyApp { ...@@ -28,14 +28,13 @@ export class MyApp {
badge:Badge badge:Badge
) { ) {
platform.ready().then(() => { platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
statusBar.styleDefault(); statusBar.styleDefault();
splashScreen.hide(); splashScreen.hide();
//检测是否需要更新 //检测是否需要更新
appVersion.getVersionNumber().then((version: string) => { appVersion.getVersionNumber().then((version: string) => {
appUpdateService.compariVersion().subscribe(data => { appUpdateService.compariVersion().subscribe(data => {
alert(data.code); alert(data.code);
alert(data.latestVersion);
if (data.code == 200) { if (data.code == 200) {
if (data.latestVersion != null && data.latestVersion != version) { if (data.latestVersion != null && data.latestVersion != version) {
appUpdateService.detectionUpgrade(data.androidDownload, true); //提示升级 appUpdateService.detectionUpgrade(data.androidDownload, true); //提示升级
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<div class="item1-content-box"> <div class="item1-content-box">
<ion-icon name="md-contact" class="item1-icon"></ion-icon> <ion-icon name="md-contact" class="item1-icon"></ion-icon>
<span class="item-type" *ngIf="activity?.activityType =='1'">体检</span> <span class="item-type" *ngIf="activity?.activityType =='1'">体检</span>
<span class="item-type" *ngIf="activity?.activityType =='2'">疗养</span> <span class="item-type" *ngIf="activity?.activityType =='2'">疗养</span>
<span class="item-type" *ngIf="activity?.activityType =='3'">培训</span> <span class="item-type" *ngIf="activity?.activityType =='3'">培训</span>
<span class="item-type" *ngIf="activity?.activityType =='4'">工会活动</span> <span class="item-type" *ngIf="activity?.activityType =='4'">工会活动</span>
</div> </div>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</ion-refresher-content> </ion-refresher-content>
</ion-refresher> </ion-refresher>
<ion-list> <ion-list *ngIf="items.length > 0">
<ion-item *ngFor="let item of items"> <ion-item *ngFor="let item of items">
<div class="item"> <div class="item">
<div class="item-header"> <div class="item-header">
...@@ -51,6 +51,11 @@ ...@@ -51,6 +51,11 @@
</ion-item> </ion-item>
</ion-list> </ion-list>
<ion-list text-center style="margin-top: 10rem" *ngIf="items.length == 0">
<img style="width: 20%;" src="./assets/imgs/no-info.png" alt="">
<p text-center>
暂无数据
</p>
</ion-list>
</ion-content> </ion-content>
\ No newline at end of file
...@@ -13,7 +13,7 @@ import {ActivityDetailPage} from "../activityDetail/activityDetail"; ...@@ -13,7 +13,7 @@ import {ActivityDetailPage} from "../activityDetail/activityDetail";
}) })
export class ActivityListPage { export class ActivityListPage {
items: object[]; items = [];
activityType:Array<String> = ['未知','体检','疗休养','培训','工会活动']; activityType:Array<String> = ['未知','体检','疗休养','培训','工会活动'];
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</ion-header> </ion-header>
<ion-content scrollbar-y="true" direction="y" class="bgc-e7e8ed"> <ion-content scrollbar-y="true" direction="y" class="bgc-e7e8ed">
<ion-list> <ion-list *ngIf="allNotice.length > 0">
<ion-item class="margin-bottom-10" *ngFor="let notice of allNotice" (click)="goView(notice.id,notice.read)"> <ion-item class="margin-bottom-10" *ngFor="let notice of allNotice" (click)="goView(notice.id,notice.read)">
<div class="item"> <div class="item">
<div class="item-header"> <div class="item-header">
...@@ -31,4 +31,11 @@ ...@@ -31,4 +31,11 @@
</div> </div>
</ion-item> </ion-item>
</ion-list> </ion-list>
<ion-list text-center style="margin-top: 10rem" *ngIf="allNotice.length == 0">
<img style="width: 20%;" src="./assets/imgs/no-info.png" alt="">
<p text-center>
暂无数据
</p>
</ion-list>
</ion-content> </ion-content>
\ No newline at end of file
...@@ -11,7 +11,7 @@ import { AnnouncementViewPage } from '../announcementView/announcementView'; ...@@ -11,7 +11,7 @@ import { AnnouncementViewPage } from '../announcementView/announcementView';
export class AnnouncementPage { export class AnnouncementPage {
allNotice: Array<any> = []; allNotice = [];
constructor( constructor(
public navCtrl: NavController, public navCtrl: NavController,
......
...@@ -7,7 +7,7 @@ page-block-list { ...@@ -7,7 +7,7 @@ page-block-list {
justify-content: left; justify-content: left;
box-sizing: border-box; box-sizing: border-box;
padding: 10px 0 10px 15px; padding: 10px 0 10px 15px;
border-bottom: 1px solid #333;
} }
.contact-icon{ .contact-icon{
......
...@@ -26,26 +26,26 @@ ...@@ -26,26 +26,26 @@
format="YYYY-MM-DD"> format="YYYY-MM-DD">
</ion-calendar> </ion-calendar>
<div class="margin-top-10 duty-Obj"> <div class="margin-top-10 duty-Obj">
<ion-item> <ion-item class="">
<div> <div>
<p> <span class="daySpan">白班</span></p> <p> <span class="daySpan">白班</span></p>
<p> <p class="padding-left-15">
<span *ngIf="dayObj.name" >{{dayObj.name}}</span> <span *ngIf="dayObj.name" >{{dayObj.name}}</span>
<span *ngIf="!dayObj.name" >暂无</span> <span *ngIf="!dayObj.name" >暂无</span>
<span>{{dayObj?.phone}}</span> <span>{{dayObj?.phone}}</span>
</p> </p>
<p>{{dayObj?.orgName}}</p> <p class="padding-left-15">{{dayObj?.orgName}}</p>
</div> </div>
</ion-item> </ion-item>
<ion-item class="margin-top-10"> <ion-item class=" margin-top-10">
<div> <div>
<p><span class="nightSpan">夜班</span></p> <p><span class="nightSpan">夜班</span></p>
<p> <p class="padding-left-15">
<span *ngIf="nightObj.name" >{{nightObj.name}}</span> <span *ngIf="nightObj.name" >{{nightObj.name}}</span>
<span *ngIf="!nightObj.name" >暂无</span> <span *ngIf="!nightObj.name" >暂无</span>
<span>{{nightObj?.phone}}</span> <span>{{nightObj?.phone}}</span>
</p> </p>
<p>{{nightObj?.orgName}}</p> <p class="padding-left-15">{{nightObj?.orgName}}</p>
</div> </div>
</ion-item> </ion-item>
</div> </div>
...@@ -73,8 +73,11 @@ ...@@ -73,8 +73,11 @@
</div> </div>
</ion-item> </ion-item>
</ion-list> </ion-list>
<ion-list *ngIf="nowDuty.length == 0"> <ion-list text-center style="margin-top: 10rem" *ngIf="nowDuty.length == 0">
<p text-center>暂无数据</p> <img style="width: 20%;" src="./assets/imgs/no-info.png" alt="">
<p text-center>
暂无数据
</p>
</ion-list> </ion-list>
</div> </div>
</ng-container> </ng-container>
......
...@@ -58,6 +58,14 @@ page-duty { ...@@ -58,6 +58,14 @@ page-duty {
border-bottom-right-radius: 5px; border-bottom-right-radius: 5px;
} }
.duty-Obj .item-ios p { .duty-Obj .item-ios p {
margin-bottom: 10px; margin-bottom: 15px;
}
.duty-Obj .label-ios{
margin: 0;
}
.duty-Obj{
.item-ios.item-block .item-inner{
background-color: #f5f6f7;
}
} }
} }
...@@ -36,8 +36,16 @@ ...@@ -36,8 +36,16 @@
</div> </div>
</div> </div>
</ion-item> </ion-item>
<div text-center style="margin-top: 10rem" *ngIf="noList.length == 0">
<img style="width: 20%;" src="./assets/imgs/no-info.png" alt="">
<p text-center>
暂无数据
</p>
</div>
</ng-container> </ng-container>
<ng-container *ngIf="changeType == 2"> <ng-container *ngIf="changeType == 2">
<ion-item *ngFor="let item2 of doneList;" class="margin-bottom-10" (click)="goToDetail(item2)"> <ion-item *ngFor="let item2 of doneList;" class="margin-bottom-10" (click)="goToDetail(item2)">
<div class="margin-bottom-10" > <div class="margin-bottom-10" >
<span>{{item2.name}}</span> <span>{{item2.name}}</span>
...@@ -57,6 +65,13 @@ ...@@ -57,6 +65,13 @@
</div> </div>
</ion-item> </ion-item>
<div text-center style="margin-top: 10rem" *ngIf="doneList.length == 0">
<img style="width: 20%;" src="./assets/imgs/no-info.png" alt="">
<p text-center>
暂无数据
</p>
</div>
</ng-container> </ng-container>
</ion-list> </ion-list>
</ion-content> </ion-content>
......
...@@ -16,8 +16,8 @@ export class ChangeApplyListPage { ...@@ -16,8 +16,8 @@ export class ChangeApplyListPage {
{name:'已处理'}, {name:'已处理'},
]; ];
changeType = 1; changeType = 1;
noList; noList = [];
doneList; doneList = [];
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService) { public appService: AppService) {
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<ion-content class="bgc-e7e8ed"> <ion-content class="bgc-e7e8ed">
<ion-list> <ion-list>
<ng-container *ngIf="list.length > 0">
<ion-item class="item-list margin-bottom-10" *ngFor="let item of list"> <ion-item class="item-list margin-bottom-10" *ngFor="let item of list">
<div class="item" > <div class="item" >
<div class="item-header padding-15-0"> <div class="item-header padding-15-0">
...@@ -28,9 +29,14 @@ ...@@ -28,9 +29,14 @@
</div> </div>
</div> </div>
</ion-item> </ion-item>
<!--</ng-container>--> </ng-container>
<!--<ng-container *ngIf="contentList.datalist.length == 0">--> <ng-container *ngIf="list.length == 0">
<!--暂无数据--> <div text-center style="margin-top: 10rem" *ngIf="list.length == 0">
<!--</ng-container>--> <img style="width: 20%;" src="./assets/imgs/no-info.png" alt="">
<p text-center>
暂无数据
</p>
</div>
</ng-container>
</ion-list> </ion-list>
</ion-content> </ion-content>
...@@ -14,7 +14,7 @@ import {SurveyResultPage} from "../survey-result/survey-result"; ...@@ -14,7 +14,7 @@ import {SurveyResultPage} from "../survey-result/survey-result";
export class MySurveyPage { export class MySurveyPage {
userId; userId;
list; list = [];
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService,public storage: Storage) { public appService: AppService,public storage: Storage) {
} }
......
import { Component } from '@angular/core'; import {Component} from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular'; import {IonicPage, NavController, NavParams} from 'ionic-angular';
import { Response } from '@angular/http'; import {Response} from '@angular/http';
import { Storage } from '@ionic/storage'; import {Storage} from '@ionic/storage';
import { AppService, AppGlobal } from "../../../service/appHttpService"; import {AppService, AppGlobal} from "../../../service/appHttpService";
import { OutGoingReportDetailPage } from '../outGoingReportDetail/outGoingReportDetail'; import {OutGoingReportDetailPage} from '../outGoingReportDetail/outGoingReportDetail';
import { MyReportPage } from "../../myReport/myReport"; import {MyReportPage} from "../../myReport/myReport";
import {MinePage} from "../../tabs/mine/mine"; import {MinePage} from "../../tabs/mine/mine";
@IonicPage() @IonicPage()
...@@ -22,22 +22,22 @@ export class OutGoingReportEditPage { ...@@ -22,22 +22,22 @@ export class OutGoingReportEditPage {
//报备详情显示处理 //报备详情显示处理
introduce: string; introduce: string;
edit_CityList ; edit_CityList;
addressid:string = ''; addressid: string = '';
syn_addressid:string = ''; syn_addressid: string = '';
//报备 //报备
premanager = {}; premanager = {};
//个人报备 //个人报备
userpre = { userpre = {
id:"", id: "",
managerId : "", //报备id managerId: "", //报备id
isorFromsh : 0, //默认不离沪 isorFromsh: 0, //默认不离沪
leaveTime : "", //离沪时间 leaveTime: "", //离沪时间
backTime : "", //回沪时间 backTime: "", //回沪时间
userpreDesc : "", //离沪说明 userpreDesc: "", //离沪说明
outaddressids : "" //个人报备选择的地点地址:保存id值 outaddressids: "" //个人报备选择的地点地址:保存id值
} }
//报备截至日期 //报备截至日期
...@@ -46,27 +46,27 @@ export class OutGoingReportEditPage { ...@@ -46,27 +46,27 @@ export class OutGoingReportEditPage {
temp_userpre = {} temp_userpre = {}
//离沪时间差 //离沪时间差
dategap : any; dategap: any;
//离沪地点显示 //离沪地点显示
locations : any; locations: any;
//详细说明展示
isCover: boolean = false;
constructor( constructor(public navCtrl: NavController,
public navCtrl: NavController,
public navParams: NavParams, public navParams: NavParams,
public appService: AppService, public appService: AppService,
public storage: Storage public storage: Storage) {
) {
//当前页面----个人报备1页面 //当前页面----个人报备1页面
//this.gettemp_userprePre(); //this.gettemp_userprePre();
} }
ngOnInit():void{ ngOnInit(): void {
//报备列表页面 到 个人报备1页面 //报备列表页面 到 个人报备1页面
this.storage.get("premanager").then((value)=>{ this.storage.get("premanager").then((value) => {
if(value != null && value != ''){ if (value != null && value != '') {
this.premanager = value; this.premanager = value;
//加载报备的图片 //加载报备的图片
this.picture = AppGlobal.picture + this.premanager["uploadPic"]; this.picture = AppGlobal.picture + this.premanager["uploadPic"];
...@@ -75,37 +75,37 @@ export class OutGoingReportEditPage { ...@@ -75,37 +75,37 @@ export class OutGoingReportEditPage {
this.userpre.managerId = this.premanager["id"]; //1.保存-报备id this.userpre.managerId = this.premanager["id"]; //1.保存-报备id
this.temp_endTime = this.premanager["endTime"]; //报备截止时间 this.temp_endTime = this.premanager["endTime"]; //报备截止时间
if(this.premanager["reported"]){ //已报备--修改操作, if (this.premanager["reported"]) { //已报备--修改操作,
//编辑初始化:查询 //编辑初始化:查询
this.appService.ObserverHttpPost("/wisdomgroup/modules/userpre/getUserpre",{premanagerId:value.id}) this.appService.ObserverHttpPost("/wisdomgroup/modules/userpre/getUserpre", {premanagerId: value.id})
.subscribe((res: Response) => { .subscribe((res: Response) => {
let result = res.json(); let result = res.json();
this.userpre.id = result["id"]; //保存-id this.userpre.id = result["id"]; //保存-id
//离沪勾选 //离沪勾选
if(result.isorFromsh == 1){ //离沪 if (result.isorFromsh == 1) { //离沪
this.userpre.isorFromsh = 1; this.userpre.isorFromsh = 1;
this.isLeave = true; this.isLeave = true;
this.edit_CityList = result.areaList; this.edit_CityList = result.areaList;
if( this.edit_CityList != null && this.edit_CityList.length > 0){ if (this.edit_CityList != null && this.edit_CityList.length > 0) {
this.addressid = ''; this.addressid = '';
this.locations = ''; this.locations = '';
for (let index = 0; index < this.edit_CityList.length; index++) { for (let index = 0; index < this.edit_CityList.length; index++) {
const element = this.edit_CityList[index]; const element = this.edit_CityList[index];
this.addressid += element["id"]+","; this.addressid += element["id"] + ",";
this.locations += element["areaName"]+","; this.locations += element["areaName"] + ",";
} }
this.addressid = this.addressid.substring(0,this.addressid.lastIndexOf(",")); this.addressid = this.addressid.substring(0, this.addressid.lastIndexOf(","));
this.locations = this.locations.substring(0,this.locations.lastIndexOf(",")); //回显地点 this.locations = this.locations.substring(0, this.locations.lastIndexOf(",")); //回显地点
this.userpre.outaddressids = this.addressid; //保存-离沪地点 this.userpre.outaddressids = this.addressid; //保存-离沪地点
} }
this.userpre.leaveTime = result["formshTime"]; //保存-离沪时间 this.userpre.leaveTime = result["formshTime"]; //保存-离沪时间
this.userpre.backTime = result["comeshTime"]; //保存-回沪时间 this.userpre.backTime = result["comeshTime"]; //保存-回沪时间
if(result.userpreDesc != ''||typeof(result.userpreDesc)!='undefined'){ if (result.userpreDesc != '' || typeof(result.userpreDesc) != 'undefined') {
this.userpre.userpreDesc = result["userpreDesc"]; //保存-离沪说明 this.userpre.userpreDesc = result["userpreDesc"]; //保存-离沪说明
} }
//页面显示 时间差 //页面显示 时间差
this.dategap = this.userpre.leaveTime+"~"+this.userpre.backTime; //回显时间差 this.dategap = this.userpre.leaveTime + "~" + this.userpre.backTime; //回显时间差
} }
}, error => { }, error => {
this.appService.alert('网络异常!'); this.appService.alert('网络异常!');
...@@ -119,36 +119,35 @@ export class OutGoingReportEditPage { ...@@ -119,36 +119,35 @@ export class OutGoingReportEditPage {
this.gettemp_userprePre(); this.gettemp_userprePre();
} }
gettemp_userprePre() {
gettemp_userprePre(){
//从个人报备2页面 到 个人报备1页面 //从个人报备2页面 到 个人报备1页面
this.storage.get("temp_userpre").then((value)=>{ this.storage.get("temp_userpre").then((value) => {
if(value != null && value != ''){ if (value != null && value != '') {
this.isLeave = true; this.isLeave = true;
this.userpre.isorFromsh = 1; this.userpre.isorFromsh = 1;
//temp_userpre 保存的是个人报备2 页面中选择的值 //temp_userpre 保存的是个人报备2 页面中选择的值
this.temp_userpre = value; this.temp_userpre = value;
this.userpre.leaveTime = this.temp_userpre["leaveDate"]; this.userpre.leaveTime = this.temp_userpre["leaveDate"];
this.userpre.backTime = this.temp_userpre["backDate"]; this.userpre.backTime = this.temp_userpre["backDate"];
if(value.managerDesc != ''||typeof(value.managerDesc)!='undefined'){ if (value.managerDesc != '' || typeof(value.managerDesc) != 'undefined') {
this.userpre.userpreDesc = this.temp_userpre["managerDesc"]; this.userpre.userpreDesc = this.temp_userpre["managerDesc"];
} }
this.userpre.outaddressids = this.temp_userpre["outaddressids"]; this.userpre.outaddressids = this.temp_userpre["outaddressids"];
this.userpre.managerId = this.temp_userpre["managerId"]; this.userpre.managerId = this.temp_userpre["managerId"];
//编辑 (存在个人报备id) //编辑 (存在个人报备id)
if(this.temp_userpre["id"]!=null&&this.temp_userpre["id"]!=''){ if (this.temp_userpre["id"] != null && this.temp_userpre["id"] != '') {
this.userpre.id = this.temp_userpre["id"]; this.userpre.id = this.temp_userpre["id"];
} }
//页面显示 时间差 //页面显示 时间差
this.dategap = this.temp_userpre["leaveDate"].substring(0,10)+"~"+this.temp_userpre["backDate"].substring(0,10); this.dategap = this.temp_userpre["leaveDate"].substring(0, 10) + "~" + this.temp_userpre["backDate"].substring(0, 10);
this.locations = this.temp_userpre["areaName"]; this.locations = this.temp_userpre["areaName"];
this.temp_endTime = this.temp_userpre["entTime"]; this.temp_endTime = this.temp_userpre["entTime"];
this.picture = AppGlobal.picture + this.temp_userpre["premanagerImg"]; this.picture = AppGlobal.picture + this.temp_userpre["premanagerImg"];
this.premanager["managerDesc"]=this.temp_userpre["premanagerIntroduce"]; this.premanager["managerDesc"] = this.temp_userpre["premanagerIntroduce"];
this.subIntroduce(this.temp_userpre["premanagerIntroduce"]); this.subIntroduce(this.temp_userpre["premanagerIntroduce"]);
} }
...@@ -156,20 +155,18 @@ export class OutGoingReportEditPage { ...@@ -156,20 +155,18 @@ export class OutGoingReportEditPage {
} }
//详细说明展示
isCover: boolean = false;
//具体介绍 //具体介绍
hidden() { hidden() {
this.isCover = false; this.isCover = false;
} }
show() { show() {
this.isCover = true; this.isCover = true;
} }
//报备详情限定一行17个字符串,两行57个字符串,多余以省略号代替 //报备详情限定一行17个字符串,两行57个字符串,多余以省略号代替
subIntroduce(str: string) { subIntroduce(str: string) {
console.log("introduce:"+str.length); console.log("introduce:" + str.length);
if (!str) this.introduce = ''; if (!str) this.introduce = '';
if (str.length <= 17) this.introduce = str; if (str.length <= 17) this.introduce = str;
if (str.length > 17 && str.length <= 25) this.introduce = str.substr(0, 17) + "..."; if (str.length > 17 && str.length <= 25) this.introduce = str.substr(0, 17) + "...";
...@@ -179,7 +176,7 @@ export class OutGoingReportEditPage { ...@@ -179,7 +176,7 @@ export class OutGoingReportEditPage {
//选择是否离沪 //选择是否离沪
chooseLeave(status) { chooseLeave(status) {
if(status==1){ //不离沪 if (status == 1) { //不离沪
this.isLeave = false; this.isLeave = false;
this.userpre.isorFromsh = 0; this.userpre.isorFromsh = 0;
...@@ -188,32 +185,32 @@ export class OutGoingReportEditPage { ...@@ -188,32 +185,32 @@ export class OutGoingReportEditPage {
this.userpre.userpreDesc = ""; this.userpre.userpreDesc = "";
this.userpre.outaddressids = ""; this.userpre.outaddressids = "";
}else if(status==0){ } else if (status == 0) {
this.isLeave = true; this.isLeave = true;
this.userpre.isorFromsh = 1; this.userpre.isorFromsh = 1;
} }
} }
// 跳转到报备详情页面页面 // 跳转到报备详情页面页面
editReport(){ editReport() {
this.storage.remove("city"); this.storage.remove("city");
this.navCtrl.push("OutGoingReportDetailPage",{premanager:this.premanager}); this.navCtrl.push("OutGoingReportDetailPage", {premanager: this.premanager});
} }
//提交报备 //提交报备
savePremanager(){ savePremanager() {
if(this.userpre.isorFromsh == 1){ if (this.userpre.isorFromsh == 1) {
//判断离沪地点是否选择 //判断离沪地点是否选择
if(this.userpre.outaddressids == null || this.userpre.outaddressids == ''){ if (this.userpre.outaddressids == null || this.userpre.outaddressids == '') {
this.appService.alert("请填写离沪详情信息!"); this.appService.alert("请填写离沪详情信息!");
return false; return false;
} }
if(this.userpre.userpreDesc != null && this.userpre.userpreDesc != '' ){ if (this.userpre.userpreDesc != null && this.userpre.userpreDesc != '') {
//离沪乱码处理 //离沪乱码处理
let temp_userpreDesc = encodeURIComponent(this.userpre["userpreDesc"]) ; let temp_userpreDesc = encodeURIComponent(this.userpre["userpreDesc"]);
this.userpre.userpreDesc = temp_userpreDesc; this.userpre.userpreDesc = temp_userpreDesc;
} }
} }
...@@ -221,23 +218,20 @@ export class OutGoingReportEditPage { ...@@ -221,23 +218,20 @@ export class OutGoingReportEditPage {
//判断报备截止日期 //判断报备截止日期
let signflag = Date.parse(this.temp_endTime.toString()) > Date.parse(new Date().toString()); let signflag = Date.parse(this.temp_endTime.toString()) > Date.parse(new Date().toString());
if(!signflag){ if (!signflag) {
this.appService.alert('超过报备截至时间!'); this.appService.alert('超过报备截至时间!');
return false; return false;
} }
this.appService.ObserverHttpPost("/wisdomgroup/modules/userpre/create", this.userpre)
// if(this.userpre.userpreDesc != null && this.userpre.userpreDesc != '' ){
// //离沪乱码处理
// let temp_userpreDesc = encodeURIComponent(this.userpre["userpreDesc"]) ;
// this.userpre.userpreDesc = temp_userpreDesc;
// }
this.appService.ObserverHttpPost("/wisdomgroup/modules/userpre/create",this.userpre)
.subscribe((res: Response) => { .subscribe((res: Response) => {
let resultback = res.json(); let resultback = res.json();
if(resultback.code == '200'){ if (resultback.code == '200') {
//this.appService.popToastView(resultback.msg,'middle',1000); const index = this.navCtrl.getActive().index;
this.navCtrl.remove(0, index);
this.navCtrl.setRoot(MinePage);
this.navCtrl.parent.select(3);
this.navCtrl.push("MyReportPage"); this.navCtrl.push("MyReportPage");
this.storage.remove("premanager"); this.storage.remove("premanager");
...@@ -245,9 +239,9 @@ export class OutGoingReportEditPage { ...@@ -245,9 +239,9 @@ export class OutGoingReportEditPage {
this.storage.remove("managerId"); this.storage.remove("managerId");
this.storage.remove("city"); this.storage.remove("city");
this.storage.remove("cityList"); this.storage.remove("cityList");
}else{ } else {
//失败 //失败
this.appService.popToastView(resultback.msg,'middle',1000); this.appService.popToastView(resultback.msg, 'middle', 1000);
} }
}, error => { }, error => {
this.appService.alert('网络异常!'); this.appService.alert('网络异常!');
...@@ -256,35 +250,35 @@ export class OutGoingReportEditPage { ...@@ -256,35 +250,35 @@ export class OutGoingReportEditPage {
} }
//修改报备 //修改报备
editPremanager(){ editPremanager() {
if(this.userpre.isorFromsh == 1){ if (this.userpre.isorFromsh == 1) {
//判断离沪地点是否选择 //判断离沪地点是否选择
if(this.userpre.outaddressids == null || this.userpre.outaddressids == ''){ if (this.userpre.outaddressids == null || this.userpre.outaddressids == '') {
this.appService.alert("请填写离沪详情信息!"); this.appService.alert("请填写离沪详情信息!");
return false; return false;
} }
if(this.userpre.userpreDesc != null && this.userpre.userpreDesc != '' ){ if (this.userpre.userpreDesc != null && this.userpre.userpreDesc != '') {
//离沪乱码处理 //离沪乱码处理
let temp_userpreDesc = encodeURIComponent(this.userpre["userpreDesc"]) ; let temp_userpreDesc = encodeURIComponent(this.userpre["userpreDesc"]);
this.userpre.userpreDesc = temp_userpreDesc; this.userpre.userpreDesc = temp_userpreDesc;
} }
} }
this.storage.get("cityList").then((value)=>{ this.storage.get("cityList").then((value) => {
if(value != null && value != ''){ //离沪 if (value != null && value != '') { //离沪
this.addressid = ''; this.addressid = '';
for (let index = 0; index < value.length; index++) { for (let index = 0; index < value.length; index++) {
const element = value[index]; const element = value[index];
this.addressid += element["id"]+","; this.addressid += element["id"] + ",";
} }
this.addressid = this.addressid.substring(0,this.addressid.lastIndexOf(",")); this.addressid = this.addressid.substring(0, this.addressid.lastIndexOf(","));
this.userpre.outaddressids = this.addressid; this.userpre.outaddressids = this.addressid;
} //编辑或者是选择不离沪 } //编辑或者是选择不离沪
this.savePremanager_sysn(this.userpre,result=>{ this.savePremanager_sysn(this.userpre, result => {
let resultback = result; let resultback = result;
if(resultback.code == '200'){ if (resultback.code == '200') {
//this.appService.popToastView(resultback.msg,'middle',1000); //this.appService.popToastView(resultback.msg,'middle',1000);
//清空 插入 //清空 插入
...@@ -295,9 +289,9 @@ export class OutGoingReportEditPage { ...@@ -295,9 +289,9 @@ export class OutGoingReportEditPage {
this.navCtrl.push("MyReportPage"); this.navCtrl.push("MyReportPage");
}else{ } else {
//失败 //失败
this.appService.popToastView(resultback.msg,'middle',1000); this.appService.popToastView(resultback.msg, 'middle', 1000);
} }
}); });
...@@ -305,8 +299,8 @@ export class OutGoingReportEditPage { ...@@ -305,8 +299,8 @@ export class OutGoingReportEditPage {
} }
//防止异步 //防止异步
savePremanager_sysn(userprev,callback?): any { savePremanager_sysn(userprev, callback?): any {
this.appService.ObserverHttpPost("/wisdomgroup/modules/userpre/create",userprev) this.appService.ObserverHttpPost("/wisdomgroup/modules/userpre/create", userprev)
.toPromise() .toPromise()
.then(res => { .then(res => {
......
...@@ -57,6 +57,6 @@ ...@@ -57,6 +57,6 @@
<div (click)="delete()"><span>删除</span></div> <div (click)="delete()"><span>删除</span></div>
</div> </div>
<ion-toolbar> <ion-toolbar>
<ion-title> <span (click)="cancle()">取消</span> </ion-title> <p class="text-center" (click)="cancle()"> 取消 </p>
</ion-toolbar> </ion-toolbar>
</ion-footer> </ion-footer>
...@@ -64,6 +64,7 @@ page-list { ...@@ -64,6 +64,7 @@ page-list {
height: 11rem; height: 11rem;
background-color: #f8f8f8; background-color: #f8f8f8;
border-bottom: 1px solid #bbbbbb; border-bottom: 1px solid #bbbbbb;
box-shadow: 0px -2px 5px #bbb;
} }
.footter-opr div{ .footter-opr div{
width: 33%; width: 33%;
......
...@@ -83,12 +83,12 @@ export class HomePage { ...@@ -83,12 +83,12 @@ export class HomePage {
goActivity() { goActivity() {
this.navCtrl.push('ActivityListPage', { this.badge.clear();
this.navCtrl.push('ActivityListPage', {});
});
} }
goAnnouncement() { goAnnouncement() {
this.badge.clear();
this.navCtrl.push("AnnouncementPage"); this.navCtrl.push("AnnouncementPage");
} }
...@@ -284,6 +284,7 @@ export class HomePage { ...@@ -284,6 +284,7 @@ export class HomePage {
//消息通知 //消息通知
gotoNotice(){ gotoNotice(){
this.badge.clear();
this.navCtrl.setRoot(NoticePage); this.navCtrl.setRoot(NoticePage);
this.navCtrl.parent.select(2); this.navCtrl.parent.select(2);
} }
...@@ -294,6 +295,7 @@ export class HomePage { ...@@ -294,6 +295,7 @@ export class HomePage {
//外出报备跳转 //外出报备跳转
goOutGoingReportAboutAll() { goOutGoingReportAboutAll() {
this.badge.clear();
this.navCtrl.push("OutGoingReportPage", { this.navCtrl.push("OutGoingReportPage", {
type: 1 type: 1
}); });
...@@ -320,8 +322,7 @@ export class HomePage { ...@@ -320,8 +322,7 @@ export class HomePage {
this.appService.ObserverHttpGet("/wisdomgroup/modules/activity/hasNewActivity", null) this.appService.ObserverHttpGet("/wisdomgroup/modules/activity/hasNewActivity", null)
.subscribe((res: Response) => { .subscribe((res: Response) => {
let data = res.json(); let data = res.json();
this.badge.set(data.length); this.badge.set(1);
console.log(data);
this.hasNewActivity = data; this.hasNewActivity = data;
}, error => { }, error => {
this.appService.alert('网络异常!'); this.appService.alert('网络异常!');
...@@ -347,7 +348,7 @@ export class HomePage { ...@@ -347,7 +348,7 @@ export class HomePage {
this.appService.ObserverHttpGet("/wisdomgroup/modules/premanager/hasNewPremanager", null) this.appService.ObserverHttpGet("/wisdomgroup/modules/premanager/hasNewPremanager", null)
.subscribe((res: Response) => { .subscribe((res: Response) => {
let data = res.json(); let data = res.json();
this.badge.set(data.length); this.badge.set(1);
this.hasNewPremanager = data; this.hasNewPremanager = data;
}, error => { }, error => {
this.appService.alert('网络异常!'); this.appService.alert('网络异常!');
......
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
<ion-title text-center>设置</ion-title> <ion-title text-center>设置</ion-title>
</ion-navbar> </ion-navbar>
</ion-header> </ion-header>
<ion-content> <ion-content class="bgc-e7e8ed">
<ion-list> <ion-list>
<ion-item> <ion-item>
<ion-label>是否接受推送消息</ion-label> <ion-label>是否接受推送消息</ion-label>
<ion-toggle [(ngModel)]="pusNumber" (ionChange)="savePush()"></ion-toggle> <ion-toggle [(ngModel)]="pusNumber" (ionChange)="savePush()"></ion-toggle>
</ion-item> </ion-item>
<ion-item> <ion-item class="margin-top-20">
<span>当前版本</span> <span (click)="update()">当前版本</span>
<span float-right>{{version}}</span> <span float-right (click)="update()"><span *ngIf="!isLatest" class="red-span"></span>{{version}}</span>
</ion-item> </ion-item>
</ion-list> </ion-list>
<button class="submit-btn submit" (click)="logoutApp()">退出</button> <button class="submit-btn submit" (click)="logoutApp()">退出</button>
......
...@@ -50,4 +50,13 @@ page-version { ...@@ -50,4 +50,13 @@ page-version {
.list-ios .item-block .item-inner { .list-ios .item-block .item-inner {
border-bottom: 0.55px solid #c8c7cc; border-bottom: 0.55px solid #c8c7cc;
} }
.red-span{
background-color: red;
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
margin-right: 10px;
margin-bottom: 2px;
}
} }
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular'; import {AlertController, IonicPage, NavController, NavParams} from 'ionic-angular';
import { AppService } from '../../service/appHttpService'; import { AppService } from '../../service/appHttpService';
import { AppVersion } from '@ionic-native/app-version'; import { AppVersion } from '@ionic-native/app-version';
import { AppUpdateService } from '../../service/appUpdateService'; import { AppUpdateService } from '../../service/appUpdateService';
...@@ -23,7 +23,8 @@ export class VersionPage { ...@@ -23,7 +23,8 @@ export class VersionPage {
public appService:AppService, public appService:AppService,
private appUpdateService: AppUpdateService, private appUpdateService: AppUpdateService,
private appVersion: AppVersion, private appVersion: AppVersion,
private storage:Storage private storage:Storage,
private alertCtrl: AlertController
) { ) {
} }
...@@ -31,6 +32,13 @@ export class VersionPage { ...@@ -31,6 +32,13 @@ export class VersionPage {
ionViewWillEnter() { ionViewWillEnter() {
this.getversion(); this.getversion();
this.getAppPush(); this.getAppPush();
this.appUpdateService.compariVersion().subscribe(res => {
var data = res.json();
if (data.code == 200) {
this.latestVersion = data.latestVersion;
}
});
} }
//获取推送开关 //获取推送开关
...@@ -72,8 +80,33 @@ export class VersionPage { ...@@ -72,8 +80,33 @@ export class VersionPage {
//更新 //更新
update(){ update(){
if(!this.isLatest){
const alert = this.alertCtrl.create({
subTitle: '已是最新版本',
buttons: ['确定']
});
alert.present();
}else{
const confirm = this.alertCtrl.create({
message: '有最新版本,是否更新?',
buttons: [
{
text: '取消',
handler: () => {
console.log('Disagree clicked');
}
},
{
text: '确定',
handler: () => {
this.appUpdateService.downloadApp("/wisdomgroup/app/download"); this.appUpdateService.downloadApp("/wisdomgroup/app/download");
} }
}
]
});
confirm.present();
}
}
//后台退出 //后台退出
......
...@@ -54,7 +54,6 @@ export class AppUpdateService { ...@@ -54,7 +54,6 @@ export class AppUpdateService {
buttons: ['后台下载'] buttons: ['后台下载']
}); });
// const fileTransfer: FileTransferObject = this.fileTransfer.create(); // const fileTransfer: FileTransferObject = this.fileTransfer.create();
// const apk = this.file.externalRootDirectory + 'app.apk'; //apk保存的目录 // const apk = this.file.externalRootDirectory + 'app.apk'; //apk保存的目录
// fileTransfer.download(AppGlobal.domain+apkUrl, apk).then(() => { // fileTransfer.download(AppGlobal.domain+apkUrl, apk).then(() => {
...@@ -98,7 +97,8 @@ export class AppUpdateService { ...@@ -98,7 +97,8 @@ export class AppUpdateService {
let path = this.file.externalDataDirectory; let path = this.file.externalDataDirectory;
this.file.writeFile(path, fileName, blob, { this.file.writeFile(path, fileName, blob, {
replace: true replace: true
}).then(() => { }).then(
() => {
this.fileOpener.open( this.fileOpener.open(
path + fileName, path + fileName,
'application/vnd.android.package-archive' 'application/vnd.android.package-archive'
......
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