Эх сурвалжийг харах

fix:通用按钮操作渲染

侯茂昌 1 жил өмнө
parent
commit
36d60a5d9c
36 өөрчлөгдсөн 583 нэмэгдсэн , 221 устгасан
  1. 0 4
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonFileController.java
  2. 255 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/dragForm/CommonBtnController.java
  3. 0 2
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/dragForm/CommonController.java
  4. 0 42
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/dragForm/DragFormController.java
  5. 0 50
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/dragForm/DragTableBtnController.java
  6. 35 22
      ruoyi-business/src/main/java/com/ruoyi/business/entity/CommonEntity.java
  7. 13 0
      ruoyi-business/src/main/java/com/ruoyi/business/entity/DragTableBtn.java
  8. 6 0
      ruoyi-business/src/main/java/com/ruoyi/business/mapper/DragTableMapper.java
  9. 0 2
      ruoyi-business/src/main/java/com/ruoyi/business/service/ICommonService.java
  10. 1 0
      ruoyi-business/src/main/java/com/ruoyi/business/service/IDragFormService.java
  11. 0 7
      ruoyi-business/src/main/java/com/ruoyi/business/service/IDragTableService.java
  12. 3 3
      ruoyi-business/src/main/java/com/ruoyi/business/service/impl/CommonServiceImpl.java
  13. 1 3
      ruoyi-business/src/main/java/com/ruoyi/business/service/impl/DragFormServiceImpl.java
  14. 3 1
      ruoyi-business/src/main/java/com/ruoyi/business/service/impl/DragTableBtnRelevanceServiceImpl.java
  15. 0 27
      ruoyi-business/src/main/java/com/ruoyi/business/service/impl/DragTableBtnServiceImpl.java
  16. 1 0
      ruoyi-business/src/main/java/com/ruoyi/business/service/impl/DragTableConditionServiceImpl.java
  17. 6 7
      ruoyi-business/src/main/java/com/ruoyi/business/service/impl/DragTableGroupServiceImpl.java
  18. 5 17
      ruoyi-business/src/main/java/com/ruoyi/business/service/impl/DragTableServiceImpl.java
  19. 0 2
      ruoyi-business/src/main/java/com/ruoyi/business/service/impl/DragTableStatisticServiceImpl.java
  20. 1 0
      ruoyi-business/src/main/java/com/ruoyi/business/service/impl/DragTableStyleServiceImpl.java
  21. 1 0
      ruoyi-business/src/main/java/com/ruoyi/business/service/impl/TableSqlServiceImpl.java
  22. 24 0
      ruoyi-business/src/main/resources/mapper/dragmapper/DragTableMapper.xml
  23. 31 0
      ruoyi-common/src/main/java/com/ruoyi/common/config/form/FormProperties.java
  24. 7 0
      ruoyi-common/src/main/java/com/ruoyi/common/constant/HttpStatus.java
  25. 15 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java
  26. 79 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/form/FromUtils.java
  27. 4 5
      ruoyi-ui/.env.development
  28. 11 0
      ruoyi-ui/.env.production
  29. 8 8
      ruoyi-ui/src/api/system/tenant/type.js
  30. 4 4
      ruoyi-ui/src/api/tablelist/commonTable.js
  31. 40 5
      ruoyi-ui/src/utils/bpmn/getNodeSequence.js
  32. 15 1
      ruoyi-ui/src/utils/bpmn/xml.js
  33. 5 1
      ruoyi-ui/src/utils/index.js
  34. 6 6
      ruoyi-ui/src/views/bussiness/processMange.vue
  35. 2 0
      ruoyi-ui/src/views/tablelist/commonTable/listInfo.vue
  36. 1 2
      ruoyi-ui/vue.config.js

+ 0 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonFileController.java

@@ -40,7 +40,6 @@ import static com.ruoyi.common.core.domain.AjaxResult.success;
  *
  * @author ruoyi
  */
-
 @RestController
 @RequestMapping("/common")
 public class CommonFileController {
@@ -219,9 +218,6 @@ public class CommonFileController {
                     listMap.add(0, map);
                 }
             });
