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
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
41 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 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:43:46
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -35,7 +35,7 @@ export default {
default
:
'品牌'
},
privateList
:
{
type
:
Object
,
type
:
[
Object
,
Array
]
,
default
:
()
=>
{}
},
// 0-月表;1-日表
...
...
src/components/barChart.vue
View file @
7f8dc46
...
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:43:46
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -84,7 +84,8 @@ export default {
seriesIndex
:
0
,
dataIndex
:
0
},
timer
:
null
timer
:
null
,
currentData
:
{}
}
},
// created() {
...
...
@@ -120,15 +121,29 @@ export default {
chartBindEvent
()
{
this
[
this
.
domId
].
setOption
(
this
.
lineOptions
)
if
(
this
.
revese
===
false
)
return
this
.
chartAction
()
this
[
this
.
domId
].
getZr
().
on
(
'mousemove'
,
utils
.
debounce
(
params
=>
{
const
pointInPixel
=
[
params
.
offsetX
,
params
.
offsetY
]
const
pointInGrid
=
this
[
this
.
domId
].
convertFromPixel
({
seriesIndex
:
0
},
pointInPixel
)
const
yIndex
=
pointInGrid
[
1
]
this
.
currentData
=
{
dataIndex
:
yIndex
}
this
.
$bus
.
$emit
(
'drawChart'
,
yIndex
)
},
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 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:46:24
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -104,7 +104,7 @@ function getBarReverseOptions(obj) {
axisLine
:
{
show
:
false
},
data
:
[
'一般发展'
,
'一般价值'
,
'一般挽留'
,
'重要挽留'
,
'重要价值'
,
'重要发展'
,
'重要保持'
,
'一般保持'
]
data
:
[
'一般发展'
,
'一般价值'
,
'一般挽留'
,
'重要挽留'
,
'重要价值'
,
'重要发展'
,
'重要保持'
,
'一般保持'
]
.
reverse
()
},
grid
:
{
left
:
'15%'
,
...
...
@@ -275,23 +275,25 @@ function lineAndBarOptions(list) {
return
`门店数:
${
item
[
0
].
value
}
<br>新增数:
${
item
[
1
].
value
}
`
}
},
xAxis
:
{
type
:
'category'
,
axisLabel
:
{
color
:
'#fff'
,
fontSize
:
'0.8em'
},
splitLine
:
{
show
:
false
},
axisTick
:
{
show
:
false
},
axisLine
:
{
show
:
false
},
data
:
statDate
},
xAxis
:
[
{
type
:
'category'
,
axisLabel
:
{
color
:
'#fff'
,
fontSize
:
'0.8em'
},
splitLine
:
{
show
:
false
},
axisTick
:
{
show
:
false
},
axisLine
:
{
show
:
false
},
data
:
statDate
}
],
grid
:
{
left
:
'3%'
,
right
:
'6%'
,
...
...
@@ -299,22 +301,41 @@ function lineAndBarOptions(list) {
bottom
:
'0%'
,
containLabel
:
true
},
yAxis
:
{
nameGap
:
30
,
type
:
'value'
,
splitLine
:
{
lineStyle
:
{
color
:
'#2F314F'
}
},
axisLabel
:
{
color
:
'#fff'
,
fontSize
:
'0.8em'
yAxis
:
[
{
name
:
'bar'
,
nameGap
:
30
,
type
:
'value'
,
splitLine
:
{
lineStyle
:
{
color
:
'#2F314F'
}
},
axisLabel
:
{
color
:
'#fff'
,
fontSize
:
'0.8em'
},
splitNumber
:
4
},
splitNumber
:
4
},
{
name
:
'line'
,
nameGap
:
30
,
type
:
'value'
,
splitLine
:
{
lineStyle
:
{
color
:
'#2F314F'
}
},
axisLabel
:
{
color
:
'#fff'
,
fontSize
:
'0.8em'
},
splitNumber
:
4
}
],
series
:
[
{
name
:
'bar'
,
type
:
'bar'
,
symbol
:
'circle'
,
backgroundStyle
:
{
...
...
@@ -324,6 +345,7 @@ function lineAndBarOptions(list) {
data
:
increNum
},
{
name
:
'line'
,
type
:
'line'
,
symbol
:
'circle'
,
itemStyle
:
{
...
...
@@ -352,6 +374,7 @@ function lineAndBarOptions(list) {
]
}
},
yAxisIndex
:
1
,
data
:
totalNum
}
]
...
...
src/views/saas/project.vue
View file @
7f8dc46
...
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -80,7 +80,8 @@ export default {
width
:
49.6%
;
background
:
#0b0e31
;
.project-left
{
width
:
2vw
;
width
:
2.8vw
;
padding
:
0px
0.4vw
;
height
:
5.61vh
;
background
:
#2436b7
;
text-align
:
center
;
...
...
@@ -89,9 +90,9 @@ export default {
font-size
:
10px
;
line-height
:
12px
;
margin-top
:
0.4vh
;
&.fontSmall
{
font-size
:
9px
;
}
//
&.fontSmall
{
//
font-size
:
9px
;
//
}
}
.project-icon
{
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