|
@@ -14,6 +14,7 @@
|
|
|
|
|
|
<script>
|
|
|
import InterlockSummaryList from './InterlockSummaryList.vue';
|
|
|
+ import store from '@/store'
|
|
|
|
|
|
export default({
|
|
|
components: {
|
|
@@ -23,15 +24,15 @@
|
|
|
return {
|
|
|
}
|
|
|
},
|
|
|
- // beforeRouteEnter(to, from, next) {
|
|
|
- // // 除了进入新增编辑页面外,销毁vuex数据 -- 忘记为啥一开始这么做了
|
|
|
- // if(from.path !== '/interLock/summary/set' && from.path !== '/interLock/detail'){
|
|
|
- // store.commit('SET_CLICKSYSTEMNODE', {});
|
|
|
- // store.commit('SET_TREESELECTKEYS', []);
|
|
|
- // store.commit('SET_TREEEXPANDEKEYS', []);
|
|
|
- // }
|
|
|
- // next()
|
|
|
- // },
|
|
|
+ beforeRouteEnter(to, from, next) {
|
|
|
+ console.log(to, from, next)
|
|
|
+ if(from.path !== '/interLock/summary/set' && from.path !== '/interLock/detail' && from.path !== '/'){
|
|
|
+ store.commit('SET_CLICKSYSTEMNODE', {});
|
|
|
+ store.commit('SET_TREESELECTKEYS', []);
|
|
|
+ store.commit('SET_TREEEXPANDEKEYS', []);
|
|
|
+ }
|
|
|
+ next()
|
|
|
+ },
|
|
|
created() {
|
|
|
},
|
|
|
mounted() {
|