Explorar el Código

Merge branch 'dev' of http://94.191.59.107:3000/wukai/lzga-doc into dev

yxc hace 2 años
padre
commit
626679eb88
Se han modificado 20 ficheros con 648 adiciones y 638 borrados
  1. 1 1
      lzga-modules/lzga-doc/src/main/java/com/jjt/doc/controller/DocGroupController.java
  2. 25 18
      lzga-modules/lzga-doc/src/main/java/com/jjt/doc/controller/DocGroupUserController.java
  3. 4 3
      lzga-modules/lzga-doc/src/main/java/com/jjt/doc/controller/DocSpaceController.java
  4. 40 15
      lzga-modules/lzga-doc/src/main/java/com/jjt/doc/domain/DocGroup.java
  5. 16 1
      lzga-modules/lzga-doc/src/main/java/com/jjt/doc/domain/DocGroupUser.java
  6. 93 70
      lzga-modules/lzga-doc/src/main/java/com/jjt/doc/domain/DocSpace.java
  7. 1 27
      lzga-modules/lzga-doc/src/main/java/com/jjt/doc/mapper/DocGroupMapper.java
  8. 1 1
      lzga-modules/lzga-doc/src/main/java/com/jjt/doc/mapper/DocGroupUserMapper.java
  9. 1 1
      lzga-modules/lzga-doc/src/main/java/com/jjt/doc/service/IDocGroupService.java
  10. 1 1
      lzga-modules/lzga-doc/src/main/java/com/jjt/doc/service/IDocGroupUserService.java
  11. 2 40
      lzga-modules/lzga-doc/src/main/java/com/jjt/doc/service/impl/DocGroupServiceImpl.java
  12. 1 1
      lzga-modules/lzga-doc/src/main/java/com/jjt/doc/service/impl/DocGroupUserServiceImpl.java
  13. 18 40
      lzga-modules/lzga-doc/src/main/resources/mapper/doc/DocGroupMapper.xml
  14. 7 1
      lzga-modules/lzga-doc/src/main/resources/mapper/doc/DocGroupUserMapper.xml
  15. 1 1
      lzga-ui/src/api/doc/group.js
  16. 1 1
      lzga-ui/src/api/doc/groupUser.js
  17. 4 0
      lzga-ui/src/views/doc/dir/index.vue
  18. 173 303
      lzga-ui/src/views/doc/group/index.vue
  19. 244 110
      lzga-ui/src/views/doc/groupUser/index.vue
  20. 14 3
      lzga-ui/src/views/doc/info/index.vue

+ 1 - 1
lzga-modules/lzga-doc/src/main/java/com/jjt/doc/controller/DocGroupController.java

@@ -26,7 +26,7 @@ import com.jjt.common.core.web.page.TableDataInfo;
  * 分组Controller
  * 
  * @author wukai
- * @date 2023-03-27
+ * @date 2023-04-20
  */
 @RestController
 @RequestMapping("/group")

+ 25 - 18
lzga-modules/lzga-doc/src/main/java/com/jjt/doc/controller/DocGroupUserController.java

@@ -1,17 +1,17 @@
 package com.jjt.doc.controller;
 
-import java.io.PrintWriter;
 import java.util.List;
 import java.io.IOException;
-import java.util.Map;
-import java.util.Scanner;
 import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-
-import com.alibaba.fastjson2.JSONObject;
-import com.alibaba.nacos.shaded.io.grpc.netty.shaded.io.netty.handler.codec.http.HttpUtil;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 import com.jjt.common.log.annotation.Log;
 import com.jjt.common.log.enums.BusinessType;
 import com.jjt.common.security.annotation.RequiresPermissions;
@@ -24,13 +24,14 @@ import com.jjt.common.core.web.page.TableDataInfo;
 
 /**
  * 分组成员Controller
- *
+ * 
  * @author wukai
- * @date 2023-03-27
+ * @date 2023-04-20
  */
 @RestController
 @RequestMapping("/groupUser")
