Browse Source

支部特色活动

Wang Zi Wen 1 year ago
parent
commit
fd89c3f97b

+ 104 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/branch/TBranchActivityController.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.TBranchActivity;
+import com.ruoyi.branch.service.ITBranchActivityService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 支部特色活动Controller
+ * 
+ * @author ruoyi
+ * @date 2023-07-18
+ */
+@RestController
+@RequestMapping("/branch/activity")
+public class TBranchActivityController extends BaseController
+{
+    @Autowired
+    private ITBranchActivityService tBranchActivityService;
+
+    /**
+     * 查询支部特色活动列表
+     */
+    @PreAuthorize("@ss.hasPermi('branch:activity:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TBranchActivity tBranchActivity)
+    {
+        startPage();
+        List<TBranchActivity> list = tBranchActivityService.selectTBranchActivityList(tBranchActivity);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出支部特色活动列表
+     */
+    @PreAuthorize("@ss.hasPermi('branch:activity:export')")
+    @Log(title = "支部特色活动", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TBranchActivity tBranchActivity)
+    {
+        List<TBranchActivity> list = tBranchActivityService.selectTBranchActivityList(tBranchActivity);
+        ExcelUtil<TBranchActivity> util = new ExcelUtil<TBranchActivity>(TBranchActivity.class);
+        util.exportExcel(response, list, "支部特色活动数据");
+    }
+
+    /**
+     * 获取支部特色活动详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('branch:activity:query')")
+    @GetMapping(value = "/{activityId}")
+    public AjaxResult getInfo(@PathVariable("activityId") Long activityId)
+    {
+        return success(tBranchActivityService.selectTBranchActivityByActivityId(activityId));
+    }
+
+    /**
+     * 新增支部特色活动
+     */
+    @PreAuthorize("@ss.hasPermi('branch:activity:add')")
+    @Log(title = "支部特色活动", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TBranchActivity tBranchActivity)
+    {
+        return toAjax(tBranchActivityService.insertTBranchActivity(tBranchActivity));
+    }
+
+    /**
+     * 修改支部特色活动
+     */
+    @PreAuthorize("@ss.hasPermi('branch:activity:edit')")
+    @Log(title = "支部特色活动", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TBranchActivity tBranchActivity)
+    {
+        return toAjax(tBranchActivityService.updateTBranchActivity(tBranchActivity));
+    }
+
+    /**
+     * 删除支部特色活动
+     */
+    @PreAuthorize("@ss.hasPermi('branch:activity:remove')")
+    @Log(title = "支部特色活动", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{activityIds}")
+    public AjaxResult remove(@PathVariable Long[] activityIds)
+    {
+        return toAjax(tBranchActivityService.deleteTBranchActivityByActivityIds(activityIds));
+    }
+}

+ 1 - 1
ruoyi-generator/src/main/resources/vm/sql/sql.vm

@@ -1,6 +1,6 @@
 -- 菜单 SQL
 insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
-values(${table.menuId}, '${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 'admin', sysdate, '', null, '${functionName}菜单');
+values(seq_sys_menu.nextval, '${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 'admin', sysdate, '', null, '${functionName}菜单');
 
 -- 按钮 SQL
 insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)

+ 1 - 1
ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm

@@ -49,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 #elseif($queryType == "LTE")
             <if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and u.$columnName &lt;= #{$javaField}</if>
 #elseif($queryType == "LIKE")
-            <if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and u.$columnName like concat('%', #{$javaField}, '%')</if>
+            <if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and u.$columnName like concat(concat('%', #{$javaField}), '%')</if>
 #elseif($queryType == "BETWEEN")
             <if test="params.begin$AttrName != null and params.begin$AttrName != '' and params.end$AttrName != null and params.end$AttrName != ''"> and u.$columnName between #{params.begin$AttrName} and #{params.end$AttrName}</if>
 #end

+ 150 - 0
ruoyi-system/src/main/java/com/ruoyi/branch/domain/TBranchActivity.java

@@ -0,0 +1,150 @@
+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_activity
+ * 
+ * @author ruoyi
+ * @date 2023-07-18
+ */
+public class TBranchActivity extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键id */
+    @Excel(name = "主键id")
+    private Long activityId;
+
+    /** 活动主题 */
+    @Excel(name = "活动主题")
+    private String activityTheme;
+
+    /** 活动预期目标 */
+    @Excel(name = "活动预期目标")
+    private String activityGoal;
+
+    /** 参加人员 */
+    @Excel(name = "参加人员")
+    private String activityAttendees;
+
+    /** 活动日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "活动日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date activityDate;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 部门id */
+    @Excel(name = "部门id")
+    private Long deptId;
+
+    public void setActivityId(Long activityId) 
+    {
+        this.activityId = activityId;
+    }
+
+    public Long getActivityId() 
+    {
+        return activityId;
+    }
+
+    public void setActivityTheme(String activityTheme) 
+    {
+        this.activityTheme = activityTheme;
+    }
+
+    public String getActivityTheme() 
+    {
+        return activityTheme;
+    }
+
+    public void setActivityGoal(String activityGoal) 
+    {
+        this.activityGoal = activityGoal;
+    }
+
+    public String getActivityGoal() 
+    {
+        return activityGoal;
+    }
+
+    public void setActivityAttendees(String activityAttendees) 
+    {
+        this.activityAttendees = activityAttendees;
+    }
+
+    public String getActivityAttendees() 
+    {
+        return activityAttendees;
+    }
+
+    public void setActivityDate(Date activityDate) 
+    {
+        this.activityDate = activityDate;
+    }
+
+    public Date getActivityDate() 
+    {
+        return activityDate;
+    }
+
+    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("activityId", getActivityId())
+            .append("activityTheme", getActivityTheme())
+            .append("activityGoal", getActivityGoal())
+            .append("activityAttendees", getActivityAttendees())
+            .append("activityDate", getActivityDate())
+            .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/TBranchActivityMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.branch.mapper;
+
+import java.util.List;
+import com.ruoyi.branch.domain.TBranchActivity;
+
+/**
+ * 支部特色活动Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-07-18
+ */
+public interface TBranchActivityMapper 
+{
+    /**
+     * 查询支部特色活动
+     * 
+     * @param activityId 支部特色活动主键
+     * @return 支部特色活动
+     */
+    public TBranchActivity selectTBranchActivityByActivityId(Long activityId);
+
+    /**
+     * 查询支部特色活动列表
+     * 
+     * @param tBranchActivity 支部特色活动
+     * @return 支部特色活动集合
+     */
+    public List<TBranchActivity> selectTBranchActivityList(TBranchActivity tBranchActivity);
+
+    /**
+     * 新增支部特色活动
+     * 
+     * @param tBranchActivity 支部特色活动
+     * @return 结果
+     */
+    public int insertTBranchActivity(TBranchActivity tBranchActivity);
+
+    /**
+     * 修改支部特色活动
+     * 
+     * @param tBranchActivity 支部特色活动
+     * @return 结果
+     */
+    public int updateTBranchActivity(TBranchActivity tBranchActivity);
+
+    /**
+     * 删除支部特色活动
+     * 
+     * @param activityId 支部特色活动主键
+     * @return 结果
+     */
+    public int deleteTBranchActivityByActivityId(Long activityId);
+
+    /**
+     * 批量删除支部特色活动
+     * 
+     * @param activityIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTBranchActivityByActivityIds(Long[] activityIds);
+}

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

@@ -0,0 +1,61 @@
+package com.ruoyi.branch.service;
+
+import java.util.List;
+import com.ruoyi.branch.domain.TBranchActivity;
+
+/**
+ * 支部特色活动Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-07-18
+ */
+public interface ITBranchActivityService 
+{
+    /**
+     * 查询支部特色活动
+     * 
+     * @param activityId 支部特色活动主键
+     * @return 支部特色活动
+     */
+    public TBranchActivity selectTBranchActivityByActivityId(Long activityId);
+
+    /**
+     * 查询支部特色活动列表
+     * 
+     * @param tBranchActivity 支部特色活动
+     * @return 支部特色活动集合
+     */
+    public List<TBranchActivity> selectTBranchActivityList(TBranchActivity tBranchActivity);
+
+    /**
+     * 新增支部特色活动
+     * 
+     * @param tBranchActivity 支部特色活动
+     * @return 结果
+     */
+    public int insertTBranchActivity(TBranchActivity tBranchActivity);
+
+    /**
+     * 修改支部特色活动
+     * 
+     * @param tBranchActivity 支部特色活动
+     * @return 结果
+     */
+    public int updateTBranchActivity(TBranchActivity tBranchActivity);
+
+    /**
+     * 批量删除支部特色活动
+     * 
+     * @param activityIds 需要删除的支部特色活动主键集合
+     * @return 结果
+     */
+    public int deleteTBranchActivityByActivityIds(Long[] activityIds);
+
+    /**
+     * 删除支部特色活动信息
+     * 
+     * @param activityId 支部特色活动主键
+     * @return 结果
+     */
+    public int deleteTBranchActivityByActivityId(Long activityId);
+}

+ 99 - 0
ruoyi-system/src/main/java/com/ruoyi/branch/service/impl/TBranchActivityServiceImpl.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.TBranchActivityMapper;
+import com.ruoyi.branch.domain.TBranchActivity;
+import com.ruoyi.branch.service.ITBranchActivityService;
+
+/**
+ * 支部特色活动Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-07-18
+ */
+@Service
+public class TBranchActivityServiceImpl implements ITBranchActivityService 
+{
+    @Autowired
+    private TBranchActivityMapper tBranchActivityMapper;
+
+    /**
+     * 查询支部特色活动
+     * 
+     * @param activityId 支部特色活动主键
+     * @return 支部特色活动
+     */
+    @Override
+    public TBranchActivity selectTBranchActivityByActivityId(Long activityId)
+    {
+        return tBranchActivityMapper.selectTBranchActivityByActivityId(activityId);
+    }
+
+    /**
+     * 查询支部特色活动列表
+     * 
+     * @param tBranchActivity 支部特色活动
+     * @return 支部特色活动
+     */
+    @Override
+    @DataScope(deptAlias = "d", userAlias = "u")
+    public List<TBranchActivity> selectTBranchActivityList(TBranchActivity tBranchActivity)
+    {
+        return tBranchActivityMapper.selectTBranchActivityList(tBranchActivity);
+    }
+
+    /**
+     * 新增支部特色活动
+     * 
+     * @param tBranchActivity 支部特色活动
+     * @return 结果
+     */
+    @Override
+    public int insertTBranchActivity(TBranchActivity tBranchActivity)
+    {
+        tBranchActivity.setCreateTime(DateUtils.getNowDate());
+        return tBranchActivityMapper.insertTBranchActivity(tBranchActivity);
+    }
+
+    /**
+     * 修改支部特色活动
+     * 
+     * @param tBranchActivity 支部特色活动
+     * @return 结果
+     */
+    @Override
+    public int updateTBranchActivity(TBranchActivity tBranchActivity)
+    {
+        tBranchActivity.setUpdateTime(DateUtils.getNowDate());
+        return tBranchActivityMapper.updateTBranchActivity(tBranchActivity);
+    }
+
+    /**
+     * 批量删除支部特色活动
+     * 
+     * @param activityIds 需要删除的支部特色活动主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTBranchActivityByActivityIds(Long[] activityIds)
+    {
+        return tBranchActivityMapper.deleteTBranchActivityByActivityIds(activityIds);
+    }
+
+    /**
+     * 删除支部特色活动信息
+     * 
+     * @param activityId 支部特色活动主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTBranchActivityByActivityId(Long activityId)
+    {
+        return tBranchActivityMapper.deleteTBranchActivityByActivityId(activityId);
+    }
+}

+ 111 - 0
ruoyi-system/src/main/resources/mapper/branch/TBranchActivityMapper.xml

@@ -0,0 +1,111 @@
+<?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.TBranchActivityMapper">
+    
+    <resultMap type="TBranchActivity" id="TBranchActivityResult">
+        <result property="activityId"    column="activity_id"    />
+        <result property="activityTheme"    column="activity_theme"    />
+        <result property="activityGoal"    column="activity_goal"    />
+        <result property="activityAttendees"    column="activity_attendees"    />
+        <result property="activityDate"    column="activity_date"    />
+        <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="selectTBranchActivityVo">
+        select u.activity_id, u.activity_theme, u.activity_goal, u.activity_attendees, u.activity_date, u.remarks, u.del_flag, u.create_by, u.create_time, u.update_by, u.update_time, u.dept_id from t_branch_activity u left join sys_dept d on u.dept_id = d.dept_id
+    </sql>
+
+    <select id="selectTBranchActivityList" parameterType="TBranchActivity" resultMap="TBranchActivityResult">
+        <include refid="selectTBranchActivityVo"/>
+        <where>  
+            <if test="activityId != null "> and u.activity_id = #{activityId}</if>
+            <if test="activityTheme != null  and activityTheme != ''"> and u.activity_theme like concat(concat('%', #{activityTheme}), '%')</if>
+            <if test="activityGoal != null  and activityGoal != ''"> and u.activity_goal like concat(concat('%', #{activityGoal}), '%')</if>
+            <if test="activityAttendees != null  and activityAttendees != ''"> and u.activity_attendees = #{activityAttendees}</if>
+            <if test="activityDate != null "> and u.activity_date = #{activityDate}</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="selectTBranchActivityByActivityId" parameterType="Long" resultMap="TBranchActivityResult">
+        <include refid="selectTBranchActivityVo"/>
+        where u.activity_id = #{activityId}
+        and u.del_flag = 0
+    </select>
+        
+    <insert id="insertTBranchActivity" parameterType="TBranchActivity">
+        <selectKey keyProperty="activityId" resultType="long" order="BEFORE">
+            SELECT seq_t_branch_activity.NEXTVAL as activityId FROM DUAL
+        </selectKey>
+        insert into t_branch_activity
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="activityId != null">activity_id,</if>
+            <if test="activityTheme != null and activityTheme != ''">activity_theme,</if>
+            <if test="activityGoal != null and activityGoal != ''">activity_goal,</if>
+            <if test="activityAttendees != null">activity_attendees,</if>
+            <if test="activityDate != null">activity_date,</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="activityId != null">#{activityId},</if>
+            <if test="activityTheme != null and activityTheme != ''">#{activityTheme},</if>
+            <if test="activityGoal != null and activityGoal != ''">#{activityGoal},</if>
+            <if test="activityAttendees != null">#{activityAttendees},</if>
+            <if test="activityDate != null">#{activityDate},</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="updateTBranchActivity" parameterType="TBranchActivity">
+        update t_branch_activity
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="activityTheme != null and activityTheme != ''">activity_theme = #{activityTheme},</if>
+            <if test="activityGoal != null and activityGoal != ''">activity_goal = #{activityGoal},</if>
+            <if test="activityAttendees != null">activity_attendees = #{activityAttendees},</if>
+            <if test="activityDate != null">activity_date = #{activityDate},</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 activity_id = #{activityId}
+    </update>
+
+    <update id="deleteTBranchActivityByActivityId" parameterType="Long">
+        update t_branch_activity set del_flag = 2 where activity_id = #{activityId}
+    </update>
+
+    <update id="deleteTBranchActivityByActivityIds" parameterType="String">
+        update t_branch_activity set del_flag = 2 where activity_id in
+        <foreach item="activityId" collection="array" open="(" separator="," close=")">
+            #{activityId}
+        </foreach>
+    </update>
+</mapper>

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

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询支部特色活动列表
+export function listActivity(query) {
+  return request({
+    url: '/branch/activity/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询支部特色活动详细
+export function getActivity(activityId) {
+  return request({
+    url: '/branch/activity/' + activityId,
+    method: 'get'
+  })
+}
+
+// 新增支部特色活动
+export function addActivity(data) {
+  return request({
+    url: '/branch/activity',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改支部特色活动
+export function updateActivity(data) {
+  return request({
+    url: '/branch/activity',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除支部特色活动
+export function delActivity(activityId) {
+  return request({
+    url: '/branch/activity/' + activityId,
+    method: 'delete'
+  })
+}

+ 569 - 0
ruoyi-ui/src/views/branch/activity/index.vue

@@ -0,0 +1,569 @@
+<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="活动主题" prop="activityTheme">
+        <el-input
+          v-model="queryParams.activityTheme"
+          placeholder="请输入活动主题"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="活动预期目标" prop="activityGoal" label-width="102px">
+        <el-input
+          v-model="queryParams.activityGoal"
+          placeholder="请输入活动预期目标"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="参加人员" prop="activityAttendees">
+        <el-input
+          v-model="queryParams.activityAttendees"
+          placeholder="请输入参加人员"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="活动日期" prop="activityDate">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.activityDate"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择活动日期">
+        </el-date-picker>
+      </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="归属部门" prop="deptId" style="width: 268px;">
+        <treeselect style="width: 200px;" v-model="queryParams.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
+      </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:activity: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:activity: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:activity: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:activity: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:activity:export']"
+        >导出</el-button>
+      </el-col>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="activityList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="活动主题" align="center" prop="activityTheme" width="200"/>
+      <el-table-column label="活动预期目标" align="left" prop="activityGoal" width="500"/>
+      <el-table-column label="参加人员" align="center" prop="activityAttendees" width="120"/>
+      <el-table-column label="活动日期" align="center" prop="activityDate" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.activityDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remarks" width="120"/>
+      <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:activity:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['branch:activity: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="110px">
+        <el-form-item label="活动主题" prop="activityTheme">
+          <el-input v-model="form.activityTheme" placeholder="请输入活动主题" />
+        </el-form-item>
+        <el-form-item label="活动预期目标" prop="activityGoal">
+          <el-input v-model="form.activityGoal" placeholder="请输入活动预期目标" type="textarea" rows="4"/>
+        </el-form-item>
+        <el-form-item label="参加人员" prop="activityAttendees">
+          <el-input v-model="form.activityAttendees" placeholder="请输入参加人员" />
+        </el-form-item>
+        <el-form-item label="活动日期" prop="activityDate">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.activityDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择活动日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="备注" prop="remarks">
+          <el-input v-model="form.remarks" placeholder="请输入备注" />
+        </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 { listActivity, getActivity, delActivity, addActivity, updateActivity, exportActivity, importTemplate} from "@/api/branch/activity";
+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: "Activity",
+  components: { Treeselect },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 支部特色活动表格数据
+      activityList: [],
+      // 弹出层标题
+      title: "",
+      // 部门树选项
+      deptOptions: undefined,
+      clientHeight:300,
+      // 是否显示弹出层
+      open: false,
+      // 主键id字典
+      activityIdOptions: [],
+      // 活动主题字典
+      activityThemeOptions: [],
+      // 活动预期目标字典
+      activityGoalOptions: [],
+      // 参加人员字典
+      activityAttendeesOptions: [],
+      // 活动日期字典
+      activityDateOptions: [],
+      // 备注字典
+      remarksOptions: [],
+      // 删除标志字典
+      delFlagOptions: [],
+      // 创建者字典
+      createByOptions: [],
+      // 创建时间字典
+      createTimeOptions: [],
+      // 更新者字典
+      updateByOptions: [],
+      // 更新时间字典
+      updateTimeOptions: [],
+      // 部门id字典
+      deptIdOptions: [],
+        // 用户导入参数
+        upload: {
+            // 是否显示弹出层(用户导入)
+            open: false,
+            // 弹出层标题(用户导入)
+            title: "",
+            // 是否禁用上传
+            isUploading: false,
+            // 是否更新已经存在的用户数据
+            updateSupport: 0,
+            // 设置上传的请求头部
+            headers: { Authorization: "Bearer " + getToken() },
+            // 上传的地址
+            url: process.env.VUE_APP_BASE_API + "/branch/activity/importData"
+        },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        activityId: null,
+        activityTheme: null,
+        activityGoal: null,
+        activityAttendees: null,
+        activityDate: null,
+        remarks: null,
+        deptId: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        activityTheme: [
+          { required: true, message: "活动主题不能为空", trigger: "blur" }
+        ],
+        activityGoal: [
+          { required: true, message: "活动预期目标不能为空", trigger: "blur" }
+        ],
+        deptId: [
+          { required: true, message: "归属部门不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  watch: {
+        // 根据名称筛选部门树
+        deptName(val) {
+            this.$refs.tree.filter(val);
+        }
+   },
+  created() {
+      //设置表格高度对应屏幕高度
+      this.$nextTick(() => {
+          this.clientHeight = document.body.clientHeight -250
+      })
+    this.getList();
+    this.getTreeselect();
+    this.getDicts("${column.dictType}").then(response => {
+      this.activityIdOptions = response.data;
+    });
+    this.getDicts("${column.dictType}").then(response => {
+      this.activityThemeOptions = response.data;
+    });
+    this.getDicts("${column.dictType}").then(response => {
+      this.activityGoalOptions = response.data;
+    });
+    this.getDicts("${column.dictType}").then(response => {
+      this.activityAttendeesOptions = response.data;
+    });
+    this.getDicts("${column.dictType}").then(response => {
+      this.activityDateOptions = response.data;
+    });
+    this.getDicts("${column.dictType}").then(response => {
+      this.remarksOptions = response.data;
+    });
+    this.getDicts("${column.dictType}").then(response => {
+      this.delFlagOptions = response.data;
+    });
+    this.getDicts("${column.dictType}").then(response => {
+      this.createByOptions = response.data;
+    });
+    this.getDicts("${column.dictType}").then(response => {
+      this.createTimeOptions = response.data;
+    });
+    this.getDicts("${column.dictType}").then(response => {
+      this.updateByOptions = response.data;
+    });
+    this.getDicts("${column.dictType}").then(response => {
+      this.updateTimeOptions = response.data;
+    });
+    this.getDicts("${column.dictType}").then(response => {
+      this.deptIdOptions = response.data;
+    });
+  },
+  methods: {
+    /** 查询支部特色活动列表 */
+    getList() {
+      this.loading = true;
+      listActivity(this.queryParams).then(response => {
+        this.activityList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+     /** 查询部门下拉树结构 */
+     getTreeselect() {
+          treeselect().then(response => {
+              this.deptOptions = response.data;
+          });
+     },
+    // 主键id字典翻译
+    activityIdFormat(row, column) {
+      return this.selectDictLabel(this.activityIdOptions, row.activityId);
+    },
+    // 活动主题字典翻译
+    activityThemeFormat(row, column) {
+      return this.selectDictLabel(this.activityThemeOptions, row.activityTheme);
+    },
+    // 活动预期目标字典翻译
+    activityGoalFormat(row, column) {
+      return this.selectDictLabel(this.activityGoalOptions, row.activityGoal);
+    },
+    // 参加人员字典翻译
+    activityAttendeesFormat(row, column) {
+      return this.selectDictLabel(this.activityAttendeesOptions, row.activityAttendees);
+    },
+    // 活动日期字典翻译
+    activityDateFormat(row, column) {
+      return this.selectDictLabel(this.activityDateOptions, row.activityDate);
+    },
+    // 备注字典翻译
+    remarksFormat(row, column) {
+      return this.selectDictLabel(this.remarksOptions, row.remarks);
+    },
+    // 删除标志字典翻译
+    delFlagFormat(row, column) {
+      return this.selectDictLabel(this.delFlagOptions, row.delFlag);
+    },
+    // 创建者字典翻译
+    createByFormat(row, column) {
+      return this.selectDictLabel(this.createByOptions, row.createBy);
+    },
+    // 创建时间字典翻译
+    createTimeFormat(row, column) {
+      return this.selectDictLabel(this.createTimeOptions, row.createTime);
+    },
+    // 更新者字典翻译
+    updateByFormat(row, column) {
+      return this.selectDictLabel(this.updateByOptions, row.updateBy);
+    },
+    // 更新时间字典翻译
+    updateTimeFormat(row, column) {
+      return this.selectDictLabel(this.updateTimeOptions, row.updateTime);
+    },
+    // 部门id字典翻译
+    deptIdFormat(row, column) {
+      return this.selectDictLabel(this.deptIdOptions, row.deptId);
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        activityId: null,
+        activityTheme: null,
+        activityGoal: null,
+        activityAttendees: null,
+        activityDate: 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.activityId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加支部特色活动";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const activityId = row.activityId || this.ids
+      getActivity(activityId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改支部特色活动";
+      });
+    },
+      /** 提交按钮 */
+      submitForm() {
+          this.$refs["form"].validate(valid => {
+              if (valid) {
+                  if (this.form.activityId != null) {
+                      updateActivity(this.form).then(response => {
+                          this.$modal.msgSuccess("修改成功");
+                          this.open = false;
+                          this.getList();
+                      });
+                  } else {
+                      addActivity(this.form).then(response => {
+                          this.$modal.msgSuccess("新增成功");
+                          this.open = false;
+                          this.getList();
+                      });
+                  }
+              }
+          });
+      },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const activityIds = row.activityId || this.ids;
+      this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delActivity(activityIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有支部特色活动数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportActivity(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>

+ 6 - 6
ruoyi-ui/src/views/branch/sqrjjfzmc/index.vue

@@ -182,17 +182,17 @@
       <el-table-column label="姓名" align="center" prop="nickName"/>
       <el-table-column label="性别" align="center" prop="sex" :formatter="sysUserSexFormat"/>
       <el-table-column label="民族" align="center" prop="ethnic" :formatter="memberEthnicFormat" />
-      <el-table-column label="出生年月" align="center" prop="birthday">
+      <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="workJoinTime">
+      <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">
+      <el-table-column label="入职时间" align="center" prop="workEntryTime" width="100">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.workEntryTime, '{y}-{m}-{d}') }}</span>
         </template>
@@ -204,18 +204,18 @@
         </template>
       </el-table-column>
       <el-table-column label="现岗位" align="center" prop="postString"/>
-      <el-table-column label="申请入党时间" align="center" prop="applyTime">
+      <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">
+      <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">
+      <el-table-column label="计划发展时间" align="center" prop="planDevelopDuration" width="100">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.planDevelopDuration, '{y}-{m}-{d}') }}</span>
         </template>

+ 1 - 1
ruoyi-ui/src/views/branch/study/index.vue

@@ -101,7 +101,7 @@
       <el-table-column label="记录人" align="center" prop="recorderString" width="120"/>
       <el-table-column label="参加人员" align="center" prop="participantsString" width="120"/>
       <el-table-column label="缺席人员" align="center" prop="absenteesString" width="120"/>
-      <el-table-column label="内容" align="center" prop="contents" width="350"/>
+      <el-table-column label="内容" align="left" prop="contents" width="350"/>
       <el-table-column label="附件" align="center" prop="filesId" width="100">
         <template slot-scope="scope">
           <el-button