index.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <div :style="pageHeight">
  3. <iframe :src="url" width="100%" height="100%" frameborder="0" scrolling="auto"></iframe>
  4. </div>
  5. </template>
  6. <script>
  7. export default {
  8. data() {
  9. return {
  10. url: null
  11. };
  12. },
  13. computed: {
  14. pageHeight() {
  15. return {
  16. 'height': document.documentElement.clientHeight - 80 + 'px'
  17. }
  18. },
  19. },
  20. watch: {
  21. $route: {
  22. handler: function (route) {
  23. this.url = null
  24. if (route.query.name) {
  25. if (route.query.name === 'xinzhuang') {
  26. this.url =
  27. 'http://172.16.12.101:8083/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$4a71c6bc1fd34da7843c6eb2a7b3aee3&id=admin&pw=admin'
  28. } else if (route.query.name === 'jiliangshan') {
  29. this.url =
  30. 'http://172.16.12.101:8083/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$621b7c14e4aa4a0483a8e577d8dc4cff&id=admin&pw=admin'
  31. } else if (route.query.name === 'zuozhuang') {
  32. this.url =
  33. 'http://172.16.12.101:8083/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$36292212f28b4702af2c4aa01a62bdc1&id=admin&pw=admin'
  34. } else if (route.query.name === 'fanshigou') {
  35. this.url =
  36. 'http://172.16.12.101:8083/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$2320f3ed77e740d6bb1b66b1f7062ad1&id=admin&pw=admin'
  37. } else if (route.query.name === 'caoshanliang') {
  38. this.url =
  39. 'http://172.16.12.101:8083/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$3dc29db548d54d289e58bf4a30dfb026&id=admin&pw=admin'
  40. } else if (route.query.name === 'leijiashan') {
  41. this.url =
  42. 'http://172.16.12.101:8083/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$5ebbf0905b22448cbd9834ec6560fd26&id=admin&pw=admin'
  43. }
  44. } else {
  45. let str = ''
  46. if (window.location.origin.indexOf('172.16.12.101') != -1) {
  47. str =
  48. 'http://172.16.12.101:8083/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$c61354961de740f1acec8fc664034f81&id=admin&pw=admin'
  49. } else {
  50. str =
  51. 'http://123.60.219.66:8083/bi/ebibase/showreport.do?resid=EANA$2$2$1$041302f30436412d9ba78f161a6575f0$e97782eaa9444e11aa1b33c78d9dca1f&id=admin&pw=admin'
  52. }
  53. this.url = str
  54. }
  55. },
  56. immediate: true
  57. }
  58. }
  59. };
  60. </script>