1003410402_edit.jsp 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <html>
  2. <head>
  3. <style>
  4. .iframe-wrap{
  5. box-sizing: border-box;
  6. width: 100%;
  7. height: calc(100% - 50px);
  8. }
  9. .iframe-wrap iframe{
  10. width: 100%;
  11. height: 100%;
  12. }
  13. .plain-btn{
  14. border: 1px solid #1989fa;
  15. color: #1989fa;
  16. background-color: #fff;
  17. }
  18. /* 弹出层 */
  19. .popup-content{
  20. width: 100%;
  21. height: 100%;
  22. }
  23. .popup-content-top{
  24. box-sizing: border-box;
  25. width: 100%;
  26. height: calc(100% - 54px);
  27. padding: 12px;
  28. }
  29. .popup-content-bottom{
  30. width: 90%;
  31. margin: 0 auto;
  32. padding: 5px;
  33. }
  34. .icon-node:before, .icon-flow2:before {
  35. font-size: 20px;
  36. }
  37. .ck.ck-editor {
  38. margin-top: 30px !important;
  39. }
  40. .van-form .van-cell::after{
  41. border-bottom: none;
  42. }
  43. </style>
  44. </head>
  45. <body class="body-bg-gray">
  46. <div id="space-content">
  47. <div class="content-wrap">
  48. <div class="iframe-wrap">
  49. <iframe id="applyInfo" frameborder="0"></iframe>
  50. </div>
  51. <!-- 底部 -->
  52. <van-goods-action style="padding-left:10px">
  53. <van-goods-action-icon class="spaceicon icon-node" text="流转意见" @click="auditOpinion();"></van-goods-action-icon>
  54. <van-goods-action-icon class="spaceicon icon-flow2" text="流程图" @click="flowChart()"></van-goods-action-icon>
  55. <van-goods-action-button type="info" text="退回" class="plain-btn" @click="showAudit('reject')"></van-goods-action-button>
  56. <van-goods-action-button type="info" text="同意" @click="showAudit('agree')"></van-goods-action-button>
  57. </van-goods-action>
  58. <!-- Popup 弹出层 -->
  59. <van-popup v-model="isShowPopup" position="bottom" :style="{ height: '300px' }" closeable round>
  60. <div class="popup-content">
  61. <div class="space-form-infor">
  62. <van-form id="aform" method="post" :model="obj" ref="obj" style="height: 100%;">
  63. <div class="popup-content-top">
  64. <space-editor v-model="obj.body" type="flow" height="150px" placeholder="请输入审批意见" ref="editor"></space-editor>
  65. </div>
  66. </van-form>
  67. </div>
  68. <div class="bottom-div">
  69. <van-button round type="info" native-type="button" @click="space.forms.submit();" style="width: 94%;">{{buttonName}}</van-button>
  70. </div>
  71. </div>
  72. </van-popup>
  73. </div>
  74. </div>
  75. </body>
  76. <script type="text/javascript">
  77. $('#applyInfo').attr("src", "${applyInfoToken}");
  78. space.vue = new Vue({
  79. el: space.appContent,
  80. data: function() {
  81. return {
  82. oldAuditType: '',
  83. auditType: '',
  84. buttonName: '',
  85. isInitUE: false,
  86. isShowPopup: false,
  87. obj: {
  88. cmsId: undefined,
  89. body: ''
  90. },
  91. }
  92. },
  93. mounted: function () {
  94. },
  95. methods: {
  96. /**
  97. * 初始化 editor 的 CMS
  98. */
  99. initCkCMS: function() {
  100. space.plugin.ckEditor.CMS.init.applyCMS(this.$refs.editor.editor);
  101. this.obj.cmsId = this.$refs.editor.editor.CMS.id;
  102. },
  103. /**
  104. * 显示审核层
  105. */
  106. showAudit(type) {
  107. this.auditType = type;
  108. if (this.auditType == 'reject') {
  109. this.buttonName = '确认退回';
  110. }
  111. else if (this.auditType == 'agree') {
  112. this.buttonName = '确认同意';
  113. }
  114. this.isShowPopup = true;
  115. if (!this.isInitUE) {
  116. var _this = this;
  117. setTimeout(function() {
  118. _this.initCkCMS();
  119. },100);
  120. this.isInitUE = true;
  121. }
  122. if (this.oldAuditType != '' && this.oldAuditType != type) {
  123. this.$refs.editor.editor.setData("");// 清空 editor 内容
  124. }
  125. this.oldAuditType = type;
  126. },
  127. /**
  128. * 流转意见
  129. */
  130. auditOpinion: function() {
  131. space.plugin.layer.open({
  132. url: '@service{ name:`sys_flow_audit_info`, page:`flow_course`, params:`{applyid: "${applyid}", auditid: "${auditid}", tabsType: "auditOpinion", childServiceParamsMap: "${childServiceParamsMap}"}`}@'
  133. });
  134. },
  135. /**
  136. * 流程图
  137. */
  138. flowChart: function() {
  139. space.plugin.layer.open({
  140. url: '@service{ name:`sys_flow_audit_info`, page:`flow_course`, params:`{applyid: "${applyid}", auditid: "${auditid}", tabsType: "flowChart", childServiceParamsMap: "${childServiceParamsMap}"}`}@'
  141. });
  142. }
  143. }
  144. })
  145. space.forms.before = function () {
  146. space.plugin.ckEditor.CMS.submit(space.vue.$refs.editor.editor);
  147. // 审核流程(同意、退回)
  148. var url = "";
  149. if (space.vue.$data.auditType == 'reject') {
  150. url = '${rejectToken}';// 退回
  151. }
  152. else if (space.vue.$data.auditType == 'agree') {
  153. url = '${agreeToken}';// 同意
  154. }
  155. $("#aform").attr('action', url);
  156. }
  157. </script>
  158. </html>