Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
rd-data-screen
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 afc1b86c
authored
May 09, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
更新sass+1.2 1.3
1 parent
a45c0a9a
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
413 additions
and
79 deletions
src/api/modules/crowdFunding.js
src/api/modules/expandedGold.js
src/components/barChart.vue
src/components/boxChart.vue
src/components/options.js
src/views/sassPlus/componts/sassPlusContent.vue
src/views/sassPlus/componts/selectContainer.vue
src/views/sassPlus/componts/selectCpn.vue
src/views/sassPlus/conversionPlus/categoryDistribution.vue
src/views/sassPlus/conversionPlus/conversionLeft.vue
src/views/sassPlus/conversionPlus/monthlyTrend.vue
src/views/sassPlus/conversionPlus/orderInfo.vue
src/views/sassPlus/expandedGold/expandedGoldContent.vue
src/views/sassPlus/expandedGold/orderRank.vue
src/views/sassPlus/index.vue
src/api/modules/crowdFunding.js
View file @
afc1b86
// 获取订单总数、今年新增订单数、收入总额、活动总数
// 获取订单总数、今年新增订单数、收入总额、活动总数
const
getTotal
=
params
=>
{
const
getTotal
=
params
=>
{
return
window
.
$HTTP
.
get
(
'
/
CrowdFunding/getTotal'
,
params
)
return
window
.
$HTTP
.
get
(
'CrowdFunding/getTotal'
,
params
)
}
}
// 近12个月订单量、订单收入趋势
const
getOrderMonthlyTrend
=
params
=>
{
// 获取月份
return
window
.
$HTTP
.
get
(
'/CrowdFunding/getOrderMonthlyTrend'
,
params
)
const
getMonth
=
params
=>
{
return
window
.
$HTTP
.
get
(
'/CrowdFunding/getMonth'
,
params
)
}
}
// 获取商品统计——xx月前5品类
// 获取商品统计——xx月前5品类
const
getGoodsTop5Monthly
=
params
=>
{
const
getGoodsTop5Monthly
=
params
=>
{
return
window
.
$HTTP
.
get
(
'
/
CrowdFunding/getGoodsTop5Monthly'
,
params
)
return
window
.
$HTTP
.
get
(
'CrowdFunding/getGoodsTop5Monthly'
,
params
)
}
}
// // 每月各类商品订单信息
// 活动统计_xx月车型排名钱5
// const getGoodsOrderinfoMonthly = params => {
const
getVehicleBrandTop5Monthly
=
params
=>
{
// return window.$HTTP.get('/CrowdFunding/getGoodsOrderinfoMonthly', params)
return
window
.
$HTTP
.
get
(
'CrowdFunding/getVehicleBrandTop5Monthly'
,
params
)
// }
}
// 获取商品统计——整体品类
分布
// 获取商品统计——整体品类
排名
//
const getAllGoodsDistribution = params => {
const
getAllGoodsDistribution
=
params
=>
{
// return window.$HTTP.get('/CrowdFunding/getVehicleBrandRanking
', params)
return
window
.
$HTTP
.
get
(
'CrowdFunding/getAllGoodsDistribution
'
,
params
)
//
}
}
// 活动统计_整体车型排名
const
getVehicleBrandRanking
=
params
=>
{
return
window
.
$HTTP
.
get
(
'CrowdFunding/getVehicleBrandRanking'
,
params
)
}
//
获取月份
//
近12个月订单量、订单收入趋势
const
get
Month
=
params
=>
{
const
get
OrderMonthlyTrend
=
params
=>
{
return
window
.
$HTTP
.
get
(
'
/CrowdFunding/getMonth
'
,
params
)
return
window
.
$HTTP
.
get
(
'
CrowdFunding/getOrderMonthlyTrend
'
,
params
)
}
}
export
default
{
export
default
{
getTotal
,
getTotal
,
getOrderMonthlyTrend
,
getGoodsTop5Monthly
,
getGoodsTop5Monthly
,
// getGoodsOrderinfoMonthly,
getMonth
,
// getAllGoodsDistribution,
getVehicleBrandTop5Monthly
,
getMonth
getAllGoodsDistribution
,
getVehicleBrandRanking
,
getOrderMonthlyTrend
}
}
src/api/modules/expandedGold.js
0 → 100644
View file @
afc1b86
const
getTotal
=
params
=>
{
return
window
.
$HTTP
.
get
(
'ExpandedGold/getTotal'
,
params
)
}
const
getMonth
=
params
=>
{
return
window
.
$HTTP
.
get
(
'ExpandedGold/getMonth'
,
params
)
}
// 优惠券统计_xxx月订单量排名前5的优惠券
const
getTop5CouponMonthly
=
params
=>
{
return
window
.
$HTTP
.
get
(
'ExpandedGold/getTop5CouponMonthly\n'
,
params
)
}
// 活动(链接)统计_xx月订单量排名前5活动场次
const
getActivitiesMonthly
=
params
=>
{
return
window
.
$HTTP
.
get
(
'ExpandedGold/getActivitiesMonthly'
,
params
)
}
// 活动(链接)统计_订单量排名前10的活动
const
getTop5Activities
=
params
=>
{
return
window
.
$HTTP
.
get
(
'ExpandedGold/getTop5Activities'
,
params
)
}
// 优惠券统计_订单量排名(前10)的优惠券
const
getTop10Coupon
=
params
=>
{
return
window
.
$HTTP
.
get
(
'ExpandedGold/getTop10Coupon'
,
params
)
}
const
getOrderMonthlyTrend
=
params
=>
{
return
window
.
$HTTP
.
get
(
'ExpandedGold/getOrderMonthlyTrend'
,
params
)
}
export
default
{
getTotal
,
getMonth
,
getTop5Activities
,
getTop5CouponMonthly
,
getActivitiesMonthly
,
getTop10Coupon
,
getOrderMonthlyTrend
}
src/components/barChart.vue
View file @
afc1b86
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
<
template
>
<
template
>
<div
class=
"line-box"
>
<div
class=
'line-box'
>
<div
:id=
"domId"
class=
"line-chart"
:style=
"
{ height: boxHeight }"
>
</div>
<div
:id=
'domId'
class=
'line-chart'
:style=
'
{ height: boxHeight }'
>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -26,6 +26,7 @@ import datas from '@/utils/data'
...
@@ -26,6 +26,7 @@ import datas from '@/utils/data'
import
*
as
echarts
from
'echarts'
import
*
as
echarts
from
'echarts'
import
utils
from
'../utils/util'
import
utils
from
'../utils/util'
import
{
getBarOptions
,
getBarReverseOptions
}
from
'./options'
import
{
getBarOptions
,
getBarReverseOptions
}
from
'./options'
export
default
{
export
default
{
name
:
'barChart'
,
name
:
'barChart'
,
props
:
{
props
:
{
...
@@ -33,6 +34,10 @@ export default {
...
@@ -33,6 +34,10 @@ export default {
type
:
String
,
type
:
String
,
default
:
'line-chart'
default
:
'line-chart'
},
},
labelName
:
{
type
:
String
,
default
:
'goodsName'
},
rotate
:
{
rotate
:
{
type
:
Number
,
type
:
Number
,
default
:
0
default
:
0
...
@@ -111,12 +116,12 @@ export default {
...
@@ -111,12 +116,12 @@ export default {
watch
:
{
watch
:
{
analysisList
:
{
analysisList
:
{
handler
()
{
handler
()
{
const
{
rotate
,
analysisList
}
=
this
const
{
rotate
,
analysisList
,
labelName
}
=
this
console
.
log
(
this
.
analysisList
)
const
obj
=
{
const
obj
=
{
rotate
,
rotate
,
analysisList
,
analysisList
,
ValueAnalysis
ValueAnalysis
,
labelName
}
}
this
.
lineOptions
=
this
.
revese
?
getBarReverseOptions
(
obj
)
:
getBarOptions
(
obj
)
this
.
lineOptions
=
this
.
revese
?
getBarReverseOptions
(
obj
)
:
getBarOptions
(
obj
)
this
.
chartBindEvent
()
this
.
chartBindEvent
()
...
@@ -177,13 +182,15 @@ export default {
...
@@ -177,13 +182,15 @@ export default {
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
'scss'
scoped
>
.line-box
{
.line-box
{
height
:
100%
;
height
:
100%
;
color
:
#ffffff
;
color
:
#ffffff
;
.txt-orange
{
.txt-orange
{
color
:
#eb6001
;
color
:
#eb6001
;
}
}
.line-chart
{
.line-chart
{
width
:
100%
;
width
:
100%
;
}
}
...
...
src/components/boxChart.vue
View file @
afc1b86
...
@@ -124,6 +124,7 @@ export default {
...
@@ -124,6 +124,7 @@ export default {
},
},
// 鼠标移入时停止滚动
// 鼠标移入时停止滚动
mouseenter
()
{
mouseenter
()
{
console
.
log
(
this
.
timer2
)
clearInterval
(
this
.
timer2
)
clearInterval
(
this
.
timer2
)
},
},
// 鼠标移开继续滚动
// 鼠标移开继续滚动
...
...
src/components/options.js
View file @
afc1b86
...
@@ -89,17 +89,7 @@ function getBarOptions(obj) {
...
@@ -89,17 +89,7 @@ function getBarOptions(obj) {
}
}
function
getBarReverseOptions
(
obj
)
{
function
getBarReverseOptions
(
obj
)
{
const
{
analysisList
,
ValueAnalysis
}
=
obj
const
{
analysisList
,
labelName
}
=
obj
// const value = Object.values(analysisList)
const
entries
=
Object
.
entries
(
analysisList
)
ValueAnalysis
.
forEach
(
sis
=>
{
entries
.
forEach
(
key
=>
{
if
(
sis
.
name
==
key
[
0
])
{
sis
.
value
=
key
[
1
]
}
})
})
const
value
=
utils
.
deepClone
(
ValueAnalysis
).
sort
((
a
,
b
)
=>
b
.
order
-
a
.
order
)
var
options
=
{
var
options
=
{
tooltip
:
{
tooltip
:
{
trigger
:
'axis'
,
trigger
:
'axis'
,
...
@@ -133,12 +123,12 @@ function getBarReverseOptions(obj) {
...
@@ -133,12 +123,12 @@ function getBarReverseOptions(obj) {
axisLine
:
{
axisLine
:
{
show
:
false
show
:
false
},
},
data
:
value
.
map
(
item
=>
item
.
label
)
data
:
analysisList
.
map
(
item
=>
item
[
labelName
]
)
},
},
grid
:
{
grid
:
{
left
:
'8%'
,
left
:
'8%'
,
right
:
'0%'
,
right
:
'0%'
,
top
:
'
0
%'
,
top
:
'
2
%'
,
bottom
:
'0%'
,
bottom
:
'0%'
,
containLabel
:
true
containLabel
:
true
},
},
...
@@ -175,7 +165,7 @@ function getBarReverseOptions(obj) {
...
@@ -175,7 +165,7 @@ function getBarReverseOptions(obj) {
}
}
}
}
},
},
data
:
value
.
map
(
item
=>
item
.
value
)
data
:
analysisList
.
map
(
item
=>
item
.
totalNum
)
}
}
]
]
}
}
...
@@ -357,7 +347,7 @@ function getLineDoubleOptions(obj) {
...
@@ -357,7 +347,7 @@ function getLineDoubleOptions(obj) {
interval
:
5
,
interval
:
5
,
axisLabel
:
{
axisLabel
:
{
//y轴上带的单位
//y轴上带的单位
color
:
'#F5AA01'
,
color
:
'#F5AA01'
// formatter: '{value}'
// formatter: '{value}'
},
},
//轴线
//轴线
...
@@ -366,18 +356,18 @@ function getLineDoubleOptions(obj) {
...
@@ -366,18 +356,18 @@ function getLineDoubleOptions(obj) {
},
},
//分割线
//分割线
splitLine
:
{
splitLine
:
{
show
:
false
show
:
false
// lineStyle: {
// lineStyle: {
// color: '#2F314F'
// color: '#2F314F'
// }
// }
}
,
}
},
},
{
{
type
:
'value'
,
type
:
'value'
,
// name: 'RH%',
// name: 'RH%',
axisLabel
:
{
axisLabel
:
{
//y轴上带的单位
//y轴上带的单位
color
:
'#769EFF'
,
color
:
'#769EFF'
// formatter: '{value}'
// formatter: '{value}'
},
},
//轴线
//轴线
...
@@ -386,11 +376,11 @@ function getLineDoubleOptions(obj) {
...
@@ -386,11 +376,11 @@ function getLineDoubleOptions(obj) {
},
},
//分割线
//分割线
splitLine
:
{
splitLine
:
{
show
:
false
show
:
false
// lineStyle: {
// lineStyle: {
// color: '#2F314F'
// color: '#2F314F'
// }
// }
}
,
}
}
}
],
],
...
@@ -704,7 +694,7 @@ function lineAndBarOptions(list) {
...
@@ -704,7 +694,7 @@ function lineAndBarOptions(list) {
grid
:
{
grid
:
{
left
:
'6%'
,
left
:
'6%'
,
right
:
'5%'
,
right
:
'5%'
,
top
:
'
6
%'
,
top
:
'
10
%'
,
bottom
:
'1%'
,
bottom
:
'1%'
,
containLabel
:
true
containLabel
:
true
},
},
...
...
src/views/sassPlus/componts/sassPlusContent.vue
View file @
afc1b86
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<div
class=
'content'
>
<div
class=
'content'
>
<select-container></select-container>
<select-container></select-container>
<conversion-plus-content
v-if=
'isShowConversion'
></conversion-plus-content>
<conversion-plus-content
v-if=
'isShowConversion'
></conversion-plus-content>
<expanded-gold-content
v-else
></expanded-gold-content>
</div>
</div>
</
template
>
</
template
>
...
@@ -9,10 +10,12 @@
...
@@ -9,10 +10,12 @@
import
SelectContainer
from
'views/sassPlus/componts/selectContainer'
import
SelectContainer
from
'views/sassPlus/componts/selectContainer'
import
ConversionPlusContent
from
'views/sassPlus/conversionPlus/conversionPlusContent'
import
ConversionPlusContent
from
'views/sassPlus/conversionPlus/conversionPlusContent'
import
ExpandedGoldContent
from
'views/sassPlus/expandedGold/expandedGoldContent'
export
default
{
export
default
{
// name: 'sassPlusContent',
// name: 'sassPlusContent',
components
:
{
components
:
{
ExpandedGoldContent
,
ConversionPlusContent
,
ConversionPlusContent
,
SelectContainer
SelectContainer
},
},
...
...
src/views/sassPlus/componts/selectContainer.vue
View file @
afc1b86
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
:selectArr=
'monthList'
:selectArr=
'monthList'
:selectType=
"'months'"
:selectType=
"'months'"
:label-name=
"'month'"
:label-name=
"'month'"
:showSelect =
'true'
:val-name=
"'month'"
></SelectCpn>
:val-name=
"'month'"
></SelectCpn>
</div>
</div>
</
template
>
</
template
>
...
...
src/views/sassPlus/componts/selectCpn.vue
View file @
afc1b86
...
@@ -29,6 +29,10 @@ export default {
...
@@ -29,6 +29,10 @@ export default {
type
:
String
,
type
:
String
,
default
:
''
default
:
''
},
},
showSelect
:
{
type
:
Boolean
,
default
:
false
},
selectArr
:
{
selectArr
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[]
default
:
()
=>
[]
...
@@ -45,20 +49,30 @@ export default {
...
@@ -45,20 +49,30 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
selStr
:
''
selStr
:
''
,
showFirstSelStaus
:
false
}
}
},
},
watch
:
{
watch
:
{
// selectArr: {
showFirstSelStaus
:
{
// handler(newval, oldval) {
handler
(
newval
,
oldval
)
{
// this.selStr = this.selectArr[0][this.valName]
if
(
newval
==
true
&&
this
.
showSelect
==
true
)
{
// }
this
.
selStr
=
this
.
selectArr
[
0
][
this
.
valName
]
// }
}
if
(
newval
==
false
&&
this
.
showSelect
==
true
)
{
this
.
selStr
=
''
}
}
}
},
},
mounted
()
{
mounted
()
{
if
(
this
.
selectArr
.
length
)
{
if
(
this
.
selectArr
.
length
)
{
this
.
selStr
=
this
.
selectArr
[
0
][
this
.
valName
]
this
.
selStr
=
this
.
selectArr
[
0
][
this
.
valName
]
}
}
this
.
$bus
.
$on
(
'changeBussiness'
,
data
=>
{
const
{
bussinessType
}
=
data
this
.
showFirstSelStaus
=
bussinessType
==
'expandedGold'
||
bussinessType
==
'crowdFunding'
})
},
},
methods
:
{
methods
:
{
...
@@ -74,7 +88,7 @@ export default {
...
@@ -74,7 +88,7 @@ export default {
this
.
$bus
.
$emit
(
'changeBussiness'
,
{
bussinessTitle
:
title
+
'业务'
,
bussinessType
:
this
.
selStr
})
this
.
$bus
.
$emit
(
'changeBussiness'
,
{
bussinessTitle
:
title
+
'业务'
,
bussinessType
:
this
.
selStr
})
break
break
case
'system'
:
case
'system'
:
this
.
$bus
.
$emit
(
'changeSystem'
,
{})
this
.
$bus
.
$emit
(
'changeSystem'
,
{
systemType
:
this
.
selStr
})
break
break
case
'months'
:
case
'months'
:
this
.
$bus
.
$emit
(
'changeMonths'
,
{
month
:
this
.
selStr
})
this
.
$bus
.
$emit
(
'changeMonths'
,
{
month
:
this
.
selStr
})
...
...
src/views/sassPlus/conversionPlus/categoryDistribution.vue
View file @
afc1b86
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
<div
class=
'category-distribution'
>
<div
class=
'category-distribution'
>
<view-sub-title
title=
'商品品类订单数前10'
/>
<view-sub-title
title=
'商品品类订单数前10'
/>
<bar-chart
domId=
'analyseChart'
boxHeight=
'14.54vh'
:analysisList=
'allGoodsDistribution'
></bar-chart>
<bar-chart
domId=
'analyseChart'
boxHeight=
'14.54vh'
:analysisList=
'allGoodsDistribution'
></bar-chart>
<!--
<pie-chart
height=
'12vh'
:id=
"'glGoods'"
:list=
'allGoodsDistribution'
:keys=
'chart.keys'
></pie-chart>
-->
<!--
<Legend
:list=
'allGoodsDistribution'
:showName=
"'goodsName'"
></Legend>
-->
</div>
</div>
</
template
>
</
template
>
...
@@ -22,7 +20,6 @@ export default {
...
@@ -22,7 +20,6 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
$bus
.
$on
(
'allGoodsDistribution'
,
data
=>
{
this
.
$bus
.
$on
(
'allGoodsDistribution'
,
data
=>
{
console
.
log
(
data
)
this
.
allGoodsDistribution
=
data
.
allGoodsDistribution
this
.
allGoodsDistribution
=
data
.
allGoodsDistribution
})
})
}
}
...
...
src/views/sassPlus/conversionPlus/conversionLeft.vue
View file @
afc1b86
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
>
>
<div
ref=
'forwardContent'
class=
'scroll_dv'
>
<div
ref=
'forwardContent'
class=
'scroll_dv'
>
<div
v-for=
'(item, index) in boxList'
:key=
'index'
class=
'list_item dfac'
>
<div
v-for=
'(item, index) in boxList'
:key=
'index'
class=
'list_item dfac'
>
<!-- @click='selectData(item)'-->
<!-- @click='selectData(item)'-->
<div
<div
class=
'dataList'
class=
'dataList'
:class=
"currentIndex === index? 'selectMerchant' : ''"
:class=
"currentIndex === index? 'selectMerchant' : ''"
...
@@ -59,6 +59,10 @@ export default {
...
@@ -59,6 +59,10 @@ export default {
this
.
$bus
.
$on
(
'changeMonths'
,
data
=>
{
this
.
$bus
.
$on
(
'changeMonths'
,
data
=>
{
this
.
getGoodsOrderinfoMonthly
(
this
.
copyBussinessType
,
data
.
month
)
this
.
getGoodsOrderinfoMonthly
(
this
.
copyBussinessType
,
data
.
month
)
})
})
this
.
$bus
.
$on
(
'changeBussiness'
,
data
=>
{
clearInterval
(
this
.
timer2
)
})
},
},
destroyed
()
{
destroyed
()
{
// 离开时销毁定时器
// 离开时销毁定时器
...
@@ -93,9 +97,9 @@ export default {
...
@@ -93,9 +97,9 @@ export default {
// 页面第一次进入或者窗口大小变化时,获取滚动相关元素的高度
// 页面第一次进入或者窗口大小变化时,获取滚动相关元素的高度
regainHeight
()
{
regainHeight
()
{
// 获取需要滚动元素的真实高度
// 获取需要滚动元素的真实高度
this
.
scrollContentHeight
=
this
.
$refs
.
forwardContent
.
getBoundingClientRect
().
height
this
.
scrollContentHeight
=
this
.
$refs
.
forwardContent
?
this
.
$refs
.
forwardContent
.
getBoundingClientRect
().
height
:
''
// 获取限制高度滚动容器的真实高度
// 获取限制高度滚动容器的真实高度
this
.
scrollBoxHeight
=
this
.
$refs
.
forward
ScrollBox
.
getBoundingClientRect
().
height
this
.
scrollBoxHeight
=
this
.
$refs
.
forward
Content
?
this
.
$refs
.
forwardScrollBox
.
getBoundingClientRect
().
height
:
''
// 可以滚动的高度
// 可以滚动的高度
this
.
scrollableHeight
=
this
.
scrollContentHeight
-
this
.
scrollBoxHeight
this
.
scrollableHeight
=
this
.
scrollContentHeight
-
this
.
scrollBoxHeight
console
.
log
(
'内容高度'
,
this
.
scrollContentHeight
,
'盒子高度'
,
this
.
scrollBoxHeight
,
'可以滚动的高度'
,
this
.
scrollableHeight
)
console
.
log
(
'内容高度'
,
this
.
scrollContentHeight
,
'盒子高度'
,
this
.
scrollBoxHeight
,
'可以滚动的高度'
,
this
.
scrollableHeight
)
...
@@ -106,10 +110,10 @@ export default {
...
@@ -106,10 +110,10 @@ export default {
this
.
timer2
=
setInterval
(()
=>
{
this
.
timer2
=
setInterval
(()
=>
{
if
(
this
.
scrollableHeight
>=
this
.
scrollTop
)
{
if
(
this
.
scrollableHeight
>=
this
.
scrollTop
)
{
// 当为滚动到结尾时滚动
// 当为滚动到结尾时滚动
this
.
scrollTop
=
this
.
$refs
.
forwardScrollBox
.
scrollTop
+=
1
this
.
scrollTop
=
this
.
$refs
.
forwardScrollBox
?
this
.
$refs
.
forwardScrollBox
.
scrollTop
+=
1
:
''
}
else
{
}
else
{
// 滚动结束,清除当前定时器,scrollTop重置为0,继续滚动
// 滚动结束,清除当前定时器,scrollTop重置为0,继续滚动
this
.
scrollTop
=
this
.
$refs
.
forwardScrollBox
.
scrollTop
=
0
this
.
scrollTop
=
this
.
$refs
.
forwardScrollBox
?
this
.
$refs
.
forwardScrollBox
.
scrollTop
=
0
:
''
clearInterval
(
this
.
timer2
)
clearInterval
(
this
.
timer2
)
this
.
autoScroll
()
this
.
autoScroll
()
}
}
...
...
src/views/sassPlus/conversionPlus/monthlyTrend.vue
View file @
afc1b86
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
class=
'monthly-trend'
>
<div
class=
'monthly-trend'
>
<view-sub-title
title=
'订单月度趋势'
/>
<view-sub-title
title=
'订单月度趋势'
/>
<div
class=
'line-bar-chart'
>
<div
class=
'line-bar-chart'
>
<LineBar
:domId=
'domId'
:dataList=
'monthlyTrend'
boxHeight=
'42vh
'
></LineBar>
<LineBar
:domId=
'domId'
:dataList=
'monthlyTrend'
:boxHeight=
'boxHeight
'
></LineBar>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -12,6 +12,12 @@ import LineBar from 'components/lineBar'
...
@@ -12,6 +12,12 @@ import LineBar from 'components/lineBar'
export
default
{
export
default
{
name
:
'MonthlyTrend'
,
name
:
'MonthlyTrend'
,
props
:
{
boxHeight
:
{
type
:
String
,
default
:
'42vh'
}
},
components
:
{
components
:
{
LineBar
LineBar
},
},
...
@@ -27,6 +33,7 @@ export default {
...
@@ -27,6 +33,7 @@ export default {
})
})
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
src/views/sassPlus/conversionPlus/orderInfo.vue
View file @
afc1b86
...
@@ -15,6 +15,10 @@
...
@@ -15,6 +15,10 @@
<div
class=
'business-title'
>
订单总金额
</div>
<div
class=
'business-title'
>
订单总金额
</div>
<div
class=
'business-number'
>
{{
orderList
.
totalMoney
}}
</div>
<div
class=
'business-number'
>
{{
orderList
.
totalMoney
}}
</div>
</div>
</div>
<div
class=
'business-border'
v-if=
'orderList.activityTimes'
>
<div
class=
'business-title'
>
活动总数
</div>
<div
class=
'business-number'
>
{{
orderList
.
activityTimes
}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -29,8 +33,8 @@ export default {
...
@@ -29,8 +33,8 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
$bus
.
$off
(
'orderList'
)
this
.
$bus
.
$on
(
'orderList'
,
data
=>
{
this
.
$bus
.
$on
(
'orderList'
,
data
=>
{
console
.
log
(
data
)
this
.
orderList
=
data
.
orderList
this
.
orderList
=
data
.
orderList
})
})
...
@@ -42,7 +46,8 @@ d
...
@@ -42,7 +46,8 @@ d
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
'scss'
>
.business-desc-wrap
{
.business-desc-wrap
{
padding-top
:
1vw
;
padding-top
:
1vw
;
width
:
40vw
;
//
width
:
40vw
;
width
:
80%
;
.business-top
{
.business-top
{
justify-content
:
space-around
;
justify-content
:
space-around
;
//
text-align
:
center
;
//
text-align
:
center
;
...
...
src/views/sassPlus/expandedGold/expandedGoldContent.vue
0 → 100644
View file @
afc1b86
<
template
>
<div
class=
'expande-wrap'
>
<order-info
/>
<div
class=
'rank-wrap'
>
<order-rank
:analysisList=
'topLeftList'
:title=
'topLeftTitle'
:domId=
"'orderNumFiveDom'"
:labelName=
'topLeftLabel'
:revese=
'true'
></order-rank>
<order-rank
:analysisList=
'topRightList'
:title=
'topRightTitle'
:domId=
"'discountCouponFiveDom'"
:labelName=
'topRightLabel'
:revese=
'true'
></order-rank>
</div>
<div
class=
'rank-wrap'
>
<order-rank
:analysisList=
'top10LeftList'
:title=
'top10LeftTitle'
:domId=
"'orderNumTenDom'"
:labelName=
'top10LeftLabel'
:revese=
'true'
></order-rank>
<order-rank
:analysisList=
'top10RightList'
:title=
'top10RightTitle'
:domId=
"'discountCouponTenDom'"
:labelName=
'top10RightLabel'
:revese=
'true'
></order-rank>
</div>
<monthly-trend
class=
'monthly-trend'
:boxHeight=
"'20vh'"
></monthly-trend>
</div>
</
template
>
<
script
>
import
OrderInfo
from
'views/sassPlus/conversionPlus/orderInfo'
import
OrderRank
from
'views/sassPlus/expandedGold/orderRank'
import
data
from
'utils/data'
import
MonthlyTrend
from
'views/sassPlus/conversionPlus/monthlyTrend'
export
default
{
name
:
'ExpandedGoldContent'
,
components
:
{
MonthlyTrend
,
OrderRank
,
OrderInfo
},
data
()
{
return
{
topLeftList
:
[],
topRightList
:
[],
topLeftTitle
:
''
,
topRightTitle
:
''
,
topLeftLabel
:
''
,
topRightLabel
:
''
,
top10LeftList
:
[],
top10RightList
:
[],
top10LeftTitle
:
''
,
top10RightTitle
:
''
,
top10LeftLabel
:
''
,
top10RightLabel
:
''
}
},
mounted
()
{
this
.
$bus
.
$on
(
'topFiveRankingTopLeft'
,
data
=>
{
const
{
list
,
bussinessType
}
=
data
this
.
topLeftList
=
list
this
.
topLeftTitle
=
bussinessType
==
'expandedGold'
?
'月订单量排名前五的活动'
:
'每月商品订单排名前5'
this
.
topLeftLabel
=
bussinessType
==
'expandedGold'
?
'activityName'
:
'goodsName'
})
this
.
$bus
.
$on
(
'topFiveRankingTopRight'
,
data
=>
{
const
{
list
,
bussinessType
}
=
data
this
.
topRightList
=
list
this
.
topRightTitle
=
bussinessType
==
'expandedGold'
?
'月优惠订单排名前5'
:
'每月各车型订单排名前5'
this
.
topRightLabel
=
bussinessType
==
'expandedGold'
?
'couponName'
:
'vehicleBrand'
})
this
.
$bus
.
$on
(
'Top10Right'
,
data
=>
{
const
{
list
,
bussinessType
}
=
data
this
.
top10RightList
=
list
this
.
top10RightTitle
=
bussinessType
==
'expandedGold'
?
'优惠券订单量排名前10'
:
'各车型订单排名前10'
this
.
top10RightLabel
=
bussinessType
==
'expandedGold'
?
'couponName'
:
'vehicleBrand'
})
this
.
$bus
.
$on
(
'Top10Left'
,
data
=>
{
const
{
list
,
bussinessType
}
=
data
this
.
top10LeftList
=
list
this
.
top10LeftTitle
=
bussinessType
==
'expandedGold'
?
'订单量排名前10的活动'
:
'商品订单排名前10'
this
.
top10LeftLabel
=
bussinessType
==
'expandedGold'
?
'activityName'
:
'goodsName'
})
}
}
</
script
>
<
style
lang=
'scss'
scoped
>
.expande-wrap
{
height
:
85vh
;
background-image
:
url('./../../../assets/images/bg-1.png')
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
overflow
:
hidden
;
padding
:
0
16px
;
.rank-wrap
{
display
:
grid
;
grid-template-columns
:
50%
50%
;
//
justify-content
:
space-between
;
}
.monthly-trend
{
margin-top
:
3vh
;
}
}
</
style
>
src/views/sassPlus/expandedGold/orderRank.vue
0 → 100644
View file @
afc1b86
<
template
>
<div
class=
'orderRank-warp'
>
<view-sub-title
:title=
'title'
/>
<bar-chart
class=
'rank-chart'
:domId=
'domId'
:labelName=
'labelName'
boxHeight=
'14.54vh'
:analysisList=
'analysisList'
:revese=
'revese'
></bar-chart>
</div>
</
template
>
<
script
>
export
default
{
name
:
'OrderRank'
,
props
:
{
title
:
{
type
:
String
,
default
:
''
},
domId
:
{
type
:
String
,
default
:
''
},
revese
:
{
type
:
Boolean
,
default
:
true
},
labelName
:
{
type
:
String
,
default
:
''
},
analysisList
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
data
()
{
return
{
list
:
[]
}
},
methods
:
{},
mounted
()
{
}
}
</
script
>
<
style
scoped
>
.orderRank-warp
{
width
:
42vw
;
.rank-chart
{
margin-top
:
1vh
;
}
}
</
style
>
src/views/sassPlus/index.vue
View file @
afc1b86
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<view-title
:title=
'bussinessTitle'
>
<view-title
:title=
'bussinessTitle'
>
</view-title>
</view-title>
</
template
>
</
template
>
<
template
#
content
>
<
template
#
content
>
<sass-plus-content
@
click=
'hideTitle'
/>
<sass-plus-content
@
click=
'hideTitle'
/>
</
template
>
</
template
>
</view-container>
</view-container>
...
@@ -23,8 +23,10 @@ export default {
...
@@ -23,8 +23,10 @@ export default {
data
()
{
data
()
{
return
{
return
{
bussinessTitle
:
'1.1转换+业务'
,
bussinessTitle
:
'1.1转换+业务'
,
bussinessType
:
''
bussinessType
:
''
,
// isShowTransWork:true
// isShowTransWork:true,
systemType
:
'gl'
,
month
:
''
}
}
},
},
async
created
()
{
async
created
()
{
...
@@ -35,25 +37,56 @@ export default {
...
@@ -35,25 +37,56 @@ export default {
this
.
$bus
.
$on
(
'changeBussiness'
,
data
=>
{
this
.
$bus
.
$on
(
'changeBussiness'
,
data
=>
{
const
{
bussinessType
,
bussinessTitle
}
=
data
const
{
bussinessType
,
bussinessTitle
}
=
data
this
.
bussinessTitle
=
bussinessTitle
this
.
bussinessTitle
=
bussinessTitle
this
.
bussinessType
=
bussinessType
// this.isShowTransWork = bussinessType == 'transWork' || bussinessType == 'noWorries'
// this.isShowTransWork = bussinessType == 'transWork' || bussinessType == 'noWorries'
if
(
bussinessType
==
'transWork'
||
bussinessType
==
'noWorries'
)
{
if
(
bussinessType
==
'transWork'
||
bussinessType
==
'noWorries'
)
{
this
.
bussinessInit
(
bussinessType
)
this
.
bussinessInit
(
bussinessType
)
}
}
if
(
bussinessType
==
'expandedGold'
||
bussinessType
==
'crowdFunding'
)
{
const
{
systemType
}
=
this
this
.
crowdFundingInit
(
bussinessType
,
systemType
,
''
)
}
})
// this.$bus.$off('changeSystem')
this
.
$bus
.
$on
(
'changeSystem'
,
data
=>
{
this
.
systemType
=
data
.
systemType
const
{
systemType
,
bussinessType
,
month
}
=
this
this
.
crowdFundingInit
(
bussinessType
,
systemType
,
month
)
})
this
.
$bus
.
$on
(
'changeMonths'
,
data
=>
{
this
.
month
=
data
.
month
const
{
bussinessType
,
systemType
,
month
}
=
this
if
(
bussinessType
==
'expandedGold'
||
bussinessType
==
'crowdFunding'
)
{
this
.
getActivitiesMonthly
(
bussinessType
,
systemType
,
month
)
this
.
getTop5CouponMonthly
(
bussinessType
,
systemType
,
month
)
}
})
})
},
},
methods
:
{
methods
:
{
async
bussinessInit
(
bussinessType
)
{
async
bussinessInit
(
bussinessType
)
{
await
this
.
getTotal
(
bussinessType
)
await
this
.
getTotal
(
bussinessType
)
// 获取订单详情
await
this
.
getMonth
(
bussinessType
)
await
this
.
getMonth
(
bussinessType
)
// 获取可选月份
await
this
.
getOrderMonthlyTrend
(
bussinessType
)
await
this
.
getOrderMonthlyTrend
(
bussinessType
)
// 获取月度趋势
await
this
.
getAllGoodsDistribution
(
bussinessType
)
await
this
.
getAllGoodsDistribution
(
bussinessType
)
// 获取商品统计——整体品类分布
this
.
$bus
.
$emit
(
'orderinfoMonthly'
,
{
bussinessType
})
// this.$bus.$emit('orderinfoMonthly', { bussinessType })
},
},
crowdFundingInit
(
bussinessType
,
systemType
,
month
)
{
this
.
getTotal
(
bussinessType
,
systemType
)
this
.
getOrderMonthlyTrend
(
bussinessType
,
systemType
)
this
.
getActivitiesMonthly
(
bussinessType
,
systemType
,
month
)
this
.
getTop5CouponMonthly
(
bussinessType
,
systemType
,
month
)
this
.
getTop10Coupon
(
bussinessType
,
systemType
)
this
.
getTop10Acitivity
(
bussinessType
,
systemType
)
},
// 获取订单总数、今年新增订单数、收入总额
// 获取订单总数、今年新增订单数、收入总额
getTotal
(
val
)
{
getTotal
(
val
,
type
)
{
this
.
api
[
val
].
getTotal
().
then
(
res
=>
{
const
params
=
type
?
{
queryItem
:
type
}
:
''
this
.
api
[
val
].
getTotal
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
const
orderList
=
res
.
data
.
dataList
[
0
]
const
orderList
=
res
.
data
.
dataList
[
0
]
this
.
$bus
.
$emit
(
'orderList'
,
{
orderList
})
this
.
$bus
.
$emit
(
'orderList'
,
{
orderList
})
...
@@ -70,8 +103,9 @@ export default {
...
@@ -70,8 +103,9 @@ export default {
})
})
},
},
getOrderMonthlyTrend
(
val
)
{
getOrderMonthlyTrend
(
val
,
queryItem
)
{
this
.
api
[
val
].
getOrderMonthlyTrend
().
then
(
res
=>
{
const
params
=
queryItem
?
{
queryItem
}
:
''
this
.
api
[
val
].
getOrderMonthlyTrend
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
const
orderMonthlyTrend
=
res
.
data
.
dataList
const
orderMonthlyTrend
=
res
.
data
.
dataList
this
.
$bus
.
$emit
(
'orderMonthlyTrend'
,
{
orderMonthlyTrend
})
this
.
$bus
.
$emit
(
'orderMonthlyTrend'
,
{
orderMonthlyTrend
})
...
@@ -79,7 +113,6 @@ export default {
...
@@ -79,7 +113,6 @@ export default {
})
})
},
},
getAllGoodsDistribution
(
val
)
{
getAllGoodsDistribution
(
val
)
{
this
.
api
[
val
].
getAllGoodsDistribution
().
then
(
res
=>
{
this
.
api
[
val
].
getAllGoodsDistribution
().
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
...
@@ -91,6 +124,61 @@ export default {
...
@@ -91,6 +124,61 @@ export default {
hideTitle
()
{
hideTitle
()
{
this
.
$bus
.
$emit
(
'hideEvent'
,
{
title
:
'111'
})
this
.
$bus
.
$emit
(
'hideEvent'
,
{
title
:
'111'
})
},
getTop10Coupon
(
bussinessType
,
queryItem
)
{
bussinessType
==
'expandedGold'
?
this
.
getTopTenData
(
bussinessType
,
'getTop10Coupon'
,
queryItem
,
'Top10Right'
)
:
this
.
getTopTenData
(
bussinessType
,
'getVehicleBrandRanking'
,
queryItem
,
'Top10Right'
)
},
getTop10Acitivity
(
bussinessType
,
queryItem
)
{
bussinessType
==
'expandedGold'
?
this
.
getTopTenData
(
bussinessType
,
'getTop5Activities'
,
queryItem
,
'Top10Left'
)
:
this
.
getTopTenData
(
bussinessType
,
'getAllGoodsDistribution'
,
queryItem
,
'Top10Left'
)
},
// 获取前十的数据
getTopTenData
(
bussinessType
,
method
,
queryItem
,
emitName
)
{
const
params
=
{
queryItem
}
this
.
api
[
bussinessType
][
method
](
params
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
this
.
$bus
.
$emit
(
emitName
,
{
list
:
res
.
data
.
dataList
,
bussinessType
})
}
})
},
// 活动(链接)统计_xx月订单量排名前5活动场次
getActivitiesMonthly
(
bussinessType
,
systemType
,
month
)
{
bussinessType
==
'expandedGold'
?
this
.
getMonthlyRankingData
(
bussinessType
,
'getActivitiesMonthly'
,
month
,
systemType
,
'topFiveRankingTopLeft'
)
:
this
.
getMonthlyRankingData
(
bussinessType
,
'getGoodsTop5Monthly'
,
month
,
systemType
,
'topFiveRankingTopLeft'
)
},
getTop5CouponMonthly
(
bussinessType
,
systemType
,
month
)
{
bussinessType
==
'expandedGold'
?
this
.
getMonthlyRankingData
(
bussinessType
,
'getTop5CouponMonthly'
,
month
,
systemType
,
'topFiveRankingTopRight'
)
:
this
.
getMonthlyRankingData
(
bussinessType
,
'getVehicleBrandTop5Monthly'
,
month
,
systemType
,
'topFiveRankingTopRight'
)
},
getMonthlyRankingData
(
bussinessType
,
method
,
month
,
queryItem
,
emitName
)
{
let
getmonth
=
month
if
(
!
getmonth
)
{
const
date
=
new
Date
()
// 获取时间
const
year
=
date
.
getFullYear
()
// 获取年
const
month
=
date
.
getMonth
()
+
1
<
10
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
// 获取月
getmonth
=
year
+
'-'
+
month
}
const
params
=
{
month
:
getmonth
,
queryItem
}
this
.
api
[
bussinessType
][
method
](
params
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
this
.
$bus
.
$emit
(
emitName
,
{
list
:
res
.
data
.
dataList
,
bussinessType
})
}
})
}
}
}
}
}
}
...
...
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