report-container.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 v-if="reportType" id="reportContainer" style="width: 100%; height: 100vh; padding: 0">
  15. </div>
  16. </el-dialog>
  17. </template>
  18. <script>
  19. export default {
  20. data() {
  21. return {
  22. visible: false,
  23. refreshFun: null,
  24. reportType:false, // 通过判断处理数据
  25. };
  26. },
  27. props: {
  28. switchDialog: {
  29. type: Boolean,
  30. default: false
  31. },
  32. reportName: {
  33. type: String
  34. },
  35. reportId: {
  36. type: String
  37. },
  38. },
  39. methods: {
  40. cellStyle() {
  41. return "padding:0;height:40px;";
  42. },
  43. onClose() {
  44. this.visible = false;
  45. },
  46. showContainer(initFun, refreshFun) {
  47. if (typeof initFun == 'function') {
  48. initFun()
  49. }
  50. this.refreshFun = refreshFun
  51. this.reportType = true
  52. this.visible = true
  53. console.log(window.reportContainer)
  54. console.log('showContainer')
  55. },
  56. hideContainer() {
  57. if (typeof this.refreshFun == 'function') {
  58. this.refreshFun()
  59. }
  60. this.reportType = false
  61. this.visible = false
  62. console.log('hideContainer')
  63. }
  64. }
  65. }
  66. </script>
  67. <style lang="scss" scoped>
  68. /deep/.el-dialog__header {
  69. display: none;
  70. }
  71. </style>