You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
762 B
29 lines
762 B
|
|
var key='xm-iteration-info';
|
|
const iterationInfo = {
|
|
state: {
|
|
iterationInfo: null,
|
|
},
|
|
mutations: {
|
|
SET_ITERATION_INFO: (state, iterationInfo) => {
|
|
state.iterationInfo=iterationInfo
|
|
if(iterationInfo && iterationInfo!='null' && iterationInfo!='undefined' ){
|
|
sessionStorage.setItem(key,JSON.stringify(iterationInfo))
|
|
}else{
|
|
sessionStorage.removeItem(key)
|
|
}
|
|
|
|
}
|
|
},
|
|
actions: {
|
|
setIterationInfo({ commit }, iterationInfo) {
|
|
commit('SET_ITERATION_INFO', iterationInfo)
|
|
}
|
|
}
|
|
}
|
|
var iterationStr=sessionStorage.getItem(key)
|
|
if(iterationStr && iterationStr!='null' && iterationStr!='undefined' ){
|
|
iterationInfo.state.iterationInfo=JSON.parse(iterationStr)
|
|
}
|
|
|
|
export default iterationInfo
|