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 6c052d25
authored
Jul 26, 2023
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
接口联调
1 parent
ef3dce2e
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
70 additions
and
44 deletions
src/components/PieChart.vue
src/components/Ranking.vue
src/views/boutique/rightCompoments/MerchantsRanking.vue
src/views/boutique/rightCompoments/StaffRanking.vue
src/views/boutiqueDetail/BoutiqueDetailLeft.vue
src/views/boutiqueDetail/BusinessDetailTrends.vue
src/views/boutiqueDetail/GoodsRanking.vue
src/views/boutiqueDetail/index.vue
src/components/PieChart.vue
View file @
6c052d2
...
...
@@ -146,7 +146,7 @@ export default {
// 总价
let
_totalValue
=
0
_this
.
list
.
forEach
(
item
=>
{
_totalValue
+=
item
.
value
_totalValue
+=
item
[
this
.
keys
[
1
]]
})
let
_html
/**
...
...
src/components/Ranking.vue
View file @
6c052d2
...
...
@@ -14,7 +14,7 @@
</div>
</
template
>
<
template
v-else
>
<div
class=
"ranking-box-item-right"
>
<div
class=
"ranking-box-item-right"
:style=
"
{ width: itm.width, color: itm.color }"
>
{{
itm
.
preunit
}}{{
itm
.
type
==
'number'
?
numAddSymbol
(
item
[
itm
.
name
])
:
itm
.
type
==
'decimal'
?
toPercent
(
item
[
itm
.
name
])
:
item
[
itm
.
name
]
}}{{
itm
.
sufunit
}}
</div>
</
template
>
...
...
src/views/boutique/rightCompoments/MerchantsRanking.vue
View file @
6c052d2
...
...
@@ -59,7 +59,7 @@ export default {
},
{
name
:
'brand'
,
width
:
'
3.89
vw'
width
:
'
4
vw'
},
{
name
:
'num'
,
...
...
src/views/boutique/rightCompoments/StaffRanking.vue
View file @
6c052d2
...
...
@@ -49,7 +49,7 @@ export default {
},
{
name
:
'num'
,
width
:
'
3.88
vw'
,
width
:
'
4
vw'
,
type
:
'number'
}
],
...
...
@@ -64,7 +64,7 @@ export default {
},
{
name
:
'num'
,
width
:
'
3
vw'
,
width
:
'
4
vw'
,
type
:
'decimal'
}
]
...
...
src/views/boutiqueDetail/BoutiqueDetailLeft.vue
View file @
6c052d2
<
template
>
<div
class=
"detail-left-box"
>
<StatisticsBox
:list=
"boutiqueDetailList"
></StatisticsBox>
<BusinessDetailTrends
class=
"trends-charts"
></BusinessDetailTrends>
<BusinessDetailTrends
class=
"trends-charts"
:merchantid=
"merchantid"
></BusinessDetailTrends>
</div>
</
template
>
<
script
>
import
{
changeMixin
}
from
'@/mixins'
import
BusinessDetailTrends
from
'./BusinessDetailTrends.vue'
export
default
{
name
:
'BoutiqueDetailLeft'
,
mixins
:
[
changeMixin
],
components
:
{
BusinessDetailTrends
},
...
...
@@ -16,59 +18,81 @@ export default {
return
{
boutiqueDetailList
:
[
{
name
:
'总门店数'
,
valueName
:
'amounttotal'
,
value
:
'2708'
,
bottomLabel
:
'上月新增门店数:'
,
bottemName
:
'amounttotalThismonth'
,
bottomValue
:
'21'
name
:
'总展业时间'
,
valueName
:
'days'
,
value
:
'0'
,
unit
:
'天'
,
bottomLabel
:
'最近订单:'
,
bottemName
:
'nearTime'
,
bottomValue
:
'0'
},
{
name
:
'总
门店数
'
,
valueName
:
'
amounttotal
'
,
value
:
'
2708
'
,
bottomLabel
:
'
上月新增门店数
:'
,
bottemName
:
'
amounttotal
Thismonth'
,
bottomValue
:
'
21
'
name
:
'总
产值
'
,
valueName
:
'
outputvalue
'
,
value
:
'
0
'
,
bottomLabel
:
'
本月产值
:'
,
bottemName
:
'
outputvalue
Thismonth'
,
bottomValue
:
'
0
'
},
{
name
:
'
总门店数
'
,
valueName
:
'
amounttotal
'
,
value
:
'
2708
'
,
bottomLabel
:
'
上月新增门店数
:'
,
bottemName
:
'
amounttotal
Thismonth'
,
bottomValue
:
'
21
'
name
:
'
订单量
'
,
valueName
:
'
orderNum
'
,
value
:
'
0
'
,
bottomLabel
:
'
本月订单
:'
,
bottemName
:
'
orderNum
Thismonth'
,
bottomValue
:
'
0
'
},
{
name
:
'客单价'
,
valueName
:
'
amounttotal
'
,
value
:
'
1003
'
,
valueName
:
'
perCusTrans
'
,
value
:
'
0
'
,
unit
:
'¥'
,
bottomType
:
'ratio'
,
ratioLeftLabel
:
'月环比'
,
ratioLeftValue
:
'12'
,
ratioLeftValueName
:
'perCusTransHB'
,
ratioLeftValue
:
'0'
,
ratioRightLabel
:
'年同比'
,
ratioRightValue
:
'-7'
ratioRightValueName
:
'perCusTransTB'
,
ratioRightValue
:
'0'
},
{
name
:
'总转化率'
,
valueName
:
'
amounttotal
'
,
value
:
'
58
'
,
valueName
:
'
conversionRate
'
,
value
:
'
0
'
,
unit
:
'%'
,
bottomType
:
'ratio'
,
ratioLeftLabel
:
'月环比'
,
ratioLeftValue
:
'12'
,
ratioLeftValueName
:
'conversionRateHB'
,
ratioLeftValue
:
'0'
,
ratioRightLabel
:
'年同比'
,
ratioRightValue
:
'-7'
ratioRightValueName
:
'conversionRateTB'
,
ratioRightValue
:
'0'
}
]
}
},
mounted
()
{},
created
()
{
const
{
merchantid
,
year
}
=
this
.
$route
.
query
this
.
merchantid
=
merchantid
this
.
year
=
year
},
methods
:
{
init
()
{
this
.
getMerchantOverview
()
},
// 获取门店的总展业时间&最近订单时间、总产值&本月产值等
async
getMerchantOverview
()
{
const
_data
=
await
this
.
api
.
boutique
.
getYears
({
MerchantId
:
this
.
merchantid
,
year
:
this
.
year
})
const
_dataList
=
_data
.
data
.
dataList
[
0
]
if
(
_dataList
)
{
this
.
boutiqueDetailList
.
forEach
(
item
=>
{
item
.
value
=
_dataList
[
item
.
valueName
]
item
.
bottomValue
=
_dataList
[
item
.
bottemName
]
})
}
}
}
}
</
script
>
...
...
src/views/boutiqueDetail/BusinessDetailTrends.vue
View file @
6c052d2
...
...
@@ -21,6 +21,9 @@ export default {
BarLineChart
},
mixins
:
[
changeMixin
],
props
:
{
merchantid
:
String
},
data
()
{
return
{
tooltipFormatterObj
:
[
...
...
@@ -50,7 +53,7 @@ export default {
},
async
getDataList
()
{
this
.
dataList
=
[]
const
_data
=
await
this
.
api
.
solar
.
getAllPurchaseTrend
({
year
:
this
.
$store
.
state
.
app
.
solarYear
})
const
_data
=
await
this
.
api
.
boutique
.
getMerchantTrend
({
year
:
this
.
$store
.
state
.
app
.
solarYear
,
MerchantId
:
this
.
merchantid
})
const
_dataList
=
_data
.
data
.
dataList
if
(
!
_dataList
.
length
)
{
this
.
isEmpty
=
true
...
...
@@ -58,10 +61,10 @@ export default {
}
_dataList
.
forEach
(
item
=>
{
this
.
dataList
.
push
({
month
:
item
.
stat
Date
,
data1
:
item
.
shopamount
,
data2
:
item
.
selfamount
,
data3
:
item
.
shopratio
month
:
item
.
stat
Month
,
data1
:
item
.
outputvalue
,
data2
:
item
.
perCusTrans
,
data3
:
item
.
conversionRate
})
})
this
.
$refs
.
purchaseRef
.
drawBarLine
()
...
...
src/views/boutiqueDetail/GoodsRanking.vue
View file @
6c052d2
...
...
@@ -24,12 +24,12 @@ export default {
goodsRankingDataObj
:
[
{
name
:
'goodsname'
,
width
:
'
14.58
vw'
width
:
'
5
vw'
},
{
name
:
'orderNum'
,
color
:
'#C0C0C0'
,
width
:
'
3
vw'
,
width
:
'
5
vw'
,
sufunit
:
'单'
},
{
...
...
@@ -51,7 +51,7 @@ export default {
},
// 获取门店商品销售排行
async
getMerchantGoodsRank
(
year
,
MerchantId
)
{
const
_data
=
await
this
.
api
.
boutique
.
getMerchantGoodsRank
({
year
,
MerchantId
:
this
.
merchantid
merchantid
})
const
_data
=
await
this
.
api
.
boutique
.
getMerchantGoodsRank
({
year
,
MerchantId
:
this
.
merchantid
})
console
.
log
(
_data
);
this
.
goodsRankingList
=
_data
.
data
.
dataList
},
...
...
src/views/boutiqueDetail/index.vue
View file @
6c052d2
...
...
@@ -50,11 +50,10 @@ export default {
created
()
{
this
.
$bus
.
$on
(
'selectVal'
,
data
=>
{
this
.
$router
.
replace
({
path
:
'/
solar
Detail'
,
path
:
'/
boutique
Detail'
,
query
:
{
merchantid
:
data
.
merchantid
,
merchantname
:
data
.
merchantname
,
purchaseType
:
this
.
purchaseType
,
year
:
this
.
$store
.
state
.
app
.
solarYear
}
})
...
...
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