Commit 08b96681 by wangdongchen

Merge branch 'wdc' into '20210819'

Wdc

See merge request vue-project/liangXing/frontEnd!13
parents 090b0950 26bc0a1b
<template>
<div class="managePlatform-right">
<title-line :con="'师资/课程/活动'"></title-line>
<!-- 师资力量 -->
<div class="faculty">
<div class="teachernum">
<div class="teacherTitle">师资力量</div>
<div class="minTitle">师资力量</div>
<pie-chart :option="eduConfig.option" />
</div>
<div class="staff">
<bar-chart :option="staffConfig.option" />
</div>
</div>
<!-- 教学课程 -->
<div class="course">
<div class="coursetitle">
<div class="left">教学课程</div>
<div class="minTitle">教学课程</div>
<div class="seemore">查看更多</div>
</div>
<p class="percent">
<span>课程数</span>
<span>学习总时长</span>
<span>出勤率</span>
<span>课程数<count-to :endVal="120" /></span>
<span>学习总时长<count-to :endVal="1248" /></span>
<span>出勤率<count-to :endVal="88" suffix="%"/></span>
</p>
<div class="line">
<bar-chart :option="lineConfig.option" />
<bar-chart :layout="lineConfig.layout" :option="lineConfig.option" />
</div>
</div>
<!-- 学习内容 -->
<div class="learnContent">
<div class="minTitle">学习内容</div>
<bar-chart style="margin-top:13px" :layout="learnConfig.layout" :option="learnConfig.option" />
</div>
<!-- 活动开展 -->
<div class='activ'>
<active />
......@@ -120,12 +127,12 @@ export default {
},
data () {
return {
// 师资力量
eduConfig: {},
edu: [
{ value: 168, name: '教师数' }
],
staffConfig: {},
// 师资数据
staff: [
{
name: '****教授',
......@@ -141,6 +148,7 @@ export default {
value: 12
}
],
// 教学课程
lineConfig: {},
line: [
{
......@@ -151,10 +159,38 @@ export default {
value: 68
}
],
genderPercent: {
male: '32%',
female: '68%'
// 学习内容
learnConfig: {},
learn: [
{
name: '**学习',
value: 65
},
{
name: '**学习',
value: 25
},
{
name: '**学习',
value: 85
},
{
name: '**学习',
value: 70
},
{
name: '**学习',
value: 100
},
{
name: '**学习',
value: 40
},
{
name: '**学习',
value: 45
}
],
swiperOption: {
mousewheel: true,
centeredSlides: true,
......@@ -188,11 +224,134 @@ export default {
this.getstaff()
this.getEdu()
this.getline()
this.getlearn()
},
methods: {
// 学习内容
getlearn () {
const xData = this.learn.map(v => v.name)
const Data = this.learn.map(v => v.value)
this.learnConfig = {
layout: {
width: '100%',
height: '136px'
},
option: {
base: {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'line' // 默认为直线,可选为:'line' | 'shadow'
},
textStyle: {
color: '#ffffff'
},
backgroundColor: 'rgba(55, 128, 246, 0.2)',
borderColor: 'rgba(55, 128, 246, 0.2)'
},
grid: {
left: 0,
right: 0,
bottom: 0,
top: 10,
containLabel: true
},
xAxis: {
type: 'category',
axisTick: {
show: false
},
axisLine: {
show: false,
lineStyle: {
color: 'rgba(17, 63, 116, 1)'
}
},
splitLine: {
show: false
},
axisLabel: {
show: true,
fontSize: 14,
color: '#469CCC'
},
data: xData
},
yAxis: [{
type: 'value',
max: 'dataMax',
axisLine: {
show: true,
lineStyle: {
color: 'rgba(17, 63, 116, 1)'
}
},
splitLine: {
show: true,
lineStyle: {
color: 'rgba(17, 63, 116, 1)'
}
},
axisTick: {
show: false
},
axisLabel: {
formatter: '{value}%',
textStyle: {
fontSize: 14,
fontFamily: 'Century Gothic',
fontWeight: 400,
color: '#469CCC'
}
},
boundaryGap: ['20%', '20%']
}]
},
seriesData: [
{
type: 'bar',
barWidth: 6,
itemStyle: {
color: new this.echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 1,
color: '#24E8FF'
},
{
offset: 0,
color: '#00BEFf'
}
]),
shadowOffsetY: 0,
shadowOffsetX: 0,
barBorderRadius: [3, 3, 0, 0]
},
label: {
show: false
},
data: Data
}
]
}
}
},
// 教学课程百分比
getline () {
this.lineConfig = {
layout: {
width: '100%',
height: '31px'
},
option: {
base: {
grid: {
left: 0,
right: 0,
bottom: 0,
top: 0,
containLabel: true
}
},
seriesData: [
{
name: 'A',
......@@ -200,30 +359,38 @@ export default {
stack: 'Tik Tok',
barWidth: 25,
itemStyle: {
color: 'rgba(0, 190, 255, .3)',
shadowOffsetY: 0,
shadowOffsetX: 0,
barBorderRadius: [2, 0, 0, 2]
barBorderRadius: [5, 0, 0, 5]
},
label: {
normal: {
show: true,
position: 'insideRight',
offset: [-20, 0],
formatter: '{c}%',
textStyle: {
offset: [-40, 2],
formatter: function (params) {
return '{a|' + params.name + '}{b|' + params.value + '%}'
},
rich: {
a: {
color: '#fff',
align: 'center',
baseline: 'middle',
fontSize: 14,
fontWeight: '400',
fontFamily: 'Microsoft YaHei',
fontWeight: '400'
},
b: {
color: '#fff',
textShadowColor: '#000',
textShadowBlur: '0',
textShadowOffsetX: 1,
textShadowOffsetY: 1
align: 'center',
fontSize: 24,
fontFamily: 'Century Gothic',
fontWeight: '400'
}
}
}
},
data: [32]
data: [this.line[0]]
},
{
name: 'B',
......@@ -231,29 +398,38 @@ export default {
stack: 'Tik Tok',
barWidth: 25,
itemStyle: {
color: 'rgba(0, 222, 125, .3)',
shadowOffsetY: 0,
shadowOffsetX: 0
shadowOffsetX: 0,
barBorderRadius: [0, 5, 5, 0]
},
label: {
normal: {
show: true,
position: 'insideRight',
offset: [-20, 0],
formatter: '{c}%',
textStyle: {
offset: [-40, 2],
formatter: function (params) {
return '{a|' + params.name + '}{b|' + params.value + '%}'
},
rich: {
a: {
color: '#fff',
align: 'center',
baseline: 'middle',
fontSize: 14,
fontWeight: '400',
fontFamily: 'Microsoft YaHei',
fontWeight: '400'
},
b: {
color: '#fff',
textShadowColor: '#000',
textShadowBlur: '0',
textShadowOffsetX: 1,
textShadowOffsetY: 1
align: 'center',
fontSize: 24,
fontFamily: 'Century Gothic',
fontWeight: '400'
}
}
}
},
data: [68]
data: [this.line[1]]
}
]
}
......@@ -273,12 +449,6 @@ export default {
name: '师资力量',
itemStyle: {
normal: {
label: {
show: false
},
labelLine: {
show: false
},
shadowBlur: 0,
shadowColor: '#3EB8F7'
}
......@@ -338,6 +508,7 @@ export default {
}
}
},
// 师资力量
getstaff () {
this.staffConfig = {
option: {
......@@ -361,6 +532,12 @@ export default {
<style lang="less">
.managePlatform-right {
height: 500px;
.minTitle {
font-size: 18px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #ffffff;
}
.faculty {
margin-top: 7px;
height: 156px;
......@@ -368,12 +545,6 @@ export default {
.teachernum {
width: 134px;
height: 100%;
.teacherTitle {
font-size: 18px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #ffffff;
}
}
.staff {
margin-top: 47px;
......@@ -386,12 +557,6 @@ export default {
.coursetitle {
display: flex;
justify-content: space-between;
.left {
font-size: 18px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #ffffff;
}
.seemore {
width: 94px;
cursor: pointer;
......@@ -412,31 +577,21 @@ export default {
font-family: Microsoft YaHei;
font-weight: 400;
color: #6dcdff;
span{
font-size: 26px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #fff;
}
}
}
.line {
margin-top: 12px;
display: flex;
margin-top: 5px;
margin-bottom: 4px;
span {
width: 0%;
height: 31px;
transition: width linear 300ms;
&.male {
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
background-color: #00beff;
opacity: 0.5;
}
&.female {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
background-color: #00de7d;
opacity: 0.5;
}
margin-top: 12px;
}
}
.learnContent{
height: 178px;
}
// 活动开展
.activ{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment