report-container-los.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <el-dialog
  3. :visible.sync="visible"
  4. top="0"
  5. width="100%"
  6. height="100%"
  7. style="width: 100%; height: 100%;"
  8. :before-close="onClose"
  9. :close-on-click-modal="false"
  10. append-to-body
  11. class="el-dialogDeep"
  12. :fullscreen="true"
  13. >
  14. <div id="reportContainer" style="width: 100%; height: 78vh; padding: 0"></div>
  15. <div class="slotDiv">
  16. <div style="width: 80%;padding: 15px;box-sizing: border-box;box-shadow:1px 2px 8px rgba(0,0,0,.5)">
  17. <slot></slot>
  18. </div>
  19. </div>
  20. </el-dialog>
  21. </template>
  22. <script>
  23. export default {
  24. data() {
  25. return {
  26. visible: false,
  27. refreshFun: null,
  28. };
  29. },
  30. props: {
  31. switchDialog: {
  32. type: Boolean,
  33. default: false
  34. },
  35. reportName: {
  36. type: String
  37. },
  38. reportId: {
  39. type: String
  40. },
  41. },
  42. methods: {
  43. cellStyle() {
  44. return "padding:0;height:40px;";
  45. },
  46. onClose() {
  47. this.visible = false;
  48. },
  49. showContainer(initFun, refreshFun) {
  50. if (typeof initFun == 'function') {
  51. initFun()
  52. }
  53. this.refreshFun = refreshFun
  54. this.visible = true
  55. console.log(window.reportContainer)
  56. console.log('showContainer')
  57. },
  58. hideContainer() {
  59. if (typeof this.refreshFun == 'function') {
  60. this.refreshFun()
  61. }
  62. this.visible = false
  63. console.log('hideContainer')
  64. }
  65. }
  66. }
  67. </script>
  68. <style lang="scss" scoped>
  69. /deep/.el-dialog__header {
  70. display: none;
  71. }
  72. .slotDiv {
  73. width: 100%;
  74. margin: 10px 0;
  75. height: 20vh;
  76. position: absolute;
  77. bottom: 0;
  78. left: 50%;
  79. transform: translateX(-50%);
  80. display: flex;
  81. align-items: center;
  82. justify-content: center;
  83. z-index: 999;
  84. }
  85. </style>