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 bdbc670c
authored
Jul 21, 2023
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v1.0.0' of
http://192.168.3.233:8090/h5/glsk-data-view-pd
into v1.0.0
2 parents
940cf2d0
14ef3fe8
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
93 additions
and
39 deletions
src/components/PieChart.vue
src/components/Ranking.vue
src/components/Tab.vue
src/views/boutique/BoutiqueLeft.vue
src/views/boutique/BoutiqueRight.vue
src/views/boutique/rightCompoments/MerchantsRanking.vue
src/views/boutiqueDetail/GoodsPayPropertion.vue
src/views/boutiqueDetail/GoodsRanking.vue
src/views/boutiqueDetail/GoodsSupplierPropertion.vue
src/views/solar/PurchasePropertion.vue
src/views/solar/PurchaseRank.vue
src/views/solar/RightViewContent.vue
src/views/solarDetail/MerchantsPropotion.vue
src/components/PieChart.vue
View file @
bdbc670
...
@@ -47,8 +47,12 @@ export default {
...
@@ -47,8 +47,12 @@ export default {
default
:
'12px'
default
:
'12px'
},
},
formatter
:
{
formatter
:
{
type
:
Boolean
,
type
:
String
,
default
:
false
default
:
''
},
formatterName
:
{
type
:
String
,
default
:
''
}
}
},
},
...
@@ -133,24 +137,46 @@ export default {
...
@@ -133,24 +137,46 @@ export default {
fontSize
:
this
.
size
,
fontSize
:
this
.
size
,
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
color
:
'#fff'
,
color
:
'#fff'
,
formatter
:
function
(
params
)
{
formatter
:
(
params
)
=>
{
const
_dataIndex
=
params
.
dataIndex
const
_dataIndex
=
params
.
dataIndex
// 价格
const
_purchaseamount
=
utils
.
numAddSymbol
(
_this
.
list
[
_dataIndex
].
purchaseamount
)
const
_purchaseamount
=
utils
.
numAddSymbol
(
_this
.
list
[
_dataIndex
].
purchaseamount
)
// 均价
const
_avarage
=
utils
.
numAddSymbol
(
_this
.
list
[
_dataIndex
].
averprice
)
const
_avarage
=
utils
.
numAddSymbol
(
_this
.
list
[
_dataIndex
].
averprice
)
// const _html = `<div>¥${_purchaseamount}</div><div style="padding-left: 7px;">均价¥ ${_avarage}</div>`
// 总价
if
(
_this
.
formatter
)
return
`{a|¥
${
_purchaseamount
}
}\n{b|均价¥
${
_avarage
}
}`
let
_totalValue
=
0
return
`
${
params
.
name
}
`
_this
.
list
.
forEach
(
item
=>
{
// return _html
_totalValue
+=
item
.
value
})
let
_html
/**
* price -- 价格+均价组合
* total -- 名称+总数组合
* none -- 不显示内容
* 默认显示名称
*/
switch
(
_this
.
formatter
)
{
case
'price'
:
_html
=
`{a|¥
${
_purchaseamount
}
}\n{b|均价¥
${
_avarage
}
}`
break
case
'total'
:
_html
=
`
${
_this
.
formatterName
}
\n
${
_totalValue
}
`
break
case
'none'
:
_html
=
''
break
default
:
_html
=
params
.
name
}
return
_html
},
},
rich
:
{
rich
:
{
a
:
{
a
:
{
color
:
'#c8c8c8'
,
color
:
'#c8c8c8'
,
wordSpacing
:
'5px'
},
},
b
:
{
b
:
{
color
:
'#ffffff66'
,
color
:
'#ffffff66'
,
fontSize
:
'12px'
,
fontSize
:
'12px'
,
// padding: ['7px', 0, 0, 0],
lineHeight
:
'28'
lineHeight
:
'28'
}
}
}
}
...
...
src/components/Ranking.vue
View file @
bdbc670
...
@@ -5,12 +5,12 @@
...
@@ -5,12 +5,12 @@
<template
v-if=
"inx === 0"
>
<template
v-if=
"inx === 0"
>
<div
class=
"ranking-box-item-left"
@
click=
"goDetailPage(item)"
>
<div
class=
"ranking-box-item-left"
@
click=
"goDetailPage(item)"
>
<div
class=
"circle"
:style=
"
{ 'background-image': index
< 3
?
RankColor
[
index
]
:
''
}"
>
{{
index
+
1
}}
</div>
<div
class=
"circle"
:style=
"
{ 'background-image': index
< 3
?
RankColor
[
index
]
:
''
}"
>
{{
index
+
1
}}
</div>
<div
class=
"text"
:style=
"
{ width: itm.width }">
{{
item
[
itm
.
name
]
}}
</div>
<div
class=
"text"
:
class=
"itm.action ? 'action-text' : ''"
:
style=
"
{ width: itm.width }">
{{
item
[
itm
.
name
]
}}
</div>
</div>
</div>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<div
class=
"ranking-box-item-right"
:style=
"
{ width: itm.width, color: itm.color, 'text-align': inx + 1 == rankingDataObj.length ? 'right' : '' }">
<div
class=
"ranking-box-item-right"
:style=
"
{ width: itm.width, color: itm.color, 'text-align': inx + 1 == rankingDataObj.length ? 'right' : '' }">
{{
itm
.
type
==
'number'
?
numAddSymbol
(
item
[
itm
.
name
])
:
itm
.
type
==
'decimal'
?
toPercent
(
item
[
itm
.
name
])
:
item
[
itm
.
name
]
}}
{{
itm
.
preunit
}}{{
itm
.
type
==
'number'
?
numAddSymbol
(
item
[
itm
.
name
])
:
itm
.
type
==
'decimal'
?
toPercent
(
item
[
itm
.
name
])
:
item
[
itm
.
name
]
}}{{
itm
.
sufunit
}}
</div>
</div>
</
template
>
</
template
>
</div>
</div>
...
@@ -91,7 +91,7 @@ export default {
...
@@ -91,7 +91,7 @@ export default {
width
:
17vw
;
width
:
17vw
;
height
:
20px
;
height
:
20px
;
}
}
.text
:hover
{
.
action-
text
:hover
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
//
padding-bottom
:
1px
;
//
padding-bottom
:
1px
;
//
border-bottom
:
1px
solid
#fff
;
//
border-bottom
:
1px
solid
#fff
;
...
@@ -105,10 +105,6 @@ export default {
...
@@ -105,10 +105,6 @@ export default {
font-weight
:
400
;
font-weight
:
400
;
font-size
:
14px
;
font-size
:
14px
;
color
:
#95acd9
;
color
:
#95acd9
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
//
text-align
:
right
;
}
}
}
}
</
style
>
</
style
>
src/components/Tab.vue
View file @
bdbc670
<
template
>
<
template
>
<div
class=
"tab-box"
>
<div
class=
"tab-box"
>
<div
class=
"tab-item-box"
:style=
"
{ width: width + 'vw' }">
<div
class=
"tab-item-box"
:style=
"
{ width: width + 'vw' }">
<div
:class=
"['tab-item', tabActive == index ? 'tab-item-active' : '']"
v-for=
"(item, index) in list"
:key=
"index"
@
click=
"changeTab(index)"
>
<div
:class=
"['tab-item', tabActive == index ? 'tab-item-active' : '']"
:style=
"
{ width: itemWidth + 'vw' }"
v-for="(item, index) in list" :key="index" @click="changeTab(index)">
{{
item
}}
{{
item
}}
</div>
</div>
</div>
</div>
...
@@ -16,7 +16,8 @@ export default {
...
@@ -16,7 +16,8 @@ export default {
type
:
Array
,
type
:
Array
,
default
:
()
=>
[]
default
:
()
=>
[]
},
},
width
:
Number
width
:
Number
,
itemWidth
:
Number
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -47,7 +48,8 @@ export default {
...
@@ -47,7 +48,8 @@ export default {
background-image
:
linear-gradient
(
180deg
,
#001948
0%
,
#00223c
99%
);
background-image
:
linear-gradient
(
180deg
,
#001948
0%
,
#00223c
99%
);
cursor
:
pointer
;
cursor
:
pointer
;
.tab-item
{
.tab-item
{
padding
:
0.56vh
0.9vw
;
padding
:
0.56vh
0
;
text-align
:
center
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
font-weight
:
400
;
font-weight
:
400
;
font-size
:
16px
;
font-size
:
16px
;
...
...
src/views/boutique/BoutiqueLeft.vue
View file @
bdbc670
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<BoutiqueDate
:defaultYear=
"defaultYear"
:yearList=
"yearList"
:channelList=
"channelList"
:businessTime=
"businessTime"
></BoutiqueDate>
<BoutiqueDate
:defaultYear=
"defaultYear"
:yearList=
"yearList"
:channelList=
"channelList"
:businessTime=
"businessTime"
></BoutiqueDate>
<StatisticsBox
:list=
"boutiqueList.slice(0,4)"
></StatisticsBox>
<StatisticsBox
:list=
"boutiqueList.slice(0,4)"
></StatisticsBox>
<StatisticsBox
class=
"sencod-box"
:list=
"boutiqueList.slice(4,9)"
></StatisticsBox>
<StatisticsBox
class=
"sencod-box"
:list=
"boutiqueList.slice(4,9)"
></StatisticsBox>
<Tab
class=
"tab-box"
:list=
"tabList"
:width=
"19.17"
@
changeTab=
"changeTab"
></Tab>
<Tab
class=
"tab-box"
:list=
"tabList"
:width=
"19.17"
:itemWidth=
"10"
@
changeTab=
"changeTab"
></Tab>
<components
class=
"tab-content"
:is=
"tabName"
></components>
<components
class=
"tab-content"
:is=
"tabName"
></components>
</div>
</div>
</
template
>
</
template
>
...
...
src/views/boutique/BoutiqueRight.vue
View file @
bdbc670
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
-->
-->
<
template
>
<
template
>
<div
class=
"right"
>
<div
class=
"right"
>
<Tab
class=
"tab-box"
:list=
"tabList"
:width=
"14.83"
@
changeTab=
"changeTab"
></Tab>
<Tab
class=
"tab-box"
:list=
"tabList"
:width=
"14.83"
:itemWidth=
"7.78"
@
changeTab=
"changeTab"
></Tab>
<components
:is=
"tabName"
></components>
<components
:is=
"tabName"
></components>
</div>
</div>
</
template
>
</
template
>
...
...
src/views/boutique/rightCompoments/MerchantsRanking.vue
View file @
bdbc670
...
@@ -3,23 +3,32 @@
...
@@ -3,23 +3,32 @@
<!-- 第一个盒子 -->
<!-- 第一个盒子 -->
<div
class=
"rank-box"
>
<div
class=
"rank-box"
>
<box-title
title=
"门店产值排名"
></box-title>
<box-title
title=
"门店产值排名"
></box-title>
<div
class=
"content"
>
<div
class=
"content"
v-if=
"storeOutputList.length"
>
<Ranking
:id=
"'storeOutput'"
:rankingsList=
"storeOutputList"
:rankingDataObj=
"rankingDataObj"
@
goDetailPage=
"goDetailPage"
></Ranking>
<Ranking
:id=
"'storeOutput'"
:rankingsList=
"storeOutputList"
:rankingDataObj=
"rankingDataObj"
@
goDetailPage=
"goDetailPage"
></Ranking>
</div>
</div>
<div
v-else
class=
"empty"
>
<Empty></Empty>
</div>
</div>
</div>
<!-- 第二个盒子 -->
<!-- 第二个盒子 -->
<div
class=
"rank-box"
>
<div
class=
"rank-box"
>
<box-title
title=
"门店转化率排行"
></box-title>
<box-title
title=
"门店转化率排行"
></box-title>
<div
class=
"content"
>
<div
class=
"content"
v-if=
"storePercentList.length"
>
<Ranking
:id=
"'storePercent'"
:rankingsList=
"storePercentList"
:rankingDataObj=
"rankPercentObj"
@
goDetailPage=
"goDetailPage"
></Ranking>
<Ranking
:id=
"'storePercent'"
:rankingsList=
"storePercentList"
:rankingDataObj=
"rankPercentObj"
@
goDetailPage=
"goDetailPage"
></Ranking>
</div>
</div>
<div
v-else
class=
"empty"
>
<Empty></Empty>
</div>
</div>
</div>
<!-- 第三个盒子 -->
<!-- 第三个盒子 -->
<div
class=
"rank-box"
>
<div
class=
"rank-box"
>
<box-title
title=
"门店客单价排行"
></box-title>
<box-title
title=
"门店客单价排行"
></box-title>
<div
class=
"content"
>
<div
class=
"content"
v-if=
"storePriceList.length"
>
<Ranking
:id=
"'storePrice'"
:rankingsList=
"storePriceList"
:rankingDataObj=
"rankingDataObj"
@
goDetailPage=
"goDetailPage"
></Ranking>
<Ranking
:id=
"'storePrice'"
:rankingsList=
"storePriceList"
:rankingDataObj=
"rankingDataObj"
@
goDetailPage=
"goDetailPage"
></Ranking>
</div>
</div>
<div
v-else
class=
"empty"
>
<Empty></Empty>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -132,7 +141,8 @@ export default {
...
@@ -132,7 +141,8 @@ export default {
rankingDataObj
:
[
rankingDataObj
:
[
{
{
name
:
'name'
,
name
:
'name'
,
width
:
'9.72vw'
width
:
'9.72vw'
,
action
:
true
},
},
{
{
name
:
'province'
,
name
:
'province'
,
...
@@ -153,7 +163,8 @@ export default {
...
@@ -153,7 +163,8 @@ export default {
rankPercentObj
:
[
rankPercentObj
:
[
{
{
name
:
'name'
,
name
:
'name'
,
width
:
'9.72vw'
width
:
'9.72vw'
,
action
:
true
},
},
{
{
name
:
'province'
,
name
:
'province'
,
...
@@ -206,5 +217,10 @@ export default {
...
@@ -206,5 +217,10 @@ export default {
.content
{
.content
{
padding
:
1.67vh
1.39vw
;
padding
:
1.67vh
1.39vw
;
}
}
.empty
{
height
:
21.78vh
;
display
:
flex
;
align-items
:
center
;
}
}
}
</
style
>
</
style
>
src/views/boutiqueDetail/GoodsPayPropertion.vue
View file @
bdbc670
...
@@ -46,12 +46,14 @@ export default {
...
@@ -46,12 +46,14 @@ export default {
id
:
'goodsPay'
,
id
:
'goodsPay'
,
keys
:
[
'name'
,
'value'
],
keys
:
[
'name'
,
'value'
],
height
:
'15.34vh'
,
height
:
'15.34vh'
,
colors
:
[
'#34AFFF'
,
'#16E193'
,
'#FFC200'
]
colors
:
[
'#34AFFF'
,
'#16E193'
,
'#FFC200'
],
formatter
:
'total'
,
formatterName
:
'支付订单'
},
},
goodsPayLegend
:
[
goodsPayLegend
:
[
{
{
name
:
'name'
,
name
:
'name'
,
width
:
'
5
vw'
width
:
'
4
vw'
},
},
{
{
name
:
'rate'
,
name
:
'rate'
,
...
...
src/views/boutiqueDetail/GoodsRanking.vue
View file @
bdbc670
<
template
>
<
template
>
<div
class=
"goods-rank-box"
>
<div
class=
"goods-rank-box"
>
<box-title
title=
"商品销售排行"
></box-title>
<box-title
title=
"商品销售排行"
></box-title>
<div
v-if=
"goodsRankingList.length"
>
<div
v-if=
"goodsRankingList.length"
class=
"content"
>
<Ranking
:id=
"'storePrice'"
:rankingsList=
"goodsRankingList"
:rankingDataObj=
"goodsRankingDataObj"
></Ranking>
<Ranking
:id=
"'storePrice'"
:rankingsList=
"goodsRankingList"
:rankingDataObj=
"goodsRankingDataObj"
></Ranking>
</div>
</div>
<div
v-else
class=
"empty"
>
<div
v-else
class=
"empty"
>
...
@@ -38,21 +38,27 @@ export default {
...
@@ -38,21 +38,27 @@ export default {
price
:
95489
price
:
95489
},
},
{
{
name
:
'低价只想隔热G70 前挡'
,
name
:
'低价只想隔热
低价只想隔热
G70 前挡'
,
value
:
80
,
value
:
80
,
price
:
95489
price
:
95489
}
}
],
],
goodsRankingDataObj
:
[
goodsRankingDataObj
:
[
{
{
name
:
'name'
name
:
'name'
,
width
:
'14.58vw'
},
},
{
{
name
:
'value'
name
:
'value'
,
color
:
'#C0C0C0'
,
width
:
'3vw'
,
sufunit
:
'单'
},
},
{
{
name
:
'price'
,
name
:
'price'
,
type
:
'number'
type
:
'number'
,
width
:
'5vw'
,
preunit
:
'¥'
}
}
]
]
}
}
...
@@ -70,6 +76,9 @@ export default {
...
@@ -70,6 +76,9 @@ export default {
background
:
#061422
;
background
:
#061422
;
box-shadow
:
inset
0
0
20px
0
#3d57ff69
;
box-shadow
:
inset
0
0
20px
0
#3d57ff69
;
height
:
25.11vh
;
height
:
25.11vh
;
.content
{
padding
:
1.67vh
1.39vw
;
}
.empty
{
.empty
{
height
:
21.78vh
;
height
:
21.78vh
;
display
:
flex
;
display
:
flex
;
...
...
src/views/boutiqueDetail/GoodsSupplierPropertion.vue
View file @
bdbc670
...
@@ -40,7 +40,9 @@ export default {
...
@@ -40,7 +40,9 @@ export default {
id
:
'boutiquePropertion'
,
id
:
'boutiquePropertion'
,
keys
:
[
'name'
,
'value'
],
keys
:
[
'name'
,
'value'
],
height
:
'15.34vh'
,
height
:
'15.34vh'
,
colors
:
[
'#16E193'
,
'#34AFFF'
]
colors
:
[
'#16E193'
,
'#34AFFF'
],
formatter
:
'total'
,
formatterName
:
'总商品数'
},
},
propertionLegend
:
[
propertionLegend
:
[
{
{
...
...
src/views/solar/PurchasePropertion.vue
View file @
bdbc670
...
@@ -26,7 +26,7 @@ export default {
...
@@ -26,7 +26,7 @@ export default {
keys
:
[
'goodsname'
,
'purchaseamount'
],
keys
:
[
'goodsname'
,
'purchaseamount'
],
height
:
'17.34vh'
,
height
:
'17.34vh'
,
colors
:
[
'#16E193'
,
'#747DFF'
,
'#E588FF'
,
'#34AFFF'
,
'#FFC200'
,
'#EB6001'
],
colors
:
[
'#16E193'
,
'#747DFF'
,
'#E588FF'
,
'#34AFFF'
,
'#FFC200'
,
'#EB6001'
],
formatter
:
true
formatter
:
'price'
},
},
// 采购占比数据
// 采购占比数据
propertionData
:
[],
propertionData
:
[],
...
...
src/views/solar/PurchaseRank.vue
View file @
bdbc670
...
@@ -62,7 +62,8 @@ export default {
...
@@ -62,7 +62,8 @@ export default {
merchantsDataObj
:
[
merchantsDataObj
:
[
{
{
name
:
'merchantname'
,
name
:
'merchantname'
,
width
:
'20.3vw'
width
:
'20.3vw'
,
action
:
true
},
},
{
{
name
:
'num'
,
name
:
'num'
,
...
...
src/views/solar/RightViewContent.vue
View file @
bdbc670
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
-->
-->
<
template
>
<
template
>
<div
class=
"main-box"
>
<div
class=
"main-box"
>
<pie-chart
class=
"pie-chart"
:id=
"chart.id"
:list=
"listData"
:keys=
"chart.keys"
:formatter=
"chart.formatter"
:height=
"chart.height"
:colors=
"chart.colors"
></pie-chart>
<pie-chart
class=
"pie-chart"
:id=
"chart.id"
:list=
"listData"
:keys=
"chart.keys"
:formatter=
"chart.formatter"
:
formatterName=
"chart.formatterName"
:
height=
"chart.height"
:colors=
"chart.colors"
></pie-chart>
<Legend
class=
"legend"
:list=
"listData"
:legentList=
"legentList"
:colors=
"legendColors"
></Legend>
<Legend
class=
"legend"
:list=
"listData"
:legentList=
"legentList"
:colors=
"legendColors"
></Legend>
</div>
</div>
</
template
>
</
template
>
...
...
src/views/solarDetail/MerchantsPropotion.vue
View file @
bdbc670
...
@@ -56,7 +56,7 @@ export default {
...
@@ -56,7 +56,7 @@ export default {
keys
:
[
'goodsname'
,
'purchaseamount'
],
keys
:
[
'goodsname'
,
'purchaseamount'
],
height
:
'18vh'
,
height
:
'18vh'
,
colors
:
[
'#16E193'
,
'#747DFF'
,
'#E588FF'
,
'#34AFFF'
,
'#FFC200'
,
'#EB6001'
],
colors
:
[
'#16E193'
,
'#747DFF'
,
'#E588FF'
,
'#34AFFF'
,
'#FFC200'
,
'#EB6001'
],
formatter
:
true
formatter
:
'price'
},
},
shopmallLegend
:
[
shopmallLegend
:
[
{
{
...
@@ -87,7 +87,7 @@ export default {
...
@@ -87,7 +87,7 @@ export default {
keys
:
[
'goodsname'
,
'purchaseamount'
],
keys
:
[
'goodsname'
,
'purchaseamount'
],
height
:
'18vh'
,
height
:
'18vh'
,
colors
:
[
'#16E193'
,
'#747DFF'
,
'#E588FF'
,
'#34AFFF'
,
'#FFC200'
,
'#EB6001'
],
colors
:
[
'#16E193'
,
'#747DFF'
,
'#E588FF'
,
'#34AFFF'
,
'#FFC200'
,
'#EB6001'
],
formatter
:
true
formatter
:
'price'
},
},
selfPickLegend
:
[
selfPickLegend
:
[
{
{
...
...
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