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 cb47d68d
authored
Sep 14, 2023
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
接口调整
1 parent
89009da1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
89 deletions
src/views/internal/components/BarOption.js
src/views/internal/components/DigitalLink.vue
src/views/internal/components/DigitalMarketingLeft.vue
src/views/internal/components/DigitalMarketingRight.vue
src/views/internal/components/ViewClue.vue
src/views/internal/components/ViewEdun.vue
src/views/internal/components/ViewIntersts.vue
src/views/internal/components/BarOption.js
View file @
cb47d68
...
...
@@ -32,7 +32,7 @@ function getBarOptions(obj, colorList, isMultiple, barwidth, formatYAxis) {
color
:
'#1d2a38'
}
},
//
splitNumber: 4,
splitNumber
:
4
,
axisLabel
:
{
// 这种做法就是在y轴的数据的值旁边拼接单位,貌似也挺方便的
formatter
:
function
(
value
)
{
...
...
src/views/internal/components/DigitalLink.vue
View file @
cb47d68
...
...
@@ -5,7 +5,7 @@
<StatisticsBox
:list=
"digitalLinkList"
></StatisticsBox>
<div
class=
"down-content"
>
<PullDownSelect
:selectList=
"selectList"
@
selectVal=
"selectVal"
></PullDownSelect>
<BarChart
ref=
"linkChartRef"
domId=
"linkChart"
:label=
"'statDate'"
:colorList=
"colorList"
:valueName=
"'num'"
></BarChart>
<BarChart
ref=
"linkChartRef"
height=
"22vh"
domId=
"linkChart"
:label=
"'statDate'"
:colorList=
"colorList"
:valueName=
"'num'"
></BarChart>
</div>
</div>
</div>
...
...
src/views/internal/components/DigitalMarketingLeft.vue
View file @
cb47d68
...
...
@@ -2,7 +2,7 @@
<div
class=
"marketing-left"
>
<PullDownSelect
ref=
"leftDownSelect"
:selectList=
"selectList"
@
selectVal=
"selectVal"
></PullDownSelect>
<inner-tab
class=
"inner-tab"
v-if=
"tabShow"
:list=
"tabList"
:width=
"6.4"
:itemPadding=
"0.5"
@
changeTab=
"changeTab"
></inner-tab>
<BarChart
v-if=
"chartShow"
ref=
"trendChartRef"
domId=
"trendChart"
:label=
"'statMonth'"
:height=
"'18vh'
"
:colorList=
"colorList"
:valueName=
"valueName"
></BarChart>
<BarChart
v-if=
"chartShow"
ref=
"trendChartRef"
domId=
"trendChart"
:label=
"'statMonth'"
height=
"22vh
"
:colorList=
"colorList"
:valueName=
"valueName"
></BarChart>
<LineChart
v-if=
"!chartShow"
ref=
"monthIncomeLineChartRef"
domId=
"monthIncomeLineChart"
:height=
"'18vh'"
:valName=
"valName"
></LineChart>
</div>
</
template
>
...
...
@@ -67,57 +67,20 @@ export default {
},
methods
:
{
// selectVal(val) {
// console.log(val)
// // this.tabShow = false
// switch (val.val) {
// case 'registerNum':
// this.chartShow = true
// this.valueName = 'registerNum'
// this.$refs.trendChartRef.drawBar(this.marketingTrendList)
// break
// case 'activeNum':
// this.chartShow = true
// this.valueName = 'activeNum'
// this.$nextTick(() => {
// this.$refs.trendChartRef.drawBar(this.marketingTrendList)
// })
// break
// case 'output':
// this.valName = 'output'
// this.chartShow = false
// this.tabShow = true
// this.$refs.monthIncomeLineChartRef.drawLine(this.marketingTrendList)
// break
// case 'activityNum':
// this.chartShow = true
// this.valueName = 'activityNum'
// this.$refs.trendChartRef.drawBar(this.marketingCrowdFundingTrendList)
// break
// case 'orderNum':
// this.chartShow = true
// // this.valueName = 'orderNum'
// this.$refs.trendChartRef.drawBar(this.marketingCrowdFundingTrendList)
// break
// case 'avgPrice':
// this.chartShow = true
// this.valueName = 'avgPrice'
// this.$refs.trendChartRef.drawBar(this.marketingCrowdFundingTrendList)
// // this.tabShow = true
// break
// }
// },
selectVal
(
val
)
{
const
actions
=
{
registerNum
:
()
=>
{
this
.
chartShow
=
true
this
.
tabShow
=
false
this
.
valueName
=
'registerNum'
this
.
$refs
.
trendChartRef
.
drawBar
(
this
.
marketingTrendList
)
this
.
$nextTick
(()
=>
{
this
.
$refs
.
trendChartRef
.
drawBar
(
this
.
marketingTrendList
)
})
},
activeNum
:
()
=>
{
this
.
chartShow
=
true
this
.
valueName
=
'activeNum'
this
.
tabShow
=
false
this
.
$nextTick
(()
=>
{
this
.
$refs
.
trendChartRef
.
drawBar
(
this
.
marketingTrendList
)
})
...
...
src/views/internal/components/DigitalMarketingRight.vue
View file @
cb47d68
...
...
@@ -114,6 +114,7 @@ export default {
// 1.3售后众筹
this
.
crowfundDistrType
=
'merData'
this
.
marketingDistributionList
=
this
.
marketingCrowdFundingDistr
.
merData
.
trendData
this
.
ratio
=
this
.
marketingCrowdFundingDistr
.
merData
.
ratio
}
break
case
1
:
...
...
@@ -125,12 +126,14 @@ export default {
// 1.3售后众筹
this
.
crowfundDistrType
=
'orderData'
this
.
marketingDistributionList
=
this
.
marketingCrowdFundingDistr
.
orderData
.
trendData
this
.
ratio
=
this
.
marketingCrowdFundingDistr
.
merData
.
ratio
}
break
case
2
:
// 只有1.3售后众筹
this
.
crowfundDistrType
=
'incomeData'
this
.
marketingDistributionList
=
this
.
marketingCrowdFundingDistr
.
incomeData
.
trendData
this
.
ratio
=
this
.
marketingCrowdFundingDistr
.
merData
.
ratio
break
}
this
.
$nextTick
(()
=>
{
...
...
src/views/internal/components/ViewClue.vue
View file @
cb47d68
...
...
@@ -112,6 +112,7 @@ export default {
console
.
log
(
val
)
this
.
rationality
=
val
.
value
const
_dataList
=
this
.
manageClueSalesAmountRationalityList
[
val
.
value
].
trendData
this
.
ratio
=
this
.
manageClueSalesAmountRationalityList
[
val
.
value
].
ratio
this
.
$refs
.
rationalityChartRef
.
drawBar
(
_dataList
)
},
// 只有当是销售数(output)时才会触发此事件
...
...
src/views/internal/components/ViewEdun.vue
View file @
cb47d68
...
...
@@ -36,39 +36,28 @@ export default {
ratio
:
0
,
startPrice
:
''
,
endPrice
:
''
,
queryItem
:
'brandnum'
EDqueryItem
:
''
,
ESalesAmountRationalitydataList
:
[]
}
},
created
()
{
// 按年统计客户销售金额的合理性
this
.
getManageESalesAmountRationality
()
this
.
getManageESalesAmountRationality
(
'brandData'
)
// 月收入趋势
this
.
getManageETrend
()
},
mounted
()
{
// this.$refs.edunChartRef.drawBar()
// this.$refs.edunLineChartRef.drawLine()
},
methods
:
{
// changeTab(val) {
// switch (val) {
// case 0:
// this.queryItem = 'brandnum'
// this.getManageESalesAmountRationality('brandnum')
// break
// case 1:
// this.queryItem = 'output'
// this.getManageESalesAmountRationality('output')
// break
// }
// },
changeTab
(
val
)
{
const
queryItems
=
[
'brandnum'
,
'output'
]
this
.
queryItem
=
queryItems
[
val
]
this
.
getManageESalesAmountRationality
(
this
.
queryItem
)
const
queryItems
=
[
'brandData'
,
'incomeData'
]
this
.
EDqueryItem
=
queryItems
[
val
]
const
_dataList
=
this
.
ESalesAmountRationalitydataList
[
this
.
EDqueryItem
].
trendData
this
.
ratio
=
this
.
ESalesAmountRationalitydataList
[
this
.
EDqueryItem
].
ratio
this
.
$refs
.
edunChartRef
.
drawBar
(
_dataList
)
},
selectPrice
(
val
)
{
console
.
log
(
val
)
...
...
@@ -78,13 +67,14 @@ export default {
},
async
getManageESalesAmountRationality
(
queryItem
)
{
const
params
=
{
queryItem
:
queryItem
||
this
.
queryItem
,
// brandnum--品牌总数;output--总金额
startPrice
:
this
.
startPrice
,
endPrice
:
this
.
endPrice
}
const
_data
=
await
this
.
api
.
internal
.
getManageESalesAmountRationality
(
params
)
const
_dataList
=
_data
.
data
.
dataList
[
0
].
finishedProductTrendList
this
.
ratio
=
_data
.
data
.
dataList
[
0
].
ratio
const
_queryItem
=
queryItem
||
this
.
EDqueryItem
this
.
ESalesAmountRationalitydataList
=
_data
.
data
.
dataList
[
0
]
const
_dataList
=
_data
.
data
.
dataList
[
0
][
_queryItem
].
trendData
this
.
ratio
=
_data
.
data
.
dataList
[
0
][
_queryItem
].
ratio
this
.
$refs
.
edunChartRef
.
drawBar
(
_dataList
)
},
async
getManageETrend
()
{
...
...
src/views/internal/components/ViewIntersts.vue
View file @
cb47d68
...
...
@@ -38,50 +38,41 @@ export default {
attrName
:
'num'
},
ratio
:
0
,
queryItem
:
'num
'
,
equityItem
:
'
'
,
startPrice
:
''
,
endPrice
:
''
endPrice
:
''
,
manageMemberSalesAmountList
:
[]
}
},
created
()
{
// 按年统计客户销售金额的合理性
this
.
getManageMemberSalesAmountRationality
()
this
.
getManageMemberSalesAmountRationality
(
'merData'
)
// 月收入趋势
this
.
getManageMemberTrend
()
},
mounted
()
{
// this.$refs.equityChartRef.drawBar()
// this.$refs.equityLineChartRef.drawLine()
},
methods
:
{
changeTab
(
val
)
{
switch
(
val
)
{
case
0
:
this
.
getManageMemberSalesAmountRationality
(
'num'
)
this
.
queryItem
=
'num'
break
case
1
:
this
.
getManageMemberSalesAmountRationality
(
'customerNum'
)
this
.
queryItem
=
'customerNum'
break
case
2
:
this
.
getManageMemberSalesAmountRationality
(
'output'
)
this
.
queryItem
=
'output'
break
}
const
queryItems
=
[
'merData'
,
'customerData'
,
'incomeData'
]
this
.
equityItem
=
queryItems
[
val
]
const
_dataList
=
this
.
manageMemberSalesAmountList
[
this
.
equityItem
].
trendData
this
.
ratio
=
this
.
manageMemberSalesAmountList
[
this
.
equityItem
].
ratio
this
.
$refs
.
equityChartRef
.
drawBar
(
_dataList
)
},
async
getManageMemberSalesAmountRationality
(
queryItem
)
{
const
params
=
{
queryItem
:
queryItem
||
this
.
queryItem
,
// num--门店数;customerNum--会员人数;output--销售收入
startPrice
:
this
.
startPrice
,
endPrice
:
this
.
endPrice
}
const
_data
=
await
this
.
api
.
internal
.
getManageMemberSalesAmountRationality
(
params
)
const
_dataList
=
_data
.
data
.
dataList
[
0
].
finishedProductTrendList
this
.
ratio
=
_data
.
data
.
dataList
[
0
].
ratio
const
_queryItem
=
queryItem
||
this
.
equityItem
this
.
manageMemberSalesAmountList
=
_data
.
data
.
dataList
[
0
]
const
_dataList
=
_data
.
data
.
dataList
[
0
][
_queryItem
].
trendData
this
.
ratio
=
_data
.
data
.
dataList
[
0
][
_queryItem
].
ratio
this
.
$refs
.
equityChartRef
.
drawBar
(
_dataList
)
},
async
getManageMemberTrend
()
{
...
...
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