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
992a21cf
Commit
992a21cf
authored
May 05, 2022
by
leon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: zoom data use default config
parent
9ad9e682
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
8 deletions
+40
-8
HorizontalBar.vue
components/HorizontalBar/HorizontalBar.vue
+3
-2
LineMixBar.vue
components/LineMixBar/LineMixBar.vue
+3
-2
NormalBar.vue
components/NormalBar/NormalBar.vue
+3
-2
NormalLine.vue
components/NormalLine/NormalLine.vue
+3
-2
NormalTable.vue
components/NormalTable/NormalTable.vue
+8
-0
zoomConfig.js
mixins/zoomConfig.js
+20
-0
No files found.
components/HorizontalBar/HorizontalBar.vue
View file @
992a21cf
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
<
script
>
<
script
>
import
uniEcCanvas
from
'@/uni-ec-canvas/uni-ec-canvas'
import
uniEcCanvas
from
'@/uni-ec-canvas/uni-ec-canvas'
import
echartElementData
from
'@/mixins/echartElementData.js'
import
echartElementData
from
'@/mixins/echartElementData.js'
import
{
DATAZOOM_DEFAULT
}
from
'@/mixins/zoomConfig.js'
let
chart
=
null
let
chart
=
null
export
default
{
export
default
{
...
@@ -49,7 +50,7 @@
...
@@ -49,7 +50,7 @@
...
this
.
elementInfo
.
option
.
tooltip
,
...
this
.
elementInfo
.
option
.
tooltip
,
trigger
:
"axis"
trigger
:
"axis"
},
},
dataZoom
:
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
?
this
.
elementInfo
.
dataZoom
:
[
],
dataZoom
:
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
?
[{...
this
.
elementInfo
.
dataZoom
,...
DATAZOOM_DEFAULT
}]
:
[{
show
:
false
}
],
series
:
this
.
dealSeriesData
(
series
)
series
:
this
.
dealSeriesData
(
series
)
}
}
chart
.
setOption
(
this
.
ec
.
option
)
chart
.
setOption
(
this
.
ec
.
option
)
...
@@ -84,7 +85,7 @@
...
@@ -84,7 +85,7 @@
const
{
categories
,
series
,
preview
,
images
}
=
this
.
elementData
.
dataList
const
{
categories
,
series
,
preview
,
images
}
=
this
.
elementData
.
dataList
this
.
$set
(
this
.
ec
.
option
,
'yAxis.data'
,
categories
)
this
.
$set
(
this
.
ec
.
option
,
'yAxis.data'
,
categories
)
this
.
$set
(
this
.
ec
.
option
,
'series'
,
this
.
dealSeriesData
(
series
))
this
.
$set
(
this
.
ec
.
option
,
'series'
,
this
.
dealSeriesData
(
series
))
this
.
$set
(
this
.
ec
.
option
,
'dataZoom'
,
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
?
this
.
elementInfo
.
dataZoom
:
[
])
this
.
$set
(
this
.
ec
.
option
,
'dataZoom'
,
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
?
[{...
this
.
elementInfo
.
dataZoom
,...
DATAZOOM_DEFAULT
}]
:
[{
show
:
false
}
])
if
(
preview
)
{
if
(
preview
)
{
this
.
cacheImages
(
images
)
this
.
cacheImages
(
images
)
}
}
...
...
components/LineMixBar/LineMixBar.vue
View file @
992a21cf
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
<
script
>
<
script
>
import
uniEcCanvas
from
'@/uni-ec-canvas/uni-ec-canvas'
import
uniEcCanvas
from
'@/uni-ec-canvas/uni-ec-canvas'
import
echartElementData
from
'@/mixins/echartElementData.js'
import
echartElementData
from
'@/mixins/echartElementData.js'
import
{
DATAZOOM_DEFAULT
}
from
'@/mixins/zoomConfig.js'
let
chart
=
null
let
chart
=
null
export
default
{
export
default
{
...
@@ -58,7 +59,7 @@
...
@@ -58,7 +59,7 @@
...
this
.
elementInfo
.
option
.
tooltip
,
...
this
.
elementInfo
.
option
.
tooltip
,
trigger
:
"axis"
trigger
:
"axis"
},
},
dataZoom
:
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
?
this
.
elementInfo
.
dataZoom
:
[
],
dataZoom
:
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
?
[{...
this
.
elementInfo
.
dataZoom
,...
DATAZOOM_DEFAULT
}]
:
[{
show
:
false
}
],
series
:
this
.
dealSeriesData
(
series
)
series
:
this
.
dealSeriesData
(
series
)
}
}
chart
.
setOption
(
this
.
ec
.
option
)
chart
.
setOption
(
this
.
ec
.
option
)
...
@@ -71,7 +72,7 @@
...
@@ -71,7 +72,7 @@
const
{
categories
,
series
}
=
this
.
elementData
.
dataList
const
{
categories
,
series
}
=
this
.
elementData
.
dataList
this
.
$set
(
this
.
ec
.
option
,
'xAxis.data'
,
categories
)
this
.
$set
(
this
.
ec
.
option
,
'xAxis.data'
,
categories
)
this
.
$set
(
this
.
ec
.
option
,
'series'
,
this
.
dealSeriesData
(
series
))
this
.
$set
(
this
.
ec
.
option
,
'series'
,
this
.
dealSeriesData
(
series
))
this
.
$set
(
this
.
ec
.
option
,
'dataZoom'
,
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
?
this
.
elementInfo
.
dataZoom
:
[
])
this
.
$set
(
this
.
ec
.
option
,
'dataZoom'
,
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
?
[{...
this
.
elementInfo
.
dataZoom
,...
DATAZOOM_DEFAULT
}]
:
[{
show
:
false
}
])
},
},
/**
/**
* 处理数据
* 处理数据
...
...
components/NormalBar/NormalBar.vue
View file @
992a21cf
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
<
script
>
<
script
>
import
uniEcCanvas
from
'@/uni-ec-canvas/uni-ec-canvas'
import
uniEcCanvas
from
'@/uni-ec-canvas/uni-ec-canvas'
import
echartElementData
from
'@/mixins/echartElementData.js'
import
echartElementData
from
'@/mixins/echartElementData.js'
import
{
DATAZOOM_DEFAULT
}
from
'@/mixins/zoomConfig.js'
let
chart
=
null
let
chart
=
null
export
default
{
export
default
{
...
@@ -44,7 +45,7 @@
...
@@ -44,7 +45,7 @@
...
this
.
elementInfo
.
option
.
tooltip
,
...
this
.
elementInfo
.
option
.
tooltip
,
trigger
:
"axis"
trigger
:
"axis"
},
},
dataZoom
:
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
?
this
.
elementInfo
.
dataZoom
:
[
],
dataZoom
:
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
?
[{...
this
.
elementInfo
.
dataZoom
,...
DATAZOOM_DEFAULT
}]
:
[{
show
:
false
}
],
series
:
this
.
dealSeriesData
(
series
)
series
:
this
.
dealSeriesData
(
series
)
}
}
chart
.
setOption
(
this
.
ec
.
option
)
chart
.
setOption
(
this
.
ec
.
option
)
...
@@ -57,7 +58,7 @@
...
@@ -57,7 +58,7 @@
const
{
categories
,
series
}
=
this
.
elementData
.
dataList
const
{
categories
,
series
}
=
this
.
elementData
.
dataList
this
.
$set
(
this
.
ec
.
option
,
'xAxis.data'
,
categories
)
this
.
$set
(
this
.
ec
.
option
,
'xAxis.data'
,
categories
)
this
.
$set
(
this
.
ec
.
option
,
'series'
,
this
.
dealSeriesData
(
series
))
this
.
$set
(
this
.
ec
.
option
,
'series'
,
this
.
dealSeriesData
(
series
))
this
.
$set
(
this
.
ec
.
option
,
'dataZoom'
,
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
?
this
.
elementInfo
.
dataZoom
:
[
])
this
.
$set
(
this
.
ec
.
option
,
'dataZoom'
,
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
?
[{...
this
.
elementInfo
.
dataZoom
,...
DATAZOOM_DEFAULT
}]
:
[{
show
:
false
}
])
},
},
/**
/**
* 处理数据
* 处理数据
...
...
components/NormalLine/NormalLine.vue
View file @
992a21cf
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
<
script
>
<
script
>
import
uniEcCanvas
from
'@/uni-ec-canvas/uni-ec-canvas'
import
uniEcCanvas
from
'@/uni-ec-canvas/uni-ec-canvas'
import
echartElementData
from
'@/mixins/echartElementData.js'
import
echartElementData
from
'@/mixins/echartElementData.js'
import
{
DATAZOOM_DEFAULT
}
from
'@/mixins/zoomConfig.js'
let
chart
=
null
let
chart
=
null
export
default
{
export
default
{
...
@@ -46,7 +47,7 @@
...
@@ -46,7 +47,7 @@
...
this
.
elementInfo
.
option
.
tooltip
,
...
this
.
elementInfo
.
option
.
tooltip
,
trigger
:
"axis"
trigger
:
"axis"
},
},
dataZoom
:
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
?
this
.
elementInfo
.
dataZoom
:
[],
dataZoom
:
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
?
[{...
this
.
elementInfo
.
dataZoom
,...
DATAZOOM_DEFAULT
}]
:
[{
show
:
false
}],
series
:
this
.
dealSeriesData
(
series
)
series
:
this
.
dealSeriesData
(
series
)
}
}
chart
.
setOption
(
this
.
ec
.
option
)
chart
.
setOption
(
this
.
ec
.
option
)
...
@@ -59,7 +60,7 @@
...
@@ -59,7 +60,7 @@
const
{
categories
,
series
}
=
this
.
elementData
.
dataList
const
{
categories
,
series
}
=
this
.
elementData
.
dataList
this
.
$set
(
this
.
ec
.
option
,
'xAxis.data'
,
categories
)
this
.
$set
(
this
.
ec
.
option
,
'xAxis.data'
,
categories
)
this
.
$set
(
this
.
ec
.
option
,
'series'
,
this
.
dealSeriesData
(
series
))
this
.
$set
(
this
.
ec
.
option
,
'series'
,
this
.
dealSeriesData
(
series
))
this
.
$set
(
this
.
ec
.
option
,
'dataZoom'
,
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
?
this
.
elementInfo
.
dataZoom
:
[
])
this
.
$set
(
this
.
ec
.
option
,
'dataZoom'
,
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
?
[{...
this
.
elementInfo
.
dataZoom
,...
DATAZOOM_DEFAULT
}]
:
[{
show
:
false
}
])
},
},
/**
/**
* 处理数据
* 处理数据
...
...
components/NormalTable/NormalTable.vue
View file @
992a21cf
...
@@ -74,6 +74,8 @@
...
@@ -74,6 +74,8 @@
initChart() {
initChart() {
const that = this
const that = this
that.$nextTick(() => {
that.$nextTick(() => {
debugger
console.log(that.elementInfo)
that.columns = that.elementInfo.table.column
that.columns = that.elementInfo.table.column
that.chartTables = that.elementData.dataList.chartTables
that.chartTables = that.elementData.dataList.chartTables
}
)
}
)
...
@@ -85,6 +87,12 @@
...
@@ -85,6 +87,12 @@
uni.$emit('handleLinkParams', { index, paramName, value: value
}
)
uni.$emit('handleLinkParams', { index, paramName, value: value
}
)
}
,
}
,
calculateScale() {
const { windowWidth
}
= uni.getSystemInfoSync()
const { width, height
}
= this.reportInfo.info
return windowWidth / width
}
,
// 图片增加点击事件,查看全部图片
// 图片增加点击事件,查看全部图片
imageClick(index, key) {
imageClick(index, key) {
const images = []
const images = []
...
...
mixins/zoomConfig.js
0 → 100644
View file @
992a21cf
This diff is collapsed.
Click to expand it.
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