فهرست منبع

Merge remote-tracking branch 'origin/master'

Administrator 4 سال پیش
والد
کامیت
cbe501cf35
30فایلهای تغییر یافته به همراه848 افزوده شده و 93 حذف شده
  1. 15 0
      boman-api/boman-api-system/src/main/java/com/boman/system/api/domain/SysMenu.java
  2. 6 0
      boman-api/boman-domain/pom.xml
  3. 52 2
      boman-api/boman-domain/src/main/java/com.boman.domain/RoleEnum.java
  4. 3 0
      boman-api/boman-domain/src/main/java/com.boman.domain/constant/FormDataConstant.java
  5. 18 0
      boman-api/boman-domain/src/main/java/com.boman.domain/constant/GlobalBtn.java
  6. 13 0
      boman-api/boman-domain/src/main/java/com.boman.domain/constant/TableNameConst.java
  7. 38 0
      boman-api/boman-domain/src/main/java/com.boman.domain/dto/RoleMenuDto.java
  8. 16 0
      boman-modules/boman-system/src/main/java/com/boman/system/controller/SysMenuController.java
  9. 10 2
      boman-modules/boman-system/src/main/java/com/boman/system/controller/SysRoleMenuController.java
  10. 4 2
      boman-modules/boman-system/src/main/java/com/boman/system/service/ISysMenuService.java
  11. 8 7
      boman-modules/boman-system/src/main/java/com/boman/system/service/impl/ISysRoleMenuService.java
  12. 103 18
      boman-modules/boman-system/src/main/java/com/boman/system/service/impl/SysMenuServiceImpl.java
  13. 47 10
      boman-modules/boman-system/src/main/java/com/boman/system/service/impl/SysRoleMenuServiceImpl.java
  14. 2 3
      ruoyi-ui/package.json
  15. BIN
      ruoyi-ui/src/assets/images/pic_sy_shz.png
  16. BIN
      ruoyi-ui/src/assets/images/pic_sy_ybh.png
  17. BIN
      ruoyi-ui/src/assets/images/pic_sy_ytj.png
  18. 11 11
      ruoyi-ui/src/components/FlowChartShow/index.vue
  19. 2 1
      ruoyi-ui/src/components/FormItemComponent/index.vue
  20. 13 8
      ruoyi-ui/src/components/HistoricalProcess/index.vue
  21. 1 1
      ruoyi-ui/src/components/ItemComponent/index.vue
  22. 9 6
      ruoyi-ui/src/components/MutipleSelectPop/index.vue
  23. 9 6
      ruoyi-ui/src/components/mutipleSelectPop/index.vue
  24. 9 3
      ruoyi-ui/src/components/todoProcess/index.vue
  25. 321 0
      ruoyi-ui/src/props/index.js
  26. 123 0
      ruoyi-ui/src/utils/layoutAlgorithm.js
  27. 1 1
      ruoyi-ui/src/views/system/editing/index.vue
  28. 1 1
      ruoyi-ui/src/views/system/form/index.vue
  29. 7 5
      ruoyi-ui/src/views/system/surface/index.vue
  30. 6 6
      ruoyi-ui/src/views/system/table/index.vue

+ 15 - 0
boman-api/boman-api-system/src/main/java/com/boman/system/api/domain/SysMenu.java

@@ -75,6 +75,21 @@ public class SysMenu extends BaseEntity
      */
     private String sysTableName;
 
+    /**
+     * true 此表中有此菜单并且选中
+     * false 此表中有此菜单,但是未选择
+     * 0 此表中无此菜单
+     */
+    private List<Object> containsHead;
+
+    public List<Object> getContainsHead() {
+        return containsHead;
+    }
+
+    public void setContainsHead(List<Object> containsHead) {
+        this.containsHead = containsHead;
+    }
+
     public String getSysTableName() {
         return sysTableName;
     }

+ 6 - 0
boman-api/boman-domain/pom.xml

@@ -21,6 +21,12 @@
             <artifactId>boman-common-core</artifactId>
             <version>2.5.0-SNAPSHOT</version>
         </dependency>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.18.4</version>
+        </dependency>
     </dependencies>
 
 </project>

+ 52 - 2
boman-api/boman-domain/src/main/java/com.boman.domain/RoleEnum.java

@@ -1,22 +1,33 @@
 package com.boman.domain;
 
+import java.util.*;
+import java.util.stream.Collectors;
+
 /**
  * @author tjf
  * @Date: 2021/04/22/15:16
  */
 public enum RoleEnum {
 
+    /** 新增 */
     A("A","新增"),
+    /** 修改 */
     M("M","修改"),
+    /** 删除 */
     D("D","删除"),
+    /** 查询 */
     Q("Q","查询"),
+    /** 提交 */
     S("S","提交"),
+    /** 反提交 */
     U("U","反提交"),
+    /** 导入 */
     I("I","导入"),
+    /** 导出 */
     E("E","导出");
 
-    private String role;
-    private String name;
+    private final String role;
+    private final String name;
 
     RoleEnum(String role, String name) {
         this.role = role;
@@ -46,4 +57,43 @@ public enum RoleEnum {
         }
         return null;
     }
+
+    /**
+     * 功能描述: 拿到所有的名称 eg: 新增、修改.....
+     *
+     * @param
+     * @return java.util.List<java.lang.String>
+     */
+    public static List<String> names(){
+        RoleEnum[] values = RoleEnum.values();
+        return Arrays.stream(values).map(RoleEnum::getName).collect(Collectors.toList());
+    }
+
+    /**
+     * 功能描述: 拿到所有的roles, 顺序很重要
+     * eg: A、M.....
+     *
+     * @return java.util.List<java.lang.String>
+     */
+    public static List<String> roles(){
+        RoleEnum[] values = RoleEnum.values();
+        return Arrays.stream(values).map(RoleEnum::getRole).collect(Collectors.toList());
+    }
+
+    /**
+     * 功能描述: 拿到所有的roles eg: A、M.....
+     *
+     * @return java.util.List<java.lang.String>
+     */
+    public static List<Map<String, String>> all() {
+        RoleEnum[] values = RoleEnum.values();
+        List<Map<String, String>> result = new ArrayList<>(values.length);
+        for (RoleEnum value : values) {
+            Map<String, String> map = new HashMap<>(2);
+            map.put("name", value.name);
+            map.put("role", value.role);
+            result.add(map);
+        }
+        return result;
+    }
 }

+ 3 - 0
boman-api/boman-domain/src/main/java/com.boman.domain/constant/FormDataConstant.java

