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