Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
glsk-data-view-pd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9188fecd
authored
Jul 14, 2023
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加空数据组件
1 parent
866f93bf
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
102 additions
and
14 deletions
src/assets/images/empty.png
src/components/Empty.vue
src/components/Ranking.vue
src/views/home/solar/PurchaseProgress.vue
src/views/home/solar/PurchasePropertion.vue
src/views/home/solar/StorageContent.vue
src/views/solarDetail/index.vue
src/assets/images/empty.png
0 → 100644
View file @
9188fec
73 KB
src/components/Empty.vue
0 → 100644
View file @
9188fec
<
template
>
<div
class=
"empty-box"
>
<div>
<img
src=
"../assets/images/empty.png"
class=
"empty-img"
alt=
""
/>
</div>
<div
class=
"empty-text"
>
暂无数据
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
'Empty'
,
data
()
{
return
{}
},
mounted
()
{},
methods
:
{}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.empty-box
{
text-align
:
center
;
}
.empty-img
{
width
:
11.11vw
;
height
:
5.98vh
;
}
.empty-text
{
font-weight
:
400
;
font-size
:
12px
;
color
:
#C9C9C9
;
}
</
style
>
src/components/Ranking.vue
View file @
9188fec
...
...
@@ -68,7 +68,7 @@ export default {
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
padding-bottom
:
4px
;
padding-bottom
:
0.89vh
;
box-sizing
:
border-box
;
&-left
{
display
:
flex
;
...
...
src/views/home/solar/PurchaseProgress.vue
View file @
9188fec
<
template
>
<div
class=
"purchase-progress-box"
>
<box-title
title=
"商城采购进度分析"
></box-title>
<RightViewContent
class=
"content-box"
:chart=
"progressChart"
:listData=
"progressData"
:legentList=
"progressLegend"
:legendColors=
"progressChart.colors"
></RightViewContent>
<RightViewContent
v-if=
"progressData.length"
class=
"content-box"
:chart=
"progressChart"
:listData=
"progressData"
:legentList=
"progressLegend"
:legendColors=
"progressChart.colors"
></RightViewContent>
<div
v-else
class=
"empty"
>
<Empty></Empty>
</div>
</div>
</
template
>
...
...
@@ -74,5 +77,10 @@ export default {
.content-box
{
padding
:
2.78vh
1.39vw
2.78vh
0
;
}
.empty
{
height
:
21.67vh
;
display
:
flex
;
align-items
:
center
;
}
}
</
style
>
src/views/home/solar/PurchasePropertion.vue
View file @
9188fec
<
template
>
<div
class=
"purchase-propertion-box"
>
<box-title
title=
"商城采购额商品占比"
></box-title>
<RightViewContent
class=
"content-box"
:chart=
"propertionChart"
:listData=
"propertionData"
:legentList=
"propertionLegend"
:legendColors=
"propertionChart.colors"
></RightViewContent>
<RightViewContent
v-if=
"propertionData.length"
class=
"content-box"
:chart=
"propertionChart"
:listData=
"propertionData"
:legentList=
"propertionLegend"
:legendColors=
"propertionChart.colors"
></RightViewContent>
<div
v-else
class=
"empty"
>
<Empty></Empty>
</div>
</div>
</
template
>
...
...
@@ -77,5 +80,10 @@ export default {
.content-box
{
padding
:
2.78vh
1.39vw
2.78vh
0
;
}
.empty
{
height
:
21.67vh
;
display
:
flex
;
align-items
:
center
;
}
}
</
style
>
src/views/home/solar/StorageContent.vue
View file @
9188fec
<
template
>
<div
class=
"storage-box"
>
<box-title
title=
"入库使用情况"
></box-title>
<pie-chart
:id=
"chart.id"
:keys=
"chart.keys"
:list=
"listData"
:height=
"chart.height"
:colors=
"chart.colors"
></pie-chart>
<Legend
class=
"legend"
:list=
"listData"
:legentList=
"legentList"
:colors=
"chart.colors"
></Legend>
<div
v-if=
"listData.length"
>
<pie-chart
:id=
"chart.id"
:keys=
"chart.keys"
:list=
"listData"
:height=
"chart.height"
:colors=
"chart.colors"
></pie-chart>
<Legend
class=
"legend"
:list=
"listData"
:legentList=
"legentList"
:colors=
"chart.colors"
></Legend>
</div>
<div
v-else
class=
"empty"
>
<Empty></Empty>
</div>
</div>
</
template
>
...
...
@@ -58,11 +63,16 @@ export default {
<
style
lang=
"scss"
scoped
>
.storage-box
{
width
:
19.72vw
;
height
:
32vh
;
box-shadow
:
inset
0
0
20px
0
#3d57ff69
;
.legend
{
padding
:
0.96vh
2.78vw
0
;
}
width
:
19.72vw
;
height
:
32vh
;
box-shadow
:
inset
0
0
20px
0
#3d57ff69
;
.legend
{
padding
:
0.96vh
2.78vw
0
;
}
.empty
{
height
:
28.67vh
;
display
:
flex
;
align-items
:
center
;
}
}
</
style
>
src/views/solarDetail/index.vue
View file @
9188fec
...
...
@@ -33,11 +33,31 @@
<div
class=
"propotion-box flex"
>
<div
class=
"propotion-box-left"
>
<box-title
title=
"商城采购商品占比"
></box-title>
<RightViewContent
class=
"content-box"
:chart=
"shopmallChart"
:listData=
"shopmallData"
:legentList=
"shopmallLegend"
:legendColors=
"shopmallChart.colors"
></RightViewContent>
<RightViewContent
v-if=
"shopmallData.length"
class=
"content-box"
:chart=
"shopmallChart"
:listData=
"shopmallData"
:legentList=
"shopmallLegend"
:legendColors=
"shopmallChart.colors"
></RightViewContent>
<div
v-else
class=
"empty"
>
<Empty></Empty>
</div>
</div>
<div
class=
"propotion-box-right"
>
<box-title
title=
"自采商品占比"
></box-title>
<RightViewContent
class=
"content-box"
:chart=
"selfPickChart"
:listData=
"selfPickData"
:legentList=
"selfPickLegend"
:legendColors=
"selfPickChart.colors"
></RightViewContent>
<RightViewContent
v-if=
"selfPickData.length"
class=
"content-box"
:chart=
"selfPickChart"
:listData=
"selfPickData"
:legentList=
"selfPickLegend"
:legendColors=
"selfPickChart.colors"
></RightViewContent>
<div
v-else
class=
"empty"
>
<Empty></Empty>
</div>
</div>
</div>
</div>
...
...
@@ -168,7 +188,7 @@ export default {
init
()
{
console
.
log
(
this
.
$route
.
query
,
'999'
)
this
.
merchantList
=
this
.
$store
.
state
.
app
.
merchantRankingList
console
.
log
(
this
.
merchantList
,
'this.merchantList'
)
;
console
.
log
(
this
.
merchantList
,
'this.merchantList'
)
this
.
businessTime
=
this
.
$store
.
state
.
app
.
solarTime
this
.
businessYear
=
this
.
$store
.
state
.
app
.
solarYear
const
{
merchantid
,
merchantname
}
=
this
.
$route
.
query
...
...
@@ -261,6 +281,11 @@ export default {
.content-box
{
padding
:
1.78vh
6.18vw
4.44vh
0
;
}
.empty
{
height
:
22vh
;
display
:
flex
;
align-items
:
center
;
}
}
}
.legend
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment