listFlowModel.jsp 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <%@ page language="java" contentType="text/html;charset=GBK"
  2. pageEncoding="GBK"%>
  3. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  8. <title>流程模版列表</title>
  9. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  10. <script type="text/javascript" src="/shares/js/jquery-1.8.2.js"></script>
  11. <script type="text/javascript" src="/shares/js/yw/bpm/promptDefine.js"></script>
  12. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  13. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  14. <script type="text/javascript" src="/shares/js/constant.js"></script>
  15. <script type="text/javascript" src="/shares/js/common.js"></script>
  16. <script type="text/javascript" src="/shares/js/yw/bpm/oa.js"></script>
  17. <script type="text/javascript" src="/shares/js/yw/bpm/flow/flowModel.js"></script>
  18. <script type="text/javascript">
  19. var grid = null;
  20. $(function () {
  21. grid = $("#maingrid4").ligerGrid({
  22. columns: [
  23. { display: '模版名称', name: 'modelName', width: 180 },
  24. { display: '模版备注', name: 'remark', width: 150 },
  25. { display: '流程类型', name: 'typeId.typeName', width: 130,
  26. render: function (row){
  27. var html = row.typeId.typeName;
  28. return html;
  29. }},
  30. { display: '状态', name: 'state.dataName', width: 80,
  31. render: function (row){
  32. var html = row.state.dataName;
  33. return html;
  34. } },
  35. { display: '创建时间', name: 'createdate', width: 200 },
  36. {
  37. display: '操作', isAllowHide: false, width: 350,
  38. render: function (row)
  39. {
  40. var html = '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'修改流程模版\', \'${pageContext.request.contextPath }/FlowModelAction.do?task=toEdit&modelId='
  41. + row.modelId + '&tabid='+getCurrentTabId()+'\');\">编辑</a>&nbsp;';
  42. html += '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'查看流程模版\', \'${pageContext.request.contextPath }/FlowModelAction.do?task=info&modelId='
  43. + row.modelId + '&tabid='+getCurrentTabId()+'\');\">查看</a>&nbsp;';
  44. if(row.state.value == 1){
  45. html += '<a href=\"#\" onclick=\"if(confirm(\'确定停用该流程?\')){stop(\''
  46. + row.modelId + '\');}\">停用</a>&nbsp;';
  47. //html += '<a href=\"#\" onclick=\"alert(\'如果需要修改配置,请先停用该流程!\');\">配置</a>&nbsp;';
  48. } else {
  49. html += '<a href=\"#\" onclick=\"if(confirm(\'确定启用该流程?\')){start(\''
  50. + row.modelId + '\');}\">启用</a>&nbsp;';
  51. if(row.isGraph.value == 1){
  52. html+= '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'流程模版配置\', \'${pageContext.request.contextPath }/GraphAction.do?task=toConfig&modelId='
  53. + row.modelId + '&tabid='+getCurrentTabId()+'\');\">图形化</a>&nbsp;';
  54. } else {
  55. html += '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'流程模版配置\', \'${pageContext.request.contextPath }/FlowModelAction.do?task=toConfig&modelId='
  56. + row.modelId + '&tabid='+getCurrentTabId()+'\');\">配置</a>&nbsp;';
  57. }
  58. html += '<a href=\"#\" onclick=\"if(confirm(\'确定删除该模版?\')){deleteFlowModel('+row.modelId+');}\">删除</a>&nbsp;';
  59. }
  60. var formId = row.formId.formId;
  61. if(formId == null || formId == ''){
  62. formId = 0;
  63. }
  64. html += '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'配置流程表单\', \'${pageContext.request.contextPath }/FlowModelAction.do?task=toConfigFlowForm&modelId='
  65. + row.modelId + '&formId=' + row.formId.formId + '&tabid='+getCurrentTabId()+'\');\">表单配置</a>&nbsp;';
  66. html += '<a href=\"#\" onclick=\"window.parent.f_addTab(new Date().getTime(), \'配置路径规则\', \'${pageContext.request.contextPath }/FlowModelAction.do?task=toConfigRule&modelId='
  67. + row.modelId + '\');\">规则配置</a>&nbsp;';
  68. return html;
  69. }
  70. }
  71. ],
  72. pageSize:20,
  73. url: 'FlowModelAction.do?task=list&time=' + new Date().getTime(),
  74. parms: [{name: "modelName", value: ""}, {name: "state", value: ""}, {name: "control", value: "1"}],
  75. pageParmName: 'p', //页索引参数名,(提交给服务器)
  76. pagesizeParmName: 'pSize', //页记录数参数名,(提交给服务器)
  77. width: '99.9%',
  78. height: '99%',//getParentHeight()-67,
  79. onError: function(){alert("数据加载失败,请刷新页面!");}
  80. });
  81. $("#pageloading").hide();
  82. });
  83. function searchByKword(){
  84. grid.set("parms", [{name: "modelName", value: encodeURI($("#modelName").val())},
  85. {name: "state", value: $("#state").val()},
  86. {name: "control", value: $("#control").val()}]);
  87. grid.set("newPage", "1");
  88. grid.loadData(true);
  89. }
  90. function searchAll() {
  91. $("#modelName").val("");
  92. $("#state").val("");
  93. $("#control").val("1");
  94. searchByKword();
  95. }
  96. </script>
  97. </head>
  98. <body>
  99. <div class="container-layout">
  100. <div id="title" class="form-button" style="width : 100%;">
  101. <input type="button" class="l-button" style="width: 100px;" value="创建流程模版" onclick="window.parent.f_addTab(new Date().getTime(), '创建流程模版', '${pageContext.request.contextPath }/FlowModelAction.do?task=toCreate&tabid=' + getCurrentTabId());"/>
  102. <input onclick="closeTabUseInOA();" type="button" value="关闭" class="l-button">
  103. </div>
  104. <div class="default_search" style="margin: 0;width: 100%;">
  105. <ul class="list_search" style="width:250px;">
  106. <li class="title">模版名称:</li>
  107. <li class="text">
  108. <input type="text" id="modelName" name="modelName" value="" style="width: 130px;">
  109. </li>
  110. </ul>
  111. <ul class="list_search" style="width:250px;">
  112. <li class="title">状态:</li>
  113. <li class="text">
  114. <select name="state" id="state" style="width: 130px;">
  115. <option value="" >全部</option>
  116. <c:forEach items="${requestScope.states }" var="state">
  117. <option value="${state.value }" >${state.dataName }</option>
  118. </c:forEach>
  119. </select>
  120. </li>
  121. </ul>
  122. </div>
  123. <div class="default_search" style="margin: 0; width: 100%;">
  124. <ul class="list_search" style="width:250px;">
  125. <li class="title">控制方式:</li>
  126. <li class="text">
  127. <select name="control" id="control" style="width: 130px;" >
  128. <c:forEach items="${requestScope.controls }" var="control" varStatus="status">
  129. <c:choose>
  130. <c:when test="${control.value == 1 }">
  131. <option value="${control.value }" selected="selected">${control.dataName }</option>
  132. </c:when>
  133. <c:otherwise>
  134. <option value="${control.value }" >${control.dataName }</option>
  135. </c:otherwise>
  136. </c:choose>
  137. </c:forEach>
  138. </select>
  139. </li>
  140. </ul>
  141. <ul>
  142. <li class="search-button">
  143. <input type="button" class='l-button' name="search" onclick="searchByKword()" value="查询"/>
  144. <input type="button" class='l-button' name="search" onclick="searchAll()" value="查询全部"/>
  145. </li>
  146. </ul>
  147. </div><div style="clear: both;">
  148. <div id="maingrid4" style="margin:0; padding:0"></div>
  149. </div>
  150. <div style="display:none;">
  151. <!-- g data total ttt -->
  152. </div>
  153. </div>
  154. <%@ include file="/include/message.jsp"%>
  155. </body>
  156. </html>