|
@@ -3,7 +3,29 @@
|
|
|
<router-view />
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {}
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ // 监听页面刷新事件
|
|
|
+ window.addEventListener('unload', this.unload)
|
|
|
+ // 页面加载完成后,移除session里的存储的信息
|
|
|
+ window.addEventListener('load', this.load)
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ unload() {
|
|
|
+ // const { userInfo, projectId, menuStatus,manualAutoMode } = this.$store.state;
|
|
|
+ const state = this.$store.state
|
|
|
+ sessionStorage.setItem('state', JSON.stringify(state))
|
|
|
+ },
|
|
|
+ load() {
|
|
|
+ sessionStorage.clear()
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
<style lang="less">
|
|
|
body,
|
|
|
h1,
|