Browse Source

Merge branch 'dev' into zrq

# Conflicts:
#	jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/AppmanageController.java
#	jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/AppBaseInfoMapper.java
#	jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/AppmanageService.java
#	jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/AppmanageServiceImpl.java
#	jeecg-boot/jeecg-server-cloud/jeecg-cloud-nacos/src/main/resources/application.yml
LT32820A 2 tháng trước cách đây
mục cha
commit
56710e41a1
61 tập tin đã thay đổi với 1306 bổ sung964 xóa
  1. 44 33
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysPermissionController.java
  2. 44 8
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysRoleController.java
  3. 8 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/entity/AppmanageEntity/AppUserInfo.java
  4. 4 3
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysPermissionMapper.java
  5. 3 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysRoleMapper.java
  6. 2 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysUserPermissionMapper.java
  7. 10 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/AppBaseInfoMapper.xml
  8. 12 10
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysPermissionDataRuleMapper.xml
  9. 63 16
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysPermissionMapper.xml
  10. 9 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysRoleMapper.xml
  11. 22 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserPermissionMapper.xml
  12. 4 3
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/ISysPermissionService.java
  13. 2 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/ISysUserPermissionService.java
  14. 32 8
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysPermissionServiceImpl.java
  15. 4 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserPermissionServiceImpl.java
  16. 11 1
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
  17. 1 1
      jeecg-boot/jeecg-module-system/jeecg-system-start/Dockerfile
  18. 9 6
      jeecg-boot/jeecg-server-cloud/docker-compose.yml
  19. 1 1
      jeecg-boot/jeecg-server-cloud/jeecg-cloud-gateway/Dockerfile
  20. 1 1
      jeecg-boot/jeecg-server-cloud/jeecg-demo-cloud-start/Dockerfile
  21. 1 1
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/Dockerfile
  22. 5 0
      jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/pom.xml
  23. 1 1
      jeecg-boot/jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/Dockerfile
  24. 1 1
      jeecg-boot/jeecg-server-cloud/jeecg-visual/jeecg-cloud-xxljob/Dockerfile
  25. 2 2
      jeecg-boot/jeecg-server-cloud/jeecg-visual/jeecg-cloud-xxljob/src/main/resources/application.yml
  26. 1 1
      jeecg-boot/jeecg-server-cloud/pom.xml
  27. 8 1
      jeecg-boot/lttc-module-system/pom.xml
  28. 469 460
      jeecg-boot/pom.xml
  29. 3 3
      jeecgboot-vue3/.env
  30. 4 2
      jeecgboot-vue3/.env.development
  31. 1 1
      jeecgboot-vue3/.env.production
  32. 3 3
      jeecgboot-vue3/Dockerfile
  33. 17 0
      jeecgboot-vue3/docker-compose.yml
  34. BIN
      jeecgboot-vue3/public/logo.png
  35. BIN
      jeecgboot-vue3/public/resource/img/logo.png
  36. 1 1
      jeecgboot-vue3/src/api/common/api.ts
  37. BIN
      jeecgboot-vue3/src/assets/images/logo.png
  38. BIN
      jeecgboot-vue3/src/assets/loginmini/icon/jeecg_ad_text.png
  39. BIN
      jeecgboot-vue3/src/assets/loginmini/icon/jeecg_logo.png
  40. BIN
      jeecgboot-vue3/src/assets/loginmini/icon/logo.png
  41. 10 10
      jeecgboot-vue3/src/components/Lttc/BaseService/LTTCBaseServiceAdvancedSearch.vue
  42. 2 2
      jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts
  43. 2 2
      jeecgboot-vue3/src/views/baseservice/advancedSearch/AdvancedSearchList.vue
  44. 2 2
      jeecgboot-vue3/src/views/sys/login/TokenLoginPage.vue
  45. 20 13
      jeecgboot-vue3/src/views/system/menu/components/AppPermissionTree.vue
  46. 28 6
      jeecgboot-vue3/src/views/system/menu/components/DataRuleDrawer.vue
  47. 22 9
      jeecgboot-vue3/src/views/system/menu/components/PermissionLeftTable.vue
  48. 238 224
      jeecgboot-vue3/src/views/system/menu/menu/index.vue
  49. 12 8
      jeecgboot-vue3/src/views/system/menu/menu/menu.api.ts
  50. 12 7
      jeecgboot-vue3/src/views/system/menu/menu/menu.data.ts
  51. 37 28
      jeecgboot-vue3/src/views/system/menu/permission/permission.vue
  52. 1 8
      jeecgboot-vue3/src/views/system/menu/report/report.api.ts
  53. 6 23
      jeecgboot-vue3/src/views/system/menu/report/report.data.ts
  54. 17 6
      jeecgboot-vue3/src/views/system/menu/report/report.vue
  55. 2 1
      jeecgboot-vue3/src/views/system/ossfile/index.vue
  56. 39 6
      jeecgboot-vue3/src/views/system/role/index.vue
  57. 1 1
      jeecgboot-vue3/src/views/system/role/role.api.ts
  58. 24 22
      jeecgboot-vue3/src/views/system/role/role.data.ts
  59. 7 2
      jeecgboot-vue3/src/views/system/user/UserDrawer.vue
  60. 14 7
      jeecgboot-vue3/src/views/system/user/index.vue
  61. 7 9
      jeecgboot-vue3/src/views/system/user/user.data.ts

+ 44 - 33
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysPermissionController.java

@@ -9,6 +9,7 @@ import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.apache.shiro.subject.Subject;
 import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.PermissionData;
 import org.jeecg.common.constant.CommonConstant;
 import org.jeecg.common.constant.SymbolConstant;
 import org.jeecg.common.exception.JeecgBootException;
@@ -20,7 +21,6 @@ import org.jeecg.config.shiro.ShiroRealm;
 import org.jeecg.modules.base.service.BaseCommonService;
 import org.jeecg.modules.system.constant.DefIndexConst;
 import org.jeecg.modules.system.entity.*;
-import org.jeecg.modules.system.entity.AppmanageEntity.AppBaseInfo;
 import org.jeecg.modules.system.model.SysPermissionTree;
 import org.jeecg.modules.system.model.TreeModel;
 import org.jeecg.modules.system.service.*;
