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 f7125f68
authored
Jun 19, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
更新sass+代码
1 parent
eadbc3db
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
489 additions
and
413 deletions
src/api/modules/crowdFunding.js
src/api/modules/expandedGold.js
src/components/PieChart.vue
src/components/ViewContentRight.vue
src/components/ViewTitle.vue
src/components/boxChart.vue
src/components/options.js
src/mixins/clientMixin.js
src/views/equity/components/TotalNumRank.vue
src/views/map/index.vue
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/orderInfo.vue
src/views/sassPlus/index.vue
src/api/modules/crowdFunding.js
View file @
f7125f6
...
...
@@ -20,9 +20,9 @@ const getVehicleBrandTop5Monthly = params => {
}
// 获取商品统计——整体品类排名
const
getAllGoodsDistribution
=
params
=>
{
return
window
.
$HTTP
.
get
(
'CrowdFunding/getAllGoodsDistribution'
,
params
)
}
//
const getAllGoodsDistribution = params => {
//
return window.$HTTP.get('CrowdFunding/getAllGoodsDistribution', params)
//
}
// 活动统计_整体车型排名
const
getVehicleBrandRanking
=
params
=>
{
...
...
@@ -34,12 +34,24 @@ const getOrderMonthlyTrend = params => {
return
window
.
$HTTP
.
get
(
'CrowdFunding/getOrderMonthlyTrend'
,
params
)
}
// 滚动接口
const
getGoodsOrderinfoMonthly
=
params
=>
{
return
window
.
$HTTP
.
get
(
'/CrowdFunding/getGoodsMonthlyRanking'
,
params
)
}
const
getAllGoodsDistribution
=
params
=>
{
return
window
.
$HTTP
.
get
(
'/CrowdFunding/getVehicleBrandRanking'
,
params
)
}
export
default
{
getTotal
,
getGoodsTop5Monthly
,
getMonth
,
getVehicleBrandTop5Monthly
,
getAllGoodsDistribution
,
//
getAllGoodsDistribution,
getVehicleBrandRanking
,
getOrderMonthlyTrend
getOrderMonthlyTrend
,
// getGoodsOrderinfoMonthly,
getAllGoodsDistribution
,
getGoodsOrderinfoMonthly
}
src/api/modules/expandedGold.js
View file @
f7125f6
...
...
@@ -29,6 +29,15 @@ const getTop10Coupon = params => {
const
getOrderMonthlyTrend
=
params
=>
{
return
window
.
$HTTP
.
get
(
'ExpandedGold/getOrderMonthlyTrend'
,
params
)
}
// 滚动接口
const
getGoodsOrderinfoMonthly
=
params
=>
{
return
window
.
$HTTP
.
get
(
'/ExpandedGold/getActivitiesMonthlyRanking'
,
params
)
}
const
getAllGoodsDistribution
=
params
=>
{
return
window
.
$HTTP
.
get
(
'/ExpandedGold/getTop10Coupon'
,
params
)
}
export
default
{
getTotal
,
getMonth
,
...
...
@@ -36,5 +45,7 @@ export default {
getTop5CouponMonthly
,
getActivitiesMonthly
,
getTop10Coupon
,
getOrderMonthlyTrend
getOrderMonthlyTrend
,
getGoodsOrderinfoMonthly
,
getAllGoodsDistribution
}
src/components/PieChart.vue
View file @
f7125f6
...
...
@@ -64,7 +64,7 @@ export default {
watch
:
{
list
:
{
handler
(
newVal
)
{
if
(
newVal
.
length
>
0
)
{
if
(
newVal
&&
newVal
.
length
>
0
)
{
this
.
initData
()
this
.
$nextTick
(()
=>
{
this
.
draw
()
...
...
@@ -183,7 +183,7 @@ export default {
},
//高亮
pieActive
()
{
const
dataLen
=
this
.
option
.
series
[
0
].
data
.
length
const
dataLen
=
this
.
option
.
series
[
0
].
data
?
.
length
this
.
currentIndex
=
(
this
.
currentIndex
+
1
)
%
dataLen
this
.
highlightPie
()
this
.
emitEvent
(
this
.
viewData
[
this
.
currentIndex
])
...
...
src/components/ViewContentRight.vue
View file @
f7125f6
...
...
@@ -35,11 +35,11 @@
<div
class=
'content-wrap'
>
<div
class=
'business-content'
>
<div
class=
'content-title'
>
订单量
</div>
<div
class=
'content-num'
>
{{
everyBusinessOrder
.
orderNum11
}}
</div>
<div
class=
'content-num'
>
{{
toThousands
(
everyBusinessOrder
.
orderNum11
)
}}
</div>
</div>
<div
class=
'business-content'
>
<div
class=
'content-title'
>
产值
</div>
<div
class=
'content-num'
>
{{
everyBusinessOrder
.
outputValue11
}}
</div>
<div
class=
'content-num'
>
{{
toThousands
(
everyBusinessOrder
.
outputValue11
)
}}
</div>
</div>
</div>
</div>
...
...
@@ -51,11 +51,11 @@
<div
class=
'content-wrap'
>
<div
class=
'business-content'
>
<div
class=
'content-title'
>
订单量
</div>
<div
class=
'content-num'
>
{{
everyBusinessOrder
.
orderNum12
}}
</div>
<div
class=
'content-num'
>
{{
toThousands
(
everyBusinessOrder
.
orderNum12
)
}}
</div>
</div>
<div
class=
'business-content'
>
<div
class=
'content-title'
>
产值
</div>
<div
class=
'content-num'
>
{{
everyBusinessOrder
.
outputValue12
}}
</div>
<div
class=
'content-num'
>
{{
toThousands
(
everyBusinessOrder
.
outputValue12
)
}}
</div>
</div>
</div>
</div>
...
...
@@ -67,11 +67,11 @@
<div
class=
'content-wrap'
>
<div
class=
'business-content'
>
<div
class=
'content-title'
>
订单量
</div>
<div
class=
'content-num'
>
{{
everyBusinessOrder
.
orderNum13
}}
</div>
<div
class=
'content-num'
>
{{
toThousands
(
everyBusinessOrder
.
orderNum13
)
}}
</div>
</div>
<div
class=
'business-content'
>
<div
class=
'content-title'
>
产值
</div>
<div
class=
'content-num'
>
{{
everyBusinessOrder
.
outputValue13
}}
</div>
<div
class=
'content-num'
>
{{
toThousands
(
everyBusinessOrder
.
outputValue13
)
}}
</div>
</div>
</div>
</div>
...
...
@@ -83,11 +83,11 @@
<div
class=
'content-wrap'
>
<div
class=
'business-content'
>
<div
class=
'content-title'
>
订单量
</div>
<div
class=
'content-num'
>
{{
everyBusinessOrder
.
orderNum21
}}
</div>
<div
class=
'content-num'
>
{{
toThousands
(
everyBusinessOrder
.
orderNum21
)
}}
</div>
</div>
<div
class=
'business-content'
>
<div
class=
'content-title'
>
产值
</div>
<div
class=
'content-num'
>
{{
everyBusinessOrder
.
outputValue21
}}
</div>
<div
class=
'content-num'
>
{{
toThousands
(
everyBusinessOrder
.
outputValue21
)
}}
</div>
</div>
</div>
</div>
...
...
@@ -148,7 +148,14 @@ export default {
// })
},
methods
:
{
toThousands
(
n
)
{
// return (num || 0).toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
return
n
&&
n
.
toString
().
replace
(
/
\d
+/
,
function
(
m
)
{
return
m
.
replace
(
/
(\d)(?=(\d{3})
+$
)
/g
,
function
(
y
)
{
return
y
+
','
})
})
},
getEveryBusinessOrder
()
{
this
.
api
.
springbudAtion
.
getEveryBusinessOrder
().
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
...
...
src/components/ViewTitle.vue
View file @
f7125f6
...
...
@@ -86,8 +86,6 @@ export default {
})
},
changeTitles
()
{
console
.
log
(
'???????'
)
console
.
log
(
!
this
.
titleClick
)
this
.
titleClick
=
!
this
.
titleClick
},
goPage
(
val
)
{
...
...
src/components/boxChart.vue
View file @
f7125f6
...
...
@@ -124,7 +124,6 @@ export default {
},
// 鼠标移入时停止滚动
mouseenter
()
{
console
.
log
(
this
.
timer2
)
clearInterval
(
this
.
timer2
)
},
// 鼠标移开继续滚动
...
...
src/components/options.js
View file @
f7125f6
...
...
@@ -9,10 +9,10 @@
import
utils
from
'../utils/util'
function
getBarOptions
(
obj
)
{
const
{
analysisList
,
rotat
e
}
=
obj
const
{
analysisList
,
labelNam
e
}
=
obj
const
num
=
analysisList
.
map
(
item
=>
item
.
totalNum
)
const
name
=
analysisList
.
map
(
item
=>
item
.
goodsName
)
const
name
=
analysisList
.
map
(
item
=>
item
[
labelName
])
const
showName
=
labelName
==
'goodsName'
?
'商品'
:
labelName
==
'vehicleBrand'
?
'车型'
:
'优惠券'
var
options
=
{
tooltip
:
{
trigger
:
'axis'
,
...
...
@@ -31,14 +31,14 @@ function getBarOptions(obj) {
},
formatter
:
function
(
item
)
{
const
items
=
item
[
0
]
return
`
商品
:
${
items
.
axisValueLabel
}
<br>数量:
${
items
.
value
}
`
return
`
${
showName
}
:
${
items
.
axisValueLabel
}
<br>数量:
${
items
.
value
}
`
}
},
xAxis
:
{
type
:
'category'
,
axisLabel
:
{
color
:
'#fff'
,
fontSize
:
'0.7
2
em'
fontSize
:
'0.7
0
em'
},
splitLine
:
{
show
:
false
...
...
@@ -512,284 +512,284 @@ function lineAndBarZoomOptions(list, namelist) {
const
items
=
list
[
item
[
0
].
dataIndex
]
return
namelist
?
`
${
items
.
statDate
}
<br>订单成功的门店数:
${
items
.
merchantNum
}
<br>订单数:
${
items
.
orderNum
}
<br>订单金额:
${
items
.
totalPrice
}
`
:
`订单数:
${
items
.
orderNum
}
<br>订单金额:
${
items
.
orderMoney
}
`
}
},
xAxis
:
[
{
type
:
'category'
,
axisLabel
:
{
color
:
'#fff'
,
fontSize
:
'0.75em'
},
splitLine
:
{
show
:
false
},
axisTick
:
{
show
:
false
},
axisLine
:
{
show
:
false
},
data
:
statDate
}
],
dataZoom
:
[{
type
:
'slider'
,
show
:
false
,
// start: 100,
// end: 90,
// start: statDate.length - statDate.length,
startValue
:
0
,
endValue
:
statDate
.
length
-
1
,
handleSize
:
8
},
{
type
:
'inside'
,
start
:
0
,
end
:
100
},
{
type
:
'slider'
,
show
:
false
,
yAxisIndex
:
0
,
filterMode
:
'empty'
,
width
:
12
,
height
:
'70%'
,
handleSize
:
10
,
showDataShadow
:
true
,
left
:
'93%'
}
],
grid
:
{
left
:
'6%'
,
right
:
'5%'
,
top
:
'6%'
,
bottom
:
'1%'
,
containLabel
:
true
},
yAxis
:
[
{
name
:
'bar'
,
nameGap
:
30
,
type
:
'value'
,
splitLine
:
{
lineStyle
:
{
}
},
xAxis
:
[
{
type
:
'category'
,
axisLabel
:
{
color
:
'#fff'
,
fontSize
:
'0.75em'
},
splitLine
:
{
show
:
false
},
axisTick
:
{
show
:
false
},
axisLine
:
{
show
:
false
},
data
:
statDate
}
],
dataZoom
:
[{
type
:
'slider'
,
show
:
false
,
// start: 100,
// end: 90,
// start: statDate.length - statDate.length,
startValue
:
0
,
endValue
:
statDate
.
length
-
1
,
handleSize
:
8
},
{
type
:
'inside'
,
start
:
0
,
end
:
100
},
{
type
:
'slider'
,
show
:
false
,
yAxisIndex
:
0
,
filterMode
:
'empty'
,
width
:
12
,
height
:
'70%'
,
handleSize
:
10
,
showDataShadow
:
true
,
left
:
'93%'
}
],
grid
:
{
left
:
'6%'
,
right
:
'5%'
,
top
:
'6%'
,
bottom
:
'1%'
,
containLabel
:
true
},
yAxis
:
[
{
name
:
'bar'
,
nameGap
:
30
,
type
:
'value'
,
splitLine
:
{
lineStyle
:
{
color
:
'#2F314F'
}
},
axisLabel
:
{
color
:
'#FFD241'
,
fontSize
:
'0.8em'
},
splitNumber
:
4
},
{
name
:
'line'
,
nameGap
:
30
,
type
:
'value'
,
splitLine
:
{
lineStyle
:
{
},
axisLabel
:
{
color
:
'#FFD241'
,
fontSize
:
'0.8em'
},
splitNumber
:
4
},
{
name
:
'line'
,
nameGap
:
30
,
type
:
'value'
,
splitLine
:
{
lineStyle
:
{
color
:
'#2F314F'
}
},
axisLabel
:
{
color
:
'#769EFF'
,
fontSize
:
'0.8em'
},
splitNumber
:
4
}
],
series
:
[
{
name
:
'line'
,
type
:
'line'
,
symbol
:
'circle'
,
itemStyle
:
{
color
:
'#F5AA01'
},
// 平滑曲线
smooth
:
true
,
showSymbol
:
false
,
// 折线背景色
areaStyle
:
{
color
:
{
},
axisLabel
:
{
color
:
'#769EFF'
,
fontSize
:
'0.8em'
},
splitNumber
:
4
}
],
series
:
[
{
name
:
'line'
,
type
:
'line'
,
symbol
:
'circle'
,
itemStyle
:
{
color
:
'#F5AA01'
},
// 平滑曲线
smooth
:
true
,
showSymbol
:
false
,
// 折线背景色
areaStyle
:
{
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
0
,
y2
:
1
,
colorStops
:
[
{
offset
:
0
,
color
:
'rgba(254, 84, 0, 0.3)'
},
{
offset
:
1
,
color
:
'rgba(254, 84, 0, 0.01)'
}
{
offset
:
0
,
color
:
'rgba(254, 84, 0, 0.3)'
},
{
offset
:
1
,
color
:
'rgba(254, 84, 0, 0.01)'
}
]
}
},
data
:
orderMoney
},
{
name
:
'bar'
,
type
:
'bar'
,
symbol
:
'circle'
,
backgroundStyle
:
{
color
:
'#6578FF'
},
yAxisIndex
:
1
,
barWidth
:
'30%'
,
data
:
orderNum
}
},
data
:
orderMoney
},
{
name
:
'bar'
,
type
:
'bar'
,
symbol
:
'circle'
,
backgroundStyle
:
{
color
:
'#6578FF'
},
yAxisIndex
:
1
,
barWidth
:
'30%'
,
data
:
orderNum
}
]
}
]
}
return
options
}
return
options
}
function
lineAndBarOptions
(
list
,
namelist
)
{
const
statDate
=
namelist
?
list
.
map
(
item
=>
item
[
namelist
.
xName
])
:
list
.
map
(
item
=>
item
.
statMonth
)
const
orderNum
=
namelist
?
list
.
map
(
item
=>
item
[
namelist
.
leftYName
])
:
list
.
map
(
item
=>
item
.
orderNum
)
const
orderMoney
=
namelist
?
list
.
map
(
item
=>
item
[
namelist
.
rightYName
])
:
list
.
map
(
item
=>
item
.
orderMoney
)
var
options
=
{
tooltip
:
{
trigger
:
'axis'
,
axisPointer
:
{
lineStyle
:
{
type
:
'solid'
}
},
padding
:
5
,
borderWidth
:
1
,
backgroundColor
:
'rgba(35, 45, 152, 1)'
,
borderRadius
:
4
,
textStyle
:
{
color
:
'rgba(255,255,255,1)'
,
fontSize
:
10
},
formatter
:
function
(
item
)
{
// console.log(item)
const
items
=
list
[
item
[
0
].
dataIndex
]
return
`
${
items
.
statMonth
}
<br>订单数:
${
items
.
orderNum
}
<br>订单收入:
${
items
.
orderMoney
}
`
}
},
xAxis
:
[
{
type
:
'category'
,
axisLabel
:
{
color
:
'#fff'
,
fontSize
:
'0.75em'
},
splitLine
:
{
show
:
false
},
axisTick
:
{
show
:
false
},
axisLine
:
{
show
:
false
},
data
:
statDate
}
],
grid
:
{
left
:
'6%'
,
right
:
'5%'
,
top
:
'10%'
,
bottom
:
'1%'
,
containLabel
:
true
},
yAxis
:
[
{
name
:
''
,
nameGap
:
30
,
type
:
'value'
,
splitLine
:
{
lineStyle
:
{
function
lineAndBarOptions
(
list
,
namelist
)
{
const
statDate
=
namelist
?
list
.
map
(
item
=>
item
[
namelist
.
xName
])
:
list
.
map
(
item
=>
item
.
statMonth
)
const
orderNum
=
namelist
?
list
.
map
(
item
=>
item
[
namelist
.
leftYName
])
:
list
.
map
(
item
=>
item
.
orderNum
)
const
orderMoney
=
namelist
?
list
.
map
(
item
=>
item
[
namelist
.
rightYName
])
:
list
.
map
(
item
=>
item
.
orderMoney
)
var
options
=
{
tooltip
:
{
trigger
:
'axis'
,
axisPointer
:
{
lineStyle
:
{
type
:
'solid'
}
},
padding
:
5
,
borderWidth
:
1
,
backgroundColor
:
'rgba(35, 45, 152, 1)'
,
borderRadius
:
4
,
textStyle
:
{
color
:
'rgba(255,255,255,1)'
,
fontSize
:
10
},
formatter
:
function
(
item
)
{
// console.log(item)
const
items
=
list
[
item
[
0
].
dataIndex
]
return
`
${
items
.
statMonth
}
<br>订单数:
${
items
.
orderNum
}
<br>订单收入:
${
items
.
orderMoney
}
`
}
},
xAxis
:
[
{
type
:
'category'
,
axisLabel
:
{
color
:
'#fff'
,
fontSize
:
'0.75em'
},
splitLine
:
{
show
:
false
},
axisTick
:
{
show
:
false
},
axisLine
:
{
show
:
false
},
data
:
statDate
}
],
grid
:
{
left
:
'6%'
,
right
:
'5%'
,
top
:
'10%'
,
bottom
:
'1%'
,
containLabel
:
true
},
yAxis
:
[
{
name
:
''
,
nameGap
:
30
,
type
:
'value'
,
splitLine
:
{
lineStyle
:
{
color
:
'#2F314F'
}
},
axisLabel
:
{
color
:
'#FFD241'
,
fontSize
:
'0.8em'
},
splitNumber
:
4
},
{
name
:
''
,
nameGap
:
30
,
type
:
'value'
,
splitLine
:
{
lineStyle
:
{
},
axisLabel
:
{
color
:
'#FFD241'
,
fontSize
:
'0.8em'
},
splitNumber
:
4
},
{
name
:
''
,
nameGap
:
30
,
type
:
'value'
,
splitLine
:
{
lineStyle
:
{
color
:
'#2F314F'
}
},
axisLabel
:
{
color
:
'#769EFF'
,
fontSize
:
'0.8em'
},
splitNumber
:
4
}
],
series
:
[
{
name
:
'line'
,
type
:
'line'
,
symbol
:
'circle'
,
itemStyle
:
{
color
:
'#F5AA01'
},
// 平滑曲线
smooth
:
true
,
showSymbol
:
false
,
// 折线背景色
areaStyle
:
{
color
:
{
},
axisLabel
:
{
color
:
'#769EFF'
,
fontSize
:
'0.8em'
},
splitNumber
:
4
}
],
series
:
[
{
name
:
'line'
,
type
:
'line'
,
symbol
:
'circle'
,
itemStyle
:
{
color
:
'#F5AA01'
},
// 平滑曲线
smooth
:
true
,
showSymbol
:
false
,
// 折线背景色
areaStyle
:
{
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
0
,
y2
:
1
,
colorStops
:
[
{
offset
:
0
,
color
:
'rgba(254, 84, 0, 0.3)'
},
{
offset
:
1
,
color
:
'rgba(254, 84, 0, 0.01)'
}
{
offset
:
0
,
color
:
'rgba(254, 84, 0, 0.3)'
},
{
offset
:
1
,
color
:
'rgba(254, 84, 0, 0.01)'
}
]
}
},
data
:
orderMoney
},
{
name
:
'bar'
,
type
:
'bar'
,
symbol
:
'circle'
,
backgroundStyle
:
{
color
:
'#6578FF'
},
yAxisIndex
:
1
,
barWidth
:
'30%'
,
data
:
orderNum
}
},
data
:
orderMoney
},
{
name
:
'bar'
,
type
:
'bar'
,
symbol
:
'circle'
,
backgroundStyle
:
{
color
:
'#6578FF'
},
yAxisIndex
:
1
,
barWidth
:
'30%'
,
data
:
orderNum
}
]
}
]
}
return
options
}
return
options
}
export
{
getBarReverseOptions
,
getBarOptions
,
lineAndBarOptions
,
getLineOptions
,
lineAndBarZoomOptions
,
getLineDoubleOptions
}
export
{
getBarReverseOptions
,
getBarOptions
,
lineAndBarOptions
,
getLineOptions
,
lineAndBarZoomOptions
,
getLineDoubleOptions
}
src/mixins/clientMixin.js
View file @
f7125f6
...
...
@@ -17,7 +17,6 @@ export default {
methods
:
{
getClientData
()
{
console
.
log
(
22
)
this
.
api
.
customer
.
getEnterpriseDistribution
().
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
res
.
data
.
dataList
.
forEach
(
item
=>
{
...
...
src/views/equity/components/TotalNumRank.vue
View file @
f7125f6
...
...
@@ -34,7 +34,6 @@ export default {
},
mounted
()
{
this
.
$bus
.
$on
(
'totalRank'
,
data
=>
{
console
.
log
(
data
)
this
.
totalNumData
=
data
.
datalist
})
},
...
...
src/views/map/index.vue
View file @
f7125f6
...
...
@@ -311,7 +311,7 @@ export default {
}
}
this
.
api
.
map
.
getMerchantInProgressThisMonth
(
params
).
then
(
res
=>
{
})
},
methods
:
{
...
...
@@ -369,7 +369,6 @@ export default {
borderWidth
:
1
,
padding
:
0
,
formatter
:
function
(
params
)
{
console
.
log
(
params
)
let
name
=
params
.
name
var
str
=
`<div style = "background:url(
${
require
(
"@/assets/images/province.png"
)}
) no-repeat;
width:20vw;height:28vh;background-size:cover">
...
...
src/views/sassPlus/componts/sassPlusContent.vue
View file @
f7125f6
<
template
>
<div
class=
'content'
>
<select-container></select-container>
<conversion-plus-content
v-if=
'isShowConversion'
></conversion-plus-content>
<expanded-gold-content
v-else
></expanded-gold-content>
<!-- v-if='isShowConversion'-->
<conversion-plus-content
></conversion-plus-content>
<!--
<expanded-gold-content
v-else
></expanded-gold-content>
-->
</div>
</
template
>
...
...
@@ -10,24 +11,24 @@
import
SelectContainer
from
'views/sassPlus/componts/selectContainer'
import
ConversionPlusContent
from
'views/sassPlus/conversionPlus/conversionPlusContent'
import
ExpandedGoldContent
from
'views/sassPlus/expandedGold/expandedGoldContent'
//
import ExpandedGoldContent from 'views/sassPlus/expandedGold/expandedGoldContent'
export
default
{
// name: 'sassPlusContent',
components
:
{
ExpandedGoldContent
,
//
ExpandedGoldContent,
ConversionPlusContent
,
SelectContainer
},
data
()
{
return
{
isShowConversion
:
true
//
isShowConversion: true
}
},
mounted
()
{
this
.
$bus
.
$on
(
'changeBussiness'
,
data
=>
{
this
.
isShowConversion
=
data
.
bussinessType
==
'transWork'
||
data
.
bussinessType
==
'noWorries'
})
//
this.$bus.$on('changeBussiness', data => {
//
this.isShowConversion = data.bussinessType == 'transWork' || data.bussinessType == 'noWorries'
//
})
}
}
</
script
>
...
...
src/views/sassPlus/componts/selectContainer.vue
View file @
f7125f6
<
template
>
<div
class=
'select-Container'
>
<SelectCpn
:selectName=
"'业务筛选:'"
:selectArr=
'businessList'
:selectType=
"'business'"
></SelectCpn>
<SelectCpn
v-if=
'isShowSystem'
:selectName=
"'系统筛选:'"
:selectArr=
'systemList'
:selectType=
"'system'"
></SelectCpn
>
<!--
<SelectCpn
v-if=
'isShowSystem'
:selectName=
"'系统筛选:'"
:selectArr=
'systemList'
:selectType=
"'system'"
></SelectCpn>
--
>
<SelectCpn
:selectName=
"'月份筛选:'"
:selectArr=
'monthList'
...
...
@@ -26,10 +26,10 @@ export default {
{
label
:
'1.3众筹'
,
value
:
'crowdFunding'
},
{
label
:
'2.1车损无忧'
,
value
:
'noWorries'
}
],
systemList
:
[
{
label
:
'广联'
,
value
:
'gl'
},
{
label
:
'广汇'
,
value
:
'gh'
}
],
//
systemList: [
//
{ label: '广联', value: 'gl' },
//
{ label: '广汇', value: 'gh' }
//
],
monthList
:
[],
isShowSystem
:
false
}
...
...
@@ -42,9 +42,9 @@ export default {
},
mounted
()
{
this
.
$bus
.
$on
(
'changeBussiness'
,
data
=>
{
this
.
isShowSystem
=
data
.
bussinessType
==
'expandedGold'
||
data
.
bussinessType
==
'crowdFunding'
})
//
this.$bus.$on('changeBussiness', data => {
//
this.isShowSystem = data.bussinessType == 'expandedGold' || data.bussinessType =='crowdFunding'
//
})
}
}
</
script
>
...
...
src/views/sassPlus/componts/selectCpn.vue
View file @
f7125f6
...
...
@@ -70,16 +70,17 @@ export default {
if
(
this
.
selectArr
.
length
)
{
this
.
selStr
=
this
.
selectArr
[
0
][
this
.
valName
]
}
this
.
$bus
.
$on
(
'changeBussiness'
,
data
=>
{
const
{
bussinessType
}
=
data
this
.
showFirstSelStaus
=
bussinessType
==
'expandedGold'
||
bussinessType
==
'crowdFunding'
})
//
this.$bus.$on('changeBussiness', data => {
//
const { bussinessType } = data
//
this.showFirstSelStaus = bussinessType == 'expandedGold' || bussinessType == 'crowdFunding'
//
})
},
methods
:
{
selectBtn
(
type
)
{
switch
(
type
)
{
case
'business'
:
// eslint-disable-next-line no-case-declarations
let
title
this
.
selectArr
.
forEach
(
item
=>
{
if
(
item
.
value
==
this
.
selStr
)
{
...
...
@@ -88,9 +89,9 @@ export default {
})
this
.
$bus
.
$emit
(
'changeBussiness'
,
{
bussinessTitle
:
title
+
'业务'
,
bussinessType
:
this
.
selStr
})
break
case
'system'
:
this
.
$bus
.
$emit
(
'changeSystem'
,
{
systemType
:
this
.
selStr
})
break
//
case 'system':
//
this.$bus.$emit('changeSystem', { systemType: this.selStr })
//
break
case
'months'
:
this
.
$bus
.
$emit
(
'changeMonths'
,
{
month
:
this
.
selStr
})
break
...
...
src/views/sassPlus/conversionPlus/categoryDistribution.vue
View file @
f7125f6
<
template
>
<div
class=
'category-distribution'
>
<view-sub-title
title=
'商品品类订单数前10'
/>
<bar-chart
domId=
'analyseChart'
boxHeight=
'14.54vh'
:analysisList=
'allGoodsDistribution'
></bar-chart>
<view-sub-title
:title=
'diffsTitle[bussinessType]'
/>
<bar-chart
class=
'barChartStyle'
:labelName=
'labelName'
domId=
'analyseChart'
boxHeight=
'14.54vh'
:analysisList=
'allGoodsDistribution'
></bar-chart>
</div>
</
template
>
...
...
@@ -10,6 +15,14 @@ export default {
name
:
'CategoryDistribution'
,
data
()
{
return
{
diffsTitle
:
{
'transWork'
:
'商品品类订单数前10'
,
'expandedGold'
:
'订单量排名优惠券前10'
,
'crowdFunding'
:
'整体车型排名前10'
,
'noWorries'
:
'商品品类订单数前10'
},
labelName
:
''
,
bussinessType
:
''
,
chart
:
{
id
:
'glproduct'
,
keys
:
[
'goodsName'
,
'totalNum'
]
...
...
@@ -20,6 +33,8 @@ export default {
},
mounted
()
{
this
.
$bus
.
$on
(
'allGoodsDistribution'
,
data
=>
{
this
.
bussinessType
=
data
.
bussinessType
this
.
labelName
=
data
.
bussinessType
===
'expandedGold'
?
'couponName'
:
data
.
bussinessType
===
'crowdFunding'
?
'vehicleBrand'
:
'goodsName'
this
.
allGoodsDistribution
=
data
.
allGoodsDistribution
})
}
...
...
@@ -27,5 +42,7 @@ export default {
</
script
>
<
style
scoped
>
.barChartStyle
{
margin-top
:
3vh
;
}
</
style
>
src/views/sassPlus/conversionPlus/conversionLeft.vue
View file @
f7125f6
<
template
>
<div
class=
'conversion-left'
>
<view-sub-title
title=
'各类商品每月订单数
'
/>
<view-sub-title
:title=
'diffsTitle[copyBussinessType]
'
/>
<div
class=
'component'
>
<div
class=
'titles'
>
<span>
订单月份
</span>
<span>
商品名称
</span>
<span>
{{
copyBussinessType
==
'expandedGold'
?
'活动名称'
:
'商品名称'
}}
</span>
<span>
订单数
</span>
</div>
<div
...
...
@@ -22,8 +22,8 @@
@
mouseleave=
"currentIndex = ''"
@
mouseenter=
'mouseenterList(item,index)'
>
<div>
{{
item
.
statMonth
}}
</div>
<div>
{{
item
.
goodsName
}}
</div>
<div>
{{
item
.
orderNum
}}
</div>
<div>
{{
item
[
diffsGoodsName
[
copyBussinessType
]]
}}
</div>
<div>
{{
item
[
diffsNum
[
copyBussinessType
]]
}}
</div>
</div>
</div>
</div>
...
...
@@ -37,6 +37,24 @@ export default {
name
:
'ConversionLeft'
,
data
()
{
return
{
diffsTitle
:
{
'transWork'
:
'各类商品每月订单数'
,
'expandedGold'
:
'各活动场次订单量'
,
'crowdFunding'
:
'各月各商品订单量排名'
,
'noWorries'
:
'各类商品每月订单数'
},
diffsGoodsName
:
{
'transWork'
:
'goodsName'
,
'expandedGold'
:
'activityName'
,
'crowdFunding'
:
'goodsName'
,
'noWorries'
:
'goodsName'
},
diffsNum
:{
'transWork'
:
'orderNum'
,
'expandedGold'
:
'totalNum'
,
'crowdFunding'
:
'totalNum'
,
'noWorries'
:
'totalNum'
},
totalCount
:
10000
,
// 总数
scrollContentHeight
:
0
,
// 滚动内容的高度
scrollBoxHeight
:
0
,
// 滚动父级盒子的高度
...
...
@@ -102,7 +120,6 @@ export default {
this
.
scrollBoxHeight
=
this
.
$refs
.
forwardContent
?
this
.
$refs
.
forwardScrollBox
.
getBoundingClientRect
().
height
:
''
// 可以滚动的高度
this
.
scrollableHeight
=
this
.
scrollContentHeight
-
this
.
scrollBoxHeight
console
.
log
(
'内容高度'
,
this
.
scrollContentHeight
,
'盒子高度'
,
this
.
scrollBoxHeight
,
'可以滚动的高度'
,
this
.
scrollableHeight
)
this
.
autoScroll
()
},
// 自动滚动
...
...
@@ -156,7 +173,7 @@ export default {
//
display
:
flex
;
//
justify-content
:
space-between
;
display
:
grid
;
grid-template-columns
:
30%
40%
30
%
;
grid-template-columns
:
28%
54%
18
%
;
font-size
:
0.9vw
;
}
...
...
@@ -166,7 +183,7 @@ export default {
.list_dv
{
width
:
100%
;
height
:
77vh
;
height
:
77vh
;
overflow-y
:
auto
;
font-size
:
0.6vw
;
color
:
#d4eaf6
;
...
...
@@ -180,14 +197,18 @@ export default {
.dataList
{
display
:
grid
;
grid-template-columns
:
30%
40%
30
%
;
grid-template-columns
:
28%
54%
18
%
;
cursor
:
pointer
;
//div{
//
width
:
100%
;
//
&:nth-child(2){
//
width
:
70px
;
//
}
//
}
div{
width
:
100%
;
&:nth-child(2){
width
:
93%
;
overflow
:
hidden
;
//超出隐藏
white-space
:
nowrap
;
//不折行
text-overflow
:
ellipsis
;
//溢出显示省略号
}
}
}
.selectMerchant
{
...
...
src/views/sassPlus/conversionPlus/orderInfo.vue
View file @
f7125f6
...
...
@@ -5,19 +5,19 @@
<div
class=
'business-top flex'
>
<div
class=
'business-border'
>
<div
class=
'business-title'
>
订单总数
</div>
<div
class=
'business-number'
>
{{
orderList
.
totalNum
}}
</div>
<div
class=
'business-number'
>
{{
toThousands
(
orderList
.
totalNum
)
}}
</div>
</div>
<div
class=
'business-border'
>
<div
class=
'business-title'
>
今年新增
</div>
<div
class=
'business-number'
>
{{
orderList
.
thisyear
}}
</div>
<div
class=
'business-number'
>
{{
toThousands
(
orderList
.
thisyear
)
}}
</div>
</div>
<div
class=
'business-border'
>
<div
class=
'business-title'
>
订单总金额
</div>
<div
class=
'business-number'
>
{{
orderList
.
totalMoney
}}
</div>
<div
class=
'business-number'
>
{{
toThousands
(
orderList
.
totalMoney
)
}}
</div>
</div>
<div
class=
'business-border'
v-if=
'orderList.activityTimes'
>
<div
class=
'business-title'
>
活动总数
</div>
<div
class=
'business-number'
>
{{
orderList
.
activityTimes
}}
</div>
<div
class=
'business-number'
>
{{
toThousands
(
orderList
.
activityTimes
)
}}
</div>
</div>
</div>
</div>
...
...
@@ -39,7 +39,16 @@ export default {
})
},
methods
:
{}
methods
:
{
toThousands
(
n
)
{
// return (num || 0).toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
return
n
&&
n
.
toString
().
replace
(
/
\d
+/
,
function
(
m
)
{
return
m
.
replace
(
/
(\d)(?=(\d{3})
+$
)
/g
,
function
(
y
)
{
return
y
+
','
})
})
}
}
}
</
script
>
d
...
...
src/views/sassPlus/index.vue
View file @
f7125f6
...
...
@@ -38,30 +38,32 @@ export default {
const
{
bussinessType
,
bussinessTitle
}
=
data
this
.
bussinessTitle
=
bussinessTitle
this
.
bussinessType
=
bussinessType
this
.
bussinessInit
(
bussinessType
)
// this.isShowTransWork = bussinessType == 'transWork' || bussinessType == 'noWorries'
if
(
bussinessType
==
'transWork'
||
bussinessType
==
'noWorries'
)
{
this
.
bussinessInit
(
bussinessType
)
}
if
(
bussinessType
==
'expandedGold'
||
bussinessType
==
'crowdFunding'
)
{
const
{
systemType
}
=
this
this
.
crowdFundingInit
(
bussinessType
,
systemType
,
''
)
}
//
if (bussinessType == 'transWork' || bussinessType == 'noWorries') {
//
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('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
)
}
//
const { bussinessType, systemType, month } = this
//
if (bussinessType == 'expandedGold' || bussinessType == 'crowdFunding') {
//
this.getActivitiesMonthly(bussinessType, systemType, month)
//
this.getTop5CouponMonthly(bussinessType, systemType, month)
//
}
})
},
...
...
@@ -77,15 +79,15 @@ export default {
},
// 1.2 1.3的初始化
crowdFundingInit
(
bussinessType
,
systemType
,
month
)
{
this
.
getMonth
(
bussinessType
)
// 获取可选月份
this
.
getTotal
(
bussinessType
,
systemType
)
// 获取订单详情
this
.
getOrderMonthlyTrend
(
bussinessType
,
systemType
)
// 获取月度趋势
this
.
getActivitiesMonthly
(
bussinessType
,
systemType
,
month
)
// 获取页面左边排名前五的数据
this
.
getTop5CouponMonthly
(
bussinessType
,
systemType
,
month
)
// 获取页面右边排名前五的数据
this
.
getTop10Coupon
(
bussinessType
,
systemType
)
// 获取页面右边排名前10的数据
this
.
getTop10Acitivity
(
bussinessType
,
systemType
)
// 获取页面左边排名前10的数据
},
//
crowdFundingInit(bussinessType, systemType, month) {
//
this.getMonth(bussinessType) // 获取可选月份
//
this.getTotal(bussinessType, systemType) // 获取订单详情
//
this.getOrderMonthlyTrend(bussinessType, systemType) // 获取月度趋势
//
this.getActivitiesMonthly(bussinessType, systemType, month) // 获取页面左边排名前五的数据
//
this.getTop5CouponMonthly(bussinessType, systemType, month)// 获取页面右边排名前五的数据
//
this.getTop10Coupon(bussinessType, systemType) // 获取页面右边排名前10的数据
//
this.getTop10Acitivity(bussinessType, systemType)// 获取页面左边排名前10的数据
//
},
// 获取订单总数、今年新增订单数、收入总额
getTotal
(
val
,
type
)
{
...
...
@@ -109,9 +111,10 @@ export default {
await
this
.
api
[
val
].
getMonth
().
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
const
monthList
=
res
.
data
.
dataList
if
(
this
.
bussinessType
==
'transWork'
||
this
.
bussinessType
==
'noWorries'
)
{
monthList
.
unshift
({
month
:
''
})
}
// if (this.bussinessType == 'transWork' || this.bussinessType == 'noWorries') {
// monthList.unshift({ month: '' })
// }
monthList
.
unshift
({
month
:
''
})
this
.
$bus
.
$emit
(
'monthList'
,
{
monthList
})
}
})
...
...
@@ -139,7 +142,7 @@ export default {
this
.
api
[
val
].
getAllGoodsDistribution
().
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
const
allGoodsDistribution
=
res
.
data
.
dataList
this
.
$bus
.
$emit
(
'allGoodsDistribution'
,
{
allGoodsDistribution
})
this
.
$bus
.
$emit
(
'allGoodsDistribution'
,
{
allGoodsDistribution
,
bussinessType
:
this
.
bussinessType
})
}
})
},
...
...
@@ -151,74 +154,74 @@ export default {
// 获取排名前十的数据 右边
getTop10Coupon
(
bussinessType
,
queryItem
)
{
// bussinessType 通过不同业务调用不同的接口
// expandedGold 1.2业务 crowdFunding 1.3
// queryItem 系统参数
// gl 广联 gh 广汇
bussinessType
==
'expandedGold'
?
this
.
getTopTenData
(
bussinessType
,
'getTop10Coupon'
,
queryItem
,
'Top10Right'
)
:
this
.
getTopTenData
(
bussinessType
,
'getVehicleBrandRanking'
,
queryItem
,
'Top10Right'
)
},
//
getTop10Coupon(bussinessType, queryItem) {
//
// bussinessType 通过不同业务调用不同的接口
//
// expandedGold 1.2业务 crowdFunding 1.3
//
// queryItem 系统参数
//
// gl 广联 gh 广汇
//
bussinessType == 'expandedGold'
//
? this.getTopTenData(bussinessType, 'getTop10Coupon', queryItem, 'Top10Right')
//
: this.getTopTenData(bussinessType, 'getVehicleBrandRanking', queryItem, 'Top10Right')
//
},
// 获取排名前十的数据 左边
getTop10Acitivity
(
bussinessType
,
queryItem
)
{
// bussinessType 通过不同业务调用不同的接口
// expandedGold 1.2业务 crowdFunding 1.3
// queryItem 系统参数
// gl 广联 gh 广汇
bussinessType
==
'expandedGold'
?
this
.
getTopTenData
(
bussinessType
,
'getTop5Activities'
,
queryItem
,
'Top10Left'
)
:
this
.
getTopTenData
(
bussinessType
,
'getAllGoodsDistribution'
,
queryItem
,
'Top10Left'
)
},
//
getTop10Acitivity(bussinessType, queryItem) {
//
// bussinessType 通过不同业务调用不同的接口
//
// expandedGold 1.2业务 crowdFunding 1.3
//
// queryItem 系统参数
//
// gl 广联 gh 广汇
//
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
})
}
})
},
//
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 })
//
}
//
})
//
},
// 获取排名前5的数据 -左边
getActivitiesMonthly
(
bussinessType
,
systemType
,
month
)
{
// bussinessType 通过不同业务调用不同的接口
// expandedGold 1.2业务 crowdFunding 1.3
// systemType 系统参数
// gl 广联 gh 广汇
bussinessType
==
'expandedGold'
?
this
.
getMonthlyRankingData
(
bussinessType
,
'getActivitiesMonthly'
,
month
,
systemType
,
'topFiveRankingTopLeft'
)
:
this
.
getMonthlyRankingData
(
bussinessType
,
'getGoodsTop5Monthly'
,
month
,
systemType
,
'topFiveRankingTopLeft'
)
},
//
getActivitiesMonthly(bussinessType, systemType, month) {
//
// bussinessType 通过不同业务调用不同的接口
//
// expandedGold 1.2业务 crowdFunding 1.3
//
// systemType 系统参数
//
// gl 广联 gh 广汇
//
bussinessType == 'expandedGold'
//
? this.getMonthlyRankingData(bussinessType, 'getActivitiesMonthly', month, systemType, 'topFiveRankingTopLeft')
//
: this.getMonthlyRankingData(bussinessType, 'getGoodsTop5Monthly', month, systemType, 'topFiveRankingTopLeft')
//
},
// 获取排名前5的数据 -右边
getTop5CouponMonthly
(
bussinessType
,
systemType
,
month
)
{
bussinessType
==
'expandedGold'
?
this
.
getMonthlyRankingData
(
bussinessType
,
'getTop5CouponMonthly'
,
month
,
systemType
,
'topFiveRankingTopRight'
)
:
this
.
getMonthlyRankingData
(
bussinessType
,
'getVehicleBrandTop5Monthly'
,
month
,
systemType
,
'topFiveRankingTopRight'
)
},
//
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
})
}
})
}
//
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 })
//
}
//
})
//
}
}
}
</
script
>
...
...
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