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
9e7f2148
Commit
9e7f2148
authored
Jul 13, 2023
by
leon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: index page localstorage
parent
c01bde6b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
9 deletions
+19
-9
NormalTabs.vue
components/NormalTabs/NormalTabs.vue
+8
-3
echartElementData.js
mixins/echartElementData.js
+2
-2
fullscreen.vue
pages/fullscreen/fullscreen.vue
+5
-0
index.vue
pages/index/index.vue
+4
-4
No files found.
components/NormalTabs/NormalTabs.vue
View file @
9e7f2148
...
@@ -132,6 +132,9 @@
...
@@ -132,6 +132,9 @@
},
},
methods
:
{
methods
:
{
initChart
()
{
initChart
()
{
if
(
!
this
.
elementData
.
dataList
)
{
return
}
this
.
tabsValue
=
this
.
elementInfo
.
option
.
tabs
.
defaultValue
this
.
tabsValue
=
this
.
elementInfo
.
option
.
tabs
.
defaultValue
if
(
this
.
elementData
.
dataList
.
defaultValue
)
{
if
(
this
.
elementData
.
dataList
.
defaultValue
)
{
this
.
tabsValue
=
this
.
elementData
.
dataList
.
defaultValue
this
.
tabsValue
=
this
.
elementData
.
dataList
.
defaultValue
...
@@ -267,6 +270,8 @@
...
@@ -267,6 +270,8 @@
align-items
:
flex-start
;
align-items
:
flex-start
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
width
:
100%
;
width
:
100%
;
justify-content
:
center
;
align-items
:
center
;
}
}
.tab-vertical
{
.tab-vertical
{
display
:
flex
!
important
;
display
:
flex
!
important
;
...
@@ -277,7 +282,7 @@
...
@@ -277,7 +282,7 @@
.tab-item
{
.tab-item
{
width
:
var
(
--
width
);
width
:
var
(
--
width
);
margin
:
1%
;
margin
:
3px
;
font-size
:
var
(
--
font-size
);
font-size
:
var
(
--
font-size
);
color
:
var
(
--
color
);
color
:
var
(
--
color
);
border
:
var
(
--
border-style
);
border
:
var
(
--
border-style
);
...
...
mixins/echartElementData.js
View file @
9e7f2148
...
@@ -213,8 +213,8 @@ export default {
...
@@ -213,8 +213,8 @@ export default {
}
}
},
},
'elementData.dataList'
:
{
'elementData.dataList'
:
{
handler
(
newVal
)
{
handler
(
newVal
,
oldVal
)
{
if
(
newVal
)
{
if
(
JSON
.
stringify
(
newVal
)
!==
JSON
.
stringify
(
oldVal
)
)
{
this
.
setStorageData
()
this
.
setStorageData
()
this
.
initChart
()
this
.
initChart
()
}
}
...
...
pages/fullscreen/fullscreen.vue
View file @
9e7f2148
...
@@ -72,6 +72,11 @@
...
@@ -72,6 +72,11 @@
const
toolbox
=
{
show
:
false
}
const
toolbox
=
{
show
:
false
}
this
.
element
.
option
.
toolbox
=
toolbox
this
.
element
.
option
.
toolbox
=
toolbox
},
},
onUnload
()
{
// 移除监听事件
uni
.
$off
(
'handleLinkParams'
)
uni
.
$off
(
'handleLinkComp'
)
},
onShow
()
{
onShow
()
{
/**
/**
* 组件交互 - 组件
* 组件交互 - 组件
...
...
pages/index/index.vue
View file @
9e7f2148
...
@@ -124,9 +124,9 @@
...
@@ -124,9 +124,9 @@
// detail页面也会监听这两个事件,所有index页面需要在onShow里面增加监听,在onHide里面移除监听
// detail页面也会监听这两个事件,所有index页面需要在onShow里面增加监听,在onHide里面移除监听
onShow
()
{
onShow
()
{
const
that
=
this
const
that
=
this
// if(uni.getStorageSync('reportInfo')
) {
if
(
Object
.
keys
(
that
.
reportInfo
).
length
)
{
// this.reportInfo = JSON.parse(uni.getStorageSync('reportInfo'
))
uni
.
setStorageSync
(
'reportInfo'
,
JSON
.
stringify
(
that
.
reportInfo
))
//
}
}
/**
/**
* 组件交互 - 参数
* 组件交互 - 参数
*/
*/
...
@@ -267,7 +267,7 @@
...
@@ -267,7 +267,7 @@
}
}
that
.
reportInfo
=
this
.
handleTabsLink
(
res
.
data
.
Result
)
that
.
reportInfo
=
this
.
handleTabsLink
(
res
.
data
.
Result
)
uni
.
setStorageSync
(
'reportInfo'
,
JSON
.
stringify
(
res
.
data
.
Result
))
uni
.
setStorageSync
(
'reportInfo'
,
JSON
.
stringify
(
that
.
reportInfo
))
that
.
getStickyTables
()
that
.
getStickyTables
()
}
}
},
},
...
...
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