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 c381738a
authored
Jul 18, 2023
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改样式
1 parent
dcfb3847
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
21 deletions
src/components/BarLineChart.vue
src/components/BarLineOptions.js
src/views/home/solar/ContentLeft.vue
src/views/home/solar/PurchaseTrends.vue
src/components/BarLineChart.vue
View file @
c381738
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @Date: 2022-10-25 10:12:26
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2023-07-1
7 15:58:4
3
* @LastEditTime: 2023-07-1
8 10:44:3
3
* @FilePath: \dj-data-view\src\components\ViewTitle.vue
* @FilePath: \dj-data-view\src\components\ViewTitle.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
-->
-->
...
@@ -63,9 +63,9 @@ export default {
...
@@ -63,9 +63,9 @@ export default {
timer
:
null
timer
:
null
}
}
},
},
created
()
{
//
created() {
this
.
barLineOptions
=
getBarLineOptions
({
tooltipFormatter
:
this
.
tooltipFormatter
})
//
this.barLineOptions = getBarLineOptions({ tooltipFormatter: this.tooltipFormatter })
},
//
},
mounted
()
{
mounted
()
{
this
.
barLineDom
=
document
.
getElementById
(
this
.
domId
)
this
.
barLineDom
=
document
.
getElementById
(
this
.
domId
)
this
[
this
.
domId
]
=
echarts
.
init
(
this
.
barLineDom
)
this
[
this
.
domId
]
=
echarts
.
init
(
this
.
barLineDom
)
...
@@ -85,6 +85,7 @@ export default {
...
@@ -85,6 +85,7 @@ export default {
return
_html
return
_html
},
},
drawBarLine
()
{
drawBarLine
()
{
this
.
barLineOptions
=
getBarLineOptions
({
tooltipFormatter
:
this
.
tooltipFormatter
,
seriesData
:
this
.
dataList
})
this
.
barLineOptions
.
xAxis
.
data
=
this
.
dataList
.
map
(
item
=>
item
.
month
)
this
.
barLineOptions
.
xAxis
.
data
=
this
.
dataList
.
map
(
item
=>
item
.
month
)
this
.
barLineOptions
.
series
[
0
].
data
=
this
.
dataList
.
map
(
item
=>
item
.
data1
)
this
.
barLineOptions
.
series
[
0
].
data
=
this
.
dataList
.
map
(
item
=>
item
.
data1
)
this
.
barLineOptions
.
series
[
1
].
data
=
this
.
dataList
.
map
(
item
=>
item
.
data2
)
this
.
barLineOptions
.
series
[
1
].
data
=
this
.
dataList
.
map
(
item
=>
item
.
data2
)
...
...
src/components/BarLineOptions.js
View file @
c381738
import
*
as
echarts
from
'echarts'
import
*
as
echarts
from
'echarts'
import
utils
from
'../utils/util'
import
utils
from
'../utils/util'
function
getBarLineOptions
(
obj
)
{
function
getBarLineOptions
(
obj
)
{
const
{
tooltipFormatter
}
=
obj
const
{
tooltipFormatter
,
seriesData
}
=
obj
var
barLineOption
=
{
var
barLineOption
=
{
tooltip
:
{
tooltip
:
{
trigger
:
'axis'
,
trigger
:
'axis'
,
...
@@ -54,7 +54,9 @@ function getBarLineOptions(obj) {
...
@@ -54,7 +54,9 @@ function getBarLineOptions(obj) {
position
:
'top'
,
position
:
'top'
,
color
:
'#fff'
,
color
:
'#fff'
,
formatter
:
(
params
)
=>
{
formatter
:
(
params
)
=>
{
return
params
.
value
?
utils
.
numAddSymbol
(
params
.
value
)
:
''
const
_dataIndex
=
params
.
dataIndex
const
bar2Value
=
seriesData
[
_dataIndex
].
data2
return
`
${
params
.
value
?
utils
.
numAddSymbol
(
params
.
value
)
:
0
}
\n
${
bar2Value
?
utils
.
numAddSymbol
(
bar2Value
)
:
0
}
`
}
}
},
},
itemStyle
:
{
itemStyle
:
{
...
@@ -89,7 +91,8 @@ function getBarLineOptions(obj) {
...
@@ -89,7 +91,8 @@ function getBarLineOptions(obj) {
position
:
'top'
,
position
:
'top'
,
color
:
'#fff'
,
color
:
'#fff'
,
formatter
:
(
params
)
=>
{
formatter
:
(
params
)
=>
{
return
params
.
value
?
utils
.
numAddSymbol
(
params
.
value
)
:
''
// params.value ? utils.numAddSymbol(params.value) : ''
return
''
}
}
},
},
data
:
[],
data
:
[],
...
...
src/views/home/solar/ContentLeft.vue
View file @
c381738
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2023-07-05 10:35:43
* @Date: 2023-07-05 10:35:43
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2023-07-1
4 10:57:38
* @LastEditTime: 2023-07-1
8 11:05:52
-->
-->
<
template
>
<
template
>
<div
class=
"left"
>
<div
class=
"left"
>
...
@@ -37,19 +37,19 @@ export default {
...
@@ -37,19 +37,19 @@ export default {
{
{
name
:
'总采购额'
,
name
:
'总采购额'
,
valueName
:
'amounttotal'
,
valueName
:
'amounttotal'
,
value
:
'
2,280,708
'
,
value
:
'
0
'
,
bottomLabel
:
'本月采购额'
,
bottomLabel
:
'本月采购额'
,
bottemName
:
'amounttotalThismonth'
,
bottemName
:
'amounttotalThismonth'
,
bottomValue
:
'
2,280,708
'
,
bottomValue
:
'
0
'
,
bottomType
:
'money'
bottomType
:
'money'
},
},
{
{
name
:
'商城采购额'
,
name
:
'商城采购额'
,
valueName
:
'amountshop'
,
valueName
:
'amountshop'
,
value
:
'
2,280,708
'
,
value
:
'
0
'
,
bottomLabel
:
'本月采购额'
,
bottomLabel
:
'本月采购额'
,
bottemName
:
'amountshopThismonth'
,
bottemName
:
'amountshopThismonth'
,
bottomValue
:
'
2,280,708
'
,
bottomValue
:
'
0
'
,
rate
:
'51%'
,
rate
:
'51%'
,
rateName
:
'shopRate'
,
rateName
:
'shopRate'
,
bottomType
:
'money'
bottomType
:
'money'
...
@@ -57,10 +57,10 @@ export default {
...
@@ -57,10 +57,10 @@ export default {
{
{
name
:
'自采采购额'
,
name
:
'自采采购额'
,
valueName
:
'amountself'
,
valueName
:
'amountself'
,
value
:
'
2,280,708
'
,
value
:
'
0
'
,
bottomLabel
:
'本月采购额'
,
bottomLabel
:
'本月采购额'
,
bottemName
:
'amountselfThismonth'
,
bottemName
:
'amountselfThismonth'
,
bottomValue
:
'
2,280,708
'
,
bottomValue
:
'
0
'
,
rate
:
'49%'
,
rate
:
'49%'
,
rateName
:
'selfRate'
,
rateName
:
'selfRate'
,
bottomType
:
'money'
bottomType
:
'money'
...
@@ -68,18 +68,18 @@ export default {
...
@@ -68,18 +68,18 @@ export default {
{
{
name
:
'开通商户数'
,
name
:
'开通商户数'
,
valueName
:
'opentotal'
,
valueName
:
'opentotal'
,
value
:
'
2,280,708
'
,
value
:
'
0
'
,
bottomLabel
:
'本月开通商户数'
,
bottomLabel
:
'本月开通商户数'
,
bottemName
:
'openThismonth'
,
bottemName
:
'openThismonth'
,
bottomValue
:
'
2,280,708
'
bottomValue
:
'
0
'
},
},
{
{
name
:
'采购商户数'
,
name
:
'采购商户数'
,
valueName
:
'buytotal'
,
valueName
:
'buytotal'
,
value
:
'
2,280,708
'
,
value
:
'
0
'
,
bottomLabel
:
'本月采购商户数'
,
bottomLabel
:
'本月采购商户数'
,
bottemName
:
'buyThismonth'
,
bottemName
:
'buyThismonth'
,
bottomValue
:
'
2,280,708
'
bottomValue
:
'
0
'
}
}
]
]
}
}
...
@@ -94,7 +94,6 @@ export default {
...
@@ -94,7 +94,6 @@ export default {
async
getSolarList
()
{
async
getSolarList
()
{
const
_data
=
await
this
.
api
.
solar
.
getAllPurchase
({
year
:
this
.
$store
.
state
.
app
.
solarYear
})
const
_data
=
await
this
.
api
.
solar
.
getAllPurchase
({
year
:
this
.
$store
.
state
.
app
.
solarYear
})
const
_dataList
=
_data
.
data
.
dataList
[
0
]
const
_dataList
=
_data
.
data
.
dataList
[
0
]
console
.
log
(
_dataList
)
this
.
$bus
.
$emit
(
'businessstarttime'
,
_dataList
.
businessstarttime
)
this
.
$bus
.
$emit
(
'businessstarttime'
,
_dataList
.
businessstarttime
)
this
.
setSolarTime
(
_dataList
.
businessstarttime
)
this
.
setSolarTime
(
_dataList
.
businessstarttime
)
console
.
log
(
this
.
$store
.
state
.
app
)
console
.
log
(
this
.
$store
.
state
.
app
)
...
...
src/views/home/solar/PurchaseTrends.vue
View file @
c381738
...
@@ -3,11 +3,11 @@
...
@@ -3,11 +3,11 @@
* @Author: huyue
* @Author: huyue
* @Date: 2023-07-06 16:19:15
* @Date: 2023-07-06 16:19:15
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2023-07-1
4 14:27:08
* @LastEditTime: 2023-07-1
8 11:03:42
-->
-->
<
template
>
<
template
>
<div
class=
"purchase-box"
>
<div
class=
"purchase-box"
>
<box-title
title=
"
近一年
采购额趋势"
></box-title>
<box-title
title=
"采购额趋势"
></box-title>
<div
v-if=
"!isEmpty"
>
<div
v-if=
"!isEmpty"
>
<BarLineChart
ref=
"purchaseRef"
height=
"30.23vh"
domId=
"purchase"
:dataList
.
sync=
"dataList"
:tooltipFormatterObj=
"tooltipFormatterObj"
></BarLineChart>
<BarLineChart
ref=
"purchaseRef"
height=
"30.23vh"
domId=
"purchase"
:dataList
.
sync=
"dataList"
:tooltipFormatterObj=
"tooltipFormatterObj"
></BarLineChart>
<div
class=
"legend"
>
<div
class=
"legend"
>
...
...
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