Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
gh
/
dj-data-view
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 7f8dc469
authored
Oct 31, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
51af0f03
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
14 deletions
src/components/LineChart.vue
src/components/barChart.vue
src/components/options.js
src/views/saas/project.vue
src/components/LineChart.vue
View file @
7f8dc46
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:43:46
* @Date: 2022-10-25 10:43:46
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-2
7 14:32:16
* @LastEditTime: 2022-10-2
8 14:53:22
* @FilePath: \dj-data-view\src\components\barChart.vue
* @FilePath: \dj-data-view\src\components\barChart.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
-->
-->
...
@@ -35,7 +35,7 @@ export default {
...
@@ -35,7 +35,7 @@ export default {
default
:
'品牌'
default
:
'品牌'
},
},
privateList
:
{
privateList
:
{
type
:
Object
,
type
:
[
Object
,
Array
]
,
default
:
()
=>
{}
default
:
()
=>
{}
},
},
// 0-月表;1-日表
// 0-月表;1-日表
...
...
src/components/barChart.vue
View file @
7f8dc46
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:43:46
* @Date: 2022-10-25 10:43:46
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-
28 10:08:29
* @LastEditTime: 2022-10-
31 10:28:51
* @FilePath: \dj-data-view\src\components\barChart.vue
* @FilePath: \dj-data-view\src\components\barChart.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
-->
-->
...
@@ -84,7 +84,8 @@ export default {
...
@@ -84,7 +84,8 @@ export default {
seriesIndex
:
0
,
seriesIndex
:
0
,
dataIndex
:
0
dataIndex
:
0
},
},
timer
:
null
timer
:
null
,
currentData
:
{}
}
}
},
},
// created() {
// created() {
...
@@ -120,15 +121,29 @@ export default {
...
@@ -120,15 +121,29 @@ export default {
chartBindEvent
()
{
chartBindEvent
()
{
this
[
this
.
domId
].
setOption
(
this
.
lineOptions
)
this
[
this
.
domId
].
setOption
(
this
.
lineOptions
)
if
(
this
.
revese
===
false
)
return
if
(
this
.
revese
===
false
)
return
this
.
chartAction
()
this
[
this
.
domId
].
getZr
().
on
(
this
[
this
.
domId
].
getZr
().
on
(
'mousemove'
,
'mousemove'
,
utils
.
debounce
(
params
=>
{
utils
.
debounce
(
params
=>
{
const
pointInPixel
=
[
params
.
offsetX
,
params
.
offsetY
]
const
pointInPixel
=
[
params
.
offsetX
,
params
.
offsetY
]
const
pointInGrid
=
this
[
this
.
domId
].
convertFromPixel
({
seriesIndex
:
0
},
pointInPixel
)
const
pointInGrid
=
this
[
this
.
domId
].
convertFromPixel
({
seriesIndex
:
0
},
pointInPixel
)
const
yIndex
=
pointInGrid
[
1
]
const
yIndex
=
pointInGrid
[
1
]
this
.
currentData
=
{
dataIndex
:
yIndex
}
this
.
$bus
.
$emit
(
'drawChart'
,
yIndex
)
this
.
$bus
.
$emit
(
'drawChart'
,
yIndex
)
},
500
)
},
500
)
)
)
this
[
this
.
domId
].
on
(
'globalout'
,
()
=>
{
this
.
chartAction
(
this
.
currentData
.
dataIndex
)
})
},
chartAction
(
index
=
7
)
{
this
[
this
.
domId
].
dispatchAction
({
type
:
'showTip'
,
seriesIndex
:
0
,
dataIndex
:
index
})
}
}
}
}
}
}
...
...
src/components/options.js
View file @
7f8dc46
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:46:24
* @Date: 2022-10-25 10:46:24
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-
28 12:32:22
* @LastEditTime: 2022-10-
31 09:38:47
* @FilePath: \dj-data-view\src\components\barOptions.js
* @FilePath: \dj-data-view\src\components\barOptions.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
*/
*/
...
@@ -104,7 +104,7 @@ function getBarReverseOptions(obj) {
...
@@ -104,7 +104,7 @@ function getBarReverseOptions(obj) {
axisLine
:
{
axisLine
:
{
show
:
false
show
:
false
},
},
data
:
[
'一般发展'
,
'一般价值'
,
'一般挽留'
,
'重要挽留'
,
'重要价值'
,
'重要发展'
,
'重要保持'
,
'一般保持'
]
data
:
[
'一般发展'
,
'一般价值'
,
'一般挽留'
,
'重要挽留'
,
'重要价值'
,
'重要发展'
,
'重要保持'
,
'一般保持'
]
.
reverse
()
},
},
grid
:
{
grid
:
{
left
:
'15%'
,
left
:
'15%'
,
...
@@ -275,7 +275,8 @@ function lineAndBarOptions(list) {
...
@@ -275,7 +275,8 @@ function lineAndBarOptions(list) {
return
`门店数:
${
item
[
0
].
value
}
<br>新增数:
${
item
[
1
].
value
}
`
return
`门店数:
${
item
[
0
].
value
}
<br>新增数:
${
item
[
1
].
value
}
`
}
}
},
},
xAxis
:
{
xAxis
:
[
{
type
:
'category'
,
type
:
'category'
,
axisLabel
:
{
axisLabel
:
{
color
:
'#fff'
,
color
:
'#fff'
,
...
@@ -291,7 +292,8 @@ function lineAndBarOptions(list) {
...
@@ -291,7 +292,8 @@ function lineAndBarOptions(list) {
show
:
false
show
:
false
},
},
data
:
statDate
data
:
statDate
},
}
],
grid
:
{
grid
:
{
left
:
'3%'
,
left
:
'3%'
,
right
:
'6%'
,
right
:
'6%'
,
...
@@ -299,7 +301,9 @@ function lineAndBarOptions(list) {
...
@@ -299,7 +301,9 @@ function lineAndBarOptions(list) {
bottom
:
'0%'
,
bottom
:
'0%'
,
containLabel
:
true
containLabel
:
true
},
},
yAxis
:
{
yAxis
:
[
{
name
:
'bar'
,
nameGap
:
30
,
nameGap
:
30
,
type
:
'value'
,
type
:
'value'
,
splitLine
:
{
splitLine
:
{
...
@@ -313,8 +317,25 @@ function lineAndBarOptions(list) {
...
@@ -313,8 +317,25 @@ function lineAndBarOptions(list) {
},
},
splitNumber
:
4
splitNumber
:
4
},
},
{
name
:
'line'
,
nameGap
:
30
,
type
:
'value'
,
splitLine
:
{
lineStyle
:
{
color
:
'#2F314F'
}
},
axisLabel
:
{
color
:
'#fff'
,
fontSize
:
'0.8em'
},
splitNumber
:
4
}
],
series
:
[
series
:
[
{
{
name
:
'bar'
,
type
:
'bar'
,
type
:
'bar'
,
symbol
:
'circle'
,
symbol
:
'circle'
,
backgroundStyle
:
{
backgroundStyle
:
{
...
@@ -324,6 +345,7 @@ function lineAndBarOptions(list) {
...
@@ -324,6 +345,7 @@ function lineAndBarOptions(list) {
data
:
increNum
data
:
increNum
},
},
{
{
name
:
'line'
,
type
:
'line'
,
type
:
'line'
,
symbol
:
'circle'
,
symbol
:
'circle'
,
itemStyle
:
{
itemStyle
:
{
...
@@ -352,6 +374,7 @@ function lineAndBarOptions(list) {
...
@@ -352,6 +374,7 @@ function lineAndBarOptions(list) {
]
]
}
}
},
},
yAxisIndex
:
1
,
data
:
totalNum
data
:
totalNum
}
}
]
]
...
...
src/views/saas/project.vue
View file @
7f8dc46
...
@@ -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: 前端 qianduan01@didihu.com.cn
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-
27 13:38:57
* @LastEditTime: 2022-10-
31 10:16:04
* @FilePath: \dj-data-view\src\views\saas\project.vue
* @FilePath: \dj-data-view\src\views\saas\project.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
-->
-->
...
@@ -80,7 +80,8 @@ export default {
...
@@ -80,7 +80,8 @@ export default {
width
:
49.6%
;
width
:
49.6%
;
background
:
#0b0e31
;
background
:
#0b0e31
;
.project-left
{
.project-left
{
width
:
2vw
;
width
:
2.8vw
;
padding
:
0px
0.4vw
;
height
:
5.61vh
;
height
:
5.61vh
;
background
:
#2436b7
;
background
:
#2436b7
;
text-align
:
center
;
text-align
:
center
;
...
@@ -89,9 +90,9 @@ export default {
...
@@ -89,9 +90,9 @@ export default {
font-size
:
10px
;
font-size
:
10px
;
line-height
:
12px
;
line-height
:
12px
;
margin-top
:
0.4vh
;
margin-top
:
0.4vh
;
&.fontSmall
{
//
&.fontSmall
{
font-size
:
9px
;
//
font-size
:
9px
;
}
//
}
}
}
.project-icon
{
.project-icon
{
width
:
1.25vw
;
width
:
1.25vw
;
...
...
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