-//            if (listMap.get(0).size() != listMap.get(1).size()) {
-//                return AjaxResult.error("请检查表格中的数据是否正确!");
-//            }
             listMap.get(0).forEach((mKey, mVal) -> {
                 if (mVal != null)
                     if (endFieldMap.get(mVal) != null)

+ 255 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/dragForm/CommonBtnController.java

@@ -0,0 +1,255 @@
+package com.ruoyi.web.controller.dragForm;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.ruoyi.business.entity.CommonEntity;
+import com.ruoyi.business.entity.DragForm;
+import com.ruoyi.business.entity.DragTableBtn;
+import com.ruoyi.business.entity.DragTableGroup;
+import com.ruoyi.business.entity.vo.DragTableGroupVo;
+import com.ruoyi.business.entity.vo.DragTableVo;
+import com.ruoyi.business.mapper.DragTableBtnMapper;
+import com.ruoyi.business.mapper.DragTableBtnRelevanceMapper;
+import com.ruoyi.business.mapper.DragTableGroupMapper;
+import com.ruoyi.business.mapper.DragTableMapper;
+import com.ruoyi.business.service.ICommonService;
+import com.ruoyi.business.service.IDragFormService;
+import com.ruoyi.business.service.IDragTableBtnService;
+import com.ruoyi.business.service.IDragTableGroupService;
+import com.ruoyi.common.constant.ButtonTypeConstants;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.bean.BeanUtils;
+import com.ruoyi.common.utils.form.FromUtils;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * @author hanzihang
+ * @date 2023/11/16 05:49
+ */
+@RestController
+@RequestMapping("/dragform/commonbtn")
+public class CommonBtnController extends BaseController {
+
+    @Resource   // 共通crud
+    private ICommonService commonService;
+
+    @Resource  // 动态表单
+    private IDragFormService dragFormService;
+
+    @Resource  // 表格按钮
+    private IDragTableBtnService iDragTableBtnService;
+
+    @Resource
+    private FromUtils fromUtils;
+
+    @Resource
+    private DragTableMapper dragTableMapper;
+
+    @Resource
+    private DragTableGroupMapper dragTableGroupMapper;
+
+    @Resource
+    private DragTableBtnRelevanceMapper dragTableBtnRelevanceMapper;
+
+    @Resource
+    private DragTableBtnMapper dragTableBtnMapper;
+
+    /**
+     * 处理按钮通用接口(新增、修改、删除)
+     * @param commonEntity
+     * @return
+     * @throws JsonProcessingException
+     */
+    @PostMapping("/commonBtnHandle")
+    public AjaxResult commonBtnHandle(@RequestBody CommonEntity commonEntity) throws JsonProcessingException {
+
+        //按钮类型
+        Long btnType = Long.valueOf(commonEntity.getBasicMap().get("btnType").toString());
+        String type = "";
+        if (btnType == ButtonTypeConstants.INSERT) {
+            type = "INSERT";
+        } else if (btnType == ButtonTypeConstants.UPDATE) {
+            type = "UPDATE";
+        } else if (btnType == ButtonTypeConstants.DELETE) {
+            type = "DELETE";
+        }
+        /*
+         * 判断什么类型走什么接口:
+         * btnType  10:新增、8:修改、9:删除、5:脚本
+         * visible  false代表弹窗未开启时走回显表单模板及数据信息接口;true代表弹窗开启时走保存数据接口
+         * */
+        //是否提交表单操作 true是 false回显表单数据 commonEntity.getBasicMap().get("visible").toString()
+        switch (type) {
+            case "INSERT":
+                return insertBtn(commonEntity);
+            case "UPDATE":
+                return updateBtn(commonEntity);
+            case "DELETE":
+                return deleteBtn(commonEntity);
+            default:
+                return warn("暂不支持该操作!");
+        }
+    }
+
+
+    /**
+     * 新增类型按钮
+     * @param commonEntity
+     * @return
+     * @throws JsonProcessingException
+     */
+    public AjaxResult insertBtn(CommonEntity commonEntity) throws JsonProcessingException {
+        if (commonEntity.getBasicMap().get("visible").toString().equals("true")) {
+            return AjaxResult.btnMessage(commonService.batchInsert(commonEntity));
+        } else if (commonEntity.getBasicMap().get("visible").toString().equals("false")) {
+            String sqlKey = commonEntity.getBasicMap().get("sqlKey").toString();
+            return success(dragFormService.selectDragFormBySqlKey(sqlKey));
+        } else {
+            return warn("暂不支持该操作!");
+        }
+    }
+
+
+    /**
+     * 修改类型按钮
+     * @param commonEntity
+     * @return
+     * @throws JsonProcessingException
+     */
+    public AjaxResult updateBtn(CommonEntity commonEntity) throws JsonProcessingException {
+        //是否开启弹窗
+        if (commonEntity.getBasicMap().get("visible").toString().equals("true")) {
+            if (commonEntity.getBasicMap().containsKey("btnKey")) {  // 按钮提交时会触发别的操作
+                // 根据按钮别名查询按钮详细信息
+                DragTableBtn dragTableBtn = iDragTableBtnService.selectDragTableBtnByBtnKey(commonEntity.getBasicMap().get("btnKey").toString());
+                // 根据流程的key判断当前按钮是否执行触发流程
+                if (!dragTableBtn.getBtnProcessKey().isEmpty()) {
+                    // 调用发起流程接口
+                    fromUtils.runBpmProductionScheduling(commonEntity);
+//                    if (dragTableBtn.getBtnFormKey().isEmpty()) {  // 校验当前按钮是否是直接触发流程 或者脚本 (新增按钮类型)
+//                        fromUtils.runBpmProductionScheduling(commonEntity);
+//                    }
+                } else if (!dragTableBtn.getBtnScriptKey().isEmpty()) {
+                    // 调用执行脚本接口
+                    fromUtils.triggerScript(commonEntity);
+                }
+            }
+            return toAjax(commonService.edit(commonEntity));
+        } else if (commonEntity.getBasicMap().get("visible").toString().equals("false")) {
+            //单纯是表格还是弹窗里有表格
+            return getAjaxResult(commonEntity);
+        } else {
+            return warn("暂不支持该操作!");
+        }
+    }
+
+
+    /**
+     * 删除类型按钮
+     * @param commonEntity
+     * @return
+     */
+    public AjaxResult deleteBtn(CommonEntity commonEntity) {
+        return toAjax(commonService.batchDelete(commonEntity));
+    }
+
+
+    /**
+     * 判断是正常的表单渲染还是表单表格渲染
+     * @param commonEntity
+     * @return
+     * @throws JsonProcessingException
+     */
+    private AjaxResult getAjaxResult(CommonEntity commonEntity) throws JsonProcessingException {
+        Map<String, Object> map = new HashMap<>();
+        //先拿到btnKey
+        String btnKey = commonEntity.getBasicMap().get("btnKey").toString();
+        //查询按钮列表
+        DragTableBtn dragTableBtn = iDragTableBtnService.selectDragTableBtnByBtnKey(btnKey);
+        //判断是走原生的表单解析还是、走配置的表单解析
+        if (dragTableBtn.getBtnTableFormGroupKey()!=null&&dragTableBtn.getBtnTableFormGroupKey()!="") {
+            //查询组信息
+            DragTableGroup dragTableGroup = dragTableGroupMapper.selectDragTableGroupOneByGroupKey(dragTableBtn.getBtnTableFormGroupKey());
+            DragTableGroupVo dragTableGroupVo=new DragTableGroupVo();
+            //赋值给vo才好放表格
+            BeanUtils.copyProperties(dragTableGroup, dragTableGroupVo);
+
+            //把[{"tableKey":"a1","sort":0},{"tableKey":"a2","sort":1}]转换成Map对象
+            JSONArray jsonArray = JSON.parseArray( dragTableGroup.getGroupTableInfo());
+            //排序确保表格的顺序
+            JSONArray sortArray = jsonArray.stream().sorted(
+                    Comparator.comparingLong(
+                            // 根据对象中的ID进行排序
+                            e -> JSONObject.parseObject(e.toString()).getIntValue("sort")
+                    )
+            ).collect(Collectors.toCollection(JSONArray::new));
+            //用in查询
+            List<String> tableKeys = new ArrayList<>();
+            sortArray.stream().forEach(item->
+                    tableKeys.add(JSONObject.parseObject(item.toString()).get("tableKey").toString()));
+
+            //查询表格信息
+            List<DragTableVo> dragTableVos = dragTableMapper.selectDragTableTableKeysOrderby(tableKeys);
+            dragTableVos.forEach(item->{
+                // 动态表格按钮信息
+                //根据tableKey获取根节点信息
+                List<String> btnKeys = dragTableBtnRelevanceMapper.selectBtnKeyByTableKey(item.getTableKey());
+                //获取根节点数据
+                if(btnKeys.size() > 0){
+                    List<DragTableBtn> rootNodes = dragTableBtnMapper.selectDragTableBtnListByBtnKey(btnKeys);
+                    //查询子节点
+                    List<Long> ids = rootNodes.stream().map(m -> m.getId()).collect(Collectors.toList());
+                    if (ids.isEmpty()){
+                         item.setDragTableBtnList(rootNodes);
+                    }else {
+                        List<DragTableBtn> childNodes = dragTableBtnMapper.selectChildNodeById(ids);
+                        List<DragTableBtn> btnList = rootNodes.stream().peek(
+                                root -> root.setChildren(getChildrenList(root, childNodes))
+                        ).collect(Collectors.toList());
+                        item.setDragTableBtnList(btnList);
+                    }
+                }
+            });
+            //查询表格按钮
+            dragTableGroupVo.setDragTables(dragTableVos);
+            map.put("template", null);
+            //把groupKey放进去
+            map.put("result",dragTableGroupVo);
+        }else {
+            String sqlKey = commonEntity.getBasicMap().get("sqlKey").toString();
+            DragForm dragForm = dragFormService.selectDragFormBySqlKey(sqlKey);
+            map.put("template", dragForm);
+            //返回结果
+            map.put("result", commonService.getInfoById(commonEntity));
+        }
+        return success(map);
+    }
+
+    /**
+     * 递归查询按钮子级的方法
+     * @param root
+     * @param childNodes
+     * @return
+     */
+    private List<DragTableBtn> getChildrenList(DragTableBtn root, List<DragTableBtn> childNodes) {
+        List<DragTableBtn> list = childNodes.stream().filter(dragTableBtn ->
+                //筛选出下一节点元素
+                Objects.equals(dragTableBtn.getBtnParentId(), root.getId())).map(dragTableBtn -> {
+            //递归set子节点
+            dragTableBtn.setChildren(this.getChildrenList(dragTableBtn, childNodes));
+            return dragTableBtn;
+        }).collect(Collectors.toList());
+        return list;
+    }
+
+
+}

+ 0 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/dragForm/CommonController.java

@@ -69,14 +69,12 @@ public class CommonController extends BaseController {
 
     /**
      * 联合查询通用sql
-     *
      * @param commonEntity
      * @return
      */
     @GetMapping("/getTableList")
     public TableDataInfo queryTableList(CommonEntity commonEntity) throws TenantDataSource {
         TableSql tableSql = iTableSqlService.selectTableSqlByTSqlKey(commonEntity.getQueryMap().get("sqlkey").toString());
-        System.err.println(tableSql);
         startPage();  // 校验是否sqlserver 否执行 是执行另一种方式的分页
         return getDataTable(commonService.queryGroupTableList(commonEntity, tableSql));
     }

+ 0 - 42
ruoyi-admin/src/main/java/com/ruoyi/web/controller/dragForm/DragFormController.java

@@ -42,18 +42,6 @@ public class DragFormController extends BaseController {
         return getDataTable(list);
     }
 
-    /**
-     * 导出动态表单
-     * 列表
-     */
-    //@PreAuthorize("@ss.hasPermi('system:form:export')")
-    @Log(title = "动态表单", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, DragForm dragForm) {
-        List<DragForm> list = dragFormService.selectDragFormList(dragForm);
-        ExcelUtil<DragForm> util = new ExcelUtil<DragForm>(DragForm.class);
-        util.exportExcel(response, list, "动态表单数据");
-    }
 
     /**
      * 获取动态表单
@@ -65,36 +53,6 @@ public class DragFormController extends BaseController {
         return success(dragFormService.selectDragFormByFId(fId));
     }
 
-    /**
-     * 新增动态表单
-     */
-    //@PreAuthorize("@ss.hasPermi('system:form:add')")
-    @Log(title = "动态表单", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody DragForm dragForm) {
-        return dragFormService.insertDragForm(dragForm);
-    }
-
-    /**
-     * 修改动态表单
-     */
-    //@PreAuthorize("@ss.hasPermi('system:form:edit')")
-    @Log(title = "动态表单", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody DragForm dragForm) {
-        return toAjax(dragFormService.updateDragForm(dragForm));
-    }
-
-    /**
-     * 删除动态表单
-     */
-    //@PreAuthorize("@ss.hasPermi('system:form:remove')")
-    @Log(title = "动态表单", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{fIds}")
-    public AjaxResult remove(@PathVariable Long[] fIds) {
-        return toAjax(dragFormService.deleteDragFormByFIds(fIds));
-    }
-
     /**
      * 获取动态表单
      * 详细信息

+ 0 - 50
ruoyi-admin/src/main/java/com/ruoyi/web/controller/dragForm/DragTableBtnController.java

@@ -17,7 +17,6 @@ import java.util.List;
 
 /**
  * 格绑定的自定义按钮Controller
- * 
  * @author ruoyi
  * @date 2023-11-07
  */
@@ -40,19 +39,6 @@ public class DragTableBtnController extends BaseController
         return getDataTable(list);
     }
 
-    /**
-     * 导出格绑定的自定义按钮列表
-     */
-    @PreAuthorize("@ss.hasPermi('system:btn:export')")
-    @Log(title = "格绑定的自定义按钮", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, DragTableBtn dragTableBtn)
-    {
-        List<DragTableBtn> list = dragTableBtnService.selectDragTableBtnList(dragTableBtn);
-        ExcelUtil<DragTableBtn> util = new ExcelUtil<DragTableBtn>(DragTableBtn.class);
-        util.exportExcel(response, list, "格绑定的自定义按钮数据");
-    }
-
     /**
      * 获取格绑定的自定义按钮详细信息
      */
@@ -63,40 +49,4 @@ public class DragTableBtnController extends BaseController
         return success(dragTableBtnService.selectDragTableBtnById(id));
     }
 
-    /**
-     * 新增格绑定的自定义按钮
-     */
-    @PreAuthorize("@ss.hasPermi('system:btn:add')")
-    @Log(title = "格绑定的自定义按钮", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody DragTableBtn dragTableBtn)
-    {
-        dragTableBtnService.insertDragTableBtn(dragTableBtn);
-        return AjaxResult.success();
-    }
-
-    /**
-     * 修改格绑定的自定义按钮
-     */
-    @PreAuthorize("@ss.hasPermi('system:btn:edit')")
-    @Log(title = "格绑定的自定义按钮", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody DragTableBtn dragTableBtn)
-    {
-        return toAjax(dragTableBtnService.updateDragTableBtn(dragTableBtn));
-    }
-
-    /**
-     * 删除格绑定的自定义按钮
-     */
-    @PreAuthorize("@ss.hasPermi('system:btn:remove')")
-    @Log(title = "格绑定的自定义按钮", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{id}")
-    public AjaxResult remove(@PathVariable Long id)
-    {
-        if (dragTableBtnService.hasChildByBtnId(id)) {
-            return warn("存在子按钮,不允许删除");
-        }
-        return toAjax(dragTableBtnService.deleteDragTableBtnById(id));
-    }
 }

+ 35 - 22
ruoyi-business/src/main/java/com/ruoyi/business/entity/CommonEntity.java

@@ -1,10 +1,16 @@
 package com.ruoyi.business.entity;
 
+import com.alibaba.fastjson2.JSON;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import com.ruoyi.common.core.domain.BaseEntity;
 
 import java.util.List;
 import java.util.Map;
 
+import com.fasterxml.jackson.core.type.TypeReference;
+
 
 /**
  * 通用实体
@@ -51,6 +57,12 @@ public class CommonEntity extends BaseEntity {
      */
     private String execlMap;
 
+
+    /**
+     * 点击按钮携带的参数
+     */
+    private Map<String, Object> btnParametersMap;
+
     public List<Map<String, String>> getAddListMap() {
         return addListMap;
     }
@@ -59,20 +71,30 @@ public class CommonEntity extends BaseEntity {
         this.addListMap = addListMap;
     }
 
+    public Map<String, Object> getBtnParametersMap() {
+        return btnParametersMap;
+    }
+
+    public void setBtnParametersMap(Map<String, Object> btnParametersMap) {
+        this.btnParametersMap = btnParametersMap;
+    }
+
     @Override
     public String toString() {
-        return "CommonEntity{" +
-                "basicMap=" + basicMap +
-                ", queryMap=" + queryMap +
-                ", conditionMap=" + conditionMap +
-                ", resultMap=" + resultMap +
-                ", commMap=" + commMap +
-                ", addListMap=" + addListMap +
-                ", execlMap=" + execlMap +
-                '}';
-    }
-
-    public CommonEntity(Map<String, Object> basicMap, Map<String, Object> queryMap, Map<String, Object> conditionMap, Map<String, Object> resultMap, Map<String, Object> commMap, List<Map<String, String>> addListMap, String execlMap) {
+        final StringBuffer sb = new StringBuffer("CommonEntity{");
+        sb.append("basicMap=").append(basicMap);
+        sb.append(", queryMap=").append(queryMap);
+        sb.append(", conditionMap=").append(conditionMap);
+        sb.append(", resultMap=").append(resultMap);
+        sb.append(", commMap=").append(commMap);
+        sb.append(", addListMap=").append(addListMap);
+        sb.append(", execlMap='").append(execlMap).append('\'');
+        sb.append(", btnParametersMap=").append(btnParametersMap);
+        sb.append('}');
+        return sb.toString();
+    }
+
+    public CommonEntity(Map<String, Object> basicMap, Map<String, Object> queryMap, Map<String, Object> conditionMap, Map<String, Object> resultMap, Map<String, Object> commMap, List<Map<String, String>> addListMap, String execlMap, Map<String, Object> btnParametersMap) {
         this.basicMap = basicMap;
         this.queryMap = queryMap;
         this.conditionMap = conditionMap;
@@ -80,6 +102,7 @@ public class CommonEntity extends BaseEntity {
         this.commMap = commMap;
         this.addListMap = addListMap;
         this.execlMap = execlMap;
+        this.btnParametersMap = btnParametersMap;
     }
 
     public CommonEntity() {
@@ -134,14 +157,4 @@ public class CommonEntity extends BaseEntity {
         this.execlMap = execlMap;
     }
 
-
-    /**
-     * org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBindingResult: 1 errors
-     * Field error in object 'commonEntity' on field 'execlMap': rejected value
-     * [[{"address":"主1","name":"主1","id":1},{"address":"主2","name":"主2","id":2}]];
-     * codes [typeMismatch.commonEntity.execlMap,typeMismatch.execlMap,typeMismatch.java.util.List,typeMismatch];
-     * arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [commonEntity.execlMap,execlMap];
-     * arguments []; default message [execlMap]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.util.List' for property 'execlMap';
-     * nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'java.util.Map' for property 'execlMap[0]': no matching editors or conversion strategy found]
-     */
 }

+ 13 - 0
ruoyi-business/src/main/java/com/ruoyi/business/entity/DragTableBtn.java

@@ -53,6 +53,9 @@ public class DragTableBtn extends BaseEntity
     /** 脚本唯一标识 */
     private String btnScriptKey;
 
+    /** 弹窗表格唯一标识 */
+    private String btnTableFormGroupKey;
+
     /** 按钮显示条件 */
     private String btnShowCondition;
 
@@ -241,6 +244,14 @@ public class DragTableBtn extends BaseEntity
         this.btnIcon = btnIcon;
     }
 
+    public String getBtnTableFormGroupKey() {
+        return btnTableFormGroupKey;
+    }
+
+    public void setBtnTableFormGroupKey(String btnTableFormGroupKey) {
+        this.btnTableFormGroupKey = btnTableFormGroupKey;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -271,4 +282,6 @@ public class DragTableBtn extends BaseEntity
             .append("btnIcon",getBtnIcon())
             .toString();
     }
+
+
 }

+ 6 - 0
ruoyi-business/src/main/java/com/ruoyi/business/mapper/DragTableMapper.java

@@ -1,6 +1,7 @@
 package com.ruoyi.business.mapper;
 
 import com.ruoyi.business.entity.DragTable;
+import com.ruoyi.business.entity.DragTableGroup;
 import com.ruoyi.business.entity.vo.DragTableVo;
 import java.util.List;
 
@@ -87,4 +88,9 @@ public interface DragTableMapper
      * 根据tableKey批量删除动态表单详情
      */
     int deleteDragTableByTableKeys(List<String> tableKeys);
+
+    /**
+     * 根据tableKey批量获取动态表单详情
+     */
+    List<DragTableVo> selectDragTableTableKeysOrderby(List<String> tableKeys);
 }

