Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
ec-report-refactor
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lihuizhen
ec-report-refactor
Commits
b85f159e
Commit
b85f159e
authored
Mar 03, 2022
by
Jenny_1007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: update
parent
85dbd38b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
103 additions
and
119 deletions
+103
-119
LineMixBar.vue
components/LineMixBar/LineMixBar.vue
+39
-40
NormalGauge.vue
components/NormalGauge/NormalGauge.vue
+29
-31
NormalRadar.vue
components/NormalRadar/NormalRadar.vue
+33
-36
RemoteImage.vue
components/RemoteImage/RemoteImage.vue
+2
-12
No files found.
components/LineMixBar/LineMixBar.vue
View file @
b85f159e
...
@@ -19,55 +19,54 @@
...
@@ -19,55 +19,54 @@
data
()
{
data
()
{
return
{
return
{
ec
:
{
ec
:
{
lazyLoad
:
true
lazyLoad
:
true
,
option
:
{}
}
}
}
}
},
},
components
:
{
components
:
{
uniEcCanvas
uniEcCanvas
},
},
mounted
()
{
this
.
$refs
[
'lineMixBarCanvas'
].
init
(
this
.
inited
)
},
methods
:
{
methods
:
{
initChart
()
{
inited
(
canvas
,
width
,
height
,
canvasDpr
)
{
const
that
=
this
chart
=
this
.
$echarts
.
init
(
canvas
,
null
,
{
that
.
$nextTick
(()
=>
{
width
:
width
,
that
.
$refs
[
'lineMixBarCanvas'
].
init
((
canvas
,
width
,
height
,
canvasDpr
)
=>
{
height
:
height
,
chart
=
that
.
$echarts
.
init
(
canvas
,
null
,
{
devicePixelRatio
:
canvasDpr
width
:
width
,
})
height
:
height
,
canvas
.
setChart
(
chart
)
devicePixelRatio
:
canvasDpr
const
{
categories
,
series
}
=
this
.
elementData
.
dataList
})
this
.
ec
.
option
=
{
canvas
.
setChart
(
chart
)
...
this
.
elementInfo
.
option
,
const
{
tooltip
:
{},
dataList
:
{
xAxis
:
{
categories
,
...
this
.
elementInfo
.
option
.
xAxis
,
series
data
:
categories
}
},
}
=
that
.
elementData
yAxis
:
[{
const
options
=
{
...
this
.
elementInfo
.
option
.
yAxis
,
...
that
.
elementInfo
.
option
,
type
:
'value'
tooltip
:
{},
},
xAxis
:
{
{
...
that
.
elementInfo
.
option
.
xAxis
,
...
this
.
elementInfo
.
option
.
yAxis
,
data
:
categories
type
:
'value'
},
yAxis
:
[{
...
that
.
elementInfo
.
option
.
yAxis
,
type
:
'value'
},
{
...
that
.
elementInfo
.
option
.
yAxis
,
type
:
'value'
}
],
series
:
that
.
dealSeriesData
(
series
)
}
}
chart
.
setOption
(
options
)
],
chart
.
on
(
'click'
,
event
=>
{
series
:
this
.
dealSeriesData
(
series
)
that
.
handleEchartsClick
(
event
)
}
}
)
chart
.
setOption
(
this
.
ec
.
option
)
return
chart
chart
.
on
(
'click'
,
event
=>
{
}
)
this
.
handleEchartsClick
(
event
)
})
})
return
chart
},
initChart
()
{
const
{
categories
,
series
}
=
this
.
elementData
.
dataList
this
.
$set
(
this
.
ec
.
option
,
'xAxis.data'
,
categories
)
this
.
$set
(
this
.
ec
.
option
,
'series'
,
this
.
dealSeriesData
(
series
))
},
},
/**
/**
* 处理数据
* 处理数据
...
...
components/NormalGauge/NormalGauge.vue
View file @
b85f159e
...
@@ -20,7 +20,8 @@ export default {
...
@@ -20,7 +20,8 @@ export default {
data
()
{
data
()
{
return
{
return
{
ec
:
{
ec
:
{
lazyLoad
:
true
lazyLoad
:
true
,
option
:
{}
}
}
};
};
},
},
...
@@ -28,39 +29,36 @@ export default {
...
@@ -28,39 +29,36 @@ export default {
components
:
{
components
:
{
uniEcCanvas
uniEcCanvas
},
},
mounted
()
{
this
.
$refs
[
'normalGaugeCanvas'
].
init
(
this
.
inited
)
},
methods
:
{
methods
:
{
initChart
()
{
inited
(
canvas
,
width
,
height
,
canvasDpr
)
{
const
that
=
this
chart
=
this
.
$echarts
.
init
(
canvas
,
null
,
{
that
.
$nextTick
(()
=>
{
width
:
width
,
that
.
$refs
[
'normalGaugeCanvas'
].
init
((
canvas
,
width
,
height
,
canvasDpr
)
=>
{
height
:
height
,
chart
=
that
.
$echarts
.
init
(
canvas
,
null
,
{
devicePixelRatio
:
canvasDpr
width
:
width
,
height
:
height
,
devicePixelRatio
:
canvasDpr
})
canvas
.
setChart
(
chart
)
const
{
dataList
:
{
guageChart
}
}
=
that
.
elementData
const
options
=
{
...
that
.
elementInfo
.
option
,
tooltip
:
{
formatter
:
'{a} <br/>{b} : {c}%'
},
series
:
[{
type
:
'gauge'
,
radius
:
'90%'
,
data
:
guageChart
}]
}
chart
.
setOption
(
options
)
return
chart
})
})
})
canvas
.
setChart
(
chart
)
const
{
guageChart
}
=
this
.
elementData
.
dataList
this
.
ec
.
option
=
{
...
this
.
elementInfo
.
option
,
tooltip
:
{
formatter
:
'{a} <br/>{b} : {c}%'
},
series
:
[{
type
:
'gauge'
,
radius
:
'90%'
,
data
:
guageChart
}]
}
chart
.
setOption
(
this
.
ec
.
option
)
return
chart
},
initChart
()
{
const
{
guageChart
}
=
this
.
elementData
.
dataList
this
.
$set
(
this
.
ec
.
option
,
'series[0].data'
,
guageChart
)
}
}
}
}
}
}
</
script
>
</
script
>
<
style
>
</
style
>
components/NormalRadar/NormalRadar.vue
View file @
b85f159e
...
@@ -19,47 +19,46 @@
...
@@ -19,47 +19,46 @@
data
()
{
data
()
{
return
{
return
{
ec
:
{
ec
:
{
lazyLoad
:
true
lazyLoad
:
true
,
option
:
{}
}
}
}
}
},
},
components
:
{
components
:
{
uniEcCanvas
uniEcCanvas
},
},
mounted
()
{
this
.
$refs
[
'normalRadarCanvas'
].
init
(
this
.
inited
)
},
methods
:
{
methods
:
{
initChart
()
{
inited
(
canvas
,
width
,
height
,
canvasDpr
)
{
const
that
=
this
chart
=
this
.
$echarts
.
init
(
canvas
,
null
,
{
that
.
$nextTick
(()
=>
{
width
:
width
,
that
.
$refs
[
'normalRadarCanvas'
].
init
((
canvas
,
width
,
height
,
canvasDpr
)
=>
{
height
:
height
,
chart
=
that
.
$echarts
.
init
(
canvas
,
null
,
{
devicePixelRatio
:
canvasDpr
width
:
width
,
height
:
height
,
devicePixelRatio
:
canvasDpr
})
canvas
.
setChart
(
chart
)
const
{
dataList
:
{
indicator
,
series
}
}
=
that
.
elementData
const
config
=
{
tooltip
:
{},
radar
:
{
indicator
},
series
:
[{
type
:
'radar'
,
label
:
{
...
that
.
elementInfo
.
option
.
dataset
},
data
:
that
.
dealSeriesData
(
series
)
}]
}
chart
.
setOption
(
config
)
return
chart
})
})
})
canvas
.
setChart
(
chart
)
const
{
indicator
,
series
}
=
this
.
elementData
.
dataList
this
.
ec
.
option
=
{
tooltip
:
{},
radar
:
{
indicator
},
series
:
[{
type
:
'radar'
,
label
:
{
...
this
.
elementInfo
.
option
.
dataset
},
data
:
this
.
dealSeriesData
(
series
)
}]
}
chart
.
setOption
(
this
.
ec
.
option
)
return
chart
},
initChart
()
{
const
{
indicator
,
series
}
=
this
.
elementData
.
dataList
this
.
$set
(
this
.
ec
.
option
,
'radar'
,
{
indicator
})
this
.
$set
(
this
.
ec
.
option
,
'series[0].data'
,
this
.
dealSeriesData
(
series
))
},
},
/**
/**
* 处理数据
* 处理数据
...
@@ -80,6 +79,4 @@
...
@@ -80,6 +79,4 @@
}
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
\ No newline at end of file
</
style
>
components/RemoteImage/RemoteImage.vue
View file @
b85f159e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<NormalTitle
:elementInfo=
"elementInfo"
></NormalTitle>
<NormalTitle
:elementInfo=
"elementInfo"
></NormalTitle>
<u-image
<u-image
class=
"remoteImage"
class=
"remoteImage"
:src=
"imageUrl"
:src=
"
elementData.dataList.
imageUrl"
width=
"100%"
width=
"100%"
height=
"100%"
height=
"100%"
mode=
"aspectFit"
mode=
"aspectFit"
...
@@ -17,18 +17,8 @@
...
@@ -17,18 +17,8 @@
export
default
{
export
default
{
name
:
"RemoteImage"
,
name
:
"RemoteImage"
,
mixins
:
[
echartElementData
],
mixins
:
[
echartElementData
],
data
()
{
return
{
imageUrl
:
""
};
},
methods
:{
methods
:{
initChart
()
{
initChart
()
{}
const
that
=
this
that
.
$nextTick
(()
=>
{
that
.
imageUrl
=
that
.
elementData
.
dataList
.
imageUrl
})
}
}
}
}
}
</
script
>
</
script
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment