Browse Source

Merge remote-tracking branch 'origin/dev' into dev

danch 5 days ago
parent
commit
d5824a9c02
37 changed files with 366 additions and 191 deletions
  1. 24 15
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/AppmanageController.java
  2. 3 2
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysRoleController.java
  3. 1 1
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/entity/AppmanageEntity/APP_Register_workFlow_FormEntity.java
  4. 4 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/entity/SysUserPermission.java
  5. 1 5
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/AppBaseInfoMapper.java
  6. 21 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/AppCustomMapper.java
  7. 1 1
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysRoleMapper.java
  8. 5 5
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/AppBaseInfoMapper.xml
  9. 3 0
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysRoleMapper.xml
  10. 4 4
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/AppmanageService.java
  11. 1 1
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/ISysRoleService.java
  12. 98 89
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/AppmanageServiceImpl.java
  13. 2 2
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysRoleServiceImpl.java
  14. 78 8
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/util/AppManageUtil.java
  15. 0 1
      jeecg-boot/jeecg-server-cloud/jflow-cloud-start/src/main/java/org/jeecg/JeecgJflowCloudApplication.java
  16. 3 3
      jeecg-boot/jflow-core/src/main/java/bp/difference/client/SystemClient.java
  17. 26 0
      jeecg-boot/jflow-core/src/main/java/bp/sys/BuessUnitAfterAppCheckPass.java
  18. 20 1
      jeecg-boot/jflow-core/src/main/java/bp/sys/base/Glo.java
  19. 11 12
      jeecg-boot/jflow-core/src/main/java/bp/wf/WorkNode.java
  20. 1 9
      jeecg-boot/jflow-core/src/main/java/bp/wf/httphandler/WF_Comm.java
  21. 1 1
      jeecgboot-vue3/jflow-vue-core/assets/GPN_Emp-57dc0d67.js
  22. 1 1
      jeecgboot-vue3/jflow-vue-core/assets/GPN_Emp-c3891a55.js
  23. 0 0
      jeecgboot-vue3/jflow-vue-core/assets/TreeEns_Dept2Emp-1adb0fbf.js
  24. 0 0
      jeecgboot-vue3/jflow-vue-core/assets/TreeEns_Dept2Emp-f31e8155.js
  25. 0 0
      jeecgboot-vue3/jflow-vue-core/assets/TreeEns_FlowSort2Flow-211db7d6.js
  26. 0 0
      jeecgboot-vue3/jflow-vue-core/assets/TreeEns_FlowSort2Flow-f61eb57f.js
  27. 0 0
      jeecgboot-vue3/jflow-vue-core/assets/TreeEns_FrmSort2Frm-1d2f3bc0.js
  28. 0 0
      jeecgboot-vue3/jflow-vue-core/assets/TreeEns_FrmSort2Frm-98f3d82c.js
  29. 0 0
      jeecgboot-vue3/jflow-vue-core/assets/TreeEns_TemplateSort2Template-63b1f209.js
  30. 0 0
      jeecgboot-vue3/jflow-vue-core/assets/TreeEns_TemplateSort2Template-b5f22e48.js
  31. 4 1
      jeecgboot-vue3/src/views/appmanage/AppBaseInfo.api.ts
  32. 6 8
      jeecgboot-vue3/src/views/appmanage/AppInfoList.vue
  33. 3 4
      jeecgboot-vue3/src/views/appmanage/addForm/Step1.vue
  34. 17 11
      jeecgboot-vue3/src/views/appmanage/addForm/Step4.vue
  35. 14 3
      jeecgboot-vue3/src/views/appmanage/addForm/data.tsx
  36. 2 1
      jeecgboot-vue3/src/views/system/role/components/RoleUserTable.vue
  37. 11 2
      jeecgboot-vue3/src/views/system/role/index.vue

+ 24 - 15
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/AppmanageController.java

@@ -1,5 +1,8 @@
 package org.jeecg.modules.system.controller;
 
+import com.alibaba.fastjson.JSON;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
@@ -11,10 +14,9 @@ import org.jeecg.modules.system.entity.AppmanageEntity.*;
 import org.jeecg.modules.system.service.AppmanageService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import springfox.documentation.spring.web.json.Json;
