activiti工作流在线表单设计功能(activiti + ueditor + Ueditor Web Form De

分享一下我老师大神的人工智能教程吧。零基础,通俗易懂!风趣幽默!http://www.captainbed.net/

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

               

之前实现了activiti工作流的动态表单功能,接下来准备实现activiti的外置表单功能,并且外置表单可以在线编辑。

activiti工作流在线表单设计功能实现可以分为2个部分:

1.在线表单设计功能。

2.表单与activiti工作流关联起来。

 

第一部分,在线表单设计功能可以使用ueditor 的插件WEB表单设计器实现。

第二部分,可以使用activiti工作流的外置表单 原理关联 WEB表单设计器 设计的表单。

 

主要难点在实现第一部分,具体效果图如下:

 

相关所有实现代码:

list.jsp

 

<%@ page language="java" contentType="text/html; charset=UTF-8"    pageEncoding="UTF-8"%><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %><%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %><!DOCTYPE html ><html><head> <title>在线表单列表</title><%@include file="/common/base.jsp" %><script type="text/javascript">$(function() { query();})function query(){ $('#dg').datagrid('options').queryParams = parseParams("toolbar"); $("#dg").datagrid('reload');  //$("#dg").datagrid('load',parseParams("toolbar"));}function formatterName(value, row, index){  return row.addUser.name;}  function formatOp(value, row, index){  var html = ""; html += "<a href='javascript:openView(null,null,\""+value+"\")'>编辑</a>  "; html += "<a href='javascript:openDesign(\""+value+"\")'>设计</a>  "; html += "<a href='javascript:del(\""+value+"\")'>删除</a>"return html;}  function openView(rowIndex,rowData,bizId){ bizId = bizId || rowData.id; $('#win').window({   title: '修改在线表单',      width:450,      height:350,      modal:true }); $('#subWin').attr("src",'page/online-form/add.jsp?bizId='+bizId)  $('#win').window('open');}function openDesign(id){ $('#win').window({   title: '设计在线表单',      width:1000,      height:680,      modal:true }); $('#subWin').attr("src",'page/online-form/design.jsp?bizId='+id)  $('#win').window('open');}function add(){ $('#win').window({   title: '新增在线表单',      width:450,      height:350,      modal:true }); $('#subWin').attr("src",'page/online-form/add.jsp?bizId=')  $('#win').window('open');}function del(id){ $('#frm').mySubmit({  url : 'OnlineFormController/delete?id='+id });}</script><style type="text/css"></style></head><body> <table id="dg" class="easyui-datagrid" title="内容管理" style="width:100%;height:auto;margin:0 auto;"   data-options="singleSelect:true,collapsible:true,onDblClickRow:openView"    url="OnlineFormController/list"   rownumbers="true" toolbar="#toolbar">  <thead>   <tr>    <th align="center" data-options="field:'key',width:200,align:'center'">表单名称</th>    <th align="center" data-options="field:'descr',width:600,align:'center'">描述</th>    <th align="center" formatter="formatterName" data-options="field:'addUserId',width:240,align:'center'">设计者</th>    <th align="center" formatter="formatDate" data-options="field:'addtime',width:150,align:'center'">日期</th>    <th align="center" data-options="field:'enabled',width:100,align:'center'">是否启用</th>    <th align="center" formatter="formatOp" data-options="field:'id',width:350,align:'center'">操作</th>   </tr>  </thead> </table><div id="toolbar">     <span>设计者:</span> <input class="easyui-validatebox"  name="addUser.name" >     <a href="javascript:query()" class="easyui-linkbutton"   data-options="iconCls:'icon-search'" style="width: 80px">查询</a>     <a href="javascript:add()" class="easyui-linkbutton"   data-options="iconCls:'icon-add'" style="width: 80px">新增</a></div><div id="win"> <iframe id="subWin" src=''width= "100%" height= "99%" marginheight= "0" marginwidth= "0" hspeace= "0" vspace= "0" frameborder= "0"  ></iframe></div><form id="frm" method="post" style="display:none;"></form></body></html>


add.jsp

 

 

 

 

<%@ page language="java" contentType="text/html; charset=UTF-8"    pageEncoding="UTF-8"%><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %><%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %><%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%> <%@page import="org.springframework.context.ApplicationContext" %>    <%@page import="com.jy.service.onlineform.OnlineFormService" %> <%  ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(getServletContext());      OnlineFormService onlineFormService = (OnlineFormService)ctx.getBean("onlineFormService");   String bizId = request.getParameter("bizId");  if(bizId != null && !bizId.equals("")){   request.setAttribute("of", onlineFormService.getEntityById(bizId));  }%><!DOCTYPE html ><html><head> <title>新增文档</title><%@include file="/common/base.jsp" %><link rel="stylesheet" href="static/css/system/bootstrap/bootstrap.min.css" /><script src="static/js/bootstrap/bootstrap.min.js"></script><style type="text/css">.fitem{  vertical-align: text-top;}tr{
    height: 40px;}form divmargin-top:10px;}form div labelwidth:100pxtext-align: right;}</style><script type="text/javascript">function save(){ $('#frm').mySubmit({  url : 'OnlineFormController/save',  success: function(res){   window.parent.query();   closeWin();  } }); return true;}</script></head><body>    <form id="frm" method="post">    <input name="id" type="hidden" value="${of.id}"/>    <div>  
  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值