| | |
| | | |
| | | const store = new Vuex.Store({ |
| | | state: { |
| | | menus: localStorage.getItem('menuList') ? JSON.parse(localStorage.getItem('menuList')) : [], |
| | | keepAliveList: localStorage.getItem('keepAliveList') ? JSON.parse(localStorage.getItem('keepAliveList')) : [],//缓存页面 |
| | | tagList: localStorage.getItem('tagList') ? JSON.parse(localStorage.getItem('tagList')) : [],//标签列表 |
| | | menus: sessionStorage.getItem('menuList') ? JSON.parse(sessionStorage.getItem('menuList')) : [], |
| | | keepAliveList: sessionStorage.getItem('keepAliveList') ? JSON.parse(sessionStorage.getItem('keepAliveList')) : [],//缓存页面 |
| | | tagList: sessionStorage.getItem('tagList') ? JSON.parse(sessionStorage.getItem('tagList')) : [],//标签列表 |
| | | isFold: false,//是否折叠 |
| | | assay: [ |
| | | '检验方法正确', |
| | |
| | | }, |
| | | SET_KEEPALIVELIST(state, data) { |
| | | state.keepAliveList = data; |
| | | localStorage.setItem('keepAliveList', JSON.stringify(data)); |
| | | sessionStorage.setItem('keepAliveList', JSON.stringify(data)); |
| | | }, |
| | | SET_TAGLIST(state, data) { |
| | | state.tagList = data; |
| | | localStorage.setItem('tagList', JSON.stringify(data)); |
| | | sessionStorage.setItem('tagList', JSON.stringify(data)); |
| | | }, |
| | | SET_ISFOLD(state, data) { |
| | | state.isFold = data; |