Commit a4323848 authored by wangqinghua's avatar wangqinghua

权限新增

parent ed5eae0f
npm install ionic serve ionic build --prod cordova build android --release xxxx data-wow-duration: Change the animation duration data-wow-delay: Delay before the animation starts data-wow-offset: Distance to start the animation (related to the browser bottom) data-wow-iteration: Number of times the animation is repeated jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore app-release-unsigned.apk shreg shregshreg 18521524378 qweasd123 npm install ionic serve ionic build --prod cordova build android --release xxxx data-wow-duration: Change the animation duration data-wow-delay: Delay before the animation starts data-wow-offset: Distance to start the animation (related to the browser bottom) data-wow-iteration: Number of times the animation is repeated jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore app-release-unsigned.apk shreg shregshreg 显示的菜单代码,1通讯录,2审核审批,3办理督办,4数据报表,5信息查询,6审批,7审核,8事业单位,9机关群团 13321810809 qweasd123
\ No newline at end of file \ No newline at end of file
......
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
{ {
"path": "/shfrdjweb", "path": "/shfrdjweb",
"proxyUrl": "http://218.242.131.175/shfrdjweb" "proxyUrl": "http://218.242.131.175/shfrdjweb"
},
{
"path": "/bbwx",
"proxyUrl": "https://www.cesdj.cn/bbwx"
} }
] ]
} }
...@@ -1857,6 +1857,14 @@ ...@@ -1857,6 +1857,14 @@
} }
} }
}, },
"cordova-hot-code-push-plugin": {
"version": "1.5.3",
"resolved": "https://registry.npm.taobao.org/cordova-hot-code-push-plugin/download/cordova-hot-code-push-plugin-1.5.3.tgz",
"integrity": "sha1-s47gY+8koU3sQMEj8r75AKiHw0I=",
"requires": {
"xml2js": "^0.4"
}
},
"cordova-ios": { "cordova-ios": {
"version": "5.0.1", "version": "5.0.1",
"resolved": "http://r.cnpmjs.org/cordova-ios/download/cordova-ios-5.0.1.tgz", "resolved": "http://r.cnpmjs.org/cordova-ios/download/cordova-ios-5.0.1.tgz",
...@@ -1943,7 +1951,7 @@ ...@@ -1943,7 +1951,7 @@
"integrity": "sha1-p12L4uvDu5sjxbG70ZkhTsJnWGs=" "integrity": "sha1-p12L4uvDu5sjxbG70ZkhTsJnWGs="
}, },
"cordova-plugin-imagepicker": { "cordova-plugin-imagepicker": {
"version": "git+https://github.com/giantss/cordova-plugin-ImagePicker.git#9a04007a5783802f004935cc6513453d58b831cb", "version": "git+https://github.com/giantss/cordova-plugin-ImagePicker.git#9945467224d00db565009fe173392acf39a5e4d4",
"from": "git+https://github.com/giantss/cordova-plugin-ImagePicker.git", "from": "git+https://github.com/giantss/cordova-plugin-ImagePicker.git",
"requires": { "requires": {
"async": "^2.6.0" "async": "^2.6.0"
...@@ -6265,8 +6273,7 @@ ...@@ -6265,8 +6273,7 @@
"sax": { "sax": {
"version": "1.2.4", "version": "1.2.4",
"resolved": "http://r.cnpmjs.org/sax/download/sax-1.2.4.tgz", "resolved": "http://r.cnpmjs.org/sax/download/sax-1.2.4.tgz",
"integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=", "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk="
"dev": true
}, },
"schema-utils": { "schema-utils": {
"version": "0.4.7", "version": "0.4.7",
...@@ -8274,7 +8281,6 @@ ...@@ -8274,7 +8281,6 @@
"version": "0.4.19", "version": "0.4.19",
"resolved": "http://r.cnpmjs.org/xml2js/download/xml2js-0.4.19.tgz", "resolved": "http://r.cnpmjs.org/xml2js/download/xml2js-0.4.19.tgz",
"integrity": "sha1-aGwg8hMgnpSr8NG88e+qKRx4J6c=", "integrity": "sha1-aGwg8hMgnpSr8NG88e+qKRx4J6c=",
"dev": true,
"requires": { "requires": {
"sax": ">=0.6.0", "sax": ">=0.6.0",
"xmlbuilder": "~9.0.1" "xmlbuilder": "~9.0.1"
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
"com.lampa.startapp": "^6.1.6", "com.lampa.startapp": "^6.1.6",
"cordova-android": "^8.1.0", "cordova-android": "^8.1.0",
"cordova-browser": "^6.0.0", "cordova-browser": "^6.0.0",
"cordova-hot-code-push-plugin": "^1.5.3",
"cordova-ios": "^5.0.1", "cordova-ios": "^5.0.1",
"cordova-plugin-add-swift-support": "^2.0.2", "cordova-plugin-add-swift-support": "^2.0.2",
"cordova-plugin-advanced-http": "^2.1.1", "cordova-plugin-advanced-http": "^2.1.1",
...@@ -108,7 +109,8 @@ ...@@ -108,7 +109,8 @@
"phonegap-plugin-mobile-accessibility": {}, "phonegap-plugin-mobile-accessibility": {},
"cordova-plugin-file-transfer": {}, "cordova-plugin-file-transfer": {},
"cordova-plugin-photo-library": {}, "cordova-plugin-photo-library": {},
"cordova-plugin-camera": {} "cordova-plugin-camera": {},
"cordova-hot-code-push-plugin": {}
}, },
"platforms": [ "platforms": [
"browser", "browser",
......
import * as Mock from 'mockjs'; export const SERVER_API_URL = '/shfrdj';// export const SERVER_API_URL = 'http://218.242.131.175/shfrdj'; export const SERVER_API_WEB = 'shfrdjweb'; // export const SERVER_API_WEB = 'http://218.242.131.175/shfrdjweb'; Mock.setup( { timeout:50, } ); export const institutionalNature = [ {label:'挂牌机构',value:'8'}, {label:'内设机构',value:'7'}, {label:'派驻机关',value:'6'}, {label:'派出机构',value:'5'}, {label:'分支机构',value:'4'}, {label:'临时机构',value:'3'}, {label:'议事协调机构',value:'2'}, {label:'挂靠机构',value:'1'}, ] import * as Mock from 'mockjs'; export const SERVER_API_URL = '/shfrdj';// export const SERVER_API_URL = 'http://218.242.131.175/shfrdj'; export const SERVER_API_WEB = 'shfrdjweb'; // export const SERVER_API_WEB = 'http://218.242.131.175/shfrdjweb'; export const SERVER_API_BBWX = '/bbwx'; // export const SERVER_API_WEB = 'http://218.242.131.175/shfrdjweb'; Mock.setup( { timeout: 50, } ); export const institutionalNature = [ {label: '挂牌机构', value: '8'}, {label: '内设机构', value: '7'}, {label: '派驻机关', value: '6'}, {label: '派出机构', value: '5'}, {label: '分支机构', value: '4'}, {label: '临时机构', value: '3'}, {label: '议事协调机构', value: '2'}, {label: '挂靠机构', value: '1'}, ]
\ No newline at end of file \ No newline at end of file
......
...@@ -17,7 +17,7 @@ export class EchartDataComponent { ...@@ -17,7 +17,7 @@ export class EchartDataComponent {
if (this.data) { if (this.data) {
echarts.init(this.echart.nativeElement).setOption(this.data, true); echarts.init(this.echart.nativeElement).setOption(this.data, true);
} }
}, 1000) }, 10000)
} }
} }
...@@ -2,6 +2,7 @@ import {Component} from '@angular/core'; ...@@ -2,6 +2,7 @@ import {Component} from '@angular/core';
import {NavParams, ViewController} from "ionic-angular"; import {NavParams, ViewController} from "ionic-angular";
import {LoginService} from "../../pages/login/login.service"; import {LoginService} from "../../pages/login/login.service";
import {GlobalData} from "../../core/GlobleData"; import {GlobalData} from "../../core/GlobleData";
import {Storage} from "@ionic/storage";
@Component({ @Component({
selector: 'filter', selector: 'filter',
...@@ -10,11 +11,7 @@ import {GlobalData} from "../../core/GlobleData"; ...@@ -10,11 +11,7 @@ import {GlobalData} from "../../core/GlobleData";
export class FilterComponent { export class FilterComponent {
text: string; text: string;
approvaList = [ approvaList = [];
{name: "事业单位", type: "1"},
{name: "机关群团", type: "2"},
{name: "其他", type: "3"},
];
approvalObj; approvalObj;
...@@ -24,10 +21,20 @@ export class FilterComponent { ...@@ -24,10 +21,20 @@ export class FilterComponent {
constructor(private viewCtrl: ViewController, private params: NavParams, constructor(private viewCtrl: ViewController, private params: NavParams,
private globle: GlobalData, private globle: GlobalData,
private storage: Storage,
private loginSer: LoginService) { private loginSer: LoginService) {
this.areaObj = this.params.get("areaObj"); this.areaObj = this.params.get("areaObj");
this.approvalObj = this.params.get("approvalObj"); this.approvalObj = this.params.get("approvalObj");
this.globleArea = this.globle.area; this.globleArea = this.globle.area;
this.storage.get('roles').then((value) => {
if (value.indexOf('8') > -1) {
this.approvaList.push({name: "事业单位", type: "1"})
}
if (value.indexOf('9') > -1) {
this.approvaList.push({name: "机关群团", type: "2"})
}
})
this.getArea() this.getArea()
} }
......
import {Injectable} from '@angular/core'; /** * 全局变量 */ @Injectable()export class GlobalData { private _videoNum: number = 1; // 播放器状态 private _token: string; private _userObj: any; private _area: any; get videoNum(): number { return this._videoNum; } set videoNum(value: number) { this._videoNum = value; } //token get token(): string { return this._token; } set token(value: string) { this._token = value; } //用户信息 get userObj(): any { return this._userObj; } set userObj(value: any) { this._userObj = value; } //区属or市属 get area(): any { return this._area; } set area(value: any) { this._area = value; } } import {Injectable} from '@angular/core'; /** * 全局变量 */ @Injectable()export class GlobalData { private _videoNum: number = 1; // 播放器状态 private _token: string; private _userObj: any; private _area: any; private _roles: any; get videoNum(): number { return this._videoNum; } set videoNum(value: number) { this._videoNum = value; } //token get token(): string { return this._token; } set token(value: string) { this._token = value; } //用户信息 get userObj(): any { return this._userObj; } set userObj(value: any) { this._userObj = value; } //区属or市属 get area(): any { return this._area; } set area(value: any) { this._area = value; } //权限 get roles(): any { return this._roles; } set roles(value: any) { this._roles = value; } }
\ No newline at end of file \ No newline at end of file
......
...@@ -12,8 +12,8 @@ page-deal-detail { ...@@ -12,8 +12,8 @@ page-deal-detail {
} }
.choose { .choose {
text-align: right; text-align: left;
margin-right: 20px; margin-left: 20px;
font-size: 1.5rem; font-size: 1.5rem;
color: #999; color: #999;
} }
...@@ -21,11 +21,12 @@ page-deal-detail { ...@@ -21,11 +21,12 @@ page-deal-detail {
.flowDetail .choose, .flowDetail .choose,
.handle .choose { .handle .choose {
color: #5991CA; color: #5991CA;
text-align: right;
} }
.flowDetail .item-left { .flowDetail .item-left {
text-align: left; text-align: left;
width: 80%; width: 75%;
} }
ion-label { ion-label {
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
</ion-navbar> </ion-navbar>
</ion-header> </ion-header>
<ion-content class="content"> <ion-content class="content">
<div ion-fixed style="width: 100%">
<ion-list class="activity-title"> <ion-list class="activity-title">
<ion-item> <ion-item>
<ion-label>审核管理</ion-label> <ion-label>审核管理</ion-label>
...@@ -17,7 +18,7 @@ ...@@ -17,7 +18,7 @@
</ion-list> </ion-list>
<div class="content-box"> <div class="content-box">
<div class="content-box-item " (click)="changeType(0)"> <div class="content-box-item ">
<p class="item-title {{type.option == 0?'bgc-5991CA':''}} ">全部</p> <p class="item-title {{type.option == 0?'bgc-5991CA':''}} ">全部</p>
<p class="item-count">{{type.allList.length}}</p> <p class="item-count">{{type.allList.length}}</p>
</div> </div>
...@@ -38,8 +39,9 @@ ...@@ -38,8 +39,9 @@
<p class="item-count">{{type.getList.length}}</p> <p class="item-count">{{type.getList.length}}</p>
</div> </div>
</div> </div>
</div>
<div class="list"> <div class="list" style="margin-top: 160px">
<div *ngFor="let item of type.list"> <div *ngFor="let item of type.list">
<div class="group"> <div class="group">
<div class="inner-group" (click)="goToDetail(item)"> <div class="inner-group" (click)="goToDetail(item)">
......
...@@ -8,6 +8,7 @@ import {SearchPersonComponent} from "../../components/search-person/search-perso ...@@ -8,6 +8,7 @@ import {SearchPersonComponent} from "../../components/search-person/search-perso
import {DatePipe} from "@angular/common"; import {DatePipe} from "@angular/common";
import {HomeService} from "../home/home.service"; import {HomeService} from "../home/home.service";
import {CommonService} from "../../core/common.service"; import {CommonService} from "../../core/common.service";
import {Storage} from "@ionic/storage";
@IonicPage() @IonicPage()
@Component({ @Component({
...@@ -18,13 +19,11 @@ export class DealPage { ...@@ -18,13 +19,11 @@ export class DealPage {
option = { option = {
type: '1', type: '1',
list: [ //默认事业单位 list: [ //默认事业单位
{name: "事业单位", type: '1'},
{name: "机关群团", type: '2'},
{name: "其他", type: '3'}
] ]
}; };
type = { type = {
option: 0, option: null,
allList: [], allList: [],
list: [], list: [],
setList: [], //设立 1 setList: [], //设立 1
...@@ -40,10 +39,25 @@ export class DealPage { ...@@ -40,10 +39,25 @@ export class DealPage {
private datePipe: DatePipe, private datePipe: DatePipe,
private commonSer: CommonService, private commonSer: CommonService,
private homeSer: HomeService, private homeSer: HomeService,
private storage: Storage,
private ModalCtrl: ModalController, private ModalCtrl: ModalController,
private loadCtrl: LoadingController, private loadCtrl: LoadingController,
private dealSer: DealService) { private dealSer: DealService) {
this.mineInfo = this.globle.userObj; this.mineInfo = this.globle.userObj;
this.storage.get('roles').then((value) => {
if (value.indexOf('8') == -1 && value.indexOf('9') == -1) {
this.commonSer.toast('没有事业单位和机关群体权限,请联系管理员!');
return
}
if (value.indexOf('9') > -1) {
this.option.list.push({name: "机关群团", type: "2"});
this.option.type = '2';
}
if (value.indexOf('8') > -1) {
this.option.list.push({name: "事业单位", type: "1"});
this.option.type = '1';
}
})
} }
ionViewDidEnter() { ionViewDidEnter() {
...@@ -59,7 +73,7 @@ export class DealPage { ...@@ -59,7 +73,7 @@ export class DealPage {
flow: "0", flow: "0",
areaCode: this.globle.userObj.area, areaCode: this.globle.userObj.area,
"page": "1", "page": "1",
"limit": "10000" "limit": "1000000"
}; };
this.dealSer.searchSchedule(data).subscribe( this.dealSer.searchSchedule(data).subscribe(
(res) => { (res) => {
......
...@@ -9,21 +9,42 @@ ...@@ -9,21 +9,42 @@
<div class="echart-title"> <div class="echart-title">
<span>事业单位总览信息</span> <span>事业单位总览信息</span>
</div> </div>
<ion-segment style="padding: 0 30px" [(ngModel)]="type" (ngModelChange)="switchEchart()">
<ion-segment-button value="unit">
单位数(个)
</ion-segment-button>
<ion-segment-button value="bzrs">
编制人数(人)
</ion-segment-button>
<ion-segment-button value="syrs">
实有人数(人)
</ion-segment-button>
</ion-segment>
<div class="echart"> <div class="echart">
<echart-data [data]="echartData1"></echart-data> <div #echart1 class="echart-pie"> </div>
</div> </div>
<div class="data"> <div class="data">
<div> <div class="table">
<p>单位数</p> <table border="1">
<p>{{unitsInfo?.hj.unitcount}}</p> <thead>
</div> <tr>
<div> <th>隶属</th>
<p>编制数</p> <th>全额拨款</th>
<p>{{unitsInfo?.hj.bianzhicount}}</p> <th>差额拨款</th>
</div> <th>自收自支</th>
<div> <th>合计</th>
<p>实有数</p> </tr>
<p>{{unitsInfo?.hj.shiyoucount}}</p> </thead>
<tbody>
<tr *ngFor="let item of unitsInfo">
<td>{{item.geo}}</td>
<td>{{type == 'unit'?item.unitCount1:type == 'bzrs'?item.bzrs1:item.syrs1}}</td>
<td>{{type == 'unit'?item.unitCount2:type == 'bzrs'?item.bzrs2:item.syrs2}}</td>
<td>{{type == 'unit'?item.unitCount3:type == 'bzrs'?item.bzrs3:item.syrs3}}</td>
<td>{{type == 'unit'?item.unitTotal:type == 'bzrs'?item.bzrsTotal:item.syrsTotal}}</td>
</tr>
</tbody>
</table>
</div> </div>
</div> </div>
</div> </div>
...@@ -32,7 +53,7 @@ ...@@ -32,7 +53,7 @@
<span>实名制上报率</span> <span>实名制上报率</span>
</div> </div>
<div class="echart"> <div class="echart">
<echart-data [data]="echartData2"></echart-data> <div #echart2 class="echart-pie"> </div>
</div> </div>
<ion-row class="data-report"> <ion-row class="data-report">
<ion-col col-4 *ngFor="let item of areaList"> <ion-col col-4 *ngFor="let item of areaList">
......
...@@ -47,4 +47,19 @@ page-data-report { ...@@ -47,4 +47,19 @@ page-data-report {
} }
} }
} }
.echart-pie {
width: 100%;
height: 180px;
}
table {
width: 100%;
td, th {
text-align: center;
height: 30px;
padding: 2px;
}
}
} }
import {Component} from '@angular/core'; import {Component, ElementRef, ViewChild} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular'; import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {HomeService} from "../home.service"; import {HomeService} from "../home.service";
import {DatePipe} from "@angular/common"; import {DatePipe} from "@angular/common";
import * as echarts from 'echarts';
@Component({ @Component({
selector: 'page-data-report', selector: 'page-data-report',
templateUrl: 'data-report.html', templateUrl: 'data-report.html',
}) })
export class DataReportPage { export class DataReportPage {
@ViewChild('echart1') echart1: ElementRef;//显示图形的容器
@ViewChild('echart2') echart2: ElementRef;//显示图形的容器
echartData1; echartData1;
echartData2; echartData2;
count = { count = {
...@@ -22,28 +24,42 @@ export class DataReportPage { ...@@ -22,28 +24,42 @@ export class DataReportPage {
yearmonth = '2019-11'; yearmonth = '2019-11';
areaList; areaList;
unitsInfo; unitsInfo;
type = "unit";
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
private datePipe: DatePipe, private datePipe: DatePipe,
private homeSer: HomeService) { private homeSer: HomeService) {
this.yearmonth = new Date().getFullYear() + '-' + new Date().getMonth(); const yearmonth = new Date().getFullYear() + '-' + new Date().getMonth();
this.yearmonth = this.datePipe.transform(yearmonth, 'yyyy-MM')
} }
ionViewDidLoad() { ionViewDidLoad() {
this.shangbaolv(); this.shangbaolv();
this.getUnits();
}
const data1 = { //单位信息总览
getUnits() {
const data = {
yearmonth: this.yearmonth, yearmonth: this.yearmonth,
}; };
this.homeSer.units(data1).subscribe( this.homeSer.units(data).subscribe(
(res) => { (res) => {
if (res.code == 0) { if (res.code == 0) {
this.unitsInfo = res.list; this.unitsInfo = res.data;
this.switchEchart();
}
}
)
}
switchEchart() {
this.echartData1 = { this.echartData1 = {
grid: { grid: {
left: "8%", left: "8%",
right: "10%", right: "10%",
top: "18%",
width: "90%", width: "90%",
height: "70%", height: "70%",
containLabel: true containLabel: true
...@@ -57,59 +73,47 @@ export class DataReportPage { ...@@ -57,59 +73,47 @@ export class DataReportPage {
} }
} }
}, },
legend: {
data: ['实际在编人员数', '编制数', '单位数']
},
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
data: [res.list.hj.areaName, res.list.qx.areaName, res.list.sh.areaName], data: this.unitsInfo.map(e => {
return e.geo;
}),
axisPointer: { axisPointer: {
type: 'shadow' type: 'shadow'
}
}
],
yAxis: [
{
type: 'value',
name: '人数',
axisLabel: {
formatter: '{value} 人'
}
}, },
{
type: 'value',
name: '单位数',
axisLabel: { axisLabel: {
formatter: '{value} 个' interval: 0,
rotate: 45,
} }
} }
], ],
series: [ yAxis: {
{ type: 'value',
name: '实际在编人员数', min: 0,
type: 'bar',
data: [res.list.hj.shiyoucount, res.list.qx.shiyoucount, res.list.sh.shiyoucount],
color: ['#5baad2']
},
{
name: '编制数',
type: 'bar',
data: [res.list.hj.bianzhicount, res.list.qx.bianzhicount, res.list.sh.bianzhicount],
color: ['#6de0d2']
}, },
series: [
{ {
name: '单位数', name: this.type == 'unit' ? '单位数(个)' : this.type == 'syrs' ? '实有人数(人)' : '编制人数(人)',
type: 'bar', type: 'bar',
yAxisIndex: 1, data: this.unitsInfo.map(e => {
data: [res.list.hj.unitcount, res.list.qx.unitcount, res.list.sh.unitcount], let d;
color: ['#feda66'] if (this.type == 'unit') {
d = e.unitTotal;
} }
] if (this.type == 'syrs') {
}; d = e.syrsTotal;
} }
if (this.type == 'bzrs') {
d = e.bzrsTotal;
} }
) return d;
}),
color: ['#feda66']
},
]
};
echarts.init(this.echart1.nativeElement).setOption(this.echartData1, true);
} }
//实名制上报率 //实名制上报率
...@@ -152,13 +156,7 @@ export class DataReportPage { ...@@ -152,13 +156,7 @@ export class DataReportPage {
type: 'value', type: 'value',
min: 0, min: 0,
}, },
dataZoom: [{
type: "slider", //详细配置可见echarts官网
show: true, //是否显示
realtime: true, //
start: 0, //伸缩条开始位置(1-100),可以随时更改
end: 50, //伸缩条结束位置(1-100),可以随时更改
}],
series: [ series: [
{ {
data: this.areaList.map(e => { data: this.areaList.map(e => {
...@@ -171,6 +169,7 @@ export class DataReportPage { ...@@ -171,6 +169,7 @@ export class DataReportPage {
} }
] ]
}; };
echarts.init(this.echart2.nativeElement).setOption(this.echartData2, true);
} }
} }
) )
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
</ion-navbar> </ion-navbar>
</ion-header> </ion-header>
<ion-content class="content"> <ion-content class="content">
<div class="searchbar" ion-fixed> <div ion-fixed style="width: 100%">
<div class="searchbar" >
<div class="approval"> <div class="approval">
<span>审核类型:</span> <span>审核类型:</span>
<span>{{searchObj.approvalObj?.name }}</span> <span>{{searchObj.approvalObj?.name }}</span>
...@@ -21,7 +22,7 @@ ...@@ -21,7 +22,7 @@
</div> </div>
</div> </div>
<div class="content-box"> <div class="content-box">
<div class="content-box-item " (click)="changeType(0)"> <div class="content-box-item ">
<p class="item-title {{type.option == 0?'bgc-5991CA':''}} ">全部</p> <p class="item-title {{type.option == 0?'bgc-5991CA':''}} ">全部</p>
<p class="item-count">{{type.allList.length}}</p> <p class="item-count">{{type.allList.length}}</p>
</div> </div>
...@@ -42,8 +43,9 @@ ...@@ -42,8 +43,9 @@
<p class="item-count">{{type.getList.length}}</p> <p class="item-count">{{type.getList.length}}</p>
</div> </div>
</div> </div>
</div>
<div class="list"> <div class="list" style="margin-top: 135px">
<div *ngFor="let item of type.list"> <div *ngFor="let item of type.list">
<div class="group"> <div class="group">
<div class="inner-group" (click)="goToDetail(item)"> <div class="inner-group" (click)="goToDetail(item)">
......
...@@ -64,7 +64,6 @@ page-do-verity { ...@@ -64,7 +64,6 @@ page-do-verity {
border-bottom: 1px solid #f2f2f2; border-bottom: 1px solid #f2f2f2;
border-top: 1px solid #f2f2f2; border-top: 1px solid #f2f2f2;
margin-bottom: 10px; margin-bottom: 10px;
margin-top: 50px;
} }
.content-box-item { .content-box-item {
......
...@@ -8,6 +8,7 @@ import {DatePipe} from "@angular/common"; ...@@ -8,6 +8,7 @@ import {DatePipe} from "@angular/common";
import {SearchPersonComponent} from "../../../components/search-person/search-person"; import {SearchPersonComponent} from "../../../components/search-person/search-person";
import {HomeService} from "../home.service"; import {HomeService} from "../home.service";
import {CommonService} from "../../../core/common.service"; import {CommonService} from "../../../core/common.service";
import {Storage} from "@ionic/storage";
@Component({ @Component({
selector: 'page-do-verity', selector: 'page-do-verity',
...@@ -15,15 +16,10 @@ import {CommonService} from "../../../core/common.service"; ...@@ -15,15 +16,10 @@ import {CommonService} from "../../../core/common.service";
}) })
export class DoVerityPage { export class DoVerityPage {
option = { option = {
type: '1', type: null,
list: [
{name: "事业单位", type: '1'},
{name: "机关团体", type: '2'},
{name: "其他", type: '3'}
]
}; };
type = { type = {
option: 0, option: null,
list: [], list: [],
allList: [], allList: [],
setList: [], //设立 1 setList: [], //设立 1
...@@ -34,7 +30,7 @@ export class DoVerityPage { ...@@ -34,7 +30,7 @@ export class DoVerityPage {
isShow = false; isShow = false;
searchObj = { searchObj = {
areaObj: null, areaObj: null,
approvalObj: {name: "事业单位", type: '1'}, approvalObj: {},
areaCode: null areaCode: null
}; };
yearmonth; yearmonth;
...@@ -47,11 +43,26 @@ export class DoVerityPage { ...@@ -47,11 +43,26 @@ export class DoVerityPage {
private homeSer: HomeService, private homeSer: HomeService,
private commonSer: CommonService, private commonSer: CommonService,
private loadCtrl: LoadingController, private loadCtrl: LoadingController,
private storage: Storage,
private dealSer: DealService, private modalCtrl: ModalController) { private dealSer: DealService, private modalCtrl: ModalController) {
this.mineInfo = this.globle.userObj; this.mineInfo = this.globle.userObj;
this.searchObj.areaCode = this.globle.userObj.area; this.searchObj.areaCode = this.globle.userObj.area;
this.searchObj.areaObj = this.globle.area; this.searchObj.areaObj = this.globle.area;
this.globleArea = this.globle.area; this.globleArea = this.globle.area;
this.storage.get('roles').then((value) => {
if (value.indexOf('8') == -1 && value.indexOf('9') == -1) {
this.commonSer.toast('没有事业单位和机关群体权限,请联系管理员!');
return
}
if (value.indexOf('9') > -1) {
this.searchObj.approvalObj = {name: "机关群团", type: "2"};
this.option.type = '2';
}
if (value.indexOf('8') > -1) {
this.searchObj.approvalObj = {name: "事业单位", type: "1"};
this.option.type = '1';
}
})
} }
......
...@@ -19,46 +19,67 @@ ...@@ -19,46 +19,67 @@
<img src="./assets/imgs/home_banner.png"> <img src="./assets/imgs/home_banner.png">
</div> </div>
<div class="new-module"> <div class="new-module">
<div class="card" (click)="goToContact()"> <div *ngIf="roles.indexOf('2') > -1" class="card" (click)="goToVerity()">
<img src="./assets/imgs/txl.png">
<p>通讯录</p>
</div>
<div class="card" (click)="goToVerity()">
<img src="./assets/imgs/spsh.png"> <img src="./assets/imgs/spsh.png">
<p>审核审批</p> <p>审核审批</p>
</div> </div>
<div class="card" (click)="goToSupervise()"> <div *ngIf="roles.indexOf('3') > -1" class="card" (click)="goToSupervise()">
<img src="./assets/imgs/db.png"> <img src="./assets/imgs/db.png">
<p>办理督办</p> <p>办理督办</p>
</div> </div>
<div class="card" (click)="goToReport()"> <div *ngIf="roles.indexOf('4') > -1" class="card" (click)="goToReport()">
<img src="./assets/imgs/sjbb.png"> <img src="./assets/imgs/sjbb.png">
<p>数据报表</p> <p>数据报表</p>
</div> </div>
<div class="card" (click)="goToInfo()"> <div *ngIf="roles.indexOf('5') > -1" class="card" (click)="goToInfo()">
<img src="./assets/imgs/xxcx.png"> <img src="./assets/imgs/xxcx.png">
<p>信息查询</p> <p>信息查询</p>
</div> </div>
<div *ngIf="roles.indexOf('1') > -1" class="card" (click)="goToContact()">
<img src="./assets/imgs/txl.png">
<p>通讯录</p>
</div>
</div> </div>
<div class="echart-data"> <div class="echart-data">
<div class="echart-title"> <div class="echart-title">
<span>事业单位总览信息</span> <span>事业单位总览信息</span>
</div> </div>
<ion-segment style="padding: 0 30px" [(ngModel)]="type" (ngModelChange)="switchEchart()">
<ion-segment-button value="unit">
单位数(个)
</ion-segment-button>
<ion-segment-button value="bzrs">
编制人数(人)
</ion-segment-button>
<ion-segment-button value="syrs">
实有人数(人)
</ion-segment-button>
</ion-segment>
<div class="echart"> <div class="echart">
<echart-data [data]="echartData"></echart-data> <div #echart class="echart-pie"> </div>
</div> </div>
<div class="data"> <div class="data">
<div> <div class="table">
<p>单位数</p> <table border="1">
<p>{{unitsInfo?.hj.unitcount}}</p> <thead>
</div> <tr>
<div> <th>隶属</th>
<p>编制数</p> <th>全额拨款</th>
<p>{{unitsInfo?.hj.bianzhicount}}</p> <th>差额拨款</th>
</div> <th>自收自支</th>
<div> <th>合计</th>
<p>实有数</p> </tr>
<p>{{unitsInfo?.hj.shiyoucount}}</p> </thead>
<tbody>
<tr *ngFor="let item of unitsInfo">
<td>{{item.geo}}</td>
<td>{{type == 'unit'?item.unitCount1:type == 'bzrs'?item.bzrs1:item.syrs1}}</td>
<td>{{type == 'unit'?item.unitCount2:type == 'bzrs'?item.bzrs2:item.syrs2}}</td>
<td>{{type == 'unit'?item.unitCount3:type == 'bzrs'?item.bzrs3:item.syrs3}}</td>
<td>{{type == 'unit'?item.unitTotal:type == 'bzrs'?item.bzrsTotal:item.syrsTotal}}</td>
</tr>
</tbody>
</table>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -88,7 +88,23 @@ page-home { ...@@ -88,7 +88,23 @@ page-home {
color: #ffffff; color: #ffffff;
transform: scale(0.8); transform: scale(0.8);
} }
echart-data .echart-pie{
echart-data .echart-pie {
height: 200px; height: 200px;
} }
.echart-pie {
width: 100%;
height: 180px;
}
table {
width: 100%;
td, th {
text-align: center;
height: 30px;
padding: 2px;
}
}
} }
...@@ -16,15 +16,17 @@ import {PersonPage} from "../mine/person/person"; ...@@ -16,15 +16,17 @@ import {PersonPage} from "../mine/person/person";
import {GlobalData} from "../../core/GlobleData"; import {GlobalData} from "../../core/GlobleData";
import {DatePipe} from "@angular/common"; import {DatePipe} from "@angular/common";
import {InfoListPage} from "./report-info/info-list/info-list"; import {InfoListPage} from "./report-info/info-list/info-list";
import * as echarts from 'echarts';
@Component({ @Component({
selector: 'page-home', selector: 'page-home',
templateUrl: 'home.html' templateUrl: 'home.html'
}) })
export class HomePage { export class HomePage {
@ViewChild('echart') echart: ElementRef;//显示图形的容器
echartData; echartData;
type = 'teacher'; type = 'unit';
info = { info = {
new: 0, new: 0,
...@@ -33,16 +35,21 @@ export class HomePage { ...@@ -33,16 +35,21 @@ export class HomePage {
unitsInfo; unitsInfo;
mineInfo; //个人信息 mineInfo; //个人信息
roles = [];
constructor(public navCtrl: NavController, public homeSer: HomeService, private loadCtrl: LoadingController, constructor(public navCtrl: NavController, public homeSer: HomeService, private loadCtrl: LoadingController,
private commonSer: CommonService, private storage: Storage, private commonSer: CommonService, private storage: Storage,
private appSer: AppService, public statusBar: StatusBar, private appSer: AppService, public statusBar: StatusBar,
private globle: GlobalData, private global: GlobalData,
private datePipe: DatePipe, private datePipe: DatePipe,
private mineSer: MineService, private tabSer: TabService, private inAppBrowser: InAppBrowser, private mineSer: MineService, private tabSer: TabService, private inAppBrowser: InAppBrowser,
private renderer: Renderer2) { private renderer: Renderer2) {
this.mineInfo = this.globle.userObj; this.mineInfo = this.global.userObj;
this.yearmonth = new Date().getFullYear() +'-'+new Date().getMonth(); this.storage.get('roles').then((value) => {
this.roles = value || [];
})
const yearmonth = new Date().getFullYear() + '-' + new Date().getMonth();
this.yearmonth = this.datePipe.transform(yearmonth, 'yyyy-MM')
} }
ionViewDidLoad() { ionViewDidLoad() {
...@@ -58,11 +65,19 @@ export class HomePage { ...@@ -58,11 +65,19 @@ export class HomePage {
this.homeSer.units(data).subscribe( this.homeSer.units(data).subscribe(
(res) => { (res) => {
if (res.code == 0) { if (res.code == 0) {
this.unitsInfo = res.list; this.unitsInfo = res.data;
this.switchEchart();
}
}
)
}
switchEchart() {
this.echartData = { this.echartData = {
grid: { grid: {
left: "8%", left: "8%",
right: "10%", right: "10%",
top: "18%",
width: "90%", width: "90%",
height: "70%", height: "70%",
containLabel: true containLabel: true
...@@ -76,59 +91,47 @@ export class HomePage { ...@@ -76,59 +91,47 @@ export class HomePage {
} }
} }
}, },
legend: {
data: ['实际在编人员数', '编制数', '单位数']
},
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
data: [res.list.hj.areaName, res.list.qx.areaName, res.list.sh.areaName], data: this.unitsInfo.map(e => {
return e.geo;
}),
axisPointer: { axisPointer: {
type: 'shadow' type: 'shadow'
}
}
],
yAxis: [
{
type: 'value',
name: '人数',
axisLabel: {
formatter: '{value} 人'
}
}, },
{
type: 'value',
name: '单位数',
axisLabel: { axisLabel: {
formatter: '{value} 个' interval: 0,
rotate: 45,
} }
} }
], ],
series: [ yAxis: {
{ type: 'value',
name: '实际在编人员数', min: 0,
type: 'bar',
data: [res.list.hj.shiyoucount, res.list.qx.shiyoucount, res.list.sh.shiyoucount],
color: ['#5baad2']
},
{
name: '编制数',
type: 'bar',
data: [res.list.hj.bianzhicount, res.list.qx.bianzhicount, res.list.sh.bianzhicount],
color: ['#6de0d2']
}, },
series: [
{ {
name: '单位数', name: this.type == 'unit'?'单位数(个)':this.type == 'syrs'?'实有人数(人)':'编制人数(人)',
type: 'bar', type: 'bar',
yAxisIndex: 1, data: this.unitsInfo.map(e => {
data: [res.list.hj.unitcount, res.list.qx.unitcount, res.list.sh.unitcount], let d;
color: ['#feda66'] if (this.type == 'unit') {
d = e.unitTotal;
} }
] if (this.type == 'syrs') {
}; d = e.syrsTotal;
} }
if (this.type == 'bzrs') {
d = e.bzrsTotal;
} }
) return d;
}),
color: ['#feda66']
},
]
};
echarts.init(this.echart.nativeElement).setOption(this.echartData, true);
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</ion-navbar> </ion-navbar>
<ion-navbar class="input-search"> <ion-navbar class="input-search">
<div class="search-input"> <div class="search-input">
<ion-input type="text" placeholder="请输入社会信用代码或者单位名称" [(ngModel)]="info.search"></ion-input> <ion-input type="text" placeholder="请输入统一社会信用代码或者单位名称" [(ngModel)]="info.search"></ion-input>
<span class="clear" tappable (click)="getList()">搜索</span> <span class="clear" tappable (click)="getList()">搜索</span>
</div> </div>
</ion-navbar> </ion-navbar>
......
...@@ -32,7 +32,7 @@ export class InfoListPage { ...@@ -32,7 +32,7 @@ export class InfoListPage {
} }
ionViewDidLoad() { ionViewDidLoad() {
this.getList(); // this.getList();
} }
getList(event?: any) { getList(event?: any) {
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
</ion-header> </ion-header>
<ion-content> <ion-content>
<div class="login-box"> <div class="login-box" >
<div class="login"> <div class="login" >
<div class="login-form"> <div class="login-form">
<div class="login-input"> <div class="login-input">
<img src="./assets/imgs/icon-phone.png" class="login-input-img"> <img src="./assets/imgs/icon-phone.png" class="login-input-img">
......
import {HttpClient} from "@angular/common/http";import {Injectable} from "@angular/core";import {Observable} from "rxjs/Observable";import {SERVER_API_URL} from "../../app/app.constants";import {DataFormatService} from "../../core/dataFormat.service"; @Injectable()export class LoginService { constructor(private http: HttpClient, private dataForm: DataFormatService) { } //登录 login(data): Observable<any> { return this.http.post(SERVER_API_URL + "/index/login.do", data); } //获取登录的用户信息 userInfo(data): Observable<any> { return this.http.post(SERVER_API_URL + "/user/info.do", data); } //获取区属 getArea(data): Observable<any> { return this.http.post(SERVER_API_URL + "/user/area.do", data); } } import {HttpClient} from "@angular/common/http";import {Injectable} from "@angular/core";import {Observable} from "rxjs/Observable";import {SERVER_API_BBWX, SERVER_API_URL} from "../../app/app.constants";import {DataFormatService} from "../../core/dataFormat.service"; @Injectable()export class LoginService { constructor(private http: HttpClient, private dataForm: DataFormatService) { } //登录 login(data): Observable<any> { return this.http.post(SERVER_API_URL + "/index/login.do", data); } //获取登录的用户信息 userInfo(data): Observable<any> { return this.http.post(SERVER_API_URL + "/user/info.do", data); } //获取区属 getArea(data): Observable<any> { return this.http.post(SERVER_API_URL + "/user/area.do", data); } //用户权限 getRoleMenu(data): Observable<any> { return this.http.get(SERVER_API_BBWX + "/role/getRoleMenu" + this.dataForm.toQuery(data)); } }
\ No newline at end of file \ No newline at end of file
......
...@@ -22,11 +22,15 @@ export class LoginPage { ...@@ -22,11 +22,15 @@ export class LoginPage {
codeNum; codeNum;
user = { user = {
mobilePhone: "", mobilePhone: "13321810809",
password: "", password: "qweasd123",
captcha: "" captcha: ""
}; };
loading; loading;
obj = {
area: "",
roles: ""
}
constructor(public navCtrl: NavController, public navParams: NavParams, private loadCtrl: LoadingController, constructor(public navCtrl: NavController, public navParams: NavParams, private loadCtrl: LoadingController,
private datePipe: DatePipe, private datePipe: DatePipe,
...@@ -41,14 +45,14 @@ export class LoginPage { ...@@ -41,14 +45,14 @@ export class LoginPage {
} }
login() { login() {
if (!this.user.mobilePhone || !this.user.password || !this.user.captcha) { // if (!this.user.mobilePhone || !this.user.password || !this.user.captcha) {
this.commonSer.toast('请填写完整的登录信息'); // this.commonSer.toast('请填写完整的登录信息');
return // return
} // }
if (this.user.captcha != this.codeNum) { // if (this.user.captcha != this.codeNum) {
this.commonSer.toast("验证码错误!"); // this.commonSer.toast("验证码错误!");
return; // return;
} // }
const data = { const data = {
"mobilePhone": this.user.mobilePhone, "mobilePhone": this.user.mobilePhone,
"password": this.user.password "password": this.user.password
...@@ -63,7 +67,7 @@ export class LoginPage { ...@@ -63,7 +67,7 @@ export class LoginPage {
setTimeout(() => { setTimeout(() => {
this.getUserInfo(); this.getUserInfo();
}, 100) }, 100)
}else{ } else {
this.loading.dismiss(); this.loading.dismiss();
} }
} }
...@@ -72,16 +76,17 @@ export class LoginPage { ...@@ -72,16 +76,17 @@ export class LoginPage {
//获取用户信息 //获取用户信息
getUserInfo() { getUserInfo() {
const data = {}; this.loginSer.userInfo(this.obj).subscribe(
this.loginSer.userInfo(data).subscribe(
(res) => { (res) => {
if (res.code == 0) { if (res.code == 0) {
this.storage.set("mineInfo", res.user); this.storage.set("mineInfo", res.user);
this.globle.userObj = res.user; this.globle.userObj = res.user;
this.obj.area = res.user.area;
this.obj.roles = res.user.roles;
this.commonSer.toast('登录成功'); this.commonSer.toast('登录成功');
this.loading.dismiss(); this.loading.dismiss();
this.navCtrl.setRoot(TabsPage);
this.getArea(res.user); this.getArea(res.user);
this.getRoleMenu();
} }
} }
) )
...@@ -98,8 +103,18 @@ export class LoginPage { ...@@ -98,8 +103,18 @@ export class LoginPage {
this.globle.area = e; this.globle.area = e;
this.storage.set('area', e); this.storage.set('area', e);
} }
}) });
}
} }
)
}
//获取权限
getRoleMenu() {
this.loginSer.getRoleMenu(this.obj).subscribe(
(res) => {
this.storage.set('roles', res.data);
this.navCtrl.setRoot(TabsPage);
} }
) )
} }
......
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