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
594e45cd
Commit
594e45cd
authored
Jul 07, 2023
by
leon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:charts add new config
parent
86237de4
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
43 deletions
+60
-43
HorizontalBar.vue
components/HorizontalBar/HorizontalBar.vue
+14
-12
LineMixBar.vue
components/LineMixBar/LineMixBar.vue
+12
-9
NormalBar.vue
components/NormalBar/NormalBar.vue
+12
-5
NormalLine.vue
components/NormalLine/NormalLine.vue
+15
-8
NormalTable.vue
components/NormalTable/NormalTable.vue
+2
-2
fullscreen.vue
pages/fullscreen/fullscreen.vue
+3
-5
index.vue
pages/index/index.vue
+2
-2
No files found.
components/HorizontalBar/HorizontalBar.vue
View file @
594e45cd
...
...
@@ -113,27 +113,29 @@ export default {
}
})
chart
.
on
(
'datazoom'
,
event
=>
{
// 配置了滑动事件
if
(
that
.
elementInfo
.
dataZoom
.
slider
)
{
// 传递参数给其他组件
that
.
echartsDataZoom
(
event
)
// 处理dataZoom的拖动事件
that
.
handleDataZoomEvent
(
event
)
}
})
return
chart
},
initChart
()
{
// 等待子组件完全挂载完成---chart初始化完成
this
.
$nextTick
().
then
(()
=>
{
const
{
categories
,
series
,
preview
,
images
}
=
this
.
elementData
.
dataList
const
{
categories
,
series
,
preview
,
images
}
=
this
.
elementData
.
dataList
var
count
=
categories
.
length
if
(
count
<
this
.
elementInfo
.
dataZoom
.
count
)
{
this
.
elementInfo
.
dataZoom
.
start
=
0
this
.
elementInfo
.
dataZoom
.
end
=
100
}
if
(
this
.
labelShow
)
{
// 处理初始状态时,数值显示的数量是否超过了配置的最大值
let
count
=
categories
.
length
if
(
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
)
{
count
=
(
count
*
(
this
.
elementInfo
.
dataZoom
.
end
-
this
.
elementInfo
.
dataZoom
.
start
))
/
100
count
=
(
count
*
(
this
.
elementInfo
.
dataZoom
.
end
-
this
.
elementInfo
.
dataZoom
.
start
))
/
100
}
if
(
this
.
elementInfo
.
option
.
dataset
.
maxCount
!=
null
&&
...
...
components/LineMixBar/LineMixBar.vue
View file @
594e45cd
...
...
@@ -91,10 +91,13 @@
that
.
handleEchartsClick
(
event
)
})
chart
.
on
(
'datazoom'
,
event
=>
{
// 配置了滑动事件
if
(
that
.
elementInfo
.
dataZoom
.
slider
)
{
// 传递参数给其他组件
that
.
echartsDataZoom
(
event
)
// 处理dataZoom的拖动事件
that
.
handleDataZoomEvent
(
event
)
}
})
return
chart
},
...
...
@@ -102,13 +105,13 @@
// 等待子组件完全挂载完成---chart初始化完成
this
.
$nextTick
().
then
(()
=>
{
const
{
categories
,
series
}
=
this
.
elementData
.
dataList
if
(
this
.
labelShow
)
{
// 处理初始状态时,数值显示的数量是否超过了配置的最大值
let
count
=
categories
.
length
if
(
count
<
this
.
elementInfo
.
option
.
dataset
.
maxCount
)
{
var
count
=
categories
.
length
if
(
count
<
this
.
elementInfo
.
dataZoom
.
count
)
{
this
.
elementInfo
.
dataZoom
.
start
=
0
this
.
elementInfo
.
dataZoom
.
end
=
100
}
if
(
this
.
labelShow
)
{
// 处理初始状态时,数值显示的数量是否超过了配置的最大值
if
(
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
)
{
count
=
count
*
(
this
.
elementInfo
.
dataZoom
.
end
-
this
.
elementInfo
.
dataZoom
.
start
)
/
100
}
...
...
components/NormalBar/NormalBar.vue
View file @
594e45cd
...
...
@@ -83,10 +83,13 @@
that
.
handleEchartsClick
(
event
)
})
chart
.
on
(
'datazoom'
,
event
=>
{
// 配置了滑动事件
if
(
that
.
elementInfo
.
dataZoom
.
slider
)
{
// 传递参数给其他组件
that
.
echartsDataZoom
(
event
)
// 处理dataZoom的拖动事件
that
.
handleDataZoomEvent
(
event
)
}
})
return
chart
},
...
...
@@ -94,9 +97,13 @@
// 等待子组件完全挂载完成---chart初始化完成
this
.
$nextTick
().
then
(()
=>
{
const
{
categories
,
series
}
=
this
.
elementData
.
dataList
var
count
=
categories
.
length
if
(
count
<
this
.
elementInfo
.
dataZoom
.
count
)
{
this
.
elementInfo
.
dataZoom
.
start
=
0
this
.
elementInfo
.
dataZoom
.
end
=
100
}
if
(
this
.
labelShow
)
{
// 处理初始状态时,数值显示的数量是否超过了配置的最大值
let
count
=
categories
.
length
if
(
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
)
{
count
=
count
*
(
this
.
elementInfo
.
dataZoom
.
end
-
this
.
elementInfo
.
dataZoom
.
start
)
/
100
}
...
...
components/NormalLine/NormalLine.vue
View file @
594e45cd
...
...
@@ -82,10 +82,13 @@
that
.
handleEchartsClick
(
event
)
})
chart
.
on
(
'datazoom'
,
event
=>
{
// 配置了滑动事件
if
(
that
.
elementInfo
.
dataZoom
.
slider
)
{
// 传递参数给其他组件
that
.
echartsDataZoom
(
event
)
// 处理dataZoom的拖动事件
that
.
handleDataZoomEvent
(
event
)
}
})
return
chart
},
...
...
@@ -93,9 +96,13 @@
// 等待子组件完全挂载完成---chart初始化完成
this
.
$nextTick
().
then
(()
=>
{
const
{
categories
,
series
}
=
this
.
elementData
.
dataList
var
count
=
categories
.
length
if
(
count
<
this
.
elementInfo
.
dataZoom
.
count
)
{
this
.
elementInfo
.
dataZoom
.
start
=
0
this
.
elementInfo
.
dataZoom
.
end
=
100
}
if
(
this
.
labelShow
)
{
// 处理初始状态时,数值显示的数量是否超过了配置的最大值
var
count
=
categories
.
length
if
(
this
.
elementInfo
.
dataZoom
&&
this
.
elementInfo
.
dataZoom
.
show
)
{
count
=
count
*
(
this
.
elementInfo
.
dataZoom
.
end
-
this
.
elementInfo
.
dataZoom
.
start
)
/
100
}
...
...
components/NormalTable/NormalTable.vue
View file @
594e45cd
...
...
@@ -133,9 +133,9 @@
that
.
elementInfo
.
table
.
column
=
columns
}
that
.
chartTables
=
that
.
elementData
.
dataList
.
chartTables
//
if(that.elementInfo.table.tableCell.autoHeight)
{
if
(
that
.
elementInfo
.
table
.
tableCell
.
autoHeight
)
{
that
.
calculateCellHeight
()
//
}
}
}
)
}
,
...
...
pages/fullscreen/fullscreen.vue
View file @
594e45cd
<
template
>
<view
class=
"wrapper"
:class=
"
{'tabs-layout': showTabs}">
<view
class=
"wrapper"
:class=
"
{'tabs-layout': showTabs}"
:style="{width: `${theStyle.width - theStyle.left}px`, left:`${theStyle.left}px`}"
>
<!-- 普通选项卡 -->
<NormalTabs
v-if=
"showTabs"
:elementInfo=
"tabsElement"
style=
"height: 40px;margin-top: 5px;"
:style=
"
{width: `${theStyle.width - theStyle.left}px`}"
>
</NormalTabs>
<view
:style=
"
{height: `${theStyle.height}px`, width: `${theStyle.width - theStyle.left}px`}">
...
...
@@ -38,7 +37,7 @@
const
{
windowWidth
,
windowHeight
,
screenHeight
,
safeArea
}
=
uni
.
getSystemInfoSync
()
const
reduceBottom
=
screenHeight
-
safeArea
.
bottom
return
{
height
:
this
.
showTabs
?
windowHeight
-
reduceBottom
-
50
:
windowHeight
-
reduceBottom
,
height
:
this
.
showTabs
?
windowHeight
-
reduceBottom
-
this
.
tabsElement
.
height
:
windowHeight
-
reduceBottom
,
width
:
windowWidth
,
left
:
safeArea
.
left
}
...
...
@@ -50,7 +49,6 @@
if
(
this
.
linkTabsId
&&
uni
.
getStorageSync
(
'reportInfo'
))
{
let
info
=
JSON
.
parse
(
uni
.
getStorageSync
(
'reportInfo'
))
const
data
=
info
.
list
.
find
(
item
=>
item
.
id
===
this
.
linkTabsId
)
data
.
height
=
this
.
theStyle
.
height
this
.
tabsElement
=
data
}
// 去掉全屏的定制按钮
...
...
pages/index/index.vue
View file @
594e45cd
...
...
@@ -239,7 +239,7 @@
async
getReportCharts
()
{
clearInterval
(
this
.
timename
)
const
that
=
this
let
res
=
await
that
.
$u
.
api
.
getReportCharts
({
id
:
'6
3647c3932f1997dd2ed53bf
'
})
let
res
=
await
that
.
$u
.
api
.
getReportCharts
({
id
:
'6
27a16644606332538b4633c
'
})
uni
.
stopPullDownRefresh
()
uni
.
$emit
(
'handlePullDownRefresh'
)
const
{
Status
,
Result
:
{
info
,
list
}
}
=
res
.
data
...
...
@@ -277,7 +277,7 @@
if
(
item
.
child
.
index
.
length
)
{
item
.
child
.
index
.
forEach
(
child
=>
{
const
index
=
data
.
list
.
findIndex
(
i
=>
i
.
id
===
child
)
data
.
list
[
index
].
linkTabsId
=
item
data
.
list
[
index
].
linkTabsId
=
item
.
id
})
}
if
(
item
.
child
.
data
.
length
)
{
...
...
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