+ 0 - 2
ruoyi-business/src/main/java/com/ruoyi/business/service/ICommonService.java

@@ -64,6 +64,4 @@ public interface ICommonService {
      */
     CommonEntity getInfoById(CommonEntity commonEntity);
 
-
-
 }

+ 1 - 0
ruoyi-business/src/main/java/com/ruoyi/business/service/IDragFormService.java

@@ -17,6 +17,7 @@ import java.util.List;
  * @date 2023-07-12
  */
 public interface IDragFormService {
+
     /**
      * 查询动态表单
      *

+ 0 - 7
ruoyi-business/src/main/java/com/ruoyi/business/service/IDragTableService.java

@@ -40,13 +40,6 @@ public interface IDragTableService
      */
     public int insertDragTable(DragTable dragTable);
 
-//    /**
-//     * 修改动态表格
-//     *
-//     * @param dragTable 动态表格
-//     * @return 结果
-//     */
-//    public int updateDragTable(DragTable dragTable);
 
     /**
      * 批量删除动态表格

+ 3 - 3
ruoyi-business/src/main/java/com/ruoyi/business/service/impl/CommonServiceImpl.java

@@ -89,7 +89,7 @@ public class CommonServiceImpl implements ICommonService {
         return commonMapper.batchDelete(tableName, conditions);
     }
 
-
+    @Override
     public List<CommonEntity> queryGroupTableList(CommonEntity commonEntity, TableSql tableSql) {
            //前端传递过来的参数
            Map<String, Object> queryMap = commonEntity.getQueryMap();
@@ -143,7 +143,7 @@ public class CommonServiceImpl implements ICommonService {
     @Override
     public void export(HttpServletResponse response, CommonEntity commonEntity) throws Exception {
         String sqlKey = commonEntity.getQueryMap().get("sqlkey").toString();
-//        String tableName = commonEntity.getQueryMap().get("tableName").toString();
+        //String tableName = commonEntity.getQueryMap().get("tableName").toString();
         //查询标题信息
         TableSql tableSql = tableSqlMapper.selectTableSqlByTSqlKey(sqlKey);
         if (tableSql == null) return;
@@ -158,7 +158,7 @@ public class CommonServiceImpl implements ICommonService {
             } catch (JsonProcessingException e) {
                 throw new RuntimeException(e);
             }
-//            mapList = commonEntity.getExeclMap();
+            //mapList = commonEntity.getExeclMap();
         } else {
             List<Map<String, Object>> maps = new ArrayList<>();
             List<CommonEntity> commonEntities = queryTableList(commonEntity, tableSql);

+ 1 - 3
ruoyi-business/src/main/java/com/ruoyi/business/service/impl/DragFormServiceImpl.java

@@ -109,9 +109,7 @@ public class DragFormServiceImpl implements IDragFormService {
 
     /**
      * 批量删除动态表单
-     *
-     * @param fIds 需要删除的动态表单
-     *             主键
+     * @param fIds 需要删除的动态表单 主键
      * @return 结果
      */
     @Override

+ 3 - 1
ruoyi-business/src/main/java/com/ruoyi/business/service/impl/DragTableBtnRelevanceServiceImpl.java

@@ -20,6 +20,7 @@ import java.util.List;
 @Service
 public class DragTableBtnRelevanceServiceImpl implements IDragTableBtnRelevanceService
 {
+
     @Autowired
     private DragTableBtnRelevanceMapper dragTableBtnRelevanceMapper;
 
@@ -91,7 +92,7 @@ public class DragTableBtnRelevanceServiceImpl implements IDragTableBtnRelevanceS
 
     /**
      * 删除动态格和动态格按钮关联信息
-     * 
+     *
      * @param tableKey 动态格和动态格按钮关联主键
      * @return 结果
      */
@@ -100,4 +101,5 @@ public class DragTableBtnRelevanceServiceImpl implements IDragTableBtnRelevanceS
     {
         return dragTableBtnRelevanceMapper.deleteDragTableBtnRelevanceByTableKey(tableKey);
     }
+
 }

+ 0 - 27
ruoyi-business/src/main/java/com/ruoyi/business/service/impl/DragTableBtnServiceImpl.java

@@ -85,33 +85,6 @@ public class DragTableBtnServiceImpl implements IDragTableBtnService
         return dragTableBtnMapper.insertDragTableBtn(dragTableBtn);
     }
 
