Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-learning-report
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-learning-report
提交
fc6e6ea9
提交
fc6e6ea9
编写于
12月 12, 2019
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
图表中的提示语
上级
e13ed501
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
87 行增加
和
44 行删除
+87
-44
chart-column-horizontal-tc.vue
components/bussiness/charts/chart-column-horizontal-tc.vue
+41
-37
chart-column-vertical-tc.vue
components/bussiness/charts/chart-column-vertical-tc.vue
+11
-4
tips-info-chart.vue
components/bussiness/tips-info-chart.vue
+32
-0
index.vue
pages/index.vue
+3
-3
未找到文件。
components/bussiness/charts/chart-column-horizontal-tc.vue
浏览文件 @
fc6e6ea9
<!-- 柱状图-竖向 -->
<!-- 柱状图-竖向 -->
<
template
>
<
template
>
<section
class=
"chart-column-vtc"
>
<div>
<div
:id=
"id"
:style=
"
{width: chartWidth, height: chartHeight}">
</div>
<div
class=
"chart-column-htc"
>
</section>
<div
:id=
"id"
:style=
"
{width: chartWidth, height: chartHeight}">
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
format
}
from
"path"
;
import
{
format
}
from
"path"
;
let
vm
=
null
,
chartColumn
=
null
;
let
vm
=
null
,
chartColumn
=
null
;
export
default
{
export
default
{
props
:
{
props
:
{
dataList
:
{
dataList
:
{
...
@@ -19,12 +22,7 @@ export default {
...
@@ -19,12 +22,7 @@ export default {
},
},
colors
:
{
colors
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[
default
:
()
=>
[
"#FFB01B"
,
"#39AF9A"
,
"#5D7092"
,
"#FF9A4B"
]
"#FFB01B"
,
"#39AF9A"
,
"#5D7092"
,
"#FF9A4B"
]
}
}
},
},
data
()
{
data
()
{
...
@@ -33,22 +31,28 @@ export default {
...
@@ -33,22 +31,28 @@ export default {
chartHeight
:
"350px"
chartHeight
:
"350px"
};
};
},
},
watch
:
{
watch
:
{
dataList
:
{
dataList
:
{
handler
(
newVal
)
{
handler
(
newVal
)
{
let
yAxisData
=
[],
series0Data
=
[],
series1Data
=
[]
let
yAxisData
=
[],
yAxisData
=
newVal
.
map
(
item
=>
{
series0Data
=
[],
return
this
.
shortName
(
item
.
classifyName
)
series1Data
=
[];
yAxisData
=
newVal
.
map
(
item
=>
{
return
this
.
shortName
(
item
.
classifyName
);
// return (item.classifyName || 0).toFixed(0) * 100 + '%'
// return (item.classifyName || 0).toFixed(0) * 100 + '%'
})
});
series0Data
=
this
.
dataList
.
map
(
item
=>
{
series0Data
=
this
.
dataList
.
map
(
item
=>
{
return
((
item
.
beforeRate
||
0
)
*
100
).
toFixed
(
0
);
return
((
item
.
beforeRate
||
0
)
*
100
).
toFixed
(
0
);
})
});
series1Data
=
this
.
dataList
.
map
(
item
=>
{
series1Data
=
this
.
dataList
.
map
(
item
=>
{
return
((
item
.
afterRate
||
0
)
*
100
).
toFixed
(
0
);
return
((
item
.
afterRate
||
0
)
*
100
).
toFixed
(
0
);
})
});
this
.
drawColumn
(
yAxisData
.
splice
(
0
,
5
),
series0Data
.
splice
(
0
,
5
),
series1Data
.
splice
(
0
,
5
));
this
.
drawColumn
(
yAxisData
.
splice
(
0
,
5
),
series0Data
.
splice
(
0
,
5
),
series1Data
.
splice
(
0
,
5
)
);
},
},
deep
:
false
deep
:
false
}
}
...
@@ -60,7 +64,7 @@ export default {
...
@@ -60,7 +64,7 @@ export default {
window
.
outerWidth
||
window
.
outerWidth
||
document
.
body
.
clientWidth
||
document
.
body
.
clientWidth
||
document
.
documentElement
.
clientWidth
;
document
.
documentElement
.
clientWidth
;
this
.
chartWidth
=
(
clientWidth
*
0.9
).
toFixed
(
0
)
+
'px'
;
this
.
chartWidth
=
(
clientWidth
*
0.9
).
toFixed
(
0
)
+
"px"
;
}
}
},
},
...
@@ -80,7 +84,7 @@ export default {
...
@@ -80,7 +84,7 @@ export default {
// 坐标轴指示器,坐标轴触发有效
// 坐标轴指示器,坐标轴触发有效
type
:
"shadow"
// 默认为直线,可选为:'line' | 'shadow'
type
:
"shadow"
// 默认为直线,可选为:'line' | 'shadow'
},
},
formatter
:
'{b}<br/>{a0}: {c0}%<br/>{a1}: {c1}%'
formatter
:
"{b}<br/>{a0}: {c0}%<br/>{a1}: {c1}%"
},
},
legend
:
{
legend
:
{
top
:
20
,
top
:
20
,
...
@@ -119,12 +123,12 @@ export default {
...
@@ -119,12 +123,12 @@ export default {
//设置网格线颜色
//设置网格线颜色
splitLine
:
{
splitLine
:
{
show
:
true
,
show
:
true
,
lineStyle
:{
lineStyle
:
{
color
:
[
'#efefef'
],
color
:
[
"#efefef"
],
width
:
1
,
width
:
1
,
type
:
'solid'
type
:
"solid"
}
}
}
}
},
},
yAxis
:
{
yAxis
:
{
axisTick
:
false
,
axisTick
:
false
,
...
@@ -137,9 +141,9 @@ export default {
...
@@ -137,9 +141,9 @@ export default {
},
},
axisLabel
:
{
axisLabel
:
{
formatter
:
"{value}"
,
formatter
:
"{value}"
,
textAlign
:
'left'
,
textAlign
:
"left"
,
textStyle
:
{
textStyle
:
{
textAlign
:
'left'
,
textAlign
:
"left"
,
color
:
"#676869"
color
:
"#676869"
}
}
},
},
...
@@ -163,7 +167,7 @@ export default {
...
@@ -163,7 +167,7 @@ export default {
show
:
false
,
show
:
false
,
position
:
"inside"
position
:
"inside"
}
}
}
}
},
},
{
{
name
:
"培训后正确率"
,
name
:
"培训后正确率"
,
...
@@ -177,25 +181,25 @@ export default {
...
@@ -177,25 +181,25 @@ export default {
show
:
false
,
show
:
false
,
position
:
"inside"
position
:
"inside"
}
}
}
}
}
}
]
]
};
};
chartColumn
.
setOption
(
options
);
chartColumn
.
setOption
(
options
);
},
},
shortName
:
function
(
value
,
length
=
5
,
append
=
'...'
)
{
shortName
:
function
(
value
,
length
=
5
,
append
=
"..."
)
{
if
(
value
&&
value
.
length
>
length
)
{
if
(
value
&&
value
.
length
>
length
)
{
return
value
.
substring
(
0
,
length
)
+
append
return
value
.
substring
(
0
,
length
)
+
append
;
}
else
{
}
else
{
return
value
return
value
;
}
}
}
,
}
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.chart-column-
v
tc
{
.chart-column-
h
tc
{
position
:
relative
;
position
:
relative
;
top
:
-6px
;
top
:
-6px
;
// height: 280px;
// height: 280px;
...
...
components/bussiness/charts/chart-column-vertical-tc.vue
浏览文件 @
fc6e6ea9
<!-- 柱状图-竖向 -->
<!-- 柱状图-竖向 -->
<
template
>
<
template
>
<section
class=
"chart-column-vtc"
>
<div>
<div
:id=
"id"
:style=
"
{width: chartWidth, height: chartHeight}">
</div>
<div
class=
"chart-column-vtc"
>
</section>
<div
:id=
"id"
:style=
"
{width: chartWidth, height: chartHeight}">
</div>
</div>
<TipsInfoChart
content=
"报告数据来源仅包含摸底考和正式考的课程培训"
></TipsInfoChart>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
format
}
from
"path"
;
import
{
format
}
from
"path"
;
import
TipsInfoChart
from
"@/components/bussiness/tips-info-chart"
;
let
vm
=
null
,
chartColumn
=
null
;
let
vm
=
null
,
chartColumn
=
null
;
export
default
{
export
default
{
components
:
{
TipsInfoChart
},
props
:
{
props
:
{
dataList
:
{
dataList
:
{
type
:
Array
,
type
:
Array
,
...
@@ -182,7 +189,7 @@ export default {
...
@@ -182,7 +189,7 @@ export default {
position
:
relative
;
position
:
relative
;
top
:
-6px
;
top
:
-6px
;
// height: 280px;
// height: 280px;
margin
:
15px
;
margin
:
15px
15px
0
;
background
:
rgba
(
255
,
255
,
255
,
1
);
background
:
rgba
(
255
,
255
,
255
,
1
);
box-shadow
:
0px
10px
30px
0px
rgba
(
0
,
0
,
0
,
0
.04
);
box-shadow
:
0px
10px
30px
0px
rgba
(
0
,
0
,
0
,
0
.04
);
border-radius
:
6px
;
border-radius
:
6px
;
...
...
components/bussiness/tips-info-chart.vue
0 → 100644
浏览文件 @
fc6e6ea9
<
template
>
<div
class=
"tips-info-wrapper"
>
<span>
{{
content
}}
</span>
</div>
</
template
>
<
script
>
export
default
{
props
:
{
content
:
{
type
:
String
,
default
:
'报表数据来源包括用户参加正式考试,不包含摸底考试'
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.tips-info-wrapper {
height: 44px;
line-height: 44px;
font-size: 20px;
padding: 0 15px;
text-align: center;
span {
display: inline-block;
width: 100%;
font-size: 13px;
font-weight: 400;
color: #676869;
// border-bottom: 1px solid #F0F1F2;
}
}
</
style
>
\ No newline at end of file
pages/index.vue
浏览文件 @
fc6e6ea9
<
template
>
<
template
>
<section
class=
"container"
>
<section
class=
"container"
>
<a
href=
"tel:13817237261"
>
打电话:13817237261
</a>
<CommonHeader
:title=
"projectInfo.projectName | shortName"
></CommonHeader>
<CommonHeader
:title=
"projectInfo.projectName | shortName"
></CommonHeader>
<CommonAreaSelect
<CommonAreaSelect
@
areaClick=
"areaTabClick"
@
areaClick=
"areaTabClick"
...
@@ -88,6 +87,7 @@
...
@@ -88,6 +87,7 @@
<CommonSplitLine></CommonSplitLine>
<CommonSplitLine></CommonSplitLine>
<CommonTitle
title=
"不同学历培训前后正确率对比"
></CommonTitle>
<CommonTitle
title=
"不同学历培训前后正确率对比"
></CommonTitle>
<ChartColumnVerticalTC
:dataList=
"studyEffect.educationEffectList"
id=
"chartColumnVerticalTC"
></ChartColumnVerticalTC>
<ChartColumnVerticalTC
:dataList=
"studyEffect.educationEffectList"
id=
"chartColumnVerticalTC"
></ChartColumnVerticalTC>
<CommonSplitLine
style=
"margin-top: 10px;"
></CommonSplitLine>
<CommonTitle
title=
"培训前后知识点掌握情况"
></CommonTitle>
<CommonTitle
title=
"培训前后知识点掌握情况"
></CommonTitle>
<ChartColumnHorizontalTC
:dataList=
"studyEffect.knowledgeEffectList"
id=
"ChartColumnVerticalTC2"
></ChartColumnHorizontalTC>
<ChartColumnHorizontalTC
:dataList=
"studyEffect.knowledgeEffectList"
id=
"ChartColumnVerticalTC2"
></ChartColumnHorizontalTC>
<ShowAll
@
action=
"gotoPage('/klgpoint')"
class=
"mt-10"
></ShowAll>
<ShowAll
@
action=
"gotoPage('/klgpoint')"
class=
"mt-10"
></ShowAll>
...
@@ -104,6 +104,7 @@
...
@@ -104,6 +104,7 @@
<PicaOrg
v-show=
"isShowOrg"
@
confirm=
"orgConfirm"
@
cancel=
"orgCancel"
></PicaOrg>
<PicaOrg
v-show=
"isShowOrg"
@
confirm=
"orgConfirm"
@
cancel=
"orgCancel"
></PicaOrg>
<CommonLoading
v-show=
"false"
></CommonLoading>
<CommonLoading
v-show=
"false"
></CommonLoading>
<PopTips
:tipsContent=
"tipsContent"
@
clickTips=
"clickTips"
v-show=
"isShowTips"
></PopTips>
<PopTips
:tipsContent=
"tipsContent"
@
clickTips=
"clickTips"
v-show=
"isShowTips"
></PopTips>
<a
href=
"tel:13817237261"
>
打电话:13817237261
</a>
</section>
</section>
</
template
>
</
template
>
...
@@ -153,7 +154,6 @@ import CourseTimesList from "@/components/bussiness/course-times-list";
...
@@ -153,7 +154,6 @@ import CourseTimesList from "@/components/bussiness/course-times-list";
import
OrgDoctorList
from
"@/components/bussiness/org-doctor-list"
;
import
OrgDoctorList
from
"@/components/bussiness/org-doctor-list"
;
import
ExamList
from
"@/components/bussiness/exam-list"
;
import
ExamList
from
"@/components/bussiness/exam-list"
;
import
PopTips
from
"@/components/bussiness/pop-tips"
;
import
PopTips
from
"@/components/bussiness/pop-tips"
;
import
CommonCard
from
"@/components/common/common-card"
;
import
CommonCard
from
"@/components/common/common-card"
;
import
{
getGeneralData
}
from
"@/service/index"
;
import
{
getGeneralData
}
from
"@/service/index"
;
...
@@ -189,7 +189,7 @@ export default {
...
@@ -189,7 +189,7 @@ export default {
ChartColumnVerticalTimes
,
ChartColumnVerticalTimes
,
ChartColumnVerticalScore
,
ChartColumnVerticalScore
,
PopTips
,
PopTips
,
CommonTitleWithWhat
CommonTitleWithWhat
,
},
},
data
()
{
data
()
{
return
{
return
{
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录