Commit e4fe9c87 authored by chenjiahao's avatar chenjiahao

修复没有默认type(模块)的问题

parent 1e3c7ff8
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { h, ref, onMounted, computed } from 'vue'; import { h, ref, onMounted, computed } from 'vue';
import { Modal, Segmented } from 'ant-design-vue'; import { Modal, Segmented } from 'ant-design-vue';
import { useI18n } from '@/hooks/web/useI18n'; import { useI18n } from '@/hooks/web/useI18n';
import {useUserStore, useUserStoreWithOut} from '@/store/modules/user'; import { useUserStore, useUserStoreWithOut } from '@/store/modules/user';
import { router } from '@/router'; import { router } from '@/router';
import { import {
editBucketData, editBucketData,
...@@ -65,7 +65,8 @@ ...@@ -65,7 +65,8 @@
if (localStorage.getItem('segmentValue') !== null) { if (localStorage.getItem('segmentValue') !== null) {
value.value = localStorage.getItem('segmentValue'); value.value = localStorage.getItem('segmentValue');
} else { } else {
switch (localStorage.getItem('matchedTypes')[0]) { let type = localStorage.getItem('matchedTypes')[0];
switch (type) {
case '1': case '1':
value.value = '基础平台'; value.value = '基础平台';
break; break;
...@@ -82,6 +83,7 @@ ...@@ -82,6 +83,7 @@
value.value = '数据要素'; value.value = '数据要素';
break; break;
} }
localStorage.setItem('type', type);
localStorage.setItem('segmentValue', value.value); localStorage.setItem('segmentValue', value.value);
} }
router.replace(localStorage.getItem('firstChild')); router.replace(localStorage.getItem('firstChild'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment