Pārlūkot izejas kodu

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

Zn 1 gadu atpakaļ
vecāks
revīzija
b4e8c7caac
28 mainītis faili ar 907 papildinājumiem un 65 dzēšanām
  1. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
  2. 18 8
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java
  3. 16 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
  4. 1 1
      ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java
  5. 18 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java
  6. 8 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java
  7. 8 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java
  8. 25 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/ISysMenuService.java
  9. 8 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java
  10. 34 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
  11. 12 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java
  12. 12 2
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysTenantServiceImpl.java
  13. 16 1
      ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml
  14. 8 2
      ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml
  15. 7 0
      ruoyi-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml
  16. 36 0
      ruoyi-ui/src/router/index.js
  17. 1 2
      ruoyi-ui/src/utils/bpmn/formDataValidate.js
  18. 49 0
      ruoyi-ui/src/utils/bpmn/getNodeSequence.js
  19. 18 2
      ruoyi-ui/src/views/bpmprocess/components/preview.vue
  20. 44 35
      ruoyi-ui/src/views/bpmprocess/index.vue
  21. 61 0
      ruoyi-ui/src/views/bussiness/components/TaskItem.vue
  22. 230 0
      ruoyi-ui/src/views/bussiness/components/taskList.vue
  23. 140 0
      ruoyi-ui/src/views/bussiness/processMange.vue
  24. 127 0
      ruoyi-ui/src/views/bussiness/progressShow.vue
  25. 1 1
      ruoyi-ui/src/views/system/bpmnPro/components/Panel/components/ElementNormalTask.vue
  26. 8 4
      ruoyi-ui/src/views/system/bpmnPro/components/Toolbar/tools/Save.vue
  27. 0 1
      ruoyi-ui/src/views/system/tenant/code/index.vue
  28. 0 5
      ruoyi-ui/src/views/system/tenant/index.vue

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java