+
+import java.util.*;
 
 /**
  * 功能描述
@@ -44,7 +46,6 @@ public class AppmanageController {
     @ApiOperation("删除应用信息")
     @PostMapping("/delete")
     public Result<Boolean> deleteAppInfo(@RequestBody String[] infos){
-        System.out.println("来到删除信息:"+ Arrays.toString(infos));
         return Result.ok(appInfoService.deleteAppInfo(infos));
     }
 
@@ -152,12 +153,6 @@ public class AppmanageController {
     }
 
 
-    // 判断当前登录用户是否为信息部用户
-    @GetMapping("/isInfoUser")
-    public Result<Boolean> isInfoUser(){
-        return Result.ok(appInfoService.isInfoUser());
-    }
-
     // 是否拥有平台应用管理员角色
     @GetMapping("/isAppAdmin")
     public Result<Boolean> isAppAdmin(){
@@ -184,10 +179,24 @@ public class AppmanageController {
     }
 
     // 应用注册审核通过后续处理(微服务调用)
-    @GetMapping("/afterAppCheckPass")
-    public <T> void afterAppCheckPass(@RequestParam("appid")String appid, @RequestParam("formData") T formData){
-        System.out.println("应用注册审核通过后续处理:"+formData);
-        appInfoService.afterAppCheckPass(appid, formData);
+    @PostMapping("/afterAppCheckPass")
+    public void afterAppCheckPass(@RequestBody Long id) {
+        System.out.println("应用注册审核通过后续处理:"+id);
+        try {
+            appInfoService.afterAppCheckPass(id);
+        }catch (Exception e){
+            System.out.println("应用注册审核通过后续处理错误:"+e);
+
+        }
+    }
+
+    @GetMapping("/appNameIsExist")
+    public Result<String> AppNameIsExist(String appName){
+        boolean b = appInfoService.AppNameIsExist(appName);
+        if (b){
+            return Result.error("应用名称已存在");
+        }
+        return Result.ok("检查通过");
     }
 
     // 应用注册流程被撤销 后续处理(微服务调用)

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

@@ -476,10 +476,11 @@ public class SysRoleController {
 		//------------------------------------------------------------------------------------------------
 		
 		// Step.1 组装查询条件
-		QueryWrapper<SysRole> queryWrapper = QueryGenerator.initQueryWrapper(sysRole, request.getParameterMap());
+//		QueryWrapper<SysRole> queryWrapper = QueryGenerator.initQueryWrapper(sysRole, request.getParameterMap());
+		String ids = request.getParameter("ids");
 		//Step.2 AutoPoi 导出Excel
 		ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
-		List<SysRole> pageList = sysRoleService.listExport(sysRole);
+		List<SysRole> pageList = sysRoleService.listExport(sysRole,ids);
 		//导出文件名称
 		mv.addObject(NormalExcelConstants.FILE_NAME,"角色列表");
 		mv.addObject(NormalExcelConstants.CLASS,SysRole.class);

+ 1 - 1
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/entity/AppmanageEntity/APP_Register_workFlow_FormEntity.java

@@ -32,7 +32,7 @@ public class APP_Register_workFlow_FormEntity {
     private String createBy;
     private String createTime;
     private String addType;
-    private int info_status;
+    private int infoStatus;
 
     // 文档信息部分
     private String requirement;

+ 4 - 0
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/entity/SysUserPermission.java

@@ -63,4 +63,8 @@ public class SysUserPermission implements Serializable {
         this.userId = userId;
         this.permissionId = permissionId;
     }
+
+    public SysUserPermission() {
+
+    }
 }

+ 1 - 5
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/AppBaseInfoMapper.java

@@ -50,11 +50,7 @@ public interface AppBaseInfoMapper extends BaseMapper<AppBaseInfo> {
             "check_user = #{baseInfo.checkUser}, " +
             "check_time = #{baseInfo.checkTime}, " +
             "check_tag = #{baseInfo.checkTag}, " +
-            "create_by = #{baseInfo.createBy}, " +
-            "create_time = #{baseInfo.createTime}, " +
-            "add_type = #{baseInfo.addType}, " +
-            "info_status = #{baseInfo.info_status}, " +
-            "del_flag = #{baseInfo.delFlag} " +
+            "info_Status = #{baseInfo.infoStatus}, " +
             "</set>" +
             "WHERE id = #{baseInfo.id}" +
             "</script>")

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

@@ -1,6 +1,7 @@
 package org.jeecg.modules.system.mapper;
 
 import org.apache.ibatis.annotations.*;
+import org.jeecg.modules.system.entity.AppmanageEntity.APP_Register_workFlow_FormEntity;
 import org.jeecg.modules.system.entity.AppmanageEntity.AppBaseInfo;
 import org.jeecg.modules.system.entity.AppmanageEntity.AppUserInfo;
 import org.jeecg.modules.system.entity.SysPermission;
@@ -25,6 +26,10 @@ public interface AppCustomMapper {
     @Select("SELECT username FROM sys_user WHERE id = #{userId}")
     String queryUsernameByUserId(@Param("userId") String userId);
 
+    // 通过用户账号查询用户id
+    @Select("SELECT id FROM sys_user WHERE username = #{username}")
+    String queryUserIdByUsername(@Param("username") String username);
+
     AppBaseInfo queryBaseInfoById(@Param("id") String id);
 
     List<AppUserInfo> queryAppUserByIdList(@Param("ids") List<String> ids);
@@ -84,4 +89,20 @@ public interface AppCustomMapper {
     @Update("UPDATE port_stationtype SET Name = #{appName} WHERE No = #{id}")
     void updateRoleToPortstationtype(@Param("id") String id, @Param("appName") String Name);
 
+    // 查询应用注册简易流程携带的表单数据
+    @Select("SELECT id, name, type, status, admin, developUser, operationUser, requirementUser, businessUser, menuInfo, descr, Register_type AS addType " +
+            "FROM app_base_info_flow WHERE OID = #{workid}")
+    AppBaseInfo queryEasyFlowFormData(@Param("workid") Long workid);
+
+    // 查询应用注册完整流程携带的表单数据
+    @Select("SELECT * FROM app_detail_info_workflow where OID = #{workid}")
+    APP_Register_workFlow_FormEntity queryFullFlowFormData(@Param("workid") Long workid);
+
+    // 检查应用名称是否在应用信息表或流程表里已经存在(多表查询 查询 app_base_info, app_base_info_flow, app_detail_info_workflow 里的name属性是否有符合的)
+    @Select({"SELECT 1 FROM app_base_info WHERE name = #{appName} and del_flag = 0 UNION",
+            "SELECT 1 FROM wf_empworks where workid = (SELECT OID FROM app_base_info_flow WHERE name = #{appName}) UNION",
+            "SELECT 1 FROM wf_empworks where workid = (SELECT OID FROM app_detail_info_workflow WHERE name = #{appName})"})
+    Integer checkAppNameIsExist(@Param("appName") String appName);
+
+
 }

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

@@ -76,7 +76,7 @@ public interface SysRoleMapper extends BaseMapper<SysRole> {
     @Select("select count(*) from sys_role where id=#{id} and tenant_id=#{tenantId}")
     Long getRoleCountByTenantId(@Param("id") String id, @Param("tenantId") Integer tenantId);
 
-    List<SysRole> listExport(@Param("role") SysRole role);
+    List<SysRole> listExport(@Param("role") SysRole role, @Param("ids")String ids);
 
     List<String> listRoleIdsByAppId(@Param("appId") String appId);
 

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

@@ -6,11 +6,11 @@
         SELECT app.id, app.name, app.type, app.status, app.create_time, app.add_type, suserA.realname as admin, app.admin as adminid, suserA.phone as contact, suserB.realname as developUser,
         suserC.realname as businessUser, suserD.realname as requirementUser, suserE.realname as operationUser
         FROM app_base_info app
-        LEFT JOIN sys_user suserA ON app.admin = suserA.id
-        LEFT JOIN sys_user suserB ON app.develop_user = suserB.id
-        LEFT JOIN sys_user suserC ON app.business_user = suserC.id
-        LEFT JOIN sys_user suserD ON app.requirement_user = suserD.id
-        LEFT JOIN sys_user suserE ON app.operation_user = suserE.id
+        LEFT JOIN sys_user suserA ON app.admin = suserA.username
+        LEFT JOIN sys_user suserB ON app.develop_user = suserB.username
+        LEFT JOIN sys_user suserC ON app.business_user = suserC.username
+        LEFT JOIN sys_user suserD ON app.requirement_user = suserD.username
+        LEFT JOIN sys_user suserE ON app.operation_user = suserE.username
         WHERE 1=1 and app.del_flag = 0 and info_status != 0
         <if test="key != null and key != ''">
             AND app.name LIKE CONCAT('%', #{key}, '%')

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

@@ -57,6 +57,9 @@
         INNER JOIN
         app_base_info sa ON r.app_id = sa.id
         WHERE 1=1
+          <if test="ids!=null">
+            AND r.id in (#{ids})
+        </if>
         <if test="role.appId!=null">
             AND r.app_id = #{role.appId}
         </if>

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

@@ -54,9 +54,6 @@ public interface AppmanageService  {
     // 获取应用用户id集合
     List<String> getAppuserids(String appid);
 
-    // 是否为信息部用户
-    boolean isInfoUser();
-
     // 当前登录用户是否拥有平台应用管理员
     boolean isAppAdmin();
 
@@ -66,8 +63,11 @@ public interface AppmanageService  {
     // 是否为应用管理员或开发负责人、运维负责人
     boolean isAppAdminOrDevOrOpe(String appid);
 
-    <T> void afterAppCheckPass(String appid, T formData);
+    void afterAppCheckPass(Long id);
 
     void afterUnsendAppRegisterFlow(long workID);
+
+    // 查询应用名称是否已经存在流程里或者应用信息表里
+    Boolean AppNameIsExist(String appName);
 }
 

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

@@ -80,5 +80,5 @@ public interface ISysRoleService extends IService<SysRole> {
      */
     void checkAdminRoleRejectDel(String ids);
 
-    List<SysRole> listExport(SysRole role);
+    List<SysRole> listExport(SysRole role,String ids);
 }

+ 98 - 89
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/AppmanageServiceImpl.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.system.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import org.apache.shiro.SecurityUtils;
+import org.checkerframework.checker.units.qual.A;
 import org.jeecg.common.api.dto.message.TemplateMessageDTO;
 import org.jeecg.common.constant.CommonConstant;
 import org.jeecg.common.system.query.QueryGenerator;
@@ -10,6 +11,7 @@ import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.RedisUtil;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.base.service.BaseCommonService;
+import org.jeecg.modules.jmreport.common.util.DateUtils;
 import org.jeecg.modules.system.controller.SysUserController;
 import org.jeecg.modules.system.entity.*;
 import org.jeecg.modules.system.entity.AppmanageEntity.*;
