lcdy.jsp 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%
  3. String path = request.getContextPath();
  4. String basePath=path+"/";
  5. %>
  6. <!doctype html>
  7. <html>
  8. <head>
  9. <title>SinoWorkFlow</title>
  10. <meta http-equiv="content-type" content="text/html; charset=utf-8">
  11. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  12. <link rel="stylesheet" href="<%=basePath%>player/js/bootstrap-3.3.7-dist/css/bootstrap.min.css">
  13. <link rel="stylesheet" href="<%=basePath%>player/css/font-awesome/css/font-awesome.min.css">
  14. <link rel="stylesheet" href="<%=basePath%>player/css/app.v2.css">
  15. <link rel="stylesheet" href="<%=basePath%>player/css/extjs.css">
  16. </head>
  17. <body style="overflow: hidden;">
  18. <section id="content" class="content-sidebar bg-white" style="height: 100%;">
  19. <!-- .sidebar -->
  20. <aside class="sidebar bg-lighter sidebar-small" style="width: 200px;">
  21. <div class="text-center clearfix bg" style="height: 65px;">
  22. <button id="glmbButton" class="btn btn-sm btn-primary m-t m-b" style="margin-top: 18px;" onclick="relateDefinition()"><i class="fa fa-edit"></i> 关联模版</button>
  23. </div>
  24. <div class="list-group list-normal m-b-none">
  25. <a onclick="searchByType(this,'');" style="cursor:pointer" class="list-group-item active" ><i class="fa fa-list"></i><span class="badge m-r" id="temCount"></span> 全部</a>
  26. <a onclick="searchByType(this,3);" style="cursor:pointer" class="list-group-item"><i class="fa fa-link"></i><span class="badge m-r" id="temRelateCount"></span> 已关联模版</a>
  27. <a onclick="searchByType(this,4);" style="cursor:pointer" class="list-group-item"><i class="fa fa-chain-broken"></i><span class="badge m-r" id="temUnrelateCount"></span> 未关联模版</a>
  28. <a onclick="searchByType(this,1);" style="cursor:pointer" class="list-group-item" ><i class="fa fa-clock-o"></i> 按关联时间排序</a>
  29. <a onclick="searchByType(this,2);" style="cursor:pointer" class="list-group-item"><i class="fa fa-object-group"></i> 按关联模版分组</a>
  30. </div>
  31. </aside>
  32. <!-- /.sidebar -->
  33. <!-- .sidebar -->
  34. <aside class="sidebar sidebar-large" style="width: 300px;height: 100%;">
  35. <div class="padder header-bar bg clearfix">
  36. <form action="#" method="get" class="sidebar-form pull-left shift" style="margin-top: 15px;width: 100%;">
  37. <div class="input-group">
  38. <input type="text" class="form-control" placeholder="请输入流程定义名称、编号" id="searchInput">
  39. <span class="input-group-btn">
  40. <button type="button" name="search" id="search-btn" class="btn btn-default" onclick="searchByLike()"><i class="fa fa-search text-muted"></i>
  41. </button>
  42. </span>
  43. </div>
  44. </form>
  45. </div>
  46. <div id="tableContent" class="list-group list-normal m-t-n-xmini scroll-y scrollbar" style="height: calc(100% - 105px);margin-bottom:5px;">
  47. </div>
  48. <div style="width:98%;height: 50px;margin-bottom: 10px;margin-left: 1%;text-align: center;">
  49. <ul class="pagination" style="padding:0px 20px 5px 20px;margin:0px" id="pagination"></ul>
  50. </div>
  51. </aside>
  52. <!-- /.sidebar -->
  53. <!-- .main -->
  54. <section class="main" style="height:100%" id="sectionMain">
  55. <div class=" clearfix padder m-b bg" style="height: 65px;margin-bottom:5px">
  56. <div class="m-b tooltip-test inline" id ="tempName" data-toggle="tooltip" title="" style="max-width:50%;margin-top:15px;font-size:25px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"></div>
  57. <div class="inline" style="height:40px;max-width:30%"><b class="badge bg-default pull-left" style="max-width:100%;background-color:white;color:black;font-weight:400;border:1px solid rgb(35, 212, 181);overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" id ="tempRelate" data-toggle="tooltip" title=""></b></div>
  58. <div class="doc-buttons pull-right inline m-b" style="display: inline-block;margin-top: 20px;">
  59. <a class="btn btn-white btn-sm" onclick="changeItem('up')" style="cursor:pointer;"><i class="fa fa-chevron-left"></i> 上一条</a>
  60. <a class="btn btn-white btn-sm" onclick="changeItem('down')" style="cursor:pointer;">下一条 <i class="fa fa-chevron-right"></i> </a>
  61. </div>
  62. </div>
  63. <div class="text-small padder" style="border-bottom: 1px rgb(209, 212, 215);height: calc(100% - 123px);">
  64. <div class="block clearfix" style="margin-bottom:0px;width: 100%;overflow: hidden;">
  65. <div class="doc-buttons pull-right inline">
  66. <a id="unRelateDefinitionBtn" class="btn btn-white btn-sm" onclick="unRelateDefinition()" style="cursor:pointer;"><i class="fa fa-times"></i> 解除关联</a>
  67. </div>
  68. </div>
  69. <div class="text-small" style="width:100%;height:calc(100% - 10px);border:solid 1px rgb(209, 212, 215);">
  70. <iframe id="bpmnShow" src="" style="border: none;width:100%;height:100%;overflow:hidden" ></iframe>
  71. </div>
  72. </div>
  73. <div class="padder">
  74. <form class="panel text-small" style="margin-bottom:5px">
  75. <div class="panel-body" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" id ="tempDesc" data-toggle="tooltip" title="">
  76. </div>
  77. </form>
  78. </div>
  79. </section>
  80. </section>
  81. </body>
  82. <script type="text/javascript">
  83. var basePath = '<%=basePath%>';
  84. </script>
  85. <script src="<%=basePath%>player/js/jquery/dist/jquery.min.js"></script>
  86. <script src="<%=basePath%>player/js/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
  87. <script src="<%=basePath%>player/js/adminlte.min.js"></script>
  88. <script src="<%=basePath%>player/js/common.js"></script>
  89. <script src="<%=basePath%>player/js/toastr/toastr.min.js"></script>
  90. <script src="<%=basePath%>player/js/ewin.confirm.js"></script>
  91. <script type="text/javascript">
  92. //修复IE9下height100%不生效的样式问题
  93. resetSectionHeight();
  94. loadData();
  95. function loadData(){
  96. getData(1,'definition');
  97. getCounts('definition');
  98. }
  99. function relateDefinition(){
  100. var url = basePath+'player/page/mbgllc.jsp';
  101. openModal('关联流程定义',url,document.body.clientHeight-20,document.body.clientWidth-200,null,false);
  102. }
  103. function searchByType(obj,type){
  104. typeSearch=type;
  105. getData(1,'definition');
  106. $('.m-b-none').children().removeClass('active');
  107. $(obj).addClass('active');
  108. }
  109. function searchByLike(){
  110. likeSearch = $('#searchInput').val();
  111. getData(1,'definition');
  112. }
  113. function changeItem(type){
  114. var curItem = $('#tableContent .active');
  115. if(type=='up'&&curItem.prev()!=null)
  116. curItem.prev().trigger("click");
  117. else if(type=='down'&&curItem.next()!=null)
  118. curItem.next().trigger("click");
  119. }
  120. function unRelateDefinition(){
  121. Ewin.confirm({ message: "确定要解除关联吗?" }).on(function (e) {
  122. if (e) {
  123. var did = $('#tableContent .active').attr('id');
  124. var tid = $('#tableContent .active').attr('data-templateid');
  125. $.ajax({
  126. type: "POST",
  127. dataType: "json",
  128. async:false,
  129. url: basePath + "/WFP?module=template&action=relate",
  130. data: {
  131. type : 2,
  132. tid : tid,
  133. did : did
  134. },
  135. success: function(data) {
  136. if(data.success == true){
  137. toastr.options = {
  138. timeOut:2000,
  139. closeButton: false
  140. }
  141. toastr.success('解除成功!');
  142. loadData();
  143. }else{
  144. toastr.options = {
  145. timeOut:0,
  146. closeButton: true
  147. }
  148. toastr.error('解除失败!');
  149. }
  150. }
  151. });
  152. }
  153. });
  154. }
  155. </script>
  156. </html>