wenhongquan 1 year ago
parent
commit
56e3071f18
2 changed files with 4 additions and 2 deletions
  1. 1 0
      src/views/login.vue
  2. 3 2
      src/views/project/list/index.vue

+ 1 - 0
src/views/login.vue

@@ -129,6 +129,7 @@ const handleLogin = () => {
       // 调用action的登录方法
       const [err] = await to(userStore.login(loginForm.value));
       if (!err) {
+        console.log(router.getRoutes());
         await router.push({ path: redirect.value || '/' });
         loading.value = false;
       } else {

+ 3 - 2
src/views/project/list/index.vue

@@ -445,7 +445,7 @@ const pdfviewshow = ref(false);
 const route = useRoute();
 
 var isnormal = false;
-if(userroles.indexOf("normaluser")!=-1){
+if(userroles.indexOf("superadmin")!=-1){
   isnormal = true
 }
 
@@ -483,12 +483,13 @@ const getnextdata = (page: number) => {
   if(route.query.status){
     searchForm.value["status"]=route.query.status;
   }else{
-    if(isnormal){
+    if(!isnormal){
       searchForm.value["status"]="1";
     }
   }
   if(route.fullPath.indexOf("add")!=-1){
     searchForm.value["createBy"]=useUserStore().userId;
+    delete  searchForm.value.status;
   }
 
   listArchives({ pageSize: 10, pageNum: page, ...searchForm.value }).then((res) => {