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 bbb8988f
authored
Aug 14, 2023
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
样式调整。bug修复
1 parent
d9064f44
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
101 additions
and
17 deletions
src/components/PieChart.vue
src/utils/util.js
src/views/crowdfunding/CrowdfundLeft.vue
src/views/crowdfunding/components/BarChart.vue
src/views/crowdfunding/components/BarOptions.js
src/views/crowdfunding/components/BrandDimension.vue
src/views/crowdfunding/components/MerchantsRank.vue
src/views/crowdfunding/components/NearMerchantsRank.vue
src/views/crowdfunding/components/PaymentPropertion.vue
src/views/crowdfundingDetail/ActivityTable.vue
src/components/PieChart.vue
View file @
bbb8988
...
...
@@ -168,7 +168,7 @@ export default {
_html
=
''
break
default
:
_html
=
params
.
name
_html
=
utils
.
legend
(
params
.
name
)
}
return
_html
},
...
...
src/utils/util.js
View file @
bbb8988
...
...
@@ -140,6 +140,18 @@ const toPercent = num => {
str
+=
'%'
return
str
}
// piechart文字超出六个字换行
const
legend
=
val
=>
{
if
(
val
.
length
>
6
)
{
const
firstText
=
val
.
substring
(
0
,
6
)
const
lastText
=
val
.
substring
(
6
)
return
`
${
firstText
}
\n{c|
${
lastText
}
}`
}
else
{
return
val
}
}
const
utils
=
{
getParams
,
getQuery
,
...
...
@@ -153,7 +165,8 @@ const utils = {
debounce
,
setChartFontSize
,
deepClone
,
toPercent
toPercent
,
legend
}
Object
.
keys
(
utils
).
map
(
key
=>
{
...
...
src/views/crowdfunding/CrowdfundLeft.vue
View file @
bbb8988
...
...
@@ -19,14 +19,14 @@
<div
class=
"ratio"
>
<div
class=
"ratio-left"
>
周同比
<span
class=
"positive"
>
{{
toPercent
(
tb
)
}}
</span>
<span
class=
"positive"
>
{{
toPercent
(
tb
)
}}
</span>
</div>
<div
class=
"ratio-right"
>
日环比
<span
class=
"negative"
>
{{
toPercent
(
hb
)
}}
</span>
<span
class=
"negative"
>
{{
toPercent
(
hb
)
}}
</span>
</div>
</div>
<BarChart
ref=
"amountChartRef"
domId=
"amountChart"
:dataList
.
sync=
"dataList.amountDataList"
:colorList=
"color.amountColorList"
:tooltipFormatterObj=
"tooltips.outputvalueTooltip"
></BarChart>
<BarChart
ref=
"amountChartRef"
domId=
"amountChart"
formatYAxis
:dataList
.
sync=
"dataList.amountDataList"
:colorList=
"color.amountColorList"
:tooltipFormatterObj=
"tooltips.outputvalueTooltip"
></BarChart>
</div>
</div>
<div
class=
"left-box"
>
...
...
@@ -184,6 +184,11 @@ export default {
display
:
flex
;
width
:
100%
;
justify-content
:
space-between
;
&-left,
&-right
{
font-size
:
12px
;
color
:
#95acd9
;
}
.positive
,
.negative
{
display
:
inline-block
;
...
...
src/views/crowdfunding/components/BarChart.vue
View file @
bbb8988
...
...
@@ -45,7 +45,8 @@ export default {
isMultiple
:
{
type
:
Boolean
,
default
:
false
}
},
formatYAxis
:
Boolean
},
data
()
{
return
{
...
...
@@ -53,7 +54,7 @@ export default {
}
},
created
()
{
this
.
barOptions
=
BarOptions
({
tooltipFormatter
:
this
.
tooltipFormatter
},
this
.
colorList
,
this
.
isMultiple
,
this
.
barWidth
)
this
.
barOptions
=
BarOptions
({
tooltipFormatter
:
this
.
tooltipFormatter
},
this
.
colorList
,
this
.
isMultiple
,
this
.
barWidth
,
this
.
formatYAxis
)
},
mounted
()
{
this
.
barDom
=
document
.
getElementById
(
this
.
domId
)
...
...
src/views/crowdfunding/components/BarOptions.js
View file @
bbb8988
...
...
@@ -6,7 +6,7 @@
* @LastEditTime: 2023-08-03 16:42:12
*/
import
*
as
echarts
from
'echarts'
function
getBarOptions
(
obj
,
colorList
,
isMultiple
,
barwidth
)
{
function
getBarOptions
(
obj
,
colorList
,
isMultiple
,
barwidth
,
formatYAxis
)
{
const
barWidth
=
barwidth
||
'14'
const
multiple
=
isMultiple
||
false
const
{
tooltipFormatter
}
=
obj
...
...
@@ -31,6 +31,16 @@ function getBarOptions(obj, colorList, isMultiple, barwidth) {
lineStyle
:
{
color
:
'#1d2a38'
}
},
axisLabel
:
{
// 这种做法就是在y轴的数据的值旁边拼接单位,貌似也挺方便的
formatter
:
function
(
value
)
{
if
(
formatYAxis
)
{
return
`
${
value
/
10000
}
万`
}
else
{
return
value
}
}
}
},
grid
:
{
...
...
src/views/crowdfunding/components/BrandDimension.vue
View file @
bbb8988
...
...
@@ -44,7 +44,7 @@ export default {
data
()
{
return
{
tabList
:
[
'AR导航'
,
'360全景导航'
,
'座椅通风'
,
'氛围灯'
],
tabList
:
[
'AR导航'
,
'360全景导航'
,
'座椅通风'
,
'氛围灯'
,
'数字化美容'
],
sessionRankList
:
[],
productionRankList
:
[],
percentRankList
:
[],
...
...
@@ -91,7 +91,8 @@ export default {
width
:
'3vw'
,
type
:
'decimal'
}
]
],
tabItem
:
'AR'
}
},
created
()
{
...
...
@@ -104,10 +105,10 @@ export default {
mounted
()
{},
methods
:
{
async
getBrandRank
(
month
,
queryItem
=
'AR'
)
{
async
getBrandRank
(
month
,
queryItem
)
{
const
_params
=
{
month
,
queryItem
queryItem
:
queryItem
||
this
.
tabItem
}
const
_result
=
await
this
.
api
.
crowdFunding
.
getBrandRank
(
_params
)
const
{
actiRank
,
avgChargebackRank
,
avgTransRank
,
outputRank
}
=
_result
.
data
.
dataList
[
0
]
...
...
@@ -121,15 +122,23 @@ export default {
switch
(
val
)
{
case
0
:
this
.
getBrandRank
(
this
.
month
,
'AR'
)
this
.
tabItem
=
'AR'
break
case
1
:
this
.
getBrandRank
(
this
.
month
,
'navigation360'
)
this
.
tabItem
=
'navigation360'
break
case
2
:
this
.
getBrandRank
(
this
.
month
,
'seat'
)
this
.
tabItem
=
'seat'
break
case
3
:
this
.
getBrandRank
(
this
.
month
,
'light'
)
this
.
tabItem
=
'light'
break
case
4
:
this
.
getBrandRank
(
this
.
month
,
'digitalbeauty'
)
this
.
tabItem
=
'digitalbeauty'
break
}
}
...
...
src/views/crowdfunding/components/MerchantsRank.vue
View file @
bbb8988
...
...
@@ -4,7 +4,7 @@
<box-title
title=
"门店排名"
></box-title>
<inner-tab
class=
"tab-box"
:list=
"tabList"
:width=
"21.16"
:itemPadding=
"1.53"
@
changeTab=
"changeTab"
></inner-tab>
<div
class=
"rank-content"
v-if=
"merchantRankList.length"
>
<Ranking
class=
"rank-box"
:rankingsList=
"merchantRankList"
:rankingDataObj=
"rankingDataObj"
@
goDetailPage=
"goDetailPage"
></Ranking>
<Ranking
class=
"rank-box"
:rankingsList=
"merchantRankList"
:rankingDataObj=
"
isRate ? rankingRateObj :
rankingDataObj"
@
goDetailPage=
"goDetailPage"
></Ranking>
</div>
<div
v-else
class=
"empty"
>
<Empty></Empty>
...
...
@@ -20,13 +20,14 @@ export default {
data
()
{
return
{
isRate
:
false
,
dataList
:
{},
tabList
:
[
'产值排名'
,
'转化率排名'
,
' 退单率排名'
],
merchantRankList
:
[],
rankingDataObj
:
[
{
name
:
'merchantName'
,
width
:
'
17
vw'
,
width
:
'
20
vw'
,
action
:
true
},
{
...
...
@@ -34,6 +35,18 @@ export default {
width
:
'8vw'
,
type
:
'number'
}
],
rankingRateObj
:
[
{
name
:
'merchantName'
,
width
:
'20vw'
,
action
:
true
},
{
name
:
'num'
,
width
:
'8vw'
,
type
:
'decimal'
}
]
}
},
...
...
@@ -68,12 +81,15 @@ export default {
switch
(
val
)
{
case
0
:
this
.
merchantRankList
=
this
.
dataList
.
outputRank
this
.
isRate
=
false
break
case
1
:
this
.
merchantRankList
=
this
.
dataList
.
transRank
this
.
isRate
=
true
break
case
2
:
this
.
merchantRankList
=
this
.
dataList
.
chargebackRank
this
.
isRate
=
true
break
}
}
...
...
src/views/crowdfunding/components/NearMerchantsRank.vue
View file @
bbb8988
...
...
@@ -4,7 +4,7 @@
<box-title
title=
"近一年门店活动排名"
></box-title>
<inner-tab
class=
"tab-box"
:list=
"tabList"
:width=
"25"
:itemPadding=
"1.05"
@
changeTab=
"changeTab"
></inner-tab>
<div
class=
"rank-content"
v-if=
"merchantRankList.length"
>
<Ranking
class=
"rank-box"
:rankingsList=
"merchantRankList"
:rankingDataObj=
"rankingDataObj"
@
goDetailPage=
"goDetailPage"
></Ranking>
<Ranking
class=
"rank-box"
:rankingsList=
"merchantRankList"
:rankingDataObj=
"
isRate ? rankingRateObj :
rankingDataObj"
@
goDetailPage=
"goDetailPage"
></Ranking>
</div>
<div
v-else
class=
"empty"
>
<Empty></Empty>
...
...
@@ -18,13 +18,14 @@ export default {
data
()
{
return
{
isRate
:
false
,
dataList
:
{},
tabList
:
[
'活动场次排名'
,
'活动平均客单价排名'
,
'活动退单率排名'
],
merchantRankList
:
[],
rankingDataObj
:
[
{
name
:
'merchantName'
,
width
:
'
17
vw'
,
width
:
'
20
vw'
,
action
:
true
},
{
...
...
@@ -32,6 +33,18 @@ export default {
width
:
'8vw'
,
type
:
'number'
}
],
rankingRateObj
:
[
{
name
:
'merchantName'
,
width
:
'20vw'
,
action
:
true
},
{
name
:
'num'
,
width
:
'8vw'
,
type
:
'decimal'
}
]
}
},
...
...
@@ -63,12 +76,15 @@ export default {
switch
(
val
)
{
case
0
:
this
.
merchantRankList
=
this
.
dataList
.
activityRank
this
.
isRate
=
false
break
case
1
:
this
.
merchantRankList
=
this
.
dataList
.
percRank
this
.
isRate
=
false
break
case
2
:
this
.
merchantRankList
=
this
.
dataList
.
chargebackRank
this
.
isRate
=
true
break
}
}
...
...
src/views/crowdfunding/components/PaymentPropertion.vue
View file @
bbb8988
...
...
@@ -31,7 +31,7 @@ export default {
paymentLegend
:
[
{
name
:
'paymentModel'
,
width
:
'
8
vw'
width
:
'
12
vw'
},
{
name
:
'rate'
,
...
...
src/views/crowdfundingDetail/ActivityTable.vue
View file @
bbb8988
...
...
@@ -44,6 +44,11 @@
{{
toPercent
(
scope
.
row
.
chargebackRate
)
}}
</
template
>
</el-table-column>
<
template
slot=
"empty"
>
<div
class=
"empty"
>
<Empty></Empty>
</div>
</
template
>
</el-table>
<el-pagination
class=
"pagination-box"
...
...
@@ -193,6 +198,9 @@ export default {
.el-table__empty-block
{
background-color
:
#051526
;
}
.el-table
.cell
{
line-height
:
1vw
;
}
.usual-row
{
background
:
#051526
!important
;
}
...
...
@@ -200,3 +208,9 @@ export default {
background
:
#072545
!important
;
}
</
style
>
<
style
lang=
"scss"
scoped
>
.empty
{
margin
:
15vh
0
;
}
</
style
>
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