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 b0f6e301
authored
Sep 15, 2023
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
第一轮bug修复
1 parent
d0446bfb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
93 additions
and
81 deletions
src/views/internal/components/DoubleBarChart.vue
src/views/internal/components/DoubleBarOptions.js
src/views/internal/components/PriceSwitch.vue
src/views/internal/components/ViewClue.vue
src/views/solar/PurchaseProgress.vue
src/views/solarDetail/PurchaseStorageTable.vue
src/views/internal/components/DoubleBarChart.vue
View file @
b0f6e30
...
@@ -64,20 +64,8 @@ export default {
...
@@ -64,20 +64,8 @@ export default {
this
.
chartBindEvent
()
this
.
chartBindEvent
()
},
},
methods
:
{
methods
:
{
tooltipFormatter
(
obj
)
{
var
_currentItem
=
this
.
dataList
[
obj
[
0
].
dataIndex
]
var
_html
=
''
var
_txt
=
''
this
.
tooltipFormatterObj
.
forEach
(
item
=>
{
_txt
+=
`<div style="display:flex;"><div style="color: #c9c9c9">
${
item
.
label
}
:</div><div style="color: #fff;">
${
utils
.
numAddSymbol
(
_currentItem
[
item
.
attrName
])}${
item
.
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;">
${
_txt
}
</div>`
return
_html
},
drawBar
(
dataList
)
{
drawBar
(
dataList
)
{
this
.
barLineOptions
=
getBarLineOptions
({
tooltipFormatter
:
this
.
tooltipFormatter
,
seriesData
:
dataList
})
this
.
barLineOptions
=
getBarLineOptions
({
seriesData
:
dataList
})
this
.
barLineOptions
.
xAxis
.
data
=
dataList
.
map
(
item
=>
item
.
statMonth
)
this
.
barLineOptions
.
xAxis
.
data
=
dataList
.
map
(
item
=>
item
.
statMonth
)
this
.
barLineOptions
.
series
[
0
].
data
=
dataList
.
map
(
item
=>
item
.
channel_zx
)
this
.
barLineOptions
.
series
[
0
].
data
=
dataList
.
map
(
item
=>
item
.
channel_zx
)
this
.
barLineOptions
.
series
[
1
].
data
=
dataList
.
map
(
item
=>
item
.
channel_qd
)
this
.
barLineOptions
.
series
[
1
].
data
=
dataList
.
map
(
item
=>
item
.
channel_qd
)
...
...
src/views/internal/components/DoubleBarOptions.js
View file @
b0f6e30
...
@@ -3,13 +3,13 @@ import utils from '../../../utils/util'
...
@@ -3,13 +3,13 @@ import utils from '../../../utils/util'
function
getBarLineOptions
(
obj
)
{
function
getBarLineOptions
(
obj
)
{
const
{
tooltipFormatter
,
seriesData
}
=
obj
const
{
tooltipFormatter
,
seriesData
}
=
obj
var
barLineOption
=
{
var
barLineOption
=
{
tooltip
:
{
//
tooltip: {
trigger
:
'axis'
,
//
trigger: 'axis',
borderWidth
:
0
,
//
borderWidth: 0,
padding
:
0
,
//
padding: 0,
backgroundColor
:
'#051526'
,
//
backgroundColor: '#051526',
formatter
:
tooltipFormatter
||
''
//
formatter: tooltipFormatter || ''
},
//
},
xAxis
:
{
xAxis
:
{
data
:
[]
data
:
[]
},
},
...
@@ -23,7 +23,13 @@ function getBarLineOptions(obj) {
...
@@ -23,7 +23,13 @@ function getBarLineOptions(obj) {
color
:
'#1d2a38'
color
:
'#1d2a38'
}
}
},
},
splitNumber
:
4
splitNumber
:
4
,
axisLabel
:
{
// 这种做法就是在y轴的数据的值旁边拼接单位,貌似也挺方便的
formatter
:
function
(
value
)
{
return
`
${
value
/
10000
}
万`
}
}
},
},
grid
:
{
grid
:
{
left
:
'3%'
,
left
:
'3%'
,
...
@@ -43,29 +49,27 @@ function getBarLineOptions(obj) {
...
@@ -43,29 +49,27 @@ function getBarLineOptions(obj) {
position
:
'top'
,
position
:
'top'
,
color
:
'#fff'
,
color
:
'#fff'
,
formatter
:
params
=>
{
formatter
:
params
=>
{
params
.
value
?
utils
.
numAddSymbol
(
params
.
value
)
:
''
return
params
.
value
?
utils
.
numAddSymbol
((
params
.
value
/
10000
).
toFixed
(
0
))
:
''
return
params
.
value
}
}
},
},
itemStyle
:
{
itemStyle
:
{
barBorderRadius
:
[
2
,
2
,
0
,
0
],
// 柱体圆角
barBorderRadius
:
[
2
,
2
,
0
,
0
],
// 柱体圆角
color
:
function
(
params
)
{
color
:
function
(
params
)
{
// const colorList = [
const
colorList
=
[
// ['#22D8FF', '#5C56FF'],
[
'#22D8FF'
,
'#5C56FF'
],
// ['#2AD190', '#00B7DF']
[
'#2AD190'
,
'#00B7DF'
]
// ]
]
const
colorList
=
[
'#22D8FF'
,
'#5C56FF'
]
var
colorItem
=
[]
// var colorItem = []
colorItem
=
params
.
dataIndex
%
2
===
0
?
colorList
[
0
]
:
colorList
[
1
]
// colorItem = params.dataIndex % 2 === 0 ? colorList[0] : colorList[1]
return
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[
return
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[
{
{
// 代表渐变色从正上方开始
// 代表渐变色从正上方开始
offset
:
0
,
// offset范围是0~1,用于表示位置,0是指0%处的颜色
offset
:
0
,
// offset范围是0~1,用于表示位置,0是指0%处的颜色
color
:
color
List
[
0
]
color
:
color
Item
[
0
]
},
// 柱图渐变色
},
// 柱图渐变色
{
{
offset
:
1
,
// 指100%处的颜色
offset
:
1
,
// 指100%处的颜色
color
:
color
List
[
1
]
color
:
color
Item
[
1
]
}
}
])
])
}
}
...
@@ -81,30 +85,28 @@ function getBarLineOptions(obj) {
...
@@ -81,30 +85,28 @@ function getBarLineOptions(obj) {
position
:
'top'
,
position
:
'top'
,
color
:
'#fff'
,
color
:
'#fff'
,
formatter
:
params
=>
{
formatter
:
params
=>
{
params
.
value
?
utils
.
numAddSymbol
(
params
.
value
)
:
''
return
params
.
value
?
utils
.
numAddSymbol
((
params
.
value
/
10000
).
toFixed
(
0
))
:
''
return
params
.
value
}
}
},
},
data
:
[],
data
:
[],
itemStyle
:
{
itemStyle
:
{
barBorderRadius
:
[
2
,
2
,
0
,
0
],
// 柱体圆角
barBorderRadius
:
[
2
,
2
,
0
,
0
],
// 柱体圆角
color
:
function
(
params
)
{
color
:
function
(
params
)
{
// const colorList = [
const
colorList
=
[
// ['#11627A', '#282F7A'],
[
'#11627A'
,
'#282F7A'
],
// ['#145F4E', '#035972']
[
'#145F4E'
,
'#035972'
]
// ]
]
const
colorList
=
[
'#11627A'
,
'#282F7A'
]
var
colorItem
=
[]
// var colorItem = []
colorItem
=
params
.
dataIndex
%
2
===
0
?
colorList
[
0
]
:
colorList
[
1
]
// colorItem = params.dataIndex % 2 === 0 ? colorList[0] : colorList[1]
return
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[
return
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[
{
{
// 代表渐变色从正上方开始
// 代表渐变色从正上方开始
offset
:
0
,
// offset范围是0~1,用于表示位置,0是指0%处的颜色
offset
:
0
,
// offset范围是0~1,用于表示位置,0是指0%处的颜色
color
:
color
List
[
0
]
color
:
color
Item
[
0
]
},
// 柱图渐变色
},
// 柱图渐变色
{
{
offset
:
1
,
// 指100%处的颜色
offset
:
1
,
// 指100%处的颜色
color
:
color
List
[
1
]
color
:
color
Item
[
1
]
}
}
])
])
}
}
...
...
src/views/internal/components/PriceSwitch.vue
View file @
b0f6e30
...
@@ -20,7 +20,7 @@ export default {
...
@@ -20,7 +20,7 @@ export default {
},
},
boxWidth
:
{
boxWidth
:
{
type
:
String
,
type
:
String
,
default
:
'
5vw
'
default
:
''
},
},
unit
:
{
unit
:
{
type
:
String
,
type
:
String
,
...
...
src/views/internal/components/ViewClue.vue
View file @
b0f6e30
...
@@ -18,19 +18,31 @@
...
@@ -18,19 +18,31 @@
<DoubleBarChart
ref=
"saleChartRef"
domId=
"purchase"
:height=
"chartHeight"
:colorList=
"colorList"
valueName=
"channel"
></DoubleBarChart>
<DoubleBarChart
ref=
"saleChartRef"
domId=
"purchase"
:height=
"chartHeight"
:colorList=
"colorList"
valueName=
"channel"
></DoubleBarChart>
<div
class=
"legend"
>
<div
class=
"legend"
>
<div
class=
"legend-item shop"
>
<div
class=
"legend-item shop"
>
<span
class=
"legend-even"
>
直销
</span>
<span
class=
"legend-even"
>
双
</span>
<span
class=
"legend-odd"
>
渠道
</span>
<span
class=
"legend-odd"
>
单
</span>
<span>
直销
</span>
</div>
<div
class=
"legend-item self"
>
<span
class=
"legend-even"
>
双
</span>
<span
class=
"legend-odd"
>
单
</span>
渠道
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"trend-box"
>
<div
class=
"trend-box"
>
<div
class=
"patch-title"
>
按年统计客户销售金额的合理性 -
<PriceSwitch
class=
"rationality"
unit=
""
isObject
:selectList=
"selectList"
@
selectPrice=
"selectRationality"
></PriceSwitch></div>
<div
class=
"patch-title"
>
<div
class=
"rationality-text"
>
收入占比:
{{
ratio
}}
%
<PriceSwitch
style=
"display: inline-block;"
:selectList=
"rationalityPriceList"
@
selectPrice=
"selectPrice"
></PriceSwitch></div>
按年统计客户销售金额的合理性 -
<PriceSwitch
class=
"rationality"
unit=
""
isObject
:selectList=
"selectList"
@
selectPrice=
"selectRationality"
></PriceSwitch>
</div>
<div
class=
"rationality-text"
>
收入占比:
{{
ratio
}}
%
<PriceSwitch
style=
"display: inline-block"
:selectList=
"rationalityPriceList"
@
selectPrice=
"selectPrice"
></PriceSwitch>
</div>
<BarChart
ref=
"rationalityChartRef"
domId=
"rationalityChart"
height=
"13.99vh"
label=
"statDate"
:barWidth=
"'50'"
:colorList=
"greenColorList"
valueName=
"num"
></BarChart>
<BarChart
ref=
"rationalityChartRef"
domId=
"rationalityChart"
height=
"13.99vh"
label=
"statDate"
:barWidth=
"'50'"
:colorList=
"greenColorList"
valueName=
"num"
></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"
@
selectPrice=
"selectCorrelation"
></PriceSwitch></div>
<div
class=
"correlation"
><PriceSwitch
style=
"display: inline-block"
unit=
""
boxWidth=
"6.94vw"
:selectList=
"serviceList"
@
selectPrice=
"selectCorrelation"
></PriceSwitch></div>
<LineChart
ref=
"correlationChartRef"
domId=
"correlationChart"
height=
"13.99vh"
:tooltipFormatterObj=
"correlationTooltips"
:valName=
"correlationTooltips.attrName"
></LineChart>
<LineChart
ref=
"correlationChartRef"
domId=
"correlationChart"
height=
"13.99vh"
:tooltipFormatterObj=
"correlationTooltips"
:valName=
"correlationTooltips.attrName"
></LineChart>
</div>
</div>
</div>
</div>
...
@@ -171,7 +183,7 @@ export default {
...
@@ -171,7 +183,7 @@ export default {
.legend-even
,
.legend-even
,
.legend-odd
{
.legend-odd
{
display
:
inline-block
;
display
:
inline-block
;
width
:
1
.83vw
;
width
:
0
.83vw
;
height
:
1.33vh
;
height
:
1.33vh
;
line-height
:
1.33vh
;
line-height
:
1.33vh
;
margin-right
:
0.28vw
;
margin-right
:
0.28vw
;
...
@@ -180,13 +192,21 @@ export default {
...
@@ -180,13 +192,21 @@ export default {
}
}
}
}
.shop
{
.shop
{
.legend-even
{
.legend-even
{
background-image
:
linear-gradient
(
180deg
,
#22d8ff
0%
,
#5c56ff
100%
);
background-image
:
linear-gradient
(
180deg
,
#2ad190
1%
,
#00b7df
100%
);
}
}
.legend-odd
{
.legend-odd
{
background-image
:
linear-gradient
(
180deg
,
#11627a
0%
,
#282f7a
100%
);
background-image
:
linear-gradient
(
180deg
,
#22d8ff
0%
,
#5c56ff
100%
);
}
}
}
}
.self
{
.legend-even
{
background-image
:
linear-gradient
(
180deg
,
#145f4e
1%
,
#035972
100%
);
}
.legend-odd
{
background-image
:
linear-gradient
(
180deg
,
#11627a
0%
,
#282f7a
100%
);
}
}
}
}
}
}
.trend-box
{
.trend-box
{
...
@@ -200,30 +220,29 @@ export default {
...
@@ -200,30 +220,29 @@ export default {
}
}
.rationality
{
.rationality
{
display
:
inline-block
;
display
:
inline-block
;
/deep/
{
/deep/
{
.type-plugin{
.type-plugin
{
.trend-type-box
{
.trend-type-box
{
padding-left
:
5px
;
padding-left
:
5px
;
}
}
.text
{
.text
{
font-weight
:
400
;
font-weight
:
400
;
font-size
:
14px
;
font-size
:
14px
;
}
}
}
}
}
&
-text
{
display
:
flex
;
justify-content
:
space-between
;
font-size
:
10px
;
font-weight
:
600
;
color
:
#fff
;
margin-top
:
1.33vh
;
}
}
}
&
-text
{
display
:
flex
;
justify-content
:
space-between
;
font-size
:
10px
;
font-weight
:
600
;
color
:
#fff
;
margin-top
:
1.33vh
;
}
}
.correlation
{
.correlation
{
display
:
flex
;
display
:
flex
;
flex-direction
:
row-reverse
;
flex-direction
:
row-reverse
;
margin-top
:
1.33vh
;
margin-top
:
1.33vh
;
}
}
</
style
>
</
style
>
src/views/solar/PurchaseProgress.vue
View file @
b0f6e30
...
@@ -50,7 +50,7 @@ export default {
...
@@ -50,7 +50,7 @@ export default {
name
:
'purchaseamount'
,
name
:
'purchaseamount'
,
hasIcon
:
'¥'
,
hasIcon
:
'¥'
,
type
:
'number'
,
type
:
'number'
,
width
:
'5vw'
width
:
'5
.5
vw'
}
}
]
]
}
}
...
...
src/views/solarDetail/PurchaseStorageTable.vue
View file @
b0f6e30
...
@@ -42,6 +42,9 @@ export default {
...
@@ -42,6 +42,9 @@ export default {
font-weight
:
500
;
font-weight
:
500
;
font-size
:
11px
;
font-size
:
11px
;
text-align
:
center
;
text-align
:
center
;
height
:
26.33vh
;
overflow
:
auto
;
background-color
:
#061422
;
thead
{
thead
{
height
:
3.11vh
;
height
:
3.11vh
;
background
:
#0a214d
;
background
:
#0a214d
;
...
@@ -54,7 +57,7 @@ export default {
...
@@ -54,7 +57,7 @@ export default {
}
}
.el-table__body-wrapper
{
.el-table__body-wrapper
{
max-height
:
52vh
;
max-height
:
52vh
;
overflow-y
:
scroll
;
//
overflow-y
:
scroll
;
}
}
.el-table
tr
{
.el-table
tr
{
background-color
:
#061422
;
background-color
:
#061422
;
...
@@ -75,7 +78,7 @@ export default {
...
@@ -75,7 +78,7 @@ export default {
}
}
.el-table
td
.el-table__cell
,
.el-table
td
.el-table__cell
,
.el-table
th
.el-table__cell.is-leaf
{
.el-table
th
.el-table__cell.is-leaf
{
border-bottom
:
1px
solid
#161
C5F
;
border-bottom
:
1px
solid
#161
c5f
;
}
}
.el-table--border
::after
,
.el-table--border
::after
,
.el-table--group
::after
,
.el-table--group
::after
,
...
@@ -97,7 +100,7 @@ export default {
...
@@ -97,7 +100,7 @@ export default {
line-height
:
1vw
;
line-height
:
1vw
;
}
}
.el-table__empty-text
{
.el-table__empty-text
{
line-height
:
2.11vh
;
line-height
:
2.11vh
;
}
}
</
style
>
</
style
>
...
...
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