-//    @Override
-//    @Transactional
-//    public void insertDragTableBtn(List<DragTableBtn> dragTableBtnList)
-//    {
-//        List<DragTableBtn> list = new ArrayList<>();
-//        list = dragTableBtnList.stream().filter(dragTableBtn -> 0L == dragTableBtn.getBtnParentId()).collect(Collectors.toList());
-//        //循环遍历数据新增
-//        for (int i = 0; i < list.size(); i++){
-//            printTree(list.get(i),0L);
-//        }
-//    }
-//    //新增动态表格自定义按钮
-//    public void printTree(DragTableBtn dragTableBtn, Long parentId) {
-//        if (dragTableBtn == null) {
-//            return;
-//        }
-//        //add按钮
-//        dragTableBtn.setCreateBy(SecurityUtils.getUsername());
-//        dragTableBtn.setCreateById(SecurityUtils.getUserId());
-//        dragTableBtn.setCreateTime(DateUtils.getNowDate());
-//        dragTableBtn.setBtnParentId(parentId);
-//        dragTableBtnMapper.insertDragTableBtn(dragTableBtn);
-//        for (DragTableBtn child : dragTableBtn.getChildren()) {  // 遍历子节点
-//            printTree(child,dragTableBtn.getId());  // 递归调用
-//        }
-//    }
-
     /**
      * 修改格绑定的自定义按钮
      * 

+ 1 - 0
ruoyi-business/src/main/java/com/ruoyi/business/service/impl/DragTableConditionServiceImpl.java

@@ -62,6 +62,7 @@ public class DragTableConditionServiceImpl implements IDragTableConditionService
     {
         Map<String, Object> conditions = JSONObject.parseObject(JSON.toJSONString(commonEntity.getConditionMap()));
         return dragTableConditionMapper.deleteDragTableConditionByTcIds(conditions);
+
     }
 
 

+ 6 - 7
ruoyi-business/src/main/java/com/ruoyi/business/service/impl/DragTableGroupServiceImpl.java

@@ -33,7 +33,6 @@ import java.util.stream.Collectors;
  * @date 2023-11-01 14:27
  * @Description:
  */
