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
9ad9e682
Commit
9ad9e682
authored
May 05, 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
9bf886b7
db1a2a7a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
33 deletions
+21
-33
details.vue
subPages/details/details.vue
+21
-33
No files found.
subPages/details/details.vue
View file @
9ad9e682
...
...
@@ -90,7 +90,7 @@
},
onLoad
(
option
)
{
this
.
detailId
=
option
.
id
this
.
userAuthCheck
()
this
.
getReportCharts
()
},
onShow
()
{
const
that
=
this
...
...
@@ -109,46 +109,34 @@
if
(
hideData
.
includes
(
item
.
id
))
item
.
hide
=
true
return
item
})
})
})
/**
* datazoom交互
*/
uni
.
$on
(
'handleDataZoomParams'
,
({
index
,
paramName
,
value
})
=>
{
if
(
index
.
length
&&
paramName
&&
value
)
{
that
.
reportInfo
.
list
=
that
.
reportInfo
.
list
.
map
(
item
=>
{
console
.
log
(
'begin item'
,
item
)
const
flag
=
index
.
includes
(
item
.
id
)
if
(
flag
&&
item
.
dataZoom
)
{
console
.
log
(
'set item'
,
item
)
that
.
$set
(
item
.
dataZoom
,
'start'
,
value
.
start
)
that
.
$set
(
item
.
dataZoom
,
'end'
,
value
.
end
)
}
console
.
log
(
'after item'
,
item
)
return
item
})
}
})
},
onUnload
()
{
// 移除监听事件
uni
.
$off
(
'handleLinkParams'
)
uni
.
$off
(
'handleLinkComp'
)
uni
.
$off
(
'handleDataZoomParams'
)
clearInterval
(
this
.
timename
)
},
methods
:
{
//检查是否登录
userAuthCheck
()
{
var
userId
=
uni
.
getStorageSync
(
'userId'
)
this
.
getNewestAuthFromServer
()
var
authorized
=
uni
.
getStorageSync
(
'authorized'
)
if
(
userId
)
{
if
(
authorized
)
{
this
.
getReportCharts
()
}
else
{
uni
.
reLaunch
({
url
:
'../login/authorized'
})
}
}
else
{
uni
.
reLaunch
({
url
:
'../login/login'
})
}
},
//获取最新的授权信息
getNewestAuthFromServer
()
{
var
param
=
{
id
:
uni
.
getStorageSync
(
'userId'
)
}
this
.
$u
.
api
.
getAuthorized
(
param
).
then
(
res
=>
{
const
{
Status
,
Result
}
=
res
.
data
if
(
Status
===
'true'
)
{
uni
.
setStorageSync
(
'authorized'
,
Result
.
authorized
)
}
})
},
/**
* 获取页面报表配置
*/
...
...
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