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
\ No newline at end of file
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
......
......@@ -12,6 +12,10 @@
{
"path": "/shfrdjweb",
"proxyUrl": "http://218.242.131.175/shfrdjweb"
},
{
"path": "/bbwx",
"proxyUrl": "https://www.cesdj.cn/bbwx"
}
]
}
......@@ -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": {
"version": "5.0.1",
"resolved": "http://r.cnpmjs.org/cordova-ios/download/cordova-ios-5.0.1.tgz",
......@@ -1943,7 +1951,7 @@
"integrity": "sha1-p12L4uvDu5sjxbG70ZkhTsJnWGs="
},
"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",
"requires": {
"async": "^2.6.0"
......@@ -6265,8 +6273,7 @@
"sax": {
"version": "1.2.4",
"resolved": "http://r.cnpmjs.org/sax/download/sax-1.2.4.tgz",
"integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=",
"dev": true
"integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk="
},
"schema-utils": {
"version": "0.4.7",
......@@ -8274,7 +8281,6 @@
"version": "0.4.19",
"resolved": "http://r.cnpmjs.org/xml2js/download/xml2js-0.4.19.tgz",
"integrity": "sha1-aGwg8hMgnpSr8NG88e+qKRx4J6c=",
"dev": true,
"requires": {
"sax": ">=0.6.0",
"xmlbuilder": "~9.0.1"
......
......@@ -39,6 +39,7 @@
"com.lampa.startapp": "^6.1.6",
"cordova-android": "^8.1.0",
"cordova-browser": "^6.0.0",
"cordova-hot-code-push-plugin": "^1.5.3",
"cordova-ios": "^5.0.1",
"cordova-plugin-add-swift-support": "^2.0.2",
"cordova-plugin-advanced-http": "^2.1.1",
......@@ -108,7 +109,8 @@
"phonegap-plugin-mobile-accessibility": {},
"cordova-plugin-file-transfer": {},
"cordova-plugin-photo-library": {},
"cordova-plugin-camera": {}
"cordova-plugin-camera": {},
"cordova-hot-code-push-plugin": {}
},
"platforms": [
"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'}, ]
\ No newline at end of file
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
......
......@@ -17,7 +17,7 @@ export class EchartDataComponent {
if (this.data) {
echarts.init(this.echart.nativeElement).setOption(this.data, true);
}
}, 1000)
}, 10000)
}
}
......@@ -2,6 +2,7 @@ import {Component} from '@angular/core';
import {NavParams, ViewController} from "ionic-angular";
import {LoginService} from "../../pages/login/login.service";
import {GlobalData} from "../../core/GlobleData";
import {Storage} from "@ionic/storage";
@Component({
selector: 'filter',
......@@ -10,11 +11,7 @@ import {GlobalData} from "../../core/GlobleData";
export class FilterComponent {
text: string;
approvaList = [
{name: "事业单位", type: "1"},
{name: "机关群团", type: "2"},
{name: "其他", type: "3"},
];
approvaList = [];
approvalObj;
......@@ -24,10 +21,20 @@ export class FilterComponent {
constructor(private viewCtrl: ViewController, private params: NavParams,
private globle: GlobalData,
private storage: Storage,
private loginSer: LoginService) {
this.areaObj = this.params.get("areaObj");
this.approvalObj = this.params.get("approvalObj");
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()
}
......
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; } }
\ No newline at end of file
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
......
......@@ -12,8 +12,8 @@ page-deal-detail {
}
.choose {
text-align: right;
margin-right: 20px;
text-align: left;
margin-left: 20px;
font-size: 1.5rem;
color: #999;
}
......@@ -21,11 +21,12 @@ page-deal-detail {
.flowDetail .choose,
.handle .choose {
color: #5991CA;
text-align: right;
}
.flowDetail .item-left {
text-align: left;
width: 80%;
width: 75%;
}
ion-label {
......
......@@ -4,42 +4,44 @@
</ion-navbar>
</ion-header>
<ion-content class="content">
<ion-list class="activity-title">
<ion-item>
<ion-label>审核管理</ion-label>
<ion-select [(ngModel)]="option.type" cancelText="取消" okText="确定" placeholder="选择"
(ngModelChange)="changeOption()">
<ng-container *ngFor="let item of option.list">
<ion-option [value]="item.type">{{item.name}}</ion-option>
</ng-container>
</ion-select>
</ion-item>
</ion-list>
<div ion-fixed style="width: 100%">
<ion-list class="activity-title">
<ion-item>
<ion-label>审核管理</ion-label>
<ion-select [(ngModel)]="option.type" cancelText="取消" okText="确定" placeholder="选择"
(ngModelChange)="changeOption()">
<ng-container *ngFor="let item of option.list">
<ion-option [value]="item.type">{{item.name}}</ion-option>
</ng-container>
</ion-select>
</ion-item>
</ion-list>
<div class="content-box">
<div class="content-box-item " (click)="changeType(0)">
<p class="item-title {{type.option == 0?'bgc-5991CA':''}} ">全部</p>
<p class="item-count">{{type.allList.length}}</p>
</div>
<div class="content-box-item " (click)="changeType(1)">
<p class="item-title {{type.option == 1?'bgc-5991CA':''}} ">设立</p>
<p class="item-count">{{type.setList.length}}</p>
</div>
<div class="content-box-item" (click)="changeType(2)">
<p class="item-title {{type.option == 2?'bgc-5991CA':''}}">变更</p>
<p class="item-count">{{type.changeList.length}}</p>
</div>
<div class="content-box-item" (click)="changeType(3)">
<p class="item-title {{type.option == 3?'bgc-5991CA':''}}">注销</p>
<p class="item-count">{{type.cancelList.length}}</p>
</div>
<div class="content-box-item" (click)="changeType(4)">
<p class="item-title {{type.option == 4?'bgc-5991CA':''}}">补领</p>
<p class="item-count">{{type.getList.length}}</p>
<div class="content-box">
<div class="content-box-item ">
<p class="item-title {{type.option == 0?'bgc-5991CA':''}} ">全部</p>
<p class="item-count">{{type.allList.length}}</p>
</div>
<div class="content-box-item " (click)="changeType(1)">
<p class="item-title {{type.option == 1?'bgc-5991CA':''}} ">设立</p>
<p class="item-count">{{type.setList.length}}</p>
</div>
<div class="content-box-item" (click)="changeType(2)">
<p class="item-title {{type.option == 2?'bgc-5991CA':''}}">变更</p>
<p class="item-count">{{type.changeList.length}}</p>
</div>
<div class="content-box-item" (click)="changeType(3)">
<p class="item-title {{type.option == 3?'bgc-5991CA':''}}">注销</p>
<p class="item-count">{{type.cancelList.length}}</p>
</div>
<div class="content-box-item" (click)="changeType(4)">
<p class="item-title {{type.option == 4?'bgc-5991CA':''}}">补领</p>
<p class="item-count">{{type.getList.length}}</p>
</div>
</div>
</div>
<div class="list">
<div class="list" style="margin-top: 160px">
<div *ngFor="let item of type.list">
<div class="group">
<div class="inner-group" (click)="goToDetail(item)">
......
......@@ -8,6 +8,7 @@ import {SearchPersonComponent} from "../../components/search-person/search-perso
import {DatePipe} from "@angular/common";
import {HomeService} from "../home/home.service";
import {CommonService} from "../../core/common.service";
import {Storage} from "@ionic/storage";
@IonicPage()
@Component({
......@@ -18,13 +19,11 @@ export class DealPage {
option = {
type: '1',
list: [ //默认事业单位
{name: "事业单位", type: '1'},
{name: "机关群团", type: '2'},
{name: "其他", type: '3'}
]
};
type = {
option: 0,
option: null,
allList: [],
list: [],
setList: [], //设立 1
......@@ -40,10 +39,25 @@ export class DealPage {
private datePipe: DatePipe,
private commonSer: CommonService,
private homeSer: HomeService,
private storage: Storage,
private ModalCtrl: ModalController,
private loadCtrl: LoadingController,
private dealSer: DealService) {
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() {
......@@ -59,7 +73,7 @@ export class DealPage {
flow: "0",
areaCode: this.globle.userObj.area,
"page": "1",
"limit": "10000"
"limit": "1000000"
};
this.dealSer.searchSchedule(data).subscribe(
(res) => {
......
......@@ -9,21 +9,42 @@
<div class="echart-title">
<span>事业单位总览信息</span>
</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">
<echart-data [data]="echartData1"></echart-data>
<div #echart1 class="echart-pie"> </div>
</div>
<div class="data">
<div>
<p>单位数</p>
<p>{{unitsInfo?.hj.unitcount}}</p>
</div>
<div>
<p>编制数</p>
<p>{{unitsInfo?.hj.bianzhicount}}</p>
</div>
<div>
<p>实有数</p>
<p>{{unitsInfo?.hj.shiyoucount}}</p>
<div class="table">
<table border="1">
<thead>
<tr>
<th>隶属</th>
<th>全额拨款</th>
<th>差额拨款</th>
<th>自收自支</th>
<th>合计</th>
</tr>
</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>
......@@ -32,7 +53,7 @@
<span>实名制上报率</span>
</div>
<div class="echart">
<echart-data [data]="echartData2"></echart-data>
<div #echart2 class="echart-pie"> </div>
</div>
<ion-row class="data-report">
<ion-col col-4 *ngFor="let item of areaList">
......
......@@ -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 {HomeService} from "../home.service";
import {DatePipe} from "@angular/common";
import * as echarts from 'echarts';
@Component({
selector: 'page-data-report',
templateUrl: 'data-report.html',
})
export class DataReportPage {
@ViewChild('echart1') echart1: ElementRef;//显示图形的容器
@ViewChild('echart2') echart2: ElementRef;//显示图形的容器
echartData1;
echartData2;
count = {
......@@ -22,96 +24,98 @@ export class DataReportPage {
yearmonth = '2019-11';
areaList;
unitsInfo;
type = "unit";
constructor(public navCtrl: NavController, public navParams: NavParams,
private datePipe: DatePipe,
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() {
this.shangbaolv();
this.getUnits();
}
const data1 = {
//单位信息总览
getUnits() {
const data = {
yearmonth: this.yearmonth,
};
this.homeSer.units(data1).subscribe(
this.homeSer.units(data).subscribe(
(res) => {
if (res.code == 0) {
this.unitsInfo = res.list;
this.echartData1 = {
grid: {
left: "8%",
right: "10%",
width: "90%",
height: "70%",
containLabel: true
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
legend: {
data: ['实际在编人员数', '编制数', '单位数']
},
xAxis: [
{
type: 'category',
data: [res.list.hj.areaName, res.list.qx.areaName, res.list.sh.areaName],
axisPointer: {
type: 'shadow'
}
}
],
yAxis: [
{
type: 'value',
name: '人数',
axisLabel: {
formatter: '{value} 人'
}
},
{
type: 'value',
name: '单位数',
axisLabel: {
formatter: '{value} 个'
}
}
],
series: [
{
name: '实际在编人员数',
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']
},
{
name: '单位数',
type: 'bar',
yAxisIndex: 1,
data: [res.list.hj.unitcount, res.list.qx.unitcount, res.list.sh.unitcount],
color: ['#feda66']
}
]
};
this.unitsInfo = res.data;
this.switchEchart();
}
}
)
}
switchEchart() {
this.echartData1 = {
grid: {
left: "8%",
right: "10%",
top: "18%",
width: "90%",
height: "70%",
containLabel: true
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
xAxis: [
{
type: 'category',
data: this.unitsInfo.map(e => {
return e.geo;
}),
axisPointer: {
type: 'shadow'
},
axisLabel: {
interval: 0,
rotate: 45,
}
}
],
yAxis: {
type: 'value',
min: 0,
},
series: [
{
name: this.type == 'unit' ? '单位数(个)' : this.type == 'syrs' ? '实有人数(人)' : '编制人数(人)',
type: 'bar',
data: this.unitsInfo.map(e => {
let d;
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);
}
//实名制上报率
shangbaolv() {
const data = {
......@@ -152,13 +156,7 @@ export class DataReportPage {
type: 'value',
min: 0,
},
dataZoom: [{
type: "slider", //详细配置可见echarts官网
show: true, //是否显示
realtime: true, //
start: 0, //伸缩条开始位置(1-100),可以随时更改
end: 50, //伸缩条结束位置(1-100),可以随时更改
}],
series: [
{
data: this.areaList.map(e => {
......@@ -171,6 +169,7 @@ export class DataReportPage {
}
]
};
echarts.init(this.echart2.nativeElement).setOption(this.echartData2, true);
}
}
)
......
......@@ -4,46 +4,48 @@
</ion-navbar>
</ion-header>
<ion-content class="content">
<div class="searchbar" ion-fixed>
<div class="approval">
<span>审核类型:</span>
<span>{{searchObj.approvalObj?.name }}</span>
</div>
<div class="area">
<ng-container *ngIf="globleArea?.name == '市属'">
<span>区域:</span>
<span>{{searchObj.areaObj?.name}}</span>
</ng-container>
</div>
<div class="filter" (click)="openFilter()">
<img src="./assets/imgs/filter.png" alt="">
<span>筛选</span>
</div>
</div>
<div class="content-box">
<div class="content-box-item " (click)="changeType(0)">
<p class="item-title {{type.option == 0?'bgc-5991CA':''}} ">全部</p>
<p class="item-count">{{type.allList.length}}</p>
</div>
<div class="content-box-item " (click)="changeType(1)">
<p class="item-title {{type.option == 1?'bgc-5991CA':''}} ">设立</p>
<p class="item-count">{{type.setList.length}}</p>
</div>
<div class="content-box-item" (click)="changeType(2)">
<p class="item-title {{type.option == 2?'bgc-5991CA':''}}">变更</p>
<p class="item-count">{{type.changeList.length}}</p>
</div>
<div class="content-box-item" (click)="changeType(3)">
<p class="item-title {{type.option == 3?'bgc-5991CA':''}}">注销</p>
<p class="item-count">{{type.cancelList.length}}</p>
<div ion-fixed style="width: 100%">
<div class="searchbar" >
<div class="approval">
<span>审核类型:</span>
<span>{{searchObj.approvalObj?.name }}</span>
</div>
<div class="area">
<ng-container *ngIf="globleArea?.name == '市属'">
<span>区域:</span>
<span>{{searchObj.areaObj?.name}}</span>
</ng-container>
</div>
<div class="filter" (click)="openFilter()">
<img src="./assets/imgs/filter.png" alt="">
<span>筛选</span>
</div>
</div>
<div class="content-box-item" (click)="changeType(4)">
<p class="item-title {{type.option == 4?'bgc-5991CA':''}}">补领</p>
<p class="item-count">{{type.getList.length}}</p>
<div class="content-box">
<div class="content-box-item ">
<p class="item-title {{type.option == 0?'bgc-5991CA':''}} ">全部</p>
<p class="item-count">{{type.allList.length}}</p>
</div>
<div class="content-box-item " (click)="changeType(1)">
<p class="item-title {{type.option == 1?'bgc-5991CA':''}} ">设立</p>
<p class="item-count">{{type.setList.length}}</p>
</div>
<div class="content-box-item" (click)="changeType(2)">
<p class="item-title {{type.option == 2?'bgc-5991CA':''}}">变更</p>
<p class="item-count">{{type.changeList.length}}</p>
</div>
<div class="content-box-item" (click)="changeType(3)">
<p class="item-title {{type.option == 3?'bgc-5991CA':''}}">注销</p>
<p class="item-count">{{type.cancelList.length}}</p>
</div>
<div class="content-box-item" (click)="changeType(4)">
<p class="item-title {{type.option == 4?'bgc-5991CA':''}}">补领</p>
<p class="item-count">{{type.getList.length}}</p>
</div>
</div>
</div>
<div class="list">
<div class="list" style="margin-top: 135px">
<div *ngFor="let item of type.list">
<div class="group">
<div class="inner-group" (click)="goToDetail(item)">
......
......@@ -64,7 +64,6 @@ page-do-verity {
border-bottom: 1px solid #f2f2f2;
border-top: 1px solid #f2f2f2;
margin-bottom: 10px;
margin-top: 50px;
}
.content-box-item {
......
......@@ -8,6 +8,7 @@ import {DatePipe} from "@angular/common";
import {SearchPersonComponent} from "../../../components/search-person/search-person";
import {HomeService} from "../home.service";
import {CommonService} from "../../../core/common.service";
import {Storage} from "@ionic/storage";
@Component({
selector: 'page-do-verity',
......@@ -15,15 +16,10 @@ import {CommonService} from "../../../core/common.service";
})
export class DoVerityPage {
option = {
type: '1',
list: [
{name: "事业单位", type: '1'},
{name: "机关团体", type: '2'},
{name: "其他", type: '3'}
]
type: null,
};
type = {
option: 0,
option: null,
list: [],
allList: [],
setList: [], //设立 1
......@@ -34,7 +30,7 @@ export class DoVerityPage {
isShow = false;
searchObj = {
areaObj: null,
approvalObj: {name: "事业单位", type: '1'},
approvalObj: {},
areaCode: null
};
yearmonth;
......@@ -47,11 +43,26 @@ export class DoVerityPage {
private homeSer: HomeService,
private commonSer: CommonService,
private loadCtrl: LoadingController,
private storage: Storage,
private dealSer: DealService, private modalCtrl: ModalController) {
this.mineInfo = this.globle.userObj;
this.searchObj.areaCode = this.globle.userObj.area;
this.searchObj.areaObj = 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 @@
<img src="./assets/imgs/home_banner.png">
</div>
<div class="new-module">
<div class="card" (click)="goToContact()">
<img src="./assets/imgs/txl.png">
<p>通讯录</p>
</div>
<div class="card" (click)="goToVerity()">
<div *ngIf="roles.indexOf('2') > -1" class="card" (click)="goToVerity()">
<img src="./assets/imgs/spsh.png">
<p>审核审批</p>
</div>
<div class="card" (click)="goToSupervise()">
<div *ngIf="roles.indexOf('3') > -1" class="card" (click)="goToSupervise()">
<img src="./assets/imgs/db.png">
<p>办理督办</p>
</div>
<div class="card" (click)="goToReport()">
<div *ngIf="roles.indexOf('4') > -1" class="card" (click)="goToReport()">
<img src="./assets/imgs/sjbb.png">
<p>数据报表</p>
</div>
<div class="card" (click)="goToInfo()">
<div *ngIf="roles.indexOf('5') > -1" class="card" (click)="goToInfo()">
<img src="./assets/imgs/xxcx.png">
<p>信息查询</p>
</div>
<div *ngIf="roles.indexOf('1') > -1" class="card" (click)="goToContact()">
<img src="./assets/imgs/txl.png">
<p>通讯录</p>
</div>
</div>
<div class="echart-data">
<div class="echart-title">
<span>事业单位总览信息</span>
</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">
<echart-data [data]="echartData"></echart-data>
<div #echart class="echart-pie"> </div>
</div>
<div class="data">
<div>
<p>单位数</p>
<p>{{unitsInfo?.hj.unitcount}}</p>
</div>
<div>
<p>编制数</p>
<p>{{unitsInfo?.hj.bianzhicount}}</p>
</div>
<div>
<p>实有数</p>
<p>{{unitsInfo?.hj.shiyoucount}}</p>
<div class="table">
<table border="1">
<thead>
<tr>
<th>隶属</th>
<th>全额拨款</th>
<th>差额拨款</th>
<th>自收自支</th>
<th>合计</th>
</tr>
</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>
......
......@@ -88,7 +88,23 @@ page-home {
color: #ffffff;
transform: scale(0.8);
}
echart-data .echart-pie{
echart-data .echart-pie {
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";
import {GlobalData} from "../../core/GlobleData";
import {DatePipe} from "@angular/common";
import {InfoListPage} from "./report-info/info-list/info-list";
import * as echarts from 'echarts';
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
@ViewChild('echart') echart: ElementRef;//显示图形的容器
echartData;
type = 'teacher';
type = 'unit';
info = {
new: 0,
......@@ -33,16 +35,21 @@ export class HomePage {
unitsInfo;
mineInfo; //个人信息
roles = [];
constructor(public navCtrl: NavController, public homeSer: HomeService, private loadCtrl: LoadingController,
private commonSer: CommonService, private storage: Storage,
private appSer: AppService, public statusBar: StatusBar,
private globle: GlobalData,
private global: GlobalData,
private datePipe: DatePipe,
private mineSer: MineService, private tabSer: TabService, private inAppBrowser: InAppBrowser,
private renderer: Renderer2) {
this.mineInfo = this.globle.userObj;
this.yearmonth = new Date().getFullYear() +'-'+new Date().getMonth();
this.mineInfo = this.global.userObj;
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() {
......@@ -58,79 +65,75 @@ export class HomePage {
this.homeSer.units(data).subscribe(
(res) => {
if (res.code == 0) {
this.unitsInfo = res.list;
this.echartData = {
grid: {
left: "8%",
right: "10%",
width: "90%",
height: "70%",
containLabel: true
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
legend: {
data: ['实际在编人员数', '编制数', '单位数']
},
xAxis: [
{
type: 'category',
data: [res.list.hj.areaName, res.list.qx.areaName, res.list.sh.areaName],
axisPointer: {
type: 'shadow'
}
}
],
yAxis: [
{
type: 'value',
name: '人数',
axisLabel: {
formatter: '{value} 人'
}
},
{
type: 'value',
name: '单位数',
axisLabel: {
formatter: '{value} 个'
}
}
],
series: [
{
name: '实际在编人员数',
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']
},
{
name: '单位数',
type: 'bar',
yAxisIndex: 1,
data: [res.list.hj.unitcount, res.list.qx.unitcount, res.list.sh.unitcount],
color: ['#feda66']
}
]
};
this.unitsInfo = res.data;
this.switchEchart();
}
}
)
}
switchEchart() {
this.echartData = {
grid: {
left: "8%",
right: "10%",
top: "18%",
width: "90%",
height: "70%",
containLabel: true
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
xAxis: [
{
type: 'category',
data: this.unitsInfo.map(e => {
return e.geo;
}),
axisPointer: {
type: 'shadow'
},
axisLabel: {
interval: 0,
rotate: 45,
}
}
],
yAxis: {
type: 'value',
min: 0,
},
series: [
{
name: this.type == 'unit'?'单位数(个)':this.type == 'syrs'?'实有人数(人)':'编制人数(人)',
type: 'bar',
data: this.unitsInfo.map(e => {
let d;
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);
}
goToContact() {
this.navCtrl.push(ContactPage);
......
......@@ -14,7 +14,7 @@
</ion-navbar>
<ion-navbar class="input-search">
<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>
</div>
</ion-navbar>
......
......@@ -32,7 +32,7 @@ export class InfoListPage {
}
ionViewDidLoad() {
this.getList();
// this.getList();
}
getList(event?: any) {
......
......@@ -5,8 +5,8 @@
</ion-header>
<ion-content>
<div class="login-box">
<div class="login">
<div class="login-box" >
<div class="login" >
<div class="login-form">
<div class="login-input">
<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); } }
\ No newline at end of file
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
......
......@@ -22,11 +22,15 @@ export class LoginPage {
codeNum;
user = {
mobilePhone: "",
password: "",
mobilePhone: "13321810809",
password: "qweasd123",
captcha: ""
};
loading;
obj = {
area: "",
roles: ""
}
constructor(public navCtrl: NavController, public navParams: NavParams, private loadCtrl: LoadingController,
private datePipe: DatePipe,
......@@ -41,14 +45,14 @@ export class LoginPage {
}
login() {
if (!this.user.mobilePhone || !this.user.password || !this.user.captcha) {
this.commonSer.toast('请填写完整的登录信息');
return
}
if (this.user.captcha != this.codeNum) {
this.commonSer.toast("验证码错误!");
return;
}
// if (!this.user.mobilePhone || !this.user.password || !this.user.captcha) {
// this.commonSer.toast('请填写完整的登录信息');
// return
// }
// if (this.user.captcha != this.codeNum) {
// this.commonSer.toast("验证码错误!");
// return;
// }
const data = {
"mobilePhone": this.user.mobilePhone,
"password": this.user.password
......@@ -63,7 +67,7 @@ export class LoginPage {
setTimeout(() => {
this.getUserInfo();
}, 100)
}else{
} else {
this.loading.dismiss();
}
}
......@@ -72,16 +76,17 @@ export class LoginPage {
//获取用户信息
getUserInfo() {
const data = {};
this.loginSer.userInfo(data).subscribe(
this.loginSer.userInfo(this.obj).subscribe(
(res) => {
if (res.code == 0) {
this.storage.set("mineInfo", res.user);
this.globle.userObj = res.user;
this.obj.area = res.user.area;
this.obj.roles = res.user.roles;
this.commonSer.toast('登录成功');
this.loading.dismiss();
this.navCtrl.setRoot(TabsPage);
this.getArea(res.user);
this.getRoleMenu();
}
}
)
......@@ -98,12 +103,22 @@ export class LoginPage {
this.globle.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);
}
)
}
getCode(e) {
this.codeNum = e;
}
......
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