-
 @Service
 public class DragTableGroupServiceImpl implements IDragTableGroupService {
 
@@ -54,6 +53,7 @@ public class DragTableGroupServiceImpl implements IDragTableGroupService {
 
     @Autowired
     private IDragTableBtnRelevanceService dragTableBtnRelevanceService;
+
     /**
      * 查询拖拽格组
      *
@@ -148,12 +148,6 @@ public class DragTableGroupServiceImpl implements IDragTableGroupService {
         List<Long> dragTableIds = dragTableMapper.selectDragTableTableKeys(tableKeys)
                 .stream().map(item -> item.gettId()).collect(Collectors.toList());
         dragTableConditionMapper.deleteDragTableConditionBytIds(dragTableIds);
-        //删除sql数据
-        //Long[] dragTableIds1 = dragTableIds.toArray(new Long[0]);
-        //tableSqlMapper.deleteTableSqlByTIds(dragTableIds1);
-        //删除表格数据
-        //dragTableMapper.deleteDragTableByTableKeys(tableKeys);
-
         //优化逻辑 1、表格组信息 2、表格信息、条件信息、sql信息
         List<DragTableVo> dragTables = dragTableGroupVo.getDragTables();
         if (dragTables.size()>0) {
@@ -217,6 +211,11 @@ public class DragTableGroupServiceImpl implements IDragTableGroupService {
         return i;
     }
 
+    /**
+     * 修改弹窗表格的信息
+     * @param dragTableGroupVo 拖拽格组
+     * @return
+     */
     @Override
     public int editConfigurationGroup(DragTableGroupVo dragTableGroupVo) {
         //根据id查询表格组信息

+ 5 - 17
ruoyi-business/src/main/java/com/ruoyi/business/service/impl/DragTableServiceImpl.java

@@ -6,6 +6,7 @@ import com.ruoyi.business.entity.vo.DragTableGroupVo;
 import com.ruoyi.business.entity.vo.DragTableVo;
 import com.ruoyi.business.mapper.*;
 import com.ruoyi.business.service.IDragTableService;
+import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -25,6 +26,8 @@ import java.util.stream.Collectors;
  */
 @Service
 public class DragTableServiceImpl implements IDragTableService {
+
+
     @Autowired
     private DragTableMapper dragTableMapper;
 
@@ -82,22 +85,11 @@ public class DragTableServiceImpl implements IDragTableService {
      */
     @Override
     public int insertDragTable(DragTable dragTable) {
-        //dragTable.setCreateTime(DateUtils.getNowDate());
-        //dragTable.setCreateById(SecurityUtils.getUserId());
+        dragTable.setCreateTime(DateUtils.getNowDate());
+        dragTable.setCreateById(SecurityUtils.getUserId());
         return dragTableMapper.insertDragTable(dragTable);
     }
 
-//    /**
-//     * 修改动态表格
-//     *
-//     * @param dragTable 动态表格
-//     * @return 结果
-//     */
-//    @Override
-//    public int updateDragTable(DragTable dragTable) {
-//        dragTable.setUpdateTime(DateUtils.getNowDate());
-//        return dragTableMapper.updateDragTable(dragTable);
-//    }
 
     /**
      * 批量删除动态表格
@@ -153,10 +145,8 @@ public class DragTableServiceImpl implements IDragTableService {
         //根据tableKey获取根节点信息
         List<String> btnKeys = dragTableBtnRelevanceMapper.selectBtnKeyByTableKey(dragTable.getTableKey());
         //获取根节点数据
-        System.err.println(btnKeys.toString());
         if(btnKeys.size() > 0){
             List<DragTableBtn> rootNodes = dragTableBtnMapper.selectDragTableBtnListByBtnKey(btnKeys);
-            System.err.println(rootNodes.toString());
             //查询子节点
             List<Long> ids = rootNodes.stream().map(m -> m.getId()).collect(Collectors.toList());
             if (ids.isEmpty()){
@@ -229,7 +219,6 @@ public class DragTableServiceImpl implements IDragTableService {
                 }
                 break;
             case "ORACLE":
-//                SQL_START = "";
                 for (int i = 0; dragTableVo.getSearchFieldList().size() > i; i++) {
                     SQL += dragTableVo.getSearchFieldList().get(i);
                     SQL += (dragTableVo.getSearchFieldList().size() - 1 == i ? " " : "||");
@@ -365,7 +354,6 @@ public class DragTableServiceImpl implements IDragTableService {
                 }
                 break;
             case "ORACLE":
-//                SQL_START = "";
                 for (int i = 0; dragTableVo.getSearchFieldList().size() > i; i++) {
                     SQL += dragTableVo.getSearchFieldList().get(i);
                     SQL += (dragTableVo.getSearchFieldList().size() - 1 == i ? " " : "||");

+ 0 - 2
ruoyi-business/src/main/java/com/ruoyi/business/service/impl/DragTableStatisticServiceImpl.java

@@ -89,7 +89,6 @@ public class DragTableStatisticServiceImpl implements IDragTableStatisticService
                 }
                 break;
             case "ORACLE":
-//                SQL_START = "";
                 for (int i = 0; vo.getSearchFieldList().size() > i; i++) {
                     SQL += vo.getSearchFieldList().get(i);
                     SQL += (vo.getSearchFieldList().size() - 1 == i ? " " : "||");
@@ -126,7 +125,6 @@ public class DragTableStatisticServiceImpl implements IDragTableStatisticService
                 }
                 break;
             case "ORACLE":
-//                SQL_START = "";
                 for (int i = 0; vo.getSearchFieldList().size() > i; i++) {
                     SQL += vo.getSearchFieldList().get(i);
                     SQL += (vo.getSearchFieldList().size() - 1 == i ? " " : "||");

+ 1 - 0
ruoyi-business/src/main/java/com/ruoyi/business/service/impl/DragTableStyleServiceImpl.java

@@ -22,6 +22,7 @@ import java.util.List;
 @Service
 public class DragTableStyleServiceImpl implements IDragTableStyleService
 {
+
     @Autowired
     private DragTableStyleMapper dragTableStyleMapper;
 

+ 1 - 0
ruoyi-business/src/main/java/com/ruoyi/business/service/impl/TableSqlServiceImpl.java

@@ -96,4 +96,5 @@ public class TableSqlServiceImpl implements ITableSqlService {
     public int deleteTableSqlByTId(Long tId) {
         return tableSqlMapper.deleteTableSqlByTId(tId);
     }
+
 }

+ 24 - 0
ruoyi-business/src/main/resources/mapper/dragmapper/DragTableMapper.xml

@@ -199,4 +199,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{item}
         </foreach>
     </select>
+
+    <sql id="selectDragTableGroupVo">
+        select id, group_name, group_description,group_key, group_table_info,create_by_id, create_by, create_time, update_by_id, update_by, update_time from {DBNAME}.drag_table_group
+    </sql>
+
+    <select id="selectDragTableTableKeysOrderby" parameterType="list" resultMap="DragTableVoResult">
+        SELECT
+        dt.*,
+        ts.table_sql,
+        ts.table_export_field,
+        ts.order_by_column
+        FROM drag_table dt
+        LEFT JOIN table_sql ts ON dt.sql_key = ts.sql_key
+        where  table_key in
+        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+        order by field
+        (table_key,
+        <foreach collection="list" index="index" item="item" separator=","  close=")">
+            #{item}
+        </foreach>
+    </select>
+
 </mapper>

+ 31 - 0
ruoyi-common/src/main/java/com/ruoyi/common/config/form/FormProperties.java

@@ -0,0 +1,31 @@
+package com.ruoyi.common.config.form;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class FormProperties {
+
+    //开启流程
+    @Value("${bpm.runbpmurl}")
+    public String runBpmIp;
+
+    @Value("${script.runscripturl}")
+    public String runScriptIp;
+
+    public String getRunBpmIp() {
+        return runBpmIp;
+    }
+
+    public void setRunBpmIp(String runBpmIp) {
+        this.runBpmIp = runBpmIp;
+    }
+
+    public String getRunScriptIp() {
+        return runScriptIp;
+    }
+
+    public void setRunScriptIp(String runScriptIp) {
+        this.runScriptIp = runScriptIp;
+    }
+}

+ 7 - 0
ruoyi-common/src/main/java/com/ruoyi/common/constant/HttpStatus.java

@@ -101,4 +101,11 @@ public class HttpStatus
      * 系统警告消息:sql执行异常
      */
     public static final int SQLERROR = 603;
+
+    /**
+     * 系统警告消息:按钮执行逻辑异常
+     *
+     */
+    public static final int BTNERROR = 604;
+
 }

+ 15 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java

@@ -182,4 +182,19 @@ public class AjaxResult extends HashMap<String, Object>
         super.put(key, value);
         return this;
     }
+
+
+    /**
+     * 方便链式调用
+     *
+     * @param code 值
+     * @return 数据对象
+     */
+    public static AjaxResult btnMessage(int code) {
+        if (code > 0)
+            return new AjaxResult(HttpStatus.SUCCESS, "操作成功!");
+        else
+            return new AjaxResult(HttpStatus.BTNERROR, "操作失败!发生未知异常");
+    }
+
 }

+ 79 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/form/FromUtils.java

@@ -0,0 +1,79 @@
+package com.ruoyi.common.utils.form;
+
+import com.ruoyi.common.config.form.FormProperties;
+import com.ruoyi.common.utils.SecurityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.*;
+import org.springframework.stereotype.Component;
+import org.springframework.web.client.RestTemplate;
+
+import java.util.Map;
+
+
+/**
+ * 共通下发流程节点或脚本请求
+ *
+ * @param <T>
+ */
+@Component
+public class FromUtils<T> {
+
+    @Autowired  // 共通接口地址
+    private FormProperties formProperties;
+
+    // 创建RestTemplate实例
+    RestTemplate restTemplate = new RestTemplate();
+
+    /**
+     * 执行流程排产
+     */
+    public HttpStatus runBpmProductionScheduling(T param) {
+
+
+        // 得到当前用户的token  下发流程请求需要携带
+        String token = SecurityUtils.getLoginUser().getToken();
+
+        // 设置请求头
+        HttpHeaders headers = new HttpHeaders();
+        headers.set("Authorization", "XIAFA" + token);
+        // 构造请求体
+        // Map<String, Object> requestBody = new HashMap<>();
+        // 将请求体和请求头添加到HttpEntity
+        HttpEntity<Map<String, Object>> requestEntity = (HttpEntity<Map<String, Object>>) new HttpEntity<>(param, headers);
+        // 发送POST请求
+        ResponseEntity<String> response = restTemplate.exchange(formProperties.runBpmIp, HttpMethod.POST, requestEntity, String.class);
+        // 处理响应
+        if (response.getStatusCode().is2xxSuccessful()) {
+            return response.getStatusCode();
+        } else {
+            // System.out.println("Request failed with status code: " + response.getStatusCode());
+            return response.getStatusCode();
+        }
+    }
+
+    /**
+     * 触发脚本
+     */
+    public HttpStatus triggerScript(T param) {
+        // 得到当前用户的token  下发流程请求需要携带
+        String token = SecurityUtils.getLoginUser().getToken();
+        // 设置请求头
+        HttpHeaders headers = new HttpHeaders();
+        headers.set("Authorization", "XIAFA" + token);
+        // 构造请求体
+        // Map<String, Object> requestBody = new HashMap<>();
+        // 将请求体和请求头添加到HttpEntity
+        HttpEntity<Map<String, Object>> requestEntity = (HttpEntity<Map<String, Object>>) new HttpEntity<>(param, headers);
+        // 发送POST请求
+        ResponseEntity<String> response = restTemplate.exchange(formProperties.runScriptIp, HttpMethod.POST, requestEntity, String.class);
+        // 处理响应
+        if (response.getStatusCode().is2xxSuccessful()) {
+            String responseBody = response.getBody();
+            System.out.println("Response: " + responseBody);
+            return response.getStatusCode();
+        } else {
+            // System.out.println("Request failed with status code: " + response.getStatusCode());
+            return response.getStatusCode();
+        }
+    }
+}

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

@@ -14,11 +14,10 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
 VUE_APP_BASE_API1 = 'http://192.168.110.70:8066/'
 
 #数据引擎模块IP
-VUE_APP_BASE_API2 = 'http://192.168.110.70:8099/'
+VUE_APP_BASE_API2 = 'http://192.168.110.59:8099/'
 
-#表单引擎模块IP
-
-VUE_APP_BASE_API3 = 'http://192.168.110.70:8088/'
+#表单引擎模块IPe
+VUE_APP_BASE_API3 = 'http://192.168.110.59:8088/'
 
 #流程引擎模块IP
-VUE_APP_BASE_API4 = 'http://192.168.110.70:8055/'
+VUE_APP_BASE_API4 = 'http://192.168.110.59:8055/'

+ 11 - 0
ruoyi-ui/.env.production

@@ -6,3 +6,14 @@ ENV = 'production'
 
 #管理系统/生产环境
 VUE_APP_BASE_API = '/prod-api'
+
+
+
+#数据引擎模块IP
+#VUE_APP_BASE_API2 = '/DB'
+
+#表单引擎模块IP
+#VUE_APP_BASE_API3 = '/FORM'
+
+#流程引擎模块IP
+#VUE_APP_BASE_API4 = '/BPM'

+ 8 - 8
ruoyi-ui/src/api/system/tenant/type.js

@@ -6,7 +6,7 @@ export function listType(query) {
     url: '/system/dict/type/list',
     method: 'get',
     params: query,
-    baseURL: process.env.VUE_APP_BASE_API3
+    baseURL: process.env.VUE_APP_BASE_API1
   })
 }
 
