Commit ed5eae0f authored by wangqinghua's avatar wangqinghua

version 0.0.2

parent 37f6d185
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'; 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
......
...@@ -15,15 +15,15 @@ ...@@ -15,15 +15,15 @@
<div class="data"> <div class="data">
<div> <div>
<p>单位数</p> <p>单位数</p>
<p>7749</p> <p>{{unitsInfo?.hj.unitcount}}</p>
</div> </div>
<div> <div>
<p>编制数</p> <p>编制数</p>
<p>524845</p> <p>{{unitsInfo?.hj.bianzhicount}}</p>
</div> </div>
<div> <div>
<p>实有数</p> <p>实有数</p>
<p>429171</p> <p>{{unitsInfo?.hj.shiyoucount}}</p>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -19,24 +19,27 @@ export class DataReportPage { ...@@ -19,24 +19,27 @@ export class DataReportPage {
ShenHeJuJue: "30", ShenHeJuJue: "30",
FaHuiBuCong: "40" FaHuiBuCong: "40"
}; };
data2; yearmonth = '2019-11';
yearmonth;
areaList; areaList;
unitsInfo;
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 = this.datePipe.transform(Date.now(), "yyyy-MM"); this.yearmonth = new Date().getFullYear() + '-' + new Date().getMonth();
} }
ionViewDidLoad() { ionViewDidLoad() {
this.shangbaolv(); this.shangbaolv();
const ser1 = [ const data1 = {
{name: "单位数", value: "7749"}, yearmonth: this.yearmonth,
{name: "编制数", value: "524845"}, };
{name: "实有数", value: "429171"},
]; this.homeSer.units(data1).subscribe(
(res) => {
if (res.code == 0) {
this.unitsInfo = res.list;
this.echartData1 = { this.echartData1 = {
grid: { grid: {
left: "8%", left: "8%",
...@@ -60,7 +63,7 @@ export class DataReportPage { ...@@ -60,7 +63,7 @@ export class DataReportPage {
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
data: ['9月', '10月', '11月'], data: [res.list.hj.areaName, res.list.qx.areaName, res.list.sh.areaName],
axisPointer: { axisPointer: {
type: 'shadow' type: 'shadow'
} }
...@@ -86,33 +89,38 @@ export class DataReportPage { ...@@ -86,33 +89,38 @@ export class DataReportPage {
{ {
name: '实际在编人员数', name: '实际在编人员数',
type: 'bar', type: 'bar',
data: [221345, 222456, 232345], data: [res.list.hj.shiyoucount, res.list.qx.shiyoucount, res.list.sh.shiyoucount],
color: ['#5baad2'] color: ['#5baad2']
}, },
{ {
name: '编制数', name: '编制数',
type: 'bar', type: 'bar',
data: [222345, 233456, 242567], data: [res.list.hj.bianzhicount, res.list.qx.bianzhicount, res.list.sh.bianzhicount],
color: ['#6de0d2'] color: ['#6de0d2']
}, },
{ {
name: '单位数', name: '单位数',
type: 'line', type: 'bar',
yAxisIndex: 1, yAxisIndex: 1,
data: [6271, 7913, 8776], data: [res.list.hj.unitcount, res.list.qx.unitcount, res.list.sh.unitcount],
color: ['#feda66'] color: ['#feda66']
} }
] ]
}; };
} }
}
)
}
//实名制上报率 //实名制上报率
shangbaolv() { shangbaolv() {
const data = { const data = {
yearmonth: this.yearmonth, yearmonth: new Date().getFullYear() + '-' + (new Date().getMonth() + 1)
}; }
;
this.homeSer.shangbaolv(data).subscribe( this.homeSer.shangbaolv(data).subscribe(
(res) => { (res) => {
if (res.list) {
this.areaList = res.list; this.areaList = res.list;
this.echartData2 = { this.echartData2 = {
grid: { grid: {
...@@ -164,6 +172,7 @@ export class DataReportPage { ...@@ -164,6 +172,7 @@ export class DataReportPage {
] ]
}; };
} }
}
) )
} }
......
...@@ -50,15 +50,15 @@ ...@@ -50,15 +50,15 @@
<div class="data"> <div class="data">
<div> <div>
<p>单位数</p> <p>单位数</p>
<p>8776</p> <p>{{unitsInfo?.hj.unitcount}}</p>
</div> </div>
<div> <div>
<p>编制数</p> <p>编制数</p>
<p>242567</p> <p>{{unitsInfo?.hj.bianzhicount}}</p>
</div> </div>
<div> <div>
<p>实有数</p> <p>实有数</p>
<p>232345</p> <p>{{unitsInfo?.hj.shiyoucount}}</p>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -42,7 +42,7 @@ export class HomePage { ...@@ -42,7 +42,7 @@ export class HomePage {
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.globle.userObj;
this.yearmonth = this.datePipe.transform(Date.now(), "yyyy-MM"); this.yearmonth = new Date().getFullYear() +'-'+new Date().getMonth();
} }
ionViewDidLoad() { ionViewDidLoad() {
...@@ -55,6 +55,10 @@ export class HomePage { ...@@ -55,6 +55,10 @@ export class HomePage {
yearmonth: this.yearmonth, yearmonth: this.yearmonth,
}; };
this.homeSer.units(data).subscribe(
(res) => {
if (res.code == 0) {
this.unitsInfo = res.list;
this.echartData = { this.echartData = {
grid: { grid: {
left: "8%", left: "8%",
...@@ -78,7 +82,7 @@ export class HomePage { ...@@ -78,7 +82,7 @@ export class HomePage {
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
data: ['9月', '10月', '11月'], data: [res.list.hj.areaName, res.list.qx.areaName, res.list.sh.areaName],
axisPointer: { axisPointer: {
type: 'shadow' type: 'shadow'
} }
...@@ -104,25 +108,28 @@ export class HomePage { ...@@ -104,25 +108,28 @@ export class HomePage {
{ {
name: '实际在编人员数', name: '实际在编人员数',
type: 'bar', type: 'bar',
data: [221345, 222456, 232345], data: [res.list.hj.shiyoucount, res.list.qx.shiyoucount, res.list.sh.shiyoucount],
color: ['#5baad2'] color: ['#5baad2']
}, },
{ {
name: '编制数', name: '编制数',
type: 'bar', type: 'bar',
data: [222345, 233456, 242567], data: [res.list.hj.bianzhicount, res.list.qx.bianzhicount, res.list.sh.bianzhicount],
color: ['#6de0d2'] color: ['#6de0d2']
}, },
{ {
name: '单位数', name: '单位数',
type: 'line', type: 'bar',
yAxisIndex: 1, yAxisIndex: 1,
data: [6271, 7913, 8776], data: [res.list.hj.unitcount, res.list.qx.unitcount, res.list.sh.unitcount],
color: ['#feda66'] color: ['#feda66']
} }
] ]
}; };
} }
}
)
}
goToContact() { goToContact() {
......
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