index.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template>
  2. <div :style="pageHeight">
  3. <iframe
  4. :src="url"
  5. width="100%"
  6. height="100%"
  7. frameborder="0"
  8. scrolling="auto"
  9. ></iframe>
  10. </div>
  11. </template>
  12. <script>
  13. export default {
  14. data() {
  15. return {
  16. url: null,
  17. };
  18. },
  19. computed: {
  20. pageHeight() {
  21. return {
  22. height: document.documentElement.clientHeight - 80 + "px",
  23. };
  24. },
  25. },
  26. watch: {
  27. $route: {
  28. handler: function (route) {
  29. this.url = null;
  30. if (route.query.name) {
  31. if (route.query.name === "xinzuo") {
  32. this.url = `${
  33. this.reportBaseUrl || "http://172.16.12.101:8083"
  34. }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$d169ca9e0c974a6299b49dc752446ee2&id=admin&pw=admin`;
  35. } else if (route.query.name === "jiliangshan") {
  36. this.url = `${
  37. this.reportBaseUrl || "http://172.16.12.101:8083"
  38. }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$839ccb29a1e84da48b21c659423c0175&id=admin&pw=admin`;
  39. } else if (route.query.name === "fanshigou") {
  40. this.url = `${
  41. this.reportBaseUrl || "http://172.16.12.101:8083"
  42. }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$03e83149008940daa72311823bd381da&id=admin&pw=admin`;
  43. } else if (route.query.name === "caoshanliang") {
  44. this.url = `${
  45. this.reportBaseUrl || "http://172.16.12.101:8083"
  46. }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$33ab21248a7e49b683e5891b4ff6dad6&id=admin&pw=admin`;
  47. } else if (route.query.name === "leijiashan") {
  48. this.url = `${
  49. this.reportBaseUrl || "http://172.16.12.101:8083"
  50. }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$28c6ac8488f841f6b8270cb902aad1ce&id=admin&pw=admin`;
  51. }
  52. // if (window.location.origin.indexOf('172.16.12.101') != -1) {
  53. // if (route.query.name === 'xinzuo') {
  54. // this.url =
  55. // 'http://172.16.12.101:8083/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$d169ca9e0c974a6299b49dc752446ee2&id=admin&pw=admin'
  56. // } else if (route.query.name === 'jiliangshan') {
  57. // this.url =
  58. // 'http://172.16.12.101:8083/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$839ccb29a1e84da48b21c659423c0175&id=admin&pw=admin'
  59. // } else if (route.query.name === 'fanshigou') {
  60. // this.url =
  61. // 'http://172.16.12.101:8083/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$03e83149008940daa72311823bd381da&id=admin&pw=admin'
  62. // } else if (route.query.name === 'caoshanliang') {
  63. // this.url =
  64. // 'http://172.16.12.101:8083/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$33ab21248a7e49b683e5891b4ff6dad6&id=admin&pw=admin'
  65. // } else if (route.query.name === 'leijiashan') {
  66. // this.url =
  67. // 'http://172.16.12.101:8083/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$28c6ac8488f841f6b8270cb902aad1ce&id=admin&pw=admin'
  68. // }
  69. // } else {
  70. // if (route.query.name === 'xinzuo') {
  71. // this.url =
  72. // 'http://10.127.7.196:8083/bi/ebibase/showreport.do?resid=EANA$2$2$1$041302f30436412d9ba78f161a6575f0$d169ca9e0c974a6299b49dc752446ee2&id=admin&pw=admin'
  73. // } else if (route.query.name === 'jiliangshan') {
  74. // this.url =
  75. // 'http://10.127.7.196:8083/bi/ebibase/showreport.do?resid=EANA$2$2$1$041302f30436412d9ba78f161a6575f0$839ccb29a1e84da48b21c659423c0175&id=admin&pw=admin'
  76. // } else if (route.query.name === 'fanshigou') {
  77. // this.url =
  78. // 'http://10.127.7.196:8083/bi/ebibase/showreport.do?resid=EANA$2$2$1$041302f30436412d9ba78f161a6575f0$03e83149008940daa72311823bd381daid=admin&pw=admin'
  79. // } else if (route.query.name === 'caoshanliang') {
  80. // this.url =
  81. // 'http://10.127.7.196:8083/bi/ebibase/showreport.do?resid=EANA$2$2$1$041302f30436412d9ba78f161a6575f0$33ab21248a7e49b683e5891b4ff6dad6&id=admin&pw=admin'
  82. // } else if (route.query.name === 'leijiashan') {
  83. // this.url =
  84. // 'http://10.127.7.196:8083/bi/ebibase/showreport.do?resid=EANA$2$2$1$041302f30436412d9ba78f161a6575f0$28c6ac8488f841f6b8270cb902aad1ce&id=admin&pw=admin'
  85. // }
  86. // }
  87. }
  88. },
  89. immediate: true,
  90. },
  91. },
  92. };
  93. </script>