@@ -53,6 +55,10 @@ public class AppmanageServiceImpl implements AppmanageService {
     @Autowired
     private ISysRolePermissionService sysRolePermissionService;
 
+    // 给用户授权用
+    @Autowired
+    private ISysUserPermissionService sysUserPermissionService;
+
     // 添加菜单用
     @Autowired
     private ISysPermissionService sysPermissionService;
@@ -112,20 +118,9 @@ public class AppmanageServiceImpl implements AppmanageService {
         LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         appBaseInfo.setCreateBy(loginUser.getId());
         appBaseInfo.setAddType(appInfo.getAddType());
-        appBaseInfo.setDelFlag(1);
+        appBaseInfo.setDelFlag(0);
         baseInfoMapper.insert(appBaseInfo);
 
-        // 提交至工作流的表单信息(将用户id换成用户账账号)
-        AppBaseInfo sendCheck_appBaseInfo = appBaseInfo;
-        sendCheck_appBaseInfo.setAdmin(customMapper.queryUsernameByUserId(appBaseInfo.getAdmin()));
-        if (appBaseInfo.getDevelopUser()!=null)
-            sendCheck_appBaseInfo.setDevelopUser(customMapper.queryUsernameByUserId(appBaseInfo.getDevelopUser()));
-        if (appBaseInfo.getOperationUser()!=null)
-            sendCheck_appBaseInfo.setOperationUser(customMapper.queryUsernameByUserId(appBaseInfo.getOperationUser()));
-        if (appBaseInfo.getRequirementUser()!=null)
-            sendCheck_appBaseInfo.setRequirementUser(customMapper.queryUsernameByUserId(appBaseInfo.getRequirementUser()));
-        if (appBaseInfo.getBusinessUser()!=null)
-            sendCheck_appBaseInfo.setBusinessUser(customMapper.queryUsernameByUserId(appBaseInfo.getBusinessUser()));
         AppDocInfo appDocInfo = appInfo.getAppDocInfoDTO();
         boolean hasEnvInfo = false;
         if (appInfo.getAppEnvInfoDTO()!=null) hasEnvInfo = appInfo.getAppEnvInfoDTO().size()>0;
@@ -133,7 +128,7 @@ public class AppmanageServiceImpl implements AppmanageService {
         String appid = appBaseInfo.getId();
         // 简易注册模式下添加基础信息即可
         if (appBaseInfo.getAddType().equals("easy")){
-             tag = appManageUtil.sendCheckWordFlow(sendCheck_appBaseInfo, "021", loginUser.getUsername(), "admin");
+             tag = appManageUtil.sendCheckWordFlow(appBaseInfo, "021", loginUser.getUsername(), "admin");
             // 发起流程失败则删除数据库内数据
             if (!tag){
                 customMapper.deleteAppBaseInfoNotLogic(appid);
@@ -143,7 +138,7 @@ public class AppmanageServiceImpl implements AppmanageService {
             APP_Register_workFlow_FormEntity appRegisterWorkFlowFormEntity = new APP_Register_workFlow_FormEntity();
             BeanUtils.copyProperties(appRegisterWorkFlowFormEntity, appDocInfo);
             // 基础信息最后一个复制,避免id为null
-            BeanUtils.copyProperties(appRegisterWorkFlowFormEntity, sendCheck_appBaseInfo);
+            BeanUtils.copyProperties(appRegisterWorkFlowFormEntity, appBaseInfo);
             if (hasEnvInfo){
                 AppManageUtil appManageUtil = new AppManageUtil();
                 appRegisterWorkFlowFormEntity = appManageUtil.TransitionEnvInfoToAppRegisterWorkFlowForm(appRegisterWorkFlowFormEntity, appInfo.getAppEnvInfoDTO());
@@ -191,14 +186,14 @@ public class AppmanageServiceImpl implements AppmanageService {
     @Transactional
     @Override
     public Boolean deleteAppInfo(String[] ids) {
-        // 需先判断用户是否拥有所删除的应用信息的权限(平台管理员-应用管理员)
+        // 需先判断用户是否拥有所删除的应用信息的权限(平台管理员-该应用的应用管理员)
         // 获取当前登录用户信息
         LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
 
-        // 查询当前应用的应用管理员信息
         for (String id : ids) {
             // 不能删除基础平台的应用信息
             if (id.equals("0")) return false;
+
             AppBaseInfo appBaseInfo = baseInfoMapper.selectById(id);
             if (!loginUser.getUsername().equals("admin")){
                 if (!(appBaseInfo.getAdmin().equals(loginUser.getId()))) return false;
@@ -248,7 +243,7 @@ public class AppmanageServiceImpl implements AppmanageService {
     @Override
     public Boolean editBaseInfo(AppBaseInfo baseInfo) {
         int i = baseInfoMapper.updateById(baseInfo);
-        customMapper.updateRoleToPortstationtype(baseInfo.getId(), baseInfo.getName());
+        if (baseInfo.getAddType().equals("full")) customMapper.updateRoleToPortstationtype(baseInfo.getId(), baseInfo.getName());
         // 保存成功解除反审核状态
         if (i>0) uncheckLock("AppbaseInfo"+baseInfo.getId());
         return i>0;
@@ -301,14 +296,10 @@ public class AppmanageServiceImpl implements AppmanageService {
     @Transactional
     public Boolean editUserInfo(AppUpdataUserInfo updataUserInfo) {
         String appid = updataUserInfo.getAppid();
-        // 移除应用用户时,将角色收回
+        // 移除应用用户时,将默认角色收回
         if (updataUserInfo.getDelUserids()!=null&&!updataUserInfo.getDelUserids().isEmpty()){
             updataUserInfo.getDelUserids().forEach(userid -> {
                 System.out.println("删除用户:"+userid);
-                // 获取要移除的用户的信息
-                QueryWrapper<AppUserInfo> userInfoPOQueryWrapper = new QueryWrapper<>();
-                userInfoPOQueryWrapper.eq("appid",appid).eq("userid",userid);
-                AppUserInfo userInfo = userInfoMapper.selectOne(userInfoPOQueryWrapper);
                 // 获取该用户在该应用下的角色信息
                 List<String> roleIds = sysUserRoleService.listByAppId(appid, userid);
                 // 删除该用户在该应用下的角色信息
@@ -357,7 +348,6 @@ public class AppmanageServiceImpl implements AppmanageService {
         return true;
     }
 
-
     /**
      * 组合条件查询应用基础信息
      * @param key 模糊查询关键字
@@ -411,7 +401,7 @@ public class AppmanageServiceImpl implements AppmanageService {
         // 获取当前登录用户
         LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         // 当前登录用户与当前应用的基础信息的应用管理员id是否一致
-        appBaseInfo.setIsEdit(appBaseInfo.getAdmin().equals(loginUser.getId()));
+        appBaseInfo.setIsEdit(hasEditCurrentInfoPermission(id));
         return appBaseInfo;
     }
 
@@ -464,19 +454,6 @@ public class AppmanageServiceImpl implements AppmanageService {
                         queryParams.getFilteruserids(),
                         queryParams.getPageNo());
 
-                // 判断当前用户是否可进行编辑操作
-                LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-                String managerId;
-                Map<String, String> appManagerUserInfo; // 应用管理员信息
-                // 先从 redis 查询应用管理员信息,如果为空,则查询数据库
-                appManagerUserInfo = (Map<String, String>) redisUtil.get("appManagerInfo");
-                if (appManagerUserInfo == null) {
-                    AppBaseInfo baseInfoPO = baseInfoMapper.selectById(queryParams.getAppid());
-                    managerId = baseInfoPO.getAdmin();
-                }else {
-                    managerId = appManagerUserInfo.get(queryParams.getAppid());
-                }
-                editUserInfoEntity.setIsEdit(loginUser.getId().equals(managerId));
                 AppBaseInfo appBaseInfo = baseInfoMapper.selectById(queryParams.getAppid());
                 // 查询用户角色信息
                 appUserInfos.forEach(map -> {
@@ -595,16 +572,6 @@ public class AppmanageServiceImpl implements AppmanageService {
         return null;
     }
 
-    // 是否为信息部用户
-    @Override
-    public boolean isInfoUser() {
-        String deptId = customMapper.queryDepartIdByDepartName("信息部");
-        // 获取当前登录用户id
-        LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        String udeptId = customMapper.queryDepartIdByUserId(loginUser.getId());
-        return deptId.equals(udeptId);
-    }
-
     @Override
     public boolean isAppAdmin() {
         // 获取当前登录用户
@@ -639,10 +606,8 @@ public class AppmanageServiceImpl implements AppmanageService {
         LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         // 如果是平台管理员
         if (loginUser.getUsername().equals("admin")) return true;
-        // 查询基础信息的应用管理员id,比较是否和当前登录用户一致
-        QueryWrapper<AppBaseInfo> baseInfoPOQueryWrapper = new QueryWrapper<>();
-        baseInfoPOQueryWrapper.select("admin").eq("id", appid);
-        AppBaseInfo baseInfo = baseInfoMapper.selectOne(baseInfoPOQueryWrapper);
+        // 查询应用管理员id,比较是否和当前登录用户一致
+        AppBaseInfo baseInfo = baseInfoMapper.selectById(appid);
         return loginUser.getId().equals(baseInfo.getAdmin());
     }
 
@@ -671,36 +636,31 @@ public class AppmanageServiceImpl implements AppmanageService {
 
 
     // 应用审核通过后续处理
-    public <T> void afterAppCheckPass(String appid, T formData) {
-
+    @Transactional
+    public void afterAppCheckPass(Long workid) {
+        String appid = null;
         try {
-            AppBaseInfo appBaseInfo = baseInfoMapper.queryAppBaseInfoById(appid);
-            appManageUtil.CompareOldAppBaseInfoAndNewAppBaseInfo(appBaseInfo, formData);
-            // 以通过审批的应用信息为准更新应用信息
-            int i = baseInfoMapper.updateBaseInfo(appBaseInfo);
-            String toUser = baseInfoMapper.queryUsernameById(appBaseInfo.getCreateBy());
-            //给申请注册应用信息的用户发送系统消息
-            TemplateMessageDTO message = new TemplateMessageDTO();
-            message.setAppId("0");
-            message.setToUser(toUser);
-            // 设置消息模板编码
-            message.setTemplateCode("app_examineAndapprove");
-            Map<String, String> templateParam = new HashMap<>();
-            templateParam.put("resultText","应用"+appBaseInfo.getName()+"注册审核通过");
-            message.setTemplateParam(templateParam);
-            sysBaseApi.sendTemplateAnnouncement(message);
-
-            // 该信息为完整注册时,通过审核后添加默认角色、菜单权限、菜单信息
-            if (appBaseInfo.getAddType().equals("full")){
+            AppBaseInfo baseInfoInFlow = customMapper.queryEasyFlowFormData(workid);
+            if (baseInfoInFlow == null){  // 完整注册需执行的操作
+                APP_Register_workFlow_FormEntity appRegisterWorkFlowForm = customMapper.queryFullFlowFormData(workid);
+                appid = appRegisterWorkFlowForm.getId();
+                baseInfoInFlow = appManageUtil.AppRegisterWorkFlowFormEntityToBaseInfo(appRegisterWorkFlowForm);
+                // 更新应用文档信息
+                AppDocInfo appDocInfo = appManageUtil.AppRegisterWorkFlowFormEntityToDocInfo(appRegisterWorkFlowForm);
+                editDocInfo(appDocInfo);
+                // 更新应用环境信息
+                AppEditEnvInfoEntity appEnvInfoList = appManageUtil.AppRegisterWorkFlowFormEntityToEnvInfo(appRegisterWorkFlowForm);
+                editEnvInfo(appEnvInfoList);
                 // 将通过完整注册的应用信息同步给JFlow的角色分类表
-                customMapper.addRoleToPortstationtype(appid, appBaseInfo.getName());
+                customMapper.addRoleToPortstationtype(appid, baseInfoInFlow.getName());
+
                 // 添加默认角色信息
                 SysRole role = new SysRole();
                 role.setAppId(appid);  // 设置角色所属应用信息
                 role.setRoleCode("default");  // 设置角色编码
-                role.setAppName(appBaseInfo.getName()) ;  // 设置角色的应用名称
-                role.setRoleName(appBaseInfo.getName()+"_默认用户角色");  // 设置角色名
-                role.setDescription(appBaseInfo.getName()+"默认角色");  // 设置备注
+                role.setAppName(baseInfoInFlow.getName()) ;  // 设置角色的应用名称
+                role.setRoleName(baseInfoInFlow.getName()+"_默认用户角色");  // 设置角色名
+                role.setDescription(baseInfoInFlow.getName()+"默认角色");  // 设置备注
                 sysRoleService.save(role);  // 添加角色
 
                 // 获取角色编码
@@ -710,39 +670,82 @@ public class AppmanageServiceImpl implements AppmanageService {
                 QueryWrapper<AppUserInfo> appUserInfoQueryWrapper = new QueryWrapper<>();
                 appUserInfoQueryWrapper.select("userid").eq("appid", appid);
                 List<AppUserInfo> appUserInfos = userInfoMapper.selectList(appUserInfoQueryWrapper);
-                List<String> useridlist = appUserInfos.stream().map(AppUserInfo::getUserid).collect(Collectors.toList());
-
-                // 应用默认角色分配给应用用户
-                SysUserRoleVO sysUserRoleVO = new SysUserRoleVO();
-                sysUserRoleVO.setRoleId(roleid);
-                sysUserRoleVO.setUserIdList(useridlist);
-                sysUserController.addSysUserRole(sysUserRoleVO);
+                if (!appUserInfos.isEmpty()){
+                    List<String> useridlist = appUserInfos.stream().map(AppUserInfo::getUserid).collect(Collectors.toList());
+                    // 应用默认角色分配给应用用户
+                    useridlist.forEach(userid -> {
+                        SysUserRole sysUserRole = new SysUserRole();
+                        sysUserRole.setRoleId(roleid);
+                        sysUserRole.setUserId(userid);
+                        sysUserRoleService.save(sysUserRole);
+                    });
+                }
 
                 // 创建该应用的一级菜单
-                SysPermission hassysPermission = customMapper.queryUrlByUrl(appBaseInfo.getMenuInfo());
+                SysPermission hassysPermission = customMapper.queryUrlByUrl(baseInfoInFlow.getMenuInfo());
                 if (hassysPermission == null){
                     SysPermission sysPermission = new SysPermission();
-                    sysPermission.setName(appBaseInfo.getName());
+                    sysPermission.setName(baseInfoInFlow.getName());
                     sysPermission.setAppId(appid);
-                    sysPermission.setUrl(appBaseInfo.getMenuInfo());
+                    sysPermission.setUrl(baseInfoInFlow.getMenuInfo());
                     // 设置组件(即 菜单路径去掉第一个 "/")
                     String component = sysPermission.getUrl().replaceFirst("^/", "");
                     sysPermission.setComponent(component);
                     sysPermission.setMenuType(0);
                     sysPermission.setRoute(true);
                     sysPermissionService.addPermission(sysPermission);
-                    // 授予应用默认角色访问一级菜单权限
-                    sysRolePermissionService.saveRolePermission(roleid, sysPermission.getId(),"");
+                    AfterCheckSaveUserPermission(baseInfoInFlow, sysPermission.getId());
+//                    sysRolePermissionService.saveRolePermission(roleid, sysPermission.getId());
                 }else {
-                    // 授予应用默认角色访问一级菜单权限
-                    sysRolePermissionService.saveRolePermission(roleid, hassysPermission.getId(),"");
+                    AfterCheckSaveUserPermission(baseInfoInFlow, hassysPermission.getId());
+//                    sysRolePermissionService.saveRolePermission(roleid, hassysPermission.getId());
                 }
+            }else {  // 简易注册需执行的操作
+                appid = baseInfoInFlow.getId();
             }
+            AfterCheckPublicOperation(appid,baseInfoInFlow);
         }catch (Exception e){
             System.out.println("应用审核通过后续处理错误:"+e);
+            baseCommonService.addLog("应用审核后续处理错误:"+workid+"__异常信息:"+e, CommonConstant.LOG_TYPE_4, 3 );
         }
     }
 
+    private void AfterCheckPublicOperation(String appid, AppBaseInfo baseInfo){
+        // 更新应用基础信息
+        baseInfo.setInfoStatus(1);
+        baseInfo.setCheckUser("admin");
+        baseInfo.setCheckTime(String.valueOf(DateUtils.getTimestamp()));
+        baseInfoMapper.updateBaseInfo(baseInfo);
+
+        // 给申请注册应用信息的用户发送系统消息
+        AppBaseInfo appBaseInfo = baseInfoMapper.queryAppBaseInfoById(appid);
+        String toUser = baseInfoMapper.queryUsernameById(appBaseInfo.getCreateBy());
+        TemplateMessageDTO message = new TemplateMessageDTO();
+        message.setAppId("0");
+        message.setToUser(toUser);
+        message.setTemplateCode("app_examineAndapprove");
+        Map<String, String> templateParam = new HashMap<>();
+        templateParam.put("resultText","应用"+appBaseInfo.getName()+"注册审核通过");
+        message.setTemplateParam(templateParam);
+        sysBaseApi.sendTemplateAnnouncement(message);
+    }
+
+    // 授予应用相关用户(管理员 开发负责人 运维负责人等)访问应用一级菜单权限
+    private void AfterCheckSaveUserPermission(AppBaseInfo appBaseInfo, String permissionid){
+        sysUserPermissionService.save(getSysUserPermission(appBaseInfo.getAdmin(), permissionid));
+        if (!Objects.equals(appBaseInfo.getBusinessUser(), "")){} sysUserPermissionService.save(getSysUserPermission(appBaseInfo.getBusinessUser(), permissionid));
+        if (!Objects.equals(appBaseInfo.getDevelopUser(), "")) sysUserPermissionService.save(getSysUserPermission(appBaseInfo.getDevelopUser(), permissionid));
+        if (!Objects.equals(appBaseInfo.getRequirementUser(), "")) sysUserPermissionService.save(getSysUserPermission(appBaseInfo.getBusinessUser(), permissionid));
+    }
+
+    private SysUserPermission getSysUserPermission(String username, String permissionId) {
+        String userId = customMapper.queryUserIdByUsername(username);
+        SysUserPermission sysUserPermission = new SysUserPermission();
+        sysUserPermission.setUserId(userId);
+        sysUserPermission.setPermissionId(permissionId);
+        return sysUserPermission;
+    }
+
     // 应用注册 撤销后续处理(删除插入的数据)
     @Override
     public void afterUnsendAppRegisterFlow(long workID) {
@@ -756,4 +759,10 @@ public class AppmanageServiceImpl implements AppmanageService {
             customMapper.deleteAppUserInfoNotLogic(appid);
         }
     }
+
+    @Override
+    public Boolean AppNameIsExist(String appName) {
+        Integer i = customMapper.checkAppNameIsExist(appName);
+        return i!= null;
+    }
 }

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

@@ -135,7 +135,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
     }
 
     @Override
-    public List<SysRole> listExport(SysRole role) {
-        return sysRoleMapper.listExport(role);
+    public List<SysRole> listExport(SysRole role, String ids) {
+        return sysRoleMapper.listExport(role,ids);
     }
 }

+ 78 - 8
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/util/AppManageUtil.java

@@ -7,19 +7,13 @@ import org.jeecg.common.system.util.JwtUtil;
 import org.jeecg.common.util.RedisUtil;
 import org.jeecg.common.util.SpringContextUtils;
 import org.jeecg.modules.client.AppManage.WorkFlowClient;
-import org.jeecg.modules.system.entity.AppmanageEntity.APP_Register_workFlow_FormEntity;
-import org.jeecg.modules.system.entity.AppmanageEntity.AppBaseInfo;
-import org.jeecg.modules.system.entity.AppmanageEntity.AppDocInfo;
-import org.jeecg.modules.system.entity.AppmanageEntity.AppEnvInfo;
+import org.jeecg.modules.system.entity.AppmanageEntity.*;
 import org.jeecg.modules.system.mapper.SysUserMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.lang.reflect.Field;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * 功能描述 应用管理工具类
@@ -68,6 +62,82 @@ public class AppManageUtil {
         return appRegisterWorkFlowForm;
     }
 
+    public AppBaseInfo AppRegisterWorkFlowFormEntityToBaseInfo(APP_Register_workFlow_FormEntity appRegisterWorkFlowForm){
+        AppBaseInfo appBaseInfo = new AppBaseInfo();
+        appBaseInfo.setId(appRegisterWorkFlowForm.getId());
+        appBaseInfo.setName(appRegisterWorkFlowForm.getName());
+        appBaseInfo.setType(appRegisterWorkFlowForm.getType());
+        appBaseInfo.setStatus(appRegisterWorkFlowForm.getStatus());
+        appBaseInfo.setAdmin(appRegisterWorkFlowForm.getAdmin());
+        appBaseInfo.setBusinessUser(appRegisterWorkFlowForm.getBusinessUser());
+        appBaseInfo.setRequirementUser(appRegisterWorkFlowForm.getRequirementUser());
+        appBaseInfo.setDevelopUser(appRegisterWorkFlowForm.getDevelopUser());
+        appBaseInfo.setOperationUser(appRegisterWorkFlowForm.getOperationUser());
+        appBaseInfo.setMenuInfo(appRegisterWorkFlowForm.getMenuInfo());
+        appBaseInfo.setDescr(appRegisterWorkFlowForm.getDescr());
+        return appBaseInfo;
+    }
+
+    public AppDocInfo AppRegisterWorkFlowFormEntityToDocInfo(APP_Register_workFlow_FormEntity appRegisterWorkFlowForm){
+        AppDocInfo appDocInfo = new AppDocInfo();
+        appDocInfo.setAppid(appRegisterWorkFlowForm.getId());
+        appDocInfo.setRequirement(appRegisterWorkFlowForm.getRequirement());
+        appDocInfo.setDesign(appRegisterWorkFlowForm.getDesign());
+        appDocInfo.setDev(appRegisterWorkFlowForm.getDev());
+        appDocInfo.setInstructions(appRegisterWorkFlowForm.getInstructions());
+        appDocInfo.setTest(appRegisterWorkFlowForm.getTest());
+        appDocInfo.setOther(appRegisterWorkFlowForm.getOther());
+        return appDocInfo;
+    }
+
+    public AppEditEnvInfoEntity AppRegisterWorkFlowFormEntityToEnvInfo(APP_Register_workFlow_FormEntity appRegisterWorkFlowForm){
+        AppEditEnvInfoEntity appEditEnvInfoEntity = new AppEditEnvInfoEntity();
+        appEditEnvInfoEntity.setAppid(appRegisterWorkFlowForm.getId());
+        AppEnvInfo appEnvInfo = new AppEnvInfo();
+        appEnvInfo.setAppid(appRegisterWorkFlowForm.getId());
+        // 设置测试环境信息
+        if (appRegisterWorkFlowForm.getTest_leadingIp()!=null){
+            appEnvInfo.setEnv("test");
+            appEnvInfo.setLeadingIp(appRegisterWorkFlowForm.getTest_leadingIp());
+            appEnvInfo.setBackendIp(appRegisterWorkFlowForm.getTest_backendIp());
+            appEnvInfo.setBackupFrequency(appRegisterWorkFlowForm.getTest_backupFrequency());
+            appEnvInfo.setBackupLocation(appRegisterWorkFlowForm.getTest_backupLocation());
+            appEnvInfo.setCodeUrl(appRegisterWorkFlowForm.getTest_codeUrl());
+            appEnvInfo.setConfigurationFile(appRegisterWorkFlowForm.getTest_configurationFile());
+            appEnvInfo.setDatabaseInfo(appRegisterWorkFlowForm.getTest_databaseInfo());
+            appEditEnvInfoEntity.getEnvInfo().add(appEnvInfo);
+        }
+
+        if (appRegisterWorkFlowForm.getProd_leadingIp()!=null){
+            // 设置生产环境信息
+            appEnvInfo.setEnv("prod");
+            appEnvInfo.setLeadingIp(appRegisterWorkFlowForm.getProd_leadingIp());
+            appEnvInfo.setBackendIp(appRegisterWorkFlowForm.getProd_backendIp());
+            appEnvInfo.setBackupFrequency(appRegisterWorkFlowForm.getProd_backupFrequency());
+            appEnvInfo.setBackupLocation(appRegisterWorkFlowForm.getProd_backupLocation());
+            appEnvInfo.setCodeUrl(appRegisterWorkFlowForm.getProd_codeUrl());
+            appEnvInfo.setConfigurationFile(appRegisterWorkFlowForm.getProd_configurationFile());
+            appEnvInfo.setDatabaseInfo(appRegisterWorkFlowForm.getProd_databaseInfo());
+            appEditEnvInfoEntity.getEnvInfo().add(appEnvInfo);
+        }
+
+
+        if (appRegisterWorkFlowForm.getDev_leadingIp()!=null){
+            // 设置开发环境信息
+            appEnvInfo.setEnv("dev");
+            appEnvInfo.setLeadingIp(appRegisterWorkFlowForm.getDev_leadingIp());
+            appEnvInfo.setBackendIp(appRegisterWorkFlowForm.getDev_backendIp());
+            appEnvInfo.setBackupFrequency(appRegisterWorkFlowForm.getDev_backupFrequency());
+            appEnvInfo.setBackupLocation(appRegisterWorkFlowForm.getDev_backupLocation());
+            appEnvInfo.setCodeUrl(appRegisterWorkFlowForm.getDev_codeUrl());
+            appEnvInfo.setConfigurationFile(appRegisterWorkFlowForm.getDev_configurationFile());
+            appEnvInfo.setDatabaseInfo(appRegisterWorkFlowForm.getDev_databaseInfo());
+            appEditEnvInfoEntity.getEnvInfo().add(appEnvInfo);
+        }
+
+        return appEditEnvInfoEntity;
+    }
+
     public static String getTemporaryToken() {
         RedisUtil redisUtil = SpringContextUtils.getBean(RedisUtil.class);
         //模拟登录生成临时Token

+ 0 - 1
jeecg-boot/jeecg-server-cloud/jflow-cloud-start/src/main/java/org/jeecg/JeecgJflowCloudApplication.java

@@ -26,7 +26,6 @@ public class JeecgJflowCloudApplication implements CommandLineRunner {
         for (String beanName : beanNames) {
             System.out.println(beanName);
         }
-        System.out.println("lalalala");
     }
 
     /**

+ 3 - 3
jeecg-boot/jflow-core/src/main/java/bp/difference/client/SystemClient.java

@@ -2,15 +2,15 @@ package bp.difference.client;
 
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 
 @FeignClient(value = "jeecg-system")
 public interface SystemClient {
 
     // 应用注册审核结束,对应用相关信息的后续处理
-    @GetMapping("/sys/applicationInfo/afterAppCheckPass")
-    <T> void afterAppCheckPass(@RequestParam("appid") String appid,
-                           @RequestParam("formData") T formData);
+    @PostMapping("/sys/applicationInfo/afterAppCheckPass")
+    void afterAppCheckPass(long id);
 
     // 注册应用流程撤销 后续处理的微服务调用
     @GetMapping("/sys/applicationInfo/afterUnsendAppRegisterFlow")

+ 26 - 0
jeecg-boot/jflow-core/src/main/java/bp/sys/BuessUnitAfterAppCheckPass.java

@@ -0,0 +1,26 @@
+package bp.sys;
+
+import bp.difference.BeanUtils;
+import bp.difference.client.SystemClient;
+import bp.sys.BuessUnitBase;
+/**
+ * 功能描述 BuessUnitAfterAppCheckPass
+ *
+ * @author: scott
+ * @date: 2024年12月17日 PM 3:50
+ */
+public class BuessUnitAfterAppCheckPass extends BuessUnitBase {
+
+    @Override
+    public String getTitle() {
+        return "应用审核通过后续处理";
+    }
+
+    @Override
+    public String DoIt()  {
+        SystemClient systemClient = BeanUtils.getBean(SystemClient.class);
+        systemClient.afterAppCheckPass(this.WorkID);
+        System.out.println("乌拉");
+        return null;
+    }
+}

+ 20 - 1
jeecg-boot/jflow-core/src/main/java/bp/sys/base/Glo.java

@@ -196,13 +196,32 @@ public class Glo
 	 */
 	public static BuessUnitBase GetBuessUnitEntityByEnName(String enName)
 	{
+		switch (enName){
+			case "业务单元测试":
+				enName = "bp.demo.BuessUnitDemo";
+				break;
+			case "应用审核通过后续处理":
+				enName = "bp.sys.BuessUnitAfterAppCheckPass";
+				break;
+			default:
+		}
 		if (Htable_BuessUnit == null || Htable_BuessUnit.isEmpty())
 		{
 			Htable_BuessUnit = new Hashtable();
 			ArrayList<BuessUnitBase> al = ClassFactory.GetObjects("BP.Sys.BuessUnitBase");
 			for (BuessUnitBase en : al)
 			{
-				Htable_BuessUnit.put(en.toString(), en);
+				int atIndex = en.toString().lastIndexOf('@');
+
+				if (atIndex != -1) {
+					String result = en.toString().substring(0, atIndex);
+					System.out.println(result);
+					Htable_BuessUnit.put(result, en);
+				} else {
+					System.out.println(en); // 如果没有找到@,则输出原始字符串
+					Htable_BuessUnit.put(en.toString(), en);
+				}
+
 			}
 		}
 

+ 11 - 12
jeecg-boot/jflow-core/src/main/java/bp/wf/WorkNode.java

@@ -9681,7 +9681,7 @@ public class WorkNode {
 				this.setStopFlow(true);
 				this.getHisGenerWorkFlow().setWFState(WFState.Complete);
 				this.rptGe.setWFState(WFState.Complete);
-				MicroserviceCall(); // 流程结束需要进行后续处理调用的微服务
+//				MicroserviceCall(); // 流程结束需要进行后续处理调用的微服务
 				String msg = this.getHisWorkFlow().DoFlowOver(ActionType.FlowOver, "流程已经走到最后一个节点,流程成功结束。", this.getHisNode(), this.rptGe);
 				this.addMsg(SendReturnMsgFlag.End, msg);
 			}
@@ -10545,16 +10545,15 @@ public class WorkNode {
 	}
 
 	private void MicroserviceCall(){
-		UserTokenContext.setToken(getTemporaryToken());
-		String tag = this.rptGe.getRow().GetValStrByKey("workFlowType");
-		switch (tag){
-			case "App_Register":  // 应用注册审批流程
-				SystemClient systemClient = BeanUtils.getBean(SystemClient.class);
-				String appid = this.rptGe.getRow().GetValStrByKey("id");
-				systemClient.afterAppCheckPass(appid, this.rptGe.getRow());
-				break;
-		}
-		UserTokenContext.remove();
+//		String tag = this.rptGe.getRow().GetValStrByKey("workFlowType");
+//		switch (tag){
+//			case "App_Register":  // 应用注册审批流
+//				SystemClient systemClient = BeanUtils.getBean(SystemClient.class);
+//				String appid = this.rptGe.getRow().GetValStrByKey("id");
+//				UserTokenContext.setToken(getTemporaryToken());
+//				systemClient.afterAppCheckPass(appid, this.rptGe.getRow());
+//				UserTokenContext.remove();
+//				break;
+//		}
 	}
-		///#endregion
 }

+ 1 - 9
jeecg-boot/jflow-core/src/main/java/bp/wf/httphandler/WF_Comm.java

@@ -4120,8 +4120,8 @@ public class WF_Comm extends DirectoryPageBase
 		ht.put("CustomerNo", SystemConfig.getCustomerNo());
 		ht.put("CustomerName", SystemConfig.getCustomerName());
 		ht.put("IsAdmin", WebUser.getIsAdmin() == true ? 1 : 0);
+//		ht.put("IsAdmin", 1);
 		ht.put("Token", WebUser.getToken()); //token.
-
 		ht.put("Tel", WebUser.getTel());
 		ht.put("OrgNo", WebUser.getOrgNo());
 		ht.put("OrgName", WebUser.getOrgName());
@@ -4137,15 +4137,7 @@ public class WF_Comm extends DirectoryPageBase
 		{
 			ht.put("IsAuthorize", "0");
 		}
-
-		//每次访问表很消耗资源.
-		//Port.WFEmp emp = new BP.Port.WFEmp(WebUser.getNo());
-		//ht.Add("Theme", emp.GetParaString("Theme"));
-
-
-		//增加运行模式. add by zhoupeng 2020.03.10 适应saas模式.
 		ht.put("CCBPMRunModel", SystemConfig.GetValByKey("CCBPMRunModel", "0"));
-
 		return Json.ToJson(ht);
 	}
 

+ 1 - 1
jeecgboot-vue3/jflow-vue-core/assets/GPN_Emp-57dc0d67.js

@@ -16,4 +16,4 @@ var c=Object.defineProperty;var N=(o,t,u)=>t in o?c(o,t,{enumerable:!0,configura
   #### \u5E2E\u52A9
    - \u4E5F\u79F0\u4E3A\u7B80\u5355\u9879\u76EE\u6216\u8005\u4E0D\u786E\u5B9A\u6027\u9879\u76EE\uFF0C\u6CA1\u6709\u6A21\u5F0F\u7684\u4E34\u65F6\u6027\u4EFB\u52A1\uFF0C
     - \u6BD4\u5982 \u7533\u62A5\u77E5\u8BC6\u4EA7\u6743\uFF0C\u627E\u51E0\u4E2A\u4EBA\u534F\u4F5C\u5B8C\u6210\uFF0C\u53EF\u4EE5\u6709\u56FA\u5B9A\u65F6\u9650\uFF0C\u6BCF\u4E2A\u5B50\u4EFB\u52A1\u5206\u7ED9\u4E0D\u540C\u7684\u4EBA\uFF0C\u5904\u7406\u5B8C\u6BD5\u540E\u9700\u8981\u6C47\u62A5\uFF0C\u8BA4\u53EF\uFF0C\u786E\u8BA4\uFF0C\u53EF\u4EE5\u6811\u5F62\u7ED3\u6784\u7684\u5206\u53D1\u6536\u56DE\uFF0C\u5B50\u4EFB\u52A1\u6570\u4E0D\u786E\u5B9A\u3002
-  `);this.PageTitle="\u65B0\u5EFA\u4EBA\u5458"}Init(){return m(this,null,function*(){if(i.IsAdmin==!1){w.error("err@\u60A8\u597D:"+i.Name+",\u975E\u7BA1\u7406\u5458\u7528\u6237\u4E0D\u80FD\u67E5\u770B.");return}const u=this.RequestVal("DeptNo");yield new y(u).Retrieve(),this.AddGroup("A","\u9009\u62E9\u65B9\u5F0F"),this.TextBox2_NameNo("Emp","\u65B0\u5EFA\u4EBA\u5458",this.Daily,"","\u767B\u5F55\u8D26\u53F7","\u4EBA\u5458\u540D\u79F0",""),this.SelectItemsByTreeEns("Imp","\u5BFC\u5165\u4EBA\u5458",this.Daily,!0,n.srcDeptLazily,"0",n.srcEmpLazily,"@No=\u8D26\u53F7@Name=\u540D\u79F0@Tel=\u7535\u8BDD")})}GenerSorts(){return m(this,null,function*(){return Promise.resolve([])})}Save_TextBox_X(u,p,C,A,s){return m(this,null,function*(){if(u==="Emp"){const r=this.RequestVal("DeptNo"),E=A,e=C,F=new d;return i.CCBPMRunModel==2&&(F.UserId=E,F.OrgNo=i.OrgNo),F.No=E,(yield F.IsExits())==!0?new D(a.Error,"\u4EBA\u5458\u7F16\u53F7["+E+"],\u5DF2\u7ECF\u5B58\u5728."):(F.FK_Dept=r,F.Name=e,yield F.Insert(),new D(a.GoToUrl,f.UrlEn("TS.Port.Emp",E)))}if(u==="Imp"){const r=this.RequestVal("DeptNo");C.split(",").forEach(e=>m(this,null,function*(){const F=new G(r+"_"+e);(yield F.RetrieveFromDBSources())==0&&(F.FK_Dept=r,F.FK_Emp=e,yield F.Insert())}))}})}}export{Cu as GPN_Emp};
+  `);this.PageTitle="\u65B0\u5EFA\u4EBA\u5458"}Init(){return m(this,null,function*(){/**if(i.IsAdmin==!1){w.error("err@\u60A8\u597D:"+i.Name+",\u975E\u7BA1\u7406\u5458\u7528\u6237\u4E0D\u80FD\u67E5\u770B.");return}**/const u=this.RequestVal("DeptNo");yield new y(u).Retrieve(),this.AddGroup("A","\u9009\u62E9\u65B9\u5F0F"),this.TextBox2_NameNo("Emp","\u65B0\u5EFA\u4EBA\u5458",this.Daily,"","\u767B\u5F55\u8D26\u53F7","\u4EBA\u5458\u540D\u79F0",""),this.SelectItemsByTreeEns("Imp","\u5BFC\u5165\u4EBA\u5458",this.Daily,!0,n.srcDeptLazily,"0",n.srcEmpLazily,"@No=\u8D26\u53F7@Name=\u540D\u79F0@Tel=\u7535\u8BDD")})}GenerSorts(){return m(this,null,function*(){return Promise.resolve([])})}Save_TextBox_X(u,p,C,A,s){return m(this,null,function*(){if(u==="Emp"){const r=this.RequestVal("DeptNo"),E=A,e=C,F=new d;return i.CCBPMRunModel==2&&(F.UserId=E,F.OrgNo=i.OrgNo),F.No=E,(yield F.IsExits())==!0?new D(a.Error,"\u4EBA\u5458\u7F16\u53F7["+E+"],\u5DF2\u7ECF\u5B58\u5728."):(F.FK_Dept=r,F.Name=e,yield F.Insert(),new D(a.GoToUrl,f.UrlEn("TS.Port.Emp",E)))}if(u==="Imp"){const r=this.RequestVal("DeptNo");C.split(",").forEach(e=>m(this,null,function*(){const F=new G(r+"_"+e);(yield F.RetrieveFromDBSources())==0&&(F.FK_Dept=r,F.FK_Emp=e,yield F.Insert())}))}})}}export{Cu as GPN_Emp};

+ 1 - 1
jeecgboot-vue3/jflow-vue-core/assets/GPN_Emp-c3891a55.js

@@ -16,4 +16,4 @@ var c=Object.defineProperty;var N=(o,t,u)=>t in o?c(o,t,{enumerable:!0,configura
   #### \u5E2E\u52A9
    - \u4E5F\u79F0\u4E3A\u7B80\u5355\u9879\u76EE\u6216\u8005\u4E0D\u786E\u5B9A\u6027\u9879\u76EE\uFF0C\u6CA1\u6709\u6A21\u5F0F\u7684\u4E34\u65F6\u6027\u4EFB\u52A1\uFF0C
     - \u6BD4\u5982 \u7533\u62A5\u77E5\u8BC6\u4EA7\u6743\uFF0C\u627E\u51E0\u4E2A\u4EBA\u534F\u4F5C\u5B8C\u6210\uFF0C\u53EF\u4EE5\u6709\u56FA\u5B9A\u65F6\u9650\uFF0C\u6BCF\u4E2A\u5B50\u4EFB\u52A1\u5206\u7ED9\u4E0D\u540C\u7684\u4EBA\uFF0C\u5904\u7406\u5B8C\u6BD5\u540E\u9700\u8981\u6C47\u62A5\uFF0C\u8BA4\u53EF\uFF0C\u786E\u8BA4\uFF0C\u53EF\u4EE5\u6811\u5F62\u7ED3\u6784\u7684\u5206\u53D1\u6536\u56DE\uFF0C\u5B50\u4EFB\u52A1\u6570\u4E0D\u786E\u5B9A\u3002
-  `);this.PageTitle="\u65B0\u5EFA\u4EBA\u5458"}Init(){return m(this,null,function*(){if(i.IsAdmin==!1){w.error("err@\u60A8\u597D:"+i.Name+",\u975E\u7BA1\u7406\u5458\u7528\u6237\u4E0D\u80FD\u67E5\u770B.");return}const u=this.RequestVal("DeptNo");yield new y(u).Retrieve(),this.AddGroup("A","\u9009\u62E9\u65B9\u5F0F"),this.TextBox2_NameNo("Emp","\u65B0\u5EFA\u4EBA\u5458",this.Daily,"","\u767B\u5F55\u8D26\u53F7","\u4EBA\u5458\u540D\u79F0",""),this.SelectItemsByTreeEns("Imp","\u5BFC\u5165\u4EBA\u5458",this.Daily,!0,n.srcDeptLazily,"0",n.srcEmpLazily,"@No=\u8D26\u53F7@Name=\u540D\u79F0@Tel=\u7535\u8BDD")})}GenerSorts(){return m(this,null,function*(){return Promise.resolve([])})}Save_TextBox_X(u,p,C,A,s){return m(this,null,function*(){if(u==="Emp"){const r=this.RequestVal("DeptNo"),E=A,e=C,F=new d;return i.CCBPMRunModel==2&&(F.UserId=E,F.OrgNo=i.OrgNo),F.No=E,(yield F.IsExits())==!0?new D(a.Error,"\u4EBA\u5458\u7F16\u53F7["+E+"],\u5DF2\u7ECF\u5B58\u5728."):(F.FK_Dept=r,F.Name=e,yield F.Insert(),new D(a.GoToUrl,f.UrlEn("TS.Port.Emp",E)))}if(u==="Imp"){const r=this.RequestVal("DeptNo");C.split(",").forEach(e=>m(this,null,function*(){const F=new G(r+"_"+e);(yield F.RetrieveFromDBSources())==0&&(F.FK_Dept=r,F.FK_Emp=e,yield F.Insert())}))}})}}export{Cu as GPN_Emp};
+  `);this.PageTitle="\u65B0\u5EFA\u4EBA\u5458"}Init(){return m(this,null,function*(){/**if(i.IsAdmin==!1){w.error("err@\u60A8\u597D:"+i.Name+",\u975E\u7BA1\u7406\u5458\u7528\u6237\u4E0D\u80FD\u67E5\u770B.");return}**/const u=this.RequestVal("DeptNo");yield new y(u).Retrieve(),this.AddGroup("A","\u9009\u62E9\u65B9\u5F0F"),this.TextBox2_NameNo("Emp","\u65B0\u5EFA\u4EBA\u5458",this.Daily,"","\u767B\u5F55\u8D26\u53F7","\u4EBA\u5458\u540D\u79F0",""),this.SelectItemsByTreeEns("Imp","\u5BFC\u5165\u4EBA\u5458",this.Daily,!0,n.srcDeptLazily,"0",n.srcEmpLazily,"@No=\u8D26\u53F7@Name=\u540D\u79F0@Tel=\u7535\u8BDD")})}GenerSorts(){return m(this,null,function*(){return Promise.resolve([])})}Save_TextBox_X(u,p,C,A,s){return m(this,null,function*(){if(u==="Emp"){const r=this.RequestVal("DeptNo"),E=A,e=C,F=new d;return i.CCBPMRunModel==2&&(F.UserId=E,F.OrgNo=i.OrgNo),F.No=E,(yield F.IsExits())==!0?new D(a.Error,"\u4EBA\u5458\u7F16\u53F7["+E+"],\u5DF2\u7ECF\u5B58\u5728."):(F.FK_Dept=r,F.Name=e,yield F.Insert(),new D(a.GoToUrl,f.UrlEn("TS.Port.Emp",E)))}if(u==="Imp"){const r=this.RequestVal("DeptNo");C.split(",").forEach(e=>m(this,null,function*(){const F=new G(r+"_"+e);(yield F.RetrieveFromDBSources())==0&&(F.FK_Dept=r,F.FK_Emp=e,yield F.Insert())}))}})}}export{Cu as GPN_Emp};

File diff suppressed because it is too large
+ 0 - 0
jeecgboot-vue3/jflow-vue-core/assets/TreeEns_Dept2Emp-1adb0fbf.js


File diff suppressed because it is too large
+ 0 - 0
jeecgboot-vue3/jflow-vue-core/assets/TreeEns_Dept2Emp-f31e8155.js


File diff suppressed because it is too large
+ 0 - 0
jeecgboot-vue3/jflow-vue-core/assets/TreeEns_FlowSort2Flow-211db7d6.js


File diff suppressed because it is too large
+ 0 - 0
jeecgboot-vue3/jflow-vue-core/assets/TreeEns_FlowSort2Flow-f61eb57f.js


File diff suppressed because it is too large
+ 0 - 0
jeecgboot-vue3/jflow-vue-core/assets/TreeEns_FrmSort2Frm-1d2f3bc0.js


File diff suppressed because it is too large
+ 0 - 0
jeecgboot-vue3/jflow-vue-core/assets/TreeEns_FrmSort2Frm-98f3d82c.js


File diff suppressed because it is too large
+ 0 - 0
jeecgboot-vue3/jflow-vue-core/assets/TreeEns_TemplateSort2Template-63b1f209.js


File diff suppressed because it is too large
+ 0 - 0
jeecgboot-vue3/jflow-vue-core/assets/TreeEns_TemplateSort2Template-b5f22e48.js


+ 4 - 1
jeecgboot-vue3/src/views/appmanage/AppBaseInfo.api.ts

@@ -32,6 +32,7 @@ enum Api {
     isAppAdminOrDevOrOpe = '/sys/applicationInfo/isAppAdminOrDevOrOpe',
     isAppAdmin = '/sys/applicationInfo/isAppAdmin',
     checkMenuInfoisExist = '/sys/permission/checkPermDuplication',
+    checkAppNameisExist = '/sys/applicationInfo/appNameIsExist',
     workFlowTest1 = '/sys/applicationInfo/test1',
     workFlowTest2 = '/sys/applicationInfo/test2'
 }
@@ -45,7 +46,9 @@ export const JFlow_Test1=()=>{
 export const checkMenuInfoisExist=(params)=>{
     return defHttp.get({url: Api.checkMenuInfoisExist+"?url="+params+"&alwaysShow="+false},  { errorMessageMode: false, successMessageMode: false })
 }
-
+export const checkAppNameisExist=(params)=>{
+    return defHttp.get({url: Api.checkAppNameisExist+"?appName="+params},  { errorMessageMode: false, successMessageMode: false })
+}
 export const isAppAdmin=()=>{
   return defHttp.get({url: Api.isAppAdmin})
 }

+ 6 - 8
jeecgboot-vue3/src/views/appmanage/AppInfoList.vue

@@ -252,6 +252,8 @@ import { message, Modal } from 'ant-design-vue';
 import Description from '@/components/Description/src/Description.vue'
 import { useDescription } from '/@/components/Description';
 import {menuInfoisshow} from "@/views/appmanage/addForm/data";
+import {useLocaleStore} from "@/store/modules/locale";
+import Cookies from 'js-cookie';
 const isLoading = ref(true);
 const columns = ref(listColumns2)
 const modalVisible = ref(false);
@@ -264,7 +266,6 @@ const infoDetailVisible = ref(false)
 const appname = ref('')
 const addType = ref('')
 const isInfoDeptUserTag = ref(false)
-const showAddAppInfoButtonTag = ref(false)
 
 const formState = reactive<FormState>({
   appname: '',
@@ -332,8 +333,7 @@ export default defineComponent({
       appname,
       addFormDraftData,
       isLoading,
-      isInfoDeptUserTag,
-      showAddAppInfoButtonTag
+      isInfoDeptUserTag
     }
   },
 
@@ -341,12 +341,10 @@ export default defineComponent({
     // 清除草稿数据缓存
     columns.value = listColumns2
     // 检查当前进入应用管理的用户是否为信息部用户
-    const isInfoDeptUser = await isInfoUser()
-    isInfoDeptUserTag.value = isInfoDeptUser
-    // 是否显示注册应用按钮
-    showAddAppInfoButtonTag.value = await isAppAdmin()
+    var departid = Cookies.get("FK_Dept")
+    isInfoDeptUserTag.value = departid == '1817753406332235777'
 
-    if (isInfoDeptUser){
+    if (isInfoDeptUserTag.value){
       columns.value.splice(11, 4)
     }else {
       // 防止点击平台的右上角刷新时再执行一次,多删除几个列

+ 3 - 4
jeecgboot-vue3/src/views/appmanage/addForm/Step1.vue

@@ -77,7 +77,7 @@ import {useUserStore} from '@/store/modules/user'
 //设置变量储存登陆人信息
   const userStore = useUserStore();
   step1Schemas.forEach(item =>{
-    if (item.field === 'admin') item.defaultValue = userStore.userInfo.id
+    if (item.field === 'admin') item.defaultValue = userStore.userInfo.username
   })
 
 const [register, {setFieldsValue, getFieldsValue, validate }]  = useForm({
@@ -185,14 +185,13 @@ const appAdminUseroptions = ref<SelectProps['options']>([]);
 
       // 初始化表单数据
       async initBaseForm(value) {
-        console.log("表单一设置数据")
         // 设置信息部用户
         await selectUserByDept('1817753406332235777').then(res => {
           let infoUserData = []
           res.forEach(item=>{
             const obj = {
               label: item.realname,
-              value: item.id
+              value: item.username
             }
             infoUserData.push(obj)
           })
@@ -205,7 +204,7 @@ const appAdminUseroptions = ref<SelectProps['options']>([]);
           res.forEach(item=>{
             const obj = {
               label: item.realname,
-              value: item.id
+              value: item.username
             }
             infoUserData.push(obj)
           })

+ 17 - 11
jeecgboot-vue3/src/views/appmanage/addForm/Step4.vue

@@ -39,16 +39,10 @@
       <div class="appUserOperateitem">
         <a-button @click="clearConditionAndData">重 置</a-button>
       </div>
-      <div>
-      <!-- 作为编辑页面时显示   -->
-      <a-button type="primary"
-                :disabled="adduserCount===0"
-                @click="removeUserInfo('edit')"
-                v-if="!tag"  v-show="!uncheckTag">移 除</a-button>
-      </div>
+
       <!-- 作为编辑页面时显示  -->
-      <div class="appUserOperateitem" style="margin-left: 10%">
-        <span v-if="!tag" style="padding-right: 5%; white-space: nowrap"> <b>新增用户:{{(newlyUserData as any).length}}</b> </span>
+      <div class="appUserOperateitem" style="margin-left: 11%">
+        <span v-show="!uncheckTag" v-if="!tag" style="padding-right: 5%; white-space: nowrap"> <b>新增用户:{{(newlyUserData as any).length}}</b> </span>
         <a-button type="primary" :disabled="uncheckTag" @click="handleOpen" v-if="!uncheckTag&&!tag">添加用户</a-button>
         <AppUserSelectByDepModal ref="addNewUser" :rowKey="rowKey" v-if="!uncheckTag&&!tag"
                                  :appid="appid" :appuserids="appUserids" @register="regModal"
@@ -134,15 +128,24 @@
                      :scroll="{y: 230}" :pagination="false" size="small"
                       class="rightuserTableClass">
               <template #title>
+                <div style="display: flex; align-items: center">
                 <b>移除用户:{{(removeUserData as any).length}}</b>
-                <a-popconfirm
+
+                  <!-- 作为编辑页面时显示   -->
+                  <a-button type="primary"
+                            :disabled="adduserCount===0"
+                            @click="removeUserInfo('edit')"
+                            v-if="!tag"  v-show="!uncheckTag" style="margin-left: 5%">移 除</a-button>
+                   <a-popconfirm
                     title="你确定要移除全部信息吗?"
                     ok-text="是"
                     cancel-text="否"
                     @confirm="removeAllUserInfo('editForm_removeUserData')"
                     @cancel="cancel">
-                <a-button style="margin-left: 40%" v-show="(removeUserData as any).length>0">全部移除</a-button>
+                  <a-button style="margin-left: 5%" v-show="(removeUserData as any).length>0">全部移除</a-button>
                 </a-popconfirm>
+                </div>
+             
               </template>
               <template #bodyCell="{ column, record }">
                 <template v-if="column.dataIndex === 'action'">
@@ -334,6 +337,8 @@ export default defineComponent({
       }
       await queryAppUser(params).then(response => {
         this.pagination.total = response.total
+        console.log("查询用户信息")
+        console.dir(response)
         isEdit.value = response.isEdit
         response.userinfos.forEach(item =>{
           const itemObj = {
@@ -398,6 +403,7 @@ export default defineComponent({
         console.log("作为编辑表单的初始化:"+this.appid)
         await this.clearConditionAndData()
       }
+      console.log("此时的tag:"+tag.value)
     },
 
     cancelAdd(){

+ 14 - 3
jeecgboot-vue3/src/views/appmanage/addForm/data.tsx

@@ -1,7 +1,7 @@
 import { FormSchema } from '/@/components/Form';
 import {ref} from "vue";
 import {ComponentTypes} from "@/views/system/menu/menu/menu.data";
-import {checkMenuInfoisExist} from "@/views/appmanage/AppBaseInfo.api";
+import {checkAppNameisExist, checkMenuInfoisExist} from "@/views/appmanage/AppBaseInfo.api";
 
 
 export const menuInfoisshow = ref(false)
@@ -29,7 +29,6 @@ const isValidIpAddress = (ip) => {
 };
 
 export const checkMenuInfo = async (_rule, value, callback) => {
-  console.log("菜单信息:"+value)
   const res = await checkMenuInfoisExist(value)
   if (res === '该值可用!') {
     callback(); // 校验通过
@@ -38,12 +37,24 @@ export const checkMenuInfo = async (_rule, value, callback) => {
   }
 };
 
+// 检查应用名字是否已经存在
+export const checkAppName = async (_rule, value, callback) => {
+  const res = await checkAppNameisExist(value)
+  if (res === '检查通过') {
+    callback(); // 校验通过
+  } else {
+    callback(new Error(res)); // 校验失败
+  }
+};
+
 export const step1Schemas: FormSchema[] = [
   {
     field: 'name',
     component: 'Input',
     label: '应用名称',
     required: true,
+    ifShow: ({ values }) => !(values.component === ComponentTypes.IFrame && values.internalOrExternal),
+    rules:[{ validator: checkAppName, trigger: 'blur'}],
     componentProps: {
       placeholder:"请输入应用名称"
     },
@@ -122,7 +133,7 @@ export const step1Schemas: FormSchema[] = [
     label: '业务对接人',
     componentProps: {
       isRadioSelection: true,
-      rowKey:'id'
+      rowKey:'username'
     },
     colProps: {
       span: 8,

+ 2 - 1
jeecgboot-vue3/src/views/system/role/components/RoleUserTable.vue

@@ -157,7 +157,8 @@ async function handleEdit(record: Recordable) {
  */
 async function handleDelete(record) {
   await deleteUserRole({ userId: record.id, roleId: roleId.value }, () => {
-    setSelectedRowKeys([]);
+    const updatedKeys = getSelectRowKeys().filter(key => key !== record.id);
+    setSelectedRowKeys(updatedKeys);
     reload()});
 }
 

+ 11 - 2
jeecgboot-vue3/src/views/system/role/index.vue

@@ -113,7 +113,10 @@ const { prefixCls, tableContext, onImportXls, onExportXls } = useListPage({
   },
   exportConfig: {
     name: '角色列表',
-    url: getExportUrl,
+    url: ()=>{
+      const ids = encodeURIComponent(JSON.stringify(selectedRowKeys))
+      return `${getExportUrl}?ids=${ids}`;
+    },
   },
   importConfig: {
     url: getImportUrl,
@@ -154,7 +157,13 @@ function handleDetail(record) {
  * 删除事件
  */
 async function handleDelete(record) {
-  await deleteRole({ id: record.id }, reload);
+  await deleteRole({ id: record.id }, () => {
+    const index = selectedRowKeys.value.indexOf(record.id);
+    if (index > -1) {
+      selectedRowKeys.value.splice(index, 1);
+    }
+    reload();
+  });
 }
 /**
  * 批量删除事件

Some files were not shown because too many files changed in this diff