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
81339469
Commit
81339469
authored
Jan 13, 2022
by
Jenny
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://106.15.103.105/lihuizhen/ec-report-refactor
into develop
parents
706b6b15
50a0315d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
15 deletions
+109
-15
NormalRadar.vue
components/NormalRadar/NormalRadar.vue
+89
-0
index.vue
pages/index/index.vue
+2
-0
login.vue
pages/login/login.vue
+18
-15
No files found.
components/NormalRadar/NormalRadar.vue
0 → 100644
View file @
81339469
<
template
>
<view>
<uni-ec-canvas
class=
"uni-ec-canvas"
id=
"normalra-dar"
ref=
"normalRadarCanvas"
canvas-id=
"normalra-dar-chart"
:ec=
"ec"
></uni-ec-canvas>
</view>
</
template
>
<
script
>
import
uniEcCanvas
from
'@/components/uni-ec-canvas/uni-ec-canvas'
import
*
as
echarts
from
'@/components/uni-ec-canvas/echarts'
import
echartElementData
from
'@/mixins/echartElementData.js'
let
chart
=
null
export
default
{
name
:
"NormalRadar"
,
mixins
:
[
echartElementData
],
data
()
{
return
{
ec
:
{
lazyLoad
:
true
}
}
},
onReady
()
{
},
components
:
{
uniEcCanvas
},
methods
:
{
initChart
()
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'normalRadarCanvas'
].
init
((
canvas
,
width
,
height
,
canvasDpr
)
=>
{
chart
=
echarts
.
init
(
canvas
,
null
,
{
width
:
width
,
height
:
height
,
devicePixelRatio
:
canvasDpr
})
canvas
.
setChart
(
chart
)
const
{
dataList
:
{
indicator
,
series
}
}
=
this
.
elementData
const
config
=
{
tooltip
:
{},
radar
:
{
indicator
},
series
:
[{
type
:
'radar'
,
label
:
{
...
this
.
elementInfo
.
option
.
dataset
},
data
:
this
.
dealSeriesData
(
series
)
}]
}
chart
.
setOption
(
config
)
return
chart
})
})
},
/**
* 处理数据
*/
dealSeriesData
(
data
)
{
if
(
!
data
)
return
const
newData
=
data
.
map
(
item
=>
{
const
{
name
,
data
:
value
}
=
item
return
{
name
,
value
}
})
return
newData
}
}
}
</
script
>
<
style
scoped
>
</
style
>
pages/index/index.vue
View file @
81339469
...
...
@@ -18,6 +18,8 @@
<NormalPie
v-if=
"element.type == 'NormalPie'"
:elementInfo=
"element"
></NormalPie>
<!-- 中国地图 -->
<ChinaMap
v-if=
"element.type == 'ChinaMap'"
:elementInfo=
"element"
></ChinaMap>
<!-- 雷达图 -->
<NormalRadar
v-if=
"element.type == 'NormalRadar'"
:elementInfo=
"element"
></NormalRadar>
</view>
</view>
</
template
>
...
...
pages/login/login.vue
View file @
81339469
...
...
@@ -85,21 +85,24 @@ export default {
}
}
let
res
=
await
info
.
url
this
.
$u
.
vuex
(
'vuex_token'
,
`
${
res
.
token_type
}
${
res
.
access_token
}
`
)
this
.
$u
.
toast
(
info
.
msg
)
this
.
removeUserStorage
()
this
.
saveUserStorage
(
res
.
data
.
Result
)
// 登录成功后返回来源页面
let
timer
=
setTimeout
(()
=>
{
const
backUrl
=
uni
.
getStorageSync
(
'back_url'
)
||
'/pages/index/index'
this
.
$u
.
route
({
type
:
'reLaunch'
,
url
:
backUrl
})
clearTimeout
(
timer
)
},
500
)
const
{
Status
,
Result
}
=
res
.
data
if
(
Status
===
'true'
)
{
this
.
$u
.
vuex
(
'vuex_token'
,
`
${
res
.
token_type
}
${
res
.
access_token
}
`
)
this
.
$u
.
toast
(
info
.
msg
)
this
.
removeUserStorage
()
this
.
saveUserStorage
(
res
.
data
.
Result
)
// 登录成功后返回来源页面
let
timer
=
setTimeout
(()
=>
{
const
backUrl
=
uni
.
getStorageSync
(
'back_url'
)
||
'/pages/index/index'
this
.
$u
.
route
({
type
:
'reLaunch'
,
url
:
backUrl
})
clearTimeout
(
timer
)
},
500
)
}
else
{
this
.
$u
.
toast
(
res
.
data
.
Msg
)
}
}
else
{
console
.
log
(
'验证失败'
);
}
...
...
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