Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
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
紫光云
web-project
Commits
9ccd942b
Commit
9ccd942b
authored
Jul 02, 2024
by
小费同学阿
💬
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
c6cc6d6b
07969539
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
145 additions
and
113 deletions
+145
-113
dashboard.ts
src/api/dashboard/dashboard.ts
+6
-0
ConstructionNature.vue
...iews/dashboard/analysis/components/ConstructionNature.vue
+2
-5
EnterpriseProject.vue
...views/dashboard/analysis/components/EnterpriseProject.vue
+131
-103
GrowCard.vue
src/views/dashboard/analysis/components/GrowCard.vue
+1
-0
VisitSource.vue
src/views/dashboard/analysis/components/VisitSource.vue
+5
-4
index.vue
src/views/dashboard/analysis/index.vue
+0
-1
No files found.
src/api/dashboard/dashboard.ts
View file @
9ccd942b
...
...
@@ -14,6 +14,8 @@ enum Api {
// 形象进度占比
progress
=
'/pro/gateway/progress'
,
// 企业项目数量排行
comapnyList
=
'/pro/gateway/company-list'
,
}
export
const
getList
=
(
params
?:
ProjectParams
)
=>
...
...
@@ -44,6 +46,10 @@ export const getProgress = (params?: ProjectParams) =>
defHttp
.
get
<
ProjectListGetResultModel
>
(
{
url
:
Api
.
progress
,
params
})
export
const
getComapnyList
=
(
params
?:
ProjectParams
)
=>
defHttp
.
get
<
ProjectListGetResultModel
>
(
{
url
:
Api
.
comapnyList
})
...
...
src/views/dashboard/analysis/components/ConstructionNature.vue
View file @
9ccd942b
...
...
@@ -79,10 +79,7 @@ onMounted( async ()=>{
// show: true,
// top: '40%',
// right: 'right',
show
:
true
,
orient
:
'vertical'
,
top
:
'center'
,
right
:
'7%'
,
bottom
:
10
,
icon
:
'rect'
,
itemGap
:
30
,
itemWidth
:
20
,
...
...
@@ -98,7 +95,7 @@ onMounted( async ()=>{
{
type
:
"pie"
,
radius
:
[
80
,
100
],
center
:
[
"
35%"
,
"6
0%"
],
center
:
[
"
50%"
,
"5
0%"
],
itemStyle
:
{
color
:
(
params
)
=>
{
return
colorList
[
params
.
dataIndex
];
...
...
src/views/dashboard/analysis/components/EnterpriseProject.vue
View file @
9ccd942b
...
...
@@ -6,9 +6,139 @@
</Card>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
Ref
,
ref
,
watch
}
from
'vue'
;
import
{
Ref
,
ref
,
watch
,
onMounted
}
from
'vue'
;
import
{
Card
}
from
'ant-design-vue'
;
import
{
useECharts
}
from
'@/hooks/web/useECharts'
;
import
{
getComapnyList
}
from
"@/api/dashboard/dashboard"
const
loading
=
ref
(
true
)
onMounted
(
async
()
=>
{
const
data
=
await
getComapnyList
()
console
.
log
(
data
,
"企业项目数量排行"
)
if
(
data
){
loading
.
value
=
false
}
let
number
=
data
.
number
let
title
=
data
.
title
// 将 number 和 title 组合成一个对象数组
let
arr
=
number
.
map
((
num
,
index
)
=>
({
num
,
title
:
title
[
index
]
}));
// 对数组按照 num 从大到小排序
arr
.
sort
((
a
,
b
)
=>
b
.
num
-
a
.
num
);
// 提取排序后的 title 数组
let
sortedTitle
=
arr
.
map
(
item
=>
item
.
title
);
let
sortedNumber
=
arr
.
map
(
item
=>
item
.
num
);
setOptions
({
backgroundColor
:
"#fff"
,
grid
:
{
left
:
'2%'
,
right
:
'2%'
,
bottom
:
'2%'
,
top
:
'2%'
,
containLabel
:
true
},
tooltip
:
{
trigger
:
'axis'
,
axisPointer
:
{
type
:
'none'
},
formatter
:
function
(
params
)
{
return
params
[
0
].
name
+
' : '
+
params
[
0
].
value
}
},
xAxis
:
{
show
:
false
,
type
:
'value'
},
yAxis
:
[{
type
:
'category'
,
inverse
:
true
,
axisLabel
:
{
//设置字体大小
show
:
true
,
formatter
:
function
(
value
)
{
const
charPerLine
=
6
;
// 每行显示的字符数
let
result
=
''
;
for
(
let
i
=
0
;
i
<
value
.
length
;
i
+=
charPerLine
)
{
if
(
i
+
charPerLine
<
value
.
length
)
{
result
+=
value
.
substring
(
i
,
i
+
charPerLine
)
+
'
\
n'
;
}
else
{
result
+=
value
.
substring
(
i
);
}
}
return
result
;
},
textStyle
:
{
//设置字体大小
fontSize
:
10
,
color
:
'#000'
},
},
splitLine
:
{
show
:
false
},
axisTick
:
{
show
:
false
},
axisLine
:
{
show
:
false
},
data
:
sortedTitle
// data:['1','2','3','4','5','6','7','8','9','10']
},
{
type
:
'category'
,
inverse
:
true
,
axisTick
:
'none'
,
axisLine
:
'none'
,
show
:
true
,
axisLabel
:
{
textStyle
:
{
color
:
'#ffffff'
,
fontSize
:
'12'
},
},
data
:
sortedNumber
}],
series
:
[{
name
:
'值'
,
type
:
'bar'
,
zlevel
:
1
,
itemStyle
:
{
normal
:
{
barBorderRadius
:
30
,
color
:
'#FF7A8C'
,
//设置字体颜色
// color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
// offset: 0,
// color: 'rgb(57,89,255,1)'
// }, {
// offset: 1,
// color: 'rgb(46,200,207,1)'
// }]),
},
},
barWidth
:
20
,
data
:
sortedNumber
},
{
name
:
'背景'
,
type
:
'bar'
,
barWidth
:
20
,
barGap
:
'-100%'
,
data
:
sortedNumber
,
itemStyle
:
{
normal
:
{
color
:
'#fff'
,
barBorderRadius
:
30
,
}
},
},
]
});
})
const
props
=
defineProps
({
loading
:
Boolean
,
...
...
@@ -24,106 +154,4 @@ const props = defineProps({
const
chartRef
=
ref
<
HTMLDivElement
|
null
>
(
null
);
const
{
setOptions
}
=
useECharts
(
chartRef
as
Ref
<
HTMLDivElement
>
);
watch
(
()
=>
props
.
loading
,
()
=>
{
if
(
props
.
loading
)
{
return
;
}
setOptions
({
backgroundColor
:
"#fff"
,
grid
:
{
left
:
'2%'
,
right
:
'2%'
,
bottom
:
'2%'
,
top
:
'2%'
,
containLabel
:
true
},
tooltip
:
{
trigger
:
'axis'
,
axisPointer
:
{
type
:
'none'
},
formatter
:
function
(
params
)
{
return
params
[
0
].
name
+
' : '
+
params
[
0
].
value
}
},
xAxis
:
{
show
:
false
,
type
:
'value'
},
yAxis
:
[{
type
:
'category'
,
inverse
:
true
,
axisLabel
:
{
show
:
true
,
textStyle
:
{
color
:
'#000'
},
},
splitLine
:
{
show
:
false
},
axisTick
:
{
show
:
false
},
axisLine
:
{
show
:
false
},
data
:
[
"A公司"
,
"B公司"
,
"C公司"
,
"D公司"
,
"E公司"
,
"F公司"
,
"H公司"
,
"G公司"
,
"K公司"
,
"W公司"
]
},
{
type
:
'category'
,
inverse
:
true
,
axisTick
:
'none'
,
axisLine
:
'none'
,
show
:
true
,
axisLabel
:
{
textStyle
:
{
color
:
'#ffffff'
,
fontSize
:
'12'
},
},
data
:[
239
,
181
,
154
,
144
,
135
,
117
,
74
,
72
,
67
,
55
]
}],
series
:
[{
name
:
'值'
,
type
:
'bar'
,
zlevel
:
1
,
itemStyle
:
{
normal
:
{
barBorderRadius
:
30
,
color
:
'#FF7A8C'
,
//设置字体颜色
// color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
// offset: 0,
// color: 'rgb(57,89,255,1)'
// }, {
// offset: 1,
// color: 'rgb(46,200,207,1)'
// }]),
},
},
barWidth
:
20
,
data
:
[
239
,
181
,
154
,
144
,
135
,
117
,
74
,
72
,
67
,
55
]
},
{
name
:
'背景'
,
type
:
'bar'
,
barWidth
:
20
,
barGap
:
'-100%'
,
data
:
[
239
,
239
,
239
,
239
,
239
,
239
,
239
,
239
,
239
,
239
],
itemStyle
:
{
normal
:
{
color
:
'#fff'
,
barBorderRadius
:
30
,
}
},
},
]
});
},
{
immediate
:
true
},
);
</
script
>
src/views/dashboard/analysis/components/GrowCard.vue
View file @
9ccd942b
...
...
@@ -197,6 +197,7 @@ function getPercentage(nowNumber:number,laetNumer:number) {
dataShow
.
content
=
(
Math
.
abs
(
nowNumber
-
laetNumer
))
/
nowNumber
*
100
dataShow
.
state
=
1
}
dataShow
.
content
=
dataShow
.
content
.
toFixed
(
2
)
return
dataShow
;
}
...
...
src/views/dashboard/analysis/components/VisitSource.vue
View file @
9ccd942b
...
...
@@ -100,9 +100,10 @@ onMounted( async ()=>{
chat
.
setOption
({
legend
:
{
show
:
true
,
orient
:
'vertical'
,
top
:
'center'
,
right
:
'7%'
,
// orient: 'vertical',
// top: 'center',
// right: '7%',
bottom
:
10
,
icon
:
'rect'
,
itemGap
:
30
,
itemWidth
:
20
,
...
...
@@ -118,7 +119,7 @@ onMounted( async ()=>{
{
type
:
"pie"
,
radius
:
[
80
,
100
],
center
:
[
"
30%"
,
"6
0%"
],
center
:
[
"
50%"
,
"4
0%"
],
itemStyle
:
{
color
:
(
params
)
=>
{
return
colorList
[
params
.
dataIndex
];
...
...
src/views/dashboard/analysis/index.vue
View file @
9ccd942b
...
...
@@ -25,7 +25,6 @@
import
Adderss
from
"@/views/dashboard/analysis/components/Adderss.vue"
;
import
EnterpriseProject
from
"@/views/dashboard/analysis/components/EnterpriseProject.vue"
;
const
loading
=
ref
(
true
);
setTimeout
(()
=>
{
...
...
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