Browse Source

Merge branch 'master' of http://49.233.37.222:3000/wjm/mec-cloud_IntelligentManufacturing_CRM

lph 1 năm trước cách đây
mục cha
commit
670c647465

+ 9 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java

@@ -60,6 +60,9 @@ public class SysLoginController {
     @Value("${parameter.ip.DRAG_FORM_IP}")
     public String DRAG_FORM_IP;
 
+    @Value("${parameter.ip.PROCESS_ENGINE}")
+    public String PROCESS_ENGINE;
+
     RestTemplate restTemplate = new RestTemplate();
 
 
@@ -104,10 +107,12 @@ public class SysLoginController {
             //数据源信息
             DataSource dataSource = dataSourceService.selectById(sysTenant.getDatasourceId());
             ajax.put("dataSource", dataSource);
-            //调用数据引擎服务切换数据源接口
-            restTemplate.postForEntity(DATA_ENGINE_IP, dataSource, DataSource.class);
-            //调用表单引擎服务切换数据源接口
-            restTemplate.postForEntity(DRAG_FORM_IP, dataSource, DataSource.class);
+//            //调用数据引擎服务切换数据源接口
+//            restTemplate.postForEntity(DATA_ENGINE_IP, dataSource, DataSource.class);
+//            //调用表单引擎服务切换数据源接口
+//            restTemplate.postForEntity(DRAG_FORM_IP, dataSource, DataSource.class);
+            //调用流程引擎服务切换数据源接口
+            restTemplate.postForEntity(PROCESS_ENGINE, dataSource, DataSource.class);
         }
         return ajax;
     }

+ 7 - 5
ruoyi-admin/src/main/resources/application.yml

@@ -70,13 +70,13 @@ spring:
   # redis 配置
   redis:
     # 地址
-    host: 192.168.110.15
+    host: localhost
     # 端口,默认为6379
     port: 6379
     # 数据库索引
     database: 0
     # 密码
-    password:
+    password: 123456
     # 连接超时时间
     timeout: 10s
     lettuce:
@@ -134,8 +134,10 @@ xss:
 parameter:
   ip:
     # 数据引擎切换数据源接口地址
-    DATA_ENGINE_IP: http://192.168.110.52:8099/dataSource/changeDataSource
+    DATA_ENGINE_IP: http://localhost:8099/dataSource/changeDataSource
     # 动态表单切换数据源接口地址
-    DRAG_FORM_IP: http://192.168.110.52:8088/dataSource/changeDataSource
+    DRAG_FORM_IP: http://localhost:8088/dataSource/changeDataSource
+    # 流程引擎切换数据源接口地址
+    PROCESS_ENGINE: http://localhost:8055/dataSource/changeDataSource
     #数据引擎初始化数据库表接口地址
-    DATA_ENGINE_INITDATABASE_IP: http://192.168.110.52:8099/tableInfo/initDatabase
+    DATA_ENGINE_INITDATABASE_IP: http://localhost:8099/tableInfo/initDatabase

+ 4 - 7
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysTenantServiceImpl.java

@@ -8,6 +8,7 @@ import java.nio.file.Paths;
 import java.util.*;
 import java.util.stream.Collectors;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.entity.SysMenu;
 import com.ruoyi.common.utils.DateUtils;