@@ -15,7 +15,7 @@ export function getType(dictId) {
   return request({
     url: '/system/dict/type/' + dictId,
     method: 'get',
-    baseURL: process.env.VUE_APP_BASE_API3
+    baseURL: process.env.VUE_APP_BASE_API1
   })
 }
 
@@ -25,7 +25,7 @@ export function addType(data) {
     url: '/system/dict/type',
     method: 'post',
     data: data,
-    baseURL: process.env.VUE_APP_BASE_API3
+    baseURL: process.env.VUE_APP_BASE_API1
   })
 }
 
@@ -35,7 +35,7 @@ export function updateType(data) {
     url: '/system/dict/type',
     method: 'put',
     data: data,
-    baseURL: process.env.VUE_APP_BASE_API3
+    baseURL: process.env.VUE_APP_BASE_API1
   })
 }
 
@@ -44,7 +44,7 @@ export function delType(dictId) {
   return request({
     url: '/system/dict/type/' + dictId,
     method: 'delete',
-    baseURL: process.env.VUE_APP_BASE_API3
+    baseURL: process.env.VUE_APP_BASE_API1
   })
 }
 
@@ -53,7 +53,7 @@ export function refreshCache() {
   return request({
     url: '/system/dict/type/refreshCache',
     method: 'delete',
-    baseURL: process.env.VUE_APP_BASE_API3
+    baseURL: process.env.VUE_APP_BASE_API1
   })
 }
 
