Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
regManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqinghua
regManage
Commits
ed5eae0f
Commit
ed5eae0f
authored
Mar 02, 2020
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
version 0.0.2
parent
37f6d185
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
215 additions
and
199 deletions
+215
-199
app.constants.ts
src/app/app.constants.ts
+2
-2
data-report.html
src/pages/home/data-report/data-report.html
+3
-3
data-report.ts
src/pages/home/data-report/data-report.ts
+133
-124
home.html
src/pages/home/home.html
+3
-3
home.ts
src/pages/home/home.ts
+74
-67
No files found.
src/app/app.constants.ts
View file @
ed5eae0f
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
...
...
src/pages/home/data-report/data-report.html
View file @
ed5eae0f
...
...
@@ -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>
...
...
src/pages/home/data-report/data-report.ts
View file @
ed5eae0f
...
...
@@ -19,150 +19,159 @@ 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"
},
];
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
:
[
'9月'
,
'10月'
,
'11月'
],
axisPointer
:
{
type
:
'shadow'
}
}
],
yAxis
:
[
{
type
:
'value'
,
name
:
'人数'
,
axisLabel
:
{
formatter
:
'{value} 人'
}
},
{
type
:
'value'
,
name
:
'单位数'
,
axisLabel
:
{
formatter
:
'{value} 个'
}
}
],
series
:
[
{
name
:
'实际在编人员数'
,
type
:
'bar'
,
data
:
[
221345
,
222456
,
232345
],
color
:
[
'#5baad2'
]
},
{
name
:
'编制数'
,
type
:
'bar'
,
data
:
[
222345
,
233456
,
242567
],
color
:
[
'#6de0d2'
]
},
{
name
:
'单位数'
,
type
:
'line'
,
yAxisIndex
:
1
,
data
:
[
6271
,
7913
,
8776
],
color
:
[
'#feda66'
]
}
]
const
data1
=
{
yearmonth
:
this
.
yearmonth
,
};
this
.
homeSer
.
units
(
data1
).
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'
]
}
]
};
}
}
)
}
//实名制上报率
shangbaolv
()
{
const
data
=
{
yearmonth
:
this
.
yearmonth
,
};
yearmonth
:
new
Date
().
getFullYear
()
+
'-'
+
(
new
Date
().
getMonth
()
+
1
)
}
;
this
.
homeSer
.
shangbaolv
(
data
).
subscribe
(
(
res
)
=>
{
this
.
areaList
=
res
.
list
;
this
.
echartData2
=
{
grid
:
{
left
:
"3%"
,
right
:
"4%"
,
bottom
:
"15%"
,
width
:
"90%"
,
height
:
"70%"
,
containLabel
:
true
},
tooltip
:
{
trigger
:
'axis'
,
formatter
:
'{c}%'
,
axisPointer
:
{
// 坐标轴指示器,坐标轴触发有效
type
:
'shadow'
// 默认为直线,可选为:'line' | 'shadow'
}
},
xAxis
:
{
type
:
'category'
,
data
:
this
.
areaList
.
map
(
e
=>
{
return
e
.
areaName
}),
axisLabel
:
{
interval
:
0
,
rotate
:
45
,
}
},
yAxis
:
{
type
:
'value'
,
min
:
0
,
},
dataZoom
:
[{
type
:
"slider"
,
//详细配置可见echarts官网
show
:
true
,
//是否显示
realtime
:
true
,
//
start
:
0
,
//伸缩条开始位置(1-100),可以随时更改
end
:
50
,
//伸缩条结束位置(1-100),可以随时更改
}],
series
:
[
{
if
(
res
.
list
)
{
this
.
areaList
=
res
.
list
;
this
.
echartData2
=
{
grid
:
{
left
:
"3%"
,
right
:
"4%"
,
bottom
:
"15%"
,
width
:
"90%"
,
height
:
"70%"
,
containLabel
:
true
},
tooltip
:
{
trigger
:
'axis'
,
formatter
:
'{c}%'
,
axisPointer
:
{
// 坐标轴指示器,坐标轴触发有效
type
:
'shadow'
// 默认为直线,可选为:'line' | 'shadow'
}
},
xAxis
:
{
type
:
'category'
,
data
:
this
.
areaList
.
map
(
e
=>
{
const
n
=
e
.
sblv
.
split
(
"%"
)[
0
];
return
n
;
return
e
.
areaName
}),
color
:
[
'#58afed'
],
//折线颜色
type
:
'bar'
,
name
:
'柱状图'
,
}
]
};
axisLabel
:
{
interval
:
0
,
rotate
:
45
,
}
},
yAxis
:
{
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
=>
{
const
n
=
e
.
sblv
.
split
(
"%"
)[
0
];
return
n
;
}),
color
:
[
'#58afed'
],
//折线颜色
type
:
'bar'
,
name
:
'柱状图'
,
}
]
};
}
}
)
}
...
...
src/pages/home/home.html
View file @
ed5eae0f
...
...
@@ -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>
...
...
src/pages/home/home.ts
View file @
ed5eae0f
...
...
@@ -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,73 +55,80 @@ export class HomePage {
yearmonth
:
this
.
yearmonth
,
};
this
.
echartData
=
{
grid
:
{
left
:
"8%"
,
right
:
"10%"
,
width
:
"90%"
,
height
:
"70%"
,
containLabel
:
true
},
tooltip
:
{
trigger
:
'axis'
,
axisPointer
:
{
type
:
'cross'
,
crossStyle
:
{
color
:
'#999'
}
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'
]
}
]
};
}
},
legend
:
{
data
:
[
'实际在编人员数'
,
'编制数'
,
'单位数'
]
},
xAxis
:
[
{
type
:
'category'
,
data
:
[
'9月'
,
'10月'
,
'11月'
],
axisPointer
:
{
type
:
'shadow'
}
}
],
yAxis
:
[
{
type
:
'value'
,
name
:
'人数'
,
axisLabel
:
{
formatter
:
'{value} 人'
}
},
{
type
:
'value'
,
name
:
'单位数'
,
axisLabel
:
{
formatter
:
'{value} 个'
}
}
],
series
:
[
{
name
:
'实际在编人员数'
,
type
:
'bar'
,
data
:
[
221345
,
222456
,
232345
],
color
:
[
'#5baad2'
]
},
{
name
:
'编制数'
,
type
:
'bar'
,
data
:
[
222345
,
233456
,
242567
],
color
:
[
'#6de0d2'
]
},
{
name
:
'单位数'
,
type
:
'line'
,
yAxisIndex
:
1
,
data
:
[
6271
,
7913
,
8776
],
color
:
[
'#feda66'
]
}
]
};
}
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment