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
32ca7dc9
Commit
32ca7dc9
authored
Mar 03, 2022
by
leon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://106.15.103.105/lihuizhen/ec-report-refactor
into develop
parents
748428f6
21ba250b
Show 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 @
32ca7dc9
...
...
@@ -19,55 +19,54 @@
data
()
{
return
{
ec
:
{
lazyLoad
:
true
lazyLoad
:
true
,
option
:
{}
}
}
},
components
:
{
uniEcCanvas
},
mounted
()
{
this
.
$refs
[
'lineMixBarCanvas'
].
init
(
this
.
inited
)
},
methods
:
{
initChart
()
{
const
that
=
this
that
.
$nextTick
(()
=>
{
that
.
$refs
[
'lineMixBarCanvas'
].
init
((
canvas
,
width
,
height
,
canvasDpr
)
=>
{
chart
=
that
.
$echarts
.
init
(
canvas
,
null
,
{
inited
(
canvas
,
width
,
height
,
canvasDpr
)
{
chart
=
this
.
$echarts
.
init
(
canvas
,
null
,
{
width
:
width
,
height
:
height
,
devicePixelRatio
:
canvasDpr
})
canvas
.
setChart
(
chart
)
const
{
dataList
:
{
categories
,
series
}
}
=
that
.
elementData
const
options
=
{
...
that
.
elementInfo
.
option
,
const
{
categories
,
series
}
=
this
.
elementData
.
dataList
this
.
ec
.
option
=
{
...
this
.
elementInfo
.
option
,
tooltip
:
{},
xAxis
:
{
...
that
.
elementInfo
.
option
.
xAxis
,
...
this
.
elementInfo
.
option
.
xAxis
,
data
:
categories
},
yAxis
:
[{
...
that
.
elementInfo
.
option
.
yAxis
,
...
this
.
elementInfo
.
option
.
yAxis
,
type
:
'value'
},
{
...
that
.
elementInfo
.
option
.
yAxis
,
...
this
.
elementInfo
.
option
.
yAxis
,
type
:
'value'
}
],
series
:
that
.
dealSeriesData
(
series
)
series
:
this
.
dealSeriesData
(
series
)
}
chart
.
setOption
(
options
)
chart
.
setOption
(
this
.
ec
.
option
)
chart
.
on
(
'click'
,
event
=>
{
that
.
handleEchartsClick
(
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 @
32ca7dc9
...
...
@@ -20,7 +20,8 @@ export default {
data
()
{
return
{
ec
:
{
lazyLoad
:
true
lazyLoad
:
true
,
option
:
{}
}
};
},
...
...
@@ -28,21 +29,20 @@ export default {
components
:
{
uniEcCanvas
},
mounted
()
{
this
.
$refs
[
'normalGaugeCanvas'
].
init
(
this
.
inited
)
},
methods
:
{
initChart
()
{
const
that
=
this
that
.
$nextTick
(()
=>
{
that
.
$refs
[
'normalGaugeCanvas'
].
init
((
canvas
,
width
,
height
,
canvasDpr
)
=>
{
chart
=
that
.
$echarts
.
init
(
canvas
,
null
,
{
inited
(
canvas
,
width
,
height
,
canvasDpr
)
{
chart
=
this
.
$echarts
.
init
(
canvas
,
null
,
{
width
:
width
,
height
:
height
,
devicePixelRatio
:
canvasDpr
})
canvas
.
setChart
(
chart
)
const
{
dataList
:
{
guageChart
}
}
=
that
.
elementData
const
options
=
{
...
that
.
elementInfo
.
option
,
const
{
guageChart
}
=
this
.
elementData
.
dataList
this
.
ec
.
option
=
{
...
this
.
elementInfo
.
option
,
tooltip
:
{
formatter
:
'{a} <br/>{b} : {c}%'
},
...
...
@@ -52,15 +52,13 @@ export default {
data
:
guageChart
}]
}
chart
.
setOption
(
options
)
chart
.
setOption
(
this
.
ec
.
option
)
return
chart
})
})
},
initChart
()
{
const
{
guageChart
}
=
this
.
elementData
.
dataList
this
.
$set
(
this
.
ec
.
option
,
'series[0].data'
,
guageChart
)
}
}
}
</
script
>
<
style
>
</
style
>
components/NormalRadar/NormalRadar.vue
View file @
32ca7dc9
...
...
@@ -19,31 +19,27 @@
data
()
{
return
{
ec
:
{
lazyLoad
:
true
lazyLoad
:
true
,
option
:
{}
}
}
},
components
:
{
uniEcCanvas
},
mounted
()
{
this
.
$refs
[
'normalRadarCanvas'
].
init
(
this
.
inited
)
},
methods
:
{
initChart
()
{
const
that
=
this
that
.
$nextTick
(()
=>
{
that
.
$refs
[
'normalRadarCanvas'
].
init
((
canvas
,
width
,
height
,
canvasDpr
)
=>
{
chart
=
that
.
$echarts
.
init
(
canvas
,
null
,
{
inited
(
canvas
,
width
,
height
,
canvasDpr
)
{
chart
=
this
.
$echarts
.
init
(
canvas
,
null
,
{
width
:
width
,
height
:
height
,
devicePixelRatio
:
canvasDpr
})
canvas
.
setChart
(
chart
)
const
{
dataList
:
{
indicator
,
series
}
}
=
that
.
elementData
const
config
=
{
const
{
indicator
,
series
}
=
this
.
elementData
.
dataList
this
.
ec
.
option
=
{
tooltip
:
{},
radar
:
{
indicator
...
...
@@ -51,15 +47,18 @@
series
:
[{
type
:
'radar'
,
label
:
{
...
that
.
elementInfo
.
option
.
dataset
...
this
.
elementInfo
.
option
.
dataset
},
data
:
that
.
dealSeriesData
(
series
)
data
:
this
.
dealSeriesData
(
series
)
}]
}
chart
.
setOption
(
config
)
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
))
},
/**
* 处理数据
...
...
@@ -81,5 +80,3 @@
}
}
</
script
>
\ No newline at end of file
<
style
scoped
>
</
style
>
components/RemoteImage/RemoteImage.vue
View file @
32ca7dc9
...
...
@@ -3,7 +3,7 @@
<NormalTitle
:elementInfo=
"elementInfo"
></NormalTitle>
<u-image
class=
"remoteImage"
:src=
"imageUrl"
:src=
"
elementData.dataList.
imageUrl"
width=
"100%"
height=
"100%"
mode=
"aspectFit"
...
...
@@ -17,18 +17,8 @@
export
default
{
name
:
"RemoteImage"
,
mixins
:
[
echartElementData
],
data
()
{
return
{
imageUrl
:
""
};
},
methods
:{
initChart
()
{
const
that
=
this
that
.
$nextTick
(()
=>
{
that
.
imageUrl
=
that
.
elementData
.
dataList
.
imageUrl
})
}
initChart
()
{}
}
}
</
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