-public class DocGroupUserController extends BaseController {
+public class DocGroupUserController extends BaseController
+{
     @Resource
     private IDocGroupUserService docGroupUserService;
 
@@ -39,7 +40,8 @@ public class DocGroupUserController extends BaseController {
      */
     @RequiresPermissions("doc:groupUser:list")
     @GetMapping("/list")
-    public TableDataInfo list(DocGroupUser docGroupUser) {
+    public TableDataInfo list(DocGroupUser docGroupUser)
+    {
         startPage();
         List<DocGroupUser> list = docGroupUserService.selectDocGroupUserList(docGroupUser);
         return getDataTable(list);
@@ -51,7 +53,8 @@ public class DocGroupUserController extends BaseController {
     @RequiresPermissions("doc:groupUser:export")
     @Log(title = "分组成员", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, DocGroupUser docGroupUser) {
+    public void export(HttpServletResponse response, DocGroupUser docGroupUser)
+    {
         List<DocGroupUser> list = docGroupUserService.selectDocGroupUserList(docGroupUser);
         ExcelUtil<DocGroupUser> util = new ExcelUtil<DocGroupUser>(DocGroupUser.class);
         util.exportExcel(response, list, "分组成员数据");
@@ -62,7 +65,8 @@ public class DocGroupUserController extends BaseController {
      */
     @RequiresPermissions("doc:groupUser:query")
     @GetMapping(value = "/{groupId}")
-    public AjaxResult getInfo(@PathVariable("groupId") Long groupId) {
+    public AjaxResult getInfo(@PathVariable("groupId") Long groupId)
+    {
         return success(docGroupUserService.selectDocGroupUserByGroupId(groupId));
     }
 
@@ -72,7 +76,8 @@ public class DocGroupUserController extends BaseController {
     @RequiresPermissions("doc:groupUser:add")
     @Log(title = "分组成员", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody DocGroupUser docGroupUser) {
+    public AjaxResult add(@RequestBody DocGroupUser docGroupUser)
+    {
         return toAjax(docGroupUserService.insertDocGroupUser(docGroupUser));
     }
 
@@ -82,7 +87,8 @@ public class DocGroupUserController extends BaseController {
     @RequiresPermissions("doc:groupUser:edit")
     @Log(title = "分组成员", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody DocGroupUser docGroupUser) {
+    public AjaxResult edit(@RequestBody DocGroupUser docGroupUser)
+    {
         return toAjax(docGroupUserService.updateDocGroupUser(docGroupUser));
     }
 
@@ -91,8 +97,9 @@ public class DocGroupUserController extends BaseController {
      */
     @RequiresPermissions("doc:groupUser:remove")
     @Log(title = "分组成员", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{groupIds}")
-    public AjaxResult remove(@PathVariable Long[] groupIds) {
+	@DeleteMapping("/{groupIds}")
+    public AjaxResult remove(@PathVariable Long[] groupIds)
+    {
         return toAjax(docGroupUserService.deleteDocGroupUserByGroupIds(groupIds));
     }
 }

+ 4 - 3
lzga-modules/lzga-doc/src/main/java/com/jjt/doc/controller/DocSpaceController.java

@@ -87,13 +87,14 @@ public class DocSpaceController extends BaseController {
         //查询是否有已申请扩容未审批的记录
         DocSpaceExpand expand = new DocSpaceExpand();
         expand.setSpaceId(docSpace.getSpaceId());
+        expand.setExpandStatus("1");
         List expandList = expandService.selectDocSpaceExpandList(expand);
         if (expandList.size() > 0) {
-            expand.setExpandStatus("1");
+            docSpace.setIsApply("1");
         } else {
-            expand.setExpandStatus("0");
+            docSpace.setIsApply("0");
         }
-        return success();
+        return success(docSpace);
     }
 
     /**

+ 40 - 15
lzga-modules/lzga-doc/src/main/java/com/jjt/doc/domain/DocGroup.java

@@ -1,6 +1,5 @@
 package com.jjt.doc.domain;
 
-import java.util.List;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.jjt.common.core.annotation.Excel;
@@ -10,7 +9,7 @@ import com.jjt.common.core.web.domain.BaseEntity;
  * 分组对象 doc_group
  * 
  * @author wukai
- * @date 2023-03-27
+ * @date 2023-04-20
  */
 public class DocGroup extends BaseEntity
 {
@@ -23,13 +22,20 @@ public class DocGroup extends BaseEntity
     @Excel(name = "分组名称")
     private String groupName;
 
+    /** 分组管理员 */
+    @Excel(name = "分组管理员")
+    private Long groupManager;
+
+    /** 分组管理员姓名 */
+    @Excel(name = "分组管理员姓名")
+    private String groupManagerName;
+
+    /** 创建人ID */
+    private Long creater;
+
     /** 逻辑删除标志;1/非1 */
-    @Excel(name = "逻辑删除标志;1/非1")
     private String isDel;
 
-    /** 分组成员信息 */
-    private List<DocGroupUser> docGroupUserList;
-
     public void setGroupId(Long groupId) 
     {
         this.groupId = groupId;
@@ -48,24 +54,41 @@ public class DocGroup extends BaseEntity
     {
         return groupName;
     }
-    public void setIsDel(String isDel) 
+    public void setGroupManager(Long groupManager) 
     {
-        this.isDel = isDel;
+        this.groupManager = groupManager;
     }
 
-    public String getIsDel() 
+    public Long getGroupManager() 
     {
-        return isDel;
+        return groupManager;
+    }
+    public void setGroupManagerName(String groupManagerName) 
+    {
+        this.groupManagerName = groupManagerName;
     }
 
-    public List<DocGroupUser> getDocGroupUserList()
+    public String getGroupManagerName() 
     {
-        return docGroupUserList;
+        return groupManagerName;
+    }
+    public void setCreater(Long creater) 
+    {
+        this.creater = creater;
+    }
+
+    public Long getCreater() 
+    {
+        return creater;
+    }
+    public void setIsDel(String isDel) 
+    {
+        this.isDel = isDel;
     }
 
-    public void setDocGroupUserList(List<DocGroupUser> docGroupUserList)
+    public String getIsDel() 
     {
-        this.docGroupUserList = docGroupUserList;
+        return isDel;
     }
 
     @Override
@@ -73,13 +96,15 @@ public class DocGroup extends BaseEntity
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("groupId", getGroupId())
             .append("groupName", getGroupName())
+            .append("groupManager", getGroupManager())
+            .append("groupManagerName", getGroupManagerName())
+            .append("creater", getCreater())
             .append("createBy", getCreateBy())
             .append("createTime", getCreateTime())
             .append("updateBy", getUpdateBy())
             .append("updateTime", getUpdateTime())
             .append("remark", getRemark())
             .append("isDel", getIsDel())
-            .append("docGroupUserList", getDocGroupUserList())
             .toString();
     }
 }

+ 16 - 1
lzga-modules/lzga-doc/src/main/java/com/jjt/doc/domain/DocGroupUser.java

@@ -9,7 +9,7 @@ import com.jjt.common.core.web.domain.BaseEntity;
  * 分组成员对象 doc_group_user
  * 
  * @author wukai
- * @date 2023-03-27
+ * @date 2023-04-20
  */
 public class DocGroupUser extends BaseEntity
 {
@@ -19,8 +19,13 @@ public class DocGroupUser extends BaseEntity
     private Long groupId;
 
     /** 用户ID */
+    @Excel(name = "用户ID")
     private Long userId;
 
+    /** 用户姓名 */
+    @Excel(name = "用户姓名")
+    private String userName;
+
     public void setGroupId(Long groupId) 
     {
         this.groupId = groupId;
@@ -39,12 +44,22 @@ public class DocGroupUser extends BaseEntity
     {
         return userId;
     }
+    public void setUserName(String userName) 
+    {
+        this.userName = userName;
+    }
+
+    public String getUserName() 
+    {
+        return userName;
+    }
 
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("groupId", getGroupId())
             .append("userId", getUserId())
+            .append("userName", getUserName())
             .toString();
     }
 }

+ 93 - 70
lzga-modules/lzga-doc/src/main/java/com/jjt/doc/domain/DocSpace.java

@@ -1,6 +1,8 @@
 package com.jjt.doc.domain;
 
 import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.TableField;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.jjt.common.core.annotation.Excel;
@@ -8,162 +10,183 @@ import com.jjt.common.core.web.domain.BaseEntity;
 
 /**
  * 存储空间对象 doc_space
- * 
+ *
  * @author wukai
  * @date 2023-03-27
  */
-public class DocSpace extends BaseEntity
-{
+public class DocSpace extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    /** 空间ID */
+    /**
+     * 空间ID
+     */
     private Long spaceId;
 
-    /** 空间名称 */
+    /**
+     * 空间名称
+     */
     @Excel(name = "空间名称")
     private String spaceName;
 
-    /** 空间容量大小 */
+    /**
+     * 空间容量大小
+     */
     @Excel(name = "空间容量大小")
     private BigDecimal spaceCap;
 
-    /** 已使用容量 */
+    /**
+     * 已使用容量
+     */
     @Excel(name = "已使用容量")
     private BigDecimal usedCap;
 
-    /** 可用容量 */
+    /**
+     * 可用容量
+     */
     @Excel(name = "可用容量")
     private BigDecimal avlCap;
 
-    /** 文件数量 */
+    /**
+     * 文件数量
+     */
     @Excel(name = "文件数量")
     private Long fileNum;
 
-    /** 默认文件级别 */
+    /**
+     * 默认文件级别
+     */
     @Excel(name = "默认文件级别")
     private Long defaultLevel;
 
-    /** 空间类型;1.公共空间 2.部门空间 3.个人空间 4.分组空间 */
+    /**
+     * 空间类型;1.公共空间 2.部门空间 3.个人空间 4.分组空间
+     */
     @Excel(name = "空间类型;1.公共空间 2.部门空间 3.个人空间 4.分组空间")
     private String spaceType;
 
-    /** 所属人;如果是个人,则为USER_ID,如果是部门目录则为部门ID */
+    /**
+     * 所属人;如果是个人,则为USER_ID,如果是部门目录则为部门ID
+     */
     @Excel(name = "所属人;如果是个人,则为USER_ID,如果是部门目录则为部门ID")
     private Long owner;
 
-    /** 逻辑删除标志;1/非1 */
+    /**
+     * 逻辑删除标志;1/非1
+     */
     @Excel(name = "逻辑删除标志;1/非1")
     private String isDel;
+    /**
+     * 是否有扩容申请
+     */
+    @TableField(exist = false)
+    private String isApply;
+
+    public String getIsApply() {
+        return isApply;
+    }
 
-    public void setSpaceId(Long spaceId) 
-    {
+    public void setIsApply(String isApply) {
+        this.isApply = isApply;
+    }
+
+    public void setSpaceId(Long spaceId) {
         this.spaceId = spaceId;
     }
 
-    public Long getSpaceId() 
-    {
+    public Long getSpaceId() {
         return spaceId;
     }
-    public void setSpaceName(String spaceName) 
-    {
+
+    public void setSpaceName(String spaceName) {
         this.spaceName = spaceName;
     }
 
-    public String getSpaceName() 
-    {
+    public String getSpaceName() {
         return spaceName;
     }
-    public void setSpaceCap(BigDecimal spaceCap) 
-    {
+
+    public void setSpaceCap(BigDecimal spaceCap) {
         this.spaceCap = spaceCap;
     }
 
-    public BigDecimal getSpaceCap() 
-    {
+    public BigDecimal getSpaceCap() {
         return spaceCap;
     }
-    public void setUsedCap(BigDecimal usedCap) 
-    {
+
+    public void setUsedCap(BigDecimal usedCap) {
         this.usedCap = usedCap;
     }
 
-    public BigDecimal getUsedCap() 
-    {
+    public BigDecimal getUsedCap() {
         return usedCap;
     }
-    public void setAvlCap(BigDecimal avlCap) 
-    {
+
+    public void setAvlCap(BigDecimal avlCap) {
         this.avlCap = avlCap;
     }
 
-    public BigDecimal getAvlCap() 
-    {
+    public BigDecimal getAvlCap() {
         return avlCap;
     }
-    public void setFileNum(Long fileNum) 
-    {
+
+    public void setFileNum(Long fileNum) {
         this.fileNum = fileNum;
     }
 
-    public Long getFileNum() 
-    {
+    public Long getFileNum() {
         return fileNum;
     }
-    public void setDefaultLevel(Long defaultLevel) 
-    {
+
+    public void setDefaultLevel(Long defaultLevel) {
         this.defaultLevel = defaultLevel;
     }
 
-    public Long getDefaultLevel() 
-    {
+    public Long getDefaultLevel() {
         return defaultLevel;
     }
-    public void setSpaceType(String spaceType) 
-    {
+
+    public void setSpaceType(String spaceType) {
         this.spaceType = spaceType;
     }
 
-    public String getSpaceType() 
-    {
+    public String getSpaceType() {
         return spaceType;
     }
-    public void setOwner(Long owner) 
-    {
+
+    public void setOwner(Long owner) {
         this.owner = owner;
     }
 
-    public Long getOwner() 
-    {
+    public Long getOwner() {
         return owner;
     }
-    public void setIsDel(String isDel) 
-    {
+
+    public void setIsDel(String isDel) {
         this.isDel = isDel;
     }
 
-    public String getIsDel() 
-    {
+    public String getIsDel() {
         return isDel;
     }
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("spaceId", getSpaceId())
-            .append("spaceName", getSpaceName())
-            .append("spaceCap", getSpaceCap())
-            .append("usedCap", getUsedCap())
-            .append("avlCap", getAvlCap())
-            .append("fileNum", getFileNum())
-            .append("defaultLevel", getDefaultLevel())
-            .append("spaceType", getSpaceType())
-            .append("owner", getOwner())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .append("isDel", getIsDel())
-            .toString();
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("spaceId", getSpaceId())
+                .append("spaceName", getSpaceName())
+                .append("spaceCap", getSpaceCap())
+                .append("usedCap", getUsedCap())
+                .append("avlCap", getAvlCap())
+                .append("fileNum", getFileNum())
+                .append("defaultLevel", getDefaultLevel())
+                .append("spaceType", getSpaceType())
+                .append("owner", getOwner())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .append("remark", getRemark())
+                .append("isDel", getIsDel())
+                .toString();
     }
 }

+ 1 - 27
lzga-modules/lzga-doc/src/main/java/com/jjt/doc/mapper/DocGroupMapper.java

@@ -2,13 +2,12 @@ package com.jjt.doc.mapper;
 
 import java.util.List;
 import com.jjt.doc.domain.DocGroup;
-import com.jjt.doc.domain.DocGroupUser;
 
 /**
  * 分组Mapper接口
  * 
  * @author wukai
- * @date 2023-03-27
+ * @date 2023-04-20
  */
 public interface DocGroupMapper 
 {
@@ -59,29 +58,4 @@ public interface DocGroupMapper
      * @return 结果
      */
     public int deleteDocGroupByGroupIds(Long[] groupIds);
-
-    /**
-     * 批量删除分组成员
-     * 
-     * @param groupIds 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteDocGroupUserByGroupIds(Long[] groupIds);
-    
-    /**
-     * 批量新增分组成员
-     * 
-     * @param docGroupUserList 分组成员列表
-     * @return 结果
-     */
-    public int batchDocGroupUser(List<DocGroupUser> docGroupUserList);
-    
-
-    /**
-     * 通过分组主键删除分组成员信息
-     * 
-     * @param groupId 分组ID
-     * @return 结果
-     */
-    public int deleteDocGroupUserByGroupId(Long groupId);
 }

+ 1 - 1
lzga-modules/lzga-doc/src/main/java/com/jjt/doc/mapper/DocGroupUserMapper.java

@@ -7,7 +7,7 @@ import com.jjt.doc.domain.DocGroupUser;
  * 分组成员Mapper接口
  * 
  * @author wukai
- * @date 2023-03-27
+ * @date 2023-04-20
  */
 public interface DocGroupUserMapper 
 {

+ 1 - 1
lzga-modules/lzga-doc/src/main/java/com/jjt/doc/service/IDocGroupService.java

@@ -7,7 +7,7 @@ import com.jjt.doc.domain.DocGroup;
  * 分组Service接口
  * 
  * @author wukai
- * @date 2023-03-27
+ * @date 2023-04-20
  */
 public interface IDocGroupService 
 {

+ 1 - 1
lzga-modules/lzga-doc/src/main/java/com/jjt/doc/service/IDocGroupUserService.java

@@ -7,7 +7,7 @@ import com.jjt.doc.domain.DocGroupUser;
  * 分组成员Service接口
  * 
  * @author wukai
- * @date 2023-03-27
+ * @date 2023-04-20
  */
 public interface IDocGroupUserService 
 {

+ 2 - 40
lzga-modules/lzga-doc/src/main/java/com/jjt/doc/service/impl/DocGroupServiceImpl.java

@@ -3,10 +3,6 @@ package com.jjt.doc.service.impl;
 import java.util.List;
 import com.jjt.common.core.utils.DateUtils;
 import org.springframework.stereotype.Service;
-import java.util.ArrayList;
-import com.jjt.common.core.utils.StringUtils;
-import org.springframework.transaction.annotation.Transactional;
-import com.jjt.doc.domain.DocGroupUser;
 import com.jjt.doc.mapper.DocGroupMapper;
 import com.jjt.doc.domain.DocGroup;
 import javax.annotation.Resource;
@@ -16,7 +12,7 @@ import com.jjt.doc.service.IDocGroupService;
  * 分组Service业务层处理
  *
  * @author wukai
- * @date 2023-03-27
+ * @date 2023-04-20
  */
 @Service
 public class DocGroupServiceImpl implements IDocGroupService
@@ -54,14 +50,11 @@ public class DocGroupServiceImpl implements IDocGroupService
      * @param docGroup 分组
      * @return 结果
      */
-    @Transactional
     @Override
     public int insertDocGroup(DocGroup docGroup)
     {
         docGroup.setCreateTime(DateUtils.getNowDate());
-        int rows = docGroupMapper.insertDocGroup(docGroup);
-        insertDocGroupUser(docGroup);
-        return rows;
+        return docGroupMapper.insertDocGroup(docGroup);
     }
 
     /**
@@ -70,13 +63,10 @@ public class DocGroupServiceImpl implements IDocGroupService
      * @param docGroup 分组
      * @return 结果
      */
-    @Transactional
     @Override
     public int updateDocGroup(DocGroup docGroup)
     {
         docGroup.setUpdateTime(DateUtils.getNowDate());
-        docGroupMapper.deleteDocGroupUserByGroupId(docGroup.getGroupId());
-        insertDocGroupUser(docGroup);
         return docGroupMapper.updateDocGroup(docGroup);
     }
 
@@ -86,11 +76,9 @@ public class DocGroupServiceImpl implements IDocGroupService
      * @param groupIds 需要删除的分组主键
      * @return 结果
      */
-    @Transactional
     @Override
     public int deleteDocGroupByGroupIds(Long[] groupIds)
     {
-        docGroupMapper.deleteDocGroupUserByGroupIds(groupIds);
         return docGroupMapper.deleteDocGroupByGroupIds(groupIds);
     }
 
@@ -100,35 +88,9 @@ public class DocGroupServiceImpl implements IDocGroupService
      * @param groupId 分组主键
      * @return 结果
      */
-    @Transactional
     @Override
     public int deleteDocGroupByGroupId(Long groupId)
     {
-        docGroupMapper.deleteDocGroupUserByGroupId(groupId);
         return docGroupMapper.deleteDocGroupByGroupId(groupId);
     }
-
-    /**
-     * 新增分组成员信息
-     *
-     * @param docGroup 分组对象
-     */
-    public void insertDocGroupUser(DocGroup docGroup)
-    {
-        List<DocGroupUser> docGroupUserList = docGroup.getDocGroupUserList();
-        Long groupId = docGroup.getGroupId();
-        if (StringUtils.isNotNull(docGroupUserList))
-        {
-            List<DocGroupUser> list = new ArrayList<DocGroupUser>();
-            for (DocGroupUser docGroupUser : docGroupUserList)
-            {
-                docGroupUser.setGroupId(groupId);
-                list.add(docGroupUser);
-            }
-            if (list.size() > 0)
-            {
-                docGroupMapper.batchDocGroupUser(list);
-            }
-        }
-    }
 }

+ 1 - 1
lzga-modules/lzga-doc/src/main/java/com/jjt/doc/service/impl/DocGroupUserServiceImpl.java

@@ -11,7 +11,7 @@ import com.jjt.doc.service.IDocGroupUserService;
  * 分组成员Service业务层处理
  *
  * @author wukai
- * @date 2023-03-27
+ * @date 2023-04-20
  */
 @Service
 public class DocGroupUserServiceImpl implements IDocGroupUserService

+ 18 - 40
lzga-modules/lzga-doc/src/main/resources/mapper/doc/DocGroupMapper.xml

@@ -7,6 +7,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <resultMap type="DocGroup" id="DocGroupResult">
         <result property="groupId"    column="GROUP_ID"    />
         <result property="groupName"    column="GROUP_NAME"    />
+        <result property="groupManager"    column="GROUP_MANAGER"    />
+        <result property="groupManagerName"    column="GROUP_MANAGER_NAME"    />
+        <result property="creater"    column="CREATER"    />
         <result property="createBy"    column="CREATE_BY"    />
         <result property="createTime"    column="CREATE_TIME"    />
         <result property="updateBy"    column="UPDATE_BY"    />
@@ -15,44 +18,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isDel"    column="IS_DEL"    />
     </resultMap>
 
-    <resultMap id="DocGroupDocGroupUserResult" type="DocGroup" extends="DocGroupResult">
-        <collection property="docGroupUserList" notNullColumn="sub_GROUP_ID" javaType="java.util.List" resultMap="DocGroupUserResult" />
-    </resultMap>
-
-    <resultMap type="DocGroupUser" id="DocGroupUserResult">
-        <result property="groupId"    column="sub_GROUP_ID"    />
-        <result property="userId"    column="sub_USER_ID"    />
-    </resultMap>
-
     <sql id="selectDocGroupVo">
-        select GROUP_ID, GROUP_NAME, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, REMARK, IS_DEL from doc_group
+        select GROUP_ID, GROUP_NAME, GROUP_MANAGER, GROUP_MANAGER_NAME, CREATER, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, REMARK, IS_DEL from doc_group
     </sql>
 
     <select id="selectDocGroupList" parameterType="DocGroup" resultMap="DocGroupResult">
         <include refid="selectDocGroupVo"/>
         <where>  
             <if test="groupName != null  and groupName != ''"> and GROUP_NAME like concat('%', #{groupName}, '%')</if>
-            <if test="createBy != null "> and CREATE_BY = #{createBy}</if>
-            <if test="createTime != null "> and CREATE_TIME = #{createTime}</if>
-            <if test="updateBy != null "> and UPDATE_BY = #{updateBy}</if>
-            <if test="updateTime != null "> and UPDATE_TIME = #{updateTime}</if>
-            <if test="remark != null  and remark != ''"> and REMARK = #{remark}</if>
-            <if test="isDel != null  and isDel != ''"> and IS_DEL = #{isDel}</if>
+            <if test="groupManager != null "> and GROUP_MANAGER = #{groupManager}</if>
+            <if test="groupManagerName != null  and groupManagerName != ''"> and GROUP_MANAGER_NAME like concat('%', #{groupManagerName}, '%')</if>
         </where>
     </select>
     
-    <select id="selectDocGroupByGroupId" parameterType="Long" resultMap="DocGroupDocGroupUserResult">
-        select a.GROUP_ID, a.GROUP_NAME, a.CREATE_BY, a.CREATE_TIME, a.UPDATE_BY, a.UPDATE_TIME, a.REMARK, a.IS_DEL,
- b.GROUP_ID as sub_GROUP_ID, b.USER_ID as sub_USER_ID
-        from doc_group a
-        left join doc_group_user b on b.GROUP_ID = a.GROUP_ID
-        where a.GROUP_ID = #{groupId}
+    <select id="selectDocGroupByGroupId" parameterType="Long" resultMap="DocGroupResult">
+        <include refid="selectDocGroupVo"/>
+        where GROUP_ID = #{groupId}
     </select>
         
     <insert id="insertDocGroup" parameterType="DocGroup" useGeneratedKeys="true" keyProperty="groupId">
         insert into doc_group
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="groupName != null">GROUP_NAME,</if>
+            <if test="groupManager != null">GROUP_MANAGER,</if>
+            <if test="groupManagerName != null">GROUP_MANAGER_NAME,</if>
+            <if test="creater != null">CREATER,</if>
             <if test="createBy != null">CREATE_BY,</if>
             <if test="createTime != null">CREATE_TIME,</if>
             <if test="updateBy != null">UPDATE_BY,</if>
@@ -62,6 +52,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="groupName != null">#{groupName},</if>
+            <if test="groupManager != null">#{groupManager},</if>
+            <if test="groupManagerName != null">#{groupManagerName},</if>
+            <if test="creater != null">#{creater},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
@@ -75,6 +68,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update doc_group
         <trim prefix="SET" suffixOverrides=",">
             <if test="groupName != null">GROUP_NAME = #{groupName},</if>
+            <if test="groupManager != null">GROUP_MANAGER = #{groupManager},</if>
+            <if test="groupManagerName != null">GROUP_MANAGER_NAME = #{groupManagerName},</if>
+            <if test="creater != null">CREATER = #{creater},</if>
             <if test="createBy != null">CREATE_BY = #{createBy},</if>
             <if test="createTime != null">CREATE_TIME = #{createTime},</if>
             <if test="updateBy != null">UPDATE_BY = #{updateBy},</if>
@@ -95,22 +91,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{groupId}
         </foreach>
     </delete>
-    
-    <delete id="deleteDocGroupUserByGroupIds" parameterType="String">
-        delete from doc_group_user where GROUP_ID in 
-        <foreach item="groupId" collection="array" open="(" separator="," close=")">
-            #{groupId}
-        </foreach>
-    </delete>
-
-    <delete id="deleteDocGroupUserByGroupId" parameterType="Long">
-        delete from doc_group_user where GROUP_ID = #{groupId}
-    </delete>
-
-    <insert id="batchDocGroupUser">
-        insert into doc_group_user( GROUP_ID, USER_ID) values
-		<foreach item="item" index="index" collection="list" separator=",">
-            ( #{item.groupId}, #{item.userId})
-        </foreach>
-    </insert>
 </mapper>

+ 7 - 1
lzga-modules/lzga-doc/src/main/resources/mapper/doc/DocGroupUserMapper.xml

@@ -7,15 +7,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <resultMap type="DocGroupUser" id="DocGroupUserResult">
         <result property="groupId"    column="GROUP_ID"    />
         <result property="userId"    column="USER_ID"    />
+        <result property="userName"    column="USER_NAME"    />
     </resultMap>
 
     <sql id="selectDocGroupUserVo">
-        select GROUP_ID, USER_ID from doc_group_user
+        select GROUP_ID, USER_ID, USER_NAME from doc_group_user
     </sql>
 
     <select id="selectDocGroupUserList" parameterType="DocGroupUser" resultMap="DocGroupUserResult">
         <include refid="selectDocGroupUserVo"/>
         <where>  
+            <if test="userId != null "> and USER_ID = #{userId}</if>
+            <if test="userName != null  and userName != ''"> and USER_NAME like concat('%', #{userName}, '%')</if>
         </where>
     </select>
     
@@ -29,10 +32,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="groupId != null">GROUP_ID,</if>
             <if test="userId != null">USER_ID,</if>
+            <if test="userName != null">USER_NAME,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="groupId != null">#{groupId},</if>
             <if test="userId != null">#{userId},</if>
+            <if test="userName != null">#{userName},</if>
          </trim>
     </insert>
 
@@ -40,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update doc_group_user
         <trim prefix="SET" suffixOverrides=",">
             <if test="userId != null">USER_ID = #{userId},</if>
+            <if test="userName != null">USER_NAME = #{userName},</if>
         </trim>
         where GROUP_ID = #{groupId}
     </update>

+ 1 - 1
lzga-ui/src/api/doc/group.js

@@ -41,4 +41,4 @@ export function delGroup(groupId) {
     url: '/doc/group/' + groupId,
     method: 'delete'
   })
-}
+}

+ 1 - 1
lzga-ui/src/api/doc/groupUser.js

@@ -41,4 +41,4 @@ export function delGroupUser(groupId) {
     url: '/doc/groupUser/' + groupId,
     method: 'delete'
   })
-}
+}

+ 4 - 0
lzga-ui/src/views/doc/dir/index.vue

@@ -257,6 +257,10 @@
       },
       /** 扩容申请 */
       handleExpand(row) {
+        console.log(this.spaceData);
+        return false;
+
+
         this.formSpace.currentCap = this.spaceData.spaceCap;
         this.formSpace.spaceId = this.spaceData.spaceId;
         this.formSpace.spaceName = this.spaceData.spaceName;

+ 173 - 303
lzga-ui/src/views/doc/group/index.vue

@@ -2,60 +2,15 @@
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
       <el-form-item label="分组名称" prop="groupName">
-        <el-input
-          v-model="queryParams.groupName"
-          placeholder="请输入分组名称"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
+        <el-input v-model="queryParams.groupName" placeholder="请输入分组名称" clearable @keyup.enter.native="handleQuery" />
       </el-form-item>
-      <el-form-item label="创建人" prop="createBy">
-        <el-input
-          v-model="queryParams.createBy"
-          placeholder="请输入创建人"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
+      <el-form-item label="分组管理员" prop="groupManager">
+        <el-input v-model="queryParams.groupManager" placeholder="请输入分组管理员" clearable
+          @keyup.enter.native="handleQuery" />
       </el-form-item>
-      <el-form-item label="创建时间" prop="createTime">
-        <el-date-picker clearable
-          v-model="queryParams.createTime"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="请选择创建时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="更新人" prop="updateBy">
-        <el-input
-          v-model="queryParams.updateBy"
-          placeholder="请输入更新人"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="更新时间" prop="updateTime">
-        <el-date-picker clearable
-          v-model="queryParams.updateTime"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="请选择更新时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="备注" prop="remark">
-        <el-input
-          v-model="queryParams.remark"
-          placeholder="请输入备注"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="逻辑删除标志;1/非1" prop="isDel">
-        <el-input
-          v-model="queryParams.isDel"
-          placeholder="请输入逻辑删除标志;1/非1"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
+      <el-form-item label="分组管理员姓名" prop="groupManagerName">
+        <el-input v-model="queryParams.groupManagerName" placeholder="请输入分组管理员姓名" clearable
+          @keyup.enter.native="handleQuery" />
       </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -65,46 +20,20 @@
 
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['doc:group:add']"
-        >新增</el-button>
+        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
+          v-hasPermi="['doc:group:add']">新增</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['doc:group:edit']"
-        >修改</el-button>
+        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
+          v-hasPermi="['doc:group:edit']">修改</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['doc:group:remove']"
-        >删除</el-button>
+        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
+          v-hasPermi="['doc:group:remove']">删除</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['doc:group:export']"
-        >导出</el-button>
+        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
+          v-hasPermi="['doc:group:export']">导出</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -113,47 +42,20 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="分组ID" align="center" prop="groupId" />
       <el-table-column label="分组名称" align="center" prop="groupName" />
-      <el-table-column label="创建人" align="center" prop="createBy" />
-      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="更新人" align="center" prop="updateBy" />
-      <el-table-column label="更新时间" align="center" prop="updateTime" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="备注" align="center" prop="remark" />
-      <el-table-column label="逻辑删除标志;1/非1" align="center" prop="isDel" />
+      <el-table-column label="分组管理员" align="center" prop="groupManager" />
+      <el-table-column label="分组管理员姓名" align="center" prop="groupManagerName" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['doc:group:edit']"
-          >修改</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['doc:group:remove']"
-          >删除</el-button>
+          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
+            v-hasPermi="['doc:group:edit']">修改</el-button>
+          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
+            v-hasPermi="['doc:group:remove']">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
-    
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
+
+    <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
+      @pagination="getList" />
 
     <!-- 添加或修改分组对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
@@ -161,25 +63,21 @@
         <el-form-item label="分组名称" prop="groupName">
           <el-input v-model="form.groupName" placeholder="请输入分组名称" />
         </el-form-item>
+        <el-form-item label="分组管理员" prop="groupManager">
+          <el-input v-model="form.groupManager" placeholder="请输入分组管理员" />
+        </el-form-item>
+        <el-form-item label="分组管理员姓名" prop="groupManagerName">
+          <el-input v-model="form.groupManagerName" placeholder="请输入分组管理员姓名" />
+        </el-form-item>
+        <el-form-item label="创建人ID" prop="creater">
+          <el-input v-model="form.creater" placeholder="请输入创建人ID" />
+        </el-form-item>
         <el-form-item label="备注" prop="remark">
           <el-input v-model="form.remark" placeholder="请输入备注" />
         </el-form-item>
         <el-form-item label="逻辑删除标志;1/非1" prop="isDel">
           <el-input v-model="form.isDel" placeholder="请输入逻辑删除标志;1/非1" />
         </el-form-item>
-        <el-divider content-position="center">分组成员信息</el-divider>
-        <el-row :gutter="10" class="mb8">
-          <el-col :span="1.5">
-            <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddDocGroupUser">添加</el-button>
-          </el-col>
-          <el-col :span="1.5">
-            <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteDocGroupUser">删除</el-button>
-          </el-col>
-        </el-row>
-        <el-table :data="docGroupUserList" :row-class-name="rowDocGroupUserIndex" @selection-change="handleDocGroupUserSelectionChange" ref="docGroupUser">
-          <el-table-column type="selection" width="50" align="center" />
-          <el-table-column label="序号" align="center" prop="index" width="50"/>
-        </el-table>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -190,181 +88,153 @@
 </template>
 
 <script>
-import { listGroup, getGroup, delGroup, addGroup, updateGroup } from "@/api/doc/group";
+  import {
+    listGroup,
+    getGroup,
+    delGroup,
+    addGroup,
+    updateGroup
+  } from "@/api/doc/group";
 
-export default {
-  name: "Group",
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 子表选中数据
-      checkedDocGroupUser: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 分组表格数据
-      groupList: [],
-      // 分组成员表格数据
-      docGroupUserList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        groupName: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null,
-        remark: null,
-        isDel: null
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-      }
-    };
-  },
-  created() {
-    this.getList();
-  },
-  methods: {
-    /** 查询分组列表 */
-    getList() {
-      this.loading = true;
-      listGroup(this.queryParams).then(response => {
-        this.groupList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        groupId: null,
-        groupName: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null,
-        remark: null,
-        isDel: null
+  export default {
+    name: "Group",
+    data() {
+      return {
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 分组表格数据
+        groupList: [],
+        // 弹出层标题
+        title: "",
+        // 是否显示弹出层
+        open: false,
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+          groupName: null,
+          groupManager: null,
+          groupManagerName: null,
+        },
+        // 表单参数
+        form: {},
+        // 表单校验
+        rules: {}
       };
-      this.docGroupUserList = [];
-      this.resetForm("form");
     },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
+    created() {
       this.getList();
     },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.groupId)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加分组";
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const groupId = row.groupId || this.ids
-      getGroup(groupId).then(response => {
-        this.form = response.data;
-        this.docGroupUserList = response.data.docGroupUserList;
+    methods: {
+      /** 查询分组列表 */
+      getList() {
+        this.loading = true;
+        listGroup(this.queryParams).then(response => {
+          this.groupList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        });
+      },
+      // 取消按钮
+      cancel() {
+        this.open = false;
+        this.reset();
+      },
+      // 表单重置
+      reset() {
+        this.form = {
+          groupId: null,
+          groupName: null,
+          groupManager: null,
+          groupManagerName: null,
+          creater: null,
+          createBy: null,
+          createTime: null,
+          updateBy: null,
+          updateTime: null,
+          remark: null,
+          isDel: null
+        };
+        this.resetForm("form");
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.resetForm("queryForm");
+        this.handleQuery();
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.ids = selection.map(item => item.groupId)
+        this.single = selection.length !== 1
+        this.multiple = !selection.length
+      },
+      /** 新增按钮操作 */
+      handleAdd() {
+        this.reset();
         this.open = true;
-        this.title = "修改分组";
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          this.form.docGroupUserList = this.docGroupUserList;
-          if (this.form.groupId != null) {
-            updateGroup(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addGroup(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
+        this.title = "添加分组";
+      },
+      /** 修改按钮操作 */
+      handleUpdate(row) {
+        this.reset();
+        const groupId = row.groupId || this.ids
+        getGroup(groupId).then(response => {
+          this.form = response.data;
+          this.open = true;
+          this.title = "修改分组";
+        });
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if (this.form.groupId != null) {
+              updateGroup(this.form).then(response => {
+                this.$modal.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
+            } else {
+              addGroup(this.form).then(response => {
+                this.$modal.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            }
           }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const groupIds = row.groupId || this.ids;
-      this.$modal.confirm('是否确认删除分组编号为"' + groupIds + '"的数据项?').then(function() {
-        return delGroup(groupIds);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
-    },
-	/** 分组成员序号 */
-    rowDocGroupUserIndex({ row, rowIndex }) {
-      row.index = rowIndex + 1;
-    },
-    /** 分组成员添加按钮操作 */
-    handleAddDocGroupUser() {
-      let obj = {};
-      this.docGroupUserList.push(obj);
-    },
-    /** 分组成员删除按钮操作 */
-    handleDeleteDocGroupUser() {
-      if (this.checkedDocGroupUser.length == 0) {
-        this.$modal.msgError("请先选择要删除的分组成员数据");
-      } else {
-        const docGroupUserList = this.docGroupUserList;
-        const checkedDocGroupUser = this.checkedDocGroupUser;
-        this.docGroupUserList = docGroupUserList.filter(function(item) {
-          return checkedDocGroupUser.indexOf(item.index) == -1
         });
+      },
+      /** 删除按钮操作 */
+      handleDelete(row) {
+        const groupIds = row.groupId || this.ids;
+        this.$modal.confirm('是否确认删除分组编号为"' + groupIds + '"的数据项?').then(function() {
+          return delGroup(groupIds);
+        }).then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        }).catch(() => {});
+      },
+      /** 导出按钮操作 */
+      handleExport() {
+        this.download('doc/group/export', {
+          ...this.queryParams
+        }, `group_${new Date().getTime()}.xlsx`)
       }
-    },
-    /** 复选框选中数据 */
-    handleDocGroupUserSelectionChange(selection) {
-      this.checkedDocGroupUser = selection.map(item => item.index)
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('doc/group/export', {
-        ...this.queryParams
-      }, `group_${new Date().getTime()}.xlsx`)
     }
-  }
-};
-</script>
+  };
+</script>

+ 244 - 110
lzga-ui/src/views/doc/groupUser/index.vue

@@ -1,122 +1,256 @@
 <template>
-  <div id="app">
-    <div class='qualityManual-container'>
-      <div>
-        <button style='width: 120px;' type='primary' @click='getFile'>word</button>
-        <button style='width: 120px;' type='primary' @click='getExcelFile'>Excel</button>
-        <button style='width: 120px;' type='primary' @click='getPptFile'>ppt</button>
-        <button style='width: 120px;' type='primary' @click='close'>关闭</button>
-      </div>
-      <div v-if='show' class='qualityManual-container-office'>
-        <vab-only-office :option='option' />
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="用户ID" prop="userId">
+        <el-input
+          v-model="queryParams.userId"
+          placeholder="请输入用户ID"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="用户姓名" prop="userName">
+        <el-input
+          v-model="queryParams.userName"
+          placeholder="请输入用户姓名"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['doc:groupUser:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['doc:groupUser:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['doc:groupUser:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['doc:groupUser:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="groupUserList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="分组ID" align="center" prop="groupId" />
+      <el-table-column label="用户ID" align="center" prop="userId" />
+      <el-table-column label="用户姓名" align="center" prop="userName" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['doc:groupUser:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['doc:groupUser:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改分组成员对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="用户姓名" prop="userName">
+          <el-input v-model="form.userName" placeholder="请输入用户姓名" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
       </div>
-    </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-  import vabOnlyOffice from '@/views/doc/oo/onlyoffice.vue'
+import { listGroupUser, getGroupUser, delGroupUser, addGroupUser, updateGroupUser } from "@/api/doc/groupUser";
 
-  export default {
-    name: 'App',
-    components: {
-      vabOnlyOffice
-    },
-    data() {
-      return {
-        //参考vabOnlyOffice组件参数配置
-        option: {
-          url: '', //在线文档地址
-          isEdit: '', //是否允许编辑
-          fileType: '', //文件扩展名
-          title: '', //文件标题
-          user: {
-            id: null, //用户ID
-            name: '' //用户姓名
-          },
-          editUrl: '' //回调地址
-        },
-        show: false //是否显示
+export default {
+  name: "GroupUser",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 分组成员表格数据
+      groupUserList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        userId: null,
+        userName: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
       }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询分组成员列表 */
+    getList() {
+      this.loading = true;
+      listGroupUser(this.queryParams).then(response => {
+        this.groupUserList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
     },
-    methods: {
-      getFile() {
-        this.show = true
-        // getAction('/file/selectById', { id: this.id }).then(res => {
-        this.option.isEdit = false
-        this.option.url = 'http://192.168.1.26:9300/statics/2023/04/03/产品研发会议纪要20230314_20230403170635A001.doc'
-        this.option.title = '测试word'
-        this.option.fileType = 'docx'
-        this.option.user = {
-          id: 12,
-          name: '张三'
-        }
-        // })
-      },
-      close() {
-        this.show = false
-      },
-      getExcelFile() {
-        this.show = true
-        // getAction('/file/selectById', { id: this.id }).then(res => {
-        // this.option.key = "11889900-3321";
-        this.option.isEdit = true
-        this.option.url = 'http://192.168.1.26:9300/statics/2023/03/20/第一阶段工作内容V1.0_20230320114614A002.xlsx'
-        this.option.title = '测试excel'
-        this.option.fileType = 'xlsx'
-        this.option.user = {
-            id: 13,
-            name: '李四'
-          },
-          this.option.editUrl = 'http://192.168.1.26:8080/doc/groupUser/save?test=1'
-        // })
-      },
-      close() {
-        this.show = false
-      },
-      getPptFile() {
-        this.show = true
-        // getAction('/file/selectById', { id: this.id }).then(res => {
-        this.option.isEdit = true
-        this.option.url = 'http://192.168.1.26:9300/statics/2023/03/20/项目管理培训06-项目时间管理.ppt'
-        this.option.title = '测试ppt'
-        this.option.fileType = 'ppt'
-        this.option.user = {
-          id: 14,
-          name: '王五'
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        groupId: null,
+        userId: null,
+        userName: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.groupId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加分组成员";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const groupId = row.groupId || this.ids
+      getGroupUser(groupId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改分组成员";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.groupId != null) {
+            updateGroupUser(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addGroupUser(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
         }
-        // })
-      },
-      close() {
-        this.show = false
-      },
+      });
     },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const groupIds = row.groupId || this.ids;
+      this.$modal.confirm('是否确认删除分组成员编号为"' + groupIds + '"的数据项?').then(function() {
+        return delGroupUser(groupIds);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('doc/groupUser/export', {
+        ...this.queryParams
+      }, `groupUser_${new Date().getTime()}.xlsx`)
+    }
   }
-</script>
-
-<style>
-  html,
-  body {
-    height: '900px';
-  }
-
-  #app {
-    font-family: Avenir, Helvetica, Arial, sans-serif;
-    -webkit-font-smoothing: antialiased;
-    -moz-osx-font-smoothing: grayscale;
-    text-align: center;
-    color: #2c3e50;
-    height: '900px';
-
-  }
-
-  .qualityManual-container {
-    padding: 0 !important;
-    height: '900px';
-  }
-
-  .qualityManual-container-office {
-    width: 100%;
-    height: '900px';
-  }
-</style>
+};
+</script>

+ 14 - 3
lzga-ui/src/views/doc/info/index.vue

@@ -59,8 +59,8 @@
           <el-table-column label="标签" align="center" prop="tagName" />
           <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
             <template slot-scope="scope">
-              <el-button size="mini" type="text" icon="el-icon-view" @click="handlePreview(scope.row)">分享</el-button>
-              <el-button size="mini" type="text" icon="el-icon-view" @click="handlePreview(scope.row)">下载</el-button>
+              <el-button size="mini" type="text" icon="el-icon-view" @click="handleShare(scope.row)">分享</el-button>
+              <el-button size="mini" type="text" icon="el-icon-view" @click="handleDownload(scope.row)">下载</el-button>
               <el-button size="mini" type="text" icon="el-icon-view" @click="handlePreview(scope.row)">预览</el-button>
               <el-button size="mini" type="text" icon="el-icon-view" @click="handleEdit(scope.row)">在线编辑</el-button>
               <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
@@ -224,6 +224,17 @@
         this.queryParams.searchValue = this.spaceId;
         this.handleQuery();
       },
+      //分享
+      handleShare(row) {
+        row.isEdit = false;
+        this.$tab.openPage("文件[" + row.docName + "]预览", '/doc/oo-edit/index/' + row.docId, row);
+      },
+      //下载
+      handleDownload(row) {
+        this.download(row.docPath, null, row.docName + "." + row.docType);
+        row.isEdit = false;
+        this.$tab.openPage("文件[" + row.docName + "]预览", '/doc/oo-edit/index/' + row.docId, row);
+      },
       //预览
       handlePreview(row) {
         row.isEdit = false;
@@ -377,4 +388,4 @@
       }
     }
   };
-</script>
+</script>