1001510044_run.jsp 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  3. <%@ taglib uri="/WEB-INF/SpaceCoreApp.tld" prefix="app"%>
  4. <% pageContext.setAttribute(space.core.apps.common.ConstVars.MODULE_DM_KEY, "sys"); %>
  5. <!DOCTYPE html >
  6. <html>
  7. <head>
  8. <!-- HEAD -->
  9. <link rel="stylesheet" type="text/css" href="/css/reset.css">
  10. <link rel="stylesheet" type="text/css" href="/apps/space/plug-in/element-ui@2.10.1/theme-chalk/index.css">
  11. <link rel="stylesheet" type="text/css" href="/apps/space/plug-in/layui/dist/css/layui.css">
  12. <link rel="stylesheet" type="text/css" href="/apps/space/css/SpaceIcon/iconfont.css">
  13. <link rel="stylesheet" type="text/css" href="/css/components.css">
  14. <link rel="stylesheet" type="text/css" href="/css/elementUI-overwrite.css">
  15. <script src="/js/jquery1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
  16. <script src="/apps/space/plug-in/vue@2.6.10/vue.min.js" type="text/javascript" charset="utf-8"></script>
  17. <script src="/apps/space/plug-in/element-ui@2.10.1/index.js" type="text/javascript" charset="utf-8"></script>
  18. <script src="/apps/space/plug-in/layui/dist/layui.all.js" type="text/javascript" charset="utf-8"></script>
  19. <script src="/apps/space/plug-in/nicescroll@376/jquery.nicescroll.min.js" type="text/javascript" charset="utf-8"></script>
  20. <script src="/js/space.recycle.js" type="text/javascript" charset="utf-8"></script>
  21. <script src="/js/space.display.js" type="text/javascript" charset="utf-8"></script>
  22. <link rel="stylesheet" type="text/css" href="/apps/space/plug-in/gooflow/css/GooFlow.css">
  23. <script src="/apps/space/plug-in/gooflow/GooFlow.js" type="text/javascript" charset="utf-8"></script>
  24. <script src="/apps/space/plug-in/gooflow/GooFunc.js" type="text/javascript" charset="utf-8"></script>
  25. <title>流程图</title>
  26. </head>
  27. <body>
  28. <div v-cloak id="space-content">
  29. <div class="demo"></div>
  30. </div>
  31. </body>
  32. <script type="text/javascript">
  33. space.vue = new Vue({
  34. el: space.appContent,
  35. data() {
  36. return {
  37. serviceUrl: {
  38. flowChartUrl: '<app:token name='sys.sys_flow_chart' />'
  39. },
  40. // GooFlow 实例化与改变节点属性时需要的
  41. gooFlow: {
  42. // GooFlow 元素标签,
  43. el: '.demo',
  44. // 初始化流程图的参数
  45. property: {
  46. width: 1200,
  47. height: 500
  48. },
  49. initData: {}
  50. },
  51. gooFlowObj: undefined
  52. }
  53. },
  54. created: function() {
  55. console.log('初始化工作')
  56. this.initFlowChart();
  57. },
  58. mounted: function() {
  59. // 设置 gooFlow 的宽高
  60. this.gooFlowObj = $.createGooFlow($(this.gooFlow.el), this.gooFlow.property, this)
  61. console.log('流程节点数据', this.gooFlow.initData)
  62. // this.gooFlowObj.loadData(this.gooFlow.initData);
  63. },
  64. methods: {
  65. /**
  66. * 初始化流程图
  67. */
  68. initFlowChart() {
  69. var _this = this;
  70. space.utils.ajax({
  71. url: _this.serviceUrl.flowChartUrl,
  72. dataType: 'json',
  73. success: function(data) {
  74. _this.gooFlow.initData = data.data
  75. console.log(_this.gooFlow.initData)
  76. _this.gooFlowObj.loadData(_this.gooFlow.initData);
  77. }
  78. });
  79. }
  80. }
  81. })
  82. </script>
  83. <script>removeTokens('<app:token name='sys.removeToken' />', '<%= pageContext.getAttribute(space.core.apps.common.ConstVars.TOKEN_SESSION_LIST_KEY)%>')</script>
  84. </html>