index.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. // window.location.origin.indexOf('172.16.12.101') != -1
  26. if (route.query.name === "xinzhuang") {
  27. this.url =
  28. `${
  29. this.reportBaseUrl || "http://172.16.12.101:8083"
  30. }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$4a71c6bc1fd34da7843c6eb2a7b3aee3&id=admin&pw=admin`;
  31. } else if (route.query.name === "jiliangshan") {
  32. this.url =
  33. `${
  34. this.reportBaseUrl || "http://172.16.12.101:8083"
  35. }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$621b7c14e4aa4a0483a8e577d8dc4cff&id=admin&pw=admin`;
  36. } else if (route.query.name === "zuozhuang") {
  37. this.url =
  38. `${
  39. this.reportBaseUrl || "http://172.16.12.101:8083"
  40. }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$36292212f28b4702af2c4aa01a62bdc1&id=admin&pw=admin`;
  41. } else if (route.query.name === "fanshigou") {
  42. this.url =
  43. `${
  44. this.reportBaseUrl || "http://172.16.12.101:8083"
  45. }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$2320f3ed77e740d6bb1b66b1f7062ad1&id=admin&pw=admin`;
  46. } else if (route.query.name === "caoshanliang") {
  47. this.url =
  48. `${
  49. this.reportBaseUrl || "http://172.16.12.101:8083"
  50. }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$3dc29db548d54d289e58bf4a30dfb026&id=admin&pw=admin`;
  51. } else if (route.query.name === "leijiashan") {
  52. this.url =
  53. `${
  54. this.reportBaseUrl || "http://172.16.12.101:8083"
  55. }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$5ebbf0905b22448cbd9834ec6560fd26&id=admin&pw=admin`;
  56. }
  57. }
  58. },
  59. immediate: true,
  60. },
  61. },
  62. };
  63. </script>