flowDesign.html 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <html>
  2. <head>
  3. <meta charset="utf-8">
  4. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  5. <title>流程设计</title>
  6. <link charset="utf-8" rel="stylesheet" href="/static/css/layui.css?v=1.0.0">
  7. <link rel="stylesheet" href="/static/css/temp.css" media="all">
  8. <link href="/static/css/flow.css" rel="stylesheet" />
  9. <script src="/static/js/jquery-1.8.2.min.js?v=1.0.0"></script>
  10. <script src="/static/js/crypto-js.js"></script>
  11. <script src="/static/js/layui.js?v=1.0.0"></script>
  12. <script src="/static/js/api.config.js"></script>
  13. <script src="/static/js/util.js?v=1.0.0"></script>
  14. <script src="/static/js/customform.js?v=1.0.0"></script>
  15. <script src="/static/js/url.js?v=1.0.0"></script>
  16. <script src="/static/js/lay/lay-config.js?v=1.0.0"></script>
  17. <script src="/static/css/inconfont/iconfont.js"></script>
  18. <script src="/static/js/jquery-ui.min.js"></script>
  19. <script src="/static/js/jsplumb.js"></script>
  20. <script src="/static/js/jquery.contextmenu.r2.js"></script>
  21. <script src="/static/js/flow.js"></script>
  22. <style type="text/css">
  23. #flowBox {
  24. position: relative;
  25. overflow: auto;
  26. width: 200%;
  27. }
  28. .div-col {
  29. display: inline-block;
  30. background-color: #e7e7e7;
  31. cursor: e-resize;
  32. position: absolute;
  33. top: 0;
  34. height: 100%;
  35. }
  36. .div-col-first {
  37. display: inline-block;
  38. background-color: #e7e7e7;
  39. cursor: e-resize;
  40. position: absolute;
  41. height: 100%;
  42. }
  43. .div-row {
  44. background-color: #e7e7e7;
  45. cursor: n-resize;
  46. position: absolute;
  47. left: 0;
  48. width: 100%;
  49. }
  50. .div-row-first {
  51. background-color: #e7e7e7;
  52. position: absolute;
  53. width: 100%;
  54. }
  55. .div-row-title {
  56. height: 40px;
  57. position: absolute;
  58. top: 0;
  59. line-height: 40px;
  60. text-align: center;
  61. display: inline-block;
  62. }
  63. .div-row-title textarea {
  64. height: 100%;
  65. width: 100%;
  66. display: table-cell;
  67. vertical-align: middle;
  68. line-height: 40px;
  69. text-align: center;
  70. border: none;
  71. overflow: auto;
  72. resize: none;
  73. }
  74. .div-row-content {
  75. cursor: pointer;
  76. height: 40px;
  77. position: absolute;
  78. top: 0;
  79. line-height: 40px;
  80. text-align: center;
  81. display: inline-block;
  82. vertical-align: middle;
  83. text-align: center;
  84. border: none;
  85. overflow: auto;
  86. }
  87. .div-col-content.div-display,
  88. .div-row-content.div-display,
  89. .div-row-title.div-display,
  90. .div-col-title.div-display {
  91. display: none;
  92. z-index: -9999;
  93. }
  94. .div-col-title {
  95. width: 40px;
  96. position: absolute;
  97. left: 0;
  98. text-align: center;
  99. display: inline-block;
  100. }
  101. .div-col-title textarea {
  102. height: 100%;
  103. width: 100%;
  104. display: table-cell;
  105. vertical-align: middle;
  106. line-height: 40px;
  107. text-align: center;
  108. border: none;
  109. overflow: auto;
  110. resize: none;
  111. }
  112. .div-col-content {
  113. cursor: pointer;
  114. width: 40px;
  115. position: absolute;
  116. left: 0;
  117. text-align: center;
  118. display: inline-block;
  119. }
  120. .div-first {
  121. position: absolute;
  122. }
  123. </style>
  124. </head>
  125. <body class="layui-layout-body">
  126. <div class="pageBox">
  127. <div class="flowChartWrapper">
  128. <span class="layui-breadcrumb" lay-separator="ㄑ">
  129. <!-- <a href="/views/welcome-4.html">首页</a>
  130. <a><cite>办公审批流程图</cite></a> -->
  131. </span>
  132. <ul>
  133. <li>
  134. <svg class="icon" aria-hidden="true" style="cursor: pointer;" onclick="editFlowInfo()">
  135. <use xlink:href="#iconxiangqing"></use>
  136. </svg>
  137. </li>
  138. <li><span></span><span style="cursor: pointer;" onclick="saveFlowInfo()">保存</span></li>
  139. </ul>
  140. </div>
  141. <div class="flowWrapper">
  142. <ul class="flowleft">
  143. <li>节点</li>
  144. <li class="menuItems startNode">
  145. <span data_id="startNode" data_type="start" data_name="开始节点" class="btn layui-btn layui-btn-primary "></span>
  146. </li>
  147. <li class="menuItems IntermediateNode">
  148. <div data_id="startNode" data_type="task" data_name="流程节点" class="btn layui-btn layui-btn-primary"></div>
  149. </li>
  150. <li class="menuItems layui-icon-endNode">
  151. <div data_id="endNode" data_type="end" data_name="结束节点" class="btn layui-btn layui-btn-primary"></div>
  152. </li>
  153. <li class="handleIsShow">
  154. <svg class="icon" aria-hidden="true">
  155. <use xlink:href="#iconyongdao"></use>
  156. </svg>
  157. </li>
  158. </ul>
  159. <div class="flowRight">
  160. <div class="flowRightItem flowBox" id="flowBox">
  161. <div id="ydt" style="height: 100%;width: 100%;"></div>
  162. </div>
  163. </div>
  164. </div>
  165. </div>
  166. <!--右键菜单的源-->
  167. <div class="contextMenu" id="myMenu1">
  168. <ul>
  169. <li id="deleteBtn"><img src="/static/images/contentMenu/cross.png" />删除</li>
  170. </ul>
  171. </div>
  172. <!--右键菜单的源-->
  173. <div class="contextMenu" id="myMenu2">
  174. <ul>
  175. <li id="addRow"><img src="/static/images/contentMenu/cross.png" />添加行</li>
  176. <li id="addCol"><img src="/static/images/contentMenu/cross.png" />添加列</li>
  177. </ul>
  178. </div>
  179. <script>
  180. //JavaScript代码区域
  181. layui.use('element', function () {
  182. var element = layui.element;
  183. });
  184. $(".layui-icon-endNode").mouseover(function () {
  185. layer.tips('结束节点', this, {
  186. tips: [2, "#494949"],
  187. time: 1000
  188. });
  189. });
  190. $(".IntermediateNode").mouseover(function () {
  191. layer.tips('流程节点', this, {
  192. tips: [2, "#494949"],
  193. time: 1000
  194. });
  195. });
  196. $(".startNode").mouseover(function () {
  197. layer.tips('开始节点', this, {
  198. tips: [2, "#494949"],
  199. time: 1000
  200. });
  201. });
  202. var isok = false
  203. // var imagePath = './'
  204. $('.handleIsShow').click(function () {
  205. if (isok) {
  206. $('.div-row-content,.div-first,.div-col-content,.div-row-first,.div-row,.div-col-first,.div-col').css('opacity', 1)
  207. $(".flowRightItem.flowBox").css('background-image', 'url(../../static/images/yes-net.png)')
  208. $('.handleIsShow').css('color', '#00a0e9')
  209. isok = !isok
  210. } else {
  211. $('.div-row-content,.div-first,.div-col-content,.div-row-first,.div-row,.div-col-first,.div-col').css('opacity', 0)
  212. $(".flowRightItem.flowBox").css('background-image', 'url(../../static/images/no-net.png)')
  213. $('.handleIsShow').css('color', '#cccccc')
  214. isok = !isok
  215. }
  216. })
  217. // 鼠标移入事件
  218. // $(".flowRightItem").on('mouseenter',function(){
  219. // $(".flowRightItem").css("overflow","auto !important");
  220. // })
  221. // $(".flowRightItem").on('mouseleave',function(){
  222. // $(".flowRightItem").css("overflow","hidden !important");
  223. // })
  224. document.querySelector('.flowRightItem').addEventListener('mouseenter', function () {
  225. this.style.overflow = 'scroll'
  226. }, false)
  227. document.querySelector('.flowRightItem').addEventListener('mouseleave', function () {
  228. this.style.overflow = 'hidden'
  229. }, false)
  230. </script>
  231. </body>
  232. </html>