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 c701770b
authored
Sep 08, 2023
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
接口调整
1 parent
adddc362
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
79 deletions
src/views/internal/components/DigitalMarketingRight.vue
src/views/internal/components/ViewEdun.vue
src/views/internal/components/ViewIntersts.vue
src/views/internal/components/constant.js
src/views/internal/components/DigitalMarketingRight.vue
View file @
c701770
...
@@ -4,10 +4,10 @@
...
@@ -4,10 +4,10 @@
<inner-tab
class=
"inner-tab"
:list=
"tabList"
:width=
"tabWidth"
:itemPadding=
"0.5"
@
changeTab=
"changeTab"
></inner-tab>
<inner-tab
class=
"inner-tab"
:list=
"tabList"
:width=
"tabWidth"
:itemPadding=
"0.5"
@
changeTab=
"changeTab"
></inner-tab>
<!-- 1.3售后众筹显示占比和价格区间切换 -->
<!-- 1.3售后众筹显示占比和价格区间切换 -->
<div
class=
"switch-box"
v-if=
"switchShow"
>
<div
class=
"switch-box"
v-if=
"switchShow"
>
<div
class=
"text"
>
收入占比:
64.89
%
</div>
<div
class=
"text"
>
收入占比:
{{
ratio
}}
%
</div>
<PriceSwitch
:selectList=
"priceList"
></PriceSwitch>
<PriceSwitch
:selectList=
"priceList"
></PriceSwitch>
</div>
</div>
<BarChart
ref=
"merchantChartRef"
domId=
"merchantChart"
:
height=
"barchartHeight"
:dataList
.
sync=
"dataList"
:colorList=
"colorList"
:barWidth=
"'50'"
:tooltipFormatterObj=
"tooltips
"
></BarChart>
<BarChart
ref=
"merchantChartRef"
domId=
"merchantChart"
:
label=
"barChartLabel"
:height=
"barchartHeight"
:colorList=
"colorList"
:valueName=
"valueName
"
></BarChart>
</div>
</div>
</
template
>
</
template
>
...
@@ -30,49 +30,47 @@ export default {
...
@@ -30,49 +30,47 @@ export default {
priceList
:
digitalMarketingPriceObj
.
merchantOrderlist
,
priceList
:
digitalMarketingPriceObj
.
merchantOrderlist
,
selectList
:
digitalMarketingRightSelectList
[
0
],
selectList
:
digitalMarketingRightSelectList
[
0
],
selectType
:
''
,
selectType
:
''
,
dataList
:
[
marketingDistributionList
:
[],
{
statMonth
:
'2021'
,
actiNum
:
400
},
{
statMonth
:
'2022'
,
actiNum
:
400
},
{
statMonth
:
'2023'
,
actiNum
:
400
}
],
colorList
:
[
'#22D8FF'
,
'#223FA9'
,
'#061422'
],
colorList
:
[
'#22D8FF'
,
'#223FA9'
,
'#061422'
],
tooltips
:
{
label
:
'场次'
,
attrName
:
'actiNum'
},
barchartHeight
:
'16vh'
,
barchartHeight
:
'16vh'
,
switchShow
:
false
switchShow
:
false
,
valueName
:
'outputMerchantNum'
,
downSelectNum
:
0
,
ratio
:
''
,
digitalMarketingTab
:
0
,
barChartLabel
:
'statYear'
}
}
},
},
created
()
{
// :门店订单金额分布 && 门店订单量分布
this
.
getMarketingDistribution
()
},
mounted
()
{
mounted
()
{
this
.
$refs
.
merchantChartRef
.
drawBar
()
//
this.$refs.merchantChartRef.drawBar()
this
.
$bus
.
$on
(
'digitalMarketingTabChange'
,
data
=>
{
this
.
$bus
.
$on
(
'digitalMarketingTabChange'
,
data
=>
{
console
.
log
(
data
)
console
.
log
(
data
)
this
.
digitalMarketingTab
=
data
this
.
$refs
.
rightDownSelect
.
selectType
=
''
this
.
$refs
.
rightDownSelect
.
selectType
=
''
this
.
tabShow
=
false
this
.
tabShow
=
false
this
.
selectList
=
digitalMarketingRightSelectList
[
data
]
this
.
selectList
=
digitalMarketingRightSelectList
[
data
]
switch
(
data
)
{
switch
(
data
)
{
case
0
:
case
0
:
this
.
switchShow
=
false
this
.
switchShow
=
false
this
.
barchartHeight
=
'16vh'
this
.
tabList
=
[
'门店数'
,
'总金额'
]
this
.
tabList
=
[
'门店数'
,
'总金额'
]
this
.
valueName
=
'outputMerchantNum'
this
.
barChartLabel
=
'statYear'
this
.
$refs
.
merchantChartRef
.
drawBar
(
this
.
marketingDistributionList
)
break
break
case
1
:
case
1
:
this
.
switchShow
=
true
this
.
switchShow
=
true
this
.
barchartHeight
=
'14vh'
this
.
tabWidth
=
10.8
this
.
tabWidth
=
10.8
this
.
tabList
=
[
'门店数'
,
'订单数'
,
'总金额'
]
this
.
tabList
=
[
'门店数'
,
'订单数'
,
'总金额'
]
this
.
valueName
=
'num'
this
.
barChartLabel
=
'statDate'
this
.
getMarketingCrowdFundingMerDistr
(
'num'
)
break
break
}
}
})
})
...
@@ -80,31 +78,80 @@ export default {
...
@@ -80,31 +78,80 @@ export default {
methods
:
{
methods
:
{
selectVal
(
val
)
{
selectVal
(
val
)
{
switch
(
val
.
val
)
{
switch
(
val
.
val
)
{
case
'
n
um'
:
case
'
outputMerchantN
um'
:
this
.
tabList
=
[
'门店数'
,
'总金额'
]
this
.
tabList
=
[
'门店数'
,
'总金额'
]
break
break
case
'
mer
Num'
:
case
'
orderMerchant
Num'
:
this
.
tabList
=
[
'门店数'
,
'总订单数'
]
this
.
tabList
=
[
'门店数'
,
'总订单数'
]
this
.
tabWidth
=
8.1
this
.
tabWidth
=
8.1
break
break
case
'
num1
'
:
case
'
crowdFundingMerDistr
'
:
this
.
tabList
=
[
'门店数'
,
'订单数'
,
'总金额'
]
this
.
tabList
=
[
'门店数'
,
'订单数'
,
'总金额'
]
this
.
tabWidth
=
10.8
this
.
tabWidth
=
10.8
this
.
getMarketingCrowdFundingMerDistr
(
'num'
)
break
break
case
'
merNum2
'
:
case
'
crowdFundingActivityDistr
'
:
this
.
tabList
=
[
'活动数'
,
'订单数'
,
'订单金额'
]
this
.
tabList
=
[
'活动数'
,
'订单数'
,
'订单金额'
]
this
.
tabWidth
=
11.6
this
.
tabWidth
=
11.6
this
.
getMarketingCrowdFundingActivityDistr
(
'num'
)
break
break
case
'
trend3
'
:
case
'
crowdFundingActivityMoneyDistr
'
:
this
.
tabList
=
[
'活动数'
,
'订单数'
,
'总订单金额'
]
this
.
tabList
=
[
'活动数'
,
'订单数'
,
'总订单金额'
]
this
.
tabWidth
=
12.4
this
.
tabWidth
=
12.4
this
.
getMarketingCrowdFundingActivityMoneyDistr
(
'num'
)
break
break
}
}
},
},
changeTab
(
val
)
{
changeTab
(
val
)
{
console
.
log
(
val
)
console
.
log
(
val
)
switch
(
val
)
{
case
0
:
this
.
valueName
=
this
.
downSelectNum
===
0
?
'outputMerchantNum'
:
'orderMerchantNum'
break
case
1
:
this
.
valueName
=
this
.
downSelectNum
===
0
?
'outputMoney'
:
'orderMoney'
break
}
}
this
.
$refs
.
merchantChartRef
.
drawBar
(
this
.
marketingDistributionList
)
},
async
getMarketingDistribution
()
{
const
_data
=
await
this
.
api
.
internal
.
getMarketingDistribution
()
const
_dataList
=
_data
.
data
.
dataList
this
.
marketingDistributionList
=
_dataList
this
.
$refs
.
merchantChartRef
.
drawBar
(
_dataList
)
},
// 活动订单分布
async
getMarketingCrowdFundingActivityDistr
(
queryItem
)
{
const
params
=
{
queryItem
:
queryItem
}
const
_data
=
await
this
.
api
.
internal
.
getMarketingCrowdFundingActivityDistr
(
params
)
const
_dataList
=
_data
.
data
.
dataList
[
0
].
finishedProductTrendList
this
.
ratio
=
_data
.
data
.
dataList
[
0
].
ratio
this
.
$refs
.
merchantChartRef
.
drawBar
(
_dataList
)
},
// 活动订单金额分布
async
getMarketingCrowdFundingActivityMoneyDistr
(
queryItem
)
{
const
params
=
{
queryItem
:
queryItem
}
const
_data
=
await
this
.
api
.
internal
.
getMarketingCrowdFundingActivityMoneyDistr
(
params
)
const
_dataList
=
_data
.
data
.
dataList
[
0
].
finishedProductTrendList
this
.
ratio
=
_data
.
data
.
dataList
[
0
].
ratio
this
.
$refs
.
merchantChartRef
.
drawBar
(
_dataList
)
},
// 门店订单分布
async
getMarketingCrowdFundingMerDistr
(
queryItem
)
{
const
params
=
{
queryItem
:
queryItem
}
const
_data
=
await
this
.
api
.
internal
.
getMarketingCrowdFundingMerDistr
(
params
)
const
_dataList
=
_data
.
data
.
dataList
[
0
].
finishedProductTrendList
this
.
ratio
=
_data
.
data
.
dataList
[
0
].
ratio
this
.
$refs
.
merchantChartRef
.
drawBar
(
_dataList
)
},
}
}
}
}
</
script
>
</
script
>
...
...
src/views/internal/components/ViewEdun.vue
View file @
c701770
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<div
class=
"text"
>
收入占比:
{{
ratio
}}
%
</div>
<div
class=
"text"
>
收入占比:
{{
ratio
}}
%
</div>
<PriceSwitch
:selectList=
"priceList"
:unit=
"'万元'"
></PriceSwitch>
<PriceSwitch
:selectList=
"priceList"
:unit=
"'万元'"
></PriceSwitch>
</div>
</div>
<BarChart
ref=
"edunChartRef"
domId=
"edunChart"
:label=
"'statDate'"
:height=
"'24vh'"
:colorList=
"colorList"
:barWidth=
"'50'"
:tooltipFormatterObj=
"tooltips
"
></BarChart>
<BarChart
ref=
"edunChartRef"
domId=
"edunChart"
:label=
"'statDate'"
:height=
"'24vh'"
:colorList=
"colorList"
:barWidth=
"'50'"
valueName=
"num
"
></BarChart>
</div>
</div>
<div
class=
"income-box"
>
<div
class=
"income-box"
>
<div
class=
"patch-title title"
>
月收入趋势
</div>
<div
class=
"patch-title title"
>
月收入趋势
</div>
...
@@ -37,20 +37,6 @@ export default {
...
@@ -37,20 +37,6 @@ export default {
label
:
'场次'
,
label
:
'场次'
,
attrName
:
'num'
attrName
:
'num'
},
},
lineDataList
:
[
{
statMonth
:
'2021'
,
actiNum
:
400
},
{
statMonth
:
'2022'
,
actiNum
:
600
},
{
statMonth
:
'2023'
,
actiNum
:
800
}
],
ratio
:
0
ratio
:
0
}
}
},
},
...
...
src/views/internal/components/ViewIntersts.vue
View file @
c701770
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
<div
class=
"text"
>
收入占比:
{{
ratio
}}
%
</div>
<div
class=
"text"
>
收入占比:
{{
ratio
}}
%
</div>
<PriceSwitch
:selectList=
"priceList"
:unit=
"'万元'"
></PriceSwitch>
<PriceSwitch
:selectList=
"priceList"
:unit=
"'万元'"
></PriceSwitch>
</div>
</div>
<BarChart
ref=
"equityChartRef"
domId=
"equityChart"
:label=
"'statDate'"
:height=
"'24vh'"
:
dataList
.
sync=
"dataList"
:colorList=
"colorList"
:barWidth=
"'50'"
:tooltipFormatterObj=
"tooltips
"
></BarChart>
<BarChart
ref=
"equityChartRef"
domId=
"equityChart"
:label=
"'statDate'"
:height=
"'24vh'"
:
colorList=
"colorList"
:barWidth=
"'50'"
:tooltipFormatterObj=
"tooltips"
valueName=
"num
"
></BarChart>
</div>
</div>
<div
class=
"income-box"
>
<div
class=
"income-box"
>
<div
class=
"patch-title title"
>
月收入趋势
</div>
<div
class=
"patch-title title"
>
月收入趋势
</div>
<LineChart
ref=
"equityLineChartRef"
domId=
"equityLineChart"
:height=
"'28vh'"
:
dataList
.
sync=
"lineDataList"
:
tooltipFormatterObj=
"tooltips"
:valName=
"tooltips.attrName"
></LineChart>
<LineChart
ref=
"equityLineChartRef"
domId=
"equityLineChart"
:height=
"'28vh'"
:tooltipFormatterObj=
"tooltips"
:valName=
"tooltips.attrName"
></LineChart>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -32,39 +32,11 @@ export default {
...
@@ -32,39 +32,11 @@ export default {
return
{
return
{
tabList
:
[
'门店数'
,
'会员人数'
,
'销售收入'
],
tabList
:
[
'门店数'
,
'会员人数'
,
'销售收入'
],
priceList
:
equityPriceList
,
priceList
:
equityPriceList
,
dataList
:
[
{
statMonth
:
'2021'
,
actiNum
:
400
},
{
statMonth
:
'2022'
,
actiNum
:
400
},
{
statMonth
:
'2023'
,
actiNum
:
400
}
],
colorList
:
[
'#22D8FF'
,
'#223FA9'
,
'#061422'
],
colorList
:
[
'#22D8FF'
,
'#223FA9'
,
'#061422'
],
tooltips
:
{
tooltips
:
{
label
:
'场次'
,
label
:
'场次'
,
attrName
:
'num'
attrName
:
'num'
},
},
lineDataList
:
[
{
statMonth
:
'2021'
,
actiNum
:
400
},
{
statMonth
:
'2022'
,
actiNum
:
600
},
{
statMonth
:
'2023'
,
actiNum
:
800
}
],
ratio
:
0
ratio
:
0
}
}
},
},
...
...
src/views/internal/components/constant.js
View file @
c701770
...
@@ -152,25 +152,25 @@ const digitalMarketingRightSelectList = [
...
@@ -152,25 +152,25 @@ const digitalMarketingRightSelectList = [
[
[
{
{
name
:
'门店订单金额分布'
,
name
:
'门店订单金额分布'
,
val
:
'
n
um'
val
:
'
outputMerchantN
um'
},
},
{
{
name
:
'门店订单量分布'
,
name
:
'门店订单量分布'
,
val
:
'
mer
Num'
val
:
'
orderMerchant
Num'
}
}
],
],
[
[
{
{
name
:
'门店订单分布'
,
name
:
'门店订单分布'
,
val
:
'
num1
'
val
:
'
crowdFundingMerDistr
'
},
},
{
{
name
:
'活动订单分布'
,
name
:
'活动订单分布'
,
val
:
'
merNum2
'
val
:
'
crowdFundingActivityDistr
'
},
},
{
{
name
:
'活动订单金额分布'
,
name
:
'活动订单金额分布'
,
val
:
'
trend3
'
val
:
'
crowdFundingActivityMoneyDistr
'
}
}
]
]
]
]
...
...
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