@@ -62,6 +62,6 @@ export function optionselect() {
   return request({
     url: '/system/dict/type/optionselect',
     method: 'get',
-    baseURL: process.env.VUE_APP_BASE_API3
+    baseURL: process.env.VUE_APP_BASE_API1
   })
-}
+}

+ 4 - 4
ruoyi-ui/src/api/tablelist/commonTable.js

@@ -17,7 +17,7 @@ export function unionListTableData(query) {
     url: '/dragform/common/getTableList',
     method: 'get',
     params: query,
-    baseURL: process.env.VUE_APP_BASE_API3
+    baseURL: process.env.VUE_APP_BASE_API1
   })
 }
 
@@ -27,7 +27,7 @@ export function dragTableInfo(query) {
     url: '/dragform/common/dragTableInfo',
     method: 'get',
     params: query,
-    baseURL: process.env.VUE_APP_BASE_API3
+    baseURL: process.env.VUE_APP_BASE_API1
   })
 }
 
@@ -204,7 +204,7 @@ export function getStatisticList(query) {
     url: '/system/statistic/getStatisticList',
     method: 'get',
     params: query,
-    baseURL: process.env.VUE_APP_BASE_API3
+    baseURL: process.env.VUE_APP_BASE_API1
   })
 }
 
@@ -214,6 +214,6 @@ export function btnCommonApi(data) {
     url: '/dragform/commonbtn/commonBtnHandle',
     method: 'post',
     data: data,
-    baseURL: process.env.VUE_APP_BASE_API3
+    baseURL: process.env.VUE_APP_BASE_API1
   })
 }

