Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
ff6ca643
提交
ff6ca643
编写于
12月 16, 2019
作者:
zhentian.jia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UI回测问题
上级
ff238978
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
122 行增加
和
6 行删除
+122
-6
chartData.js
src/utils/learning/chartData.js
+111
-0
operation.js
src/utils/operation.js
+1
-0
item-crowd-analysis.vue
src/views/learning/item-crowd-analysis.vue
+3
-3
item-data-all.vue
src/views/learning/item-data-all.vue
+7
-3
未找到文件。
src/utils/learning/chartData.js
浏览文件 @
ff6ca643
...
@@ -765,4 +765,115 @@ export function ringOption(num, color) {
...
@@ -765,4 +765,115 @@ export function ringOption(num, color) {
}]
}]
};
};
return
option
;
return
option
;
}
export
function
getPicOption
(
title
,
legendData
,
colorData
,
seriesData
)
{
let
option
=
{
title
:
{
text
:
title
,
x
:
"left"
,
left
:
'20px'
,
top
:
"20px"
,
},
tooltip
:
{
trigger
:
'item'
,
// formatter: "{a} <br/>{b} : {c} ({d}%)"
formatter
:
function
(
data
){
let
value
=
data
.
name
+
':'
+
data
.
percent
.
toFixed
(
1
)
+
"%"
return
value
;
}
},
label
:
{
formatter
:
function
(
data
){
return
data
.
percent
.
toFixed
(
1
)
+
"%"
;}
},
legend
:
{
orient
:
"vertical"
,
top
:
"center"
,
right
:
"25"
,
data
:
legendData
},
grid
:
{
left
:
"30%"
,
right
:
"0%"
,
bottom
:
"10%"
,
containLabel
:
true
},
color
:
colorData
,
backgroundColor
:
'#FFFFFF'
,
series
:
[
{
name
:
""
,
type
:
"pie"
,
radius
:
[
0
,
'55%'
],
center
:
[
"50%"
,
"57.2%"
],
data
:
seriesData
,
}
]
};
return
option
;
}
export
function
getBarOption
(
xAxisData
,
seriesData
)
{
let
option
=
{
title
:
{
text
:
"人员年龄分布"
,
x
:
"left"
,
left
:
'20px'
,
top
:
"20px"
,
},
color
:
[
'rgba(91, 143, 249, 0.85)'
],
backgroundColor
:
'#FFFFFF'
,
tooltip
:
{
trigger
:
"axis"
,
axisPointer
:
{
type
:
"shadow"
// 默认为直线,可选为:'line' | 'shadow'
},
formatter
:
function
(
data
){
let
value
=
data
[
0
].
name
+
'人数:'
+
data
[
0
].
value
+
"名"
return
value
;
}
},
grid
:
{
top
:
'84'
,
bottom
:
'36'
,
left
:
'20'
,
right
:
'20'
,
containLabel
:
true
},
xAxis
:
[
{
type
:
'category'
,
data
:
xAxisData
,
axisLabel
:
{
interval
:
0
},
axisTick
:
{
// 隐藏刻度
show
:
false
},
axisLine
:
{
//隐藏轴线
show
:
false
},
}
],
yAxis
:
[
{
type
:
'value'
,
minInterval
:
1
,
axisLine
:
{
//隐藏轴线
show
:
false
},
axisTick
:
{
// 隐藏刻度
show
:
false
},
}
],
series
:
[
{
name
:
''
,
type
:
'bar'
,
barWidth
:
18
,
data
:
seriesData
,
}
]
};
return
option
;
}
}
\ No newline at end of file
src/utils/operation.js
浏览文件 @
ff6ca643
...
@@ -450,6 +450,7 @@ export function getBarOption(xAxisData, seriesData) {
...
@@ -450,6 +450,7 @@ export function getBarOption(xAxisData, seriesData) {
yAxis
:
[
yAxis
:
[
{
{
type
:
'value'
,
type
:
'value'
,
minInterval
:
1
,
axisLine
:
{
//隐藏轴线
axisLine
:
{
//隐藏轴线
show
:
false
show
:
false
},
},
...
...
src/views/learning/item-crowd-analysis.vue
浏览文件 @
ff6ca643
...
@@ -297,7 +297,7 @@ export default {
...
@@ -297,7 +297,7 @@ export default {
legendData
[
i
]
=
educationList
[
i
].
name
;
legendData
[
i
]
=
educationList
[
i
].
name
;
seriesData
[
i
]
=
educationList
[
i
];
seriesData
[
i
]
=
educationList
[
i
];
}
}
let
option
=
operation
Data
.
getPicOption
(
let
option
=
chart
Data
.
getPicOption
(
"人员学历发布"
,
"人员学历发布"
,
legendData
,
legendData
,
colorData
,
colorData
,
...
@@ -324,7 +324,7 @@ export default {
...
@@ -324,7 +324,7 @@ export default {
legendData
[
i
]
=
titleList
[
i
].
name
;
legendData
[
i
]
=
titleList
[
i
].
name
;
seriesData
[
i
]
=
titleList
[
i
];
seriesData
[
i
]
=
titleList
[
i
];
}
}
let
option
=
operation
Data
.
getPicOption
(
let
option
=
chart
Data
.
getPicOption
(
"人员职务分布"
,
"人员职务分布"
,
legendData
,
legendData
,
colorData
,
colorData
,
...
@@ -358,7 +358,7 @@ export default {
...
@@ -358,7 +358,7 @@ export default {
seriesData
.
push
(
ageList
[
i
].
value
);
seriesData
.
push
(
ageList
[
i
].
value
);
}
}
}
}
let
option
=
operation
Data
.
getBarOption
(
xAxisData
,
seriesData
);
let
option
=
chart
Data
.
getBarOption
(
xAxisData
,
seriesData
);
setTimeout
(
function
(){
setTimeout
(
function
(){
let
myChart3
=
echarts
.
init
(
vm
.
$refs
.
age
);
let
myChart3
=
echarts
.
init
(
vm
.
$refs
.
age
);
...
...
src/views/learning/item-data-all.vue
浏览文件 @
ff6ca643
...
@@ -125,8 +125,8 @@
...
@@ -125,8 +125,8 @@
<!--
</div>
-->
<!--
</div>
-->
<div
v-if=
"dataType == 1"
class=
"data-table"
>
<div
v-if=
"dataType == 1"
class=
"data-table"
>
<div
class=
"box-list"
>
<div
class=
"box-list"
>
<div
v-for=
"(item , index) in cardData"
:key=
"index"
class=
"box-card box-card2"
v-bind:class=
"
{ 'box-last': index == 1 }
">
<div
class=
"box-min-2
"
>
<
!--
<el-card
class=
"box-card box-card2"
v-bind:class=
"
{ 'box-last': index == 1 }"> --
>
<
div
v-for=
"(item , index) in cardData"
:key=
"index"
class=
"box-card box-card2"
v-bind:class=
"
{ 'box-last': index == 1 }"
>
<el-tooltip
v-if=
"index == 1"
class=
"item-tool"
placement=
"bottom-end"
effect=
"light"
>
<el-tooltip
v-if=
"index == 1"
class=
"item-tool"
placement=
"bottom-end"
effect=
"light"
>
<div
slot=
"content"
>
<div
slot=
"content"
>
<p
v-for=
"text in item.content"
>
{{
text
}}
</p>
<p
v-for=
"text in item.content"
>
{{
text
}}
</p>
...
@@ -142,7 +142,7 @@
...
@@ -142,7 +142,7 @@
<p
class=
"has"
>
{{
item
.
hasKey
}}
:
{{
item
.
hasNum
|
toThousands
}}
</p>
<p
class=
"has"
>
{{
item
.
hasKey
}}
:
{{
item
.
hasNum
|
toThousands
}}
</p>
<p
class=
"should"
>
{{
item
.
shouldKey
}}
:
{{
item
.
shouldNum
|
toThousands
}}
</p>
<p
class=
"should"
>
{{
item
.
shouldKey
}}
:
{{
item
.
shouldNum
|
toThousands
}}
</p>
</div>
</div>
<
!--
</el-card>
--
>
<
/div
>
</div>
</div>
</div>
</div>
<div
class=
"date-table"
>
<div
class=
"date-table"
>
...
@@ -1015,6 +1015,10 @@ export default {
...
@@ -1015,6 +1015,10 @@ export default {
height
:
106px
;
height
:
106px
;
min-width
:
1050px
;
min-width
:
1050px
;
}
}
.box-min-2
{
height
:
106px
;
min-width
:
900px
;
}
.box-card
{
.box-card
{
position
:
relative
;
position
:
relative
;
background-color
:
#F1F7F6
;
background-color
:
#F1F7F6
;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录