Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-home
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 c2d1977b
authored
Oct 10, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
d700d3be
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
68 additions
and
20 deletions
src/api/modules/home.js
src/assets/img/home/empty.png
src/components/lineChart/index.vue
src/components/options.js
src/views/home/components/AddValue.vue
src/views/home/components/AnalysisLine.vue
src/views/home/components/Journey.vue
src/views/home/components/MicroStore.vue
src/api/modules/home.js
View file @
c2d1977
...
@@ -286,7 +286,7 @@ const viewData = params => {
...
@@ -286,7 +286,7 @@ const viewData = params => {
}
}
//增值业务分析-精品升级-产值趋势
//增值业务分析-精品升级-产值趋势
const
tendency
=
params
=>
{
const
tendency
=
params
=>
{
params
.
method
=
'scrm.api.boutiquecoupon.rop.router'
params
.
method
=
'scrm.api.boutiquecoupon.rop.router
.twoCityTale
'
params
.
routerMethod
=
'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.tendency'
params
.
routerMethod
=
'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.tendency'
return
http
({
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
url
:
'rop-scrm-boutiquecoupon/router'
,
...
...
src/assets/img/home/empty.png
0 → 100644
View file @
c2d1977
14.7 KB
src/components/lineChart/index.vue
View file @
c2d1977
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-14 14:07:44
* @Date: 2023-09-14 14:07:44
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-10-10
09:54:42
* @LastEditTime: 2023-10-10
16:05:16
* @FilePath: \scrm-micro-home\src\components\lineChart\index.vue
* @FilePath: \scrm-micro-home\src\components\lineChart\index.vue
* @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
-->
-->
...
@@ -42,7 +42,6 @@ export default {
...
@@ -42,7 +42,6 @@ export default {
this
.
lineOptions
=
getLineOptions
[
this
.
functionStr
](
this
.
lineList
)
this
.
lineOptions
=
getLineOptions
[
this
.
functionStr
](
this
.
lineList
)
this
.
chartBindEvent
()
this
.
chartBindEvent
()
},
},
immediate
:
true
,
deep
:
true
deep
:
true
}
}
},
},
...
@@ -51,7 +50,7 @@ export default {
...
@@ -51,7 +50,7 @@ export default {
this
[
this
.
domId
]
=
echarts
.
init
(
this
.
lineDom
)
this
[
this
.
domId
]
=
echarts
.
init
(
this
.
lineDom
)
window
.
addEventListener
(
'resize'
,
this
[
this
.
domId
].
resize
)
window
.
addEventListener
(
'resize'
,
this
[
this
.
domId
].
resize
)
},
},
before
Create
()
{
before
Destroy
()
{
window
.
removeEventListener
(
'resize'
,
this
[
this
.
domId
].
resize
)
window
.
removeEventListener
(
'resize'
,
this
[
this
.
domId
].
resize
)
},
},
methods
:
{
methods
:
{
...
...
src/components/options.js
View file @
c2d1977
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-14 14:08:14
* @Date: 2023-09-14 14:08:14
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-10-
09 17:49:06
* @LastEditTime: 2023-10-
10 10:29:53
* @FilePath: \scrm-micro-home\src\components\options.js
* @FilePath: \scrm-micro-home\src\components\options.js
* @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
*/
*/
...
@@ -142,11 +142,26 @@ function getLineOddOptions(obj) {
...
@@ -142,11 +142,26 @@ function getLineOddOptions(obj) {
type
:
'slider'
,
// 显示滑动条
type
:
'slider'
,
// 显示滑动条
xAxisIndex
:
0
,
// 指定水平拖动的 x 轴索引
xAxisIndex
:
0
,
// 指定水平拖动的 x 轴索引
start
:
0
,
// 初始的数据窗口范围的起始位置
start
:
0
,
// 初始的数据窗口范围的起始位置
end
:
100
// 初始的数据窗口范围的结束位置
end
:
100
,
// 初始的数据窗口范围的结束位置
dataBackground
:
{
lineStyle
:
{
width
:
10
,
// 滑动柱的宽度
color
:
'#ff0000'
// 滑动柱的颜色
}
}
}
}
],
],
yAxis
:
{
yAxis
:
{
type
:
'value'
type
:
'value'
,
axisLabel
:
{
formatter
:
function
(
value
)
{
if
(
value
===
0
)
{
return
''
}
else
{
return
value
}
}
}
},
},
series
:
[
series
:
[
{
{
...
...
src/views/home/components/AddValue.vue
View file @
c2d1977
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-14 10:26:24
* @Date: 2023-09-14 10:26:24
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-10-
09 16:47:24
* @LastEditTime: 2023-10-
10 15:59:19
* @FilePath: \scrm-micro-home\src\views\home\components\AddValue.vue
* @FilePath: \scrm-micro-home\src\views\home\components\AddValue.vue
* @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=
"analysis-main"
>
<div
class=
"analysis-main"
v-if=
"chartList.length"
>
<div
class=
"analysis-head"
>
<div
class=
"analysis-head"
>
增值业务分析
增值业务分析
</div>
</div>
...
@@ -37,6 +37,7 @@ export default {
...
@@ -37,6 +37,7 @@ export default {
url
:
'/appreciation/inSale/upgrade'
,
url
:
'/appreciation/inSale/upgrade'
,
isShow
:
()
=>
util
.
isShowBtn
(
'/inSale/upgrade'
,
null
),
isShow
:
()
=>
util
.
isShowBtn
(
'/inSale/upgrade'
,
null
),
value
:
0
,
value
:
0
,
isFlag
:
true
,
lineList
:
[]
lineList
:
[]
},
},
{
{
...
@@ -46,6 +47,7 @@ export default {
...
@@ -46,6 +47,7 @@ export default {
url
:
'/store/orderManage/index?order=4'
,
url
:
'/store/orderManage/index?order=4'
,
isShow
:
()
=>
util
.
isShowBtn
(
'/orderManage/index'
,
null
),
isShow
:
()
=>
util
.
isShowBtn
(
'/orderManage/index'
,
null
),
value
:
154.9
,
value
:
154.9
,
isFlag
:
true
,
lineList
:
[]
lineList
:
[]
},
},
{
{
...
@@ -55,6 +57,7 @@ export default {
...
@@ -55,6 +57,7 @@ export default {
url
:
'/appreciation/beforeSale/checkSet'
,
url
:
'/appreciation/beforeSale/checkSet'
,
isShow
:
()
=>
util
.
isShowBtn
(
'/beforeSale/checkSet'
,
null
),
isShow
:
()
=>
util
.
isShowBtn
(
'/beforeSale/checkSet'
,
null
),
value
:
101.5
,
value
:
101.5
,
isFlag
:
true
,
lineList
:
[]
lineList
:
[]
}
}
]
]
...
@@ -73,15 +76,17 @@ export default {
...
@@ -73,15 +76,17 @@ export default {
}
}
console
.
log
(
res
,
'res'
)
console
.
log
(
res
,
'res'
)
const
mapData
=
{
const
mapData
=
{
0
:
[
'totalShopProfitMoney'
,
'diagramList'
],
0
:
[
'totalShopProfitMoney'
,
'diagramList'
,
'isOpen'
],
1
:
[
'crowdfundingOutput'
,
'crowdfundingOutputTrend'
,
'crowdfundingFlag'
],
1
:
[
'crowdfundingOutput'
,
'crowdfundingOutputTrend'
,
'crowdfundingFlag'
],
2
:
[
'membershipOutput'
,
'membershipOutputTrend'
,
'membershipFlag'
]
2
:
[
'membershipOutput'
,
'membershipOutputTrend'
,
'membershipFlag'
]
}
}
this
.
chartList
.
forEach
((
item
,
index
)
=>
{
this
.
chartList
.
forEach
((
item
,
index
)
=>
{
item
.
value
=
output
[
mapData
[
index
][
0
]]
item
.
value
=
output
[
mapData
[
index
][
0
]]
item
.
lineList
=
output
[
mapData
[
index
][
1
]]
item
.
lineList
=
output
[
mapData
[
index
][
1
]]
// item.isFlag = list[0
]
item
.
isFlag
=
output
[
mapData
[
index
][
2
]
]
})
})
this
.
chartList
=
this
.
chartList
.
filter
(
i
=>
i
.
isFlag
)
console
.
log
(
this
.
chartList
)
}
}
}
}
}
}
...
...
src/views/home/components/AnalysisLine.vue
View file @
c2d1977
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-14 11:21:38
* @Date: 2023-09-14 11:21:38
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-10-
08 14:14:10
* @LastEditTime: 2023-10-
10 10:35:11
* @FilePath: \scrm-micro-home\src\views\home\components\AnalysisLine.vue
* @FilePath: \scrm-micro-home\src\views\home\components\AnalysisLine.vue
* @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
-->
-->
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<div
class=
"analysis-border-title"
>
{{
analysisData
.
title
}}
</div>
<div
class=
"analysis-border-title"
>
{{
analysisData
.
title
}}
</div>
<div
class=
"analysis-border-num flex"
>
<div
class=
"analysis-border-num flex"
>
累计增量产值
累计增量产值
<span>
{{
analysisData
.
value
}}
</span>
<span>
{{
analysisData
.
value
|
formatNumber
}}
</span>
<span
class=
"jump-btn"
@
click=
"jumpDetail"
v-if=
"analysisData.isShow()"
>
查看明细
</span>
<span
class=
"jump-btn"
@
click=
"jumpDetail"
v-if=
"analysisData.isShow()"
>
查看明细
</span>
<span
class=
"jump-btn"
v-else
>
暂无权限
</span>
<span
class=
"jump-btn"
v-else
>
暂无权限
</span>
</div>
</div>
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
util
from
'@/utils/util'
export
default
{
export
default
{
props
:
{
props
:
{
analysisData
:
{
analysisData
:
{
...
@@ -31,6 +32,11 @@ export default {
...
@@ -31,6 +32,11 @@ export default {
data
()
{
data
()
{
return
{}
return
{}
},
},
filters
:
{
formatNumber
(
val
)
{
return
util
.
formatNumber
(
val
)
}
},
methods
:
{
methods
:
{
jumpDetail
()
{
jumpDetail
()
{
this
.
$history
.
push
(
this
.
analysisData
.
url
)
this
.
$history
.
push
(
this
.
analysisData
.
url
)
...
...
src/views/home/components/Journey.vue
View file @
c2d1977
...
@@ -8,8 +8,8 @@
...
@@ -8,8 +8,8 @@
<div
class=
"analysis-item-head"
>
<div
class=
"analysis-item-head"
>
<img
:src=
"require(`@/assets/img/home/icon-$
{index + 1}.png`)" />
<img
:src=
"require(`@/assets/img/home/icon-$
{index + 1}.png`)" />
<span>
{{
item
.
instName
}}
</span>
<span>
{{
item
.
instName
}}
</span>
<a
@
click=
"handleJump(item, 'index')"
v-if=
"item.instStatus == 1"
>
查看使用情况
</a>
<a
@
click=
"handleJump(item, '
journey/
index')"
v-if=
"item.instStatus == 1"
>
查看使用情况
</a>
<a
@
click=
"handleJump(item, 'config')"
v-else
>
去使用
</a>
<a
@
click=
"handleJump(item, '
journeyConfig/
config')"
v-else
>
去使用
</a>
<div
:class=
"
{ 'analysis-item-status': true, 'is-disable': item.instStatus != 1 }">
<div
:class=
"
{ 'analysis-item-status': true, 'is-disable': item.instStatus != 1 }">
<i
:class=
"`$
{getStatusValue(item, 'icon')}`">
</i>
<i
:class=
"`$
{getStatusValue(item, 'icon')}`">
</i>
<span>
{{
getStatusValue
(
item
,
'label'
)
}}
</span>
<span>
{{
getStatusValue
(
item
,
'label'
)
}}
</span>
...
@@ -159,7 +159,7 @@ export default {
...
@@ -159,7 +159,7 @@ export default {
return
STATUS
.
find
(
item
=>
item
.
value
==
val
.
instStatus
)[
prop
]
return
STATUS
.
find
(
item
=>
item
.
value
==
val
.
instStatus
)[
prop
]
},
},
handleJump
(
item
,
path
)
{
handleJump
(
item
,
path
)
{
this
.
$history
.
push
(
`/scene/
journeyConfig/
${
path
}
?title=
${
item
.
instName
}
-续保旅程&instId=
${
item
.
instId
}
`
)
this
.
$history
.
push
(
`/scene/
${
path
}
?title=
${
item
.
instName
}
-续保旅程&instId=
${
item
.
instId
}
`
)
}
}
}
}
}
}
...
...
src/views/home/components/MicroStore.vue
View file @
c2d1977
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-14 10:26:58
* @Date: 2023-09-14 10:26:58
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-10-
09 11:44:09
* @LastEditTime: 2023-10-
10 13:46:15
* @FilePath: \scrm-micro-home\src\views\home\components\MicroStore.vue
* @FilePath: \scrm-micro-home\src\views\home\components\MicroStore.vue
* @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
-->
-->
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<div
class=
"warp-num"
>
{{
orderDetail
.
totalSaleAmount
|
formatNumber
}}
</div>
<div
class=
"warp-num"
>
{{
orderDetail
.
totalSaleAmount
|
formatNumber
}}
</div>
<div
class=
"warp-price"
>
<div
class=
"warp-price"
>
本月销售额
本月销售额
<span>
{{
orderDetail
.
totalSaleAmount
}}
</span>
<span>
¥
{{
orderDetail
.
saleAmount
|
formatNumber
}}
</span>
</div>
</div>
<img
src=
"@/assets/img/home/money-icon.png"
/>
<img
src=
"@/assets/img/home/money-icon.png"
/>
</div>
</div>
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</div>
</div>
<div
class=
"analysis-circle"
>
<div
class=
"analysis-circle"
>
<div
class=
"analysis-circle-title"
>
业务占比分析
</div>
<div
class=
"analysis-circle-title"
>
业务占比分析
</div>
<div
class=
"flex"
>
<div
class=
"flex"
v-if=
"!emptyStatus"
>
<div
class=
"analysis-circle-left"
>
<div
class=
"analysis-circle-left"
>
<line-chart
:lineList=
"orderList"
domId=
"order1"
functionStr=
"getPieOptions"
></line-chart>
<line-chart
:lineList=
"orderList"
domId=
"order1"
functionStr=
"getPieOptions"
></line-chart>
</div>
</div>
...
@@ -69,6 +69,10 @@
...
@@ -69,6 +69,10 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
v-else
class=
"empty-panel"
>
<div
class=
"empty-img"
><img
src=
"@/assets/img/home/empty.png"
/></div>
<div
class=
"empty-text"
>
暂无数据
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -87,6 +91,7 @@ export default {
...
@@ -87,6 +91,7 @@ export default {
lineList
:
[]
lineList
:
[]
},
},
timeValue
:
[],
timeValue
:
[],
emptyStatus
:
true
,
orderDetail
:
{},
orderDetail
:
{},
orderList
:
[
orderList
:
[
{
label
:
'商城'
,
color
:
'#5850FF'
,
orderSource
:
1
,
saleAmount
:
0
,
orderCount
:
0
,
radio
:
0
},
{
label
:
'商城'
,
color
:
'#5850FF'
,
orderSource
:
1
,
saleAmount
:
0
,
orderCount
:
0
,
radio
:
0
},
...
@@ -100,7 +105,7 @@ export default {
...
@@ -100,7 +105,7 @@ export default {
},
},
filters
:
{
filters
:
{
formatNumber
(
val
)
{
formatNumber
(
val
)
{
return
util
.
formatNumber
(
val
)
return
util
.
formatNumber
(
val
)
||
0
}
}
},
},
watch
:
{
watch
:
{
...
@@ -154,15 +159,22 @@ export default {
...
@@ -154,15 +159,22 @@ export default {
this
.
dateChange
(
this
.
timeValue
,
false
)
this
.
dateChange
(
this
.
timeValue
,
false
)
},
},
getLineList
(
params
)
{
getLineList
(
params
)
{
this
.
emptyStatus
=
false
this
.
$apis
.
home
.
analysisOrder
(
params
).
then
(
res
=>
{
this
.
$apis
.
home
.
analysisOrder
(
params
).
then
(
res
=>
{
this
.
orderDetail
=
res
||
{}
this
.
orderDetail
=
res
||
{}
this
.
lineList
.
lineList
=
res
.
trendData
||
[]
this
.
lineList
.
lineList
=
res
.
trendData
||
[]
if
(
this
.
dateValue
==
'month'
)
{
this
.
lineList
.
lineList
.
forEach
(
i
=>
{
i
.
aggregateTime
=
i
.
aggregateTime
.
substring
(
0
,
7
)
})
}
const
pieData
=
res
.
pieData
||
[]
const
pieData
=
res
.
pieData
||
[]
const
saleAmount
=
pieData
const
saleAmount
=
pieData
.
map
(
item
=>
item
.
saleAmount
)
.
map
(
item
=>
item
.
saleAmount
)
.
reduce
((
prev
,
cur
)
=>
{
.
reduce
((
prev
,
cur
)
=>
{
return
prev
+
cur
return
prev
+
cur
},
0
)
},
0
)
if
(
pieData
.
length
)
pieData
.
forEach
(
item
=>
{
pieData
.
forEach
(
item
=>
{
this
.
orderList
.
forEach
(
i
=>
{
this
.
orderList
.
forEach
(
i
=>
{
if
(
i
.
orderSource
==
item
.
orderSource
)
{
if
(
i
.
orderSource
==
item
.
orderSource
)
{
...
@@ -172,6 +184,7 @@ export default {
...
@@ -172,6 +184,7 @@ export default {
}
}
})
})
})
})
else
this
.
emptyStatus
=
true
})
})
}
}
}
}
...
@@ -267,6 +280,16 @@ export default {
...
@@ -267,6 +280,16 @@ export default {
text-align
:
center
;
text-align
:
center
;
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
}
.empty-panel
{
text-align
:
center
;
color
:
#999999
;
font-size
:
16px
;
.empty-img
{
width
:
338px
;
height
:
142px
;
margin
:
20px
auto
;
}
}
&
-left
{
&
-left
{
width
:
360px
;
width
:
360px
;
}
}
...
...
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