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 a157a4eb
authored
Sep 08, 2023
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v2.2.0' of
http://192.168.3.233:8090/h5/glsk-data-view-pd
into v2.2.0
2 parents
9858f1b8
7189c637
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
89 additions
and
44 deletions
src/api/modules/internal.js
src/views/internal/InternalLeft.vue
src/views/internal/components/BarChart.vue
src/views/internal/components/BarOption.js
src/views/internal/components/LineCharts.vue
src/views/internal/components/ViewClue.vue
src/api/modules/internal.js
View file @
a157a4e
...
@@ -20,7 +20,7 @@ const getLinkFinishedProductTrend = params => {
...
@@ -20,7 +20,7 @@ const getLinkFinishedProductTrend = params => {
// 数字化管理(线索服务):设备订阅数量和线索相关性分析
// 数字化管理(线索服务):设备订阅数量和线索相关性分析
const
getManageClueAnalysis
=
params
=>
{
const
getManageClueAnalysis
=
params
=>
{
return
window
.
$HTTP
.
get
(
'inner/getManageClueAnalysis'
,
params
)
return
window
.
$HTTP
.
get
(
'inner/getManageClueAnalysis'
,
{}
)
}
}
// 数字化管理(线索服务):按年统计销售金额的合理性
// 数字化管理(线索服务):按年统计销售金额的合理性
...
...
src/views/internal/InternalLeft.vue
View file @
a157a4e
<!--
* @Description:
* @Author: huyue
* @Date: 2023-09-05 14:34:10
* @LastEditors: huyue
* @LastEditTime: 2023-09-07 15:59:31
-->
<
template
>
<
template
>
<div
class=
"left"
>
<div
class=
"left"
>
<div
class=
"left-top"
>
<div
class=
"left-top"
>
<CoreIndex></CoreIndex>
<
!--
<
CoreIndex></CoreIndex>
<DigitalLink></DigitalLink>
<DigitalLink></DigitalLink>
-->
</div>
</div>
<DigitalMarketing></DigitalMarketing>
<DigitalMarketing></DigitalMarketing>
</div>
</div>
...
...
src/views/internal/components/BarChart.vue
View file @
a157a4e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2023-07-07 14:01:42
* @Date: 2023-07-07 14:01:42
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2023-0
8-03 16:43:09
* @LastEditTime: 2023-0
9-07 17:32:33
-->
-->
<
template
>
<
template
>
<div>
<div>
...
@@ -46,7 +46,11 @@ export default {
...
@@ -46,7 +46,11 @@ export default {
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
},
},
formatYAxis
:
Boolean
formatYAxis
:
Boolean
,
label
:
{
type
:
String
,
default
:
'statMonth'
}
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -66,16 +70,19 @@ export default {
...
@@ -66,16 +70,19 @@ export default {
var
_currentItem
=
this
.
dataList
[
obj
[
0
].
dataIndex
]
var
_currentItem
=
this
.
dataList
[
obj
[
0
].
dataIndex
]
var
_html
=
''
var
_html
=
''
var
_txt
=
''
var
_txt
=
''
_txt
+=
`<div style="display:flex;"><div style="color: #c9c9c9">
${
this
.
tooltipFormatterObj
.
label
}
:</div><div style="color: #fff;">
${
utils
.
numAddSymbol
(
_currentItem
[
this
.
tooltipFormatterObj
.
attrName
])}${
this
.
tooltipFormatterObj
.
addSymbol
||
''
}
</div></div>`
_txt
+=
`<div style="display:flex;"><div style="color: #c9c9c9">
${
this
.
tooltipFormatterObj
.
label
?
this
.
tooltipFormatterObj
.
label
:
''
}
:</div><div style="color: #fff;">
${
utils
.
numAddSymbol
(
_currentItem
[
this
.
tooltipFormatterObj
.
attrName
])}${
this
.
tooltipFormatterObj
.
addSymbol
||
''
}
</div></div>`
_html
+=
`<div style="backdrop-filter: blur(4px);background-color: #051526;border: 2px solid;border-image: linear-gradient(90deg, #074989, #30DCFF, #074989) 1;padding: 10px;">
_html
+=
`<div style="backdrop-filter: blur(4px);background-color: #051526;border: 2px solid;border-image: linear-gradient(90deg, #074989, #30DCFF, #074989) 1;padding: 10px;">
${
_txt
}
${
_txt
}
</div>`
</div>`
return
_html
return
_html
},
},
drawBar
()
{
drawBar
(
dataList
)
{
this
.
barOptions
.
xAxis
.
data
=
this
.
dataList
.
map
(
item
=>
item
.
statMonth
)
if
(
dataList
&&
dataList
.
length
)
{
this
.
barOptions
.
series
[
0
].
data
=
this
.
dataList
.
map
(
item
=>
item
[
this
.
tooltipFormatterObj
.
attrName
])
console
.
log
(
this
.
dataList
)
this
.
barOptions
.
xAxis
.
data
=
dataList
.
map
(
item
=>
item
[
this
.
label
])
this
.
barOptions
.
series
[
0
].
data
=
dataList
.
map
(
item
=>
item
[
this
.
tooltipFormatterObj
.
attrName
])
this
[
this
.
domId
].
setOption
(
this
.
barOptions
)
this
[
this
.
domId
].
setOption
(
this
.
barOptions
)
}
},
},
chartBindEvent
()
{
chartBindEvent
()
{
// resize
// resize
...
...
src/views/internal/components/BarOption.js
View file @
a157a4e
...
@@ -3,21 +3,21 @@
...
@@ -3,21 +3,21 @@
* @Author: huyue
* @Author: huyue
* @Date: 2023-07-07 14:04:52
* @Date: 2023-07-07 14:04:52
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2023-0
8-03 16:42:12
* @LastEditTime: 2023-0
9-07 17:43:27
*/
*/
import
*
as
echarts
from
'echarts'
import
*
as
echarts
from
'echarts'
function
getBarOptions
(
obj
,
colorList
,
isMultiple
,
barwidth
,
formatYAxis
)
{
function
getBarOptions
(
obj
,
colorList
,
isMultiple
,
barwidth
,
formatYAxis
)
{
const
barWidth
=
barwidth
||
'14'
const
barWidth
=
barwidth
||
'14'
const
multiple
=
isMultiple
||
false
const
multiple
=
isMultiple
||
false
const
{
tooltipFormatter
}
=
obj
//
const { tooltipFormatter } = obj
var
barLineOption
=
{
var
barLineOption
=
{
tooltip
:
{
//
tooltip: {
trigger
:
'axis'
,
//
trigger: 'axis',
borderWidth
:
0
,
//
borderWidth: 0,
padding
:
0
,
//
padding: 0,
formatter
:
tooltipFormatter
||
''
,
//
formatter: tooltipFormatter || '',
confine
:
true
//
confine: true
},
//
},
xAxis
:
{
xAxis
:
{
data
:
[]
data
:
[]
},
},
...
@@ -32,7 +32,7 @@ function getBarOptions(obj, colorList, isMultiple, barwidth, formatYAxis) {
...
@@ -32,7 +32,7 @@ function getBarOptions(obj, colorList, isMultiple, barwidth, formatYAxis) {
color
:
'#1d2a38'
color
:
'#1d2a38'
}
}
},
},
splitNumber
:
4
,
//
splitNumber: 4,
axisLabel
:
{
axisLabel
:
{
// 这种做法就是在y轴的数据的值旁边拼接单位,貌似也挺方便的
// 这种做法就是在y轴的数据的值旁边拼接单位,貌似也挺方便的
formatter
:
function
(
value
)
{
formatter
:
function
(
value
)
{
...
@@ -57,7 +57,10 @@ function getBarOptions(obj, colorList, isMultiple, barwidth, formatYAxis) {
...
@@ -57,7 +57,10 @@ function getBarOptions(obj, colorList, isMultiple, barwidth, formatYAxis) {
type
:
'bar'
,
type
:
'bar'
,
data
:
[],
data
:
[],
label
:
{
label
:
{
show
:
false
show
:
true
,
position
:
'top'
,
color
:
'#fff'
,
fontSize
:
10
},
},
itemStyle
:
{
itemStyle
:
{
barBorderRadius
:
[
2
,
2
,
0
,
0
],
// 柱体圆角
barBorderRadius
:
[
2
,
2
,
0
,
0
],
// 柱体圆角
...
...
src/views/internal/components/LineCharts.vue
View file @
a157a4e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2023-09-06 15:08:05
* @Date: 2023-09-06 15:08:05
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2023-09-0
6 15:25:32
* @LastEditTime: 2023-09-0
7 18:02:59
-->
-->
<
template
>
<
template
>
<div
:id=
"domId"
style=
"width: 100%"
:style=
"
{ height }">
</div>
<div
:id=
"domId"
style=
"width: 100%"
:style=
"
{ height }">
</div>
...
@@ -19,10 +19,10 @@ export default {
...
@@ -19,10 +19,10 @@ export default {
height
:
{
height
:
{
type
:
String
type
:
String
},
},
dataList
:
{
//
dataList: {
type
:
Array
,
//
type: Array,
default
:
()
=>
[]
//
default: () => []
},
//
},
domId
:
{
domId
:
{
type
:
String
,
type
:
String
,
default
:
'bar-line'
default
:
'bar-line'
...
@@ -37,7 +37,9 @@ export default {
...
@@ -37,7 +37,9 @@ export default {
}
}
},
},
data
()
{
data
()
{
return
{}
return
{
dataList
:
[]
}
},
},
mounted
()
{
mounted
()
{
...
@@ -56,10 +58,11 @@ export default {
...
@@ -56,10 +58,11 @@ export default {
</div>`
</div>`
return
_html
return
_html
},
},
drawLine
()
{
drawLine
(
dataList
)
{
this
.
barLineOptions
=
getLineOptions
({
tooltipFormatter
:
this
.
tooltipFormatter
,
seriesData
:
this
.
dataList
})
this
.
dataList
=
dataList
this
.
barLineOptions
.
xAxis
.
data
=
this
.
dataList
.
map
(
item
=>
item
.
statMonth
)
this
.
barLineOptions
=
getLineOptions
({
tooltipFormatter
:
this
.
tooltipFormatter
,
seriesData
:
dataList
})
this
.
barLineOptions
.
series
[
0
].
data
=
this
.
dataList
.
map
(
item
=>
item
[
this
.
valName
])
this
.
barLineOptions
.
xAxis
.
data
=
dataList
.
map
(
item
=>
item
.
statMonth
)
this
.
barLineOptions
.
series
[
0
].
data
=
dataList
.
map
(
item
=>
item
[
this
.
valName
])
this
[
this
.
domId
].
setOption
(
this
.
barLineOptions
)
this
[
this
.
domId
].
setOption
(
this
.
barLineOptions
)
},
},
chartBindEvent
()
{
chartBindEvent
()
{
...
...
src/views/internal/components/ViewClue.vue
View file @
a157a4e
...
@@ -2,29 +2,29 @@
...
@@ -2,29 +2,29 @@
<div
class=
"clue"
>
<div
class=
"clue"
>
<div
class=
"trend-box"
>
<div
class=
"trend-box"
>
<div
class=
"patch-title"
>
注册门店趋势
</div>
<div
class=
"patch-title"
>
注册门店趋势
</div>
<BarChart
ref=
"signChartRef"
domId=
"signChart"
:height=
"chartHeight"
:
dataList
.
sync=
"dataList"
:
colorList=
"colorList"
:tooltipFormatterObj=
"tooltips"
></BarChart>
<BarChart
ref=
"signChartRef"
domId=
"signChart"
:height=
"chartHeight"
:colorList=
"colorList"
:tooltipFormatterObj=
"tooltips"
></BarChart>
</div>
</div>
<div
class=
"trend-box"
>
<div
class=
"trend-box"
>
<div
class=
"patch-title"
>
活跃门店趋势
</div>
<div
class=
"patch-title"
>
活跃门店趋势
</div>
<BarChart
ref=
"dynamicChartRef"
domId=
"dynamicChart"
:height=
"chartHeight"
:
dataList
.
sync=
"dataList"
:
colorList=
"greenColorList"
:tooltipFormatterObj=
"tooltips"
></BarChart>
<BarChart
ref=
"dynamicChartRef"
domId=
"dynamicChart"
:height=
"chartHeight"
:colorList=
"greenColorList"
:tooltipFormatterObj=
"tooltips"
></BarChart>
</div>
</div>
<div
class=
"trend-box"
>
<div
class=
"trend-box"
>
<div
class=
"patch-title"
>
月收入趋势
</div>
<div
class=
"patch-title"
>
月收入趋势
</div>
<LineChart
ref=
"monthIncomeChartRef"
domId=
"monthIncomeChart"
:height=
"chartHeight"
:
dataList
.
sync=
"dataList"
:
tooltipFormatterObj=
"tooltips"
:valName=
"tooltips.attrName"
></LineChart>
<LineChart
ref=
"monthIncomeChartRef"
domId=
"monthIncomeChart"
:height=
"chartHeight"
:tooltipFormatterObj=
"tooltips"
:valName=
"tooltips.attrName"
></LineChart>
</div>
</div>
<div
class=
"trend-box"
>
<div
class=
"trend-box"
>
<div
class=
"patch-title"
>
销售渠道趋势
</div>
<div
class=
"patch-title"
>
销售渠道趋势
</div>
<BarChart
ref=
"saleChartRef"
domId=
"saleChart"
:height=
"chartHeight"
:
dataList
.
sync=
"dataList"
:
colorList=
"colorList"
:tooltipFormatterObj=
"tooltips"
></BarChart>
<BarChart
ref=
"saleChartRef"
domId=
"saleChart"
:height=
"chartHeight"
:colorList=
"colorList"
:tooltipFormatterObj=
"tooltips"
></BarChart>
</div>
</div>
<div
class=
"trend-box"
>
<div
class=
"trend-box"
>
<div
class=
"patch-title"
>
按年统计客户销售金额的合理性-
<PriceSwitch
class=
"rationality"
unit=
""
:selectList=
"selectList"
></PriceSwitch></div>
<div
class=
"patch-title"
>
按年统计客户销售金额的合理性-
<PriceSwitch
class=
"rationality"
unit=
""
:selectList=
"selectList"
></PriceSwitch></div>
<div
class=
"rationality-text"
>
收入占比:64.89%
<PriceSwitch
style=
"display: inline-block;"
:selectList=
"rationalityPriceList"
></PriceSwitch></div>
<div
class=
"rationality-text"
>
收入占比:64.89%
<PriceSwitch
style=
"display: inline-block;"
:selectList=
"rationalityPriceList"
></PriceSwitch></div>
<BarChart
ref=
"rationalityChartRef"
domId=
"rationalityChart"
height=
"13.99vh"
:dataList
.
sync=
"dataList"
:colorList=
"greenColorList"
:tooltipFormatterObj=
"t
ooltips"
></BarChart>
<BarChart
ref=
"rationalityChartRef"
domId=
"rationalityChart"
height=
"13.99vh"
label=
"statDate"
:colorList=
"greenColorList"
:tooltipFormatterObj=
"salesT
ooltips"
></BarChart>
</div>
</div>
<div
class=
"trend-box"
>
<div
class=
"trend-box"
>
<div
class=
"patch-title"
>
设备订阅数量和线索相关性分析
</div>
<div
class=
"patch-title"
>
设备订阅数量和线索相关性分析
</div>
<div
class=
"correlation"
><PriceSwitch
style=
"display: inline-block;"
unit=
""
boxWidth=
"6.94vw"
:selectList=
"serviceList"
></PriceSwitch></div>
<div
class=
"correlation"
><PriceSwitch
style=
"display: inline-block;"
unit=
""
boxWidth=
"6.94vw"
:selectList=
"serviceList"
></PriceSwitch></div>
<LineChart
ref=
"correlationChartRef"
domId=
"correlationChart"
height=
"13.99vh"
:
dataList
.
sync=
"dataList"
:colorList=
"colorList"
:tooltipFormatterObj=
"tooltips"
:valName=
"t
ooltips.attrName"
></LineChart>
<LineChart
ref=
"correlationChartRef"
domId=
"correlationChart"
height=
"13.99vh"
:
tooltipFormatterObj=
"correlationTooltips"
:valName=
"correlationT
ooltips.attrName"
></LineChart>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -63,7 +63,15 @@ export default {
...
@@ -63,7 +63,15 @@ export default {
],
],
tooltips
:
{
tooltips
:
{
label
:
'场次'
,
label
:
'场次'
,
attrName
:
'actiNum'
attrName
:
'activeNum'
},
salesTooltips
:
{
label
:
'数量'
,
attrName
:
'num'
},
correlationTooltips
:
{
label
:
'设备数'
,
attrName
:
'deviceNum'
},
},
selectList
:
rationalityList
,
selectList
:
rationalityList
,
rationalityPriceList
,
rationalityPriceList
,
...
@@ -71,20 +79,37 @@ export default {
...
@@ -71,20 +79,37 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
$refs
.
signChartRef
.
drawBar
()
// this.$refs.rationalityChartRef.drawBar()
this
.
$refs
.
dynamicChartRef
.
drawBar
()
// this.$refs.correlationChartRef.drawLine()
this
.
$refs
.
monthIncomeChartRef
.
drawLine
()
this
.
init
()
this
.
$refs
.
saleChartRef
.
drawBar
()
this
.
$refs
.
rationalityChartRef
.
drawBar
()
this
.
$refs
.
correlationChartRef
.
drawLine
()
},
},
methods
:
{
methods
:
{
init
()
{
init
()
{
this
.
getManageClueTrend
()
this
.
getManageClueTrend
()
this
.
getManageClueSalesAmountRationality
(
'num'
)
this
.
getManageClueAnalysis
()
},
},
async
getManageClueTrend
()
{
async
getManageClueTrend
()
{
const
_data
=
await
this
.
api
.
internal
.
getManageClueTrend
()
const
_data
=
await
this
.
api
.
internal
.
getManageClueTrend
()
console
.
log
(
_data
)
const
_dataList
=
_data
.
data
.
dataList
this
.
$refs
.
signChartRef
.
drawBar
(
_dataList
)
this
.
$refs
.
dynamicChartRef
.
drawBar
(
_dataList
)
this
.
$refs
.
monthIncomeChartRef
.
drawLine
(
_dataList
)
this
.
$refs
.
saleChartRef
.
drawBar
(
_dataList
)
},
async
getManageClueSalesAmountRationality
(
queryItem
)
{
const
params
=
{
queryItem
}
const
_data
=
await
this
.
api
.
internal
.
getManageClueSalesAmountRationality
(
params
)
const
_dataList
=
_data
.
data
.
dataList
[
0
].
finishedProductTrendList
this
.
$refs
.
rationalityChartRef
.
drawBar
(
_dataList
)
},
async
getManageClueAnalysis
()
{
const
_data
=
await
this
.
api
.
internal
.
getManageClueAnalysis
()
const
_dataList
=
_data
.
data
.
dataList
console
.
log
(
_dataList
);
this
.
$refs
.
correlationChartRef
.
drawLine
(
_dataList
)
}
}
}
}
}
}
...
...
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