@@ -186,4 +186,7 @@ public class FormDataConstant {
     public static final String BLUR = "blur";
     public static final String REQUIRED = "required";
 
+    /** 冒号 */
+    public static final String COLON = ":";
+
 }

+ 18 - 0
boman-api/boman-domain/src/main/java/com.boman.domain/constant/GlobalBtn.java

@@ -0,0 +1,18 @@
+package com.boman.domain.constant;
+
+/**
+ * @author shiqian
+ * @date 2021年05月06日 15:28
+ **/
+public class GlobalBtn {
+
+    public static final String A = "A";
+    public static final String M = "M";
+    public static final String D = "D";
+    public static final String Q = "Q";
+    public static final String S = "S";
+    public static final String U = "U";
+    public static final String I = "I";
+    public static final String E = "E";
+
+}

+ 13 - 0
boman-api/boman-domain/src/main/java/com.boman.domain/constant/TableNameConst.java

@@ -0,0 +1,13 @@
+package com.boman.domain.constant;
+
+/**
+ * @author shiqian
+ * @date 2021年05月06日 09:21
+ **/
+public class TableNameConst {
+
+
+    public static final String ID = "id";
+
+    public static final String SYS_ROLE_MENU = "sys_role_menu";
+}

+ 38 - 0
boman-api/boman-domain/src/main/java/com.boman.domain/dto/RoleMenuDto.java

@@ -0,0 +1,38 @@
+package com.boman.domain.dto;
+
+import lombok.Data;
+
+import java.util.List;
+
+import static com.boman.common.core.utils.obj.ObjectUtils.requireNonNull;
+import static com.boman.domain.constant.FormDataConstant.COLON;
+
+/**
+ * @author shiqian
+ * @date 2021年05月06日 17:25
+ **/
+@Data
+public class RoleMenuDto {
+
+    private Long menuId;
+    private List<String> head;
+
+    public static String getBtnFromPerms(String perms) {
+        // sys_user:A
+        requireNonNull(perms, "权限标识为空");
+        String[] split = perms.split(COLON);
+        assert split.length == 2;
+        // A
+        return split[1];
+    }
+
+    public static String getTableNameFromPerms(String perms) {
+        // sys_user:A
+        requireNonNull(perms, "权限标识为空");
+        String[] split = perms.split(COLON);
+        assert split.length == 2;
+        // sys_user
+        return split[0];
+    }
+
+}

+ 16 - 0
boman-modules/boman-system/src/main/java/com/boman/system/controller/SysMenuController.java

@@ -100,10 +100,26 @@ public class SysMenuController extends BaseController
         return ajax;
     }
 
+    /**
+     * 功能描述: 根据菜单id,找到此菜单以及子菜单下所有的叶子节点
+     *
+     * @param menuId menuId
+     * @return com.boman.common.core.web.domain.AjaxResult
+     */
     @GetMapping(value = "/allLeafNodeById/{menuId}")
     public AjaxResult allLeafNodeById(@PathVariable("menuId") Long menuId) {
         return AjaxResult.success(menuService.allLeafNodeById(menuId));
     }
+    /**
+     * 功能描述: 根据菜单id,找到此菜单以及子菜单下所有的叶子节点, 同时匹配叶子结点对应的头部的规则
+     *
+     * @param menuId menuId
+     * @return com.boman.common.core.web.domain.AjaxResult
+     */
+    @GetMapping(value = "/listMenus/{menuId}")
+    public AjaxResult listMenus(@PathVariable("menuId") Long menuId) {
+        return AjaxResult.success(menuService.listMenus(menuId));
+    }
 
     /**
      * 新增菜单

+ 10 - 2
boman-modules/boman-system/src/main/java/com/boman/system/controller/SysRoleMenuController.java

@@ -1,6 +1,7 @@
 package com.boman.system.controller;
 
 import com.boman.common.core.web.domain.AjaxResult;
+import com.boman.domain.dto.RoleMenuDto;
 import com.boman.system.domain.SysRoleMenu;
 import com.boman.system.service.impl.ISysRoleMenuService;
 import org.slf4j.Logger;
@@ -25,8 +26,15 @@ public class SysRoleMenuController {
 
     @Resource
     private ISysRoleMenuService service;
+
+    /**
+     * 功能描述: 批量保存roleMenu
+     *
+     * @param dto dto
+     * @return com.boman.common.core.web.domain.AjaxResult
+     */
     @PostMapping
-    public AjaxResult list(@RequestBody List<SysRoleMenu> roleMenuList) {
-        return AjaxResult.success(service.saveList(roleMenuList));
+    public AjaxResult list(@RequestBody RoleMenuDto dto) {
+        return AjaxResult.success(service.saveList(dto));
     }
 }

+ 4 - 2
boman-modules/boman-system/src/main/java/com/boman/system/service/ISysMenuService.java

@@ -1,6 +1,7 @@
 package com.boman.system.service;
 
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 
@@ -52,10 +53,10 @@ public interface ISysMenuService
     public List<SysMenu> selectMenuTreeById(Long id);
 
     /**
-     * 根据用户ID查询菜单树信息
+     * 功能描述: 根据菜单id,找到此菜单以及子菜单下所有的叶子节点
      *
      * @param menuId menuId
-     * @return 菜单列表
+     * @return java.util.List<com.boman.system.api.domain.SysMenu>
      */
     List<SysMenu> allLeafNodeById(Long menuId);
 
@@ -164,4 +165,5 @@ public interface ISysMenuService
      */
     public String checkMenuNameUnique(SysMenu menu);
 
+    Map<String, Object> listMenus(Long menuId);
 }

+ 8 - 7
boman-modules/boman-system/src/main/java/com/boman/system/service/impl/ISysRoleMenuService.java

@@ -1,5 +1,6 @@
 package com.boman.system.service.impl;
 
+import com.boman.domain.dto.RoleMenuDto;
 import com.boman.system.domain.SysRoleMenu;
 
 import java.util.List;
@@ -11,13 +12,13 @@ import java.util.List;
  */
 public interface ISysRoleMenuService {
 
-    /**
-     * 功能描述: 批量保存roleMenu
-     *
-     * @param roleMenuList roleMenuList
-     * @return boolean
-     */
-    int saveList(List<SysRoleMenu> roleMenuList);
+   /**
+    * 功能描述: 批量保存roleMenu
+    *
+    * @param dto dto
+    * @return int
+    */
+    int saveList(RoleMenuDto dto);
 
 
 }

+ 103 - 18
boman-modules/boman-system/src/main/java/com/boman/system/service/impl/SysMenuServiceImpl.java

@@ -3,10 +3,16 @@ package com.boman.system.service.impl;
 import java.util.*;
 import java.util.stream.Collectors;
 