+ 40 - 5
ruoyi-ui/src/utils/bpmn/getNodeSequence.js

@@ -1,4 +1,4 @@
-
+import { getProcessEngine } from "@packages/bpmn-utils/BpmnDesignerUtils";
 export default function getNodeSequence(xmlObj) {
   if (!xmlObj.childNodes[0].childNodes[0]) return [];
   let nodeList = Array.from(xmlObj.childNodes[0].childNodes[0].childNodes)
@@ -13,6 +13,7 @@ export default function getNodeSequence(xmlObj) {
     nodeId: startNode.id,
     preNodeId: null,
     nextNodeId: nextNodeId,
+    nodeInfo: getNodeInfo(startNode.id, nodeList)
   })
   while (nextNodeId) {
     if (!nextNodeId) break
@@ -25,6 +26,7 @@ export default function getNodeSequence(xmlObj) {
         nodeId: currentId,
         preNodeId,
         nextNodeId,
+        nodeInfo: getNodeInfo(currentId, nodeList)
       }
     )
   }
@@ -33,10 +35,10 @@ export default function getNodeSequence(xmlObj) {
 
 }
 /**
- * 
- * @param {节点} node 
- * @param {true:下一个节点的id;false:上一个节点的id} flag 
- * @returns 
+ *
+ * @param {节点} node
+ * @param {true:下一个节点的id;false:上一个节点的id} flag
+ * @returns
  */
 const getNodeId = (node, flag, nodeList) => {
   let theTagName = flag ? 'bpmn:outgoing' : 'bpmn:incoming';
@@ -47,3 +49,36 @@ const getNodeId = (node, flag, nodeList) => {
   if (!targetId) return false;
   return targetId;
 }
+
+/**
+ *
+ * @param {节点Id} nodeId
+ * @param {节点列表} nodeList
+ */
+function getNodeInfo(nodeId, nodeList) {
+  let targetNode = nodeList.find(item => item.id == nodeId)
+  let prefix = getProcessEngine() + ':';
+  let id = targetNode.getAttribute('id')
+  let localName = targetNode.localName
+  let name = targetNode.getAttribute('name');
+  let nodeDescription = targetNode.getAttribute(prefix + 'nodeDescription')
+  let industryType = targetNode.getAttribute(prefix + 'IndustryType')
+  let normalScriptKey = targetNode.getAttribute(prefix + 'NormalScriptKey')
+  let normalScriptTriggerType = targetNode.getAttribute(prefix + 'NormalScriptTriggerType')
+  let executeUserType = targetNode.getAttribute(prefix + 'executeUserType')
+  let executeUser = targetNode.getAttribute(prefix + 'executeUser');
+  let virtuallyRole = targetNode.getAttribute(prefix + 'virtuallyRole')
+  let res = {
+    localName,//节点类型
+    id,//节点ID
+    name,//节点名称
+    nodeDescription,//节点表述
+    industryType,
+    normalScriptKey,//正常节点key
+    normalScriptTriggerType,//正常节点触发类型
+    executeUserType,//执行用户类型
+    executeUser,//执行用户
+    virtuallyRole,//虚拟角色
+  };
+  return res
+}

+ 15 - 1
ruoyi-ui/src/utils/bpmn/xml.js

@@ -2,7 +2,7 @@ import { catchError, catchWarning } from "./printCatch";
 
 export function emptyXML(key, name) {
   return `<?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions 
+<bpmn:definitions
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
   xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
@@ -31,3 +31,17 @@ export async function createNewDiagram(modeler, newXml, settings) {
     catchError(e);
   }
 }
+
+
+// xml字符串转xml对象
+export function xmlStr2XmlObj(xmlStr) {
+  var xmlObj = {};
+  if (document.all) {
+    var xmlDom = new ActiveXObject("Microsoft.XMLDOM");
+    xmlDom.loadXML(xmlStr);
+    xmlObj = xmlDom;
+  } else {
+    xmlObj = new DOMParser().parseFromString(xmlStr, "text/xml");
+  }
+  return xmlObj;
+}

+ 5 - 1
ruoyi-ui/src/utils/index.js

@@ -257,7 +257,7 @@ export function debounce(func, wait, immediate) {
   }
 }
 /**
- * 
+ *
  */
 export function throttle(fn, delay) {
   let timer = null;
@@ -411,6 +411,10 @@ export function isNumberStr(str) {
   return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str)
 }
 
+// 驼峰转下划线
+export function toUnderline(str = '') {
+  return str.replace(/([A-Z])/g, '_$1').toLowerCase()
+}
 
 
 export const $ = name => document.querySelector(name)

+ 6 - 6
ruoyi-ui/src/views/bussiness/processMange.vue

@@ -8,7 +8,7 @@
             <span class="title">我的处理</span>
             <span class="sub-title">需要我处理的管道</span>
           </div>
-          <span class="data">10</span>
+          <span class="data">{{tableData.length||0}}</span>
         </div>
       </el-col>
       <el-col :xs="24" :md="8" :xl="8" class="col">
@@ -26,7 +26,7 @@
             <span class="title">完成</span>
             <span class="sub-title">已经完成的管道</span>
           </div>
-          <span class="data">4</span>
+          <span class="data">0</span>
         </div>
       </el-col>
     </el-row>
@@ -193,10 +193,10 @@ export default {
           prop: "bepTaskKey",
           label: "任务编号",
         },
-        {
-          prop: "bepTaskName",
-          label: "任务名称",
-        },
+        //{
+        //  prop: "bepTaskName",
+        //  label: "任务名称",
+        //},
         {
           prop: "bepTaskProcessType",
           label: "任务流程类型",

+ 2 - 0
ruoyi-ui/src/views/tablelist/commonTable/listInfo.vue

@@ -1021,6 +1021,7 @@ export default {
             btnParametersMap: {},
           };
           if (this.currentBtnData.btnParams) {
+            console.log(this.currentBtnData.btnParams)
             let btnParams = JSON.parse(this.currentBtnData.btnParams);
             btnParams.forEach((item) => {
               data.btnParametersMap[
@@ -1030,6 +1031,7 @@ export default {
                 : this.currentRow[item.fieldName];
             });
           }
+          console.log(data)
           if (Object.keys(this.defaultValue).length) {
             //修改
             // 后台接收需要是表中字段真实的名称,无所谓驼峰。

+ 1 - 2
ruoyi-ui/vue.config.js

@@ -8,8 +8,7 @@ const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
 
 const CompressionPlugin = require('compression-webpack-plugin')
 
-// const name = process.env.VUE_APP_TITLE || '后台管理系统' // 网页标题
-const name = 'wu' // 网页标题
+ const name = process.env.VUE_APP_TITLE || '客户端系统' // 网页标题
 
 const port = process.env.port || process.env.npm_config_port || 80 // 端口
 const isDev = process.env.NODE_ENV !== "production";