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
Hide 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 {
...
@@ -146,7 +146,7 @@ export default {
// 总价
// 总价
let
_totalValue
=
0
let
_totalValue
=
0
_this
.
list
.
forEach
(
item
=>
{
_this
.
list
.
forEach
(
item
=>
{
_totalValue
+=
item
.
value
_totalValue
+=
item
[
this
.
keys
[
1
]]
})
})
let
_html
let
_html
/**
/**
...
...
src/components/Ranking.vue
View file @
6c052d2
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
</div>
</div>
</
template
>
</
template
>
<
template
v-else
>
<
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
}}
{{
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
>
...
...
src/views/boutique/rightCompoments/MerchantsRanking.vue
View file @
6c052d2
...
@@ -59,7 +59,7 @@ export default {
...
@@ -59,7 +59,7 @@ export default {
},
},
{
{
name
:
'brand'
,
name
:
'brand'
,
width
:
'
3.89
vw'
width
:
'
4
vw'
},
},
{
{
name
:
'num'
,
name
:
'num'
,
...
...
src/views/boutique/rightCompoments/StaffRanking.vue
View file @
6c052d2
...
@@ -49,7 +49,7 @@ export default {
...
@@ -49,7 +49,7 @@ export default {
},
},
{
{
name
:
'num'
,
name
:
'num'
,
width
:
'
3.88
vw'
,
width
:
'
4
vw'
,
type
:
'number'
type
:
'number'
}
}
],
],
...
@@ -64,7 +64,7 @@ export default {
...
@@ -64,7 +64,7 @@ export default {
},
},
{
{
name
:
'num'
,
name
:
'num'
,
width
:
'
3
vw'
,
width
:
'
4
vw'
,
type
:
'decimal'
type
:
'decimal'
}
}
]
]
...
...
src/views/boutiqueDetail/BoutiqueDetailLeft.vue
View file @
6c052d2
<
template
>
<
template
>
<div
class=
"detail-left-box"
>
<div
class=
"detail-left-box"
>
<StatisticsBox
:list=
"boutiqueDetailList"
></StatisticsBox>
<StatisticsBox
:list=
"boutiqueDetailList"
></StatisticsBox>
<BusinessDetailTrends
class=
"trends-charts"
></BusinessDetailTrends>
<BusinessDetailTrends
class=
"trends-charts"
:merchantid=
"merchantid"
></BusinessDetailTrends>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
changeMixin
}
from
'@/mixins'
import
BusinessDetailTrends
from
'./BusinessDetailTrends.vue'
import
BusinessDetailTrends
from
'./BusinessDetailTrends.vue'
export
default
{
export
default
{
name
:
'BoutiqueDetailLeft'
,
name
:
'BoutiqueDetailLeft'
,
mixins
:
[
changeMixin
],
components
:
{
components
:
{
BusinessDetailTrends
BusinessDetailTrends
},
},
...
@@ -16,59 +18,81 @@ export default {
...
@@ -16,59 +18,81 @@ export default {
return
{
return
{
boutiqueDetailList
:
[
boutiqueDetailList
:
[
{
{
name
:
'总门店数'
,
name
:
'总展业时间'
,
valueName
:
'amounttotal'
,
valueName
:
'days'
,
value
:
'2708'
,
value
:
'0'
,
bottomLabel
:
'上月新增门店数:'
,
unit
:
'天'
,
bottemName
:
'amounttotalThismonth'
,
bottomLabel
:
'最近订单:'
,
bottomValue
:
'21'
bottemName
:
'nearTime'
,
bottomValue
:
'0'
},
},
{
{
name
:
'总
门店数
'
,
name
:
'总
产值
'
,
valueName
:
'
amounttotal
'
,
valueName
:
'
outputvalue
'
,
value
:
'
2708
'
,
value
:
'
0
'
,
bottomLabel
:
'
上月新增门店数
:'
,
bottomLabel
:
'
本月产值
:'
,
bottemName
:
'
amounttotal
Thismonth'
,
bottemName
:
'
outputvalue
Thismonth'
,
bottomValue
:
'
21
'
bottomValue
:
'
0
'
},
},
{
{
name
:
'
总门店数
'
,
name
:
'
订单量
'
,
valueName
:
'
amounttotal
'
,
valueName
:
'
orderNum
'
,
value
:
'
2708
'
,
value
:
'
0
'
,
bottomLabel
:
'
上月新增门店数
:'
,
bottomLabel
:
'
本月订单
:'
,
bottemName
:
'
amounttotal
Thismonth'
,
bottemName
:
'
orderNum
Thismonth'
,
bottomValue
:
'
21
'
bottomValue
:
'
0
'
},
},
{
{
name
:
'客单价'
,
name
:
'客单价'
,
valueName
:
'
amounttotal
'
,
valueName
:
'
perCusTrans
'
,
value
:
'
1003
'
,
value
:
'
0
'
,
unit
:
'¥'
,
unit
:
'¥'
,
bottomType
:
'ratio'
,
bottomType
:
'ratio'
,
ratioLeftLabel
:
'月环比'
,
ratioLeftLabel
:
'月环比'
,
ratioLeftValue
:
'12'
,
ratioLeftValueName
:
'perCusTransHB'
,
ratioLeftValue
:
'0'
,
ratioRightLabel
:
'年同比'
,
ratioRightLabel
:
'年同比'
,
ratioRightValue
:
'-7'
ratioRightValueName
:
'perCusTransTB'
,
ratioRightValue
:
'0'
},
},
{
{
name
:
'总转化率'
,
name
:
'总转化率'
,
valueName
:
'
amounttotal
'
,
valueName
:
'
conversionRate
'
,
value
:
'
58
'
,
value
:
'
0
'
,
unit
:
'%'
,
unit
:
'%'
,
bottomType
:
'ratio'
,
bottomType
:
'ratio'
,
ratioLeftLabel
:
'月环比'
,
ratioLeftLabel
:
'月环比'
,
ratioLeftValue
:
'12'
,
ratioLeftValueName
:
'conversionRateHB'
,
ratioLeftValue
:
'0'
,
ratioRightLabel
:
'年同比'
,
ratioRightLabel
:
'年同比'
,
ratioRightValue
:
'-7'
ratioRightValueName
:
'conversionRateTB'
,
ratioRightValue
:
'0'
}
}
]
]
}
}
},
},
mounted
()
{},
created
()
{
const
{
merchantid
,
year
}
=
this
.
$route
.
query
this
.
merchantid
=
merchantid
this
.
year
=
year
},
methods
:
{
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
>
</
script
>
...
...
src/views/boutiqueDetail/BusinessDetailTrends.vue
View file @
6c052d2
...
@@ -21,6 +21,9 @@ export default {
...
@@ -21,6 +21,9 @@ export default {
BarLineChart
BarLineChart
},
},
mixins
:
[
changeMixin
],
mixins
:
[
changeMixin
],
props
:
{
merchantid
:
String
},
data
()
{
data
()
{
return
{
return
{
tooltipFormatterObj
:
[
tooltipFormatterObj
:
[
...
@@ -50,7 +53,7 @@ export default {
...
@@ -50,7 +53,7 @@ export default {
},
},
async
getDataList
()
{
async
getDataList
()
{
this
.
dataList
=
[]
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
const
_dataList
=
_data
.
data
.
dataList
if
(
!
_dataList
.
length
)
{
if
(
!
_dataList
.
length
)
{
this
.
isEmpty
=
true
this
.
isEmpty
=
true
...
@@ -58,10 +61,10 @@ export default {
...
@@ -58,10 +61,10 @@ export default {
}
}
_dataList
.
forEach
(
item
=>
{
_dataList
.
forEach
(
item
=>
{
this
.
dataList
.
push
({
this
.
dataList
.
push
({
month
:
item
.
stat
Date
,
month
:
item
.
stat
Month
,
data1
:
item
.
shopamount
,
data1
:
item
.
outputvalue
,
data2
:
item
.
selfamount
,
data2
:
item
.
perCusTrans
,
data3
:
item
.
shopratio
data3
:
item
.
conversionRate
})
})
})
})
this
.
$refs
.
purchaseRef
.
drawBarLine
()
this
.
$refs
.
purchaseRef
.
drawBarLine
()
...
...
src/views/boutiqueDetail/GoodsRanking.vue
View file @
6c052d2
...
@@ -24,12 +24,12 @@ export default {
...
@@ -24,12 +24,12 @@ export default {
goodsRankingDataObj
:
[
goodsRankingDataObj
:
[
{
{
name
:
'goodsname'
,
name
:
'goodsname'
,
width
:
'
14.58
vw'
width
:
'
5
vw'
},
},
{
{
name
:
'orderNum'
,
name
:
'orderNum'
,
color
:
'#C0C0C0'
,
color
:
'#C0C0C0'
,
width
:
'
3
vw'
,
width
:
'
5
vw'
,
sufunit
:
'单'
sufunit
:
'单'
},
},
{
{
...
@@ -51,7 +51,7 @@ export default {
...
@@ -51,7 +51,7 @@ export default {
},
},
// 获取门店商品销售排行
// 获取门店商品销售排行
async
getMerchantGoodsRank
(
year
,
MerchantId
)
{
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
);
console
.
log
(
_data
);
this
.
goodsRankingList
=
_data
.
data
.
dataList
this
.
goodsRankingList
=
_data
.
data
.
dataList
},
},
...
...
src/views/boutiqueDetail/index.vue
View file @
6c052d2
...
@@ -50,11 +50,10 @@ export default {
...
@@ -50,11 +50,10 @@ export default {
created
()
{
created
()
{
this
.
$bus
.
$on
(
'selectVal'
,
data
=>
{
this
.
$bus
.
$on
(
'selectVal'
,
data
=>
{
this
.
$router
.
replace
({
this
.
$router
.
replace
({
path
:
'/
solar
Detail'
,
path
:
'/
boutique
Detail'
,
query
:
{
query
:
{
merchantid
:
data
.
merchantid
,
merchantid
:
data
.
merchantid
,
merchantname
:
data
.
merchantname
,
merchantname
:
data
.
merchantname
,
purchaseType
:
this
.
purchaseType
,
year
:
this
.
$store
.
state
.
app
.
solarYear
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