luohailiang 2 lat temu
rodzic
commit
2c6d07f2aa
2 zmienionych plików z 7 dodań i 3 usunięć
  1. 5 1
      src/components/NavHeader/index.vue
  2. 2 2
      src/store/index.ts

+ 5 - 1
src/components/NavHeader/index.vue

@@ -1,4 +1,4 @@
-<script setup lang='ts'>
+<script setup>
 const router = useRouter()
 let link = window.GLOBAL_CONFIG;
 import { user } from '~/store/index'
@@ -6,6 +6,9 @@ function loginOut() {
   window.localStorage.clear();
   window.location.href = link.qqyxt;
 }
+const linkTo = (obj) => {
+  router.push(obj);
+};
 </script>
 
 <template>
@@ -35,6 +38,7 @@ function loginOut() {
                <a :href="link.yzy+'/webapps/page/exam.html?mold=manage'">组卷管理</a>
                <a :href="link.yzy + '/webapps/page/exam.html?mold=online&sort=one&pid=total'">考试管理</a>
                <a :href="link.yzy + '/webapps/page/marking-process-list.html'">阅卷流程</a>
+               <a href="javascript:;" @click="linkTo({name:'process'})">联考管理</a>
              </div>
            </div>
            <a :href="link.yzy + '/webapps/page/paper_library.html'" class="nav-item leading-50px">试卷库</a>

+ 2 - 2
src/store/index.ts

@@ -134,11 +134,11 @@ sessionStorage.setItem('userInfo', JSON.stringify({
 }))
 // #endif
 
-export const user = ref<IUser>(JSON.parse(sessionStorage.getItem('userInfo') ?? '{}'))
+export const user = ref<IUser>(JSON.parse(localStorage.getItem('userInfo') ?? '{}'))
 
 watch(
   () => user.value,
   (val) => {
-    sessionStorage.setItem('userInfo', JSON.stringify(val))
+    localStorage.setItem('userInfo', JSON.stringify(val))
   },
 )