Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vue3portal
Project
Project
Details
Activity
Releases
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
wuhao
vue3portal
Commits
ddba1c75
Commit
ddba1c75
authored
Aug 17, 2023
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asder
parent
86cad5fb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
89 deletions
+86
-89
layout.vue
src/viewsCN/dashboardC/layout.vue
+7
-7
echart-hill.vue
...sCN/dashboardC/portlet/echarts-hill-group/echart-hill.vue
+68
-81
vite.config.js
vite.config.js
+11
-1
No files found.
src/viewsCN/dashboardC/layout.vue
View file @
ddba1c75
...
...
@@ -2,7 +2,7 @@
* @Author: wuhao930406 1148547900@qq.com
* @Date: 2023-08-16 11:24:18
* @LastEditors: wuhao930406 1148547900@qq.com
* @LastEditTime: 2023-08-17 1
4:10:38
* @LastEditTime: 2023-08-17 1
7:01:37
* @FilePath: /vue3portal/src/viewsCN/dashboardC/layout.vue
* @Description:
*
...
...
@@ -35,13 +35,13 @@ const comps = {
const
state
=
reactive
({
systemTitleConfig
:
{
ani
:
true
,
ani
:
true
,
width
:
800
,
dur
:
6
,
gradientReverse
:
true
,
decoration
:
true
,
decorationColorAlt
:
true
,
gradientBG
:
true
,
gradientBG
:
true
,
},
panelTitleConfig
:
{
...
...
@@ -112,14 +112,14 @@ const state = reactive({
},
{
id
:
"l3"
,
title
:
"活跃
教师
榜"
,
component
:
"echart
BarHorizScro
ll"
,
title
:
"活跃
学生
榜"
,
component
:
"echart
Hi
ll"
,
border
:
"blank"
,
},
{
id
:
"l1"
,
title
:
"
行业收入占比
"
,
component
:
"echart
Hi
ll"
,
title
:
"
活跃教师榜
"
,
component
:
"echart
BarHorizScro
ll"
,
border
:
"blank"
,
},
],
...
...
src/viewsCN/dashboardC/portlet/echarts-hill-group/echart-hill.vue
View file @
ddba1c75
<!--
* @Author: wuhao930406 1148547900@qq.com
* @Date: 2023-08-08 09:18:08
* @LastEditors: wuhao930406 1148547900@qq.com
* @LastEditTime: 2023-08-17 17:10:48
* @FilePath: /vue3portal/src/viewsCN/dashboardC/portlet/echarts-hill-group/echart-hill.vue
* @Description:
*
* Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
-->
<
script
setup
>
import
symbols
from
"./svg"
const
state
=
reactive
({
chartData
:{
xAxis
:
[
'软件'
,
'硬件'
,
'服务'
,
'安全'
,
'广告'
,
'专利'
,
'许可'
,
'投资'
],
colors
:[
$c
.
aql4
,
$c
.
cbl4
,
$c
.
aql3
,],
data
:
[
23
,
40
,
15
,
12
,
9
,
7
,
12
,
5
],
symbolSize
:[
[
20
,
20
],
[
18
,
20
],
[
18
,
20
],
[
18
,
20
],
[
20
,
14
],
[
16
,
20
],
[
20
,
20
],
[
20
,
20
],
]
import
{
http
}
from
"@/api/request"
;
const
state
=
reactive
({
chartData
:
{
legend
:
[
'活跃学生榜'
],
colors
:
[
$c
.
bll4
,
$c
.
aql4
,
$c
.
ipl3
,
$c
.
cbl3
,],
},
chartOption
:
{
}
chartOption
:
{
}
})
const
processData
=
()
=>
{
let
{
colors
,
xAxis
,
data
,
symbolSize
}
=
state
.
chartData
,
processedData
=
[],
subData
=
[]
data
.
forEach
((
item
,
i
)
=>
{
subData
.
push
({
value
:
data
[
i
],
symbol
:
symbols
[
'svg'
+
i
],
symbolSize
:
symbolSize
[
i
]
})
})
processedData
.
push
({
name
:
'hill'
,
type
:
'pictorialBar'
,
barCategoryGap
:
'-130%'
,
// symbol: 'path://M0,10 L10,10 L5,0 L0,10 z',
symbol
:
'path://M0,10 L10,10 C5.5,10 5.5,5 5,0 C4.5,5 4.5,10 0,10 z'
,
itemStyle
:
{
opacity
:
0.5
},
emphasis
:
{
const
processData
=
(
dataList
)
=>
{
let
legend
=
state
.
chartData
.
legend
,
colors
=
state
.
chartData
.
colors
,
processedData
=
[]
legend
.
forEach
((
item
,
i
)
=>
{
processedData
.
push
({
name
:
legend
[
i
],
type
:
'line'
,
barWidth
:
10
,
label
:
{
show
:
false
,
position
:
'insideRight'
},
itemStyle
:
{
opacity
:
1
}
},
data
:
data
,
z
:
10
},
{
name
:
'glyph'
,
type
:
'pictorialBar'
,
barGap
:
'-100%'
,
symbolPosition
:
'end'
,
symbolSize
:
50
,
symbolOffset
:
[
0
,
'-120%'
],
data
:
subData
color
:
colors
[
i
],
borderRadius
:
5
},
data
:
dataList
?.
map
((
item
)
=>
{
return
item
.
count
;
})
})
})
state
.
chartOption
.
series
=
processedData
;
state
.
chartOption
.
xAxis
.
data
=
xAxis
;
state
.
chartOption
.
series
=
processedData
;
state
.
chartOption
.
xAxis
.
data
=
dataList
?.
map
(
it
=>
it
.
userName
);
state
.
chartOption
.
legend
.
data
=
legend
;
state
.
chartOption
.
legend
.
show
=
false
;
}
const
processOption
=
()
=>
{
const
{
colors
}
=
state
.
chartData
state
.
chartOption
=
{
update
:
false
,
title
:{
text
:
"单位:万元"
,
right
:
0
,
top
:
0
,
textStyle
:{
fontSize
:
16
,
fontWeight
:
"normal"
},
},
const
processOption
=
(
dataList
)
=>
{
state
.
chartOption
=
{
update
:
true
,
// title:{ text:"barA", left:200, top:0, textStyle:{ color:$c.gyl3, fontSize:16, fontWeight:"normal" }, },
tooltip
:
{
trigger
:
'axis'
,
axisPointer
:
{
type
:
'none'
},
formatter
:
function
(
params
)
{
return
params
[
0
].
name
+
': '
+
params
[
0
].
value
;
type
:
'shadow'
}
},
legend
:
{
show
:
true
,
data
:
[],
top
:
0
,
right
:
10
,
},
// toolbox: { feature: { magicType: { type: ['line', 'bar'] } }, },
grid
:
{
left
:
'
5%
'
,
right
:
'
8%
'
,
bottom
:
'
8
%'
,
left
:
'
16px
'
,
right
:
'
16px
'
,
bottom
:
'
5
%'
,
top
:
"25%"
,
containLabel
:
true
},
yAxis
:
{
type
:
'value'
,
splitNumber
:
3
,
axisLabel
:
{
show
:
false
}
axisLabel
:
{
align
:
'right'
},
},
xAxis
:
{
type
:
'category'
,
boundaryGap
:
true
,
data
:
[],
axisTick
:
{
show
:
false
},
axisLine
:
{
show
:
false
,
},
splitLine
:
{
show
:
false
,
},
axisLabel
:
{
align
:
'center'
}
axisLabel
:
{
align
:
'center'
},
},
color
:
colors
,
series
:
[]
}
processData
()
processData
(
dataList
)
}
onMounted
(()
=>
{
processOption
();
//processOption();
http
(
"POST"
,
"/index/statistics/studentVisit"
,
{}).
then
((
res
)
=>
{
processOption
(
res
?.
data
?.
dataList
);
})
})
</
script
>
<
template
>
<echartsInit
:chartOption=
"state.chartOption"
></echartsInit>
</
template
>
<
style
lang=
"less"
>
</
style
>
<
style
lang=
"less"
></
style
>
vite.config.js
View file @
ddba1c75
/*
* @Author: wuhao930406 1148547900@qq.com
* @Date: 2023-08-08 09:18:08
* @LastEditors: wuhao930406 1148547900@qq.com
* @LastEditTime: 2023-08-17 17:11:38
* @FilePath: /vue3portal/vite.config.js
* @Description:
*
* Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
*/
import
{
defineConfig
}
from
"vite"
;
import
vue
from
"@vitejs/plugin-vue"
;
import
path
from
"path"
;
export
default
defineConfig
({
server
:
{
host
:
"1
27.0.0.1
"
,
host
:
"1
92.168.40.100
"
,
proxy
:
{
"/vstp/"
:
{
target
:
"http://192.168.40.117:8044/vstp"
,
...
...
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