@@ -14,7 +14,7 @@ public class RuoYiApplication
 {
     public static void main(String[] args)
     {
-        // System.setProperty("spring.devtools.restart.enabled", "false");
+        //System.setProperty("spring.devtools.restart.enabled", "false");
         SpringApplication.run(RuoYiApplication.class, args);
         System.out.println("(♥◠‿◠)ノ゙  若依启动成功   ლ(´ڡ`ლ)゙  \n" +
                 " .-------.       ____     __        \n" +

+ 18 - 8
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java

@@ -6,14 +6,7 @@ import com.ruoyi.common.annotation.Anonymous;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.core.controller.BaseController;
@@ -129,6 +122,23 @@ public class SysMenuController extends BaseController {
         return toAjax(menuService.deleteMenuById(menuId));
     }
 
+    /**
+     * 批量删除菜单
+     */
+    @PreAuthorize("@ss.hasPermi('system:menu:remove')")
+    @Log(title = "菜单管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/removeBatch/{menuIds}")
+    public AjaxResult removeBatch(@PathVariable List<Long> menuIds) {
+        if(menuService.hasChildByMenuIdBatchRemove(menuIds)){
+            return warn("当前选择的菜单中、存在子菜单,不允许删除");
+        }
+        if(menuService.checkMenuExistRoleBatchRemove(menuIds)){
+            return warn("当前选择的菜单中、菜单已分配,不允许删除");
+        }
+        return toAjax(menuService.batchDeleteMenuByIds(menuIds));
+    }
+
+
     /**
      * 动态表格获取菜单
      */

+ 16 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java

@@ -3,6 +3,9 @@ package com.ruoyi.web.controller.system;
 import java.util.List;
 import java.util.stream.Collectors;
 import javax.servlet.http.HttpServletResponse;
+
+import com.alibaba.fastjson2.JSON;
+import com.ruoyi.common.annotation.Anonymous;
 import org.apache.commons.lang3.ArrayUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -233,6 +236,19 @@ public class SysUserController extends BaseController
         return ajax;
     }
 
+    /**
+     * BPM流程 根据用户编号获取授权角色
+     */
+    @Anonymous
+    @GetMapping("/roleKeyByUserId/{userId}")
+    public AjaxResult roleKeyByUserId(@PathVariable("userId") Long userId)
+    {
+        AjaxResult ajax = AjaxResult.success();
+        String[] strings = roleService.selectRolesKeyByUserId(userId);
+        ajax.put("rolesKey", JSON.toJSONString(strings));
+        return ajax;
+    }
+
     /**
      * 用户授权角色
      */

+ 1 - 1
ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java

@@ -215,7 +215,7 @@ public class GenUtils
      */
     public static String replaceText(String text)
     {
-        return RegExUtils.replaceAll(text, "(?:若依)", "");
+        return RegExUtils.replaceAll(text, "(?:表|若依)", "");
     }
 
     /**

+ 18 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java

@@ -105,6 +105,14 @@ public interface SysMenuMapper {
      */
     public int hasChildByMenuId(Long menuId);
 
+    /**
+     * 批量删除判断是否存在菜单子节点
+     *
+     * @param menuIds 菜单ID
+     * @return 结果
+     */
+    public int hasChildByMenuIdBatchRemove(List<Long> menuIds);
+
     /**
      * 新增菜单信息
      *
@@ -129,6 +137,14 @@ public interface SysMenuMapper {
      */
     public int deleteMenuById(Long menuId);
 
+    /**
+     * 批量删除菜单管理信息
+     *
+     * @param menuIds 菜单ID
+     * @return 结果
+     */
+    int batchDeleteMenuById(List<Long> menuIds);
+
     /**
      * 校验菜单名称是否唯一
      *
@@ -155,4 +171,6 @@ public interface SysMenuMapper {
      * 根据菜单编号查询
      */
     List<SysMenu> selectMenusByIds(List<Long> ids);
+
+
 }

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java

@@ -105,4 +105,12 @@ public interface SysRoleMapper {
      * @return 结果
      */
     public int deleteRoleByIds(Long[] roleIds);
+
+    /**
+     * 根据用户ID查询该用户具备的role_key
+     *
+     * @param userId 需要删除的角色ID
+     * @return 结果
+     */
+    public String[] selectUserRoleKeyByUserId(Long userId);
 }

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java

@@ -18,6 +18,14 @@ public interface SysRoleMenuMapper
      */
     public int checkMenuExistRole(Long menuId);
 
+    /**
+     * 批量删除查询菜单使用数量
+     *
+     * @param menuIds 菜单ID集合
+     * @return 结果
+     */
+    public int checkMenuExistRoleBatchRemove(List menuIds);
+
     /**
      * 通过角色ID删除角色和菜单关联
      * 

+ 25 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysMenuService.java

@@ -102,6 +102,15 @@ public interface ISysMenuService
      */
     public boolean hasChildByMenuId(Long menuId);
 
+    /**
+     * 批量删除判断是否存在菜单子节点
+     *
+     * @param menuIds 菜单ID集合
+     * @return 结果 true 存在 false 不存在
+     */
+    public boolean hasChildByMenuIdBatchRemove(List<Long> menuIds);
+
+
     /**
      * 查询菜单是否存在角色
      * 
@@ -110,6 +119,14 @@ public interface ISysMenuService
      */
     public boolean checkMenuExistRole(Long menuId);
 
+    /**
+     * 批量删除查询菜单是否存在角色
+     *
+     * @param menuIds 菜单ID 集合
+     * @return 结果 true 存在 false 不存在
+     */
+    public boolean checkMenuExistRoleBatchRemove(List<Long> menuIds);
+
     /**
      * 新增保存菜单信息
      * 
@@ -134,6 +151,14 @@ public interface ISysMenuService
      */
     public int deleteMenuById(Long menuId);
 
+    /**
+     * 批量删除菜单管理信息
+     *
+     * @param menuIds 菜单ID
+     * @return 结果
+     */
+    public int batchDeleteMenuByIds(List<Long> menuIds);
+
     /**
      * 校验菜单名称是否唯一
      * 

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java

@@ -28,6 +28,14 @@ public interface ISysRoleService
      */
     public List<SysRole> selectRolesByUserId(Long userId);
 
+    /**
+     * 根据用户ID查询角色列表key
+     *
+     * @param userId 用户ID
+     * @return 角色列表
+     */
+    public String[] selectRolesKeyByUserId(Long userId);
+
     /**
      * 根据用户ID查询角色权限
      * 

+ 34 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java

@@ -266,6 +266,18 @@ public class SysMenuServiceImpl implements ISysMenuService {
         return result > 0;
     }
 
+    /**
+     * 批量删除是否存在菜单子节点
+     *
+     * @param menuIds 菜单ID
+     * @return 结果
+     */
+    @Override
+    public boolean hasChildByMenuIdBatchRemove(List<Long> menuIds) {
+        int result = menuMapper.hasChildByMenuIdBatchRemove(menuIds);
+        return result > 0;
+    }
+
     /**
      * 查询菜单使用数量
      *
@@ -278,6 +290,18 @@ public class SysMenuServiceImpl implements ISysMenuService {
         return result > 0;
     }
 
+    /**
+     * 批量删除查询菜单使用数量
+     *
+     * @param menuIds 菜单ID 集合
+     * @return 结果
+     */
+    @Override
+    public boolean checkMenuExistRoleBatchRemove(List<Long> menuIds) {
+        int result = roleMenuMapper.checkMenuExistRoleBatchRemove(menuIds);
+        return result > 0;
+    }
+
     /**
      * 新增保存菜单信息
      *
@@ -310,6 +334,16 @@ public class SysMenuServiceImpl implements ISysMenuService {
     public int deleteMenuById(Long menuId) {
         return menuMapper.deleteMenuById(menuId);
     }
+    /**
+     * 批量删除菜单管理信息
+     *
+     * @param menuIds 菜单ID
+     * @return 结果
+     */
+    @Override
+    public int batchDeleteMenuByIds(List<Long> menuIds) {
+        return menuMapper.batchDeleteMenuById(menuIds);
+    }
 
     /**
      * 校验菜单名称是否唯一

+ 12 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java

@@ -78,6 +78,18 @@ public class SysRoleServiceImpl implements ISysRoleService {
         return roles;
     }
 
+    /**
+     * 根据用户ID查询角色列表key
+     *
+     * @param userId 用户ID
+     * @return 角色列表
+     */
+    @Override
+    public String[] selectRolesKeyByUserId(Long userId) {
+        String[] strings = roleMapper.selectUserRoleKeyByUserId(userId);
+        return strings;
+    }
+
     /**
      * 根据用户ID查询权限
      *

+ 12 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysTenantServiceImpl.java

@@ -236,7 +236,7 @@ public class SysTenantServiceImpl implements ISysTenantService
     @Override
     public AjaxResult activationOperation(String tenantId, String activationCode) throws Exception {
         String activeCode="active:code:"+activationCode;//魔法值后期抽出来
-        String strCode = stringRedisTemplate.opsForValue().get(activationCode);
+        String strCode = stringRedisTemplate.opsForValue().get(activeCode);
         if(StringUtils.isNotEmpty(strCode)){
             return AjaxResult.error("当前激活码已经被使用过了不能重复使用");
         }
@@ -330,6 +330,16 @@ public class SysTenantServiceImpl implements ISysTenantService
     }
 
 
-
+    public static void main(String[] args) {
+        //校验充值天数是否正确
+        SymmetricCrypto symmetricCrypto = new SymmetricCrypto(SymmetricAlgorithm.DES, "sgEsnN6QWq8W7j5H01020304".getBytes());
+        String a = symmetricCrypto.decryptStr("facb3dad9a590c24584416fd0e9690e6ad8116cefdd53d5f");
+        System.out.println(a);
+        //判断如果用户过期了
+        LocalDateTime activeDateTime = LocalDateTimeUtil.offset(LocalDateTime.now(), -100, ChronoUnit.DAYS);
+        String activeDateTimeStr = DateUtils.toLocalDateTimeStr(activeDateTime);
+        String newActiveDateTimeStr= symmetricCrypto.encryptHex(activeDateTimeStr);
+        System.out.println(newActiveDateTimeStr);
+    }
 
 }

+ 16 - 1
ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml

@@ -170,8 +170,16 @@
 	</select>
 	
 	<select id="hasChildByMenuId" resultType="Integer">
-	    select count(1) from sys_menu where parent_id = #{menuId}  
+	    select count(1) from sys_menu where parent_id = #{menuId}
 	</select>
+
+	<select id="hasChildByMenuIdBatchRemove" resultType="Integer" parameterType="java.util.List">
+		select count(1) from sys_menu where parent_id in
+		<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
+			#{item}
+		</foreach>
+	</select>
+
 <!--	<include refid="selectMenuVo"/>-->
 	<select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult">
         SELECT sys.menu_id,
@@ -266,6 +274,13 @@
 	    delete from sys_menu where menu_id = #{menuId}
 	</delete>
 
+	<delete id="batchDeleteMenuById" parameterType="java.util.List">
+		delete from sys_menu where menu_id in
+		<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
+			#{item}
+		</foreach>
+	</delete>
+
 	<select id="getMenuList" resultMap="SysMenuResult">
 		SELECT
 			m.menu_id,

+ 8 - 2
ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml

@@ -98,8 +98,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<include refid="selectRoleVo"/>
 		 where r.role_key=#{roleKey} and r.del_flag = '0' and r.tenant_id = #{tenantId} limit 1
 	</select>
-	
- 	<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
+	<select id="selectUserRoleKeyByUserId"  resultType="string" parameterType="long">
+		SELECT sr.role_key FROM `sys_user` as sy
+				inner JOIN  sys_user_role  sur on (sy.user_id=sur.user_id)
+				inner join  sys_role       sr  on (sur.role_id=sr.role_id)  where sy.user_id=#{userId}
+	</select>
+
+
+	<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
  		insert into sys_role(
  			<if test="roleId != null and roleId != 0">role_id,</if>
  			<if test="roleName != null and roleName != ''">role_name,</if>

+ 7 - 0
ruoyi-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml

@@ -13,6 +13,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	    select count(1) from sys_role_menu where menu_id = #{menuId}
 	</select>
 
+	<select id="checkMenuExistRoleBatchRemove" resultType="Integer" parameterType="java.util.List">
+		select count(1) from sys_role_menu where menu_id in
+		<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
+			#{item, jdbcType=VARCHAR}
+		</foreach>
+	</select>
+
 	<delete id="deleteRoleMenuByRoleId" parameterType="Long">
 		delete from sys_role_menu where role_id=#{roleId}
 	</delete>

+ 36 - 0
ruoyi-ui/src/router/index.js

@@ -72,6 +72,42 @@ export const constantRoutes = [
       }
     ]
   },
+  {
+    path: '/progressShow',
+    component: Layout,
+    hidden: true,
+    name: 'progressShow',
+    meta: {
+      title: "管道展示",
+      icon: "form",
+      noCache: false,
+      link: null
+    },
+    children: [
+      {
+        path: 'index',
+        component: () => import('@/views/bussiness/progressShow'),
+      }
+    ]
+  },
+  {
+    path: '/processMange',
+    component: Layout,
+    hidden: true,
+    name: 'processMange',
+    meta: {
+      title: "管道流程",
+      icon: "form",
+      noCache: false,
+      link: null
+    },
+    children: [
+      {
+        path: 'index',
+        component: () => import('@/views/bussiness/processMange'),
+      }
+    ]
+  },
   // {
   //   path: '/bpmn',
   //   component: Layout,

+ 1 - 2
ruoyi-ui/src/utils/bpmn/formDataValidate.js

@@ -15,8 +15,7 @@ export function formDataValidate(obj) {
   // 校验节点名不能为空
   try {
     rootElements[0].flowElements.forEach(item => {
-      console.log(item);
-      if (!item.name) {
+      if (!item.name && item.$type.split(':')[1] != 'SequenceFlow') {
         res.flag = false;
         res.msg = `${customTranslate(item.$type.split(':')[1])}的节点名不能为空!`
         console.log(res);

+ 49 - 0
ruoyi-ui/src/utils/bpmn/getNodeSequence.js

@@ -0,0 +1,49 @@
+
+export default function getNodeSequence(xmlObj) {
+  if (!xmlObj.childNodes[0].childNodes[0]) return [];
+  let nodeList = Array.from(xmlObj.childNodes[0].childNodes[0].childNodes)
+  let res = [];
+  let startNode = nodeList.find((item) => item.tagName == 'bpmn:startEvent');
+  if (!startNode) {
+    console.log('缺少开始节点');
+    return;
+  }
+  let nextNodeId = getNodeId(startNode, true, nodeList);
+  res.push({
+    nodeId: startNode.id,
+    preNodeId: null,
+    nextNodeId: nextNodeId,
+  })
+  while (nextNodeId) {
+    if (!nextNodeId) break
+    let currentId = nextNodeId;
+    let currentNode = nodeList.find(item => item.id == currentId);
+    nextNodeId = getNodeId(currentNode, true, nodeList);
+    let preNodeId = getNodeId(currentNode, false, nodeList);
+    res.push(
+      {
+        nodeId: currentId,
+        preNodeId,
+        nextNodeId,
+      }
+    )
+  }
+  console.log(res);
+  return res
+
+}
+/**
+ * 
+ * @param {节点} node 
+ * @param {true:下一个节点的id;false:上一个节点的id} flag 
+ * @returns 
+ */
+const getNodeId = (node, flag, nodeList) => {
+  let theTagName = flag ? 'bpmn:outgoing' : 'bpmn:incoming';
+  let childNodeList = Array.from(node.childNodes);
+  let FlowId = childNodeList.find(item => item.tagName == theTagName)?.firstChild?.data;//找到指入或指出箭头节点
+  if (!FlowId) return false;
+  let targetId = nodeList.find(item => item.id == FlowId)?.getAttribute(flag ? 'targetRef' : 'sourceRef')
+  if (!targetId) return false;
+  return targetId;
+}

+ 18 - 2
ruoyi-ui/src/views/bpmprocess/components/preview.vue

@@ -7,6 +7,9 @@
       >缩小</el-button
     >
     <el-button type="info" size="small" @click="handleZoom(1)">适中</el-button>
+    <el-button type="danger" size="small" @click="closeHandler"
+      >退出预览</el-button
+    >
     <div id="canvas" class="canvas" ref="canvas"></div>
   </div>
 </template>
@@ -71,7 +74,7 @@ export default {
         return;
       }
       // 放大缩小倍数flag可以自行设置
-      if (flag < 0 && this.scale <= 1) {
+      if (flag < 0 && this.scale <= 0.5) {
         return;
       }
       this.scale += flag;
@@ -88,15 +91,28 @@ export default {
     destroyPreventMenu() {
       document.body.removeEventListener("contextmenu", this.Provence);
     },
+
+    closeHandler() {
+      this.$emit("preCloseHandler");
+    },
   },
 };
 </script>
 
 <style scoped lang="scss">
+.main-box {
+  width: 100%;
+  height: 100vh;
+}
 .canvas {
   margin: 10px;
+  width: 100%;
+  height: 100%;
+}
+::v-deep .bjs-container {
+  height: 100% !important;
 }
->>> .nodeSuccess:not(.djs-connection) {
+::v-deep .nodeSuccess:not(.djs-connection) {
   .djs-visual {
     > :nth-child(1) {
       stroke: #f70e0e !important;

+ 44 - 35
ruoyi-ui/src/views/bpmprocess/index.vue

@@ -270,14 +270,15 @@
     <el-dialog
       :title="previewData.processName"
       :visible.sync="preOpen"
-      width="70%"
+      width="100%"
+      height="100%"
       append-to-body
     >
-      <Preview ref="previewRef"></Preview>
+      <Preview ref="previewRef" @preCloseHandler="preCloseHandler"></Preview>
       <template #footer>
-        <span>
+        <!-- <span>
           <el-button @click="preCloseHandler">关闭</el-button>
-        </span>
+        </span> -->
       </template>
     </el-dialog>
 
@@ -484,43 +485,48 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
-
       let endFormData = {
         // 节点脚本关联表
-        BpmNodeExceptionList: [{
-          id:null,
-          nodeKey: null,           // 节点别名
-          scriptKey: null,         // 脚本别名
-          scriptTriggerType: null  // 脚本触发机制(0:手动 1:自动)
-        }],
+        BpmNodeExceptionList: [
+          {
+            id: null,
+            nodeKey: null, // 节点别名
+            scriptKey: null, // 脚本别名
+            scriptTriggerType: null, // 脚本触发机制(0:手动 1:自动)
+          },
+        ],
         // 节点操作人 -》 数据传输分两种情况:1.当前节点勾选了指定用户,就需要前端生成一个虚拟的角色编码、以及指定的用户id、真实的角色编码null即可
         // 2.当前节点根据角色勾选的执行人,就需要存贮真实的角色权限字符 生成一个虚拟的角色编码,其他为null即可
         // 节点处理人表
-        BpmNodeHandleUser: [{
-          id:null,
-          virtuallyRole: null,  // 前端生成的虚拟角色编码
-          realRole: null,       // 真实的角色编码  [1,2,3]/[1]
-          executeUserNo: null   // 用户编码  [1,2,3]/[1]
-        }],
+        BpmNodeHandleUser: [
+          {
+            id: null,
+            virtuallyRole: null, // 前端生成的虚拟角色编码
+            realRole: null, // 真实的角色编码  [1,2,3]/[1]
+            executeUserNo: null, // 用户编码  [1,2,3]/[1]
+          },
+        ],
         // 所有节点表
-        BpmProcessConfigurationList: [{
-          id:null,
-          nodeKey: null,          // 节点别名
-          nodeName: null,         // 节点名称
-          nodeFormKey: null,      // 节点表单别名
-          nodeProcessKey: null,   // 流程别名
-          nodeType: null,         // 节点类型(判断节点、正常节点。。。)根据字典维护
-          nodeBefor: null,        // 节点前
-          nodeAfter: null,        // 节点后
-          nodeRolePermission: null,// 节点对应的角色权限字符(只存虚拟角色编码)
-          spare1: null,             // 备用列
-          spare2: null,
-          spare3: null,
-          createBy: null,            // 创建者
-          updateBy: null,            // 修改者
-          remark: null              // 节点描述
-        }]
-      }
+        BpmProcessConfigurationList: [
+          {
+            id: null,
+            nodeKey: null, // 节点别名
+            nodeName: null, // 节点名称
+            nodeFormKey: null, // 节点表单别名
+            nodeProcessKey: null, // 流程别名
+            nodeType: null, // 节点类型(判断节点、正常节点。。。)根据字典维护
+            nodeBefor: null, // 节点前
+            nodeAfter: null, // 节点后
+            nodeRolePermission: null, // 节点对应的角色权限字符(只存虚拟角色编码)
+            spare1: null, // 备用列
+            spare2: null,
+            spare3: null,
+            createBy: null, // 创建者
+            updateBy: null, // 修改者
+            remark: null, // 节点描述
+          },
+        ],
+      };
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -754,4 +760,7 @@ export default {
 ::v-deep .el-form-item__label {
   width: 98px !important;
 }
+::v-deep .el-dialog {
+  margin-top: 0px !important;
+}
 </style>

+ 61 - 0
ruoyi-ui/src/views/bussiness/components/TaskItem.vue

@@ -0,0 +1,61 @@
+<template>
+  <div class="task-item-wrap">
+    <div class="task-title">
+      <span>{{ itemData.index }}.</span>
+      <span>工艺校验</span>
+    </div>
+    <div class="msg-list">
+      <div class="msg-item">
+        <i class="el-icon-user-solid icon"></i>
+        <span>admin</span>
+      </div>
+      <div class="msg-item">
+        <i class="el-icon-s-help icon"></i>
+        <span>任务类</span>
+      </div>
+      <div class="msg-item">
+        <i class="el-icon-success icon"></i>
+        <!-- <span>admin</span> -->
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "TaskItem",
+  props: ["itemData", "index"],
+  components: {},
+  data() {
+    return {};
+  },
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style scoped lang="scss">
+.task-item-wrap {
+  background-color: #cdf1e5 !important;
+  padding: 12px 16px;
+  flex: 1;
+  box-sizing: border-box;
+  // margin-right: 15px;
+  .task-title {
+    font-size: 14px;
+    font-weight: 600;
+    color: #454545;
+  }
+  .msg-list {
+    display: flex;
+    flex-direction: column;
+    margin-top: 8px;
+    color: #666;
+    .msg-item {
+      .icon {
+        margin-right: 5px;
+      }
+    }
+  }
+}
+</style>

+ 230 - 0
ruoyi-ui/src/views/bussiness/components/taskList.vue

@@ -0,0 +1,230 @@
+<template>
+  <div class="task-list-wrap">
+    <div class="title-list">
+      <div class="title-item">
+        <span class="title-label">任务号:</span>
+        <span class="title-content">47AS04-51-1299_002</span>
+      </div>
+      <div class="title-item">
+        <span class="title-label">图号:</span>
+        <span class="title-content">1CG312-99</span>
+      </div>
+      <div class="title-item">
+        <span class="title-label">任务名称:</span>
+        <span class="title-content">支架</span>
+      </div>
+      <div class="title-item">
+        <span class="title-label">数量:</span>
+        <span class="title-content">3</span>
+      </div>
+      <div class="title-item">
+        <span class="title-label">完成时间:</span>
+        <span class="title-content">2023年11月1日</span>
+      </div>
+    </div>
+    <div class="card-list-wrap">
+      <div class="prev">
+        <i class="el-icon-arrow-left icon" @click="prevOrNext(-1)"></i>
+      </div>
+      <div class="card-list">
+        <TaskItem
+          class="card-item"
+          v-for="(item, index) of tempList"
+          :key="item.taskKey"
+          :itemData="item"
+          :index="index + 1"
+        ></TaskItem>
+      </div>
+      <div class="next">
+        <i class="el-icon-arrow-right icon" @click="prevOrNext(1)"></i>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import uuid from "@/utils/bpmn/uuid";
+import TaskItem from "./TaskItem.vue";
+import { start } from "nprogress";
+export default {
+  name: "TaskList",
+  props: [],
+  components: { TaskItem },
+  data() {
+    return {
+      start: 0,
+      end: 5,
+      taskItemList: [
+        {
+          index: 1,
+          title: "工艺校验",
+          taskKey: uuid(),
+          excuteUser: "admin",
+          taskType: "工艺类",
+          taskstatus: true,
+        },
+        {
+          index: 2,
+          title: "工艺校验",
+          taskKey: uuid(),
+          excuteUser: "admin",
+          taskType: "工艺类",
+          taskstatus: true,
+        },
+        {
+          index: 3,
+          title: "工艺校验",
+          taskKey: uuid(),
+          excuteUser: "admin",
+          taskType: "工艺类",
+          taskstatus: true,
+        },
+        {
+          index: 4,
+          title: "工艺校验",
+          taskKey: uuid(),
+          excuteUser: "admin",
+          taskType: "工艺类",
+          taskstatus: true,
+        },
+        {
+          index: 5,
+          title: "工艺校验",
+          taskKey: uuid(),
+          excuteUser: "admin",
+          taskType: "工艺类",
+          taskstatus: true,
+        },
+        {
+          index: 6,
+          title: "工艺校验",
+          taskKey: uuid(),
+          excuteUser: "admin",
+          taskType: "工艺类",
+          taskstatus: true,
+        },
+        {
+          index: 7,
+          title: "工艺校验",
+          taskKey: uuid(),
+          excuteUser: "admin",
+          taskType: "工艺类",
+          taskstatus: true,
+        },
+        {
+          index: 8,
+          title: "工艺校验",
+          taskKey: uuid(),
+          excuteUser: "admin",
+          taskType: "工艺类",
+          taskstatus: true,
+        },
+        {
+          index: 9,
+          title: "工艺校验",
+          taskKey: uuid(),
+          excuteUser: "admin",
+          taskType: "工艺类",
+          taskstatus: true,
+        },
+        {
+          index: 10,
+          title: "工艺校验",
+          taskKey: uuid(),
+          excuteUser: "admin",
+          taskType: "工艺类",
+          taskstatus: true,
+        },
+      ],
+    };
+  },
+  computed: {
+    tempList() {
+      return this.taskItemList.slice(this.start, this.end);
+    },
+  },
+  methods: {
+    prevOrNext(flag) {
+      if (flag == 1) {
+        if (this.end >= this.taskItemList.length) return;
+        this.start++;
+        this.end++;
+      } else {
+        if (this.start == 0) return;
+        this.start--;
+        this.end--;
+      }
+    },
+  },
+};
+</script>
+
+<style scoped lang="scss">
+.task-list-wrap {
+  display: flex;
+  flex-direction: column;
+  width: 100%;
+  .title-list {
+    display: flex;
+    height: 34px;
+    align-items: center;
+    .title-item {
+      display: flex;
+      align-items: center;
+      margin-right: 30px;
+      font-size: 16px;
+      font-weight: 600;
+      .title-label {
+        margin-right: 10px;
+      }
+      &:last-child {
+        margin-right: 0;
+      }
+    }
+  }
+  .card-list-wrap {
+    margin: 5px 0 30px;
+    // height: 120px;
+    background: #fefefe;
+    padding: 8px 5px;
+    border-radius: 4px;
+    position: relative;
+    box-shadow: inset 0 0 0 2px #eaeaea;
+    .prev {
+      position: absolute;
+      left: 0;
+      top: 50%;
+      transform: translateY(-50%);
+      font-size: 40px;
+      font-weight: 600;
+    }
+    .next {
+      position: absolute;
+      right: 0;
+      top: 50%;
+      transform: translateY(-50%);
+      font-size: 40px;
+    }
+    .icon {
+      cursor: pointer;
+      &:hover {
+        color: #4cc7ec;
+      }
+    }
+    .card-list {
+      width: auto;
+      padding: 0 26px;
+      height: 100%;
+      overflow: hidden;
+      display: flex;
+      // justify-content: space-around;\
+      .card-item {
+        margin-right: 15px;
+        &:last-child {
+          margin-right: 0;
+        }
+      }
+    }
+  }
+}
+</style>

+ 140 - 0
ruoyi-ui/src/views/bussiness/processMange.vue

@@ -0,0 +1,140 @@
+<template>
+  <div class="process-mange-wrap">
+    <!-- <el-card shadow="always" :body-style="{ padding: '20px' }"> -->
+    <el-row>
+      <el-col :xs="24" :md="8" :xl="8" class="col">
+        <div class="statistic-wrap">
+          <div class="discription">
+            <span class="title">我的处理</span>
+            <span class="sub-title">需要我处理的管道</span>
+          </div>
+          <span class="data">10</span>
+        </div>
+      </el-col>
+      <el-col :xs="24" :md="8" :xl="8" class="col">
+        <div class="statistic-wrap">
+          <div class="discription">
+            <span class="title">其它处理</span>
+            <span class="sub-title">需要其他人处理的管道</span>
+          </div>
+          <span class="data">0</span>
+        </div>
+      </el-col>
+      <el-col :xs="24" :md="8" :xl="8" class="col">
+        <div class="statistic-wrap">
+          <div class="discription">
+            <span class="title">完成</span>
+            <span class="sub-title">已经完成的管道</span>
+          </div>
+          <span class="data">4</span>
+        </div>
+      </el-col>
+    </el-row>
+    <!-- </el-card> -->
+    <div class="main-area">
+      <div class="show-header">
+        <h3 class="header">管道列表</h3>
+        <div class="search-list">
+          <div class="search-tab">
+            <el-radio-group v-model="taskType">
+              <el-radio-button :label="1">我的处理</el-radio-button>
+              <el-radio-button :label="2">其他处理</el-radio-button>
+            </el-radio-group>
+            <el-radio-group class="btn-list-two" v-model="taskStatus">
+              <el-radio-button :label="3">已完成</el-radio-button>
+              <el-radio-button :label="4">进行中</el-radio-button>
+            </el-radio-group>
+          </div>
+          <div class="search-input">
+            <el-input placeholder="请输入..." v-model="queryString">
+              <el-button slot="append" icon="el-icon-search"></el-button>
+            </el-input>
+          </div>
+        </div>
+      </div>
+      <div class="show-body"></div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "processMange",
+  props: [],
+  components: {},
+  data() {
+    return {
+      taskType: 1,
+      queryString: "",
+      taskStatus: 3,
+    };
+  },
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style scoped lang="scss">
+.process-mange-wrap {
+  background-color: #f2f3f8;
+  padding: 20px;
+  .col {
+    background-color: #fff;
+    border-right: 1px solid #ebedf2;
+    // margin-right: 3px;
+    .statistic-wrap {
+      // height: 70px;
+      box-sizing: border-box;
+      display: flex;
+      align-items: center;
+      padding: 10px 17px;
+      justify-content: space-between;
+      .discription {
+        display: flex;
+        flex-direction: column;
+        .title {
+          line-height: 20px;
+          font-size: 18px;
+          font-weight: 700;
+          margin-bottom: 5px;
+        }
+        .sub-title {
+          font-size: 14px;
+        }
+      }
+      .data {
+        font-size: 20px;
+        font-weight: 700;
+      }
+    }
+  }
+
+  .main-area {
+    margin-top: 30px;
+    box-shadow: 0 1px 15px 1px rgb(69 65 78 / 8%);
+    background-color: #fff;
+    .show-header {
+      border-bottom: 1px solid #ebedf2;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 20px 0px 20px;
+      height: 70px;
+      .header {
+      }
+      .search-list {
+        display: flex;
+        .search-tab {
+          margin-right: 20px;
+          .btn-list-two {
+            margin-left: 10px;
+          }
+        }
+      }
+    }
+    .show-body {
+      padding: 25px;
+    }
+  }
+}
+</style>

+ 127 - 0
ruoyi-ui/src/views/bussiness/progressShow.vue

@@ -0,0 +1,127 @@
+<template>
+  <div class="app-container">
+    <div class="main-area">
+      <div class="show-header">
+        <div class="tag-list">
+          <div class="tag-item">
+            <!-- <div class="circle"></div> -->
+            <i class="el-icon-circle-check icon"></i>
+            <span>已完成</span>
+          </div>
+          <div class="tag-item">
+            <i class="el-icon-warning icon"></i>
+            <span>触发异常</span>
+          </div>
+          <div class="tag-item">
+            <i class="el-icon-warning-outline icon"></i>
+            <span>新插入</span>
+          </div>
+          <div class="tag-item">
+            <span class="current-node">当前节点</span>
+          </div>
+        </div>
+        <div class="search-list">
+          <div class="search-tab">
+            <el-radio-group v-model="processType">
+              <el-radio-button :label="1">进行</el-radio-button>
+              <el-radio-button :label="2">完成</el-radio-button>
+            </el-radio-group>
+          </div>
+          <div class="search-input">
+            <el-input placeholder="请输入..." v-model="queryString">
+              <el-button slot="append" icon="el-icon-search"></el-button>
+            </el-input>
+          </div>
+        </div>
+      </div>
+      <div class="show-body">
+        <TaskList v-for="i of 5" :key="i"></TaskList>
+        <pagination
+          v-show="total > 0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import TaskList from "./components/taskList.vue";
+export default {
+  name: "ProgressShow",
+  props: [],
+  components: { TaskList },
+  data() {
+    return {
+      processType: 1,
+      queryString: "",
+      total: 1,
+      queryParams: {
+        pageNum: 1,
+        pageSize: 5,
+      },
+    };
+  },
+  computed: {},
+  methods: {
+    getList() {},
+  },
+};
+</script>
+
+<style scoped lang="scss">
+.app-container {
+  padding: 15px 15px;
+  box-sizing: border-box;
+  .main-area {
+    box-shadow: 0 1px 15px 1px rgb(69 65 78 / 8%);
+    background-color: #fff;
+    .show-header {
+      border-bottom: 1px solid #ebedf2;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 20px 0px 20px;
+      height: 50px;
+      .tag-list {
+        display: flex;
+        align-items: center;
+        .tag-item {
+          display: flex;
+          align-items: center;
+          margin-right: 15px;
+          font-size: 16px;
+          .circle {
+            width: 15px;
+            height: 15px;
+            background-color: rgb(104, 221, 104);
+            border-radius: 50%;
+            margin-right: 5px;
+          }
+          .icon {
+            margin-right: 5px;
+          }
+          .current-node {
+            display: inline-block;
+            border: 2px solid #34bfa3;
+            padding: 2px 5px;
+            margin: 2px 40px 2px 10px;
+          }
+        }
+      }
+      .search-list {
+        display: flex;
+        .search-tab {
+          margin-right: 20px;
+        }
+      }
+    }
+    .show-body {
+      padding: 25px;
+    }
+  }
+}
+</style>

+ 1 - 1
ruoyi-ui/src/views/system/bpmnPro/components/Panel/components/ElementNormalTask.vue

@@ -2,7 +2,7 @@
   <el-collapse-item name="element-normal-task">
     <template #title>
       <collapse-title title="执行任务">
-        <lucide-icon name="FileSpreadsheet" />
+        <lucide-icon name="File" />
       </collapse-title>
     </template>
     <div class="element-normal-task">

+ 8 - 4
ruoyi-ui/src/views/system/bpmnPro/components/Toolbar/tools/Save.vue

@@ -16,6 +16,7 @@ import { getProcessEngine } from "@packages/bpmn-utils/BpmnDesignerUtils";
 import EventEmitter from "@utils/EventEmitter";
 import { formDataValidate } from "@utils/formDataValidate";
 import { getNodeMsg, filterNodeMsg } from "@packages/bo-utils/getNodeMsg";
+import getNodeSequence from "@/utils/bpmn/getNodeSequence";
 
 import moment from "moment";
 export default {
@@ -105,8 +106,6 @@ export default {
       let formData = _this.formData() || {}; // 当前流程表单详细数据
       let processJsonObj = await this.getProcessJson(); // xml标签转换json
       let validateRes = formDataValidate(processJsonObj);
-      console.log(validateRes);
-      return;
       if (!validateRes.flag) {
         this.$message.error(validateRes.msg);
         return;
@@ -127,8 +126,8 @@ export default {
       // 获取xml标签内容标签内容
       let xmlPro = await this.getProcess("xml");
       var xmlObj = this.xmlStr2XmlObj(xmlPro);
-
-      // this.saveNodeMsg(xmlObj);
+      // 生成节点顺序
+      getNodeSequence(xmlObj);
       // return;
       formData.startEventType =
         xmlObj
@@ -176,8 +175,12 @@ export default {
       if (!data.bpmProcessConfigurationList.length) return;
       data.bpmProcessConfigurationList.forEach((item) => {
         item.createBy = this.$store.state.user.name;
+        item.createById = this.$store.state.user.userId;
         item.nodeProcessKey = obj.getElementsByTagName("bpmn:process")[0].id;
         item.createTime = moment().format("YYYY-MM-DD HH:mm:ss");
+        item.updateBy = this.$store.state.user.name;
+        item.updateById = this.$store.state.user.userId;
+        item.updateTime = moment().format("YYYY-MM-DD HH:mm:ss");
       });
       try {
         let res = await addConfiguration(data);
@@ -191,6 +194,7 @@ export default {
       if (!theData.bpmProcessConfigurationList.length) return;
       theData.bpmProcessConfigurationList.forEach((item) => {
         item.updateBy = this.$store.state.user.name;
+        item.updateById = this.$store.state.user.userId;
         item.nodeProcessKey = obj.getElementsByTagName("bpmn:process")[0].id;
         item.updateTime = moment().format("YYYY-MM-DD HH:mm:ss");
       });

+ 0 - 1
ruoyi-ui/src/views/system/tenant/code/index.vue

@@ -218,7 +218,6 @@ export default {
       });
       clipboard.on('success', () => {
         this.activationCodeForm=false;
-        console.log('');
         this.$message({showClose: true, message: '文本已成功复制到剪贴板', type: 'success'});
         clipboard.destroy(); //清除 Clipboard 实例
       });

+ 0 - 5
ruoyi-ui/src/views/system/tenant/index.vue

@@ -745,19 +745,14 @@ export default {
     /**打开激活码弹窗*/
     openTenantExpirationTime(row) {
       this.reset();
-      console.log(this)
       const tenantId = row.tenantId || this.ids;
-      console.log(tenantId)
       this.tenantExpirationTimeFrom.tenantId= row.tenantId
       this.tenantExpirationTimeOpen=true;
       this.title="激活租户";
     },
     /**激活租户操作*/
     activationOperationMethod(){
-      console.log("激活租户");
-      console.log(this.tenantExpirationTimeFrom.tenantExpirationTime);
       this.$refs["form"].validate((valid) => {
-        console.log(valid)
         if (valid) {
           activationOperation(this.tenantExpirationTimeFrom).then((response) => {
             this.$modal.msgSuccess("激活成功");