Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
f5982059
提交
f5982059
编写于
12月 09, 2019
作者:
zhentian.jia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
比率和时分秒问题
上级
e2eb5154
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
29 行增加
和
7 行删除
+29
-7
operation.js
src/utils/operation.js
+22
-0
item-course-analysis.vue
src/views/learning/item-course-analysis.vue
+6
-6
item-data-all.vue
src/views/learning/item-data-all.vue
+1
-1
未找到文件。
src/utils/operation.js
浏览文件 @
f5982059
...
@@ -719,4 +719,26 @@ export function getHospitalIdList(data) {
...
@@ -719,4 +719,26 @@ export function getHospitalIdList(data) {
}
}
listArr
=
data
.
split
(
"_"
)
listArr
=
data
.
split
(
"_"
)
return
listArr
;
return
listArr
;
}
export
function
learnTimeValue
(
value
)
{
let
s
=
parseInt
(
value
),
m
=
0
,
h
=
0
;
//秒,分,小时
if
(
s
==
NaN
){
//错误error
return
''
;
}
if
(
s
>
60
)
{
m
=
parseInt
(
s
/
60
);
s
=
parseInt
(
s
%
60
);
if
(
m
>
60
)
{
h
=
parseInt
(
m
/
60
);
m
=
parseInt
(
m
%
60
);
}
}
let
result
=
""
+
parseInt
(
s
)
+
"秒"
;
if
(
m
>
0
)
{
result
=
""
+
parseInt
(
m
)
+
"分"
+
result
;
}
if
(
h
>
0
)
{
result
=
""
+
parseInt
(
h
)
+
"小时"
+
result
;
}
return
result
;
}
}
\ No newline at end of file
src/views/learning/item-course-analysis.vue
浏览文件 @
f5982059
...
@@ -14,10 +14,10 @@
...
@@ -14,10 +14,10 @@
<el-table
:data=
"tableData"
class=
"course-table"
>
<el-table
:data=
"tableData"
class=
"course-table"
>
<el-table-column
prop=
"courseName"
label=
"课程名"
align=
"center"
></el-table-column>
<el-table-column
prop=
"courseName"
label=
"课程名"
align=
"center"
></el-table-column>
<el-table-column
prop=
"courseTime"
label=
"课程时长"
align=
"center"
>
<el-table-column
prop=
"courseTime"
label=
"课程时长"
align=
"center"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
courseTime
|
getAvgTim
e
}}
</
template
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
courseTime
|
learnTimeValu
e
}}
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"averageTime"
label=
"人均学习时长"
align=
"center"
>
<el-table-column
prop=
"averageTime"
label=
"人均学习时长"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
averageTime
|
getAvgTim
e
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
averageTime
|
learnTimeValu
e
}}
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"joinCount"
label=
"参与培训人数"
align=
"center"
></el-table-column>
<el-table-column
prop=
"joinCount"
label=
"参与培训人数"
align=
"center"
></el-table-column>
<el-table-column
prop=
"finishCount"
label=
"完成培训人数"
align=
"center"
></el-table-column>
<el-table-column
prop=
"finishCount"
label=
"完成培训人数"
align=
"center"
></el-table-column>
...
@@ -37,10 +37,10 @@
...
@@ -37,10 +37,10 @@
<el-table
:data=
"tableData.slice((pageNo-1)*pageSize,pageNo*pageSize)"
class=
"course-table"
>
<el-table
:data=
"tableData.slice((pageNo-1)*pageSize,pageNo*pageSize)"
class=
"course-table"
>
<el-table-column
prop=
"courseName"
label=
"课程名"
align=
"center"
></el-table-column>
<el-table-column
prop=
"courseName"
label=
"课程名"
align=
"center"
></el-table-column>
<el-table-column
prop=
"courseTime"
label=
"课程时长"
align=
"center"
>
<el-table-column
prop=
"courseTime"
label=
"课程时长"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
courseTime
|
getTotalTim
e
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
courseTime
|
learnTimeValu
e
}}
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"averageTime"
label=
"人均学习时长"
align=
"center"
>
<el-table-column
prop=
"averageTime"
label=
"人均学习时长"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
averageTime
|
getAvgTim
e
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
averageTime
|
learnTimeValu
e
}}
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"joinCount"
label=
"参与培训人数"
align=
"center"
></el-table-column>
<el-table-column
prop=
"joinCount"
label=
"参与培训人数"
align=
"center"
></el-table-column>
<el-table-column
prop=
"finishCount"
label=
"完成培训人数"
align=
"center"
></el-table-column>
<el-table-column
prop=
"finishCount"
label=
"完成培训人数"
align=
"center"
></el-table-column>
...
@@ -168,8 +168,8 @@ export default {
...
@@ -168,8 +168,8 @@ export default {
];
];
cardData
[
0
].
value
=
data
.
totalSize
+
'门'
;
cardData
[
0
].
value
=
data
.
totalSize
+
'门'
;
// cardData[1].value = data.pCourseTotalTime+"分钟";
// cardData[1].value = data.pCourseTotalTime+"分钟";
cardData
[
1
].
value
=
operationData
.
getAvgTim
e
(
data
.
pCourseTotalTime
);
cardData
[
1
].
value
=
operationData
.
learnTimeValu
e
(
data
.
pCourseTotalTime
);
cardData
[
2
].
value
=
operationData
.
getAvgTim
e
(
data
.
pCourseAvg
);
cardData
[
2
].
value
=
operationData
.
learnTimeValu
e
(
data
.
pCourseAvg
);
vm
.
cardData
=
cardData
;
vm
.
cardData
=
cardData
;
},
},
search
(
type
)
{
search
(
type
)
{
...
...
src/views/learning/item-data-all.vue
浏览文件 @
f5982059
...
@@ -838,7 +838,7 @@ export default {
...
@@ -838,7 +838,7 @@ export default {
xAxisData
.
push
(
data
[
i
].
subName
);
xAxisData
.
push
(
data
[
i
].
subName
);
seriesJoin
.
push
(
data
[
i
].
joinCount
);
seriesJoin
.
push
(
data
[
i
].
joinCount
);
seriesCert
.
push
(
data
[
i
].
certCount
);
seriesCert
.
push
(
data
[
i
].
certCount
);
seriesRate
.
push
(
parseFloat
((
data
[
i
].
certRate
).
toFixed
(
1
)));
seriesRate
.
push
(
parseFloat
((
data
[
i
].
certRate
*
100
).
toFixed
(
1
)));
}
}
setTimeout
(
function
(){
setTimeout
(
function
(){
let
myChart
=
echarts
.
init
(
vm
.
$refs
.
certificateChart
);
let
myChart
=
echarts
.
init
(
vm
.
$refs
.
certificateChart
);
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录