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
2300cac2
Commit
2300cac2
authored
Jan 13, 2022
by
Jenny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 地图文件
parent
fb1b9436
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
46 additions
and
13 deletions
+46
-13
http.interceptor.js
common/http.interceptor.js
+2
-1
ChinaMap.vue
components/ChinaMap/ChinaMap.vue
+26
-0
HorizontalBar.vue
components/HorizontalBar/HorizontalBar.vue
+2
-2
LineMixBar.vue
components/LineMixBar/LineMixBar.vue
+7
-3
NormalBar.vue
components/NormalBar/NormalBar.vue
+2
-2
NormalLine.vue
components/NormalLine/NormalLine.vue
+2
-2
echartElementData.js
mixins/echartElementData.js
+1
-0
index.vue
pages/index/index.vue
+3
-2
common.js
utils/common.js
+1
-1
No files found.
common/http.interceptor.js
View file @
2300cac2
const
install
=
(
Vue
,
vm
)
=>
{
Vue
.
prototype
.
$u
.
http
.
setConfig
({
// baseUrl: 'https://api.charleskeith.cn/api', // 请求的本域名
baseUrl
:
'https://api.charleskeith.cn'
,
// 请求的本域名
// baseUrl: 'http://192.168.138.55:808l',
showLoading
:
true
,
// 是否显示请求中的loading
loadingText
:
'努力加载中。。。'
,
// 请求loading中的文字提示
loadingTime
:
300
,
// 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
...
...
components/ChinaMap/ChinaMap.vue
0 → 100644
View file @
2300cac2
<
template
>
<view>
<uni-ec-canvas
class=
"uni-ec-canvas"
id=
"china-map"
ref=
"canvas"
canvas-id=
"china-map-chart"
:ec=
"ec"
></uni-ec-canvas>
</view>
</
template
>
<
script
>
export
default
{
name
:
"ChinaMap"
,
data
()
{
return
{
};
}
}
</
script
>
<
style
>
</
style
>
components/HorizontalBar/HorizontalBar.vue
View file @
2300cac2
...
...
@@ -2,9 +2,9 @@
<view>
<uni-ec-canvas
class=
"uni-ec-canvas"
id=
"
line-chart
"
id=
"
horizontal-bar
"
ref=
"canvas"
canvas-id=
"
lazy-load
-chart"
canvas-id=
"
horizontal-bar
-chart"
:ec=
"ec"
></uni-ec-canvas>
</view>
...
...
components/LineMixBar/LineMixBar.vue
View file @
2300cac2
<
template
>
<view>
<uni-ec-canvas
class=
"uni-ec-canvas"
id=
"line-chart"
ref=
"canvas"
canvas-id=
"lazy-load-chart"
:ec=
"ec"
>
</uni-ec-canvas>
<uni-ec-canvas
class=
"uni-ec-canvas"
id=
"line-mix-bar"
ref=
"canvas"
canvas-id=
"line-mix-bar-chart"
:ec=
"ec"
></uni-ec-canvas>
</view>
</
template
>
...
...
@@ -70,7 +75,6 @@
* 处理数据
*/
dealSeriesData
(
data
)
{
debugger
if
(
!
data
)
return
const
newData
=
data
.
map
(
item
=>
{
let
config
=
{
...
...
components/NormalBar/NormalBar.vue
View file @
2300cac2
...
...
@@ -2,9 +2,9 @@
<view>
<uni-ec-canvas
class=
"uni-ec-canvas"
id=
"
line-chart
"
id=
"
normal-bar
"
ref=
"canvas"
canvas-id=
"
lazy-load
-chart"
canvas-id=
"
normal-bar
-chart"
:ec=
"ec"
></uni-ec-canvas>
</view>
...
...
components/NormalLine/NormalLine.vue
View file @
2300cac2
...
...
@@ -2,9 +2,9 @@
<view>
<uni-ec-canvas
class=
"uni-ec-canvas"
id=
"
line-chart
"
id=
"
normal-line
"
ref=
"canvas"
canvas-id=
"
lazy-load
-chart"
canvas-id=
"
normal-line
-chart"
:ec=
"ec"
></uni-ec-canvas>
</view>
...
...
mixins/echartElementData.js
View file @
2300cac2
...
...
@@ -25,6 +25,7 @@ export default {
*/
async
handleDynamicData
(
value
)
{
let
{
dataUrl
,
dataMethod
,
dataFormatter
,
dataProcessing
}
=
{
...
value
}
dataUrl
=
dataUrl
.
replace
(
/^
(\/
dashboardCharts
)?
|^
(\/
dashboardAPI
)?
/
,
''
)
if
(
value
.
queryFormatter
)
dataFormatter
=
{...
dataFormatter
,
...
value
.
queryFormatter
}
let
res
=
await
this
.
$u
[
dataMethod
.
toLowerCase
()](
dataUrl
,
dataFormatter
)
if
(
dataProcessing
)
{
...
...
pages/index/index.vue
View file @
2300cac2
...
...
@@ -16,6 +16,8 @@
<NormalGauge
v-if=
"element.type == 'NormalGauge'"
:elementInfo=
"element"
></NormalGauge>
<!-- 饼图 -->
<NormalPie
v-if=
"element.type == 'NormalPie'"
:elementInfo=
"element"
></NormalPie>
<!-- 中国地图 -->
<ChinaMap
v-if=
"element.type == 'ChinaMap'"
:elementInfo=
"element"
></ChinaMap>
</view>
</view>
</
template
>
...
...
@@ -82,8 +84,7 @@
},
async
getReportList
()
{
let
res
=
await
this
.
$u
.
api
.
getReportList
({
id
:
'61d697eec06bffb97312afeb'
})
console
.
log
()
let
res
=
await
this
.
$u
.
api
.
getReportList
({
id
:
'61c424a4c06bff0ce05d9a53'
})
const
{
Status
,
Result
}
=
res
.
data
if
(
Status
===
'true'
)
{
this
.
reportInfo
=
Result
.
info
...
...
utils/common.js
View file @
2300cac2
import
{
Function
,
evaluate
}
from
'../static/plugin/eval5/eval5.js'
import
{
Function
}
from
'../static/plugin/eval5/eval5.js'
/**
* 数据转换
*/
...
...
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