Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
ZhangJianFrontEnd
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vue-project
ZhangJian
ZhangJianFrontEnd
Commits
c70297a4
Commit
c70297a4
authored
Aug 10, 2021
by
yangqingjie
Browse files
Options
Browse Files
Download
Plain Diff
update
parents
e206b832
08b96681
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
806 additions
and
292 deletions
+806
-292
README.md
README.md
+22
-0
package.json
package.json
+1
-1
CountRoll.vue
src/components/CountRoll.vue
+198
-0
index.js
src/index.js
+1
-0
Left.vue
src/pages/index/Left.vue
+13
-4
PopupFrame.vue
src/pages/index/PopupFrame.vue
+100
-0
Right.vue
src/pages/index/Right.vue
+417
-85
active.vue
src/pages/index/active.vue
+0
-192
index.vue
src/pages/index/index.vue
+51
-7
index.js
src/public/apis/index.js
+3
-3
No files found.
README.md
View file @
c70297a4
## 两星(张謇) - 前端大屏
## 两星(张謇) - 前端大屏
#### 添加依赖runner(git子包仓库)
```
js
初始化子包仓库
`npm run init`
后续更新子包仓库
-
初始化已包含
,
无需再次执行
`npm run update`
开发环境
`npm run dev`
打包部署
`npm run build`
```
### 页面名称
```
```
\ No newline at end of file
package.json
View file @
c70297a4
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
"lint"
:
"eslint --ext .js --ext .jsx --ext .vue client/"
,
"lint"
:
"eslint --ext .js --ext .jsx --ext .vue client/"
,
"lint-fix"
:
"eslint --fix --ext .js --ext .jsx --ext .vue src/ widgets/"
,
"lint-fix"
:
"eslint --fix --ext .js --ext .jsx --ext .vue src/ widgets/"
,
"precommit"
:
"npm run lint-fix"
,
"precommit"
:
"npm run lint-fix"
,
"init"
:
"git submodule update --init --recursive"
,
"init"
:
"git submodule update --init --recursive
&& npm run update && npm install
"
,
"update"
:
"git submodule update --recursive --remote --merge --force"
"update"
:
"git submodule update --recursive --remote --merge --force"
},
},
"author"
:
""
,
"author"
:
""
,
...
...
src/components/CountRoll.vue
0 → 100644
View file @
c70297a4
<
template
>
<div
class=
"chartNum"
>
<div
:class=
"isMin ? 'box-item-min' : 'box-item'"
>
<li
v-for=
"(item,index) in orderNum"
:class=
"
{'number-item': !isNaN(item), 'mark-item': isNaN(item) }" :key="index">
<span
v-if=
"!isNaN(item)"
>
<i
ref=
"numberItem"
>
0123456789
</i>
</span>
<span
class=
"comma"
v-else
>
{{
item
}}
</span>
</li>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
'CountRoll'
,
props
:
{
count
:
Number
,
isMin
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{
orderNum
:
[]
}
},
mounted
()
{
this
.
toOrderNum
(
this
.
count
)
this
.
increaseNumber
()
},
deactivated
()
{
clearInterval
(
this
.
timer
)
},
methods
:
{
// TODO: 定时器
increaseNumber
()
{
this
.
timer
=
setInterval
(()
=>
{
this
.
setNumberTransform
()
},
300
)
},
// TODO:设置文字滚动
setNumberTransform
()
{
const
numberItems
=
this
.
$refs
.
numberItem
// 拿到数字的ref,计算元素数量
const
numberArr
=
this
.
orderNum
.
filter
(
item
=>
!
isNaN
(
item
))
// 结合CSS 对数字字符进行滚动
for
(
let
index
=
0
;
index
<
numberItems
.
length
;
index
++
)
{
const
elem
=
numberItems
[
index
]
elem
.
style
.
transform
=
`translate(-50%, -
${
numberArr
[
index
]
*
10
}
%)`
}
clearInterval
(
this
.
timer
)
},
// TODO: 处理数字
toOrderNum
(
num
)
{
num
=
this
.
utils
.
formatNumber
(
num
,
num
.
length
)
this
.
orderNum
=
num
// 将其便变成数据,渲染至滚动数组
}
}
}
</
script
>
<
style
scoped
lang=
'less'
>
.chartNum
{
.box-item
{
position
:
relative
;
font-size
:
36px
;
line-height
:
48px
;
text-align
:
center
;
list-style
:
none
;
color
:
#FFFFFF
;
writing-mode
:
vertical-lr
;
text-orientation
:
upright
;
/* 默认逗号设置 */
.mark-item
{
width
:
20px
;
height
:
48px
;
border
:
1px
solid
#2B79BC
;
margin-right
:
5px
;
line-height
:
10px
;
font-size
:
36px
;
position
:
relative
;
&
>
span
{
position
:
absolute
;
width
:
100%
;
bottom
:
4px
;
left
:
-2px
;
writing-mode
:
vertical-rl
;
text-orientation
:
upright
;
}
}
/*滚动数字设置*/
.number-item
{
width
:
30px
;
height
:
48px
;
display
:
flex
;
list-style
:
none
;
margin-right
:
5px
;
border-radius
:
4px
;
border
:
1px
solid
#2B79BC
;
color
:
#FFFFFF
;
&
>
span
{
position
:
relative
;
display
:
inline-block
;
margin-right
:
10px
;
width
:
100%
;
height
:
100%
;
writing-mode
:
vertical-rl
;
text-orientation
:
upright
;
overflow
:
hidden
;
&
>
i
{
font-style
:
normal
;
position
:
absolute
;
top
:
6px
;
left
:
50%
;
transform
:
translate
(
-50%
,
0
);
transition
:
transform
1s
ease-in-out
;
letter-spacing
:
10px
;
color
:
#FFFFFF
;
}
}
}
.number-item
:last-child
{
margin-right
:
0
;
}
.comma
{
bottom
:
4px
;
}
}
.box-item-min
{
position
:
relative
;
font-size
:
28px
;
line-height
:
36px
;
text-align
:
center
;
list-style
:
none
;
color
:
#FFFFFF
;
writing-mode
:
vertical-lr
;
text-orientation
:
upright
;
/* 默认逗号设置 */
.mark-item
{
width
:
24px
;
height
:
36px
;
border
:
1px
solid
#2B79BC
;
margin-right
:
8px
;
line-height
:
10px
;
font-size
:
28px
;
position
:
relative
;
&
>
span
{
position
:
absolute
;
width
:
100%
;
bottom
:
4px
;
left
:
-2px
;
writing-mode
:
vertical-rl
;
text-orientation
:
upright
;
}
}
/*滚动数字设置*/
.number-item
{
width
:
24px
;
height
:
36px
;
display
:
flex
;
list-style
:
none
;
margin-right
:
8px
;
border-radius
:
4px
;
border
:
1px
solid
#2B79BC
;
color
:
#FFFFFF
;
&
>
span
{
position
:
relative
;
display
:
inline-block
;
margin-right
:
10px
;
width
:
100%
;
height
:
100%
;
writing-mode
:
vertical-rl
;
text-orientation
:
upright
;
overflow
:
hidden
;
&
>
i
{
font-style
:
normal
;
position
:
absolute
;
top
:
2px
;
left
:
50%
;
transform
:
translate
(
-50%
,
0
);
transition
:
transform
1s
ease-in-out
;
letter-spacing
:
10px
;
color
:
#FFFFFF
;
}
}
}
.number-item
:last-child
{
margin-right
:
0
;
}
.comma
{
bottom
:
4px
;
}
}
}
</
style
>
src/index.js
View file @
c70297a4
...
@@ -2,6 +2,7 @@ import Vue from 'vue'
...
@@ -2,6 +2,7 @@ import Vue from 'vue'
import
VueRouter
from
'vue-router'
import
VueRouter
from
'vue-router'
import
Vuex
from
'vuex'
import
Vuex
from
'vuex'
import
App
from
'./App.vue'
import
App
from
'./App.vue'
import
'./public/apis'
import
createStore
from
'./store'
// Vuex
import
createStore
from
'./store'
// Vuex
import
createRouter
from
'./router/router'
import
createRouter
from
'./router/router'
import
UsePlugin
from
'runner/common/plugins'
import
UsePlugin
from
'runner/common/plugins'
...
...
src/pages/index/Left.vue
View file @
c70297a4
...
@@ -131,6 +131,15 @@ export default {
...
@@ -131,6 +131,15 @@ export default {
}
}
},
},
props
:
{
leftData
:
{
type
:
Object
,
default
()
{
return
{}
}
}
},
data
()
{
data
()
{
return
{
return
{
// 男女学员数量
// 男女学员数量
...
@@ -405,15 +414,15 @@ export default {
...
@@ -405,15 +414,15 @@ export default {
mounted
()
{
mounted
()
{
this
.
init
()
this
.
init
()
this
.
getAge
()
this
.
getEdu
()
this
.
getIndustry
()
this
.
changeDegree
(
'participate'
)
},
},
methods
:
{
methods
:
{
init
()
{
init
()
{
this
.
dealGender
()
this
.
dealGender
()
this
.
getAge
()
this
.
getEdu
()
this
.
getIndustry
()
this
.
changeDegree
(
'participate'
)
},
},
// 求性别百分比
// 求性别百分比
dealGender
()
{
dealGender
()
{
...
...
src/pages/index/PopupFrame.vue
0 → 100644
View file @
c70297a4
<
template
>
<div
class=
"PopupFrame"
v-if=
"visible"
>
<div
class=
"iframe"
>
<div
class=
"title"
>
<span>
{{
title
}}
</span>
</div>
<div
class=
"close"
@
click=
"closeBullet"
></div>
<div
class=
"content"
>
<!-- 内容部分 -->
<slot></slot>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
'PopupFrame'
,
data
()
{
return
{
}
},
props
:
{
visible
:
{
type
:
Boolean
,
default
:
false
},
title
:
''
},
components
:
{
},
methods
:
{
// 关闭弹出框
closeBullet
()
{
this
.
$emit
(
'beforeClose'
,
1
)
}
}
}
</
script
>
<
style
lang=
"less"
>
.PopupFrame
{
position
:
fixed
;
width
:
100%
;
height
:
100%
;
left
:
0
;
top
:
0
;
z-index
:
101
;
background-color
:
rgba
(
0
,
0
,
0
,
0.6
);
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
.iframe
{
width
:
1280px
;
height
:
721px
;
position
:
relative
;
padding
:
0
30px
;
background
:
red
;
//
background
:
url('../../static/images/bulletFrame-bg.png')
no-repeat
-36px
-23px
;
.title
{
width
:
1090px
;
height
:
38px
;
text-align
:
center
;
margin
:
0
auto
;
span
{
font-size
:
22px
;
font-family
:
Source
Han
Sans
CN
;
font-weight
:
bold
;
color
:
#ffffff
;
line-height
:
22px
;
background
:
linear-gradient
(
0deg
,
#a3dcff
0%
,
#ffffff
100%
);
-webkit-background-clip
:
text
;
-webkit-text-fill-color
:
transparent
;
position
:
relative
;
top
:
7px
;
}
}
.content
{
margin-top
:
15px
;
}
.close
{
width
:
24px
;
height
:
24px
;
//
background
:
url('../../static/images/bulletFrame-close.png')
//
no-repeat
left
top
;
position
:
absolute
;
top
:
13px
;
right
:
13px
;
cursor
:
pointer
;
}
}
}
</
style
>
\ No newline at end of file
src/pages/index/Right.vue
View file @
c70297a4
<
template
>
<
template
>
<div
class=
"managePlatform-right"
>
<div
class=
"managePlatform-right"
>
<title-line
:con=
"'师资/课程/活动'"
></title-line>
<title-line
:con=
"'师资/课程/活动'"
></title-line>
<!-- 师资力量 -->
<div
class=
"faculty"
>
<div
class=
"faculty"
>
<div
class=
"teachernum"
>
<div
class=
"teachernum"
>
<div
class=
"
teacher
Title"
>
师资力量
</div>
<div
class=
"
min
Title"
>
师资力量
</div>
<pie-chart
:option=
"eduConfig.option"
/>
<pie-chart
:option=
"eduConfig.option"
/>
</div>
</div>
<div
class=
"staff"
>
<div
class=
"staff"
>
<bar-chart
:option=
"staffConfig.option"
/>
<bar-chart
:option=
"staffConfig.option"
/>
</div>
</div>
</div>
</div>
<!-- 教学课程 -->
<div
class=
"course"
>
<div
class=
"course"
>
<div
class=
"coursetitle"
>
<div
class=
"coursetitle"
>
<div
class=
"
left
"
>
教学课程
</div>
<div
class=
"
minTitle
"
>
教学课程
</div>
<div
class=
"seemore"
>
查看更多
</div>
<div
class=
"seemore"
>
查看更多
</div>
</div>
</div>
<p
class=
"percent"
>
<p
class=
"percent"
>
<span>
课程数
</span>
<span>
课程数
<
count-to
:endVal=
"120"
/><
/span>
<span>
学习总时长
</span>
<span>
学习总时长
<
count-to
:endVal=
"1248"
/><
/span>
<span>
出勤率
</span>
<span>
出勤率
<
count-to
:endVal=
"88"
suffix=
"%"
/><
/span>
</p>
</p>
<div
class=
"line"
>
<div
class=
"line"
>
<bar-chart
:option=
"lineConfig.option"
/>
<bar-chart
:
layout=
"lineConfig.layout"
:
option=
"lineConfig.option"
/>
</div>
</div>
</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'
>
<div
class=
'activ'
>
<active
/>
<div
class=
"activity-one"
>
<div
class=
"act"
>
活动开展
</div>
<div
class=
"mor"
@
click=
"getMore"
>
查看更多
<!--
<popup-frame
:option=
"moreConfig.option"
/>
-->
</div>
</div>
<div
class=
"activity-two"
>
<div
class=
"left"
>
<div
class=
"act-left"
>
<count-roll
:count=
"4166"
class=
"act-style"
/><span>
次
</span>
</div>
<p
class=
"act-num"
>
活动开展次数
</p>
</div>
<div
class=
"line"
></div>
<div
class=
"right"
>
<line-bar
:layout=
"activeConfig.layout"
:option=
"activeConfig.option"
/>
</div>
</div>
</div>
</div>
<div
class=
"right-bottom"
>
<div
class=
"right-bottom"
>
<title-line
:con=
"'交流会/专题'"
></title-line>
<title-line
:con=
"'交流会/专题'"
></title-line>
...
@@ -98,6 +127,8 @@
...
@@ -98,6 +127,8 @@
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 活动开展 查看更多的弹出层 -->
</div>
</div>
</
template
>
</
template
>
...
@@ -107,7 +138,9 @@ import { swiper, swiperSlide } from 'vue-awesome-swiper'
...
@@ -107,7 +138,9 @@ import { swiper, swiperSlide } from 'vue-awesome-swiper'
import
'swiper/dist/css/swiper.css'
import
'swiper/dist/css/swiper.css'
import
BarChart
from
'@/components/echarts/BarChart.vue'
import
BarChart
from
'@/components/echarts/BarChart.vue'
import
PieChart
from
'@/components/echarts/PieChart.vue'
import
PieChart
from
'@/components/echarts/PieChart.vue'
import
active
from
'./active'
import
LineBar
from
'@/components/echarts/LineBar'
import
CountRoll
from
'@/components/CountRoll.vue'
import
PopupFrame
from
'./PopupFrame'
export
default
{
export
default
{
name
:
'Right'
,
name
:
'Right'
,
components
:
{
components
:
{
...
@@ -116,16 +149,18 @@ export default {
...
@@ -116,16 +149,18 @@ export default {
PieChart
,
PieChart
,
swiper
,
swiper
,
swiperSlide
,
swiperSlide
,
active
LineBar
,
CountRoll
,
PopupFrame
},
},
data
()
{
data
()
{
return
{
return
{
// 师资力量
eduConfig
:
{},
eduConfig
:
{},
edu
:
[
edu
:
[
{
value
:
168
,
name
:
'教师数'
}
{
value
:
168
,
name
:
'教师数'
}
],
],
staffConfig
:
{},
staffConfig
:
{},
// 师资数据
staff
:
[
staff
:
[
{
{
name
:
'****教授'
,
name
:
'****教授'
,
...
@@ -141,6 +176,7 @@ export default {
...
@@ -141,6 +176,7 @@ export default {
value
:
12
value
:
12
}
}
],
],
// 教学课程
lineConfig
:
{},
lineConfig
:
{},
line
:
[
line
:
[
{
{
...
@@ -151,10 +187,38 @@ export default {
...
@@ -151,10 +187,38 @@ export default {
value
:
68
value
:
68
}
}
],
],
genderPercent
:
{
// 学习内容
male
:
'32%'
,
learnConfig
:
{},
female
:
'68%'
learn
:
[
},
{
name
:
'**学习'
,
value
:
65
},
{
name
:
'**学习'
,
value
:
25
},
{
name
:
'**学习'
,
value
:
85
},
{
name
:
'**学习'
,
value
:
70
},
{
name
:
'**学习'
,
value
:
100
},
{
name
:
'**学习'
,
value
:
40
},
{
name
:
'**学习'
,
value
:
45
}
],
swiperOption
:
{
swiperOption
:
{
mousewheel
:
true
,
mousewheel
:
true
,
centeredSlides
:
true
,
centeredSlides
:
true
,
...
@@ -181,18 +245,155 @@ export default {
...
@@ -181,18 +245,155 @@ export default {
img
:
'../../../static/images/index/topic-bg1.png'
img
:
'../../../static/images/index/topic-bg1.png'
}
}
]
],
// 活动开展
activeConfig
:
{},
activeList
:
[
{
name
:
'*****活动'
,
value
:
192
},
{
name
:
'组织活动'
,
value
:
1103
},
{
name
:
'*****活动'
,
value
:
381
}
],
moreConfig
:
{
props
:
{
visible
:
false
,
title
:
''
}
}
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getstaff
()
this
.
getstaff
()
this
.
getEdu
()
this
.
getEdu
()
this
.
getline
()
this
.
getline
()
this
.
getlearn
()
this
.
getActive
(
this
.
activeList
)
},
},
methods
:
{
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
()
{
getline
()
{
this
.
lineConfig
=
{
this
.
lineConfig
=
{
layout
:
{
width
:
'100%'
,
height
:
'31px'
},
option
:
{
option
:
{
base
:
{
grid
:
{
left
:
0
,
right
:
0
,
bottom
:
0
,
top
:
0
,
containLabel
:
true
}
},
seriesData
:
[
seriesData
:
[
{
{
name
:
'A'
,
name
:
'A'
,
...
@@ -200,30 +401,38 @@ export default {
...
@@ -200,30 +401,38 @@ export default {
stack
:
'Tik Tok'
,
stack
:
'Tik Tok'
,
barWidth
:
25
,
barWidth
:
25
,
itemStyle
:
{
itemStyle
:
{
color
:
'rgba(0, 190, 255, .3)'
,
shadowOffsetY
:
0
,
shadowOffsetY
:
0
,
shadowOffsetX
:
0
,
shadowOffsetX
:
0
,
barBorderRadius
:
[
2
,
0
,
0
,
2
]
barBorderRadius
:
[
5
,
0
,
0
,
5
]
},
},
label
:
{
label
:
{
normal
:
{
normal
:
{
show
:
true
,
show
:
true
,
position
:
'insideRight'
,
position
:
'insideRight'
,
offset
:
[
-
20
,
0
],
offset
:
[
-
40
,
2
],
formatter
:
'{c}%'
,
formatter
:
function
(
params
)
{
textStyle
:
{
return
'{a|'
+
params
.
name
+
'}{b|'
+
params
.
value
+
'%}'
align
:
'center'
,
},
baseline
:
'middle'
,
rich
:
{
fontSize
:
14
,
a
:
{
fontWeight
:
'400'
,
color
:
'#fff'
,
color
:
'#fff'
,
align
:
'center'
,
textShadowColor
:
'#000'
,
fontSize
:
14
,
textShadowBlur
:
'0'
,
fontFamily
:
'Microsoft YaHei'
,
textShadowOffsetX
:
1
,
fontWeight
:
'400'
textShadowOffsetY
:
1
},
b
:
{
color
:
'#fff'
,
align
:
'center'
,
fontSize
:
24
,
fontFamily
:
'Century Gothic'
,
fontWeight
:
'400'
}
}
}
}
}
},
},
data
:
[
32
]
data
:
[
this
.
line
[
0
]
]
},
},
{
{
name
:
'B'
,
name
:
'B'
,
...
@@ -231,29 +440,38 @@ export default {
...
@@ -231,29 +440,38 @@ export default {
stack
:
'Tik Tok'
,
stack
:
'Tik Tok'
,
barWidth
:
25
,
barWidth
:
25
,
itemStyle
:
{
itemStyle
:
{
color
:
'rgba(0, 222, 125, .3)'
,
shadowOffsetY
:
0
,
shadowOffsetY
:
0
,
shadowOffsetX
:
0
shadowOffsetX
:
0
,
barBorderRadius
:
[
0
,
5
,
5
,
0
]
},
},
label
:
{
label
:
{
normal
:
{
normal
:
{
show
:
true
,
show
:
true
,
position
:
'insideRight'
,
position
:
'insideRight'
,
offset
:
[
-
20
,
0
],
offset
:
[
-
40
,
2
],
formatter
:
'{c}%'
,
formatter
:
function
(
params
)
{
textStyle
:
{
return
'{a|'
+
params
.
name
+
'}{b|'
+
params
.
value
+
'%}'
align
:
'center'
,
},
baseline
:
'middle'
,
rich
:
{
fontSize
:
14
,
a
:
{
fontWeight
:
'400'
,
color
:
'#fff'
,
color
:
'#fff'
,
align
:
'center'
,
textShadowColor
:
'#000'
,
fontSize
:
14
,
textShadowBlur
:
'0'
,
fontFamily
:
'Microsoft YaHei'
,
textShadowOffsetX
:
1
,
fontWeight
:
'400'
textShadowOffsetY
:
1
},
b
:
{
color
:
'#fff'
,
align
:
'center'
,
fontSize
:
24
,
fontFamily
:
'Century Gothic'
,
fontWeight
:
'400'
}
}
}
}
}
},
},
data
:
[
68
]
data
:
[
this
.
line
[
1
]
]
}
}
]
]
}
}
...
@@ -273,12 +491,6 @@ export default {
...
@@ -273,12 +491,6 @@ export default {
name
:
'师资力量'
,
name
:
'师资力量'
,
itemStyle
:
{
itemStyle
:
{
normal
:
{
normal
:
{
label
:
{
show
:
false
},
labelLine
:
{
show
:
false
},
shadowBlur
:
0
,
shadowBlur
:
0
,
shadowColor
:
'#3EB8F7'
shadowColor
:
'#3EB8F7'
}
}
...
@@ -338,6 +550,7 @@ export default {
...
@@ -338,6 +550,7 @@ export default {
}
}
}
}
},
},
// 师资力量
getstaff
()
{
getstaff
()
{
this
.
staffConfig
=
{
this
.
staffConfig
=
{
option
:
{
option
:
{
...
@@ -353,6 +566,71 @@ export default {
...
@@ -353,6 +566,71 @@ export default {
}
}
}
}
}
}
},
getActive
(
data
)
{
let
yData
=
data
.
map
(
v
=>
v
.
name
).
reverse
()
let
y2Data
=
data
.
map
(
v
=>
v
.
value
).
reverse
()
let
max
=
4166
let
maxData
=
new
Array
(
data
.
length
).
fill
(
max
)
let
pointData
=
data
.
reverse
().
map
((
v
,
i
)
=>
{
return
{
xAxis
:
v
.
value
,
yAxis
:
i
}
})
this
.
activeConfig
=
{
layout
:
{
width
:
'100%'
,
height
:
'100%'
},
option
:
{
base
:
{
xAxis
:
{
max
:
max
},
yAxis
:
[
{
axisLabel
:
{
color
:
'#fff'
,
align
:
'left'
,
padding
:
[
0
,
0
,
0
,
-
60
]
},
data
:
yData
},
{
data
:
y2Data
.
map
(
v
=>
v
)
}
]
},
seriesData
:
[
{
name
:
'back'
,
barWidth
:
'5px'
,
data
:
maxData
},
{
name
:
'show'
,
barWidth
:
'5px'
,
itemStyle
:
{
borderRadius
:
[
0
,
0
,
0
,
0
],
color
:
'rgba(64, 169, 248, .05)'
},
markPoint
:
{
symbolOffset
:
[
0
,
0.5
],
data
:
pointData
},
data
:
y2Data
}
]
}
}
},
// 查看更多的点击事件
getMore
()
{
console
.
log
(
123
)
this
.
moreConfig
.
option
.
visible
=
true
},
beforeClose
(
msg
)
{
console
.
log
(
msg
)
}
}
}
}
}
}
...
@@ -361,6 +639,12 @@ export default {
...
@@ -361,6 +639,12 @@ export default {
<
style
lang=
"less"
>
<
style
lang=
"less"
>
.managePlatform-right
{
.managePlatform-right
{
height
:
500px
;
height
:
500px
;
.minTitle
{
font-size
:
18px
;
font-family
:
Microsoft
YaHei
;
font-weight
:
400
;
color
:
#ffffff
;
}
.faculty
{
.faculty
{
margin-top
:
7px
;
margin-top
:
7px
;
height
:
156px
;
height
:
156px
;
...
@@ -368,12 +652,6 @@ export default {
...
@@ -368,12 +652,6 @@ export default {
.teachernum
{
.teachernum
{
width
:
134px
;
width
:
134px
;
height
:
100%
;
height
:
100%
;
.teacherTitle
{
font-size
:
18px
;
font-family
:
Microsoft
YaHei
;
font-weight
:
400
;
color
:
#ffffff
;
}
}
}
.staff
{
.staff
{
margin-top
:
47px
;
margin-top
:
47px
;
...
@@ -386,12 +664,6 @@ export default {
...
@@ -386,12 +664,6 @@ export default {
.coursetitle
{
.coursetitle
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
.left
{
font-size
:
18px
;
font-family
:
Microsoft
YaHei
;
font-weight
:
400
;
color
:
#ffffff
;
}
.seemore
{
.seemore
{
width
:
94px
;
width
:
94px
;
cursor
:
pointer
;
cursor
:
pointer
;
...
@@ -412,38 +684,98 @@ export default {
...
@@ -412,38 +684,98 @@ export default {
font-family
:
Microsoft
YaHei
;
font-family
:
Microsoft
YaHei
;
font-weight
:
400
;
font-weight
:
400
;
color
:
#6dcdff
;
color
:
#6dcdff
;
span{
font-size
:
26px
;
font-family
:
Microsoft
YaHei
;
font-weight
:
400
;
color
:
#fff
;
}
}
}
}
}
.line
{
.line
{
height
:
31px
;
margin-top
:
12px
;
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
;
}
}
}
}
}
}
.learnContent
{
height
:
178px
;
}
//
活动开展
//
活动开展
.activ
{
.activ
{
margin-top
:
30px
;
width
:
100%
;
width
:
100%
;
height
:
140px
;
height
:
150px
;
.activity-one{
}
height
:
20px
;
display
:
flex
;
justify-content
:
space-between
;
.act{
width
:
72px
;
height
:
20px
;
margin-top
:
-5px
;
font-size
:
18px
;
font-family
:
Microsoft
YaHei
;
font-weight
:
400
;
color
:
#FFFFFF
;
line-height
:
28px
;
}
.mor
{
width
:
94px
;
height
:
20px
;
cursor
:
pointer
;
font-size
:
16px
;
font-family
:
Microsoft
YaHei
;
font-weight
:
400
;
color
:
#18d1c6
;
background
:
url('../../../static/images/index/more.png')
no-repeat
right
;
}
}
.activity-two
{
margin-top
:
12px
;
display
:
flex
;
justify-content
:
space-between
;
.left{
margin-top
:
10px
;
width
:
150px
;
.act-left{
display
:
flex
;
.act-style{
width
:
150px
;
}
span
{
width
:
16px
;
height
:
17px
;
margin-top
:
22px
;
margin-left
:
12px
;
font-size
:
16px
;
font-family
:
Microsoft
YaHei
;
font-weight
:
400
;
color
:
#FFFFFF
;
line-height
:
35px
;
}
}
.act-num
{
width
:
108px
;
height
:
18px
;
margin-top
:
20px
;
font-size
:
18px
;
font-family
:
Microsoft
YaHei
;
font-weight
:
400
;
color
:
#6DCDFF
;
line-height
:
17px
;
}
}
.line
{
width
:
3px
;
height
:
76px
;
margin
:
10px
0
0
20px
;
background
:
url('../../../static/images/index/3.png')
;
}
.right
{
width
:
270px
;
height
:
100%
;
}
}
}
.right-bottom
{
.right-bottom
{
.topic
{
.topic
{
margin-top
:
19px
;
margin-top
:
19px
;
...
...
src/pages/index/active.vue
deleted
100644 → 0
View file @
e206b832
<
template
>
<!-- 活动开展 -->
<div
class=
"activity"
>
<div
class=
"activity-one"
>
<div
class=
"act"
>
活动开展
</div>
<div
class=
"mor"
@
click=
"getMore"
>
查看更多
</div>
</div>
<div
class=
"activity-two"
>
<div
class=
"left"
>
<div
class=
"act-left"
>
<count-roll
:count=
"4166"
class=
"act-style"
/>
<span>
次
</span>
</div>
<p
class=
"act-num"
>
活动开展次数
</p>
</div>
<div
class=
"line"
></div>
<div
class=
"right"
>
<line-bar
:layout=
"activeConfig.layout"
:option=
"activeConfig.option"
/>
</div>
</div>
</div>
</
template
>
<
script
>
import
LineBar
from
'@/components/echarts/LineBar'
export
default
{
components
:
{
LineBar
},
data
()
{
return
{
// 活动开展
activeConfig
:
{},
activeList
:
[
{
name
:
'*****活动'
,
value
:
192
},
{
name
:
'组织活动'
,
value
:
1103
},
{
name
:
'*****活动'
,
value
:
381
}
]
}
},
mounted
()
{
this
.
getActive
(
this
.
activeList
)
},
methods
:
{
getActive
(
data
)
{
let
yData
=
data
.
map
(
v
=>
v
.
name
).
reverse
()
let
y2Data
=
data
.
map
(
v
=>
v
.
value
).
reverse
()
let
max
=
4166
let
maxData
=
new
Array
(
data
.
length
).
fill
(
max
)
let
pointData
=
data
.
reverse
().
map
((
v
,
i
)
=>
{
return
{
xAxis
:
v
.
value
,
yAxis
:
i
}
})
this
.
activeConfig
=
{
layout
:
{
width
:
'100%'
,
height
:
'100%'
},
option
:
{
base
:
{
xAxis
:
{
max
:
max
},
yAxis
:
[
{
axisLabel
:
{
color
:
'#fff'
,
align
:
'left'
,
padding
:
[
0
,
0
,
0
,
-
60
]
},
data
:
yData
},
{
data
:
y2Data
.
map
(
v
=>
v
)
}
]
},
seriesData
:
[
{
name
:
'back'
,
barWidth
:
'5px'
,
data
:
maxData
},
{
name
:
'show'
,
barWidth
:
'5px'
,
itemStyle
:
{
borderRadius
:
[
0
,
0
,
0
,
0
],
color
:
'rgba(64, 169, 248, .05)'
},
markPoint
:
{
symbolOffset
:
[
0
,
0.5
],
data
:
pointData
},
data
:
y2Data
}
]
}
}
},
// 查看更多的点击事件
getMore
()
{
console
.
log
(
123
)
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
/* 活动开展 */
.activity
{
width
:
100%
;
height
:
140px
;
.activity-one{
height
:
20px
;
display
:
flex
;
justify-content
:
space-between
;
.act{
width
:
72px
;
height
:
20px
;
margin-top
:
-5px
;
font-size
:
18px
;
font-family
:
Microsoft
YaHei
;
font-weight
:
400
;
color
:
#FFFFFF
;
line-height
:
28px
;
}
.mor
{
width
:
94px
;
height
:
20px
;
cursor
:
pointer
;
font-size
:
16px
;
font-family
:
Microsoft
YaHei
;
font-weight
:
400
;
color
:
#18d1c6
;
background
:
url('../../../static/images/index/more.png')
no-repeat
right
;
}
}
.activity-two
{
margin-top
:
12px
;
display
:
flex
;
justify-content
:
space-between
;
.left{
margin-top
:
10px
;
width
:
150px
;
.act-left{
display
:
flex
;
.act-style{
width
:
150px
;
}
span
{
width
:
16px
;
height
:
17px
;
margin-top
:
22px
;
margin-left
:
12px
;
font-size
:
16px
;
font-family
:
Microsoft
YaHei
;
font-weight
:
400
;
color
:
#FFFFFF
;
line-height
:
35px
;
}
}
.act-num
{
width
:
108px
;
height
:
18px
;
margin-top
:
20px
;
font-size
:
18px
;
font-family
:
Microsoft
YaHei
;
font-weight
:
400
;
color
:
#6DCDFF
;
line-height
:
17px
;
}
}
.line
{
width
:
3px
;
height
:
76px
;
margin
:
10px
0
0
20px
;
background
:
url('../../../static/images/index/3.png')
;
}
.right
{
width
:
270px
;
height
:
100%
;
}
}
}
</
style
>
\ No newline at end of file
src/pages/index/index.vue
View file @
c70297a4
...
@@ -2,12 +2,14 @@
...
@@ -2,12 +2,14 @@
<div
class=
"index-page"
>
<div
class=
"index-page"
>
<layout
:layoutConf=
"layoutSize"
>
<layout
:layoutConf=
"layoutSize"
>
<page-head
title=
"张謇教育基地管理平台"
slot=
"header"
/>
<page-head
title=
"张謇教育基地管理平台"
slot=
"header"
/>
<!-- left -->
<template
v-if=
"fetchSuccess"
>
<left
slot=
"left"
/>
<!-- left -->
<!-- center -->
<left
:leftData=
"leftData"
slot=
"left"
/>
<center
slot=
"center"
/>
<!-- center -->
<!-- right -->
<center
:centerData=
"centerData"
slot=
"center"
/>
<right
slot=
"right"
/>
<!-- right -->
<right
:rightData=
"rightData"
slot=
"right"
/>
</
template
>
</layout>
</layout>
</div>
</div>
</template>
</template>
...
@@ -27,7 +29,15 @@ export default {
...
@@ -27,7 +29,15 @@ export default {
center
:
{
center
:
{
width
:
'100%'
width
:
'100%'
}
}
}
},
// 接口获取是否成功标识
fetchSuccess
:
false
,
// 左侧数据
leftData
:
{},
// 中间数据
centerData
:
{},
// 右侧数据
rightData
:
{}
}
}
},
},
...
@@ -35,6 +45,40 @@ export default {
...
@@ -35,6 +45,40 @@ export default {
Left
,
Left
,
Center
,
Center
,
Right
Right
},
mounted
()
{
this
.
init
()
},
methods
:
{
async
init
()
{
try
{
const
data
=
await
this
.
fetch
(
'managePlatform'
)
this
.
fetchSuccess
=
true
// 左侧数据
this
.
leftData
=
{
gender
:
data
.
p1
||
{},
// 男女比例
age
:
data
.
p2
||
{},
// 年龄结构
edu
:
data
.
p3
||
{},
// 学历情况
party
:
data
.
p4
||
{},
// 党派分布
ethnic
:
data
.
p5
||
{},
// 民族分布
industry
:
data
.
p6
||
{},
// 行业分布
participate
:
data
.
p7
||
{},
// 参与度
active
:
data
.
p8
||
{},
// 活跃度
studentDemeanor
:
data
.
p9
||
{},
// 学员风采
starClass
:
data
.
p10
||
{}
// 明星班级
}
// 中间数据
this
.
centerData
=
{
}
// 右侧数据
this
.
rightData
=
{
}
}
catch
(
err
)
{
console
.
log
(
'managePlatform >'
,
err
)
}
}
}
}
}
}
</
script
>
</
script
>
...
...
src/public/apis/index.js
View file @
c70297a4
...
@@ -4,12 +4,12 @@
...
@@ -4,12 +4,12 @@
;(
function
()
{
;(
function
()
{
// 接口请求域名
// 接口请求域名
window
.
domain
=
{
window
.
domain
=
{
stg
:
''
,
// 测试环境域名
stg
:
'
http://192.168.0.121:9000/
'
,
// 测试环境域名
prd
:
''
// 生产环境域名
prd
:
'
http://192.168.0.121:9000/
'
// 生产环境域名
}
}
// 接口请求路径
// 接口请求路径
window
.
apis
=
{
window
.
apis
=
{
managePlatform
:
'api/page1info'
}
}
})()
})()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment