Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
Project
Project
Details
Activity
Releases
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
胡宝山
template_vue
Commits
e35341a2
Commit
e35341a2
authored
Aug 07, 2023
by
CenXinYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed: 优化设备入库离开路路由的信息存储
Signed-off-by:
CenXinYi
<
2810162984@qq.com
>
parent
c73620c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
income.vue
src/views/equipment/income.vue
+6
-6
No files found.
src/views/equipment/income.vue
View file @
e35341a2
...
...
@@ -135,18 +135,18 @@ export default {
},
// 路由跳转,是存储页面的值
beforeRouteLeave
(
to
,
from
,
next
)
{
localStorage
.
setItem
(
'f
orm'
,
JSON
.
stringify
(
this
.
form
))
localStorage
.
setItem
(
't
ableData'
,
JSON
.
stringify
(
this
.
tableData
))
sessionStorage
.
setItem
(
'inComeF
orm'
,
JSON
.
stringify
(
this
.
form
))
sessionStorage
.
setItem
(
'inComeT
ableData'
,
JSON
.
stringify
(
this
.
tableData
))
next
()
},
created
()
{
localStorage
.
getItem
(
'f
orm'
)
?
this
.
existForm
=
true
:
this
.
existForm
=
false
localStorage
.
getItem
(
't
ableData'
)
?
this
.
existTableData
=
true
:
this
.
existTableData
=
false
sessionStorage
.
getItem
(
'inComeF
orm'
)
?
this
.
existForm
=
true
:
this
.
existForm
=
false
sessionStorage
.
getItem
(
'inComeT
ableData'
)
?
this
.
existTableData
=
true
:
this
.
existTableData
=
false
if
(
this
.
existForm
)
{
this
.
form
=
JSON
.
parse
(
localStorage
.
getItem
(
'f
orm'
))
this
.
form
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'inComeF
orm'
))
}
if
(
this
.
existTableData
)
{
this
.
tableData
=
JSON
.
parse
(
localStorage
.
getItem
(
't
ableData'
))
this
.
tableData
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'inComeT
ableData'
))
}
this
.
init
()
},
...
...
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