-import com.boman.common.core.utils.obj.ObjectUtils;
 import com.boman.common.core.web.domain.AjaxResult;
+import com.boman.common.redis.RedisKey;
+import com.boman.common.redis.service.RedisService;
+import com.boman.domain.GenTable;
+import com.boman.domain.RoleEnum;
+import com.boman.domain.constant.GlobalBtn;
+import com.boman.domain.dto.RoleMenuDto;
 import com.boman.system.api.domain.SysMenu;
 import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.boman.common.core.constant.UserConstants;
@@ -22,6 +28,11 @@ import com.boman.system.mapper.SysRoleMapper;
 import com.boman.system.mapper.SysRoleMenuMapper;
 import com.boman.system.service.ISysMenuService;
 
+import javax.annotation.Resource;
+
+import static com.boman.common.core.utils.obj.ObjectUtils.*;
+import static com.boman.domain.constant.FormDataConstant.COLON;
+
 /**
  * 菜单 业务层处理
  *
@@ -39,6 +50,8 @@ public class SysMenuServiceImpl implements ISysMenuService {
 
     @Autowired
     private SysRoleMenuMapper roleMenuMapper;
+    @Resource
+    private RedisService redisService;
 
     /**
      * 根据用户查询系统菜单列表
@@ -111,37 +124,38 @@ public class SysMenuServiceImpl implements ISysMenuService {
     }
 
     /**
-     * 根据用户ID查询菜单树信息
+     * 功能描述: 根据菜单id,找到此菜单以及子菜单下所有的叶子节点
      *
      * @param menuId menuId
-     * @return 菜单列表
+     * @return java.util.List<com.boman.system.api.domain.SysMenu>
      */
     @Override
     public List<SysMenu> allLeafNodeById(Long menuId) {
-        List<SysMenu> tempList = Lists.newArrayListWithCapacity(16);
         SysMenu menu = selectMenuById(menuId);
         List<SysMenu> menus = menuMapper.selectMenuList(new SysMenu());
-        List<SysMenu> sysMenus = recursionList(menus, menu, tempList);
-        return ObjectUtils.filter(sysMenus, menu1 -> SysMenu.BUTTON.equals(menu1.getMenuType()));
+        List<SysMenu> tempList = Lists.newArrayListWithCapacity(16);
+        recursionList(menus, menu, tempList);
+        // 把父亲去掉
+        if (tempList.size() > 1) {
+            tempList.remove(0);
+        }
+
+        return tempList;
     }
 
