1001210213_edit.jsp 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <html>
  2. <head>
  3. <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  4. <title>提示</title>
  5. </head>
  6. <body>
  7. <div id="space-content">
  8. <div class="result">
  9. <i :class="${code }"></i>
  10. <p class="result-msg">
  11. ${msg }
  12. </p>
  13. <div style="text-align: center; margin-top: 66px;">
  14. 将在<span style="color:red;">{{seconds}}</span>秒后自动切换下一个审核
  15. </div>
  16. <div style="text-align: center; margin-top: 86px;">
  17. <el-button type="primary" @click="refreshParentWin()">立即切换</el-button>
  18. <el-button @click="closeThis()">关闭</el-button>
  19. </div>
  20. </div>
  21. </div>
  22. </body>
  23. <script type="text/javascript">
  24. space.vue = new Vue({
  25. el: space.appContent,
  26. data() {
  27. return {
  28. success: "spaceicon icon-success",
  29. error: "spaceicon icon-error",
  30. warning: "spaceicon icon-warning",
  31. info: "spaceicon icon-info",
  32. question: "spaceicon icon-question",
  33. seconds: 3,
  34. winInterval: undefined
  35. }
  36. },
  37. mounted: function() {
  38. try {
  39. var _this = this;
  40. if (!this.isBatchAuditMode()) {
  41. window.setTimeout(function() {
  42. _this.closeThis();
  43. }, 120);
  44. return;
  45. }
  46. this.winInterval = setInterval(function() {
  47. if (_this.seconds == 0) {
  48. _this.refreshParentWin();
  49. return;
  50. }
  51. _this.seconds--;
  52. }, 1000);
  53. } catch(e) {
  54. }
  55. },
  56. methods: {
  57. hasRefreshBacklog: function(win) {
  58. return win && win != window
  59. && win.space
  60. && win.space.vue
  61. && typeof win.space.vue.refreshBacklog == "function";
  62. },
  63. isBatchAuditMode: function() {
  64. return this.hasRefreshBacklog(window.parent)
  65. && window.parent.space.vue
  66. && typeof window.parent.space.vue.openAudit == "function"
  67. && window.parent.space.vue.windowSRC != undefined;
  68. },
  69. getLayerParentWin: function() {
  70. try {
  71. var index = space.topWin.layer.getFrameIndex(window.name);
  72. if (space.utils.isNull(index)) {
  73. return window.parentWin;
  74. }
  75. var layerMap = space.topWin.spaceIndex.vars.layerMaps[index];
  76. if (layerMap && layerMap.parentWin) {
  77. return layerMap.parentWin;
  78. }
  79. } catch (e) {
  80. }
  81. return window.parentWin;
  82. },
  83. closeCurrentLayer: function() {
  84. try {
  85. var parentWin = this.getLayerParentWin();
  86. if (parentWin && parentWin.space) {
  87. parentWin.space.vars.refreshFlag = true;
  88. }
  89. } catch (e) {
  90. }
  91. try {
  92. var index = space.topWin.layer.getFrameIndex(window.name);
  93. if (!space.utils.isNull(index)) {
  94. space.topWin.layer.close(index);
  95. return true;
  96. }
  97. } catch (e) {
  98. }
  99. try {
  100. var index2 = space.allFunction.getParentLayerIndex(window);
  101. if (!space.utils.isNull(index2)) {
  102. space.topWin.layer.close(index2);
  103. return true;
  104. }
  105. } catch (e) {
  106. }
  107. return false;
  108. },
  109. /**
  110. * 关闭提示
  111. */
  112. closeThis: function() {
  113. var msg = '${msg}';
  114. var code = "${code}";
  115. try {
  116. if(code == "success") {
  117. space.topWin.spaceIndex.info.success(msg);
  118. } else if(code == "error") {
  119. space.topWin.spaceIndex.info.error(msg);
  120. } else if(code == "warning") {
  121. space.topWin.spaceIndex.info.warning(msg);
  122. } else if(space.utils.isNull(code)) {
  123. space.topWin.spaceIndex.info.info(msg);
  124. }
  125. } catch (e) {
  126. }
  127. if (this.closeCurrentLayer()) {
  128. return;
  129. }
  130. try {
  131. space.allFunction.closeDialog(true, '${layerIndex }');
  132. } catch (e) {
  133. }
  134. },
  135. /**
  136. * 刷新父窗口
  137. */
  138. refreshParentWin: function() {
  139. window.clearInterval(this.winInterval);
  140. if (!this.isBatchAuditMode()) {
  141. this.closeThis();
  142. return;
  143. }
  144. window.parent.space.vue.refreshBacklog();
  145. }
  146. }
  147. })
  148. </script>
  149. </html>