snow hace 2 años
padre
commit
f369a3979a

+ 7 - 1
src/store/modules/user.ts

@@ -5,7 +5,12 @@ import { userType, resType } from "./types";
 import { routerArrays } from "/@/layout/types";
 import { storageSession } from "@pureadmin/utils";
 import { useMultiTagsStoreHook } from "/@/store/modules/multiTags";
-import { getRelaComName, getRelaComNo, setRelaComName } from "/@/utils/auth";
+import {
+  getRelaComName,
+  getRelaComNo,
+  setRelaComName,
+  removeRelaComNo
+} from "/@/utils/auth";
 
 import {
   getLogin,
@@ -217,6 +222,7 @@ export const useUserStore = defineStore({
       storageSession.clear();
       this.currentComapny = "";
       this.companyList = [];
+      removeRelaComNo();
       useMultiTagsStoreHook().handleTags("equal", routerArrays);
       router.push("/login");
     },

+ 4 - 0
src/utils/auth.ts

@@ -31,6 +31,10 @@ export function setRelaComNo(relaComNo) {
   return window.sessionStorage.setItem(RelaComNoKey, relaComNo);
 }
 
+export function removeRelaComNo() {
+  return window.sessionStorage.removeItem(RelaComNoKey);
+}
+
 export function getRelaComNo() {
   return window.sessionStorage.getItem(RelaComNoKey);
 }

+ 2 - 2
src/views/supplierManage/supplierAccoutQuery/index.vue

@@ -4,10 +4,10 @@ import RoleModal from "./components/role-modal.vue";
 import contentConfig from "./config/content.config";
 import searchConfig from "./config/search.config";
 import { usePageSearch, type PageHooks, type PageEvents } from "/@/hooks/page";
-import { useAsync } from "/@/hooks/core/useAsync";
-import { ModalTypes } from "./types";
 import { httpSetRole } from "/@/api/supplierManage/supplierAccoutQuery";
 import SupplierSelect from "/@/layout/components/company/super.vue";
+import { useAsync } from "/@/hooks/core/useAsync";
+import { ModalTypes } from "./types";
 
 const PageName = "supplierAccoutQuery";
 const roleModalRef = ref<InstanceType<typeof RoleModal> | null>(null);