feat: 新增流程监听
parent
ff0cf07746
commit
532f791cc3
|
|
@ -0,0 +1,104 @@
|
||||||
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
|
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.system.domain.SysListener;
|
||||||
|
import com.ruoyi.system.service.ISysListenerService;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程监听Controller
|
||||||
|
*
|
||||||
|
* @author Tony
|
||||||
|
* @date 2022-12-25
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/listener")
|
||||||
|
public class SysListenerController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISysListenerService sysListenerService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询流程监听列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:listener:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SysListener sysListener)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SysListener> list = sysListenerService.selectSysListenerList(sysListener);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出流程监听列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:listener:export')")
|
||||||
|
@Log(title = "流程监听", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, SysListener sysListener)
|
||||||
|
{
|
||||||
|
List<SysListener> list = sysListenerService.selectSysListenerList(sysListener);
|
||||||
|
ExcelUtil<SysListener> util = new ExcelUtil<SysListener>(SysListener.class);
|
||||||
|
util.exportExcel(response, list, "流程监听数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流程监听详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:listener:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(sysListenerService.selectSysListenerById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增流程监听
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:listener:add')")
|
||||||
|
@Log(title = "流程监听", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody SysListener sysListener)
|
||||||
|
{
|
||||||
|
return toAjax(sysListenerService.insertSysListener(sysListener));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改流程监听
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:listener:edit')")
|
||||||
|
@Log(title = "流程监听", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody SysListener sysListener)
|
||||||
|
{
|
||||||
|
return toAjax(sysListenerService.updateSysListener(sysListener));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流程监听
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:listener:remove')")
|
||||||
|
@Log(title = "流程监听", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(sysListenerService.deleteSysListenerByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,126 @@
|
||||||
|
package com.ruoyi.system.domain;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程监听对象 sys_listener
|
||||||
|
*
|
||||||
|
* @author Tony
|
||||||
|
* @date 2022-12-25
|
||||||
|
*/
|
||||||
|
public class SysListener extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 表单主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 名称 */
|
||||||
|
@Excel(name = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 监听类型 */
|
||||||
|
@Excel(name = "监听类型")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/** 事件类型 */
|
||||||
|
@Excel(name = "事件类型")
|
||||||
|
private String eventType;
|
||||||
|
|
||||||
|
/** 值类型 */
|
||||||
|
@Excel(name = "值类型")
|
||||||
|
private String valueType;
|
||||||
|
|
||||||
|
/** 执行内容 */
|
||||||
|
@Excel(name = "执行内容")
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
/** 状态 */
|
||||||
|
@Excel(name = "状态")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setName(String name)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setType(String type)
|
||||||
|
{
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType()
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
public void setEventType(String eventType)
|
||||||
|
{
|
||||||
|
this.eventType = eventType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEventType()
|
||||||
|
{
|
||||||
|
return eventType;
|
||||||
|
}
|
||||||
|
public void setValueType(String valueType)
|
||||||
|
{
|
||||||
|
this.valueType = valueType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValueType()
|
||||||
|
{
|
||||||
|
return valueType;
|
||||||
|
}
|
||||||
|
public void setValue(String value)
|
||||||
|
{
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue()
|
||||||
|
{
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
public void setStatus(Integer status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("name", getName())
|
||||||
|
.append("type", getType())
|
||||||
|
.append("eventType", getEventType())
|
||||||
|
.append("valueType", getValueType())
|
||||||
|
.append("value", getValue())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.system.domain.SysListener;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程监听Mapper接口
|
||||||
|
*
|
||||||
|
* @author Tony
|
||||||
|
* @date 2022-12-25
|
||||||
|
*/
|
||||||
|
public interface SysListenerMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询流程监听
|
||||||
|
*
|
||||||
|
* @param id 流程监听主键
|
||||||
|
* @return 流程监听
|
||||||
|
*/
|
||||||
|
public SysListener selectSysListenerById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询流程监听列表
|
||||||
|
*
|
||||||
|
* @param sysListener 流程监听
|
||||||
|
* @return 流程监听集合
|
||||||
|
*/
|
||||||
|
public List<SysListener> selectSysListenerList(SysListener sysListener);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增流程监听
|
||||||
|
*
|
||||||
|
* @param sysListener 流程监听
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSysListener(SysListener sysListener);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改流程监听
|
||||||
|
*
|
||||||
|
* @param sysListener 流程监听
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSysListener(SysListener sysListener);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流程监听
|
||||||
|
*
|
||||||
|
* @param id 流程监听主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysListenerById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除流程监听
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysListenerByIds(Long[] ids);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.system.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.system.domain.SysListener;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程监听Service接口
|
||||||
|
*
|
||||||
|
* @author Tony
|
||||||
|
* @date 2022-12-25
|
||||||
|
*/
|
||||||
|
public interface ISysListenerService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询流程监听
|
||||||
|
*
|
||||||
|
* @param id 流程监听主键
|
||||||
|
* @return 流程监听
|
||||||
|
*/
|
||||||
|
public SysListener selectSysListenerById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询流程监听列表
|
||||||
|
*
|
||||||
|
* @param sysListener 流程监听
|
||||||
|
* @return 流程监听集合
|
||||||
|
*/
|
||||||
|
public List<SysListener> selectSysListenerList(SysListener sysListener);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增流程监听
|
||||||
|
*
|
||||||
|
* @param sysListener 流程监听
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSysListener(SysListener sysListener);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改流程监听
|
||||||
|
*
|
||||||
|
* @param sysListener 流程监听
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSysListener(SysListener sysListener);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除流程监听
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的流程监听主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysListenerByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流程监听信息
|
||||||
|
*
|
||||||
|
* @param id 流程监听主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysListenerById(Long id);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,96 @@
|
||||||
|
package com.ruoyi.system.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.system.mapper.SysListenerMapper;
|
||||||
|
import com.ruoyi.system.domain.SysListener;
|
||||||
|
import com.ruoyi.system.service.ISysListenerService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程监听Service业务层处理
|
||||||
|
*
|
||||||
|
* @author Tony
|
||||||
|
* @date 2022-12-25
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SysListenerServiceImpl implements ISysListenerService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SysListenerMapper sysListenerMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询流程监听
|
||||||
|
*
|
||||||
|
* @param id 流程监听主键
|
||||||
|
* @return 流程监听
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SysListener selectSysListenerById(Long id)
|
||||||
|
{
|
||||||
|
return sysListenerMapper.selectSysListenerById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询流程监听列表
|
||||||
|
*
|
||||||
|
* @param sysListener 流程监听
|
||||||
|
* @return 流程监听
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SysListener> selectSysListenerList(SysListener sysListener)
|
||||||
|
{
|
||||||
|
return sysListenerMapper.selectSysListenerList(sysListener);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增流程监听
|
||||||
|
*
|
||||||
|
* @param sysListener 流程监听
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertSysListener(SysListener sysListener)
|
||||||
|
{
|
||||||
|
sysListener.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return sysListenerMapper.insertSysListener(sysListener);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改流程监听
|
||||||
|
*
|
||||||
|
* @param sysListener 流程监听
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateSysListener(SysListener sysListener)
|
||||||
|
{
|
||||||
|
sysListener.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return sysListenerMapper.updateSysListener(sysListener);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除流程监听
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的流程监听主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSysListenerByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return sysListenerMapper.deleteSysListenerByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流程监听信息
|
||||||
|
*
|
||||||
|
* @param id 流程监听主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSysListenerById(Long id)
|
||||||
|
{
|
||||||
|
return sysListenerMapper.deleteSysListenerById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,115 @@
|
||||||
|
<?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.system.mapper.SysListenerMapper">
|
||||||
|
|
||||||
|
<resultMap type="SysListener" id="SysListenerResult">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="name" column="name"/>
|
||||||
|
<result property="type" column="type"/>
|
||||||
|
<result property="eventType" column="event_type"/>
|
||||||
|
<result property="valueType" column="value_type"/>
|
||||||
|
<result property="value" column="value"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="status" column="status"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSysListenerVo">
|
||||||
|
select id,
|
||||||
|
name,
|
||||||
|
type,
|
||||||
|
event_type,
|
||||||
|
value_type,
|
||||||
|
value,
|
||||||
|
create_time,
|
||||||
|
update_time,
|
||||||
|
create_by,
|
||||||
|
update_by,
|
||||||
|
status,
|
||||||
|
remark
|
||||||
|
from sys_listener
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSysListenerList" parameterType="SysListener" resultMap="SysListenerResult">
|
||||||
|
<include refid="selectSysListenerVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
||||||
|
<if test="type != null and type != ''">and type = #{type}</if>
|
||||||
|
<if test="eventType != null and eventType != ''">and event_type = #{eventType}</if>
|
||||||
|
<if test="valueType != null and valueType != ''">and value_type = #{valueType}</if>
|
||||||
|
<if test="value != null and value != ''">and value = #{value}</if>
|
||||||
|
<if test="status != null ">and status = #{status}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSysListenerById" parameterType="Long" resultMap="SysListenerResult">
|
||||||
|
<include refid="selectSysListenerVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSysListener" parameterType="SysListener" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into sys_listener
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">name,</if>
|
||||||
|
<if test="type != null">type,</if>
|
||||||
|
<if test="eventType != null">event_type,</if>
|
||||||
|
<if test="valueType != null">value_type,</if>
|
||||||
|
<if test="value != null">value,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="status != null">status,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">#{name},</if>
|
||||||
|
<if test="type != null">#{type},</if>
|
||||||
|
<if test="eventType != null">#{eventType},</if>
|
||||||
|
<if test="valueType != null">#{valueType},</if>
|
||||||
|
<if test="value != null">#{value},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSysListener" parameterType="SysListener">
|
||||||
|
update sys_listener
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="name != null">name = #{name},</if>
|
||||||
|
<if test="type != null">type = #{type},</if>
|
||||||
|
<if test="eventType != null">event_type = #{eventType},</if>
|
||||||
|
<if test="valueType != null">value_type = #{valueType},</if>
|
||||||
|
<if test="value != null">value = #{value},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteSysListenerById" parameterType="Long">
|
||||||
|
delete
|
||||||
|
from sys_listener
|
||||||
|
where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSysListenerByIds" parameterType="String">
|
||||||
|
delete from sys_listener where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询流程监听列表
|
||||||
|
export function listListener(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/listener/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询流程监听详细
|
||||||
|
export function getListener(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/listener/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增流程监听
|
||||||
|
export function addListener(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/listener',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改流程监听
|
||||||
|
export function updateListener(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/listener',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除流程监听
|
||||||
|
export function delListener(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/listener/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -32,7 +32,9 @@ export function documentationParse(obj) {
|
||||||
|
|
||||||
export function conditionExpressionParse(obj) {
|
export function conditionExpressionParse(obj) {
|
||||||
if ('conditionExpression' in obj) {
|
if ('conditionExpression' in obj) {
|
||||||
obj.conditionExpression = obj.conditionExpression.body
|
if (obj.conditionExpression) {
|
||||||
|
obj.conditionExpression = obj.conditionExpression.body
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return obj
|
return obj
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,13 +76,13 @@ export default {
|
||||||
{ label: '表达式', value: 'expression' },
|
{ label: '表达式', value: 'expression' },
|
||||||
{ label: '委托表达式', value: 'delegateExpression' }
|
{ label: '委托表达式', value: 'delegateExpression' }
|
||||||
],
|
],
|
||||||
tooltip: `类:示例 com.company.MyCustomListener,自定义类必须实现 org.flowable.engine.delegate.TaskListener 接口 <br />
|
tooltip: `类:示例 com.company.MyCustomListener,自定义类必须实现 org.flowable.engine.delegate.ExecutionListener 接口 <br />
|
||||||
表达式:示例 \${myObject.callMethod(task, task.eventName)} <br />
|
表达式:示例 \${myObject.callMethod(task, task.eventName)} <br />
|
||||||
委托表达式:示例 \${myListenerSpringBean} ,该 springBean 需要实现 org.flowable.engine.delegate.TaskListener 接口
|
委托表达式:示例 \${myListenerSpringBean} ,该 springBean 需要实现 org.flowable.engine.delegate.ExecutionListener 接口
|
||||||
`
|
`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'java 类名',
|
label: '值',
|
||||||
name: 'className',
|
name: 'className',
|
||||||
xType: 'input',
|
xType: 'input',
|
||||||
rules: [{ required: true, message: '请输入', trigger: ['blur', 'change'] }]
|
rules: [{ required: true, message: '请输入', trigger: ['blur', 'change'] }]
|
||||||
|
|
|
||||||
|
|
@ -81,21 +81,25 @@ export default {
|
||||||
{ label: '类', value: 'class' },
|
{ label: '类', value: 'class' },
|
||||||
{ label: '表达式', value: 'expression' },
|
{ label: '表达式', value: 'expression' },
|
||||||
{ label: '委托表达式', value: 'delegateExpression' }
|
{ label: '委托表达式', value: 'delegateExpression' }
|
||||||
]
|
],
|
||||||
|
tooltip: `类:示例 com.company.MyCustomListener,自定义类必须实现 org.flowable.engine.delegate.TaskListener 接口 <br />
|
||||||
|
表达式:示例 \${myObject.callMethod(task, task.eventName)} <br />
|
||||||
|
委托表达式:示例 \${myListenerSpringBean} ,该 springBean 需要实现 org.flowable.engine.delegate.TaskListener 接口
|
||||||
|
`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'java 类名',
|
label: '值',
|
||||||
name: 'className',
|
name: 'className',
|
||||||
xType: 'input',
|
xType: 'input',
|
||||||
rules: [{ required: true, message: '请输入', trigger: ['blur', 'change'] }]
|
rules: [{ required: true, message: '请输入', trigger: ['blur', 'change'] }]
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
xType: 'slot',
|
// xType: 'slot',
|
||||||
label: '参数',
|
// label: '参数',
|
||||||
width: 120,
|
// width: 120,
|
||||||
slot: true,
|
// slot: true,
|
||||||
name: 'params'
|
// name: 'params'
|
||||||
}
|
// }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -54,12 +54,12 @@ export default {
|
||||||
name: 'executionListener',
|
name: 'executionListener',
|
||||||
label: '执行监听器'
|
label: '执行监听器'
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
xType: 'input',
|
// xType: 'input',
|
||||||
name: 'initiator',
|
// name: 'initiator',
|
||||||
label: '发起人',
|
// label: '发起人',
|
||||||
show: !!_this.showConfig.initiator
|
// show: !!_this.showConfig.initiator
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// xType: 'input',
|
// xType: 'input',
|
||||||
// name: 'formKey',
|
// name: 'formKey',
|
||||||
|
|
|
||||||
|
|
@ -362,7 +362,7 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
|
||||||
translate('Append Gateway')
|
translate('Append Gateway')
|
||||||
),
|
),
|
||||||
'append.append-user-task': appendAction(
|
'append.append-user-task': appendAction(
|
||||||
'bpmn:Task',
|
'bpmn:UserTask',
|
||||||
'bpmn-icon-user-task',
|
'bpmn-icon-user-task',
|
||||||
'添加用户任务'
|
'添加用户任务'
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,6 @@
|
||||||
import customTranslate from './common/customTranslate'
|
import customTranslate from './common/customTranslate'
|
||||||
import Modeler from 'bpmn-js/lib/Modeler'
|
import Modeler from 'bpmn-js/lib/Modeler'
|
||||||
import panel from './PropertyPanel'
|
import panel from './PropertyPanel'
|
||||||
import BpmData from './BpmData'
|
|
||||||
import getInitStr from './flowable/init'
|
import getInitStr from './flowable/init'
|
||||||
// 引入flowable的节点文件
|
// 引入flowable的节点文件
|
||||||
import FlowableModule from './flowable/flowable.json'
|
import FlowableModule from './flowable/flowable.json'
|
||||||
|
|
@ -167,58 +166,6 @@ export default {
|
||||||
console.error(err.message, err.warnings)
|
console.error(err.message, err.warnings)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 调整左侧工具栏排版
|
|
||||||
adjustPalette() {
|
|
||||||
try {
|
|
||||||
// 获取 bpmn 设计器实例
|
|
||||||
const canvas = this.$refs.canvas
|
|
||||||
const djsPalette = canvas.children[0].children[1].children[4]
|
|
||||||
const djsPalStyle = {
|
|
||||||
width: '130px',
|
|
||||||
padding: '5px',
|
|
||||||
background: 'white',
|
|
||||||
left: '20px',
|
|
||||||
borderRadius: 0
|
|
||||||
}
|
|
||||||
for (var key in djsPalStyle) {
|
|
||||||
djsPalette.style[key] = djsPalStyle[key]
|
|
||||||
}
|
|
||||||
const palette = djsPalette.children[0]
|
|
||||||
const allGroups = palette.children
|
|
||||||
allGroups[0].style['display'] = 'none'
|
|
||||||
// 修改控件样式
|
|
||||||
for (var gKey in allGroups) {
|
|
||||||
const group = allGroups[gKey]
|
|
||||||
for (var cKey in group.children) {
|
|
||||||
const control = group.children[cKey]
|
|
||||||
const controlStyle = {
|
|
||||||
display: 'flex',
|
|
||||||
justifyContent: 'flex-start',
|
|
||||||
alignItems: 'center',
|
|
||||||
width: '100%',
|
|
||||||
padding: '5px'
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
control.className &&
|
|
||||||
control.dataset &&
|
|
||||||
control.className.indexOf('entry') !== -1
|
|
||||||
) {
|
|
||||||
const controlProps = new BpmData().getControl(
|
|
||||||
control.dataset.action
|
|
||||||
)
|
|
||||||
control.innerHTML = `<div style='font-size: 14px;font-weight:500;margin-left:15px;'>${
|
|
||||||
controlProps['title']
|
|
||||||
}</div>`
|
|
||||||
for (var csKey in controlStyle) {
|
|
||||||
control.style[csKey] = controlStyle[csKey]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 对外 api
|
// 对外 api
|
||||||
getProcess() {
|
getProcess() {
|
||||||
const element = this.getProcessElement()
|
const element = this.getProcessElement()
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,335 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="名称" prop="name">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.name"
|
||||||
|
placeholder="请输入名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="监听类型" prop="type">
|
||||||
|
<el-select v-model="queryParams.type" placeholder="请选择监听类型" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.sys_listener_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</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="['system:listener: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="['system:listener: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="['system:listener:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['system:listener:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="listenerList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="名称" align="center" prop="name" />
|
||||||
|
<el-table-column label="监听类型" align="center" prop="type">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.sys_listener_type" :value="scope.row.type"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="事件类型" align="center" prop="eventType"/>
|
||||||
|
<el-table-column label="值类型" align="center" prop="valueType">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.sys_listener_value_type" :value="scope.row.valueType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="执行内容" align="center" prop="value" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:listener:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:listener:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改流程监听对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="名称" prop="name">
|
||||||
|
<el-input v-model="form.name" placeholder="请输入名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="监听类型" prop="type">
|
||||||
|
<el-select v-model="form.type" placeholder="请选择监听类型">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.sys_listener_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="事件类型" prop="eventType" v-if="form.type === '1'">
|
||||||
|
<el-select v-model="form.eventType" placeholder="请选择事件类型">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in taskListenerEventList"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="事件类型" prop="eventType" v-else>
|
||||||
|
<el-select v-model="form.eventType" placeholder="请选择事件类型">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in executionListenerEventList"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="值类型" prop="valueType">
|
||||||
|
<el-radio-group v-model="form.valueType">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in dict.type.sys_listener_value_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{dict.label}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="执行内容" prop="value">
|
||||||
|
<el-input v-model="form.value" 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>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listListener, getListener, delListener, addListener, updateListener } from "@/api/system/listener";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Listener",
|
||||||
|
dicts: ['sys_listener_value_type', 'sys_listener_type', 'common_status', 'sys_listener_event_type'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 流程监听表格数据
|
||||||
|
listenerList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
name: null,
|
||||||
|
type: null,
|
||||||
|
eventType: null,
|
||||||
|
valueType: null,
|
||||||
|
value: null,
|
||||||
|
status: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
},
|
||||||
|
taskListenerEventList: [
|
||||||
|
{label: 'create', value: 'create'},
|
||||||
|
{label: 'assignment', value: 'assignment'},
|
||||||
|
{label: 'complete', value: 'complete'},
|
||||||
|
{label: 'delete', value: 'delete'},
|
||||||
|
],
|
||||||
|
executionListenerEventList: [
|
||||||
|
{label: 'start', value: 'start'},
|
||||||
|
{label: 'end', value: 'end'},
|
||||||
|
{label: 'take', value: 'take'},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询流程监听列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listListener(this.queryParams).then(response => {
|
||||||
|
this.listenerList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
name: null,
|
||||||
|
type: null,
|
||||||
|
eventType: null,
|
||||||
|
valueType: null,
|
||||||
|
value: null,
|
||||||
|
createTime: null,
|
||||||
|
updateTime: null,
|
||||||
|
createBy: null,
|
||||||
|
updateBy: null,
|
||||||
|
status: null,
|
||||||
|
remark: 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.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加流程监听";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getListener(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改流程监听";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateListener(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addListener(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除流程监听编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delListener(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/listener/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `listener_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
Loading…
Reference in New Issue