@@ -132,13 +133,10 @@ public class SysTenantServiceImpl implements ISysTenantService
     @Transactional
     public AjaxResult initTenantMenuData(Long tenantId) {
         List<SysMenu> list = new ArrayList<>();
+        ObjectMapper objectMapper = new ObjectMapper();
         try {
-            // 读取所有行
-            List<String> lines = Files.readAllLines(Paths.get("ruoyi-system/src/main/resources/sql/initialize_sys_tenant_menu.sql"));
-            List<Long> ids = lines.stream().map(Long::parseLong).collect(Collectors.toList());
-            System.err.println(ids);
-            //根据菜单编号获取租户菜单信息
-            List<SysMenu> menus = sysMenuMapper.selectMenusByIds(ids);
+            //获取租户默认菜单信息
+            List<SysMenu> menus = objectMapper.readValue(new File("ruoyi-system/src/main/resources/sql/initialize_sys_tenant_menu.json"), objectMapper.getTypeFactory().constructCollectionType(List.class, SysMenu.class));
 
             //筛选出根节点
             list = menus.stream().filter(menu -> 0L == menu.getParentId()).peek(
@@ -154,7 +152,6 @@ public class SysTenantServiceImpl implements ISysTenantService
         } catch (IOException e) {
             e.printStackTrace();
         }
-
         return AjaxResult.success(list);
     }
     //获取子节点信息

+ 977 - 0
ruoyi-system/src/main/resources/sql/initialize_sys_tenant_menu.json

@@ -0,0 +1,977 @@
+[
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1,
+        "menuName": "系统管理",
+        "parentName": null,
+        "parentId": 0,
+        "orderNum": 1,
+        "path": "system",
+        "component": null,
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "M",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "system",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 100,
+        "menuName": "用户管理",
+        "parentName": null,
+        "parentId": 1,
+        "orderNum": 1,
+        "path": "user",
+        "component": "system/user/index",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:user:list",
+        "icon": "user",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 101,
+        "menuName": "角色管理",
+        "parentName": null,
+        "parentId": 1,
+        "orderNum": 2,
+        "path": "role",
+        "component": "system/role/index",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:role:list",
+        "icon": "peoples",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 102,
+        "menuName": "菜单管理",
+        "parentName": null,
+        "parentId": 1,
+        "orderNum": 3,
+        "path": "menu",
+        "component": "system/menu/index",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:menu:list",
+        "icon": "tree-table",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 103,
+        "menuName": "部门管理",
+        "parentName": null,
+        "parentId": 1,
+        "orderNum": 4,
+        "path": "dept",
+        "component": "system/dept/index",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:dept:list",
+        "icon": "tree",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 104,
+        "menuName": "岗位管理",
+        "parentName": null,
+        "parentId": 1,
+        "orderNum": 5,
+        "path": "post",
+        "component": "system/post/index",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:post:list",
+        "icon": "post",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1000,
+        "menuName": "用户查询",
+        "parentName": null,
+        "parentId": 100,
+        "orderNum": 1,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:user:query",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1001,
+        "menuName": "用户新增",
+        "parentName": null,
+        "parentId": 100,
+        "orderNum": 2,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:user:add",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1002,
+        "menuName": "用户修改",
+        "parentName": null,
+        "parentId": 100,
+        "orderNum": 3,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:user:edit",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1003,
+        "menuName": "用户删除",
+        "parentName": null,
+        "parentId": 100,
+        "orderNum": 4,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:user:remove",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1004,
+        "menuName": "用户导出",
+        "parentName": null,
+        "parentId": 100,
+        "orderNum": 5,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:user:export",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1005,
+        "menuName": "用户导入",
+        "parentName": null,
+        "parentId": 100,
+        "orderNum": 6,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:user:import",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1006,
+        "menuName": "重置密码",
+        "parentName": null,
+        "parentId": 100,
+        "orderNum": 7,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:user:resetPwd",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1007,
+        "menuName": "角色查询",
+        "parentName": null,
+        "parentId": 101,
+        "orderNum": 1,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:role:query",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1008,
+        "menuName": "角色新增",
+        "parentName": null,
+        "parentId": 101,
+        "orderNum": 2,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:role:add",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1009,
+        "menuName": "角色修改",
+        "parentName": null,
+        "parentId": 101,
+        "orderNum": 3,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:role:edit",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1010,
+        "menuName": "角色删除",
+        "parentName": null,
+        "parentId": 101,
+        "orderNum": 4,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:role:remove",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1011,
+        "menuName": "角色导出",
+        "parentName": null,
+        "parentId": 101,
+        "orderNum": 5,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:role:export",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1016,
+        "menuName": "部门查询",
+        "parentName": null,
+        "parentId": 103,
+        "orderNum": 1,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:dept:query",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1017,
+        "menuName": "部门新增",
+        "parentName": null,
+        "parentId": 103,
+        "orderNum": 2,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:dept:add",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1018,
+        "menuName": "部门修改",
+        "parentName": null,
+        "parentId": 103,
+        "orderNum": 3,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:dept:edit",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1019,
+        "menuName": "部门删除",
+        "parentName": null,
+        "parentId": 103,
+        "orderNum": 4,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:dept:remove",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1020,
+        "menuName": "岗位查询",
+        "parentName": null,
+        "parentId": 104,
+        "orderNum": 1,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:post:query",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1021,
+        "menuName": "岗位新增",
+        "parentName": null,
+        "parentId": 104,
+        "orderNum": 2,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:post:add",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1022,
+        "menuName": "岗位修改",
+        "parentName": null,
+        "parentId": 104,
+        "orderNum": 3,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:post:edit",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1023,
+        "menuName": "岗位删除",
+        "parentName": null,
+        "parentId": 104,
+        "orderNum": 4,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:post:remove",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-05-25 16:54:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1024,
+        "menuName": "岗位导出",
+        "parentName": null,
+        "parentId": 104,
+        "orderNum": 5,
+        "path": "",
+        "component": "",
+        "query": "",
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "F",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:post:export",
+        "icon": "#",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-06-16 14:31:40",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1073,
+        "menuName": "数据引擎",
+        "parentName": null,
+        "parentId": 0,
+        "orderNum": 4,
+        "path": "data",
+        "component": null,
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "M",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "drag",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-06-16 14:58:41",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1078,
+        "menuName": "数据表",
+        "parentName": null,
+        "parentId": 1073,
+        "orderNum": 1,
+        "path": "createTable",
+        "component": "tool/datasheet/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "1",
+        "status": "0",
+        "perms": "",
+        "icon": "documentation",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-06-19 13:39:54",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1082,
+        "menuName": "流程引擎",
+        "parentName": null,
+        "parentId": 0,
+        "orderNum": 5,
+        "path": "processModeling",
+        "component": null,
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "M",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "cascader",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-06-19 13:40:44",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1083,
+        "menuName": "流程建模",
+        "parentName": null,
+        "parentId": 1082,
+        "orderNum": 2,
+        "path": "bpmnPro",
+        "component": "system/bpmnPro/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "component",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-06-19 15:35:07",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1084,
+        "menuName": "数据建模",
+        "parentName": null,
+        "parentId": 1073,
+        "orderNum": 2,
+        "path": "datamodeling",
+        "component": "dataEngine/datamodeling/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "form",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-07 14:04:16",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1103,
+        "menuName": "表单引擎",
+        "parentName": null,
+        "parentId": 0,
+        "orderNum": 11,
+        "path": "system/fromModel/index",
+        "component": null,
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "M",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "form",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-07 14:05:32",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1104,
+        "menuName": "表单建模",
+        "parentName": null,
+        "parentId": 1103,
+        "orderNum": 1,
+        "path": "formBuild",
+        "component": "system/fromModel/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "1",
+        "status": "0",
+        "perms": "system:fromModeling:index",
+        "icon": "druid",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-12 09:46:30",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1106,
+        "menuName": "表单列表",
+        "parentName": null,
+        "parentId": 1103,
+        "orderNum": 2,
+        "path": "dragform",
+        "component": "dragform/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "clipboard",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-07-17 10:28:35",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1107,
+        "menuName": "表格列表",
+        "parentName": null,
+        "parentId": 1103,
+        "orderNum": 3,
+        "path": "tablelist",
+        "component": "dragform/tableList",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "education",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-08-08 17:38:07",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1109,
+        "menuName": "租户字典管理",
+        "parentName": null,
+        "parentId": 1,
+        "orderNum": 10,
+        "path": "tenantDict",
+        "component": "system/tenant/dict/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "system:tenantDict:list",
+        "icon": "dict",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-09-11 17:26:08",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 1172,
+        "menuName": "表格编辑",
+        "parentName": null,
+        "parentId": 1103,
+        "orderNum": 1,
+        "path": "tableMange",
+        "component": "tableMange/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "1",
+        "status": "0",
+        "perms": "",
+        "icon": "bug",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-10-11 09:28:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 2811,
+        "menuName": "流程设计",
+        "parentName": null,
+        "parentId": 1082,
+        "orderNum": 1,
+        "path": "process",
+        "component": "bpmprocess/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "job",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    }
+]

+ 1 - 1
ruoyi-system/src/main/resources/sql/initialize_sys_tenant_menu.sql

@@ -36,4 +36,4 @@
 1107
 1109
 1172
-1073
+2811

+ 5 - 2
ruoyi-ui/.env.development

@@ -11,7 +11,10 @@ VUE_APP_BASE_API = '/dev-api'
 VUE_CLI_BABEL_TRANSPILE_MODULES = true
 
 #数据引擎模块IP
-VUE_APP_BASE_API2 = 'http://192.168.110.15:8099/'
+VUE_APP_BASE_API2 = 'http://192.168.110.76:8099/'
 
 #表单引擎模块IP
-VUE_APP_BASE_API3 = 'http://192.168.110.15:8088/'
+VUE_APP_BASE_API3 = 'http://192.168.110.76:8088/'
+
+#流程引擎模块IP
+VUE_APP_BASE_API4 = 'http://192.168.110.76:8055/'

+ 49 - 0
ruoyi-ui/src/api/bpmprocess/process.js

@@ -0,0 +1,49 @@
+import request from '@/utils/request'
+
+// 查询流程定义列表
+export function listProcess(query) {
+  return request({
+    url: '/system/process/list',
+    method: 'get',
+    params: query,
+    baseURL:process.env.VUE_APP_BASE_API4
+  })
+}
+
+// 查询流程定义详细
+export function getProcess(processId) {
+  return request({
+    url: '/system/process/' + processId,
+    method: 'get',
+    baseURL:process.env.VUE_APP_BASE_API4
+  })
+}
+
+// 新增流程定义
+export function addProcess(data) {
+  return request({
+    url: '/system/process',
+    method: 'post',
+    data: data,
+    baseURL:process.env.VUE_APP_BASE_API4
+  })
+}
+
+// 修改流程定义
+export function updateProcess(data) {
+  return request({
+    url: '/system/process',
+    method: 'put',
+    data: data,
+    baseURL:process.env.VUE_APP_BASE_API4
+  })
+}
+
+// 删除流程定义
+export function delProcess(processId) {
+  return request({
+    url: '/system/process/' + processId,
+    method: 'delete',
+    baseURL:process.env.VUE_APP_BASE_API4
+  })
+}

+ 364 - 0
ruoyi-ui/src/views/bpmprocess/index.vue

@@ -0,0 +1,364 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="流程名称" prop="processName">
+        <el-input
+          v-model="queryParams.processName"
+          placeholder="请输入流程名称"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="流程别名" prop="processKey">
+        <el-input
+          v-model="queryParams.processKey"
+          placeholder="请输入流程别名"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="流程开启状态" prop="processOpneState">
+        <el-input
+          v-model="queryParams.processOpneState"
+          placeholder="请输入流程开启状态"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="流程部署时间" prop="processDeployTime">
+        <el-date-picker clearable
+          v-model="queryParams.processDeployTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="请选择流程部署时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="版本状态" prop="processVersion">
+        <el-input
+          v-model="queryParams.processVersion"
+          placeholder="请输入版本状态"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="xml文件存放地址" prop="processXmlPath">
+        <el-input
+          v-model="queryParams.processXmlPath"
+          placeholder="请输入xml文件存放地址"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['system:process:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['system:process:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['system:process:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['system:process:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="processList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="主键" align="center" prop="processId" />
+      <el-table-column label="流程名称" align="center" prop="processName" />
+      <el-table-column label="流程别名" align="center" prop="processKey" />
+      <el-table-column label="流程开启状态" align="center" prop="processOpneState" />
+      <el-table-column label="流程类型。例如" align="center" prop="processType" />
+      <el-table-column label="流程部署时间" align="center" prop="processDeployTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.processDeployTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="启动事件类型" align="center" prop="startEventType" />
+      <el-table-column label="版本注释" align="center" prop="note" />
+      <el-table-column label="版本状态" align="center" prop="processVersion" />
+      <el-table-column label="xml流文件" align="center" prop="processXml" />
+      <el-table-column label="节点json串" align="center" prop="processJson" />
+      <el-table-column label="xml标签内容" align="center" prop="processXmlContent" />
+      <el-table-column label="xml文件存放地址" align="center" prop="processXmlPath" />
+      <el-table-column label="备注" align="center" prop="remark" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['system:process:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['system:process:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改流程定义对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="流程名称" prop="processName">
+          <el-input v-model="form.processName" placeholder="请输入流程名称" />
+        </el-form-item>
+        <el-form-item label="流程别名" prop="processKey">
+          <el-input v-model="form.processKey" placeholder="请输入流程别名" />
+        </el-form-item>
+        <el-form-item label="流程开启状态" prop="processOpneState">
+          <el-input v-model="form.processOpneState" placeholder="请输入流程开启状态" />
+        </el-form-item>
+        <el-form-item label="流程部署时间" prop="processDeployTime">
+          <el-date-picker clearable
+            v-model="form.processDeployTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="请选择流程部署时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="版本注释" prop="note">
+          <el-input v-model="form.note" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="版本状态" prop="processVersion">
+          <el-input v-model="form.processVersion" placeholder="请输入版本状态" />
+        </el-form-item>
+        <el-form-item label="节点json串" prop="processJson">
+          <el-input v-model="form.processJson" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="xml标签内容">
+          <editor v-model="form.processXmlContent" :min-height="192"/>
+        </el-form-item>
+        <el-form-item label="xml文件存放地址" prop="processXmlPath">
+          <el-input v-model="form.processXmlPath" placeholder="请输入xml文件存放地址" />
+        </el-form-item>
+        <el-form-item label="删除标志" prop="delFlag">
+          <el-input v-model="form.delFlag" placeholder="请输入删除标志" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" placeholder="请输入备注" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listProcess, getProcess, delProcess, addProcess, updateProcess } from "@/api/bpmprocess/process";
+
+export default {
+  name: "Process",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 流程定义表格数据
+      processList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        processName: null,
+        processKey: null,
+        processOpneState: null,
+        processType: null,
+        processDeployTime: null,
+        startEventType: null,
+        note: null,
+        processVersion: null,
+        processXml: null,
+        processJson: null,
+        processXmlContent: null,
+        processXmlPath: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询流程定义列表 */
+    getList() {
+      this.loading = true;
+      listProcess(this.queryParams).then(response => {
+        this.processList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        processId: null,
+        processName: null,
+        processKey: null,
+        processOpneState: null,
+        processType: null,
+        processDeployTime: null,
+        startEventType: null,
+        note: null,
+        processVersion: null,
+        processXml: null,
+        processJson: null,
+        processXmlContent: null,
+        processXmlPath: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        delFlag: null,
+        remark: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.processId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加流程定义";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const processId = row.processId || this.ids
+      getProcess(processId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改流程定义";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.processId != null) {
+            updateProcess(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addProcess(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const processIds = row.processId || this.ids;
+      this.$modal.confirm('是否确认删除流程定义编号为"' + processIds + '"的数据项?').then(function() {
+        return delProcess(processIds);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('system/process/export', {
+        ...this.queryParams
+      }, `process_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 13 - 11
ruoyi-ui/src/views/system/bpmnPro/components/Settings/index.vue

@@ -153,25 +153,27 @@ export default {
     return {
       modelVisible: false,
       themeColorKeys: [
-        "defaultFillColor",
-        "defaultStartEventColor",
-        "defaultEndEventColor",
-        "defaultIntermediateEventColor",
+        "默认填充颜色",
+        "默认开始节点颜色",
+        "默认结束节点颜色",
+        "默认中间/边界节点颜色",
         "defaultIntermediateThrowEventColor",
         "defaultIntermediateCatchEventColor",
-        "defaultTaskColor",
-        "defaultLabelColor",
-        "defaultGatewayColor",
-        "defaultSequenceColor",
+        // "默认Task颜色",
+        "默认任务颜色",
+        "默认Label颜色",
+        // "默认Gateway颜色",
+        "默认网关颜色",
+        "默认Sequence颜色",
       ],
       themeOpacityKeys: [
-        "defaultStartEventOpacity",
-        "defaultEndEventOpacity",
+        "默认开始节点填充颜色透明度",
+        "默认结束节点填充颜色透明度",
         "defaultIntermediateThrowEventOpacity",
         "defaultIntermediateCatchEventOpacity",
         "defaultTaskOpacity",
         "defaultLabelOpacity",
-        "defaultGatewayOpacity",
+        "默认网关填充颜色透明度",
         "defaultSequenceOpacity",
       ],
       editorSettings: this.settings,