Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rongtong-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
融通安全管理系统
rongtong-app
Commits
20bc6f63
Commit
20bc6f63
authored
Mar 11, 2024
by
kaitly205422@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改风险等级后内容丢失问题
parent
75013f21
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
src/App.vue
src/App.vue
+12
-9
src/views/riskProject/add/addInherent.vue
src/views/riskProject/add/addInherent.vue
+3
-3
No files found.
src/App.vue
View file @
20bc6f63
...
...
@@ -11,7 +11,6 @@
<div
id=
"app"
>
<!-- :style="
{ height: showTab ?appHeight:'100%' }" 之前是给id为app-content 设置的内联样式 id="app-content" -->
<div>
<span
v-for=
"item in cachePage"
:key=
"item"
>
{{
item
}}
</span>
<transition
:name=
"transitionName"
>
<keep-alive
:include=
"cachePage"
>
<router-view
class=
"router-view"
/>
...
...
@@ -90,7 +89,6 @@ export default {
// 'report-return', 'risk-return', 风险和隐患的上报退回不需要缓存
};
},
mounted
()
{
// 这个配合列表路由使用缓存初始缓存页面
this
.
otherCache
=
[...
this
.
cachePage
];
...
...
@@ -132,6 +130,7 @@ export default {
},
watch
:
{
$route
(
to
,
from
)
{
console
.
log
(
this
.
cachePage
);
// 列表操作去除缓存,刷新列表页
if
(
from
.
name
==
"
confirme-danger
"
||
to
.
name
==
"
confirme-danger
"
)
{
// 隐患整改页面缓存处理
...
...
@@ -150,14 +149,18 @@ export default {
this
.
handleCache
(
"
risk-confirme
"
,
to
.
name
,
"
risk-affirm
"
);
}
else
if
(
to
.
name
==
'
taskLedger
'
||
from
.
name
==
'
taskLedger
'
)
{
this
.
handleCache
(
"
riskTaskList
"
,
to
.
name
,
"
taskLedger
"
);
}
else
if
(
to
.
name
==
'
riskView
'
||
from
.
name
==
'
riskInherent
'
)
{
this
.
handleCache
(
"
addInherent
"
,
to
.
name
,
"
riskInherent
"
);
}
else
if
(
to
.
name
===
'
resultPage
'
)
{
this
.
handleCache
(
"
addCurrent
"
,
to
.
name
,
"
addCurrent
"
);
}
else
if
(
to
.
name
===
'
resultPage
'
)
{
this
.
handleCache
(
"
addInherent
"
,
to
.
name
,
"
addInherent
"
);
}
else
if
((
from
.
name
==
'
riskInherent
'
&&
to
.
name
===
'
addInherent
'
)
||
(
to
.
name
==
'
riskInherent
'
&&
from
.
name
==
'
addInherent
'
))
{
this
.
handleCache
(
'
addInherent
'
,
to
.
name
,
'
riskInherent
'
)
}
// else if (to.name == 'riskView' || from.name == 'riskInherent') {
// this.handleCache("addInherent", to.name, "riskInherent");
// }
// else if (to.name == 'addInherent' || from.name == 'addInherent') {
// this.handleCache("addInherent", to.name, "addInherent");
// }
// else if (to.name === 'resultPage') {
// this.handleCache("addCurrent", to.name, "addCurrent");
// }
// 列表页面动态添加缓存
if
(
from
.
name
==
"
save-workbench
"
)
{
// 如何使从工作台进入列表页面在cachePage里添加页面
...
...
src/views/riskProject/add/addInherent.vue
View file @
20bc6f63
...
...
@@ -380,11 +380,10 @@ export default {
this
.
taskId
=
this
.
$route
.
params
.
taskId
;
this
.
postReturnEcho
();
}
},
deactivated
()
{
console
.
log
(
124
);
this
.
$store
.
commit
(
"
SET_INHERENT_TEMPLATE
"
,
{});
this
.
form
=
{}
},
beforeRouteEnter
(
to
,
from
,
next
)
{
if
(
from
.
name
==
"
riskInherent
"
)
{
...
...
@@ -396,6 +395,8 @@ export default {
beforeRouteLeave
(
to
,
from
,
next
)
{
if
(
to
.
name
==
"
resultPage
"
)
{
sessionStorage
.
setItem
(
"
inherenForm
"
,
JSON
.
stringify
(
this
.
form
));
}
else
if
(
to
.
name
==
'
riskInherent
'
)
{
this
.
form
=
{}
}
next
();
},
...
...
@@ -506,7 +507,6 @@ export default {
}
else
if
(
this
.
$store
.
state
.
inherentTemplate
)
{
this
.
form
=
{
...
this
.
form
,
...
this
.
$store
.
state
.
inherentTemplate
};
}
this
.
getFloor
();
},
...
...
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