Explorar o código

fix: 账号管理查询功能参数缺少,返回结果错误

qindao hai 1 ano
pai
achega
1afbcf8364
Modificáronse 1 ficheiros con 6 adicións e 3 borrados
  1. 6 3
      src/views/system/user/user.vue

+ 6 - 3
src/views/system/user/user.vue

@@ -165,7 +165,7 @@
   // 当前用户类型
   const currrentRoleType = getUserInfo.value.roleType;
   // 是否拥有添加租户管理人员权限,条件:1.系统用户,2.选择租户切换到租户选项
-  const isCanAddTenant = currrentRoleType === RoleTypeEnum.SUPER_ADMIN || RoleTypeEnum.USER;
+  const isCanAddTenant = Number(currrentRoleType) !== RoleTypeEnum.TENANT_ADMIN;
   const openAddSingleDrawer = () => {
     drawerTitle.value = '添加用户';
     if (isSysTenant) {
@@ -276,9 +276,12 @@
           if (['deptId', 'roleId'].includes(key)) {
             params.queryParam[key] = value;
           }
-          params.queryParam[queryType] = queryTypeContent;
+          if (queryType) {
+            params.queryParam[queryType] = queryTypeContent;
+          }
         }
       });
+      
       // 删除多余参数
       delteExtraParams(queryType);
       getUserList(params).then((res) => {
@@ -319,7 +322,7 @@
 
   const tranformDeptList = (arr: DeptTreeItem[]) => {
     if (arr && arr.length === 0) return '--';
-    return arr?.map((item) => item.deptName).join(',');
+    return arr?.map((item) => item.deptName).join('-');
   };
 </script>
 <style scoped>