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
提交
b454a672
提交
b454a672
编写于
11月 15, 2019
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
组件优化
上级
e0cb42ec
变更
28
隐藏空白字符变更
内嵌
并排
正在显示
28 个修改的文件
包含
128 行增加
和
1058 行删除
+128
-1058
chart-column-vertical.vue
components/bussiness/charts/chart-column-vertical.vue
+2
-2
chart-column.vue
components/bussiness/charts/chart-column.vue
+13
-6
chart-pie copy.vue
components/bussiness/charts/chart-pie copy.vue
+0
-140
chart-pie.vue
components/bussiness/charts/chart-pie.vue
+0
-2
course-times.vue
components/bussiness/course-times.vue
+3
-2
inst-training.vue
components/bussiness/inst-training.vue
+0
-0
ranking-item copy.vue
components/bussiness/ranking-item copy.vue
+0
-84
ranking-item-days.vue
components/bussiness/ranking-item-days.vue
+6
-6
common-area-select copy.vue
components/common/common-area-select copy.vue
+0
-61
common-area-select.vue
components/common/common-area-select.vue
+6
-3
common-bottom-info.vue
components/common/common-bottom-info.vue
+1
-1
common-card.vue
components/common/common-card.vue
+1
-1
common-header copy.vue
components/common/common-header copy.vue
+0
-38
common-header.vue
components/common/common-header.vue
+5
-5
common-show-all copy.vue
components/common/common-show-all copy.vue
+0
-76
common-swiper-item-mini.vue
components/common/common-swiper-item-mini.vue
+0
-25
common-tabs-vant.vue
components/common/common-tabs-vant.vue
+64
-0
common-tabs.vue
components/common/common-tabs.vue
+3
-4
common-tips.vue
components/common/common-tips.vue
+1
-1
common-title.vue
components/common/common-title.vue
+6
-6
pica-area.vue
components/common/pica-area.vue
+1
-0
pica-org copy.vue
components/common/pica-org copy.vue
+0
-511
pica-org.vue
components/common/pica-org.vue
+1
-0
pica-process copy.vue
components/common/pica-process copy.vue
+0
-76
pica-process.vue
components/common/pica-process.vue
+4
-2
package.json
package.json
+1
-1
index.vue
pages/index.vue
+7
-5
vue-inject.js
plugins/vue-inject.js
+3
-0
未找到文件。
components/bussiness/charts/chart-column-vertical.vue
浏览文件 @
b454a672
<!--
饼图
-->
<!--
柱状图-竖向
-->
<
template
>
<section
class=
"chart-pie"
>
<div
:id=
"id"
:style=
"
{width: '100%', height: '320px'}">
</div>
...
...
@@ -11,7 +11,7 @@ export default {
props
:
{
id
:
{
type
:
String
,
default
:
"chart
line
Id"
default
:
"chart
Column
Id"
},
colors
:
{
type
:
Array
,
...
...
components/bussiness/charts/chart-column.vue
浏览文件 @
b454a672
<!--
饼图
-->
<!--
柱状图-横向
-->
<
template
>
<
section
class=
"chart-pie"
>
<div
:id=
"id"
:style=
"
{width:
'100%', height: '320px'
}">
</div>
</
section
>
<
div
class=
"chart-pie"
>
<div
:id=
"id"
:style=
"
{width:
chartWidth, height: chartHeight
}">
</div>
</
div
>
</
template
>
<
script
>
import
{
format
}
from
"path"
;
...
...
@@ -11,8 +11,16 @@ export default {
props
:
{
id
:
{
type
:
String
,
default
:
"chart
line
Id"
default
:
"chart
Column
Id"
},
chartWidth
:
{
type
:
String
,
default
:
'100%'
},
chartHeight
:
{
type
:
String
,
default
:
'320px'
}
},
data
()
{
return
{};
...
...
@@ -152,7 +160,6 @@ export default {
.chart-pie
{
position
:
relative
;
top
:
-6px
;
// height: 280px;
margin
:
15px
;
background
:
rgba
(
255
,
255
,
255
,
1
);
box-shadow
:
0px
10px
30px
0px
rgba
(
0
,
0
,
0
,
0
.04
);
...
...
components/bussiness/charts/chart-pie copy.vue
已删除
100644 → 0
浏览文件 @
e0cb42ec
<!-- 饼图 -->
<
template
>
<section
class=
"chart-pie"
>
<!--
<ve-pie
ref=
"runTimes_creditChart"
:data=
"readAbilityIntervalData.pieData"
:tooltip-visible=
"true"
:settings=
"readAbilityIntervalData.settings"
:colors=
"options.colors"
></ve-pie>
-->
<div
id=
"myChart"
:style=
"
{width: '100%', height: '300px'}">
</div>
</section>
</
template
>
<
script
>
import
VePie
from
"v-charts/lib/pie"
;
export
default
{
props
:
{
title
:
{
type
:
String
,
default
:
"证书分布情况"
},
needRightBtn
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{
chartHeight
:
"1000px"
,
readAbilityIntervalData
:
{
pieData
:
{
columns
:
[
"distributionName"
,
"ratio"
],
rows
:
[
// 数据
{
distributionName
:
"落后"
,
ratio
:
"17"
// 8% X 只能传入number 8% 不识别
},
{
distributionName
:
"不足"
,
ratio
:
"13"
},
{
distributionName
:
"良好"
,
ratio
:
"30"
}
]
},
msg
:
""
,
settings
:
{
// radius : [ '30%', '50%' ],//内外圆的大小
center
:
[
0
,
0
],
//距离左右,上下距离的百分比
// grid: {
// x: 25,
// y: 45,
// x2: 5,
// y2: 20,
// borderWidth: 1
// },
grid
:
{
left
:
"5%"
,
// 与容器左侧的距离
right
:
"5%"
// 与容器右侧的距离
//top: '5%', // 与容器顶部的距离
//bottom: '5%', // 与容器底部的距离
},
dataType
:
"percent"
,
label
:
{
show
:
true
,
position
:
"inner"
,
formatter
:
"描述文字
\
r
\n
\
r
\n
{c}%"
// 展示如果需要%
}
}
},
// 重置颜色,图标如果需要颜色,优先从用户提供的colors中依次提取,用户不提供,则根据默认的颜色进行选取
options
:
{
colors
:
[
"#6ab58f"
,
"#80c5d8"
,
"#c8abda"
,
"#dcdb5e"
,
"#e89b84"
,
"#abb7bb"
,
"#76d2d2"
]
}
};
},
components
:
{
VePie
},
mounted
()
{
this
.
drawLine
();
// window.addEventListener("resize", this.resizeTheChart);
},
methods
:
{
resizeTheChart
()
{
if
(
this
.
$refs
.
runTimes_creditChart
)
{
this
.
$refs
.
runTimes_creditChart
.
resize
();
}
},
drawLine
()
{
// 基于准备好的dom,初始化echarts实例
let
myChart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
"myChart"
));
// 绘制图表
myChart
.
setOption
({
title
:
{
text
:
"在Vue中使用echarts"
},
tooltip
:
{},
xAxis
:
{
data
:
[
"衬衫"
,
"羊毛衫"
,
"雪纺衫"
,
"裤子"
,
"高跟鞋"
,
"袜子"
]
},
yAxis
:
{},
series
:
[
{
name
:
"销量"
,
type
:
"bar"
,
data
:
[
5
,
20
,
36
,
10
,
10
,
20
]
}
]
});
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.chart-pie
{
position
:
relative
;
top
:
-6px
;
// height: 280px;
margin
:
15px
;
padding-top
:
15px
;
// height: 431px;
background
:
rgba
(
255
,
255
,
255
,
1
);
box-shadow
:
0px
10px
30px
0px
rgba
(
0
,
0
,
0
,
0
.04
);
border-radius
:
6px
;
border
:
1px
solid
rgba
(
231
,
232
,
233
,
1
);
}
</
style
>
components/bussiness/charts/chart-pie.vue
浏览文件 @
b454a672
...
...
@@ -83,11 +83,9 @@ export default {
position
:
"inner"
,
formatter
:
function
(
config
)
{
return
`
${
config
.
percent
}
%`
;
// console.log(config);
}
},
radius
:
"65%"
,
// radius: ["30%", "60%"], //内外圆的大小
center
:
[
"30%"
,
"50%"
],
data
:
vm
.
pieData
,
itemStyle
:
{
...
...
components/bussiness/course-times.vue
浏览文件 @
b454a672
...
...
@@ -42,11 +42,12 @@ export default {
p
{
height
:
14px
;
line-height
:
14px
;
margin
:
12
px
0
;
margin
:
6
px
0
;
font-size
:
14px
;
font-weight
:
400
;
color
:
#676869
;
span
{
font-size
:
14px
;
font-weight
:
400
;
color
:
#979899
;
}
}
...
...
components/bussiness/inst-training.vue
已删除
100644 → 0
浏览文件 @
e0cb42ec
components/bussiness/ranking-item copy.vue
已删除
100644 → 0
浏览文件 @
e0cb42ec
<!-- 培训情况排名组件 -->
<
template
>
<ul
class=
"rank-item"
>
<li
v-for=
"(item, index) in rankList"
:key=
"index"
>
<section
class=
"order"
>
1
</section>
<section
class=
"content"
>
<p
class=
"desc-1"
>
福建省
</p>
<p
class=
"desc-2"
>
完成人数 8860 | 参与人数 101
</p>
</section>
<section
class=
"ratio"
>
<p
class=
"desc-1"
>
83%
</p>
<p
class=
"desc-2"
>
完成比例
</p>
</section>
</li>
</ul>
</
template
>
<
script
>
export
default
{
props
:
{
rankList
:
{
type
:
Array
,
default
:
()
=>
[{
province
:
'福建省'
,
order
:
1
,
},{
province
:
'福建省'
,
order
:
1
,
},{
province
:
'福建省'
,
order
:
1
,
},{
province
:
'福建省'
,
order
:
1
,
},]
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.rank-item
{
margin
:
20px
15px
;
li
{
height
:
58px
;
display
:
flex
;
flex-direction
:
row
;
margin
:
20px
0
;
border-bottom
:
1px
solid
#F0F1F2
;
.order
{
width
:
25px
;
height
:
38px
;
line-height
:
38px
;
margin-right
:
15px
;
text-align
:
center
;
font-size
:
20px
;
}
.content
{
flex
:
1
;
}
.ratio
{
width
:
60px
;
justify-content
:
right
;
text-align
:
right
;
}
}
.desc-1
{
height
:
16px
;
line-height
:
16px
;
padding-bottom
:
10px
;
font-size
:
16px
;
font-weight
:
700
;
color
:
#373839
;
}
.desc-2
{
height
:
12px
;
line-height
:
12px
;
// padding-bottom: 10px;
font-size
:
12px
;
font-weight
:
400
;
color
:
#979899
;
}
}
</
style
>
\ No newline at end of file
components/bussiness/ranking-item-days.vue
浏览文件 @
b454a672
...
...
@@ -2,17 +2,17 @@
<
template
>
<ul
class=
"rank-item"
>
<li
v-for=
"(item, index) in rankList"
:key=
"index"
>
<
section
class=
"order"
>
<
div
class=
"order"
>
1
</
section
>
<
section
class=
"content"
>
</
div
>
<
div
class=
"content"
>
<p
class=
"desc-3"
>
福建省
</p>
<!--
<p
class=
"desc-2"
>
完成人数 8860 | 参与人数 101
</p>
-->
</
section
>
<
section
class=
"ratio"
>
</
div
>
<
div
class=
"ratio"
>
<p
class=
"desc-1"
>
6.8天
</p>
<p
class=
"desc-2"
>
完成天数
</p>
</
section
>
</
div
>
</li>
</ul>
</
template
>
...
...
components/common/common-area-select copy.vue
已删除
100644 → 0
浏览文件 @
e0cb42ec
<!-- Tabs组件 -->
<
template
>
<div
class=
"common-as-wrapper"
>
<ul>
<li>
<span>
全部区域
</span>
<!--
<img
src=
"../../assets/images/left-array-black.png"
/>
-->
</li>
<li>
<span>
全部机构
</span>
<!--
<img
src=
"../../assets/images/left-array-black.png"
/>
-->
</li>
</ul>
</div>
</
template
>
<
script
>
export
default
{
props
:
{
tapList
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
methods
:
{}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.common-as-wrapper
{
padding
:
0
55px
;
// height: 35px;
// line-height: 35px;
ul
{
display
:
flex
;
flex-direction
:
row
;
justify-content
:
space-between
;
align-content
:
center
;
align-items
:
center
;
li
{
align-content
:
center
;
align-items
:
center
;
height
:
35px
;
line-height
:
35px
;
}
span
{
display
:
inline-block
;
height
:
15px
;
line-height
:
15px
;
font-size
:
15px
;
color
:
#676869
;
}
img
{
display
:
inline-block
;
height
:
15px
;
line-height
:
15px
;
width
:
12px
;
height
:
12px
;
}
}
}
</
style
>
components/common/common-area-select.vue
浏览文件 @
b454a672
<!--
Tabs
组件 -->
<!--
区域与机构选择(表头)
组件 -->
<
template
>
<ul
class=
"common-
header
"
>
<ul
class=
"common-
area-select
"
>
<li
class=
"center"
@
click=
"areaClick"
>
{{
areaName
}}
<img
src=
"../../assets/images/left-array-black.png"
/>
</li>
<li
class=
"center"
@
click=
"orgClick"
>
{{
orgName
}}
<img
src=
"../../assets/images/left-array-black.png"
/>
</li>
<li
class=
"center"
@
click=
"orgClick"
>
{{
orgName
}}
<img
src=
"../../assets/images/left-array-black.png"
/>
</li>
</ul>
</
template
>
...
...
@@ -33,12 +35,13 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
.common-
header
{
.common-
area-select
{
// padding-top: 50px;
display
:
flex
;
width
:
100%
;
height
:
35px
;
line-height
:
35px
;
margin
:
2px
0
10px
;
flex-direction
:
row
nowrap
;
align-content
:
center
;
align-items
:
center
;
...
...
components/common/common-bottom-info.vue
浏览文件 @
b454a672
<!--
Tabs
组件 -->
<!--
(最下面)更多信息
组件 -->
<
template
>
<section
class=
"common-bottom-info"
>
<span>
{{
infoMsg
}}
</span>
...
...
components/common/common-card.vue
浏览文件 @
b454a672
<!--
Tabs组件
-->
<!--
Card组件(支持两列、三列甚至四列)
-->
<
template
>
<div
class=
"common-card"
:class=
"
{'bg': needBG}">
<ul
v-for=
"(item, index) in cardList"
:key=
"index"
>
...
...
components/common/common-header copy.vue
已删除
100644 → 0
浏览文件 @
e0cb42ec
<!-- 头部组件 -->
<
template
>
<section
class=
"common-header"
:style=
"
{'background-color': bgColor}">
<img
src=
""
@
click=
"back"
/>
<span></span>
</section>
</
template
>
<
script
>
export
default
{
props
:
{
title
:
{
type
:
String
,
default
:
'项目名称'
},
bgColor
:
{
type
:
String
,
default
:
'#fff'
}
},
methods
:
{
back
()
{
if
(
true
)
{
this
.
$router
.
history
(
-
1
);
}
else
{
this
.
$rocNative
.
back
();
}
}
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'@/assets/style/mixin'
;
@import
'@/assets/style/global'
;
.common-header
{
margin-top
:
px2rem
(
60px
);
}
</
style
>
components/common/common-header.vue
浏览文件 @
b454a672
<!-- Tabs组件 -->
<
template
>
<div
class=
"common-header"
>
<span
class=
"left"
>
<img
s
rc=
"../../assets/images/left-array-black.png"
@
click=
"back
"
/>
<span
class=
"left"
@
click=
"back"
>
<img
s
tyle=
"widht:20px;height:20px;"
src=
"../../assets/images/left-array-black.png
"
/>
</span>
<span
class=
"center"
>
{{
title
}}
</span>
<span
v-show=
"needRightBtn"
class=
"right"
>
<!--
<img
src=
"../../assets/images/left-array-black.png"
@
click=
"back"
/>
-->
<span
v-show=
"needRightBtn"
class=
"right"
@
click=
"back"
>
<!--
<img
src=
"../../assets/images/left-array-black.png"
/>
-->
</span>
</div>
</
template
>
...
...
@@ -41,6 +40,7 @@ export default {
align-items
:
center
;
text-align
:
center
;
justify-content
:
center
;
/* 水平居中 */
font-size
:
30px
;
span
{
display
:
block
;
}
...
...
components/common/common-show-all copy.vue
已删除
100644 → 0
浏览文件 @
e0cb42ec
<
template
>
<section
class=
"common-show-all"
>
<!--
<div
style=
"height: 50px;line-height:50px;text-align:center;position:relative;"
>
-->
<!--
<span>
查看全部
</span>
<img
src=
"../../assets/images/left-array-black.png"
/>
-->
<!--
</div>
-->
</section>
</
template
>
<
script
>
export
default
{
data
()
{
return
{};
},
props
:
{
needMarginTop
:
{
type
:
Boolean
,
default
:
false
},
btnText
:
{
type
:
String
,
default
:
"查看全部"
},
itemIndex
:
{
type
:
String
,
default
:
"0"
}
},
methods
:
{
showAllItem
()
{
this
.
$emit
(
"showAllItem"
);
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.hear
{
background
:
url(../../assets/images/left-array-black.png)
no-repeat
center
center
no-repeat
;
background-size
:
8px
14px
;
margin-right
:
20px
;
}
.comment
{
background
:
url(../../assets/images/left-array-black.png)
left
center
no-repeat
;
background-size
:
8px
14px
;
}
.hear
,
.comment
{
height
:
30px
;
line-height
:
30px
;
padding-left
:
20px
;
}
// @import '@/assets/style/mixin';
// @import '@/assets/style/global';
.common-show-all
{
// position: relative;
height
:
50
;
line-height
:
50px
;
text-align
:
center
;
span
{
display
:
inline-block
;
height
:
14px
;
line-height
:
14px
;
font-size
:
14px
;
}
img
{
display
:
inline-block
;
width
:
10px
;
height
:
14px
;
vertical-align
:
middle
;
// position: absolute;
}
}
</
style
>
components/common/common-swiper-item-mini.vue
已删除
100644 → 0
浏览文件 @
e0cb42ec
<!-- Swipter的子组件 -->
<
template
>
<section
class=
"common-swiper-item"
>
</section>
</
template
>
<
script
>
export
default
{
props
:
{
itemData
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
methods
:
{
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.common-swiper-item
{
margin-top
:
0
;
}
</
style
>
components/common/common-tabs-vant.vue
0 → 100644
浏览文件 @
b454a672
<!-- Tabs组件 -->
<
template
>
<!--
<van-tabs
active=
"
{{
active
}}
" bind:change="onChange"> -->
<van-tabs
:change=
"onChange"
class=
"lr-tabs"
>
<van-tab
title=
"内容内容"
>
内容内容
</van-tab>
<van-tab
title=
"内容内容"
>
内容内容
</van-tab>
<van-tab
title=
"内容内容"
>
内容内容
</van-tab>
<van-tab
title=
"内容内容"
>
内内容容
</van-tab>
<van-tab
title=
"内容内容内容"
>
内内容容
</van-tab>
</van-tabs>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
cIndex
:
4
};
},
props
:
{
tapList
:
{
type
:
Array
,
default
:
()
=>
[
"总体概况"
,
"人群分析"
,
"课程分析"
,
"考试分析"
,
"学习效果分析"
]
}
},
methods
:
{
onChange
(
detail
)
{
this
.
cIndex
=
index
;
this
.
$emit
(
"tabClicked"
,
index
);
}
}
};
</
script
>
<
style
lang=
"scss"
>
.lr-tabs
{
.van-tabs__line
{
display
:
none
;
}
.van-tab
{
margin
:
6px
5px
;
padding
:
0
0px
;
height
:
30px
;
line-height
:
30px
;
font-size
:
13px
;
background
:
#f0f1f2
;
color
:
#979899
;
border-radius
:
15px
;
}
.van-ellipsis
{
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.
van-hairline--top-bottom
:
:
after
,
.
van-hairline-unset--top-bottom
::
after
{
border-width
:
0
0
;
}
}
</
style
>
components/common/common-tabs.vue
浏览文件 @
b454a672
...
...
@@ -42,20 +42,19 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
// article {
// height: 36px;
// margin-bottom: -4px;
// }
.common-tabs-wrapper
{
display
:
flex
;
position
:
relative
;
top
:
0
;
left
:
0
;
z-index
:
1
;
font-size
:
13px
;
.common-tabs
{
white-space
:
nowrap
;
overflow-x
:
auto
;
// height: 30px;
padding-bottom
:
6px
;
font-size
:
13px
;
li
{
display
:
inline-block
;
height
:
30px
;
...
...
components/common/common-tips.vue
浏览文件 @
b454a672
<!-- T
ab
s组件 -->
<!-- T
ip
s组件 -->
<
template
>
<div
class=
"common-tips"
>
ewfwef
...
...
components/common/common-title.vue
浏览文件 @
b454a672
<!--
Tabs
组件 -->
<!--
标题
组件 -->
<
template
>
<
section
class=
"common-title"
>
<
span
class=
"left"
>
{{
title
}}
</span
>
<
span
v-if=
"needRightBtn"
></span
>
</
section
>
<
ul
class=
"common-title"
>
<
li
class=
"left"
>
{{
title
}}
</li
>
<
li
v-if=
"needRightBtn"
></li
>
</
ul
>
</
template
>
<
script
>
export
default
{
...
...
@@ -25,7 +25,7 @@ export default {
.common-title
{
// margin: 15px;
margin
:
30px
15px
20px
;
span
{
li
{
display
:
inline-block
;
&
.left
{
// width: 216px;
...
...
components/common/pica-area.vue
浏览文件 @
b454a672
<!-- 选择地区组件 -->
<
template
>
<div
class=
"select-wrapper"
>
<div
class=
"mask"
@
click=
"cancelSelect"
@
touchmove
.
prevent
>
...
...
components/common/pica-org copy.vue
已删除
100644 → 0
浏览文件 @
e0cb42ec
<
template
>
<div
class=
"select-wrapper"
>
<div
class=
"mask"
@
click=
"cancelSelect"
@
touchmove
.
prevent
>
<div
class=
"address-wrap"
@
click
.
stop
>
<div
class=
"tip-header"
>
<span
class=
"cancel-btn"
@
click=
"cancelSelect"
>
取消
</span>
<h3>
选择地区
</h3>
<button
class=
"submit-btn"
@
click=
"confirm"
>
确定
</button>
<!--
<button
:disabled=
"isDisabled"
class=
"submit-btn"
@
click=
"confirm"
>
确定
</button>
-->
</div>
<div
class=
"address-select"
>
<ul
class=
"show-address-header"
>
<li
:class=
"
{ active: isShowProvince }" class="item" @click="tabAddressClick(1)">
{{
value
.
provinceName
?
value
.
provinceName
:
'请选择'
}}
</li>
<li
v-show=
"value.provinceName && rank>1"
:class=
"
{ active: isShowCity }"
class="item"
@click="tabAddressClick(2)"
>
{{
value
.
cityName
?
value
.
cityName
:
'请选择'
}}
</li>
<li
v-show=
"value.cityName && rank>2"
:class=
"
{ active: isShowCounty }"
class="item"
@click="tabAddressClick(3)"
>
{{
value
.
countyName
?
value
.
countyName
:
'请选择'
}}
</li>
<li
v-show=
"value.countyName && rank>3"
:class=
"
{ active: isShowTown }"
class="item"
@click="tabAddressClick(4)"
>
{{
value
.
townName
?
value
.
townName
:
'请选择'
}}
</li>
</ul>
<div
class=
"address-content"
@
touchmove
.
stop
>
<ul
v-show=
"isShowProvince"
id=
"province"
>
<li
v-for=
"(provinceItem, index) in areaList.provinceList"
:key=
"index"
:class=
"
{ active: provinceItem.selected }"
@click="provinceSelect(provinceItem, index)"
>
<span>
{{
provinceItem
.
provinceName
}}
</span>
<span
v-show=
"provinceItem.selected"
>
<img
src=
"../../assets/images/sort-select-icon.png"
/>
</span>
</li>
</ul>
<ul
v-show=
"isShowCity"
id=
"city"
>
<li
v-for=
"(cityItem, index) in areaList.cityList"
:key=
"index"
:class=
"
{ active: cityItem.selected }"
@click="citySelect(cityItem, index)"
>
<span>
{{
cityItem
.
cityName
}}
</span>
<span
v-show=
"cityItem.selected"
>
<img
src=
"../../assets/images/sort-select-icon.png"
/>
</span>
</li>
</ul>
<ul
v-show=
"isShowCounty"
id=
"county"
>
<li
v-for=
"(countyItem, index) in areaList.countyList"
:key=
"index"
:class=
"
{ active: countyItem.selected }"
@click="countySelect(countyItem, index)"
>
<span>
{{
countyItem
.
countyName
}}
</span>
<span
v-show=
"countyItem.selected"
>
<img
src=
"../../assets/images/sort-select-icon.png"
/>
</span>
</li>
</ul>
<ul
v-show=
"isShowTown"
id=
"town"
>
<li
v-for=
"(townItem, index) in areaList.townList"
:key=
"index"
:class=
"
{ active: townItem.selected }"
@click="townSelect(townItem, index)"
>
<span>
{{
townItem
.
townName
}}
</span>
<span
v-show=
"townItem.selected"
>
<img
src=
"../../assets/images/sort-select-icon.png"
/>
</span>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
getProvinceList
,
getCityList
,
getCountyList
,
getTownList
}
from
"../../service"
;
export
default
{
name
:
"PicaArea"
,
data
()
{
return
{
areaList
:
{
provinceList
:
[],
cityList
:
[],
countyList
:
[],
townList
:
[]
},
value
:
{
cityId
:
""
,
cityName
:
""
,
countyId
:
""
,
countyName
:
""
,
patientAddress
:
""
,
provinceId
:
""
,
provinceName
:
""
,
townId
:
""
,
townName
:
""
},
isDisabled
:
true
,
isShowProvince
:
true
,
isShowCity
:
false
,
isShowCounty
:
false
,
isShowTown
:
false
,
};
},
props
:
{
baseUrl
:
{
type
:
String
,
default
:
""
},
rank
:
{
type
:
Number
|
String
,
default
:
4
}
},
created
()
{
// localStorage.setItem('baseUrl',this.baseUrl);
this
.
getProvinceData
();
},
methods
:
{
async
getProvinceData
()
{
await
getProvinceList
().
then
(
res
=>
{
if
(
res
.
code
===
"000000"
)
{
this
.
areaList
.
provinceList
=
res
.
data
.
provinceList
;
this
.
areaList
.
provinceList
.
map
(
a
=>
{
if
(
a
.
provinceId
==
this
.
value
.
provinceId
)
{
a
.
selected
=
true
;
}
});
}
});
},
async
getCityData
(
provinceId
)
{
await
getCityList
({
provinceId
:
provinceId
}).
then
(
res
=>
{
if
(
res
.
code
===
"000000"
)
{
this
.
areaList
.
cityList
=
res
.
data
.
cityList
;
this
.
areaList
.
cityList
.
map
(
a
=>
{
if
(
a
.
cityId
==
this
.
value
.
cityId
)
{
a
.
selected
=
true
;
}
});
}
});
},
async
getCountyData
(
cityId
)
{
await
getCountyList
({
cityId
:
cityId
}).
then
(
res
=>
{
if
(
res
.
code
===
"000000"
)
{
this
.
areaList
.
countyList
=
res
.
data
.
countyList
;
this
.
areaList
.
countyList
.
map
(
a
=>
{
if
(
a
.
countyId
==
this
.
value
.
countyId
)
{
a
.
selected
=
true
;
}
});
}
});
},
async
getTownData
(
countyId
)
{
await
getTownList
({
countyId
:
countyId
}).
then
(
res
=>
{
if
(
res
.
code
===
"000000"
)
{
this
.
areaList
.
townList
=
res
.
data
.
townList
;
this
.
areaList
.
townList
.
map
(
a
=>
{
if
(
a
.
townId
==
this
.
value
.
townId
)
{
a
.
selected
=
true
;
}
});
}
});
},
// provinceCallback(provinceId) {
// this.getCityData(provinceId);
// },
// cityCallback(cityId) {
// this.getCountyData(cityId);
// },
// countryCallback(countyId) {
// this.getTownData(countyId);
// },
//选择省份的操作
provinceSelect
(
item
,
idx
)
{
this
.
value
.
provinceId
=
item
.
provinceId
;
this
.
value
.
provinceName
=
item
.
provinceName
;
this
.
value
.
patientAddress
=
""
;
this
.
value
.
cityId
=
null
;
this
.
value
.
cityName
=
""
;
this
.
value
.
countyId
=
null
;
this
.
value
.
countyName
=
""
;
this
.
value
.
townId
=
null
;
this
.
value
.
townName
=
""
;
//控制省市县乡数据展示与隐藏
this
.
isShowProvince
=
false
;
this
.
isShowCounty
=
false
;
this
.
isShowTown
=
false
;
if
(
this
.
rank
>
1
)
{
this
.
isShowCity
=
true
;
this
.
getCityData
(
this
.
value
.
provinceId
);
this
.
isDisabled
=
true
;
}
else
{
this
.
isDisabled
=
false
;
}
// 当前选中的样式
this
.
areaList
.
provinceList
.
map
(
a
=>
(
a
.
selected
=
false
));
this
.
areaList
.
provinceList
[
idx
].
selected
=
true
;
},
//选择市的操作
citySelect
(
item
,
idx
)
{
this
.
value
.
cityId
=
item
.
cityId
;
this
.
value
.
cityName
=
item
.
cityName
;
this
.
value
.
patientAddress
=
""
;
this
.
value
.
countyId
=
null
;
this
.
value
.
countyName
=
""
;
this
.
value
.
townId
=
null
;
this
.
value
.
townName
=
""
;
//控制省市县乡数据展示与隐藏
this
.
isShowProvince
=
false
;
this
.
isShowCity
=
false
;
this
.
isShowTown
=
false
;
if
(
this
.
rank
>
2
)
{
this
.
isShowCounty
=
true
;
this
.
getCountyData
(
this
.
value
.
cityId
);
this
.
isDisabled
=
true
;
}
else
{
this
.
isDisabled
=
false
;
}
// 当前选中的样式
this
.
areaList
.
cityList
.
map
(
a
=>
(
a
.
selected
=
false
));
this
.
areaList
.
cityList
[
idx
].
selected
=
true
;
},
//选择区/县的操作
countySelect
(
item
,
idx
)
{
this
.
value
.
countyId
=
item
.
countyId
;
this
.
value
.
countyName
=
item
.
countyName
;
this
.
value
.
townId
=
null
;
this
.
value
.
townName
=
""
;
this
.
value
.
patientAddress
=
""
;
//控制省市县乡数据展示与隐藏
this
.
isShowProvince
=
false
;
this
.
isShowCity
=
false
;
this
.
isShowCounty
=
false
;
if
(
this
.
rank
>
3
)
{
this
.
isShowTown
=
true
;
this
.
getTownData
(
this
.
value
.
countyId
);
this
.
isDisabled
=
true
;
}
else
{
this
.
isDisabled
=
false
;
}
// 当前选中的样式
this
.
areaList
.
countyList
.
map
(
a
=>
(
a
.
selected
=
false
));
this
.
areaList
.
countyList
[
idx
].
selected
=
true
;
},
//选择乡镇的操作
townSelect
(
item
,
idx
)
{
this
.
value
.
townId
=
item
.
townId
;
this
.
value
.
townName
=
item
.
townName
;
this
.
value
.
patientAddress
=
`
${
this
.
value
.
provinceName
}${
this
.
value
.
cityName
}${
this
.
value
.
countyName
}${
this
.
value
.
townName
}
`
;
// 当前选中的样式
this
.
areaList
.
townList
.
map
(
a
=>
(
a
.
selected
=
false
));
this
.
areaList
.
townList
[
idx
].
selected
=
true
;
this
.
isDisabled
=
false
;
},
tabAddressClick
(
tab
)
{
if
(
tab
===
1
)
{
this
.
isShowProvince
=
true
;
this
.
isShowCity
=
false
;
this
.
isShowCounty
=
false
;
this
.
isShowTown
=
false
;
}
else
if
(
tab
===
2
)
{
this
.
isShowProvince
=
false
;
this
.
isShowCity
=
true
;
this
.
isShowCounty
=
false
;
this
.
isShowTown
=
false
;
}
else
if
(
tab
===
3
)
{
this
.
isShowProvince
=
false
;
this
.
isShowCity
=
false
;
this
.
isShowCounty
=
true
;
this
.
isShowTown
=
false
;
}
else
if
(
tab
===
4
)
{
this
.
isShowProvince
=
false
;
this
.
isShowCity
=
false
;
this
.
isShowCounty
=
false
;
this
.
isShowTown
=
true
;
}
},
confirm
()
{
this
.
$emit
(
"confirm"
,
this
.
value
);
},
cancelSelect
()
{
this
.
$emit
(
"cancel"
,
false
);
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
.select-wrapper {
font-family: PingFangSC-Regular;
.mask {
position: fixed;
z-index: 1000;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: rgba(55, 56, 57, 0.6);
}
.address-wrap {
position: absolute;
width: 100%;
height: 293px;
background-color: #ffffff;
box-sizing: border-box;
bottom: 0;
left: 0;
right: 0;
.tip-header {
position: relative;
height: 58px;
line-height: 58px;
width: 100%;
font-size: 17px;
display: flex;
justify-content: space-between;
padding: 0 15px;
box-sizing: border-box;
.cancel-btn {
color: #999;
}
h3 {
font-size: 18px;
color: #373839;
font-weight: 400;
}
.submit-btn {
font-size: 17px;
outline: none;
border: 1px solid transparent;
background-color: transparent;
color: #449284 !important;
&:disabled {
color: #c7c8c9;
}
}
}
.address-select {
width: 100%;
height: auto;
/*height: 196px;*/
box-sizing: border-box;
.show-address-header {
width: 100%;
display: -webkit-box;
display: -webkit-flex;
display: flex;
position: relative;
padding-bottom: 4px;
&:after {
content: " ";
position: absolute;
left: 0;
bottom: 0;
right: 0;
height: 1px;
border-bottom: 1px solid #f0f1f2;
color: #f0f1f2;
-webkit-transform-origin: 0 0;
transform-origin: 0 0;
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
}
.item {
display: inline-block;
font-size: 15px;
line-height: 35px;
height: 35px;
padding: 0 15px;
box-sizing: border-box;
max-width: 25%;
text-align: left;
color: #676869;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
position: relative;
&:last-of-type {
padding-right: 15px;
}
&.active {
color: #373839;
font-family: PingFangSC-Medium;
/*font-weight:500;*/
}
&.active:after {
content: " ";
position: absolute;
left: 50%;
bottom: 0;
right: 0;
width: 10px;
height: 3px;
/*border-radius: 2px;*/
border-radius: 30%;
text-align: center;
background-color: #449284;
transform: translateX(-50%);
}
}
}
.address-content {
position: relative;
width: 100%;
height: 100%;
/*height: 196px;*/
overflow: hidden;
box-sizing: border-box;
ul {
width: 100%;
height: 196px;
overflow-y: auto;
box-sizing: border-box;
padding: 10px 13px;
-webkit-overflow-scrolling: touch;
position: static;
-webkit-transform: translateZ(0px);
li {
height: 35px;
line-height: 35px;
font-size: 15px;
width: 100%;
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #676869;
cursor: pointer;
box-sizing: border-box;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
justify-content: space-between;
-webkit-justify-content: space-between;
&.active {
color: #449284;
}
img {
width: 10px;
height: 10px;
}
}
}
}
}
}
}
</
style
>
\ No newline at end of file
components/common/pica-org.vue
浏览文件 @
b454a672
<!-- 选择地区组件 -->
<
template
>
<div
class=
"select-wrapper"
>
<div
class=
"mask"
@
click=
"cancel"
@
touchmove
.
prevent
>
...
...
components/common/pica-process copy.vue
已删除
100644 → 0
浏览文件 @
e0cb42ec
<!-- Tabs组件 -->
<
template
>
<!--
<div
class=
"common-process"
:style=
"
{'justify-content': isMaxed ? 'space-between' : ''}"> -->
<div
class=
"common-process"
>
<span
class=
"bar"
:style=
"
{'width': width, 'background': barColor}">
</span><span
class=
"desc"
>
{{
value
}}{{
unitName
}}
</span>
</div>
</
template
>
<
script
>
export
default
{
props
:
{
maxValue
:
{
type
:
Number
,
default
:
100
},
value
:
{
type
:
Number
,
default
:
80
},
barColor
:
{
type
:
String
,
default
:
'#39AF9A'
},
unitName
:
{
type
:
String
,
default
:
'分钟'
}
},
data
()
{
return
{
isMaxed
:
false
}
},
// computed: {
// width() {
// let ratio = this.value / this.maxValue
// if(ratio >= 9.98) {
// this.isMaxed = true
// } else {
// this.isMaxed = false
// }
// return Math.round(ratio * 300) + 'px'
// }
// },
mounted
()
{
// let maxWidth = window.clien
let
maxWidth
=
375
;
let
ratio
=
this
.
value
/
this
.
maxValue
Math
.
round
(
ratio
*
300
)
+
'px'
},
methods
:
{}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.common-process
{
display
:
flex
;
flex-direction
:
row
;
height
:
20px
;
line-height
:
20px
;
margin
:
12px
15px
;
span
{
height
:
20px
;
display
:
inline-block
;
&
.bar
{
margin-right
:
6px
;
}
&
.desc
{
font-size
:
18px
;
font-weight
:
700
;
// height: 20px;
// line-height: 20px;
color
:
#373839
;
}
}
}
</
style
>
components/common/pica-process.vue
浏览文件 @
b454a672
...
...
@@ -39,7 +39,10 @@ export default {
// scrollWidth offsetWidth
let
clientWidth
=
window
.
outerWidth
||
document
.
body
.
clientWidth
||
document
.
documentElement
.
clientWidth
let
maxWidth
=
clientWidth
-
this
.
valueDescWidth
let
ratio
=
this
.
value
/
this
.
maxValue
let
ratio
=
1
if
(
this
.
value
&&
this
.
value
<
this
.
maxValue
)
{
ratio
=
this
.
value
/
this
.
maxValue
}
this
.
maxPocessWidth
=
Math
.
round
(
ratio
*
maxWidth
)
+
'px'
},
methods
:
{}
...
...
@@ -52,7 +55,6 @@ export default {
flex-direction
:
row
;
height
:
20px
;
line-height
:
20px
;
// margin: 12px 15px;
span
{
height
:
20px
;
display
:
inline-block
;
...
...
package.json
浏览文件 @
b454a672
...
...
@@ -18,7 +18,7 @@
"
koa
"
:
"
^2.6.2
"
,
"
nuxt
"
:
"
^2.0.0
"
,
"
v-charts
"
:
"
^1.19.0
"
,
"
vant
"
:
"
^2.
0.9
"
"
vant
"
:
"
^2.
2.13
"
},
"devDependencies"
:
{
"
@nuxtjs/axios
"
:
"
^5.5.4
"
,
...
...
pages/index.vue
浏览文件 @
b454a672
...
...
@@ -2,8 +2,8 @@
<section
class=
"container"
>
<CommonHeader></CommonHeader>
<CommonAreaSelect
@
areaClick=
"areaTabClick"
@
orgClick=
"orgTabClick"
></CommonAreaSelect>
<CommonTaps
@
tabClicked=
"tabClicked"
></CommonTaps>
<CommonTaps
@
tabClicked=
"tabClicked"
></CommonTaps>
<!--
<CommonTapsVant
@
tabClicked=
"tabClicked"
></CommonTapsVant>
-->
<!-- 总体概况 -->
<article
v-if=
"cIndex === 0"
>
<CommonSwiperItem></CommonSwiperItem>
...
...
@@ -41,7 +41,7 @@
</article>
<!-- 考试分析 -->
<article
v-if=
"cIndex === 3"
style=
"padding-top: 4px;"
>
<article
v-if=
"cIndex === 3"
>
<CommonCard></CommonCard>
<CommonSplitLine></CommonSplitLine>
<CommonTitle
title=
"完成项目考试次数情况"
></CommonTitle>
...
...
@@ -54,7 +54,7 @@
</article>
<!-- 学习效果分析 -->
<article
v-if=
"cIndex === 4"
style=
"padding-top: 4px;"
>
<article
v-if=
"cIndex === 4"
>
<CommonCard
:needBG=
"needBG"
:cardList=
"cardList"
></CommonCard>
<CommonSplitLine></CommonSplitLine>
<CommonTitle
title=
"不同学历完成项目前后正确率对比"
></CommonTitle>
...
...
@@ -90,6 +90,7 @@ import CommonAreaSelect from "@/components/common/common-area-select";
import
ProcessBar
from
"@/components/common/pica-process"
;
import
CourseTimes
from
"@/components/bussiness/course-times"
;
import
CommonCard
from
"@/components/common/common-card"
;
import
CommonTapsVant
from
"@/components/common/common-tabs-vant"
;
export
default
{
components
:
{
...
...
@@ -111,7 +112,8 @@ export default {
ProcessBar
,
CourseTimes
,
CommonCard
,
ChartColumnVertical
ChartColumnVertical
,
CommonTapsVant
},
data
()
{
return
{
...
...
plugins/vue-inject.js
浏览文件 @
b454a672
import
Vue
from
'vue'
import
rocNative
from
'@/utils/jsbridge'
import
echarts
from
'echarts'
import
Vant
from
'vant'
// import 'vant/lib/vant-css/index.css'
Vue
.
use
(
Vant
)
// import picaArea from 'pica-area'
// Vue.use(picaArea)
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录