Browse Source

支部成员管理 - 委员会名册

Wang Zi Wen 2 năm trước cách đây
mục cha
commit
c73e805ac8

+ 104 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/branch/TBranchMemberController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.web.controller.branch;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+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.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.branch.domain.TBranchMember;
+import com.ruoyi.branch.service.ITBranchMemberService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 支部成员管理Controller
+ * 
+ * @author ruoyi
+ * @date 2023-06-15
+ */
+@RestController
+@RequestMapping("/branch/member")
+public class TBranchMemberController extends BaseController
+{
+    @Autowired
+    private ITBranchMemberService tBranchMemberService;
+
+    /**
+     * 查询支部成员管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('branch:member:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TBranchMember tBranchMember)
+    {
+        startPage();
+        List<TBranchMember> list = tBranchMemberService.selectTBranchMemberList(tBranchMember);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出支部成员管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('branch:member:export')")
+    @Log(title = "支部成员管理", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TBranchMember tBranchMember)
+    {
+        List<TBranchMember> list = tBranchMemberService.selectTBranchMemberList(tBranchMember);
+        ExcelUtil<TBranchMember> util = new ExcelUtil<TBranchMember>(TBranchMember.class);
+        util.exportExcel(response, list, "支部成员管理数据");
+    }
+
+    /**
+     * 获取支部成员管理详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('branch:member:query')")
+    @GetMapping(value = "/{memberId}")
+    public AjaxResult getInfo(@PathVariable("memberId") Long memberId)
+    {
+        return success(tBranchMemberService.selectTBranchMemberByMemberId(memberId));
+    }
+
+    /**
+     * 新增支部成员管理
+     */
+    @PreAuthorize("@ss.hasPermi('branch:member:add')")
+    @Log(title = "支部成员管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TBranchMember tBranchMember)
+    {
+        return toAjax(tBranchMemberService.insertTBranchMember(tBranchMember));
+    }
+
+    /**
+     * 修改支部成员管理
+     */
+    @PreAuthorize("@ss.hasPermi('branch:member:edit')")
+    @Log(title = "支部成员管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TBranchMember tBranchMember)
+    {
+        return toAjax(tBranchMemberService.updateTBranchMember(tBranchMember));
+    }
+
+    /**
+     * 删除支部成员管理
+     */
+    @PreAuthorize("@ss.hasPermi('branch:member:remove')")
+    @Log(title = "支部成员管理", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{memberIds}")
+    public AjaxResult remove(@PathVariable Long[] memberIds)
+    {
+        return toAjax(tBranchMemberService.deleteTBranchMemberByMemberIds(memberIds));
+    }
+}

+ 374 - 0
ruoyi-system/src/main/java/com/ruoyi/branch/domain/TBranchMember.java

@@ -0,0 +1,374 @@
+package com.ruoyi.branch.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 支部成员管理对象 t_branch_member
+ * 
+ * @author ruoyi
+ * @date 2023-06-15
+ */
+public class TBranchMember extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键id */
+    @Excel(name = "主键id")
+    private Long memberId;
+
+    /** 用户id */
+    @Excel(name = "用户id")
+    private Long userId;
+
+    /** 成员类型 */
+    @Excel(name = "成员类型")
+    private String memberType;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Date birthday;
+
+    /** 学历 */
+    @Excel(name = "学历")
+    private String educationLevel;
+
+    /** 参加工作时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "参加工作时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date workJoinTime;
+
+    /** 入职时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "入职时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date workEntryTime;
+
+    /** 入党时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "入党时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date partyEntryTime;
+
+    /** 现岗位 */
+    @Excel(name = "现岗位")
+    private String currentPost;
+
+    /** 委员分工 */
+    @Excel(name = "委员分工")
+    private String labourDivision;
+
+    /** 任职时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "任职时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date labourEntryTime;
+
+    /** 离任时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "离任时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date labourLeaveTime;
+
+    /** 联系方式 */
+    @Excel(name = "联系方式")
+    private String contact;
+
+    /** 调进时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "调进时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date entryTime;
+
+    /** 调出时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "调出时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date leaveTime;
+
+    /** 是否团员 */
+    @Excel(name = "是否团员")
+    private String isLeague;
+
+    /** 申请入党时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "申请入党时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date applyTime;
+
+    /** 建表考察时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "建表考察时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date formCreateTime;
+
+    /** 现培养人 */
+    @Excel(name = "现培养人")
+    private String currentMentor;
+
+    /** 计划发展时间 */
+    @Excel(name = "计划发展时间")
+    private String planDevelopDuration;
+
+    /** 是否参加过入党前培训(2年有效) */
+    @Excel(name = "是否参加过入党前培训", readConverterExp = "2=年有效")
+    private String isTrained;
+
+    /** 备注(增减原因) */
+    @Excel(name = "备注", readConverterExp = "增=减原因")
+    private String remarks;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 部门id */
+    @Excel(name = "部门id")
+    private Long deptId;
+
+    public void setMemberId(Long memberId) 
+    {
+        this.memberId = memberId;
+    }
+
+    public Long getMemberId() 
+    {
+        return memberId;
+    }
+    public void setUserId(Long userId) 
+    {
+        this.userId = userId;
+    }
+
+    public Long getUserId() 
+    {
+        return userId;
+    }
+    public void setMemberType(String memberType) 
+    {
+        this.memberType = memberType;
+    }
+
+    public String getMemberType() 
+    {
+        return memberType;
+    }
+    public void setBirthday(Date birthday) 
+    {
+        this.birthday = birthday;
+    }
+
+    public Date getBirthday() 
+    {
+        return birthday;
+    }
+    public void setEducationLevel(String educationLevel) 
+    {
+        this.educationLevel = educationLevel;
+    }
+
+    public String getEducationLevel() 
+    {
+        return educationLevel;
+    }
+    public void setWorkJoinTime(Date workJoinTime) 
+    {
+        this.workJoinTime = workJoinTime;
+    }
+
+    public Date getWorkJoinTime() 
+    {
+        return workJoinTime;
+    }
+    public void setWorkEntryTime(Date workEntryTime) 
+    {
+        this.workEntryTime = workEntryTime;
+    }
+
+    public Date getWorkEntryTime() 
+    {
+        return workEntryTime;
+    }
+    public void setPartyEntryTime(Date partyEntryTime) 
+    {
+        this.partyEntryTime = partyEntryTime;
+    }
+
+    public Date getPartyEntryTime() 
+    {
+        return partyEntryTime;
+    }
+    public void setCurrentPost(String currentPost) 
+    {
+        this.currentPost = currentPost;
+    }
+
+    public String getCurrentPost() 
+    {
+        return currentPost;
+    }
+    public void setLabourDivision(String labourDivision) 
+    {
+        this.labourDivision = labourDivision;
+    }
+
+    public String getLabourDivision() 
+    {
+        return labourDivision;
+    }
+    public void setLabourEntryTime(Date labourEntryTime) 
+    {
+        this.labourEntryTime = labourEntryTime;
+    }
+
+    public Date getLabourEntryTime() 
+    {
+        return labourEntryTime;
+    }
+    public void setLabourLeaveTime(Date labourLeaveTime) 
+    {
+        this.labourLeaveTime = labourLeaveTime;
+    }
+
+    public Date getLabourLeaveTime() 
+    {
+        return labourLeaveTime;
+    }
+    public void setContact(String contact) 
+    {
+        this.contact = contact;
+    }
+
+    public String getContact() 
+    {
+        return contact;
+    }
+    public void setEntryTime(Date entryTime) 
+    {
+        this.entryTime = entryTime;
+    }
+
+    public Date getEntryTime() 
+    {
+        return entryTime;
+    }
+    public void setLeaveTime(Date leaveTime) 
+    {
+        this.leaveTime = leaveTime;
+    }
+
+    public Date getLeaveTime() 
+    {
+        return leaveTime;
+    }
+    public void setIsLeague(String isLeague) 
+    {
+        this.isLeague = isLeague;
+    }
+
+    public String getIsLeague() 
+    {
+        return isLeague;
+    }
+    public void setApplyTime(Date applyTime) 
+    {
+        this.applyTime = applyTime;
+    }
+
+    public Date getApplyTime() 
+    {
+        return applyTime;
+    }
+    public void setFormCreateTime(Date formCreateTime) 
+    {
+        this.formCreateTime = formCreateTime;
+    }
+
+    public Date getFormCreateTime() 
+    {
+        return formCreateTime;
+    }
+    public void setCurrentMentor(String currentMentor) 
+    {
+        this.currentMentor = currentMentor;
+    }
+
+    public String getCurrentMentor() 
+    {
+        return currentMentor;
+    }
+    public void setPlanDevelopDuration(String planDevelopDuration) 
+    {
+        this.planDevelopDuration = planDevelopDuration;
+    }
+
+    public String getPlanDevelopDuration() 
+    {
+        return planDevelopDuration;
+    }
+    public void setIsTrained(String isTrained) 
+    {
+        this.isTrained = isTrained;
+    }
+
+    public String getIsTrained() 
+    {
+        return isTrained;
+    }
+    public void setRemarks(String remarks) 
+    {
+        this.remarks = remarks;
+    }
+
+    public String getRemarks() 
+    {
+        return remarks;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setDeptId(Long deptId) 
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId() 
+    {
+        return deptId;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("memberId", getMemberId())
+            .append("userId", getUserId())
+            .append("memberType", getMemberType())
+            .append("birthday", getBirthday())
+            .append("educationLevel", getEducationLevel())
+            .append("workJoinTime", getWorkJoinTime())
+            .append("workEntryTime", getWorkEntryTime())
+            .append("partyEntryTime", getPartyEntryTime())
+            .append("currentPost", getCurrentPost())
+            .append("labourDivision", getLabourDivision())
+            .append("labourEntryTime", getLabourEntryTime())
+            .append("labourLeaveTime", getLabourLeaveTime())
+            .append("contact", getContact())
+            .append("entryTime", getEntryTime())
+            .append("leaveTime", getLeaveTime())
+            .append("isLeague", getIsLeague())
+            .append("applyTime", getApplyTime())
+            .append("formCreateTime", getFormCreateTime())
+            .append("currentMentor", getCurrentMentor())
+            .append("planDevelopDuration", getPlanDevelopDuration())
+            .append("isTrained", getIsTrained())
+            .append("remarks", getRemarks())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("deptId", getDeptId())
+            .toString();
+    }
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/branch/mapper/TBranchMemberMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.branch.mapper;
+
+import java.util.List;
+import com.ruoyi.branch.domain.TBranchMember;
+
+/**
+ * 支部成员管理Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-06-15
+ */
+public interface TBranchMemberMapper 
+{
+    /**
+     * 查询支部成员管理
+     * 
+     * @param memberId 支部成员管理主键
+     * @return 支部成员管理
+     */
+    public TBranchMember selectTBranchMemberByMemberId(Long memberId);
+
+    /**
+     * 查询支部成员管理列表
+     * 
+     * @param tBranchMember 支部成员管理
+     * @return 支部成员管理集合
+     */
+    public List<TBranchMember> selectTBranchMemberList(TBranchMember tBranchMember);
+
+    /**
+     * 新增支部成员管理
+     * 
+     * @param tBranchMember 支部成员管理
+     * @return 结果
+     */
+    public int insertTBranchMember(TBranchMember tBranchMember);
+
+    /**
+     * 修改支部成员管理
+     * 
+     * @param tBranchMember 支部成员管理
+     * @return 结果
+     */
+    public int updateTBranchMember(TBranchMember tBranchMember);
+
+    /**
+     * 删除支部成员管理
+     * 
+     * @param memberId 支部成员管理主键
+     * @return 结果
+     */
+    public int deleteTBranchMemberByMemberId(Long memberId);
+
+    /**
+     * 批量删除支部成员管理
+     * 
+     * @param memberIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTBranchMemberByMemberIds(Long[] memberIds);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/branch/service/ITBranchMemberService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.branch.service;
+
+import java.util.List;
+import com.ruoyi.branch.domain.TBranchMember;
+
+/**
+ * 支部成员管理Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-06-15
+ */
+public interface ITBranchMemberService 
+{
+    /**
+     * 查询支部成员管理
+     * 
+     * @param memberId 支部成员管理主键
+     * @return 支部成员管理
+     */
+    public TBranchMember selectTBranchMemberByMemberId(Long memberId);
+
+    /**
+     * 查询支部成员管理列表
+     * 
+     * @param tBranchMember 支部成员管理
+     * @return 支部成员管理集合
+     */
+    public List<TBranchMember> selectTBranchMemberList(TBranchMember tBranchMember);
+
+    /**
+     * 新增支部成员管理
+     * 
+     * @param tBranchMember 支部成员管理
+     * @return 结果
+     */
+    public int insertTBranchMember(TBranchMember tBranchMember);
+
+    /**
+     * 修改支部成员管理
+     * 
+     * @param tBranchMember 支部成员管理
+     * @return 结果
+     */
+    public int updateTBranchMember(TBranchMember tBranchMember);
+
+    /**
+     * 批量删除支部成员管理
+     * 
+     * @param memberIds 需要删除的支部成员管理主键集合
+     * @return 结果
+     */
+    public int deleteTBranchMemberByMemberIds(Long[] memberIds);
+
+    /**
+     * 删除支部成员管理信息
+     * 
+     * @param memberId 支部成员管理主键
+     * @return 结果
+     */
+    public int deleteTBranchMemberByMemberId(Long memberId);
+}

+ 99 - 0
ruoyi-system/src/main/java/com/ruoyi/branch/service/impl/TBranchMemberServiceImpl.java

@@ -0,0 +1,99 @@
+package com.ruoyi.branch.service.impl;
+
+import java.util.List;
+
+import com.ruoyi.common.annotation.DataScope;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.branch.mapper.TBranchMemberMapper;
+import com.ruoyi.branch.domain.TBranchMember;
+import com.ruoyi.branch.service.ITBranchMemberService;
+
+/**
+ * 支部成员管理Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-06-15
+ */
+@Service
+public class TBranchMemberServiceImpl implements ITBranchMemberService 
+{
+    @Autowired
+    private TBranchMemberMapper tBranchMemberMapper;
+
+    /**
+     * 查询支部成员管理
+     * 
+     * @param memberId 支部成员管理主键
+     * @return 支部成员管理
+     */
+    @Override
+    public TBranchMember selectTBranchMemberByMemberId(Long memberId)
+    {
+        return tBranchMemberMapper.selectTBranchMemberByMemberId(memberId);
+    }
+
+    /**
+     * 查询支部成员管理列表
+     * 
+     * @param tBranchMember 支部成员管理
+     * @return 支部成员管理
+     */
+    @Override
+    @DataScope(deptAlias = "d", userAlias = "u")
+    public List<TBranchMember> selectTBranchMemberList(TBranchMember tBranchMember)
+    {
+        return tBranchMemberMapper.selectTBranchMemberList(tBranchMember);
+    }
+
+    /**
+     * 新增支部成员管理
+     * 
+     * @param tBranchMember 支部成员管理
+     * @return 结果
+     */
+    @Override
+    public int insertTBranchMember(TBranchMember tBranchMember)
+    {
+        tBranchMember.setCreateTime(DateUtils.getNowDate());
+        return tBranchMemberMapper.insertTBranchMember(tBranchMember);
+    }
+
+    /**
+     * 修改支部成员管理
+     * 
+     * @param tBranchMember 支部成员管理
+     * @return 结果
+     */
+    @Override
+    public int updateTBranchMember(TBranchMember tBranchMember)
+    {
+        tBranchMember.setUpdateTime(DateUtils.getNowDate());
+        return tBranchMemberMapper.updateTBranchMember(tBranchMember);
+    }
+
+    /**
+     * 批量删除支部成员管理
+     * 
+     * @param memberIds 需要删除的支部成员管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTBranchMemberByMemberIds(Long[] memberIds)
+    {
+        return tBranchMemberMapper.deleteTBranchMemberByMemberIds(memberIds);
+    }
+
+    /**
+     * 删除支部成员管理信息
+     * 
+     * @param memberId 支部成员管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTBranchMemberByMemberId(Long memberId)
+    {
+        return tBranchMemberMapper.deleteTBranchMemberByMemberId(memberId);
+    }
+}

+ 188 - 0
ruoyi-system/src/main/resources/mapper/branch/TBranchMemberMapper.xml

@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.branch.mapper.TBranchMemberMapper">
+    
+    <resultMap type="TBranchMember" id="TBranchMemberResult">
+        <result property="memberId"    column="member_id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="memberType"    column="member_type"    />
+        <result property="birthday"    column="birthday"    />
+        <result property="educationLevel"    column="education_level"    />
+        <result property="workJoinTime"    column="work_join_time"    />
+        <result property="workEntryTime"    column="work_entry_time"    />
+        <result property="partyEntryTime"    column="party_entry_time"    />
+        <result property="currentPost"    column="current_post"    />
+        <result property="labourDivision"    column="labour_division"    />
+        <result property="labourEntryTime"    column="labour_entry_time"    />
+        <result property="labourLeaveTime"    column="labour_leave_time"    />
+        <result property="contact"    column="contact"    />
+        <result property="entryTime"    column="entry_time"    />
+        <result property="leaveTime"    column="leave_time"    />
+        <result property="isLeague"    column="is_league"    />
+        <result property="applyTime"    column="apply_time"    />
+        <result property="formCreateTime"    column="form_create_time"    />
+        <result property="currentMentor"    column="current_mentor"    />
+        <result property="planDevelopDuration"    column="plan_develop_duration"    />
+        <result property="isTrained"    column="is_trained"    />
+        <result property="remarks"    column="remarks"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="deptId"    column="dept_id"    />
+    </resultMap>
+
+    <sql id="selectTBranchMemberVo">
+        select u.member_id, u.user_id, u.member_type, u.birthday, u.education_level, u.work_join_time, u.work_entry_time, u.party_entry_time, u.current_post, u.labour_division, u.labour_entry_time, u.labour_leave_time, u.contact, u.entry_time, u.leave_time, u.is_league, u.apply_time, u.form_create_time, u.current_mentor, u.plan_develop_duration, u.is_trained, u.remarks, u.del_flag, u.create_by, u.create_time, u.update_by, u.update_time, u.dept_id from t_branch_member u left join sys_dept d on u.dept_id = d.dept_id
+    </sql>
+
+    <select id="selectTBranchMemberList" parameterType="TBranchMember" resultMap="TBranchMemberResult">
+        <include refid="selectTBranchMemberVo"/>
+        <where>  
+            <if test="memberId != null "> and u.member_id = #{memberId}</if>
+            <if test="userId != null "> and u.user_id = #{userId}</if>
+            <if test="memberType != null  and memberType != ''"> and u.member_type = #{memberType}</if>
+            <if test="birthday != null "> and u.birthday = #{birthday}</if>
+            <if test="educationLevel != null  and educationLevel != ''"> and u.education_level = #{educationLevel}</if>
+            <if test="workJoinTime != null "> and u.work_join_time = #{workJoinTime}</if>
+            <if test="workEntryTime != null "> and u.work_entry_time = #{workEntryTime}</if>
+            <if test="partyEntryTime != null "> and u.party_entry_time = #{partyEntryTime}</if>
+            <if test="currentPost != null  and currentPost != ''"> and u.current_post = #{currentPost}</if>
+            <if test="labourDivision != null  and labourDivision != ''"> and u.labour_division = #{labourDivision}</if>
+            <if test="labourEntryTime != null "> and u.labour_entry_time = #{labourEntryTime}</if>
+            <if test="labourLeaveTime != null "> and u.labour_leave_time = #{labourLeaveTime}</if>
+            <if test="contact != null  and contact != ''"> and u.contact = #{contact}</if>
+            <if test="entryTime != null "> and u.entry_time = #{entryTime}</if>
+            <if test="leaveTime != null "> and u.leave_time = #{leaveTime}</if>
+            <if test="isLeague != null  and isLeague != ''"> and u.is_league = #{isLeague}</if>
+            <if test="applyTime != null "> and u.apply_time = #{applyTime}</if>
+            <if test="formCreateTime != null "> and u.form_create_time = #{formCreateTime}</if>
+            <if test="currentMentor != null  and currentMentor != ''"> and u.current_mentor = #{currentMentor}</if>
+            <if test="planDevelopDuration != null  and planDevelopDuration != ''"> and u.plan_develop_duration = #{planDevelopDuration}</if>
+            <if test="isTrained != null  and isTrained != ''"> and u.is_trained = #{isTrained}</if>
+            <if test="remarks != null  and remarks != ''"> and u.remarks = #{remarks}</if>
+            <if test="deptId != null "> and u.dept_id = #{deptId}</if>
+            and u.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+    
+    <select id="selectTBranchMemberByMemberId" parameterType="Long" resultMap="TBranchMemberResult">
+        <include refid="selectTBranchMemberVo"/>
+        where u.member_id = #{memberId}
+        and u.del_flag = 0
+    </select>
+        
+    <insert id="insertTBranchMember" parameterType="TBranchMember">
+        insert into t_branch_member
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="memberId != null">member_id,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="memberType != null">member_type,</if>
+            <if test="birthday != null">birthday,</if>
+            <if test="educationLevel != null">education_level,</if>
+            <if test="workJoinTime != null">work_join_time,</if>
+            <if test="workEntryTime != null">work_entry_time,</if>
+            <if test="partyEntryTime != null">party_entry_time,</if>
+            <if test="currentPost != null">current_post,</if>
+            <if test="labourDivision != null">labour_division,</if>
+            <if test="labourEntryTime != null">labour_entry_time,</if>
+            <if test="labourLeaveTime != null">labour_leave_time,</if>
+            <if test="contact != null">contact,</if>
+            <if test="entryTime != null">entry_time,</if>
+            <if test="leaveTime != null">leave_time,</if>
+            <if test="isLeague != null">is_league,</if>
+            <if test="applyTime != null">apply_time,</if>
+            <if test="formCreateTime != null">form_create_time,</if>
+            <if test="currentMentor != null">current_mentor,</if>
+            <if test="planDevelopDuration != null">plan_develop_duration,</if>
+            <if test="isTrained != null">is_trained,</if>
+            <if test="remarks != null">remarks,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="deptId != null">dept_id,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="memberId != null">#{memberId},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="memberType != null">#{memberType},</if>
+            <if test="birthday != null">#{birthday},</if>
+            <if test="educationLevel != null">#{educationLevel},</if>
+            <if test="workJoinTime != null">#{workJoinTime},</if>
+            <if test="workEntryTime != null">#{workEntryTime},</if>
+            <if test="partyEntryTime != null">#{partyEntryTime},</if>
+            <if test="currentPost != null">#{currentPost},</if>
+            <if test="labourDivision != null">#{labourDivision},</if>
+            <if test="labourEntryTime != null">#{labourEntryTime},</if>
+            <if test="labourLeaveTime != null">#{labourLeaveTime},</if>
+            <if test="contact != null">#{contact},</if>
+            <if test="entryTime != null">#{entryTime},</if>
+            <if test="leaveTime != null">#{leaveTime},</if>
+            <if test="isLeague != null">#{isLeague},</if>
+            <if test="applyTime != null">#{applyTime},</if>
+            <if test="formCreateTime != null">#{formCreateTime},</if>
+            <if test="currentMentor != null">#{currentMentor},</if>
+            <if test="planDevelopDuration != null">#{planDevelopDuration},</if>
+            <if test="isTrained != null">#{isTrained},</if>
+            <if test="remarks != null">#{remarks},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="deptId != null">#{deptId},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTBranchMember" parameterType="TBranchMember">
+        update t_branch_member
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="memberType != null">member_type = #{memberType},</if>
+            <if test="birthday != null">birthday = #{birthday},</if>
+            <if test="educationLevel != null">education_level = #{educationLevel},</if>
+            <if test="workJoinTime != null">work_join_time = #{workJoinTime},</if>
+            <if test="workEntryTime != null">work_entry_time = #{workEntryTime},</if>
+            <if test="partyEntryTime != null">party_entry_time = #{partyEntryTime},</if>
+            <if test="currentPost != null">current_post = #{currentPost},</if>
+            <if test="labourDivision != null">labour_division = #{labourDivision},</if>
+            <if test="labourEntryTime != null">labour_entry_time = #{labourEntryTime},</if>
+            <if test="labourLeaveTime != null">labour_leave_time = #{labourLeaveTime},</if>
+            <if test="contact != null">contact = #{contact},</if>
+            <if test="entryTime != null">entry_time = #{entryTime},</if>
+            <if test="leaveTime != null">leave_time = #{leaveTime},</if>
+            <if test="isLeague != null">is_league = #{isLeague},</if>
+            <if test="applyTime != null">apply_time = #{applyTime},</if>
+            <if test="formCreateTime != null">form_create_time = #{formCreateTime},</if>
+            <if test="currentMentor != null">current_mentor = #{currentMentor},</if>
+            <if test="planDevelopDuration != null">plan_develop_duration = #{planDevelopDuration},</if>
+            <if test="isTrained != null">is_trained = #{isTrained},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</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>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+        </trim>
+        where member_id = #{memberId}
+    </update>
+
+    <update id="deleteTBranchMemberByMemberId" parameterType="Long">
+        update t_branch_member set del_flag = 2 where member_id = #{memberId}
+    </update>
+
+    <update id="deleteTBranchMemberByMemberIds" parameterType="String">
+        update t_branch_member set del_flag = 2 where member_id in
+        <foreach item="memberId" collection="array" open="(" separator="," close=")">
+            #{memberId}
+        </foreach>
+    </update>
+</mapper>

+ 44 - 0
ruoyi-ui/src/api/branch/member.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询支部成员管理列表
+export function listMember(query) {
+  return request({
+    url: '/branch/member/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询支部成员管理详细
+export function getMember(memberId) {
+  return request({
+    url: '/branch/member/' + memberId,
+    method: 'get'
+  })
+}
+
+// 新增支部成员管理
+export function addMember(data) {
+  return request({
+    url: '/branch/member',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改支部成员管理
+export function updateMember(data) {
+  return request({
+    url: '/branch/member',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除支部成员管理
+export function delMember(memberId) {
+  return request({
+    url: '/branch/member/' + memberId,
+    method: 'delete'
+  })
+}

+ 849 - 0
ruoyi-ui/src/views/branch/member1/index.vue

@@ -0,0 +1,849 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" size="small" v-show="showSearch" label-width="68px">
+      <el-form-item label="主键id" prop="memberId">
+        <el-input
+          v-model="queryParams.memberId"
+          placeholder="请输入主键id"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <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="memberType">
+        <el-select v-model="queryParams.memberType" placeholder="请选择成员类型" clearable size="small">
+          <el-option
+            v-for="dict in memberTypeOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="${comment}" prop="birthday">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.birthday"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择${comment}">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="学历" prop="educationLevel">
+        <el-input
+          v-model="queryParams.educationLevel"
+          placeholder="请输入学历"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="参加工作时间" prop="workJoinTime">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.workJoinTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择参加工作时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="入职时间" prop="workEntryTime">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.workEntryTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择入职时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="入党时间" prop="partyEntryTime">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.partyEntryTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择入党时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="现岗位" prop="currentPost">
+        <el-input
+          v-model="queryParams.currentPost"
+          placeholder="请输入现岗位"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="委员分工" prop="labourDivision">
+        <el-input
+          v-model="queryParams.labourDivision"
+          placeholder="请输入委员分工"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="任职时间" prop="labourEntryTime">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.labourEntryTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择任职时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="离任时间" prop="labourLeaveTime">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.labourLeaveTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择离任时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="联系方式" prop="contact">
+        <el-input
+          v-model="queryParams.contact"
+          placeholder="请输入联系方式"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="调进时间" prop="entryTime">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.entryTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择调进时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="调出时间" prop="leaveTime">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.leaveTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择调出时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="是否团员" prop="isLeague">
+        <el-input
+          v-model="queryParams.isLeague"
+          placeholder="请输入是否团员"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="申请入党时间" prop="applyTime">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.applyTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择申请入党时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="建表考察时间" prop="formCreateTime">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.formCreateTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择建表考察时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="现培养人" prop="currentMentor">
+        <el-input
+          v-model="queryParams.currentMentor"
+          placeholder="请输入现培养人"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="计划发展时间" prop="planDevelopDuration">
+        <el-input
+          v-model="queryParams.planDevelopDuration"
+          placeholder="请输入计划发展时间"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="是否参加过入党前培训" prop="isTrained">
+        <el-input
+          v-model="queryParams.isTrained"
+          placeholder="请输入是否参加过入党前培训"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="备注" prop="remarks">
+        <el-input
+          v-model="queryParams.remarks"
+          placeholder="请输入备注"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="部门id" prop="deptId">
+        <el-input
+          v-model="queryParams.deptId"
+          placeholder="请输入部门id"
+          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="['branch:member: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="['branch:member: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="['branch:member:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          plain
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['branch:member:edit']"
+        >导入</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['branch:member:export']"
+        >导出</el-button>
+      </el-col>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="memberList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="主键id" align="center" prop="memberId" :formatter="memberIdFormat" />
+      <el-table-column label="用户id" align="center" prop="userId" :formatter="userIdFormat" />
+      <el-table-column label="成员类型" align="center" prop="memberType" :formatter="memberTypeFormat" />
+      <el-table-column label="出生年月日" align="center" prop="birthday" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.birthday, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="学历" align="center" prop="educationLevel" :formatter="educationLevelFormat" />
+      <el-table-column label="参加工作时间" align="center" prop="workJoinTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.workJoinTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="入职时间" align="center" prop="workEntryTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.workEntryTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="入党时间" align="center" prop="partyEntryTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.partyEntryTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="现岗位" align="center" prop="currentPost" :formatter="currentPostFormat" />
+      <el-table-column label="委员分工" align="center" prop="labourDivision" :formatter="labourDivisionFormat" />
+      <el-table-column label="任职时间" align="center" prop="labourEntryTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.labourEntryTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="离任时间" align="center" prop="labourLeaveTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.labourLeaveTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="联系方式" align="center" prop="contact" :formatter="contactFormat" />
+      <el-table-column label="调进时间" align="center" prop="entryTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.entryTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="调出时间" align="center" prop="leaveTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.leaveTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="是否团员" align="center" prop="isLeague" :formatter="isLeagueFormat" />
+      <el-table-column label="申请入党时间" align="center" prop="applyTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.applyTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="建表考察时间" align="center" prop="formCreateTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.formCreateTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="现培养人" align="center" prop="currentMentor" :formatter="currentMentorFormat" />
+      <el-table-column label="计划发展时间" align="center" prop="planDevelopDuration" :formatter="planDevelopDurationFormat" />
+      <el-table-column label="是否参加过入党前培训" align="center" prop="isTrained" :formatter="isTrainedFormat" />
+      <el-table-column label="备注" align="center" prop="remarks" :formatter="remarksFormat" />
+      <el-table-column label="部门id" align="center" prop="deptId" :formatter="deptIdFormat" />
+      <el-table-column label="操作" align="center" fixed="right" width="120" 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="['branch:member:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['branch:member: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="主键id" prop="memberId">
+          <el-input v-model="form.memberId" placeholder="请输入主键id" />
+        </el-form-item>
+        <el-form-item label="用户id" prop="userId">
+          <el-input v-model="form.userId" placeholder="请输入用户id" />
+        </el-form-item>
+        <el-form-item label="成员类型" prop="memberType">
+          <el-select v-model="form.memberType" placeholder="请选择成员类型">
+            <el-option
+              v-for="dict in memberTypeOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+:value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="${comment}" prop="birthday">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.birthday"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择${comment}">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="学历" prop="educationLevel">
+          <el-input v-model="form.educationLevel" placeholder="请输入学历" />
+        </el-form-item>
+        <el-form-item label="参加工作时间" prop="workJoinTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.workJoinTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择参加工作时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="入职时间" prop="workEntryTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.workEntryTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择入职时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="入党时间" prop="partyEntryTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.partyEntryTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择入党时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="现岗位" prop="currentPost">
+          <el-input v-model="form.currentPost" placeholder="请输入现岗位" />
+        </el-form-item>
+        <el-form-item label="委员分工" prop="labourDivision">
+          <el-input v-model="form.labourDivision" placeholder="请输入委员分工" />
+        </el-form-item>
+        <el-form-item label="任职时间" prop="labourEntryTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.labourEntryTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择任职时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="离任时间" prop="labourLeaveTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.labourLeaveTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择离任时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="联系方式" prop="contact">
+          <el-input v-model="form.contact" placeholder="请输入联系方式" />
+        </el-form-item>
+        <el-form-item label="调进时间" prop="entryTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.entryTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择调进时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="调出时间" prop="leaveTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.leaveTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择调出时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="是否团员" prop="isLeague">
+          <el-input v-model="form.isLeague" placeholder="请输入是否团员" />
+        </el-form-item>
+        <el-form-item label="申请入党时间" prop="applyTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.applyTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择申请入党时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="建表考察时间" prop="formCreateTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.formCreateTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择建表考察时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="现培养人" prop="currentMentor">
+          <el-input v-model="form.currentMentor" placeholder="请输入现培养人" />
+        </el-form-item>
+        <el-form-item label="计划发展时间" prop="planDevelopDuration">
+          <el-input v-model="form.planDevelopDuration" placeholder="请输入计划发展时间" />
+        </el-form-item>
+        <el-form-item label="是否参加过入党前培训" prop="isTrained">
+          <el-input v-model="form.isTrained" placeholder="请输入是否参加过入党前培训" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remarks">
+          <el-input v-model="form.remarks" placeholder="请输入备注" />
+        </el-form-item>
+        <el-form-item label="删除标志" prop="delFlag">
+          <el-input v-model="form.delFlag" placeholder="请输入删除标志" />
+        </el-form-item>
+        <el-form-item label="部门id" prop="deptId">
+          <el-input v-model="form.deptId" placeholder="请输入部门id" />
+        </el-form-item>
+          <el-form-item label="归属部门" prop="deptId">
+              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
+          </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+      <!-- 用户导入对话框 -->
+      <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+          <el-upload
+                  ref="upload"
+                  :limit="1"
+                  accept=".xlsx, .xls"
+                  :headers="upload.headers"
+                  :action="upload.url + '?updateSupport=' + upload.updateSupport"
+                  :disabled="upload.isUploading"
+                  :on-progress="handleFileUploadProgress"
+                  :on-success="handleFileSuccess"
+                  :auto-upload="false"
+                  drag
+          >
+              <i class="el-icon-upload"></i>
+              <div class="el-upload__text">
+                  将文件拖到此处,或
+                  <em>点击上传</em>
+              </div>
+              <div class="el-upload__tip" slot="tip">
+                  <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
+                  <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
+              </div>
+              <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+          </el-upload>
+          <div slot="footer" class="dialog-footer">
+              <el-button type="primary" @click="submitFileForm">确 定</el-button>
+              <el-button @click="upload.open = false">取 消</el-button>
+          </div>
+      </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listMember, getMember, delMember, addMember, updateMember, exportMember, importTemplate} from "@/api/branch/member";
+import { treeselect } from "@/api/system/dept";
+import { getToken } from "@/utils/auth";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+
+export default {
+  name: "Member",
+  components: { Treeselect },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 支部成员管理表格数据
+      memberList: [],
+      // 弹出层标题
+      title: "",
+      // 部门树选项
+      deptOptions: undefined,
+      clientHeight:300,
+      // 是否显示弹出层
+      open: false,
+        // 用户导入参数
+        upload: {
+            // 是否显示弹出层(用户导入)
+            open: false,
+            // 弹出层标题(用户导入)
+            title: "",
+            // 是否禁用上传
+            isUploading: false,
+            // 是否更新已经存在的用户数据
+            updateSupport: 0,
+            // 设置上传的请求头部
+            headers: { Authorization: "Bearer " + getToken() },
+            // 上传的地址
+            url: process.env.VUE_APP_BASE_API + "/branch/member/importData"
+        },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        memberId: null,
+
+        userId: null,
+
+        memberType: null,
+
+        birthday: null,
+
+        educationLevel: null,
+
+        workJoinTime: null,
+
+        workEntryTime: null,
+
+        partyEntryTime: null,
+
+        currentPost: null,
+
+        labourDivision: null,
+
+        labourEntryTime: null,
+
+        labourLeaveTime: null,
+
+        contact: null,
+
+        entryTime: null,
+
+        leaveTime: null,
+
+        isLeague: null,
+
+        applyTime: null,
+
+        formCreateTime: null,
+
+        currentMentor: null,
+
+        planDevelopDuration: null,
+
+        isTrained: null,
+
+        remarks: null,
+
+        deptId: null,
+
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        memberId: [
+          { required: true, message: "主键id不能为空", trigger: "blur" }
+        ],
+
+        userId: [
+          { required: true, message: "用户id不能为空", trigger: "blur" }
+        ],
+
+      }
+    };
+  },
+  watch: {
+        // 根据名称筛选部门树
+        deptName(val) {
+            this.$refs.tree.filter(val);
+        }
+   },
+  created() {
+      //设置表格高度对应屏幕高度
+      this.$nextTick(() => {
+          this.clientHeight = document.body.clientHeight -250
+      })
+    this.getList();
+    this.getTreeselect();
+  },
+  methods: {
+    /** 查询支部成员管理列表 */
+    getList() {
+      this.loading = true;
+      listMember(this.queryParams).then(response => {
+        this.memberList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+     /** 查询部门下拉树结构 */
+     getTreeselect() {
+          treeselect().then(response => {
+              this.deptOptions = response.data;
+          });
+     },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        memberId: null,
+
+        userId: null,
+
+        memberType: null,
+
+        birthday: null,
+
+        educationLevel: null,
+
+        workJoinTime: null,
+
+        workEntryTime: null,
+
+        partyEntryTime: null,
+
+        currentPost: null,
+
+        labourDivision: null,
+
+        labourEntryTime: null,
+
+        labourLeaveTime: null,
+
+        contact: null,
+
+        entryTime: null,
+
+        leaveTime: null,
+
+        isLeague: null,
+
+        applyTime: null,
+
+        formCreateTime: null,
+
+        currentMentor: null,
+
+        planDevelopDuration: null,
+
+        isTrained: null,
+
+        remarks: null,
+
+        delFlag: null,
+
+        createBy: null,
+
+        createTime: null,
+
+        updateBy: null,
+
+        updateTime: null,
+
+        deptId: 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.memberId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加支部成员管理";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const memberId = row.memberId || this.ids
+      getMember(memberId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改支部成员管理";
+      });
+    },
+      /** 提交按钮 */
+      submitForm() {
+          this.$refs["form"].validate(valid => {
+              if (valid) {
+                  if (this.form.memberId != null) {
+                      updateMember(this.form).then(response => {
+                          this.$modal.msgSuccess("修改成功");
+                          this.open = false;
+                          this.getList();
+                      });
+                  } else {
+                      addMember(this.form).then(response => {
+                          this.$modal.msgSuccess("新增成功");
+                          this.open = false;
+                          this.getList();
+                      });
+                  }
+              }
+          });
+      },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const memberIds = row.memberId || this.ids;
+      this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delMember(memberIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有支部成员管理数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportMember(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+    },
+      /** 导入按钮操作 */
+      handleImport() {
+          this.upload.title = "用户导入";
+          this.upload.open = true;
+      },
+      /** 下载模板操作 */
+      importTemplate() {
+          importTemplate().then(response => {
+              this.download(response.msg);
+          });
+      },
+      // 文件上传中处理
+      handleFileUploadProgress(event, file, fileList) {
+          this.upload.isUploading = true;
+      },
+      // 文件上传成功处理
+      handleFileSuccess(response, file, fileList) {
+          this.upload.open = false;
+          this.upload.isUploading = false;
+          this.$refs.upload.clearFiles();
+          this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
+          this.getList();
+      },
+      // 提交上传文件
+      submitFileForm() {
+          this.$refs.upload.submit();
+      }
+  }
+};
+</script>
+
+<style>
+    /** 文本换行符处理 */
+    .el-table .cell{
+        white-space: pre-wrap;
+    }
+    /** textarea字体 */
+    textarea {
+        font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
+    }
+</style>

+ 8 - 8
ruoyi-ui/src/views/index.vue

@@ -28,19 +28,19 @@
           </div>
           <div class="body">
             <p>
-              <a class="link">xxx</a>
+              <a class="link">让党旗在疫情防控一线高高飘扬...</a>
               <span class="date">2022-05-10</span>
             </p>
             <p>
-              <a class="link">xxx</a>
+              <a class="link">我校王昕、李新宁作为“四进”攻坚工作组...</a>
               <span class="date">2022-04-04</span>
             </p>
             <p>
-              <a class="link">xxx</a>
+              <a class="link">“第一书记”帮包村客人来我校赠送锦旗</a>
               <span class="date">2021-05-31</span>
             </p>
             <p>
-              <a class="link">xxx</a>
+              <a class="link">我校第三轮“第一书记”载誉归来</a>
               <span class="date">2019-04-25</span>
             </p>
           </div>
@@ -55,19 +55,19 @@
           </div>
           <div class="body">
             <p>
-              <a class="link">xxx</a>
+              <a class="link">让党旗在疫情防控一线高高飘扬...</a>
               <span class="date">2022-05-10</span>
             </p>
             <p>
-              <a class="link">xxx</a>
+              <a class="link">我校王昕、李新宁作为“四进”攻坚工作组...</a>
               <span class="date">2022-04-04</span>
             </p>
             <p>
-              <a class="link">xxx</a>
+              <a class="link">“第一书记”帮包村客人来我校赠送锦旗</a>
               <span class="date">2021-05-31</span>
             </p>
             <p>
-              <a class="link">xxx</a>
+              <a class="link">我校第三轮“第一书记”载誉归来</a>
               <span class="date">2019-04-25</span>
             </p>
           </div>