@@ -80,14 +80,6 @@ public class SysPermissionController {
      * 子菜单
      */
 	private static final String CHILDREN = "children";
-	@RequestMapping(value = "/appList", method = RequestMethod.GET)
-	public Result<List<AppBaseInfo>> appList() {
-		List<AppBaseInfo> appBaseInfos = sysPermissionService.appList();
-		Result<List<AppBaseInfo>> result = new Result<>();
-		result.setResult(appBaseInfos);
-		result.setSuccess(true);
-		return result;
-	}
 
 
 	/**
@@ -95,27 +87,28 @@ public class SysPermissionController {
 	 *
 	 * @return
 	 */
-	//@RequiresPermissions("system:permission:list")
-	@RequestMapping(value = "/list", method = RequestMethod.GET)
-	public Result<List<SysPermissionTree>> list(SysPermission sysPermission, HttpServletRequest req) {
+	@RequiresPermissions("system:permission:list")
+	@RequestMapping(value = "/sqlList", method = RequestMethod.GET)
+	@PermissionData
+	public Result<List<SysPermissionTree>> list(SysPermission sysPermission, HttpServletRequest req,@RequestParam(name = "ids", required = false)String appIds) {
         long start = System.currentTimeMillis();
 		Result<List<SysPermissionTree>> result = new Result<>();
+		//应用数据隔离
+		LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		Boolean isAdmin = loginUser.getUsername().equals("admin");
+		String appSql = "";
+		if(oConvertUtils.isEmpty(appIds)&&!isAdmin){
+			result.setSuccess(true);
+			result.setResult(new ArrayList<>());
+			return result;
+		}
 		try {
-//			LambdaQueryWrapper<SysPermission> query = new LambdaQueryWrapper<SysPermission>();
-//			query.eq(SysPermission::getDelFlag, CommonConstant.DEL_FLAG_0);
-//			query.orderByAsc(SysPermission::getSortNo);
-//
-//			//支持通过菜单名字,模糊查询
-//			if(oConvertUtils.isNotEmpty(sysPermission.getName())){
-//				query.like(SysPermission::getName, sysPermission.getName());
-//			}
-//			//通过应用id条件查询
-//			if(oConvertUtils.isNotEmpty(sysPermission.getAppId())){
-//				query.eq(SysPermission::getAppId, sysPermission.getAppId());
-//			}
-//			List<SysPermission> list = sysPermissionService.list(query);
+			if (oConvertUtils.isNotEmpty(appIds)) {
+				appSql = appIds;
+			}
 			sysPermission.setDelFlag(CommonConstant.DEL_FLAG_0);
-			List<SysPermission> list = sysPermissionService.listAndAppName(sysPermission);
+//			List<SysPermission> list = sysPermissionService.listAndAppName(sysPermission);
+			List<SysPermission> list = sysPermissionService.listAndAppNameWithPermission(sysPermission, appSql);
 			List<SysPermissionTree> treeList = new ArrayList<>();
 
 			//如果有菜单名查询条件,则平铺数据 不做上下级
@@ -142,24 +135,37 @@ public class SysPermissionController {
 													  @RequestParam(name = "appId", required = false)String appId,
 													  @RequestParam(name = "business", required = false)String business,
 													  @RequestParam(name = "permission", required = false)String permission,
+													  @RequestParam(name = "appIds", required = false)String ids,
 													  HttpServletRequest req) {
 		long start = System.currentTimeMillis();
 		Result<List<SysPermissionReportVO>> result = new Result<>();
+		LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		Boolean isAdmin = loginUser.getUsername().equals("admin");
+		if (oConvertUtils.isEmpty(ids)&&!isAdmin){
+			result.setResult(new ArrayList<>());
+			result.setSuccess(true);
+			return result;
+		}
+
 		SysPermissionReportVO sysPermission = new SysPermissionReportVO();
 		sysPermission.setAppId(appId);
 		sysPermission.setBusiness(business);
 		sysPermission.setPermission(permission);
-		System.out.println(type);
-		System.out.println(sysPermission);
 
 		try{
 			List<SysPermissionReportVO> list = new ArrayList<>();
+			String permissionSql = "";
+			if (oConvertUtils.isNotEmpty(ids)){
+				String[] idArray = ids.split(",");
+				for (String id:idArray){
+					permissionSql += "'"+id+"',";
+				}
+				permissionSql = permissionSql.substring(0,permissionSql.length()-1);
+			}
 			if("role".equals(type)){
-				 list = sysPermissionService.reportRole(sysPermission);
-				System.out.println(list);
+				 list = sysPermissionService.reportRole(sysPermission,permissionSql);
 			}else {
-				list = sysPermissionService.reportUser(sysPermission);
-				System.out.println(list);
+				list = sysPermissionService.reportUser(sysPermission,permissionSql);
 			}
 
 			result.setResult(list);
@@ -817,7 +823,12 @@ public class SysPermissionController {
 						.eq(SysUserPermission::getUserId,userId);
 				SysUserPermission sysUserPermission = sysUserPermissionService.getOne(query);
 				if(sysUserPermission ==null) {
-					return Result.error("请先保存用户菜单权限!");
+					String permission= sysUserPermissionService.getOneByUserId(userId, permissionId);
+					if (permission == null){
+						return Result.error("请先保存用户菜单权限!");
+					}
+					SysUserPermission newUserPermission = new SysUserPermission(userId, permissionId).setDataRuleIds(dataRuleIds).setOperateDate(new Date());
+					sysUserPermissionService.save(newUserPermission);
 				}else {
 					sysUserPermission.setDataRuleIds(dataRuleIds);
 					this.sysUserPermissionService.updateById(sysUserPermission);

+ 44 - 8
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysRoleController.java

@@ -18,6 +18,7 @@ import cn.hutool.core.util.RandomUtil;
 import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.PermissionData;
 import org.jeecg.common.base.BaseMap;
 import org.jeecg.common.config.TenantContext;
 import org.jeecg.common.constant.CommonConstant;
@@ -28,6 +29,7 @@ import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
 import org.jeecg.modules.base.service.BaseCommonService;
 import org.jeecg.modules.system.entity.*;
+import org.jeecg.modules.system.entity.AppmanageEntity.AppBaseInfo;
 import org.jeecg.modules.system.model.TreeModel;
 import org.jeecg.modules.system.service.*;
 import org.jeecg.modules.system.vo.SysUserRoleCountVo;
@@ -97,12 +99,13 @@ public class SysRoleController {
 	 * @param req
 	 * @return
 	 */
-	@RequiresPermissions("system:role:list")
+//	@RequiresPermissions("system:role:list")
 	@RequestMapping(value = "/list", method = RequestMethod.GET)
 	public Result<IPage<SysRole>> queryPageList(SysRole role,
 									  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
 									  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
 									  HttpServletRequest req) {
+		log.info("----------此接口已废弃-------请改用listByApp接口----------------------");
 		Result<IPage<SysRole>> result = new Result<IPage<SysRole>>();
 		//QueryWrapper<SysRole> queryWrapper = QueryGenerator.initQueryWrapper(role, req.getParameterMap());
 		//IPage<SysRole> pageList = sysRoleService.page(page, queryWrapper);
@@ -113,6 +116,41 @@ public class SysRoleController {
 		result.setResult(pageList);
 		return result;
 	}
+	/**
+	 * 分页列表查询 【系统角色,通过应用隔离】
+	 * @param role
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@RequiresPermissions("system:role:list")
+//	@PermissionData
+	@RequestMapping(value = "/listByApp", method = RequestMethod.GET)
+	public Result<IPage<SysRole>> listByApp(SysRole role,
+												@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+												@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+												HttpServletRequest req) {
+
+		Result<IPage<SysRole>> result = new Result<IPage<SysRole>>();
+		String appId = role.getAppId();
+		LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		Boolean isAdmin = loginUser.getUsername().equals("admin");
+		if (appId==null && !isAdmin){
+			result.setSuccess(true);
+			result.setResult(new Page<SysRole>());
+			return result;
+		}
+		QueryWrapper<SysRole> queryWrapper = QueryGenerator.initQueryWrapper(role, req.getParameterMap());
+
+//		queryWrapper.orderByDesc("create_time");
+		Page<SysRole> page = new Page<SysRole>(pageNo, pageSize);
+		IPage<SysRole> pageList = sysRoleService.page(page, queryWrapper);
+
+		result.setSuccess(true);
+		result.setResult(pageList);
+		return result;
+	}
 	
 	/**
 	 * 分页列表查询【租户角色,做租户隔离】
@@ -141,9 +179,6 @@ public class SysRoleController {
 		return result;
 	}
 
-	/*
-	* 查询用户所拥有的全部角色
-	* */
 
 	
 	/**
@@ -354,8 +389,8 @@ public class SysRoleController {
 			result.error500("未找到角色信息");
 		}else {
 			List<Map> objects = new ArrayList<>();
-			Map<String, List<SysRole>> listMap = list.stream().collect(Collectors.groupingBy(SysRole::getAppName));
-			listMap.forEach((appName, roleList) -> {
+			Map<String, List<SysRole>> listMap = list.stream().collect(Collectors.groupingBy(SysRole::getAppId));
+			listMap.forEach((appId, roleList) -> {
 				Map<String, Object> map = new HashMap<>();
 				List<Map<String, String>> extractedList = roleList.stream()
 						.map(sysRole -> {
@@ -365,8 +400,9 @@ public class SysRoleController {
 							return roleInfo;
 						})
 						.collect(Collectors.toList());
-				map.put("label",appName);
-				map.put("options", extractedList);
+				map.put("label",roleList.get(0).getAppName());
+//				map.put("value",appId);
+				map.put("roleList", extractedList);
 				objects.add(map);
 			});
 			//排序,基础平台永远在首位

+ 8 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/entity/AppmanageEntity/AppUserInfo.java

@@ -18,4 +18,12 @@ public class AppUserInfo {
     private String id;
     private String appid;
     private String userid;
+
+    public AppUserInfo() {
+    }
+
+    public AppUserInfo(String appid, String userid) {
+        this.appid = appid;
+        this.userid = userid;
+    }
 }

+ 4 - 3
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysPermissionMapper.java

@@ -28,7 +28,8 @@ public interface SysPermissionMapper extends BaseMapper<SysPermission> {
 	 */
 	public List<TreeModel> queryListByParentId(@Param("parentId") String parentId);
 	public List<SysPermission> listAndAppName( SysPermission sysPermission) ;
-	public List<AppBaseInfo> appList();
+	public List<SysPermission> listAndAppNameWithPermission( @Param("permission")SysPermission sysPermission,@Param("permissionSql")String permissionSql);
+
 	/**
 	 * 根据用户查询用户权限
      * @param userId 用户ID
@@ -84,8 +85,8 @@ public interface SysPermissionMapper extends BaseMapper<SysPermission> {
 	@InterceptorIgnore(tenantLine = "true")
     List<SysPermission> queryPermissionByTestRoleId();
 
-	List<SysPermissionReportVO> reportRole(SysPermissionReportVO sysPermission);
+	List<SysPermissionReportVO> reportRole(@Param("vo") SysPermissionReportVO sysPermission,@Param("permissionSql")String permissionSql);
 
-	List<SysPermissionReportVO> reportUser(SysPermissionReportVO sysPermission);
+	List<SysPermissionReportVO> reportUser(@Param("vo")SysPermissionReportVO sysPermission,@Param("permissionSql")String permissionSql);
 
 }

+ 3 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysRoleMapper.java

@@ -79,4 +79,7 @@ public interface SysRoleMapper extends BaseMapper<SysRole> {
     List<SysRole> listExport(@Param("role") SysRole role);
 
     List<String> listRoleIdsByAppId(@Param("appId") String appId);
+
+    //根据角色ids查询appids并去重
+    List<String> listAppIdsByRoleIds(@Param("roleIds") String[] roleIds);
 }

+ 2 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysUserPermissionMapper.java

@@ -20,4 +20,6 @@ public interface SysUserPermissionMapper extends BaseMapper<SysUserPermission> {
      * @return List<SysPermission>
      */
     public List<String> listByUser(@Param("userId") String userId);
+
+    String getOneByUserId(@Param("userId")String userId, @Param("permissionId")String permissionId);
 }

+ 10 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/AppBaseInfoMapper.xml

@@ -23,4 +23,14 @@
         </if>
         ORDER BY app.create_time DESC
     </select>
+
+    <select id="appList" parameterType="String" resultType="org.jeecg.modules.system.entity.AppmanageEntity.AppBaseInfo">
+        select *
+        from app_base_info
+
+        where del_flag = 0
+        <if test="permissionSql !=null and permissionSql != ''">
+            ${permissionSql}
+        </if>
+    </select>
 </mapper>

+ 12 - 10
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysPermissionDataRuleMapper.xml

@@ -11,16 +11,18 @@
 			join sys_user_role d on d.role_id = c.id
 			join sys_user e on d.user_id = e.id
 			where e.username = #{username} and b.id =  #{permissionId}
-		<!--update begin Author:lvdandan  Date:20200213 for:加入部门权限 -->
-		union
-		select data_rule_ids
-			from sys_depart_role_permission a
-			join sys_permission b on a.permission_id = b.id
-			join sys_depart_role c on a.role_id = c.id
-			join sys_depart_role_user d on d.drole_id = c.id
-			join sys_user e on d.user_id = e.id
-			where e.username = #{username} and b.id = #{permissionId}
-		<!--update end Author:lvdandan  Date:20200213 for:加入部门权限 -->
+
+		<!-- 修改为加入用户独立数据权限 -->
+		UNION
+		SELECT
+		data_rule_ids
+		FROM
+		sys_user_permission a
+		JOIN sys_permission b ON a.permission_id = b.id
+		JOIN sys_user e ON a.user_id = e.id
+		WHERE
+		e.username = #{username} and b.id =  #{permissionId}
+		<!-- 修改为加入用户独立数据权限 -->
 	</select>
 
 </mapper>

+ 63 - 16
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysPermissionMapper.xml

@@ -37,9 +37,7 @@
 		<result column="permission" property="permission" jdbcType="INTEGER"/>
 	</resultMap>
 
-	<select id="appList" parameterType="Object" resultMap="AppBaseInfo">
-		select id,name from app_base_info
-	</select>
+
 
 	<!--根据查询权限列表并添加app名称-->
 	<select id="listAndAppName" parameterType="Object" resultMap="SysPermission">
@@ -80,6 +78,50 @@
 			ORDER BY p.sort_no ASC
 
 
+	</select>
+
+	<!--查询权限列表并添加app名称(数据权限)-->
+	<select id="listAndAppNameWithPermission" parameterType="Object"  resultMap="SysPermission">
+		SELECT  p.id,
+		p.parent_id,
+		p.name,
+		p.app_id,
+		p.url,
+		p.component,
+		p.is_route ,
+		p.component_name,
+		p.redirect,
+		p.menu_type,
+		p.perms,
+		p.perms_type,
+		p.sort_no,
+		p.always_show,
+		p.icon,
+		p.is_leaf,
+		p.keep_alive,
+		p.hidden,
+		p.hide_tab,
+		p.rule_flag,
+		p.status,
+		p.internal_or_external,
+		sa.name AS app_name
+		FROM
+		sys_permission p
+		INNER JOIN
+		app_base_info sa ON p.app_id = sa.id
+		WHERE p.del_flag = #{permission.delFlag}
+		<if test="permissionSql !=null and permissionSql != ''">
+			${permissionSql}
+		</if>
+		<if test="permission.name !=null and permission.name != ''">
+			AND p.name LIKE CONCAT('%', #{permission.name},'%')
+		</if>
+		<if test="permission.appId !=null and permission.appId != ''">
+			AND ( p.app_id = #{permission.appId})
+		</if>
+		ORDER BY p.sort_no ASC
+
+
 	</select>
 	
 	<select id="queryListByParentId" parameterType="Object"  resultMap="TreeModel">
@@ -322,14 +364,17 @@
 		WHERE
 			p.menu_type = 2
 			AND p.del_flag = 0
-		<if test="permission !=null and permission != ''">
-			AND p.name LIKE CONCAT('%', #{permission},'%')
+		<if test="vo.permission !=null and vo.permission != ''">
+			AND p.name LIKE CONCAT('%', #{vo.permission},'%')
 		</if>
-		<if test="business !=null and business != ''">
-			AND p1.name LIKE CONCAT('%', #{business},'%')
+		<if test="vo.business !=null and vo.business != ''">
+			AND p1.name LIKE CONCAT('%', #{vo.business},'%')
 		</if>
-		<if test="appId !=null and appId != ''">
-			AND  p.app_id = #{appId}
+		<if test="vo.appId !=null and vo.appId != ''">
+			AND  p.app_id = #{vo.appId}
+		</if>
+		<if test="permissionSql !=null and permissionSql != ''">
+			AND  p.app_id IN (${permissionSql})
 		</if>
 		ORDER BY
 			r.role_name,
@@ -386,16 +431,18 @@
 		) AS UserAllPermission
 		WHERE 1 = 1
 
-		<if test="permission !=null and permission != ''">
-			AND permission LIKE CONCAT('%', #{permission},'%')
+		<if test="vo.permission !=null and vo.permission != ''">
+			AND permission LIKE CONCAT('%', #{vo.permission},'%')
 		</if>
-		<if test="business !=null and business != ''">
-			AND business LIKE CONCAT('%', #{business},'%')
+		<if test="vo.business !=null and vo.business != ''">
+			AND business LIKE CONCAT('%', #{vo.business},'%')
 		</if>
-		<if test="appId !=null and appId != ''">
-			AND  appId = #{appId}
+		<if test="vo.appId !=null and vo.appId != ''">
+			AND  appId = #{vo.appId}
+		</if>
+		<if test="permissionSql !=null and permissionSql != ''">
+			AND  appId IN (${permissionSql})
 		</if>
-
 		GROUP BY
 		username,
 		realname,

+ 9 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysRoleMapper.xml

@@ -76,4 +76,13 @@
             SELECT id from sys_role
             WHERE app_id = #{appId}
     </select>
+
+    <!-- 根据角色ids查询appids并去重-->
+    <select id="listAppIdsByRoleIds"  resultType="java.lang.String">
+        SELECT DISTINCT app_id FROM sys_role
+        WHERE id IN
+        <foreach item="item" index="index" collection="roleIds" open="(" separator="," close=")">
+            #{item}
+        </foreach>
+    </select>
 </mapper>

+ 22 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserPermissionMapper.xml

@@ -21,4 +21,26 @@
             WHERE up.user_id =#{userId}
         </if>
     </select>
+
+    <select id="getOneByUserId" parameterType="map" resultType="java.lang.String">
+        SELECT
+            permission_id
+        FROM
+            sys_user_permission
+        WHERE
+            user_id = #{userId}
+          AND permission_id = #{permissionId}
+
+        UNION
+        SELECT
+            rp.permission_id
+        FROM
+            sys_user_role ur
+                LEFT JOIN sys_role_permission rp ON ur.role_id = rp.role_id
+        WHERE
+            ur.user_id = #{userId}
+          AND rp.permission_id = #{permissionId}
+
+    </select>
+
 </mapper>

+ 4 - 3
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/ISysPermissionService.java

@@ -31,7 +31,8 @@ public interface ISysPermissionService extends IService<SysPermission> {
 	public List<TreeModel> queryListByParentId(String parentId);
 //	public List<SysPermission> joinList(MPJLambdaWrapper<SysPermission> querywrapper);
 	public List<SysPermission> listAndAppName( SysPermission sysPermission);
-	public List<AppBaseInfo> appList();
+	public List<SysPermission> listAndAppNameWithPermission( SysPermission sysPermission,String sql);
+
 	/**
      * 真实删除
      * @param id 菜单id
@@ -112,6 +113,6 @@ public interface ISysPermissionService extends IService<SysPermission> {
 	 */
 	 boolean checkPermDuplication(String id, String url,Boolean alwaysShow);
 
-	List<SysPermissionReportVO> reportRole(SysPermissionReportVO sysPermission);
-	List<SysPermissionReportVO> reportUser(SysPermissionReportVO sysPermission);
+	List<SysPermissionReportVO> reportRole(SysPermissionReportVO sysPermission,String permissionSql);
+	List<SysPermissionReportVO> reportUser(SysPermissionReportVO sysPermission,String permissionSql);
 }

+ 2 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/ISysUserPermissionService.java

@@ -29,4 +29,6 @@ public interface ISysUserPermissionService extends IService<SysUserPermission> {
      * @param lastPermissionIds
      */
     public void saveUserPermission(String userId,String permissionIds,String lastPermissionIds);
+
+    String getOneByUserId(String userId, String permissionId);
 }

+ 32 - 8
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysPermissionServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.jeecg.common.constant.CacheConstant;
 import org.jeecg.common.constant.CommonConstant;
 import org.jeecg.common.exception.JeecgBootException;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
 import org.jeecg.modules.system.entity.AppmanageEntity.AppBaseInfo;
@@ -29,6 +30,8 @@ import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 /**
  * <p>
@@ -76,11 +79,32 @@ public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, S
 	public List<SysPermission> listAndAppName( SysPermission sysPermission) {
 		return sysPermissionMapper.listAndAppName(sysPermission);
 	}
-
-	@Override
-	public List<AppBaseInfo> appList() {
-		return sysPermissionMapper.appList();
+	public List<SysPermission> listAndAppNameWithPermission( SysPermission sysPermission,String permissionSql) {
+		//此处修改为前台控制应用隔离
+//		String sql = QueryGenerator.installAuthJdbc(SysPermission.class);
+//		//处理sql格式,避免注入风险
+//		//只对应用进行数据隔离
+//		if (sql!= null){
+//			String modifiedSql = modifySql(sql);
+//			sql = modifiedSql;
+//		}
+		if(permissionSql.length()>0){
+			permissionSql = "AND  p.app_id IN ("+permissionSql+")";
+		}
+		return sysPermissionMapper.listAndAppNameWithPermission(sysPermission,permissionSql);
 	}
+	public static String modifySql(String sql) {
+		String regex ="(?i)\\s+AND\\s+";
+		StringBuilder modiSQL = new StringBuilder();
+		for (String s : sql.split(regex)) {
+			String trim = s.trim();
+			if(!trim.isEmpty()){
+				modiSQL.append(" AND p.").append(trim);
+			}
+		}
+		return modiSQL.toString();
+	}
+
 
 	/**
 	  * 真实删除
@@ -326,14 +350,14 @@ public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, S
 	}
 
 	@Override
-	public List<SysPermissionReportVO> reportRole(SysPermissionReportVO sysPermission) {
-		return sysPermissionMapper.reportRole(sysPermission);
+	public List<SysPermissionReportVO> reportRole(SysPermissionReportVO sysPermission , String permissionSql) {
+		return sysPermissionMapper.reportRole(sysPermission, permissionSql);
 	}
 
 
 	@Override
-	public List<SysPermissionReportVO> reportUser(SysPermissionReportVO sysPermission) {
+	public List<SysPermissionReportVO> reportUser(SysPermissionReportVO sysPermission,String permissionSql) {
 		//用户权限报表需汇总角色权限与用户独立权限
-		return sysPermissionMapper.reportUser(sysPermission);
+		return sysPermissionMapper.reportUser(sysPermission, permissionSql);
 	}
 }

+ 4 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserPermissionServiceImpl.java

@@ -119,4 +119,8 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
         return res;
     }
 
+    @Override
+    public String getOneByUserId(String userId, String permissionId) {
+        return sysUserPermissionMapper.getOneByUserId(userId,permissionId);
+    }
 }

+ 11 - 1
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java

@@ -38,6 +38,7 @@ import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
 import org.jeecg.modules.base.service.BaseCommonService;
 import org.jeecg.modules.message.handle.impl.SystemSendMsgHandle;
 import org.jeecg.modules.system.entity.*;
+import org.jeecg.modules.system.entity.AppmanageEntity.AppUserInfo;
 import org.jeecg.modules.system.mapper.*;
 import org.jeecg.modules.system.model.SysUserSysDepartModel;
 import org.jeecg.modules.system.service.ISysRoleIndexService;
@@ -87,7 +88,9 @@ import java.util.stream.Collectors;
 @Service
 @Slf4j
 public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService {
-	
+
+	@Autowired
+	private AppUserInfoMapper appUserInfoMapper;
 	@Autowired
 	private SysUserMapper userMapper;
 	@Autowired
@@ -854,7 +857,14 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
 				SysUserRole userRole = new SysUserRole(user.getId(), roleId);
 				sysUserRoleMapper.insert(userRole);
 			}
+			//step.2.5 保存应用关系
+			List<String> sysRoles = sysRoleMapper.listAppIdsByRoleIds(arr);
+			for (String appId : sysRoles){
+				AppUserInfo appUserInfo = new AppUserInfo(appId,user.getId());
+				appUserInfoMapper.insert(appUserInfo);
+			}
 		}
+
 		
 		//step.3 保存所属部门
 		if(oConvertUtils.isNotEmpty(selectedDeparts)) {

+ 1 - 1
jeecg-boot/jeecg-module-system/jeecg-system-start/Dockerfile

@@ -1,4 +1,4 @@
-FROM anapsix/alpine-java:8_server-jre_unlimited
+FROM registry.cn-hangzhou.aliyuncs.com/jeecgdocker/alpine-java:8_server-jre_unlimited
 
 MAINTAINER jeecgos@163.com
 

+ 9 - 6
jeecg-boot/jeecg-server-cloud/docker-compose.yml

@@ -50,11 +50,6 @@ services:
     hostname: jeecg-boot-gateway
     networks:
       - jeecg-boot
-
-networks:
-  jeecg-boot:
-    name: jeecg_boot
-
 #  jeecg-boot-sentinel:
 #    restart: on-failure
 #    build:
@@ -68,7 +63,8 @@ networks:
 #      - jeecg-boot-gateway
 #    container_name: jeecg-boot-sentinel
 #    hostname: jeecg-boot-sentinel
-#
+#    networks:
+#      - jeecg-boot
 #  jeecg-boot-xxljob:
 #    build:
 #      context: ./jeecg-visual/jeecg-cloud-xxljob
@@ -76,3 +72,10 @@ networks:
 #      - 9080:9080
 #    container_name: jeecg-boot-xxljob
 #    hostname: jeecg-boot-xxljob
+#    networks:
+#      - jeecg-boot
+networks:
+  jeecg-boot:
+    name: jeecg_boot
+
+

+ 1 - 1
jeecg-boot/jeecg-server-cloud/jeecg-cloud-gateway/Dockerfile

@@ -1,4 +1,4 @@
-FROM anapsix/alpine-java:8_server-jre_unlimited
+FROM registry.cn-hangzhou.aliyuncs.com/jeecgdocker/alpine-java:8_server-jre_unlimited
 
 MAINTAINER jeecgos@163.com
 

+ 1 - 1
jeecg-boot/jeecg-server-cloud/jeecg-demo-cloud-start/Dockerfile

@@ -1,4 +1,4 @@
-FROM anapsix/alpine-java:8_server-jre_unlimited
+FROM registry.cn-hangzhou.aliyuncs.com/jeecgdocker/alpine-java:8_server-jre_unlimited
 
 MAINTAINER jeecgos@163.com
 

+ 1 - 1
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/Dockerfile

@@ -1,4 +1,4 @@
-FROM anapsix/alpine-java:8_server-jre_unlimited
+FROM registry.cn-hangzhou.aliyuncs.com/jeecgdocker/alpine-java:8_server-jre_unlimited
 
 MAINTAINER jeecgos@163.com
 

+ 5 - 0
jeecg-boot/jeecg-server-cloud/jeecg-system-cloud-start/pom.xml

@@ -36,6 +36,11 @@
                 </exclusion>
             </exclusions>
         </dependency>
+        <!-- 引入lttc-module-systemo依赖 -->
+        <dependency>
+            <groupId>cn.lttc</groupId>
+            <artifactId>lttc-module-system</artifactId>
+        </dependency>
 
 
 <!--        <dependency>-->

+ 1 - 1
jeecg-boot/jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/Dockerfile

@@ -1,4 +1,4 @@
-FROM anapsix/alpine-java:8_server-jre_unlimited
+FROM registry.cn-hangzhou.aliyuncs.com/jeecgdocker/alpine-java:8_server-jre_unlimited
 
 MAINTAINER jeecgos@163.com
 

+ 1 - 1
jeecg-boot/jeecg-server-cloud/jeecg-visual/jeecg-cloud-xxljob/Dockerfile

@@ -1,4 +1,4 @@
-FROM anapsix/alpine-java:8_server-jre_unlimited
+FROM registry.cn-hangzhou.aliyuncs.com/jeecgdocker/alpine-java:8_server-jre_unlimited
 
 MAINTAINER jeecgos@163.com
 

+ 2 - 2
jeecg-boot/jeecg-server-cloud/jeecg-visual/jeecg-cloud-xxljob/src/main/resources/application.yml

@@ -5,9 +5,9 @@ server:
   #数据源配置
 spring:
   datasource:
-    url: jdbc:mysql://jeecg-boot-mysql:3306/xxl_job?Unicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
+    url: jdbc:mysql://10.200.1.115:3306/luthai-basis-platform-xxl-job?Unicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
     username: ${MYSQL-USER:root}
-    password: ${MYSQL-PWD:root}
+    password: ${MYSQL-PWD:Lttc123!}
     driver-class-name: com.mysql.jdbc.Driver
     type: com.zaxxer.hikari.HikariDataSource
     hikari:

+ 1 - 1
jeecg-boot/jeecg-server-cloud/pom.xml

@@ -18,7 +18,7 @@
         <module>jeecg-cloud-nacos</module>
         <module>jeecg-system-cloud-start</module>
         <module>jeecg-demo-cloud-start</module>
-        
+
         <!-- 监控和测试例子 -->
         <module>jeecg-visual</module>
     </modules>

+ 8 - 1
jeecg-boot/lttc-module-system/pom.xml

@@ -19,5 +19,12 @@
             <artifactId>jeecg-boot-base-core</artifactId>
         </dependency>
     </dependencies>
-
+<!--    <build>-->
+<!--        <plugins>-->
+<!--            <plugin>-->
+<!--                <groupId>org.springframework.boot</groupId>-->
+<!--                <artifactId>spring-boot-maven-plugin</artifactId>-->
+<!--            </plugin>-->
+<!--        </plugins>-->
+<!--    </build>-->
 </project>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 469 - 460
jeecg-boot/pom.xml


+ 3 - 3
jeecgboot-vue3/.env

@@ -2,10 +2,10 @@
 VITE_PORT = 3100
 
 #  网站标题
-VITE_GLOB_APP_TITLE = JeecgBoot 企业级低代码平台
+VITE_GLOB_APP_TITLE = 鲁泰移动WEB平台
 
 # 简称,此变量只能是字符/下划线
-VITE_GLOB_APP_SHORT_NAME = JeecgBoot_Pro
+VITE_GLOB_APP_SHORT_NAME = LTTC_WEB
 
 # 单点登录服务端地址
 VITE_GLOB_APP_CAS_BASE_URL=http://cas.test.com:8443/cas
@@ -17,6 +17,6 @@ VITE_GLOB_APP_OPEN_SSO = false
 VITE_GLOB_APP_OPEN_QIANKUN=true
 
 # 文件预览地址
-VITE_GLOB_ONLINE_VIEW_URL=http://fileview.jeecg.com/onlinePreview
+VITE_GLOB_ONLINE_VIEW_URL=http://10.200.1.115:8012//onlinePreview
 
 

+ 4 - 2
jeecgboot-vue3/.env.development

@@ -6,10 +6,12 @@ VITE_PUBLIC_PATH = /
 
 
 # 跨域代理,您可以配置多个 ,请注意,没有换行符
-VITE_PROXY = [["/jeecgboot","http://localhost:8080/jeecg-boot"],["/upload","http://localhost:3300/upload"]]
+# VITE_PROXY = [["/jeecgboot","http://localhost:8080/jeecg-boot"],["/upload","http://localhost:3300/upload"]]
+VITE_PROXY = [["/jeecgboot","http://localhost:9999"],["/upload","http://localhost:3300/upload"]]
 
 #后台接口全路径地址(必填)
-VITE_GLOB_DOMAIN_URL=http://localhost:8080/jeecg-boot
+# VITE_GLOB_DOMAIN_URL=http://localhost:8080/jeecg-boot
+VITE_GLOB_DOMAIN_URL=http://localhost:9999
 
 #后台接口父地址(必填)
 VITE_GLOB_API_URL=/jeecgboot

+ 1 - 1
jeecgboot-vue3/.env.production

@@ -16,7 +16,7 @@ VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
 VITE_GLOB_API_URL=/jeecgboot
 
 #后台接口全路径地址(必填)
-VITE_GLOB_DOMAIN_URL=http://jeecg-boot-system:8080/jeecg-boot
+VITE_GLOB_DOMAIN_URL=http://jeecg-boot-gateway:9999
 
 # 接口父路径前缀
 VITE_GLOB_API_URL_PREFIX=

+ 3 - 3
jeecgboot-vue3/Dockerfile

@@ -1,13 +1,13 @@
-FROM nginx
+FROM registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/nginx
 MAINTAINER jeecgos@163.com
 VOLUME /tmp
 ENV LANG en_US.UTF-8
 RUN echo "server {  \
                       listen       80; \
                       location   /jeecgboot/ { \
-                      proxy_pass              http://jeecg-boot-system:8080/jeecg-boot/; \
+                      proxy_pass             http://jeecg-boot-gateway:9999/; \
                       proxy_redirect          off; \
-                      proxy_set_header        Host jeecg-boot-system; \
+                      proxy_set_header        Host jeecg-boot-gateway; \
                       proxy_set_header        X-Real-IP \$remote_addr; \
                       proxy_set_header        X-Forwarded-For \$proxy_add_x_forwarded_for; \
                   } \

+ 17 - 0
jeecgboot-vue3/docker-compose.yml

@@ -0,0 +1,17 @@
+version: '3.8'
+
+services:
+  jeecgboot-vue3-nginx:
+    image: jeecgboot-vue3
+    build:
+      context: .
+    container_name: jeecgboot-vue3-nginx
+    networks:
+      - jeecg_boot
+    ports:
+      - "80:80"
+    restart: always
+
+networks:
+  jeecg_boot:
+    external: true

BIN
jeecgboot-vue3/public/logo.png


BIN
jeecgboot-vue3/public/resource/img/logo.png


+ 1 - 1
jeecgboot-vue3/src/api/common/api.ts

@@ -6,7 +6,7 @@ const baseUploadUrl = globSetting.uploadUrl;
 enum Api {
   positionList = '/sys/position/list',
   userList = '/sys/user/list',
-  roleList = '/sys/role/list',
+  roleList = '/sys/role/listByApp',
   queryDepartTreeSync = '/sys/sysDepart/queryDepartTreeSync',
   queryTreeList = '/sys/sysDepart/queryTreeList',
   loadTreeData = '/sys/category/loadTreeData',

BIN
jeecgboot-vue3/src/assets/images/logo.png


BIN
jeecgboot-vue3/src/assets/loginmini/icon/jeecg_ad_text.png


BIN
jeecgboot-vue3/src/assets/loginmini/icon/jeecg_logo.png


BIN
jeecgboot-vue3/src/assets/loginmini/icon/logo.png


+ 10 - 10
jeecgboot-vue3/src/components/Lttc/BaseService/LTTCBaseServiceAdvancedSearch.vue

@@ -5,7 +5,7 @@
       <template #header>
         高级查询方案:
         <a-button type="link" v-for="(item, index) in savedQueries.slice(0, visibleCount)"
-                  :key="index" @click.stop="() => handleQueryNameClick(item)">
+                  :key="index" @click.stop="() => handleQueryNameClick(item)"  @dblclick.stop="resetQuery">
           {{ truncateText(item.queryName) }}
         </a-button>
         <a-button type="link" v-if="savedQueries.length > visibleCount" @click.stop="quickQuery">更多
@@ -18,7 +18,7 @@
 
             <!-- 查询模式选择 -->
             <a-col :span="3">
-              <a-form-item>
+              <a-form-item style="width:90%">
                 <a-select v-model:value="query.mode" placeholder="请选择查询模式">
                   <a-select-option v-for="mode in modeOptions" :key="mode.value"
                                    :value="mode.value">
@@ -29,7 +29,7 @@
             </a-col>
             <!-- 查询列选择 -->
             <a-col :span="6">
-              <a-form-item>
+              <a-form-item  style="width:90%">
                 <a-select v-model:value="query.column" class="a-select" placeholder="请选择查询列">
                   <a-select-option class="a-select" v-for="col in fieldOptions" :key="col.value"
                                    :value="col.value">
@@ -40,7 +40,7 @@
             </a-col>
             <!-- 查询条件选择 -->
             <a-col :span="3">
-              <a-form-item>
+              <a-form-item  style="width:90%">
                 <a-select v-model:value="query.condition" placeholder="请选择查询条件"
                           class="a-select">
                   <a-select-option class="a-select" v-for="condition in conditionOptions"
@@ -53,7 +53,7 @@
             </a-col>
             <!-- 查询内容输入,根据列的类型显示不同的输入控件 -->
             <a-col :span="6">
-              <a-form-item>
+              <a-form-item  style="width:90%">
                 <template v-if="getColumnType(query.column).toLowerCase() === 'date'">
                   <a-date-picker v-model:value="query.term" format="YYYY-MM-DD"
                                  placeholder="请选择日期"/>
@@ -79,18 +79,18 @@
             <!-- 添加和删除查询条件按钮 -->
             <a-col :span="6">
               <a-form-item>
-                <a-button v-if="queries.length > 1" @click="removeQuery(index)" type="danger">删除
+                <a-button v-if="queries.length > 1" @click="removeQuery(index)" type="danger" style="margin-right: 1vh">删除
                 </a-button>
-                <a-button @click="addQuery" type="primary">添加</a-button>
+                <a-button @click="addQuery" type="primary"  style="margin-right: 1vh">添加</a-button>
               </a-form-item>
             </a-col>
           </a-row>
         </div>
         <!-- 提交、保存和加载查询条件按钮 -->
         <a-form-item>
-          <a-button @click="resetQuery" type="default">重置</a-button>
-          <a-button type="primary" html-type="submit">查询</a-button>
-          <a-button @click="showModal" type="default">保存</a-button>
+          <a-button @click="resetQuery" type="default" style="margin-right: 1vh">重置</a-button>
+          <a-button type="primary" html-type="submit"  style="margin-right: 1vh">查询</a-button>
+          <a-button @click="showModal" type="default"  style="margin-right: 1vh">保存</a-button>
         </a-form-item>
       </a-form>
       <!--查询高级查询方案-->

+ 2 - 2
jeecgboot-vue3/src/locales/lang/zh-CN/sys.ts

@@ -67,8 +67,8 @@ export default {
     signUpFormTitle: '注册',
     forgetFormTitle: '重置密码',
 
-    signInTitle: 'Jeecg Boot',
-    signInDesc: '是中国最具影响力的 企业级低代码平台!在线开发,可视化拖拽设计,零代码实现80%的基础功能~',
+    signInTitle: 'LTTC——Web',
+    signInDesc: '鲁泰移动web平台',
     policy: '我同意敲敲云隐私政策',
     scanSign: `扫码后,即可完成登录`,
     scanSuccess: `扫码成功,登录中`,

+ 2 - 2
jeecgboot-vue3/src/views/baseservice/advancedSearch/AdvancedSearchList.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <div>
+    <a-card :bordered="false">
       <a-row>
         <a-col :span="12">
           <LTTCBaseServiceAdvancedSearch
@@ -17,7 +17,7 @@
           />
         </a-col>
       </a-row>
-    </div>
+    </a-card>
     <!--引用表格-->
     <BasicTable @register="registerTable" :rowSelection="rowSelection">
       <!--插槽:table标题-->

+ 2 - 2
jeecgboot-vue3/src/views/sys/login/TokenLoginPage.vue

@@ -5,7 +5,7 @@
             <div class="app-loading-dots">
                 <span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
             </div>
-            <div class="app-loading-title">JeecgBoot 企业级低代码平台</div>
+            <div class="app-loading-title">LTTC 移动web平台</div>
         </div>
     </div>
 </template>
@@ -215,4 +215,4 @@
         }
     }
 
-</style>
+</style>

+ 20 - 13
jeecgboot-vue3/src/views/system/menu/components/AppPermissionTree.vue

@@ -75,10 +75,9 @@ const props = defineProps({
 // 计算当前选中的 appId 对应的 label
 const selectedAppName = ref('');
 function setAppName() {
-  if (!appId || !props.appList || props.appList?.length < 1) return '基础平台';
+  if (!appId || !props.appList || props.appList?.length < 1) return ' ';
   if (props.appList.length > 0) {
-    const selectedApp = props.appList.find((app) => app.value === appId.value);
-    console.log('selectedAppName', selectedApp.label);
+    const selectedApp = props.appList.find((app) => app.value === appId.value)
     return selectedApp ? selectedApp.label : '';
   }
 }
@@ -119,8 +118,11 @@ async function loadData() {
   try {
     loading.value = true;
     treeType.value = 'role';
-    treeData.value = await loadTreeData(appId.value);
-    selectedAppName.value = setAppName();
+    // if(appId.value){
+      treeData.value = await loadTreeData(appId.value);
+      selectedAppName.value = setAppName();
+    // }
+    
 
     await nextTick();
     toggleExpandAll(true);
@@ -191,6 +193,9 @@ function clearTree() {
 
 async function loadTreeData(appId) {
   try {
+    if(!appId){
+      return [];
+    }
     const { treeList } = await queryTreeList({ appId });
     return translateTitle(treeList);
   } catch (error) {
@@ -245,15 +250,16 @@ async function onSubmit() {
 /**
  * 选中节点,打开数据权限抽屉
  */
-function onTreeNodeSelect(key) {
-  if (key && key.length > 0) {
-    selectedKeys.value = key;
-  }
-  if (tabType.value === 'role') {
-    openDataRuleDrawer(true, { functionId: unref(selectedKeys)[0], selectId: unref(selectId), ruleType: unref(tabType) });
+function onTreeNodeSelect(key,{selectedNodes}) {
+ 
+  if(key[0]&&selectedNodes[0].ruleFlag){
+    if (tabType.value === 'role') {
+    openDataRuleDrawer(true, { functionId: key[0], selectId: unref(selectId), ruleType: unref(tabType) });
   } else {
-    openDataRuleDrawer(true, { functionId: unref(selectedKeys)[0], selectId: unref(selectId), ruleType: unref(tabType) });
+    openDataRuleDrawer(true, { functionId: key[0], selectId: unref(selectId), ruleType: unref(tabType) });
+  }
   }
+  // onExpand(key)
   toggleExpandAll(true);
 }
 
@@ -301,6 +307,7 @@ function onCheck(o, e) {
 // tree展开事件
 function onExpand($expandedKeys) {
   expandedKeys.value = $expandedKeys;
+  // expandedKeys.value =  [...new Set([...expandedKeys.value, ...$expandedKeys])];
 }
 
 // tree选中事件
@@ -339,4 +346,4 @@ async function toggleCheckALL(flag) {
 .rule-tree :deep(.scrollbar__bar) {
   pointer-events: none;
 }
-</style>
+</style>

+ 28 - 6
jeecgboot-vue3/src/views/system/menu/components/DataRuleDrawer.vue

@@ -10,7 +10,17 @@
 
             <a-col :span="24">
               <div style="width: 100%; margin-top: 15px">
-                <a-button @click="saveDataRuleForRole" type="primary" size="small"> <Icon icon="ant-design:save-outlined"></Icon>点击保存</a-button>
+                <a-popconfirm
+                  title="请注意,现未勾选任何数据权限!"
+                  :open="visible"
+                  @confirm="saveDataRuleForRole"
+                  @cancel="cancel"
+                  @openChange="handleVisibleChange"
+                >
+                <a-button  type="primary" size="small"> <Icon icon="ant-design:save-outlined"></Icon>点击保存</a-button>
+
+                  </a-popconfirm
+                >
               </div>
             </a-col>
           </a-row>
@@ -34,6 +44,10 @@ const selectId = ref('');
 const dataRuleList = ref([]);
 const dataRuleChecked = ref([]);
 const ruleType = ref('');
+const visible = ref<boolean>(false);
+const cancel = () => {
+  visible.value = false;
+};
 /**
  * 数据
  */
@@ -44,8 +58,8 @@ const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (
   functionId.value = data.functionId;
   //角色的id
   selectId.value = data.selectId;
-
   ruleType.value = data.ruleType;
+  visible.value = false;
 
   try {
     let params;
@@ -83,10 +97,7 @@ function reset() {
  * 提交
  */
 async function saveDataRuleForRole() {
-  if (!unref(dataRuleChecked) || unref(dataRuleChecked).length == 0) {
-    createMessage.warning('请注意,现未勾选任何数据权限!');
-    return;
-  }
+  visible.value = false;
   if (!unref(selectId)) {
     createMessage.warning('请先选择配置对象!');
     return;
@@ -111,4 +122,15 @@ async function saveDataRuleForRole() {
   //刷新列表
   emit('success');
 }
+
+const handleVisibleChange = (bool: boolean) => {
+  if(!bool){
+    visible.value = false;
+  }
+  if (!unref(dataRuleChecked) || unref(dataRuleChecked).length == 0 ) {
+    visible.value = true;
+  }else{
+    saveDataRuleForRole();
+  }
+};
 </script>

+ 22 - 9
jeecgboot-vue3/src/views/system/menu/components/PermissionLeftTable.vue

@@ -1,6 +1,7 @@
 <template>
-  <div style="margin-left: 2%">
-    <a-select ref="select" v-model:value="props.clickParam.appId" style="width: 40%" :options="props.appList" />
+  <div style="margin-left: 7%">
+    应用:<a-select ref="select" v-model:value="props.clickParam.appId" style="width: 31%" :options="props.appList" placeholder="暂无应用" />
+    <!-- <AppSelect style="width: 31%" :selectedApp="props.clickParam.appId" ></AppSelect> -->
   </div>
 
   <BasicTable @register="registerTable" :rowSelection="rowSelection" />
@@ -12,14 +13,15 @@ import type { SelectProps } from 'ant-design-vue';
 import { BasicTable, useTable } from '/@/components/Table';
 // import { JSelectInput } from '/@/components/Form';
 import { useListPage } from '/@/hooks/system/useListPage';
-import { list as roleList } from '../../role/role.api';
+import { list as getroleList } from '../../role/role.api';
 import { roleColumns, userColumns, roleSchema, userSchema } from '../permission/permission.data';
-import { list as userList } from '../../user/user.api';
+import { listNoCareTenant as getuserList } from '../../user/user.api';
+// import AppSelect from './AppSelect.vue';
 
 const props = defineProps({
   appList: {
     type: Object,
-    default: () => [],
+    default: undefined,
   },
   clickParam: {
     type: Object,
@@ -35,6 +37,7 @@ type Key = string | number;
 const appList = ref<SelectProps['options']>([]);
 const handleClick = () => {
   emit('update:clickParam', { ...props.clickParam, appId: appId.value });
+  setProps({ api: appId.value ? (tabType.value === 'role' ? getroleList : getuserList) : undefined, dataSource: appId.value ? undefined : [] });
   reload();
 };
 
@@ -44,7 +47,8 @@ watch(tabType, () => deleteSelect());
 // 列表页面公共参数、方法
 const { prefixCls, tableContext } = useListPage({
   tableProps: {
-    api: tabType.value === 'role' ? roleList : userList,
+    api: appId.value ? (tabType.value === 'role' ? getroleList : getuserList) : undefined,
+    dataSource: appId.value ? undefined : [],
     columns: tabType.value === 'role' ? roleColumns : userColumns,
     size: 'small',
     pagination: true,
@@ -56,8 +60,14 @@ const { prefixCls, tableContext } = useListPage({
     showActionColumn: false,
     tableSetting: { fullScreen: true },
     beforeFetch: (params) => {
-      console.log('提交前的app', appId.value);
       params.appId = appId.value;
+      //模糊查询
+      if(params.roleName){
+        params.roleName ='*'+ params.roleName.trim()+'*';
+      }
+      if(params.realname){
+        params.realname ='*'+ params.realname.trim()+'*';
+      }      
     },
     formConfig: {
       schemas: tabType.value === 'role' ? roleSchema : userSchema,
@@ -91,8 +101,11 @@ const { prefixCls, tableContext } = useListPage({
   },
 });
 //注册table
-const [registerTable, { reload, expandAll, collapseAll, getForm, deleteSelectRowByKey, getSelectRowKeys }, { rowSelection, selectedRowKeys }] =
-  tableContext;
+const [
+  registerTable,
+  { reload, setProps, expandAll, collapseAll, getForm, deleteSelectRowByKey, getSelectRowKeys },
+  { rowSelection, selectedRowKeys },
+] = tableContext;
 //取消选中行
 async function deleteSelect() {
   console.log('取消选中行');

+ 238 - 224
jeecgboot-vue3/src/views/system/menu/menu/index.vue

@@ -30,253 +30,267 @@
   </div>
 </template>
 <script lang="ts" name="system-menu" setup>
-  import { nextTick, ref,onMounted } from 'vue';
-  import { BasicTable, useTable, TableAction } from '/@/components/Table';
-  import { useListPage } from '/@/hooks/system/useListPage';
-  import { useDrawer } from '/@/components/Drawer';
-  import MenuDrawer from './MenuDrawer.vue';
-  import DataRuleList from '../components/DataRuleList.vue';
-  import { columns,searchFormSchema } from './menu.data';
-  import { list, deleteMenu, batchDeleteMenu } from './menu.api';
-  import { useDefIndexStore } from "@/store/modules/defIndex";
-  import { useI18n } from "/@/hooks/web/useI18n";
+import { nextTick, ref, onMounted, watch } from 'vue';
+import { BasicTable, useTable, TableAction } from '/@/components/Table';
+import { useListPage } from '/@/hooks/system/useListPage';
+import { useDrawer } from '/@/components/Drawer';
+import MenuDrawer from './MenuDrawer.vue';
+import DataRuleList from '../components/DataRuleList.vue';
+import { columns, searchFormSchema } from './menu.data';
+import { list, deleteMenu, batchDeleteMenu, appList as getAppList } from './menu.api';
+import { useDefIndexStore } from '@/store/modules/defIndex';
+import { useI18n } from '/@/hooks/web/useI18n';
 
-  const checkedKeys = ref<Array<string | number>>([]);
-  const showFooter = ref(true);
-  const [registerDrawer, { openDrawer }] = useDrawer();
-  const [registerDrawer1, { openDrawer: openDataRule }] = useDrawer();
-  const { t } = useI18n();
+const checkedKeys = ref<Array<string | number>>([]);
+const showFooter = ref(true);
+const [registerDrawer, { openDrawer }] = useDrawer();
+const [registerDrawer1, { openDrawer: openDataRule }] = useDrawer();
+const { t } = useI18n();
 
-  // 自定义菜单名称列渲染
-  columns[0].customRender = function ({text, record}) {
-    const isDefIndex = checkDefIndex(record)
-    if (isDefIndex) {
-      text += '(默认首页)'
+// 自定义菜单名称列渲染
+columns[0].customRender = function ({ text, record }) {
+  const isDefIndex = checkDefIndex(record);
+  if (isDefIndex) {
+    text += '(默认首页)';
+  }
+  // update-begin--author:liaozhiyang---date:20240306---for:【QQYUN-8379】菜单管理页菜单国际化
+  if (text.includes("t('") && t) {
+    return new Function('t', `return ${text}`)(t);
+  }
+  // update-end--author:liaozhiyang---date:20240306---for:【QQYUN-8379】菜单管理页菜单国际化
+  return text;
+};
+const appList = ref([]);
+import { useAppStore } from '/@/store/modules/app';
+const appStore = useAppStore();
+onMounted(async () => {
+  initHrefModal();
+  appList.value = await getAppList();
+});
+function initHrefModal() {
+  let params = appStore.getMessageHrefParams;
+  if (params) {
+    let anntId = params.id;
+    if (anntId) {
+      alert('消息跳转' + anntId);
     }
-    // update-begin--author:liaozhiyang---date:20240306---for:【QQYUN-8379】菜单管理页菜单国际化
-    if (text.includes("t('") && t) {
-      return new Function('t', `return ${text}`)(t);
+    let detailId = params.detailId;
+    if (detailId) {
+      alert('消息跳转' + detailId);
     }
-    // update-end--author:liaozhiyang---date:20240306---for:【QQYUN-8379】菜单管理页菜单国际化
-    return text
+    appStore.setMessageHrefParams('');
   }
+}
 
-  import { useAppStore } from '/@/store/modules/app';
-  const appStore = useAppStore();
-  onMounted(()=>{
-    initHrefModal();
-  });
-  function initHrefModal(){
-    let params = appStore.getMessageHrefParams;
-    if(params){
-      let anntId = params.id;
-      if(anntId){
-        alert('消息跳转'+anntId)
-      }
-      let detailId = params.detailId;
-      if(detailId){
-        alert('消息跳转'+detailId)
-      }
-        appStore.setMessageHrefParams('')
-    }
-  }
+watch(appList, () => loadData());
 
-  // 列表页面公共参数、方法
-  const { prefixCls, tableContext } = useListPage({
-    tableProps: {
-      title: '菜单列表',
-      api: list,
-      columns: columns,
-      size: 'small',
-      pagination: false,
-      isTreeTable: true,
-      expandIconColumnIndex:1,
-      striped: true,
-      useSearchForm: true,
-      showTableSetting: true,
-      bordered: true,
-      showIndexColumn: false,
-      tableSetting: { fullScreen: true },
-      formConfig: {
-        // update-begin--author:liaozhiyang---date:20230803---for:【QQYUN-5873】查询区域lablel默认居左
-        labelWidth:60,
-        owProps: { gutter: 24 },
-        // update-end--author:liaozhiyang---date:20230803---for:【QQYUN-5873】查询区域lablel默认居左
-        schemas: searchFormSchema,
-        autoAdvancedCol: 4,
-        baseColProps: { xs: 24, sm: 12, md: 6, lg: 6, xl: 6, xxl: 6 },
-        actionColOptions: { xs: 24, sm: 12, md: 6, lg: 6, xl: 6, xxl: 6 },
-      },
-      actionColumn: {
-        width: 120,
-      },
+function loadData() {
+  reload();
+}
+// 列表页面公共参数、方法
+const { prefixCls, tableContext } = useListPage({
+  tableProps: {
+    title: '菜单列表',
+    api: list,
+    columns: columns,
+    immediate: false,
+    beforeFetch: (params) => {
+      if (appList.value.length > 0) {
+        const ids = appList.value.map((item) => item.id);
+        const idsString = ids.join(',');
+        params.ids = idsString;
+      }
     },
-  });
-  //注册table数据
-  const [registerTable, { reload, expandAll, collapseAll,getForm }] = tableContext;
+    size: 'small',
+    pagination: false,
+    isTreeTable: true,
+    expandIconColumnIndex: 1,
+    striped: true,
+    useSearchForm: true,
+    showTableSetting: true,
+    bordered: true,
+    showIndexColumn: false,
+    tableSetting: { fullScreen: true },
+    formConfig: {
+      // update-begin--author:liaozhiyang---date:20230803---for:【QQYUN-5873】查询区域lablel默认居左
+      labelWidth: 70,
+      owProps: { gutter: 24 },
+      // update-end--author:liaozhiyang---date:20230803---for:【QQYUN-5873】查询区域lablel默认居左
+      schemas: searchFormSchema,
+      autoAdvancedCol: 4,
+      baseColProps: { xs: 24, sm: 12, md: 6, lg: 6, xl: 6, xxl: 6 },
+      actionColOptions: { push:1,xs: 24, sm: 12, md: 6, lg: 6, xl: 6, xxl: 6 },
+    },
+    actionColumn: {
+      width: 120,
+    },
+  },
+});
+//注册table数据
+const [registerTable, { reload, expandAll, collapseAll, getForm }] = tableContext;
 
-  /**
-   * 选择列配置
-   */
-  const rowSelection = {
-    type: 'checkbox',
-    columnWidth: 25,
-    selectedRowKeys: checkedKeys,
-    onChange: onSelectChange,
-  };
+/**
+ * 选择列配置
+ */
+const rowSelection = {
+  type: 'checkbox',
+  columnWidth: 25,
+  selectedRowKeys: checkedKeys,
+  onChange: onSelectChange,
+};
 
-  /**
-   * 选择事件
-   */
-  function onSelectChange(selectedRowKeys: (string | number)[]) {
-    checkedKeys.value = selectedRowKeys;
-  }
+/**
+ * 选择事件
+ */
+function onSelectChange(selectedRowKeys: (string | number)[]) {
+  checkedKeys.value = selectedRowKeys;
+}
 
-  /**
-   * 新增
-   */
-  function handleCreate() {
-    showFooter.value = true;
-    let {getFieldsValue} = getForm();
-    openDrawer(true, {
-      record: {  appId:getFieldsValue().appId?getFieldsValue().appId:'0' },
-      isUpdate: false,
-    });
-  }
+/**
+ * 新增
+ */
+function handleCreate() {
+  showFooter.value = true;
+  let { getFieldsValue } = getForm();
+  openDrawer(true, {
+    record: { appId: getFieldsValue().appId ? getFieldsValue().appId : '0' },
+    isUpdate: false,
+  });
+}
 
-  /**
-   * 编辑
-   */
-  function handleEdit(record) {
-    showFooter.value = true;
-    openDrawer(true, {
-      record,
-      isUpdate: true,
-    });
-  }
-  /**
-   * 详情
-   */
-  function handleDetail(record) {
-    showFooter.value = false;
-    openDrawer(true, {
-      record,
-      isUpdate: true,
-    });
-  }
-  /**
-   * 添加下级
-   */
-  function handleAddSub(record) {
-    openDrawer(true, {
-      record: { parentId: record.id, menuType: 1,appId:record.appId },
-      isUpdate: false,
-    });
-  }
-  /**
-   * 数据权限弹窗
-   */
-  function handleDataRule(record) {
-    openDataRule(true, { id: record.id });
-  }
+/**
+ * 编辑
+ */
+function handleEdit(record) {
+  showFooter.value = true;
+  openDrawer(true, {
+    record,
+    isUpdate: true,
+  });
+}
+/**
+ * 详情
+ */
+function handleDetail(record) {
+  showFooter.value = false;
+  openDrawer(true, {
+    record,
+    isUpdate: true,
+  });
+}
+/**
+ * 添加下级
+ */
+function handleAddSub(record) {
+  openDrawer(true, {
+    record: { parentId: record.id, menuType: 1, appId: record.appId },
+    isUpdate: false,
+  });
+}
+/**
+ * 数据权限弹窗
+ */
+function handleDataRule(record) {
+  openDataRule(true, { id: record.id });
+}
 
-  /**
-   * 删除
-   */
-  async function handleDelete(record) {
-    await deleteMenu({ id: record.id }, reload);
-  }
-  /**
-   * 批量删除事件
-   */
-  async function batchHandleDelete() {
-    await batchDeleteMenu({ ids: checkedKeys.value }, reload);
-  }
-  /**
-   * 成功回调
-   */
-  function handleSuccess() {
-    reload();
-    reloadDefIndex();
-  }
+/**
+ * 删除
+ */
+async function handleDelete(record) {
+  await deleteMenu({ id: record.id }, reload);
+}
+/**
+ * 批量删除事件
+ */
+async function batchHandleDelete() {
+  await batchDeleteMenu({ ids: checkedKeys.value }, reload);
+}
+/**
+ * 成功回调
+ */
+function handleSuccess() {
+  reload();
+  reloadDefIndex();
+}
 
-  function onFetchSuccess() {
-    // 演示默认展开所有表项
-    nextTick(expandAll);
-  }
+function onFetchSuccess() {
+  // 演示默认展开所有表项
+  nextTick(expandAll);
+}
 
-  // --------------- begin 默认首页配置 ------------
+// --------------- begin 默认首页配置 ------------
 
-  const defIndexStore = useDefIndexStore()
+const defIndexStore = useDefIndexStore();
 
-  // 设置默认主页
-  async function handleSetDefIndex(record: Recordable) {
-    defIndexStore.update(record.url, record.component, record.route)
-  }
+// 设置默认主页
+async function handleSetDefIndex(record: Recordable) {
+  defIndexStore.update(record.url, record.component, record.route);
+}
 
-  /**
-   * 检查是否为默认主页
-   * @param record
-   */
-  function checkDefIndex(record: Recordable) {
-    return defIndexStore.check(record.url)
-  }
+/**
+ * 检查是否为默认主页
+ * @param record
+ */
+function checkDefIndex(record: Recordable) {
+  return defIndexStore.check(record.url);
+}
 
-  // 重新加载默认首页配置
-  function reloadDefIndex() {
-    try {
-      defIndexStore.query();
-    } catch (e) {
-      console.error(e)
-    }
+// 重新加载默认首页配置
+function reloadDefIndex() {
+  try {
+    defIndexStore.query();
+  } catch (e) {
+    console.error(e);
   }
+}
 
-  reloadDefIndex()
+reloadDefIndex();
 
-  // --------------- end 默认首页配置 ------------
+// --------------- end 默认首页配置 ------------
 
-  /**
-   * 操作栏
-   */
-  function getTableAction(record) {
-    return [
-      {
-        label: '编辑',
-        onClick: handleEdit.bind(null, record),
-      },
-    ];
-  }
+/**
+ * 操作栏
+ */
+function getTableAction(record) {
+  return [
+    {
+      label: '编辑',
+      onClick: handleEdit.bind(null, record),
+    },
+  ];
+}
 
-  /**
-   * 下拉操作栏
-   */
-  function getDropDownAction(record) {
-    return [
-      // {
-      //   label: '详情',
-      //   onClick: handleDetail.bind(null, record),
-      // },
-      {
-        label: '添加下级',
-        onClick: handleAddSub.bind(null, record),
-      },
-      {
-        label: '数据规则',
-        onClick: handleDataRule.bind(null, record),
-      },
-      {
-        label: '设为默认首页',
-        onClick: handleSetDefIndex.bind(null, record),
-        ifShow: () => !record.internalOrExternal && record.component && !checkDefIndex(record),
-      },
-      {
-        label: '删除',
-        color: 'error',
-        popConfirm: {
-          title: '是否确认删除',
-          confirm: handleDelete.bind(null, record),
-        },
+/**
+ * 下拉操作栏
+ */
+function getDropDownAction(record) {
+  return [
+    // {
+    //   label: '详情',
+    //   onClick: handleDetail.bind(null, record),
+    // },
+    {
+      label: '添加下级',
+      onClick: handleAddSub.bind(null, record),
+    },
+    {
+      label: '数据规则',
+      onClick: handleDataRule.bind(null, record),
+    },
+    {
+      label: '设为默认首页',
+      onClick: handleSetDefIndex.bind(null, record),
+      ifShow: () => !record.internalOrExternal && record.component && !checkDefIndex(record),
+    },
+    {
+      label: '删除',
+      color: 'error',
+      popConfirm: {
+        title: '是否确认删除',
+        confirm: handleDelete.bind(null, record),
       },
-    ];
-  }
+    },
+  ];
+}
 </script>

+ 12 - 8
jeecgboot-vue3/src/views/system/menu/menu/menu.api.ts

@@ -2,7 +2,7 @@ import { defHttp } from '/@/utils/http/axios';
 import { Modal } from 'ant-design-vue';
 
 enum Api {
-  list = '/sys/permission/list',
+  list = '/sys/permission/sqlList',
   save = '/sys/permission/add',
   edit = '/sys/permission/edit',
   delete = '/sys/permission/delete',
@@ -15,7 +15,7 @@ enum Api {
   checkPermDuplication = '/sys/permission/checkPermDuplication',
   queryUserPermission = '/sys/permission/queryUserPermission',
   saveUserPermission = '/sys/permission/saveUserPermission',
-  appList = '/sys/permission/appList',
+  appList = '/sys/applicationInfo/appList',
   queryByUser = '/sys/permission/queryByUser',
   queryDataRule = '/sys/permission/datarule',
 }
@@ -102,7 +102,7 @@ export const getCheckPermDuplication = (params) => defHttp.get({ url: Api.checkP
  * @param schema
  * @param required
  */
-export const checkPermDuplication=(model, schema, required?)=>{
+export const checkPermDuplication = (model, schema, required?) => {
   return [
     {
       validator: (_, value) => {
@@ -113,14 +113,18 @@ export const checkPermDuplication=(model, schema, required?)=>{
           return Promise.reject(`请输入${schema.label}`);
         }
         return new Promise<void>((resolve, reject) => {
+          let url = model.url.trim();
+          if (!url.startsWith('/')) {
+            url = '/' + url;
+          }
           getCheckPermDuplication({
             id: model.id,
-            url:model.url,
-            alwaysShow:model.alwaysShow
+            url: url,
+            alwaysShow: model.alwaysShow
           }).then((res) => {
-              res.success ? resolve() : reject(res.message || '校验失败');
+            res.success ? resolve() : reject(res.message || '校验失败');
           }).catch((err) => {
-              reject(err.message || '验证失败');
+            reject(err.message || '验证失败');
           });
         });
       },
@@ -153,7 +157,7 @@ export const queryByUser = (params) => defHttp.get({ url: Api.queryByUser, param
 /**
  * 查询数据规则
  */
-export const queryDataRule = (params) =>defHttp.get({ url: `${Api.queryDataRule}/${params.functionId}` , params});
+export const queryDataRule = (params) => defHttp.get({ url: `${Api.queryDataRule}/${params.functionId}`, params });
 
 // /**
 //  * 查询用户数据规则

+ 12 - 7
jeecgboot-vue3/src/views/system/menu/menu/menu.data.ts

@@ -2,7 +2,8 @@ import { BasicColumn } from '/@/components/Table';
 import { FormSchema } from '/@/components/Table';
 import { h } from 'vue';
 import { Icon } from '/@/components/Icon';
-import { ajaxGetDictItems, checkPermDuplication } from './menu.api';
+
+import { ajaxGetDictItems, checkPermDuplication,appList as getAppList } from './menu.api';
 import { render } from '/@/utils/common/renderUtils';
 
 const isDir = (type) => type === 0;
@@ -67,18 +68,20 @@ export const searchFormSchema: FormSchema[] = [
   {
     label: '应用',
     field: 'appId',
-    component: 'JDictSelectTag',
+    component: 'ApiSelect',
     componentProps: {
-      dictCode: 'app_base_info,name,id',
+      api: getAppList,
+      labelField: 'name',
+      valueField: 'id',
       placeholder: '请选择应用',
     },
-    colProps: { span: 6 },
+    
   },
   {
     field: 'name',
     label: '菜单名称',
     component: 'Input',
-    colProps: { span: 6 },
+    
   },
 ];
 
@@ -92,9 +95,11 @@ export const formSchema: FormSchema[] = [
   {
     label: '应用',
     field: 'appId',
-    component: 'JDictSelectTag',
+    component: 'ApiSelect',
     componentProps: {
-      dictCode: 'app_base_info,name,id',
+      api: getAppList,
+      labelField: 'name',
+      valueField: 'id',
       placeholder: '请选择应用',
     },
   },

+ 37 - 28
jeecgboot-vue3/src/views/system/menu/permission/permission.vue

@@ -1,18 +1,27 @@
 <template>
   <div class="p-4">
-    
-      <a-row :class="['p-4', `${prefixCls}--box`]" type="flex" :gutter="10">
+    <a-row :class="['p-4', `${prefixCls}--box`]" type="flex" :gutter="10">
       <a-col :xl="12" :lg="24" :md="24" style="margin-bottom: 10px">
         <div style="height: 100%" :class="[`${prefixCls}`]">
           <a-tabs @change="handleTabChange">
-            <a-tab-pane tab="角色授权" key="role-info"  style="position: relative">
+            <a-tab-pane tab="角色授权" key="role-info" style="position: relative">
               <div style="padding: 20px">
-                <PermissionLeftTable  :clickParam="clickParam" @update:clickParam="selectIdUpdate" :appList="appList" @update:appList="appListUpdated" />
+                <PermissionLeftTable
+                  :clickParam="clickParam"
+                  @update:clickParam="selectIdUpdate"
+                  :appList="appList"
+                  @update:appList="appListUpdated"
+                />
               </div>
             </a-tab-pane>
             <a-tab-pane tab="用户授权" key="user-info">
               <div style="padding: 20px">
-                <PermissionLeftTable :clickParam="clickParam" @update:clickParam="selectIdUpdate" :appList="appList" @update:appList="appListUpdated"/>
+                <PermissionLeftTable
+                  :clickParam="clickParam"
+                  @update:clickParam="selectIdUpdate"
+                  :appList="appList"
+                  @update:appList="appListUpdated"
+                />
               </div>
             </a-tab-pane>
           </a-tabs>
@@ -21,19 +30,16 @@
       <a-col :xl="12" :lg="24" :md="24" style="margin-bottom: 10px">
         <div style="height: 100%" :class="[`${prefixCls}`]">
           <div style="padding: 20px">
-            <AppPermissionTree  :clickParam="clickParam" :appList="appList"/>
+            <AppPermissionTree :clickParam="clickParam" :appList="appList" />
           </div>
-          
         </div>
       </a-col>
     </a-row>
-    
-    
   </div>
 </template>
   
   <script lang="ts" setup name="system-menu-permission">
-import { provide, reactive, ref, watch, nextTick, onMounted,onBeforeMount } from 'vue';
+import { provide, reactive, ref, watch, nextTick, onMounted, onBeforeMount } from 'vue';
 import type { SelectProps } from 'ant-design-vue';
 import { useDesign } from '/@/hooks/web/useDesign';
 import { appList as getAppList } from '../menu/menu.api';
@@ -42,17 +48,16 @@ import PermissionLeftTable from '../components/PermissionLeftTable.vue';
 
 const { prefixCls } = useDesign('menu-manage');
 provide('prefixCls', prefixCls);
-// const appList = ref([]);
 const appList = ref<SelectProps['options']>([]);
 
 //当前选中的条件信息
-const clickParam = reactive({ appId: '0', tabType: 'role', selectId: '' });
+const clickParam = reactive({ appId: '', tabType: 'role', selectId: '' });
 
 const selectIdUpdate = (newClickParam) => {
   clickParam.selectId = newClickParam.selectId;
 };
 const appListUpdated = (newAppList) => {
-  appList.value = newAppList
+  appList.value = newAppList;
 };
 //切换页签清空树选中
 const handleTabChange = (key: string) => {
@@ -61,30 +66,34 @@ const handleTabChange = (key: string) => {
   } else if (key === 'user-info') {
     clickParam.tabType = 'user'; // 用户授权对应的 tabType
   }
-  clickParam.selectId = ''
+  clickParam.selectId = '';
   console.log('切换页签app-----' + clickParam.appId);
 };
 
-// onMounted( async() => {
-//   await nextTick();
-//   console.log('appList-----3', appList.value);
-// });
 onBeforeMount(async () => {
-  console.log('appList-----1', appList.value);
   loadApp();
 });
 async function loadApp() {
-  const apps = await getAppList(); 
-  const appOptions = apps.map(app => {
-    return { 
-        value: app.id, 
-        label: app.name 
+  const apps = await getAppList();
+  if (!apps) {
+    appList.value = undefined;
+    return;
+  }
+  const appOptions = apps.map((app) => {
+    return {
+      value: app.id,
+      label: app.name,
     };
-});
+  });
+  const hasJCPT = appOptions.some((option) => option.value === '0');
+  if (hasJCPT) {
+    clickParam.appId = '0';
+  } else {
+    clickParam.appId = appOptions[0].value;
+  }
 
-appList.value = appOptions;
-console.log('appList-----' ,appList.value);
-await nextTick();
+  appList.value = appOptions;
+  await nextTick();
 }
 </script>
   

+ 1 - 8
jeecgboot-vue3/src/views/system/menu/report/report.api.ts

@@ -10,12 +10,5 @@ enum Api {
 * @param params
 */
 export const report = (params) => {
-    // const formparam = {
-    //     type: params.type,
-    //     sysPermission: params.sysPermission || {},
-    //   };
-    console.log(params);
-    return defHttp.get({
-        url: Api.report, params
-    }, { isTransformResponse: false });
+    return defHttp.get({ url: Api.report, params }, { isTransformResponse: false });
 }

+ 6 - 23
jeecgboot-vue3/src/views/system/menu/report/report.data.ts

@@ -1,14 +1,17 @@
 import { BasicColumn } from '/@/components/Table';
 import { FormSchema } from '/@/components/Table';
+import { appList  } from '../menu/menu.api';
 
 
 export const formSchema: FormSchema[] = [
     {
         label: '应用',
         field: 'appId',
-        component: 'JDictSelectTag',
+        component: 'ApiSelect',
         componentProps: {
-            dictCode: 'app_base_info,name,id',
+            api: appList,
+            labelField: 'name',
+            valueField: 'id',
             placeholder: '请选择应用',
         },
 
@@ -26,27 +29,7 @@ export const formSchema: FormSchema[] = [
         component: 'Input',
 
     },
-    // {
-    //     label: '菜单',
-    //     field: 'menu',
-    //     component: 'Input',
-    //     colProps: { span: 5 },
-    // },
-    // {
-    //     label: '权限类型',
-    //     field: 'menuType',
-    //     component: 'JDictSelectTag',
-    //     componentProps: {
-    //         dictCode: 'menu_type',
-    //         type: 'select'
-    //         // options: [
-    //         //     { label: '一级菜单', value: 0 },
-    //         //     { label: '子菜单', value: 1 },
-    //         //     { label: '按钮/权限', value: 2 },
-    //         //   ],
-    //     },
-    //     colProps: { span: 6 },
-    // },
+    
 
 ]
 

+ 17 - 6
jeecgboot-vue3/src/views/system/menu/report/report.vue

@@ -1,5 +1,4 @@
 <template>
-  
   <a-card style="margin: 10px">
     <BasicForm @register="registerForm" @submit="handleSubmit" />
     <a-tabs @change="handleTabChange" type="card">
@@ -25,6 +24,7 @@ import { useDesign } from '/@/hooks/web/useDesign';
 import { useListPage } from '/@/hooks/system/useListPage';
 import { BasicForm, useForm } from '/@/components/Form/index';
 import { formSchema, roleColumns, userColumns } from './report.data';
+import { appList } from '../menu/menu.api';
 import { report } from './report.api';
 const { prefixCls } = useDesign('menu-report');
 provide('prefixCls', prefixCls);
@@ -33,9 +33,9 @@ const loading = ref<boolean>(false);
 const roleReport = ref([]);
 const userReport = ref([]);
 const tabtype = ref('role');
-
+const apps = ref<any>([]);
 //表单配置
-const [registerForm] = useForm({
+const [registerForm,] = useForm({
   schemas: formSchema,
   autoSubmitOnEnter: true,
   baseColProps: {
@@ -54,19 +54,28 @@ const [registerForm] = useForm({
     xl: 6,
     xxl: 6,
   },
-  
 });
 
 // 初始化报表数据
 onBeforeMount(async () => {
-  await fetchReportData('role', {});
+  const applist = await appList();
+  if (!applist) {
+    return;
+  }
+  apps.value = applist;
+  const ids = applist.map((item) => item.id).join(',');
+  await fetchReportData('role', { appIds: ids });
 });
 
 // 根据页签变化获取数据
 async function handleTabChange(key: string) {
   try {
     loading.value = true;
-    await fetchReportData(key, {});
+    if(!apps.value){
+      return;
+    }
+    const ids = apps.value.map((item) => item.id).join(',');
+    await fetchReportData(key, { appIds: ids });
   } finally {
     tabtype.value = key;
     loading.value = false;
@@ -76,11 +85,13 @@ async function handleTabChange(key: string) {
 // 获取报表数据
 async function fetchReportData(type: string, params: object) {
   try {
+    const ids = apps.value.map((item) => item.id).join(',');
     const formparam = {
       type: type,
       permission: params.permission || '',
       appId: params.appId || '',
       business: params.business || '',
+      appIds: params.appIds  ||ids ||'',
     };
     const response = await report(formparam);
     if (type === 'role') {

+ 2 - 1
jeecgboot-vue3/src/views/system/ossfile/index.vue

@@ -273,7 +273,8 @@ function handleAddOnes() {
 function isPreviewSupported(url) {
   const imageExtensions = [
     '.jpg', '.jpeg', '.png', '.gif',
-    '.bmp', '.tiff', '.webp', '.svg', '.ico'
+    '.bmp', '.tiff', '.webp', '.svg', '.ico',
+    '.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx', '.pdf'
   ];
   const urlLower = url.toLowerCase();
   return imageExtensions.some(ext => urlLower.endsWith(ext));

+ 39 - 6
jeecgboot-vue3/src/views/system/role/index.vue

@@ -35,7 +35,7 @@
   <RoleIndexModal @register="registerIndexModal" />
 </template>
 <script lang="ts" name="system-role" setup>
-import { ref } from 'vue';
+import { ref, onMounted, watch } from 'vue';
 import { BasicTable, TableAction } from '/@/components/Table';
 import { useDrawer } from '/@/components/Drawer';
 import { useModal } from '/@/components/Modal';
@@ -45,7 +45,8 @@ import RolePermissionDrawer from './components/RolePermissionDrawer.vue';
 import RoleIndexModal from './components/RoleIndexModal.vue';
 import RoleUserTable from './components/RoleUserTable.vue';
 import { columns, searchFormSchema } from './role.data';
-import { list, deleteRole, batchDeleteRole, getExportUrl, getImportUrl } from './role.api';
+import { list as getrolelist, deleteRole, batchDeleteRole, getExportUrl, getImportUrl } from './role.api';
+import { appList } from '../menu/menu/menu.api';
 import { useListPage } from '/@/hooks/system/useListPage';
 const showFooter = ref(true);
 const [roleUserDrawer, { openDrawer: openRoleUserDrawer }] = useDrawer();
@@ -53,15 +54,25 @@ const [registerDrawer, { openDrawer }] = useDrawer();
 const [registerIndexModal, { openModal: openIndexModal }] = useModal();
 const [rolePermissionDrawer, { openDrawer: openRolePermissionDrawer }] = useDrawer();
 const [registerDesc, { openDrawer: openRoleDesc }] = useDrawer();
+const apps = ref([]);
+onMounted(async () => {
+  apps.value = await appList();
+});
+watch(apps, () => loadData());
+
+function loadData() {
+  reload();
+}
 
 // 列表页面公共参数、方法
 const { prefixCls, tableContext, onImportXls, onExportXls } = useListPage({
   designScope: 'role-template',
   tableProps: {
     title: '系统角色列表',
-    api: list,
+    api: getrolelist,
     columns: columns,
     striped: true,
+    immediate: false,
     formConfig: {
       labelWidth: 65,
       rowProps: { gutter: 24 },
@@ -76,6 +87,29 @@ const { prefixCls, tableContext, onImportXls, onExportXls } = useListPage({
       column: 'createTime',
       order: 'desc',
     },
+    beforeFetch: (params) => {
+      if (params.appId == null && apps.value.length > 0) {
+        const ids = apps.value.map((item) => item.id);
+        const idsString = ids.join(',');
+        params.appId = idsString;
+      }
+      //模糊查询
+      if(params.roleName){
+        params.roleName ='*'+ params.roleName.trim()+'*';
+      }
+      if(params.roleCode){
+        params.roleCode ='*'+ params.roleCode.trim()+'*';
+      } 
+    },
+    afterFetch: (record) => {
+      const app = apps.value;
+      record.forEach((item) => {
+        // 获取当前角色的appName
+        const rightApp = app.find((m) => m.id === item.appId);
+        item.appName = rightApp ? rightApp.name : '';
+      });
+      return record;
+    },
   },
   exportConfig: {
     name: '角色列表',
@@ -132,7 +166,7 @@ async function batchHandleDelete() {
  * 角色授权弹窗
  */
 function handlePerssion(record) {
-  openRolePermissionDrawer(true, { roleId: record.id,appId: record.appId,appName: record.appName });
+  openRolePermissionDrawer(true, { roleId: record.id, appId: record.appId, appName: record.appName });
 }
 /**
  * 首页配置弹窗
@@ -152,7 +186,7 @@ function handleUser(record) {
  */
 function getTableAction(record) {
   return [
-  {
+    {
       label: '授权',
       onClick: handlePerssion.bind(null, record),
     },
@@ -160,7 +194,6 @@ function getTableAction(record) {
       label: '分配用户',
       onClick: handleUser.bind(null, record),
     },
-    
   ];
 }
 

+ 1 - 1
jeecgboot-vue3/src/views/system/role/role.api.ts

@@ -2,7 +2,7 @@ import { defHttp } from '/@/utils/http/axios';
 import { Modal } from 'ant-design-vue';
 
 enum Api {
-  list = '/sys/role/list',
+  list = '/sys/role/listByApp',
   listByTenant = '/sys/role/listByTenant',
   save = '/sys/role/add',
   edit = '/sys/role/edit',

+ 24 - 22
jeecgboot-vue3/src/views/system/role/role.data.ts

@@ -1,6 +1,7 @@
 
 import { FormSchema } from '/@/components/Table';
 import { isRoleExist } from './role.api';
+import { appList } from '../menu/menu/menu.api';
 export const columns = [
   {
     title: '所属应用',
@@ -51,11 +52,12 @@ export const searchFormSchema: FormSchema[] = [
   {
     label: '应用',
     field: 'appId',
-    component: 'JDictSelectTag',
+    component: 'ApiSelect',
     componentProps: {
-      dictCode: 'app_base_info,name,id',
+      api: appList,
+      labelField: 'name',
+      valueField: 'id',
       placeholder: '请选择应用',
-      
     },
     colProps: { span: 6 },
   },
@@ -92,11 +94,11 @@ export const searchUserFormSchema: FormSchema[] = [
     field: 'deptId',
     label: '部门',
     component: 'JSelectDept',
-    componentProps:{
-      labelKey:'departName',
-      multiple:false,
-      rowKey:'id'
-  },
+    componentProps: {
+      labelKey: 'departName',
+      multiple: false,
+      rowKey: 'id'
+    },
     colProps: { span: 15 },
   },
 ];
@@ -114,11 +116,11 @@ export const searchUsermodelSchema: FormSchema[] = [
     field: 'deptId',
     label: '部门',
     component: 'JSelectDept',
-    componentProps:{
-      labelKey:'departName',
-      multiple:false,
-      rowKey:'id'
-  },
+    componentProps: {
+      labelKey: 'departName',
+      multiple: false,
+      rowKey: 'id'
+    },
     colProps: { span: 12, },
   },
   {
@@ -127,17 +129,17 @@ export const searchUsermodelSchema: FormSchema[] = [
     component: 'Input',
     colProps: { span: 12 },
   },
-  
+
 ];
 
 export const onCleanCode = (formRef: any) => {
   console.log('cleanCode');
-  console.log('formRef.value',formRef);
+  console.log('formRef.value', formRef);
   if (formRef) {
     formRef.setFieldsValue({
       roleCode: '',
     })
-    console.log('formRef.value',formRef.validate);
+    console.log('formRef.value', formRef.validate);
 
   }
 };
@@ -161,7 +163,7 @@ export const formSchema: FormSchema[] = [
         onCleanCode();
       },
     },
-    
+
   },
 
   {
@@ -175,14 +177,14 @@ export const formSchema: FormSchema[] = [
     label: '角色编码',
     required: true,
     component: 'Input',
-    componentProps: {placeholder: '请先选择应用'},
-    
+    componentProps: { placeholder: '请先选择应用' },
+
     dynamicDisabled: ({ values }) => {
       return !values.appId;
     },
     dynamicRules: ({ values, model }) => {
       console.log('values:', values);
-      
+
       return [
         {
           required: true,
@@ -190,14 +192,14 @@ export const formSchema: FormSchema[] = [
             if (!value) {
               return Promise.reject('请输入角色编码');
             }
-            
+
             if (values) {
               // console.log('values:', values.appId);
               // if (!values.appId) {
               //   return Promise.reject('请先选择应用');
               // }
               return new Promise((resolve, reject) => {
-                isRoleExist({ id: model.id, roleCode: value ,appId:model.appId})
+                isRoleExist({ id: model.id, roleCode: value, appId: model.appId })
                   .then((res) => {
                     res.success ? resolve() : reject(res.message || '校验失败');
                   })

+ 7 - 2
jeecgboot-vue3/src/views/system/user/UserDrawer.vue

@@ -16,7 +16,7 @@
   import { BasicForm, useForm } from '/@/components/Form/index';
   import { formSchema } from './user.data';
   import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
-  import { saveOrUpdateUser, getUserRoles, getUserDepartList, getAllRolesListNoByTenant, getAllRolesList } from './user.api';
+  import { saveOrUpdateUser, getUserRoles, getUserDepartList, queryallGroupByApp } from './user.api';
   import { useDrawerAdaptiveWidth } from '/@/hooks/jeecg/useAdaptiveWidth';
   import { getTenantId } from "/@/utils/auth";
 
@@ -78,6 +78,9 @@
     }
     //处理角色用户列表情况(和角色列表有关系)
     data.selectedroles && (await setFieldsValue({ selectedroles: data.selectedroles }));
+    //角色列表分组
+    const roleList = await queryallGroupByApp();
+    console.log("roleList",roleList)
     //编辑时隐藏密码/角色列表隐藏角色信息/我的部门时隐藏所属部门
     updateSchema([
       {
@@ -107,7 +110,9 @@
         //update-begin---author:wangshuai ---date:20230424  for:【issues/4844】多租户模式下,新增或编辑用户,选择角色一栏,角色选项没有做租户隔离------------
         //判断是否为多租户模式
         componentProps:{
-          api: data.tenantSaas?getAllRolesList:getAllRolesListNoByTenant
+          // api: data.tenantSaas?getAllRolesList:getAllRolesListNoByTenant
+          //多应用情况下采用分组下拉框显示角色
+          options:roleList
         }
         //update-end---author:wangshuai ---date:20230424  for:【issues/4844】多租户模式下,新增或编辑用户,选择角色一栏,角色选项没有做租户隔离------------
       },

+ 14 - 7
jeecgboot-vue3/src/views/system/user/index.vue

@@ -27,14 +27,17 @@
         </a-card>
       </div>
       <div style="display: flex; flex-direction: column; width: 1350px;">
-        <div>
-          <LTTCBaseServiceAdvancedSearch
-            :fieldOptions="dataFields"
-            :rawData="rawData"
-            @update:searchedConditions="handleSearchedDataUpdate"
-            @update:searchedDataReset="handleSortedDataUpdate"
-          />
+        <div style="flex: 1; padding-top: 10px;padding-left: 10px; padding-right: 10px;">
+          <a-card :bordered="false" :bodyStyle = cardBodyStyle>
+            <LTTCBaseServiceAdvancedSearch
+              :fieldOptions="dataFields"
+              :rawData="rawData"
+              @update:searchedConditions="handleSearchedDataUpdate"
+              @update:searchedDataReset="handleSortedDataUpdate"
+            />
+          </a-card>
         </div>
+
         <div>
           <BasicTable @register="registerTable" :rowSelection="rowSelection" style="flex: 4; height: 100%">
             <!-- 插槽: table标题 -->
@@ -593,6 +596,10 @@
     handleExportXls("用户列表", getExportUrl, { queries: JSON.stringify(queries.value)})
 
   }
+  const cardBodyStyle = {
+    padding: '0px',
+  };
+
 
 </script>
 

+ 7 - 9
jeecgboot-vue3/src/views/system/user/user.data.ts

@@ -95,7 +95,7 @@ export const searchFormSchema: FormSchema[] = [
     label: '名字',
     field: 'realname',
     component: 'JInput',
-   //colProps: { span: 6 },
+    //colProps: { span: 6 },
   },
   {
     label: '性别',
@@ -123,7 +123,7 @@ export const searchFormSchema: FormSchema[] = [
       placeholder: '请选择状态',
       stringToNumber: true,
     },
-   //colProps: { span: 6 },
+    //colProps: { span: 6 },
   },
 ];
 
@@ -147,7 +147,7 @@ export const formSchema: FormSchema[] = [
     label: '登录密码',
     field: 'password',
     component: 'StrengthMeter',
-    componentProps:{
+    componentProps: {
       autocomplete: 'new-password',
     },
     rules: [
@@ -192,13 +192,11 @@ export const formSchema: FormSchema[] = [
   {
     label: '角色',
     field: 'selectedroles',
-    component: 'ApiSelect',
+    component: 'Select',
     componentProps: {
       mode: 'multiple',
-      api: getAllRolesListNoByTenant,
-      labelField: 'roleName',
-      valueField: 'id',
-      immediate: false,
+      options: [{}],
+      fieldNames: { label: 'label', value: 'value', options: 'roleList' }
     },
   },
   {
@@ -222,7 +220,7 @@ export const formSchema: FormSchema[] = [
             },
           ]);
           //update-begin---author:wangshuai---date:2024-05-11---for:【issues/1222】用户编辑界面“所属部门”与“负责部门”联动出错整---
-          if(!values){
+          if (!values) {
             formModel.departIds = [];
             return;
           }

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác