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 89009da1
authored
Sep 14, 2023
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
接口调整
1 parent
b367f4be
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
71 deletions
src/api/modules/internal.js
src/views/internal/components/DigitalMarketingRight.vue
src/views/internal/components/ViewClue.vue
src/views/internal/components/constant.js
src/api/modules/internal.js
View file @
89009da
...
@@ -83,6 +83,11 @@ const getMarketingTrend = params => {
...
@@ -83,6 +83,11 @@ const getMarketingTrend = params => {
return
window
.
$HTTP
.
get
(
'inner/getMarketingTrend'
,
params
)
return
window
.
$HTTP
.
get
(
'inner/getMarketingTrend'
,
params
)
}
}
// 数字化营销(1.3售后众筹):门店 && 订单 && 活动 && 订单金额 分布
const
getMarketingCrowdFundingDistr
=
params
=>
{
return
window
.
$HTTP
.
get
(
'inner/getMarketingCrowdFundingDistr'
,
params
)
}
export
default
{
export
default
{
getAllOverview
,
getAllOverview
,
getCoreActiveMerchant
,
getCoreActiveMerchant
,
...
@@ -100,5 +105,6 @@ export default {
...
@@ -100,5 +105,6 @@ export default {
getMarketingCrowdFundingMerDistr
,
getMarketingCrowdFundingMerDistr
,
getMarketingCrowdFundingTrend
,
getMarketingCrowdFundingTrend
,
getMarketingDistribution
,
getMarketingDistribution
,
getMarketingTrend
getMarketingTrend
,
getMarketingCrowdFundingDistr
}
}
src/views/internal/components/DigitalMarketingRight.vue
View file @
89009da
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<!-- 1.3售后众筹显示占比和价格区间切换 -->
<!-- 1.3售后众筹显示占比和价格区间切换 -->
<div
class=
"switch-box"
v-if=
"switchShow"
>
<div
class=
"switch-box"
v-if=
"switchShow"
>
<div
class=
"text"
>
收入占比:
{{
ratio
}}
%
</div>
<div
class=
"text"
>
收入占比:
{{
ratio
}}
%
</div>
<PriceSwitch
:selectList=
"priceList"
></PriceSwitch>
<PriceSwitch
:selectList=
"priceList"
@
selectPrice=
"selectPrice"
></PriceSwitch>
</div>
</div>
<BarChart
ref=
"merchantChartRef"
domId=
"merchantChart"
:label=
"barChartLabel"
:height=
"barchartHeight"
:colorList=
"colorList"
:valueName=
"valueName"
></BarChart>
<BarChart
ref=
"merchantChartRef"
domId=
"merchantChart"
:label=
"barChartLabel"
:height=
"barchartHeight"
:colorList=
"colorList"
:valueName=
"valueName"
></BarChart>
</div>
</div>
...
@@ -39,7 +39,11 @@ export default {
...
@@ -39,7 +39,11 @@ export default {
downSelectNum
:
0
,
downSelectNum
:
0
,
ratio
:
''
,
ratio
:
''
,
digitalMarketingTab
:
0
,
digitalMarketingTab
:
0
,
barChartLabel
:
'statYear'
barChartLabel
:
'statYear'
,
marketingCrowdFundingDistr
:
[],
startPrice
:
''
,
endPrice
:
''
,
crowfundDistrType
:
''
}
}
},
},
...
@@ -49,12 +53,8 @@ export default {
...
@@ -49,12 +53,8 @@ export default {
},
},
mounted
()
{
mounted
()
{
// this.$refs.merchantChartRef.drawBar()
this
.
$bus
.
$on
(
'digitalMarketingTabChange'
,
data
=>
{
this
.
$bus
.
$on
(
'digitalMarketingTabChange'
,
data
=>
{
console
.
log
(
data
)
this
.
digitalMarketingTab
=
data
this
.
digitalMarketingTab
=
data
// this.$refs.rightDownSelect.selectType = ''
this
.
tabShow
=
false
this
.
tabShow
=
false
this
.
selectList
=
digitalMarketingRightSelectList
[
data
]
this
.
selectList
=
digitalMarketingRightSelectList
[
data
]
switch
(
data
)
{
switch
(
data
)
{
...
@@ -72,7 +72,7 @@ export default {
...
@@ -72,7 +72,7 @@ export default {
this
.
tabList
=
[
'门店数'
,
'订单数'
,
'总金额'
]
this
.
tabList
=
[
'门店数'
,
'订单数'
,
'总金额'
]
this
.
valueName
=
'num'
this
.
valueName
=
'num'
this
.
barChartLabel
=
'statDate'
this
.
barChartLabel
=
'statDate'
this
.
getMarketingCrowdFunding
MerDistr
(
'num
'
)
this
.
getMarketingCrowdFunding
Distr
(
'merData
'
)
break
break
}
}
})
})
...
@@ -81,7 +81,6 @@ export default {
...
@@ -81,7 +81,6 @@ export default {
methods
:
{
methods
:
{
selectVal
(
val
)
{
selectVal
(
val
)
{
this
.
$refs
.
innerTabRef
.
tabActive
=
0
this
.
$refs
.
innerTabRef
.
tabActive
=
0
console
.
log
(
val
)
switch
(
val
.
val
)
{
switch
(
val
.
val
)
{
case
'outputMerchantNum'
:
case
'outputMerchantNum'
:
this
.
tabWidth
=
7.3
this
.
tabWidth
=
7.3
...
@@ -101,24 +100,6 @@ export default {
...
@@ -101,24 +100,6 @@ export default {
this
.
$refs
.
merchantChartRef
.
drawBar
(
this
.
marketingDistributionList
)
this
.
$refs
.
merchantChartRef
.
drawBar
(
this
.
marketingDistributionList
)
})
})
break
break
// case 'crowdFundingMerDistr':
// this.tabList = ['门店数', '订单数', '总金额']
// this.tabWidth = 10.8
// this.downSelectNum = 0
// this.getMarketingCrowdFundingMerDistr('num')
// break
// case 'crowdFundingActivityDistr':
// this.tabList = ['活动数', '订单数', '订单金额']
// this.tabWidth = 11.6
// this.downSelectNum = 1
// this.getMarketingCrowdFundingActivityDistr('num')
// break
// case 'crowdFundingActivityMoneyDistr':
// this.tabList = ['活动数', '订单数', '总订单金额']
// this.tabWidth = 12.4
// this.downSelectNum = 2
// this.getMarketingCrowdFundingActivityMoneyDistr('num')
// break
}
}
},
},
changeTab
(
val
)
{
changeTab
(
val
)
{
...
@@ -131,7 +112,8 @@ export default {
...
@@ -131,7 +112,8 @@ export default {
this
.
$refs
.
merchantChartRef
.
drawBar
(
this
.
marketingDistributionList
)
this
.
$refs
.
merchantChartRef
.
drawBar
(
this
.
marketingDistributionList
)
}
else
{
}
else
{
// 1.3售后众筹
// 1.3售后众筹
this
.
getMarketingCrowdFundingMerDistr
(
'num'
)
this
.
crowfundDistrType
=
'merData'
this
.
marketingDistributionList
=
this
.
marketingCrowdFundingDistr
.
merData
.
trendData
}
}
break
break
case
1
:
case
1
:
...
@@ -141,18 +123,19 @@ export default {
...
@@ -141,18 +123,19 @@ export default {
this
.
$refs
.
merchantChartRef
.
drawBar
(
this
.
marketingDistributionList
)
this
.
$refs
.
merchantChartRef
.
drawBar
(
this
.
marketingDistributionList
)
}
else
{
}
else
{
// 1.3售后众筹
// 1.3售后众筹
this
.
getMarketingCrowdFundingMerDistr
(
'orderNum'
)
this
.
crowfundDistrType
=
'orderData'
this
.
marketingDistributionList
=
this
.
marketingCrowdFundingDistr
.
orderData
.
trendData
}
}
break
break
case
2
:
case
2
:
// 只有1.3售后众筹
// 只有1.3售后众筹
// eslint-disable-next-line no-case-declarations
this
.
crowfundDistrType
=
'incomeData'
this
.
getMarketingCrowdFundingMerDistr
(
'price'
)
this
.
marketingDistributionList
=
this
.
marketingCrowdFundingDistr
.
incomeData
.
trendData
break
break
}
}
//
this.$nextTick(() => {
this
.
$nextTick
(()
=>
{
//
this.$refs.merchantChartRef.drawBar(this.marketingDistributionList)
this
.
$refs
.
merchantChartRef
.
drawBar
(
this
.
marketingDistributionList
)
//
})
})
},
},
async
getMarketingDistribution
()
{
async
getMarketingDistribution
()
{
const
_data
=
await
this
.
api
.
internal
.
getMarketingDistribution
()
const
_data
=
await
this
.
api
.
internal
.
getMarketingDistribution
()
...
@@ -160,35 +143,24 @@ export default {
...
@@ -160,35 +143,24 @@ export default {
this
.
marketingDistributionList
=
_dataList
this
.
marketingDistributionList
=
_dataList
this
.
$refs
.
merchantChartRef
.
drawBar
(
_dataList
)
this
.
$refs
.
merchantChartRef
.
drawBar
(
_dataList
)
},
},
// 活动订单分布
async
getMarketingCrowdFundingActivityDistr
(
queryItem
)
{
const
params
=
{
queryItem
:
queryItem
// num--活动数, orderNum--订单数, price--订单金额
}
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
getMarketingCrowdFunding
ActivityMoney
Distr
(
queryItem
)
{
async
getMarketingCrowdFundingDistr
(
queryItem
)
{
const
params
=
{
const
params
=
{
queryItem
:
queryItem
// num--活动数, orderNum--订单数, price--总订单金额
startPrice
:
this
.
startPrice
,
endPrice
:
this
.
endPrice
}
}
const
_data
=
await
this
.
api
.
internal
.
getMarketingCrowdFundingActivityMoneyDistr
(
params
)
const
_data
=
await
this
.
api
.
internal
.
getMarketingCrowdFundingDistr
(
params
)
const
_dataList
=
_data
.
data
.
dataList
[
0
].
finishedProductTrendList
const
_queryItem
=
queryItem
||
this
.
crowfundDistrType
this
.
ratio
=
_data
.
data
.
dataList
[
0
].
ratio
const
_dataList
=
_data
.
data
.
dataList
[
0
][
_queryItem
].
trendData
this
.
marketingCrowdFundingDistr
=
_data
.
data
.
dataList
[
0
]
this
.
marketingDistributionList
=
_dataList
this
.
ratio
=
_data
.
data
.
dataList
[
0
][
_queryItem
].
ratio
this
.
$refs
.
merchantChartRef
.
drawBar
(
_dataList
)
this
.
$refs
.
merchantChartRef
.
drawBar
(
_dataList
)
},
},
// 门店订单分布
selectPrice
(
val
)
{
async
getMarketingCrowdFundingMerDistr
(
queryItem
)
{
this
.
startPrice
=
val
.
startPrice
||
''
const
params
=
{
this
.
endPrice
=
val
.
endPrice
||
''
queryItem
:
queryItem
// num--门店数, orderNum--订单数, price--总金额
this
.
getMarketingCrowdFundingDistr
()
}
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
)
}
}
}
}
}
}
...
...
src/views/internal/components/ViewClue.vue
View file @
89009da
...
@@ -70,7 +70,8 @@ export default {
...
@@ -70,7 +70,8 @@ export default {
serviceList
,
serviceList
,
ratio
:
''
,
ratio
:
''
,
rationality
:
rationalityList
[
0
].
value
,
rationality
:
rationalityList
[
0
].
value
,
price
:
{}
price
:
{},
manageClueSalesAmountRationalityList
:
[]
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -79,7 +80,7 @@ export default {
...
@@ -79,7 +80,7 @@ export default {
methods
:
{
methods
:
{
init
()
{
init
()
{
this
.
getManageClueTrend
()
this
.
getManageClueTrend
()
this
.
getManageClueSalesAmountRationality
(
rationalityList
[
0
].
value
)
this
.
getManageClueSalesAmountRationality
(
'merData'
)
this
.
getManageClueAnalysis
()
this
.
getManageClueAnalysis
()
},
},
async
getManageClueTrend
()
{
async
getManageClueTrend
()
{
...
@@ -90,15 +91,16 @@ export default {
...
@@ -90,15 +91,16 @@ export default {
this
.
$refs
.
monthIncomeChartRef
.
drawLine
(
_dataList
)
this
.
$refs
.
monthIncomeChartRef
.
drawLine
(
_dataList
)
this
.
$refs
.
saleChartRef
.
drawBar
(
_dataList
)
this
.
$refs
.
saleChartRef
.
drawBar
(
_dataList
)
},
},
async
getManageClueSalesAmountRationality
(
queryItem
,
startPrice
,
endPrice
)
{
async
getManageClueSalesAmountRationality
(
queryItem
)
{
const
params
=
{
const
params
=
{
queryItem
startPrice
:
this
.
price
.
startPrice
||
''
,
endPrice
:
this
.
price
.
endPrice
||
''
}
}
if
(
startPrice
)
params
.
startPrice
=
startPrice
if
(
endPrice
)
params
.
endPrice
=
endPrice
const
_data
=
await
this
.
api
.
internal
.
getManageClueSalesAmountRationality
(
params
)
const
_data
=
await
this
.
api
.
internal
.
getManageClueSalesAmountRationality
(
params
)
const
_dataList
=
_data
.
data
.
dataList
[
0
].
finishedProductTrendList
const
_queryItem
=
queryItem
||
this
.
rationality
this
.
ratio
=
_data
.
data
.
dataList
[
0
].
ratio
this
.
manageClueSalesAmountRationalityList
=
_data
.
data
.
dataList
[
0
]
const
_dataList
=
_data
.
data
.
dataList
[
0
][
_queryItem
].
trendData
this
.
ratio
=
_data
.
data
.
dataList
[
0
][
_queryItem
].
ratio
this
.
$refs
.
rationalityChartRef
.
drawBar
(
_dataList
)
this
.
$refs
.
rationalityChartRef
.
drawBar
(
_dataList
)
},
},
async
getManageClueAnalysis
()
{
async
getManageClueAnalysis
()
{
...
@@ -108,14 +110,15 @@ export default {
...
@@ -108,14 +110,15 @@ export default {
},
},
selectRationality
(
val
)
{
selectRationality
(
val
)
{
console
.
log
(
val
)
console
.
log
(
val
)
this
.
getManageClueSalesAmountRationality
(
val
.
value
,
this
.
price
.
startPrice
,
this
.
price
.
endPrice
)
this
.
rationality
=
val
.
value
this
.
rationality
=
val
.
value
const
_dataList
=
this
.
manageClueSalesAmountRationalityList
[
val
.
value
].
trendData
this
.
$refs
.
rationalityChartRef
.
drawBar
(
_dataList
)
},
},
// 只有当是销售数(output)时才会触发此事件
// 只有当是销售数(output)时才会触发此事件
selectPrice
(
val
)
{
selectPrice
(
val
)
{
console
.
log
(
val
)
console
.
log
(
val
)
this
.
price
=
val
this
.
price
=
val
this
.
getManageClueSalesAmountRationality
(
this
.
rationality
,
val
.
startPrice
,
val
.
endPrice
)
this
.
getManageClueSalesAmountRationality
()
},
},
selectCorrelation
(
val
)
{
selectCorrelation
(
val
)
{
this
.
$set
(
this
.
correlationTooltips
,
'attrName'
,
val
.
value
)
this
.
$set
(
this
.
correlationTooltips
,
'attrName'
,
val
.
value
)
...
...
src/views/internal/components/constant.js
View file @
89009da
...
@@ -430,15 +430,15 @@ const equityPriceList = [
...
@@ -430,15 +430,15 @@ const equityPriceList = [
const
rationalityList
=
[
const
rationalityList
=
[
{
{
label
:
'门店数'
,
label
:
'门店数'
,
value
:
'
num
'
value
:
'
merData
'
},
},
{
{
label
:
'用户数'
,
label
:
'用户数'
,
value
:
'customer
Num
'
value
:
'customer
Data
'
},
},
{
{
label
:
'销售数'
,
label
:
'销售数'
,
value
:
'
output
'
value
:
'
incomeData
'
}
}
]
]
...
...
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