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
提交
ac78f7f6
提交
ac78f7f6
编写于
12月 09, 2019
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
课程长度样式、选择样式等逻辑
上级
ad565851
变更
7
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
120 行增加
和
44 行删除
+120
-44
course-times-stat copy.vue
components/bussiness/course-times-stat copy.vue
+86
-0
course-times-stat.vue
components/bussiness/course-times-stat.vue
+4
-4
common-area-select.vue
components/common/common-area-select.vue
+6
-1
pica-area.vue
components/common/pica-area.vue
+8
-8
pica-process.vue
components/common/pica-process.vue
+11
-26
index.vue
pages/index.vue
+4
-4
rank-days.vue
pages/rank-days.vue
+1
-1
未找到文件。
components/bussiness/course-times-stat copy.vue
0 → 100644
浏览文件 @
ac78f7f6
<!-- 课程时长统计 -->
<
template
>
<div>
<ul
class=
"lr-course-times"
v-show=
"maxDuration > avgDuration"
>
<li>
<p>
课程总时长
<span>
(所有课程数
{{
totalSize
}}
门)
</span>
</p>
<ProcessBar
:processDataObj=
"processDataObj"
:maxValue=
"maxDuration"
:value=
"maxDuration"
></ProcessBar>
</li>
<li>
<p>
平均学习时长
</p>
<ProcessBar2
barColor=
"#FFB01A"
:maxValue=
"maxDuration"
:value=
"avgDuration"
></ProcessBar2>
</li>
</ul>
<ul
class=
"lr-course-times"
v-show=
"avgDuration > maxDuration"
>
<li>
<p>
课程总时长
<span>
(所有课程数
{{
totalSize
}}
门)
</span>
</p>
<ProcessBar
:processDataObj=
"processDataObj"
:maxValue=
"avgDuration"
:value=
"maxDuration"
></ProcessBar>
</li>
<li>
<p>
平均学习时长
</p>
<ProcessBar2
barColor=
"#FFB01A"
:maxValue=
"avgDuration"
:value=
"avgDuration"
></ProcessBar2>
</li>
</ul>
</div>
</
template
>
<
script
>
import
ProcessBar
from
"@/components/common/pica-process"
;
import
ProcessBar2
from
"@/components/common/pica-process2"
;
export
default
{
props
:
{
totalSize
:
{
type
:
Number
|
String
,
default
:
0
},
maxDuration
:
{
type
:
Number
|
String
,
default
:
100
},
avgDuration
:
{
type
:
Number
|
String
,
default
:
100
},
processDataObj
:
{
type
:
Object
,
default
:
()
=>
{
return
{
maxValue
:
100
,
value
:
0
}
}
},
},
components
:
{
ProcessBar
,
ProcessBar2
},
methods
:
{}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.lr-course-times
{
margin
:
20px
15px
;
li
{
margin
:
20px
0
;
p
{
height
:
14px
;
line-height
:
14px
;
margin
:
6px
0
;
font-size
:
14px
;
color
:
#676869
;
span
{
font-size
:
14px
;
font-weight
:
400
;
color
:
#979899
;
}
}
}
}
</
style
>
components/bussiness/course-times-stat.vue
浏览文件 @
ac78f7f6
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</li>
</li>
<li>
<li>
<p>
平均学习时长
</p>
<p>
平均学习时长
</p>
<ProcessBar
barColor=
"#FFB01A"
:maxValue=
"maxDuration"
:value=
"avgDuration"
></ProcessBar>
<ProcessBar
barColor=
"#FFB01A"
:
processDataObj=
"processDataObj"
:
maxValue=
"maxDuration"
:value=
"avgDuration"
></ProcessBar>
</li>
</li>
</ul>
</ul>
<ul
class=
"lr-course-times"
v-show=
"avgDuration > maxDuration"
>
<ul
class=
"lr-course-times"
v-show=
"avgDuration > maxDuration"
>
...
@@ -20,11 +20,11 @@
...
@@ -20,11 +20,11 @@
课程总时长
课程总时长
<span>
(所有课程数
{{
totalSize
}}
门)
</span>
<span>
(所有课程数
{{
totalSize
}}
门)
</span>
</p>
</p>
<ProcessBar
:processDataObj=
"processDataObj"
:maxValue=
"avgDuration"
:value=
"
avg
Duration"
></ProcessBar>
<ProcessBar
:processDataObj=
"processDataObj"
:maxValue=
"avgDuration"
:value=
"
max
Duration"
></ProcessBar>
</li>
</li>
<li>
<li>
<p>
平均学习时长
</p>
<p>
平均学习时长
</p>
<ProcessBar
barColor=
"#FFB01A"
:
maxValue=
"avgDuration"
:value=
"max
Duration"
></ProcessBar>
<ProcessBar
barColor=
"#FFB01A"
:
processDataObj=
"processDataObj"
:maxValue=
"avgDuration"
:value=
"avg
Duration"
></ProcessBar>
</li>
</li>
</ul>
</ul>
</div>
</div>
...
@@ -56,7 +56,7 @@ export default {
...
@@ -56,7 +56,7 @@ export default {
},
},
},
},
components
:
{
components
:
{
ProcessBar
ProcessBar
,
},
},
methods
:
{}
methods
:
{}
};
};
...
...
components/common/common-area-select.vue
浏览文件 @
ac78f7f6
...
@@ -39,7 +39,12 @@ export default {
...
@@ -39,7 +39,12 @@ export default {
areaDegree
:
'areaDegree'
areaDegree
:
'areaDegree'
}),
}),
isNotVisible
()
{
isNotVisible
()
{
return
this
.
orgList
.
length
==
0
||
this
.
areaDegree
==
0
||
this
.
areaDegree
==
1
||
this
.
areaDegree
==
2
if
(
this
.
orgList
.
length
==
0
||
this
.
areaDegree
==
0
||
this
.
areaDegree
==
1
||
this
.
areaDegree
==
2
)
{
return
true
;
}
else
{
return
false
;
}
// return this.orgList.length == 0 || this.areaDegree == 0 || this.areaDegree == 1 || this.areaDegree == 2
}
}
},
},
// watch: {
// watch: {
...
...
components/common/pica-area.vue
浏览文件 @
ac78f7f6
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
{{
{{
value
.
provinceName
value
.
provinceName
?
value
.
provinceName
?
value
.
provinceName
:
'请选择
1
'
:
'请选择'
}}
}}
</li>
</li>
<li
<li
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
:class=
"
{ active: isShowCity }"
:class=
"
{ active: isShowCity }"
class="item"
class="item"
@click="tabAddressClick(2)"
@click="tabAddressClick(2)"
>
{{
value
.
cityName
?
value
.
cityName
:
'请选择
2
'
}}
</li>
>
{{
value
.
cityName
?
value
.
cityName
:
'请选择'
}}
</li>
<li
<li
v-show=
"value.cityName && rank>2"
v-show=
"value.cityName && rank>2"
:class=
"
{ active: isShowCounty }"
:class=
"
{ active: isShowCounty }"
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
@click="tabAddressClick(3)"
@click="tabAddressClick(3)"
>
>
{{
{{
value
.
countyName
?
value
.
countyName
:
'请选择
3
'
value
.
countyName
?
value
.
countyName
:
'请选择'
}}
}}
</li>
</li>
<li
<li
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
:class=
"
{ active: isShowTown }"
:class=
"
{ active: isShowTown }"
class="item"
class="item"
@click="tabAddressClick(4)"
@click="tabAddressClick(4)"
>
{{
value
.
townName
?
value
.
townName
:
'请选择
4
'
}}
</li>
>
{{
value
.
townName
?
value
.
townName
:
'请选择'
}}
</li>
</ul>
</ul>
<div
class=
"address-content"
@
touchmove
.
stop
>
<div
class=
"address-content"
@
touchmove
.
stop
>
<ul
v-show=
"isShowProvince"
id=
"province"
>
<ul
v-show=
"isShowProvince"
id=
"province"
>
...
@@ -300,12 +300,12 @@ export default {
...
@@ -300,12 +300,12 @@ export default {
// 当前选中的样式
// 当前选中的样式
this
.
areaList
.
provinceList
.
map
(
a
=>
(
a
.
selected
=
false
));
this
.
areaList
.
provinceList
.
map
(
a
=>
(
a
.
selected
=
false
));
this
.
areaList
.
provinceList
[
idx
].
selected
=
true
;
this
.
areaList
.
provinceList
[
idx
].
selected
=
true
;
this
.
setAreaDegree
(
item
.
degree
)
if
(
item
.
degree
==
0
){
if
(
item
.
degree
==
0
){
return
;
return
;
}
}
if
(
item
.
degree
==
3
||
item
.
degree
==
4
){
if
(
item
.
degree
==
3
||
item
.
degree
==
4
){
// 调用机构接口
// 调用机构接口
this
.
setAreaDegree
(
item
.
degree
)
this
.
getHospitalsByRegionId
(
this
.
queryParams
);
this
.
getHospitalsByRegionId
(
this
.
queryParams
);
// return;
// return;
}
}
...
@@ -339,12 +339,12 @@ export default {
...
@@ -339,12 +339,12 @@ export default {
// 当前选中的样式
// 当前选中的样式
this
.
areaList
.
cityList
.
map
(
a
=>
(
a
.
selected
=
false
));
this
.
areaList
.
cityList
.
map
(
a
=>
(
a
.
selected
=
false
));
this
.
areaList
.
cityList
[
idx
].
selected
=
true
;
this
.
areaList
.
cityList
[
idx
].
selected
=
true
;
this
.
setAreaDegree
(
item
.
degree
)
if
(
item
.
degree
==
0
){
if
(
item
.
degree
==
0
){
return
;
return
;
}
}
if
(
item
.
degree
==
3
||
item
.
degree
==
4
){
if
(
item
.
degree
==
3
||
item
.
degree
==
4
){
// 调用机构接口
// 调用机构接口
this
.
setAreaDegree
(
item
.
degree
)
this
.
getHospitalsByRegionId
(
this
.
queryParams
);
this
.
getHospitalsByRegionId
(
this
.
queryParams
);
// return;
// return;
}
}
...
@@ -373,12 +373,12 @@ export default {
...
@@ -373,12 +373,12 @@ export default {
// 当前选中的样式
// 当前选中的样式
this
.
areaList
.
countyList
.
map
(
a
=>
(
a
.
selected
=
false
));
this
.
areaList
.
countyList
.
map
(
a
=>
(
a
.
selected
=
false
));
this
.
areaList
.
countyList
[
idx
].
selected
=
true
;
this
.
areaList
.
countyList
[
idx
].
selected
=
true
;
this
.
setAreaDegree
(
item
.
degree
)
if
(
item
.
degree
==
0
){
if
(
item
.
degree
==
0
){
return
;
return
;
}
}
if
(
item
.
degree
==
3
||
item
.
degree
==
4
){
if
(
item
.
degree
==
3
||
item
.
degree
==
4
){
// 调用机构接口
// 调用机构接口
this
.
setAreaDegree
(
item
.
degree
)
this
.
getHospitalsByRegionId
(
this
.
queryParams
);
this
.
getHospitalsByRegionId
(
this
.
queryParams
);
// return;
// return;
}
}
...
@@ -402,12 +402,12 @@ export default {
...
@@ -402,12 +402,12 @@ export default {
this
.
queryParams
.
regionId
=
item
.
id
;
this
.
queryParams
.
regionId
=
item
.
id
;
this
.
value
.
townName
=
item
.
label
;
this
.
value
.
townName
=
item
.
label
;
this
.
value
.
patientAddress
=
`
${
this
.
value
.
provinceName
}${
this
.
value
.
cityName
}${
this
.
value
.
countyName
}${
this
.
value
.
townName
}
`
;
this
.
value
.
patientAddress
=
`
${
this
.
value
.
provinceName
}${
this
.
value
.
cityName
}${
this
.
value
.
countyName
}${
this
.
value
.
townName
}
`
;
this
.
setAreaDegree
(
item
.
degree
)
if
(
item
.
degree
==
0
){
if
(
item
.
degree
==
0
){
return
;
return
;
}
}
if
(
item
.
degree
==
3
||
item
.
degree
==
4
){
if
(
item
.
degree
==
3
||
item
.
degree
==
4
){
// 调用机构接口
// 调用机构接口
this
.
setAreaDegree
(
item
.
degree
)
this
.
getHospitalsByRegionId
(
this
.
queryParams
);
this
.
getHospitalsByRegionId
(
this
.
queryParams
);
// return;
// return;
}
}
...
...
components/common/pica-process.vue
浏览文件 @
ac78f7f6
...
@@ -35,6 +35,10 @@ export default {
...
@@ -35,6 +35,10 @@ export default {
unitName
:
{
unitName
:
{
type
:
String
,
type
:
String
,
default
:
'分钟'
default
:
'分钟'
},
processWidth
:
{
type
:
String
,
default
:
'0px'
}
}
},
},
data
()
{
data
()
{
...
@@ -42,12 +46,6 @@ export default {
...
@@ -42,12 +46,6 @@ export default {
maxPocessWidth
:
'0px'
maxPocessWidth
:
'0px'
}
}
},
},
// computed: {
// test() {
// }
// },
watch
:
{
watch
:
{
processDataObj
:
{
processDataObj
:
{
handler
(
newVal
)
{
handler
(
newVal
)
{
...
@@ -55,33 +53,20 @@ export default {
...
@@ -55,33 +53,20 @@ export default {
let
clientWidth
=
window
.
outerWidth
||
document
.
body
.
clientWidth
||
document
.
documentElement
.
clientWidth
;
let
clientWidth
=
window
.
outerWidth
||
document
.
body
.
clientWidth
||
document
.
documentElement
.
clientWidth
;
let
maxWidth
=
clientWidth
-
this
.
valueDescWidth
;
let
maxWidth
=
clientWidth
-
this
.
valueDescWidth
;
let
ratio
=
1
;
let
ratio
=
1
;
if
(
this
.
processDataObj
.
maxDuration
&&
this
.
processDataObj
.
maxDuration
<
this
.
processDataObj
.
avgDuration
)
{
if
(
this
.
maxValue
&&
this
.
maxValue
<
this
.
value
)
{
ratio
=
this
.
processDataObj
.
maxDuration
/
this
.
processDataObj
.
avgDuration
;
ratio
=
this
.
maxValue
/
this
.
value
;
}
if
(
!
this
.
processDataObj
.
maxDuration
)
{
ratio
=
0.01
;
}
}
this
.
maxPocessWidth
=
Math
.
round
(
ratio
*
maxWidth
)
+
'px'
if
(
this
.
value
&&
this
.
maxValue
>
this
.
value
)
{
ratio
=
this
.
value
/
this
.
maxValue
;
}
this
.
maxPocessWidth
=
Math
.
round
(
ratio
*
maxWidth
)
+
'px'
}
}
},
},
deep
:
true
deep
:
true
}
}
},
},
mounted
()
{
mounted
()
{
// let maxWidth = window.clien
// scrollWidth offsetWidth
// this.$nextTick(() => {
// let clientWidth = window.outerWidth || document.body.clientWidth || document.documentElement.clientWidth;
// let maxWidth = clientWidth - this.valueDescWidth;
// let ratio = 1;
// if(this.value && this.value
<
this
.
avgDuration
)
{
// ratio = this.value / this.avgDuration;
// }
// if(!this.value) {
// ratio = 0.01;
// }
// this.maxPocessWidth = Math.round(ratio * maxWidth) + 'px'
// })
},
},
methods
:
{}
methods
:
{}
};
};
...
...
pages/index.vue
浏览文件 @
ac78f7f6
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
<!-- 课程分析 -->
<!-- 课程分析 -->
<article
v-show=
"(cIndex === 2) && (projectInfo.existCourse == 1)"
style=
"padding-top: 8px;"
>
<article
v-show=
"(cIndex === 2) && (projectInfo.existCourse == 1)"
style=
"padding-top: 8px;"
>
<CourseTimesStat
:
processDataObj=
"processDataObj"
:totalSize=
"courseInfo.totalSize"
:maxDuration=
"courseInfo.pCourseTotalTime"
:avgDuration=
"courseInfo.pCourseAvg
"
></CourseTimesStat>
<CourseTimesStat
:
totalSize=
"courseInfo.totalSize"
:maxDuration=
"courseInfo.pCourseTotalTime"
:avgDuration=
"courseInfo.pCourseAvg"
:processDataObj=
"processDataObj
"
></CourseTimesStat>
<CommonSplitLine></CommonSplitLine>
<CommonSplitLine></CommonSplitLine>
<CommonTitle
title=
"课程列表"
></CommonTitle>
<CommonTitle
title=
"课程列表"
></CommonTitle>
<CourseTimesList
:dataList=
"courseInfo.pCourseList"
></CourseTimesList>
<CourseTimesList
:dataList=
"courseInfo.pCourseList"
></CourseTimesList>
...
@@ -269,9 +269,9 @@ export default {
...
@@ -269,9 +269,9 @@ export default {
},
},
projectInfo
:
{
projectInfo
:
{
certFlag
:
0
,
// 项目证书情况 0:无证;1:单证书;2:多证书
certFlag
:
0
,
// 项目证书情况 0:无证;1:单证书;2:多证书
existCourse
:
1
,
// 是否显示课程分析 1:显示 2:不显示
existCourse
:
2
,
// 是否显示课程分析 1:显示 2:不显示
existEffect
:
1
,
// 是否显示学习效果分析 1:显示 2:不显示
existEffect
:
2
,
// 是否显示学习效果分析 1:显示 2:不显示
existExam
:
1
,
// 是否显示考试分析 1:显示 2:不显示
existExam
:
2
,
// 是否显示考试分析 1:显示 2:不显示
roleType
:
0
,
// 0:普通人 1:内部管理员 2:项目负责人 3:次级负责人
roleType
:
0
,
// 0:普通人 1:内部管理员 2:项目负责人 3:次级负责人
status
:
0
// 是否显示查看原始数据 1:显示 2:不显示
status
:
0
// 是否显示查看原始数据 1:显示 2:不显示
},
},
...
...
pages/rank-days.vue
浏览文件 @
ac78f7f6
...
@@ -87,6 +87,6 @@ export default {
...
@@ -87,6 +87,6 @@ export default {
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.mt-10 {
.mt-10 {
margin-top:
-
10px !important;
margin-top: 10px !important;
}
}
</
style
>
</
style
>
\ No newline at end of file
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录