-    private List<SysMenu> recursionList(List<SysMenu> menus, SysMenu menu, List<SysMenu> tempList) {
-        int child = 0;
+    private void recursionList(List<SysMenu> menus, SysMenu menu, List<SysMenu> tempList) {
         // 得到子节点列表
         List<SysMenu> childList = getChildList(menus, menu);
+        if (isEmpty(childList)) {
+            return;
+        }
+
+        tempList.add(menu);
         for (SysMenu tChild : childList) {
             if (hasChild(menus, tChild)) {
                 recursionList(menus, tChild, tempList);
-            } else {
-                child++;
             }
         }
-
-        if (child == childList.size() && childList.size() != 0) {
-            tempList.addAll(childList);
-        }
-
-        return tempList;
     }
 
     /**
@@ -207,7 +221,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
     @Override
     public List<SysMenu> buildMenuTree(List<SysMenu> menus) {
         List<SysMenu> returnList = new ArrayList<>();
-        List<Long> allMenuId = ObjectUtils.map(menus, SysMenu::getId);
+        List<Long> allMenuId = map(menus, SysMenu::getId);
         for (SysMenu menu : menus) {
             // 如果是顶级节点, 遍历该父节点的所有子节点
             if (!allMenuId.contains(menu.getParentId())) {
@@ -228,7 +242,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
     @Override
     public List<SysMenu> buildMenuTreeNotAddLeafNode(List<SysMenu> menus) {
         List<SysMenu> returnList = new ArrayList<>();
-        List<Long> allMenuId = ObjectUtils.map(menus, SysMenu::getId);
+        List<Long> allMenuId = map(menus, SysMenu::getId);
         for (SysMenu menu : menus) {
             // 如果是顶级节点, 遍历该父节点的所有子节点
             if (!allMenuId.contains(menu.getParentId())) {
@@ -517,4 +531,75 @@ public class SysMenuServiceImpl implements ISysMenuService {
     private boolean hasChild(List<SysMenu> list, SysMenu t) {
         return getChildList(list, t).size() > 0;
     }
+
+    @Override
+    public Map<String, Object> listMenus(Long menuId) {
+        SysMenu menu = selectMenuById(menuId);
+        List<SysMenu> menus = menuMapper.selectMenuList(new SysMenu());
+        List<SysMenu> tempList = Lists.newArrayListWithCapacity(16);
+        recursionList(menus, menu, tempList);
+        // 把父亲去掉
+        if (tempList.size() > 1) {
+            tempList.remove(0);
+        }
+
+        Map<String, Object> result = Maps.newHashMapWithExpectedSize(2);
+        result.put("heads", RoleEnum.all());
+        if (isEmpty(tempList)) {
+            result.put("sysMenus", tempList);
+            return result;
+        }
+
+        for (SysMenu sysMenu : tempList) {
+            List<Object> containsHead = Lists.newArrayList("0", "0", "0", "0", "0", "0", "0", "0");
+            List<SysMenu> childList = getChildList(menus, sysMenu);
+            for (SysMenu childMenu : childList) {
+                String btn = RoleMenuDto.getBtnFromPerms(childMenu.getPerms());
+                String tableName = RoleMenuDto.getTableNameFromPerms(childMenu.getPerms());
+                GenTable genTable = redisService.getCacheObject(RedisKey.TABLE_INFO + tableName);
+                String menuRole = genTable.getMenuRole();
+                if (menuRole.contains(btn)) {
+                    switchBtn(containsHead, btn, true);
+                } else {
+                    switchBtn(containsHead, btn, false);
+                }
+            }
+
+            sysMenu.setContainsHead(containsHead);
+        }
+        result.put("sysMenus", tempList);
+        return result;
+    }
+
+    private void switchBtn(List<Object> containsHead, String btn, Object value) {
+        switch (btn) {
+            case GlobalBtn.A:
+                containsHead.set(0, value);
+                break;
+            case GlobalBtn.M:
+                containsHead.set(1, value);
+                break;
+            case GlobalBtn.D:
+                containsHead.set(2, value);
+                break;
+            case GlobalBtn.Q:
+                containsHead.set(3, value);
+                break;
+            case GlobalBtn.S:
+                containsHead.set(4, value);
+                break;
+            case GlobalBtn.U:
+                containsHead.set(5, value);
+                break;
+            case GlobalBtn.I:
+                containsHead.set(6, value);
+                break;
+            case GlobalBtn.E:
+                containsHead.set(7, value);
+                break;
+            default:
+                break;
+        }
+    }
+
 }

+ 47 - 10
boman-modules/boman-system/src/main/java/com/boman/system/service/impl/SysRoleMenuServiceImpl.java

@@ -1,7 +1,11 @@
 package com.boman.system.service.impl;
 
+import com.boman.domain.constant.TableNameConst;
+import com.boman.domain.dto.RoleMenuDto;
+import com.boman.system.api.domain.SysMenu;
 import com.boman.system.domain.SysRoleMenu;
 import com.boman.system.mapper.SysRoleMenuMapper;
+import com.boman.system.service.ISysMenuService;
 import com.boman.web.core.api.RemoteObjService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -11,6 +15,7 @@ import javax.annotation.Resource;
 import java.util.List;
 
 import static com.boman.common.core.utils.obj.ObjectUtils.isEmpty;
+import static com.boman.common.core.utils.obj.ObjectUtils.requireNonNull;
 
 /**
  * @author shiqian
@@ -25,23 +30,55 @@ public class SysRoleMenuServiceImpl implements ISysRoleMenuService{
     private SysRoleMenuMapper mapper;
     @Resource
     private RemoteObjService remoteObjService;
+    @Resource
+    private ISysMenuService menuService;
+
     /**
      * 功能描述: 批量保存roleMenu
      *
-     * @param roleMenuList roleMenuList
+     * @param dto dto
      * @return int
      */
     @Override
-    public int saveList(List<SysRoleMenu> roleMenuList) {
-        if (isEmpty(roleMenuList)) {
-            return 0;
-        }
+    public int saveList(RoleMenuDto dto) {
+//        for (SysRoleMenu sysRoleMenu : roleMenuList) {
+//            Long maxId = remoteObjService.getMaxId(TableNameConst.SYS_ROLE_MENU, TableNameConst.ID);
+//            sysRoleMenu.setId(maxId);
+//        }
+//
+//        return mapper.batchRoleMenu(roleMenuList);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        Long menuId = dto.getMenuId();
+        SysMenu menu = menuService.selectMenuById(menuId);
+        requireNonNull(menu, "根据menuId = [" + menuId + "], 未找到菜单");
+        String perms = menu.getPerms();
+        requireNonNull(perms, "权限标识为空");
+        List<String> head = dto.getHead();
+        requireNonNull(head, "操作为空");
+
+        String btn = RoleMenuDto.getBtnFromPerms(menu.getPerms());
+        String tableName = RoleMenuDto.getTableNameFromPerms(menu.getPerms());
+
+
 
-        for (SysRoleMenu sysRoleMenu : roleMenuList) {
-            Long maxId = remoteObjService.getMaxId("sys_role_menu", "id");
-            sysRoleMenu.setId(maxId);
-        }
 
-        return mapper.batchRoleMenu(roleMenuList);
+        return 0;
     }
 }

+ 2 - 3
ruoyi-ui/package.json

@@ -38,7 +38,7 @@
   "dependencies": {
     "@riophae/vue-treeselect": "0.4.0",
     "axios": "0.21.0",
-    "burgeon-ui": "^1.0.56",
+    "burgeon-ui": "1.0.46",
     "clipboard": "2.0.6",
     "core-js": "3.8.1",
     "echarts": "4.9.0",
@@ -58,8 +58,7 @@
     "vue-cropper": "0.5.5",
     "vue-router": "3.4.9",
     "vuedraggable": "2.24.3",
-    "vuex": "3.6.0",
-    "burgeon-ui": "1.0.46"
+    "vuex": "3.6.0"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "4.4.6",

BIN
ruoyi-ui/src/assets/images/pic_sy_shz.png


BIN
ruoyi-ui/src/assets/images/pic_sy_ybh.png


BIN
ruoyi-ui/src/assets/images/pic_sy_ytj.png


+ 11 - 11
ruoyi-ui/src/components/FlowChartShow/index.vue

@@ -217,18 +217,18 @@ export default {
       let id = this.instanceId?this.instanceId:this.$route.query.instanceId
       addGenflowshow({instanceId:id})
         .then(res => {
-          if(res.data.resultCode === 0){
-            let guiStyle = res.data.data.guiStyle?JSON.parse(res.data.data.guiStyle):{}
-            let approvalHistory = res.data.data.guiValue?res.data.data.guiValue:[]
+          if(res.resultCode === 0){
+            let guiStyle = res.data.guiStyle?JSON.parse(res.data.guiStyle):{}
+            let approvalHistory = res.data.guiValue?res.data.guiValue:[]
             this.myDiagram = Object.assign(this.myDiagram,guiStyle)
             this.approvalHistory = approvalHistory
-            if(res.data.data.showNodes.indexOf(res.data.data.currentNode) >= 0){
-              res.data.data.showNodes.splice(res.data.data.showNodes.findIndex(item => item === res.data.data.currentNode), 1)
+            if(res.data.showNodes.indexOf(res.data.currentNode) >= 0){
+              res.data.showNodes.splice(res.data.showNodes.findIndex(item => item === res.data.data.currentNode), 1)
             }
-            res.data.data.showNodes.push(res.data.data.currentNode)
-            this.showNodes = res.data.data.showNodes
-            this.processStatus = res.data.data.processStatus
-            switch(res.data.data.processStatus){
+            res.data.showNodes.push(res.data.currentNode)
+            this.showNodes = res.data.showNodes
+            this.processStatus = res.data.processStatus
+            switch(res.data.processStatus){
               case 0:
                 this.processStyle = {
                   color:'#C8C8C8'
@@ -257,9 +257,9 @@ export default {
                 };
                 break;
             }
-            this.processStatusName = res.data.data.processStatusName
+            this.processStatusName = res.data.processStatusName
             this.myDisplay = new FlowDisplay('myFlowDesignerDiv');
-            this.showFlowPath(this.myDisplay,res.data.data.currentNode)
+            this.showFlowPath(this.myDisplay,res.data.currentNode)
           }
         });
 

+ 2 - 1
ruoyi-ui/src/components/FormItemComponent/index.vue

@@ -28,7 +28,7 @@
 </template>
 <script>
 import Vue from "vue";
-import layoutAlgorithm from "@/api/layoutAlgorithm";
+import layoutAlgorithm from "../../utils/layoutAlgorithm.js";
 export default {
   name: "FormItemComponent",
   props: {
@@ -146,3 +146,4 @@ export default {
   grid-auto-rows: minmax(auto);
 }
 </style>
+

+ 13 - 8
ruoyi-ui/src/components/HistoricalProcess/index.vue

@@ -8,7 +8,7 @@
       :buttonType="false"
       @formChange="formChange"
     ></FormItemComponent>
-    <StandardTable
+    <StandardTabletwo
       class="table"
       :currentPage="searchData.page"
       :pageSize="searchData.pageSize"
@@ -16,7 +16,7 @@
       :columns="columns"
       :data="data"
       :standardTableEvent="standardTableEvent"
-    ></StandardTable>
+    ></StandardTabletwo>
 
     <!-- 详情弹框 -->
     <Modal
@@ -35,7 +35,7 @@
 <script>
 import FormItemComponent from "../FormItemComponent";
 import ItemComponent from "../ItemComponent";
-import StandardTable from "../StandardTable";
+import StandardTabletwo from "../StandardTabletwo";
 import FlowChartShow from "../FlowChartShow";
 // import { mapMutations } from "vuex";
 import {
@@ -45,7 +45,7 @@ import {
   } from "@/api/activiti/definition";
 export default {
   name: "HistoricalProcess",
-  components: { FormItemComponent, StandardTable, FlowChartShow },
+  components: { FormItemComponent, StandardTabletwo, FlowChartShow },
   props: {
     tabalive: { type: String, default: "" }
   },
@@ -273,10 +273,10 @@ export default {
     //业务关系下拉数据
     getselectOption() {
       addGenhistoricap().then(res => {
-        if (res.data.resultCode === 0) {
+        if (res.resultCode === 0) {
           this.formLists.forEach(outer => {
             if (outer.item.filed === "businessType") {
-              outer.item.options = res.data.data.relations.map(item => {
+              outer.item.options = res.data.relations.map(item => {
                 item.value = item.businesskey;
                 item.label = item.businessName;
                 return item;
@@ -317,10 +317,15 @@ export default {
       let obj = Object.assign({}, this.searchData);
       delete obj.updateTime;
       addGenhistorihistory(obj).then(res => {
-        if (res.data.resultCode === 0) {
-          let data = res.data.data;
+        if (res.resultCode === 0) {
+          let data = res.data;
           this.total = data.total;
           this.data = data.records;
+        }else{
+          this.$message({
+                   message: res.resultMsg,
+                   type: 'warning'
+                 });
         }
       });
     },

+ 1 - 1
ruoyi-ui/src/components/ItemComponent/index.vue

@@ -170,7 +170,7 @@
   </div>
 </template>
 <script>
-// import dataProp from "../config/props.config";
+import dataProp from "../../props/index.js";
 export default {
   name: "ItemComponent",
   props: {

+ 9 - 6
ruoyi-ui/src/components/MutipleSelectPop/index.vue

@@ -2,7 +2,7 @@
   <div class="MutipleSelectPop">
     <div class="dialog_left">
       <div class="left_top">
-        <Input
+       <Input
           @on-change="inputchange"
           @on-keydown="inputkeydown"
           search
@@ -690,8 +690,8 @@ export default {
       this.tableLoading = true;
       addGenmutiporuder( param).then(res => {
         this.tableLoading = false;
-        let data = res.data;
-        if (data.code === 0) {
+        let data = res;
+        if (res.code === 0) {
           if (data.data) {
             this.transferTbody(data.data);
           }
@@ -721,12 +721,14 @@ export default {
       this.tree_loading = true;
       addGenmutiportree().then(res => {
         this.tree_loading = false;
-        if (res.data.resultCode === 0) {
+        if (res.resultCode === 0) {
+          console.log(345678)
           this.treeNewData = [];
           let newArr = [];
           let root = {};
-          if (res.data.data.records.length > 0) {
-            res.data.data.records.forEach(item => {
+          if (res.data.records.length > 0) {
+            console.log(3456788)
+            res.data.records.forEach(item => {
               let tem = Object.assign(item);
               newArr.push(tem);
               if (
@@ -737,6 +739,7 @@ export default {
               }
             });
             this.treeNewData = this.arrayTransTree(newArr, "CP_C_ORGUP_ID");
+            console.log(this.treeNewData)
           }
           this.findUser({}); //显示所有的用户
         }

+ 9 - 6
ruoyi-ui/src/components/mutipleSelectPop/index.vue

@@ -2,7 +2,7 @@
   <div class="MutipleSelectPop">
     <div class="dialog_left">
       <div class="left_top">
-        <Input
+       <Input
           @on-change="inputchange"
           @on-keydown="inputkeydown"
           search
@@ -690,8 +690,8 @@ export default {
       this.tableLoading = true;
       addGenmutiporuder( param).then(res => {
         this.tableLoading = false;
-        let data = res.data;
-        if (data.code === 0) {
+        let data = res;
+        if (res.code === 0) {
           if (data.data) {
             this.transferTbody(data.data);
           }
@@ -721,12 +721,14 @@ export default {
       this.tree_loading = true;
       addGenmutiportree().then(res => {
         this.tree_loading = false;
-        if (res.data.resultCode === 0) {
+        if (res.resultCode === 0) {
+          console.log(345678)
           this.treeNewData = [];
           let newArr = [];
           let root = {};
-          if (res.data.data.records.length > 0) {
-            res.data.data.records.forEach(item => {
+          if (res.data.records.length > 0) {
+            console.log(3456788)
+            res.data.records.forEach(item => {
               let tem = Object.assign(item);
               newArr.push(tem);
               if (
@@ -737,6 +739,7 @@ export default {
               }
             });
             this.treeNewData = this.arrayTransTree(newArr, "CP_C_ORGUP_ID");
+            console.log(this.treeNewData)
           }
           this.findUser({}); //显示所有的用户
         }

+ 9 - 3
ruoyi-ui/src/components/todoProcess/index.vue

@@ -340,10 +340,10 @@ export default {
     //业务关系下拉数据
     getselectOption() {
       addGendefini().then(res => {
-        if (res.data.resultCode === 0) {
+        if (res.resultCode === 0) {
           this.formLists.forEach(outer => {
             if (outer.item.filed === "businessType") {
-              outer.item.options = res.data.data.relations.map(item => {
+              outer.item.options = res.data.relations.map(item => {
                 item.value = item.businesskey;
                 item.label = item.businessName;
                 return item;
@@ -367,6 +367,7 @@ export default {
         this.searchData.endTime = new Date(
           this.searchData.createTime[1]
         ).format("yyyy-MM-dd hh:mm");
+        console.log(this.searchData)
       } else {
         this.searchData.startTime = "";
         this.searchData.endTime = "";
@@ -384,6 +385,11 @@ export default {
           this.data = res.data.records;
           console.log(res.data.records,23456)
           // console.log(this.data,2345)
+        }else{
+          this.$message({
+                   message: res.resultMsg,
+                   type: 'warning'
+                 });
         }
       console.log(this.data,2345)
       });
@@ -423,7 +429,7 @@ export default {
       }
       // sendData.userId = this.userInfo.userId;
       addGendefinideal(sendData).then(res => {
-        let data = res.data;
+        let data = res;
         if (data.resultCode === 0) {
           this.queryLists();
           this.msgSuccess(data.resultMsg);

+ 321 - 0
ruoyi-ui/src/props/index.js

@@ -0,0 +1,321 @@
+// 输入框
+const input = {
+  // item 类型
+  type: 'input', // 必填!
+  // label名称
+  title: '', // 必填!
+  // 字段名称
+  field: '', // 必填!
+  // input值
+  value: '',
+  props: {
+    // 输入框类型,可选值为 text、password、textarea、url、email、date
+    type: 'text', // 必填!
+    // 是否显示清空按钮
+    clearable: false,
+    // 设置输入框为禁用状态
+    disabled: false,
+    // 设置输入框为只读
+    readonly: false,
+    // 文本域默认行数,仅在 textarea 类型下有效
+    rows: 4,
+    // 自适应内容高度,仅在 textarea 类型下有效,可传入对象,如 { minRows: 2, maxRows: 6 }
+    autosize: false,
+    // 将用户的输入转换为 Number 类型。在有正则的时候:1)该输入框为空的时候,值为空字符串。2)input方法不可用。
+    number: false,
+    // 自动获取焦点
+    autofocus: false,
+    // 原生的自动完成功能,可选值为 off 和 on
+    autocomplete: 'off',
+    // 占位文本
+    placeholder: '请输入',
+    // 输入框尺寸,可选值为large、small、default或者不设置
+    size: 'default',
+    // 最大输入长度
+    maxlength: null,
+    // 输入框尾部图标,仅在 text 类型下有效
+    icon: null,
+    // 输入框头部图标
+    prefix: null,
+    // 输入框尾部图标
+    suffix: null,
+    // 给表单元素设置 id,详见 Form 用法。
+    'element-id': null,
+    // 原生的 spellcheck 属性
+    spellcheck: false,
+    // 原生的 wrap 属性,可选值为 hard 和 soft,仅在 textarea 下生效
+    wrap: 'soft',
+    // 正则表达式
+    regx: null
+  },
+  event: {
+    // 按下回车键时触发
+    enter: (event, $this) => {},
+    // 设置 icon 属性后,点击图标时触发
+    click: (event, $this) => {},
+    // 数据改变时触发
+    change: (event, $this) => {},
+    // 输入框聚焦时触发
+    focus: (event, $this) => {},
+    // 输入框失去焦点时触发
+    blur: (event, $this) => {},
+    // 原生的 keyup 事件
+    keyup: (event, $this) => {},
+    // 原生的 keydown 事件
+    keydown: (event, $this) => {},
+    // 原生的 keypress 事件
+    keypress: (event, $this) => {},
+    // 开启 search 时可用,点击搜索或按下回车键时触发
+    search: (event, $this) => {},
+    // 添加正则后,校验出错的时候触发
+    regxCheck: (value, $this, errorValue) => {}
+  },
+};
+// 下拉框
+const select = {
+  type: 'select', // 必填!
+  // label名称
+  title: '', // 必填!
+  // 字段名称
+  field: '', // 必填!
+  // input值
+  value: '',
+  // 可选参数
+  options: [
+    // { value: '104', label: '生态蔬菜', disabled: false },
+    // { value: '105', label: '新鲜水果', disabled: false },
+  ],
+  props: {
+    // 是否支持多选
+    multiple: false,
+    // 多选情况下的样式控制,只在multiple为true有效
+    multipleType: false,
+    // 是否禁用
+    disabled: false,
+    // 是否可以清空选项,只在单选时有效
+    clearable: true,
+    // 选择框大小,可选值为large、small、default或者不填
+    size: 'default',
+    // 选择框默认文字
+    placeholder: '请选择',
+    // 当下拉列表为空时显示的内容
+    'not-found-text': '无匹配数据',
+    // 在返回选项时,是否将 label 和 value 一并返回,默认只返回 value
+    'label-in-value': false,
+    // 弹窗的展开方向,可选值为 bottom 和 top
+    placement: 'bottom',
+    // 是否将弹层放置于 body 内,在 Tabs、带有 fixed 的 Table 列内使用时,建议添加此属性,它将不受父级样式影响,从而达到更好的效果
+    transfer: true,
+  }
+};
+// Switch
+const Switch = {
+  type: 'Switch', // 必填!
+  // label名称
+  title: '', // 必填!
+  // 字段名称
+  field: '', // 必填!
+  // input值
+  value: false,
+  props: {
+    
+  }
+};
+// 单选框
+const radiobox = {
+  type: 'radiobox', // 必填!
+  // label名称
+  title: '', // 必填!
+  // 字段名称
+  field: '', // 必填!
+  // input值
+  value: false,
+  // 可选参数
+  props: {
+    // 多选框组的尺寸,可选值为 large、small、default 或者不设置
+    size: 'default',
+    // 是否禁用当前项
+    disabled: false
+  }
+};
+// 复选框
+const checkbox = {
+  type: 'checkbox', // 必填!
+  // label名称
+  title: '', // 必填!
+  // 字段名称
+  field: '', // 必填!
+  // input值
+  value: false,
+  // 可选参数
+  props: {
+    // 多选框组的尺寸,可选值为 large、small、default 或者不设置
+    size: 'default',
+    // 是否禁用当前项
+    disabled: false,
+    // 支持checkout样式为radio样式
+    circle: false
+  },
+  event: {
+    change: (event, $this) => {},
+  }
+};
+// 日期选择
+const DatePicker = {
+  type: 'DatePicker', // 必填!
+  field: '', // 必填!
+  title: '活动日期', // 必填!
+  // input值, type为daterange,datetimerange value为数组 [start_value,end_value]
+  value: '',
+  props: {
+    // 显示类型,可选值为 date、daterange、datetime、datetimerange、year、month
+    type: 'datetimerange', // 必填!
+    // 展示的日期格式
+    format: 'yyyy-MM-dd HH:mm',
+    // 日期选择器出现的位置,可选值为toptop-starttop-endbottombottom-startbottom-endleftleft-startleft-endrightright-startright-end
+    placement: 'bottom-start',
+    // 占位文本
+    placeholder: '请选择获得时间',
+    // 选择器额外配置,比如不可选日期与快捷选项
+    options: {
+      disabledDate (date) {
+          return date && date.valueOf() > Date.now();
+      }
+    },
+    // 手动控制日期选择器的显示状态,true 为显示,false 为收起。使用该属性后,选择器不会主动关闭。建议配合 slot 及 confirm 和相关事件一起使用
+    open: null,
+    // 是否显示底部控制栏,开启后,选择完日期,选择器不会主动关闭,需用户确认后才可关闭
+    confirm: false,
+    // 尺寸,可选值为large、small、default或者不设置
+    size: 'default',
+    // 是否禁用选择器
+    disabled: false,
+    // 是否显示清除按钮
+    clearable: true,
+    // 完全只读,开启后不会弹出选择器
+    readonly: false,
+    // 文本框是否可以输入
+    editable: false,
+    // 是否将弹层放置于 body 内,在 Tabs、带有 fixed 的 Table 列内使用时,建议添加此属性,它将不受父级样式影响,从而达到更好的效果
+    transfer: true
+  }
+};
+
+// 下拉框
+const DropDownSelectFilter = {
+  type: 'DropDownSelectFilter', // 必填!
+  field: '', // 必填!
+  title: '', // 必填!
+  value: '',
+  props: {
+    placeholder:'请选择',
+    // 是否是单选,可选值为 true、false
+    single: true,
+    // 下拉气泡表格里数据
+    data: {},
+    // 数据总条数
+    totalRowCount: 0,
+    // 每页条数
+    pageSize: 10,
+    // 模糊搜索的数据
+    AutoData: [],
+    // 模糊搜索要显示的列
+    columns: [],
+    // 无数据的时候提示
+    dataEmptyMessage: '暂无数据',
+    // 下拉多选 默认选中数据
+    defaultSelected: [],
+    // 是否将弹层放置于 body 内
+    transfer: true,
+    columnsKey:[]
+  }
+};
+//下拉和输入框混合
+
+const selectInput = {
+  // item 类型
+  type: 'selectInput', // 必填!
+  // label名称
+  title: '', // 必填!
+  // 字段名称
+  field: '', // 必填!
+  // input值
+  value: '',
+  slotfiled:'',//卡槽对应的键
+  slotValue:'', 
+  props: {
+    // 输入框类型,可选值为 text、password、textarea、url、email、date
+    type: 'text', // 必填!
+    // 是否显示清空按钮
+    clearable: false,
+    // 设置输入框为禁用状态
+    disabled: false,
+    // 设置输入框为只读
+    readonly: false,
+    // 文本域默认行数,仅在 textarea 类型下有效
+    rows: 4,
+    // 自适应内容高度,仅在 textarea 类型下有效,可传入对象,如 { minRows: 2, maxRows: 6 }
+    autosize: false,
+    // 将用户的输入转换为 Number 类型。在有正则的时候:1)该输入框为空的时候,值为空字符串。2)input方法不可用。
+    number: false,
+    // 自动获取焦点
+    autofocus: false,
+    // 原生的自动完成功能,可选值为 off 和 on
+    autocomplete: 'off',
+    // 占位文本
+    placeholder: '请输入',
+    // 输入框尺寸,可选值为large、small、default或者不设置
+    size: 'default',
+    // 最大输入长度
+    maxlength: null,
+    // 输入框尾部图标,仅在 text 类型下有效
+    icon: null,
+    // 输入框头部图标
+    prefix: null,
+    // 输入框尾部图标
+    suffix: null,
+    // 给表单元素设置 id,详见 Form 用法。
+    'element-id': null,
+    // 原生的 spellcheck 属性
+    spellcheck: false,
+    // 原生的 wrap 属性,可选值为 hard 和 soft,仅在 textarea 下生效
+    wrap: 'soft',
+    // 正则表达式
+    regx: null
+  },
+  event: {
+    // 按下回车键时触发
+    enter: (event, $this) => {},
+    // 设置 icon 属性后,点击图标时触发
+    click: (event, $this) => {},
+    // 数据改变时触发
+    change: (event, $this) => {},
+    // 输入框聚焦时触发
+    focus: (event, $this) => {},
+    // 输入框失去焦点时触发
+    blur: (event, $this) => {},
+    // 原生的 keyup 事件
+    keyup: (event, $this) => {},
+    // 原生的 keydown 事件
+    keydown: (event, $this) => {},
+    // 原生的 keypress 事件
+    keypress: (event, $this) => {},
+    // 开启 search 时可用,点击搜索或按下回车键时触发
+    search: (event, $this) => {},
+    // 添加正则后,校验出错的时候触发
+    regxCheck: (value, $this, errorValue) => {}
+  },
+};
+
+
+const dataProp = {
+  DatePicker,
+  checkbox,
+  radiobox,
+  Switch,
+  select,
+  input,
+  selectInput,
+  DropDownSelectFilter
+};
+export default dataProp;

+ 123 - 0
ruoyi-ui/src/utils/layoutAlgorithm.js

@@ -0,0 +1,123 @@
+
+// 查找数组中最后一个不为空的值,获取可使用空位,为了找出这一行是否能够存放当前元素。
+// 返回值为该行可放的空格数
+function getLastNotNull(array) {
+  let canUseLength = array.length;
+  // 数组取反,获取到第一个不为空的值,则判断出该行可放的空格数量
+  array.reverse().every((item, index) => {
+    if (item) {
+      canUseLength = index;
+      return false;
+    }
+    return true;
+  });
+  return canUseLength;
+}
+
+
+// 判断从当前空格开始填,是否所有空格都能够放入
+// currentRow:当前开始填充行
+// currentCol:当前开始填充列
+// pointer:当前元素的数据,宽高
+// ListsMap:当前整个填充块的
+// defaultColumn:默认一列的行数
+function checkAllSpace(currentRow, currentCol, pointer, ListsMap, defaultColumn) {
+  const rowArray = Array(pointer.row).fill(null);
+  const colArray = Array(pointer.col).fill(null);
+  
+  let flag = true;
+  rowArray.map((item, row) => {
+    colArray.map((temp, col) => {
+      if (ListsMap[row + currentRow][col + currentCol]) {
+        flag = false;
+      }
+    });
+  });
+  if ((currentCol + pointer.col) > defaultColumn) {
+    flag = false;
+  }
+  return flag;
+}
+
+
+// defaultColumn:默认每行的列数
+// lists:[{  //每一个item的行和宽
+//   row:,
+//   col:
+// }]
+// type:fill  填充  newline  换行
+// 返回值是在lists的item中添加x,y属性:
+// {
+//   y:i+1,  //列
+//   x:j+1,  //行
+//   row:pointer.row, //行高
+//   col:pointer.col  //宽高
+// }
+function layoutAlgorithm(defaultColumn, lists, type = 'fill') {
+  // 定义每一行的空数据defaultRow
+  const defaultRow = Array(defaultColumn).fill(null);
+  // 定义最大行数
+  const num = lists.reduce((sum, current) => { sum += (!current.row || current.row < 1) ? 1 : current.row; return sum; }, 0);
+  const sumArray = Array(num).fill(null);
+
+  // 定义map模型 默认 50*defaultColumn的布局
+  const ListsMap = sumArray.concat([]).reduce((currentValue) => {
+    currentValue.push(defaultRow.concat([]));
+    return currentValue;
+  }, []);
+
+
+  const coordinateMap = {};
+  // 遍历配置文件的行列数,获取对应的grid布局坐标
+  lists.every((pointer, pointerIndex) => {
+    // 对初始化数据进行判断处理
+    // 当列数大于默认分列时,将当前元素列改为默认的分列数
+    // 当当前项没有设置宽高,默认设为1
+    if (pointer.show === false) { // 当属性show为false时,则默认返回位置(-1,-1)即不显示该节点
+      if (!coordinateMap[pointerIndex]) { // 记录起始的行列以及宽高,作为function返回值
+        pointer.x = -1;
+        pointer.y = -1;
+        coordinateMap[pointerIndex] = pointer;
+      }
+      return true;
+    }
+    pointer.col = (!pointer.col || pointer.col < 1) ? 1 : pointer.col;
+    pointer.col = pointer.col > defaultColumn ? defaultColumn : pointer.col;
+    pointer.row = (!pointer.row || pointer.row < 1) ? 1 : pointer.row;
+    ListsMap.every((item, i) => item.every((temp, j) => {
+      // 当类型为换行时,判断该行是否可放入,不可放入时则换行
+      if (type === 'newline') {
+        if (getLastNotNull([].concat(item)) < pointer.col) {
+          return true;
+        }
+      }
+      // 当类型为填充时,才执行checkAllSpace,对对应的所有空格进行可填充判断
+      if (!temp && (type === 'fill' ? checkAllSpace(i, j, pointer, ListsMap, defaultColumn) : true)) { // 为空时可放
+        if (!coordinateMap[pointerIndex]) { // 记录起始的行列以及宽高,作为function返回值
+          pointer.x = j + 1;
+          pointer.y = i + 1;
+          coordinateMap[pointerIndex] = pointer;
+        }
+        // 将对应的点打上标记
+        const rowArray = Array(pointer.row).fill(null);
+        const colArray = Array(pointer.col).fill(null);
+        rowArray.map((item, row) => {
+          colArray.map((temp, col) => {
+            ListsMap[i + row][j + col] = `k${pointerIndex}`;
+            return true;
+          });
+          return true;
+        });
+
+        return false;
+      }
+      return true;
+    }));
+    return true;
+  });
+
+  return coordinateMap;
+} 
+
+
+export default layoutAlgorithm;

+ 1 - 1
ruoyi-ui/src/views/system/editing/index.vue

@@ -50,7 +50,7 @@
     inject: ['reload'],
     data() {
       return {
-        activeNames: ['1'],
+        activeNames: [0],
         title: '单表1',
         // 查询参数
         queryParams: {},

+ 1 - 1
ruoyi-ui/src/views/system/form/index.vue

@@ -92,7 +92,7 @@
         loading:true,
         tabList: {},
         currentPage3: 0,
-        activeNames: [1],
+        activeNames: [0],
         title: '列表',
         objParams: {
           table: '',

+ 7 - 5
ruoyi-ui/src/views/system/surface/index.vue

@@ -19,13 +19,13 @@
     <!-- 内容 -->
     <div class="table_nav">
       <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
-        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column type="selection" width="55" style="color: red;" align="center" />
         <template v-for="(item, index) in tabData">
-          <el-table-column :label="item.columnComment" align="center" :prop="item.columnName" :key="index">
+          <el-table-column :label="item.columnComment"  align="center" :prop="item.columnName" :key="index" >
             <template slot-scope="scope">
               <img class="img_icon" v-if="item.htmlType=='imageUpload' && scope.row[scope.column.property]" @click="imgBtn(JSON.parse(scope.row[scope.column.property])[0].url)"
                 :src="JSON.parse(scope.row[scope.column.property])[0].url" alt="">
-              <span v-else>{{ scope.row[scope.column.property] }}</span>
+              <span  v-else>{{ scope.row[scope.column.property] }}</span>
             </template>
           </el-table-column>
         </template>
@@ -54,7 +54,8 @@
     name: "index",
     data() {
       return {
-        pir_imgs: '', // 图片链接
+        pir_imgs: '', // 图片链接
+        // jue:'color: red;',
         tabData: [],
         multiple: true,
         single: true,
@@ -336,7 +337,8 @@
     // }
 
     .el-collapse {
-      border-top: 0;
+      border-top: 0;
+
     }
   }
 </style>

+ 6 - 6
ruoyi-ui/src/views/system/table/index.vue

@@ -9,7 +9,7 @@
       </div>
     </div>
     <!-- 内容 -->
-    <div class="table_nav headertable_nav">
+    <div class="table_nav headertable_nav" >
       <el-collapse v-model="activeNames" @change="handleChange">
         <el-form :model="queryParams" :rules="queryData.rules" ref="queryForm" :inline="true" label-width="120px">
           <el-collapse-item :title="item.columnComment" :name="index" v-for="(item,index) in queryData.showData" :key="index">
@@ -198,11 +198,11 @@
           // this.init()
           this.reload()
         } else if (index == '返回') {
-          if (this.xidugje == 0) {
-            this.$router.go(-2)
-          } else {
+          // if (this.xidugje == 0) {
+          //   this.$router.go(-2)
+          // } else {
             this.$router.go(-1)
-          }
+          // }
         } else if (index == '刷新') {
           this.xidugje = 1
           this.reload()
@@ -286,7 +286,7 @@
          if(this.queryData.showData.length !==0){
           this.queryData.showData.filter(route => {
               if(route.hrChildren.length !== 0){
-                 if(route.hrChildren[1].readonly == true){
+                 if(route.hrChildren[0].readonly == true){
                        this.imgShoew = true
                  }else{
                    this.imgShoew = false