main.vue 722 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <template>
  2. <iframe
  3. width="1626px"
  4. height="900px"
  5. :src="url"
  6. frameborder="0"
  7. scrolling="yes"
  8. v-if="getDashBoardId"
  9. ></iframe>
  10. </template>
  11. <script>
  12. export default {
  13. data() {
  14. return {
  15. getDashBoardId: false,
  16. url: "http://112.126.68.148:50401/analysis/dashboard/show/",
  17. };
  18. },
  19. created() {
  20. this.getRequest("/dashBoard/getDashBoard").then((resp) => {
  21. if (resp) {
  22. if (resp.data !== null) {
  23. this.url = this.url + resp.data.dashBoardId + "/";
  24. console.log(this.url);
  25. this.getDashBoardId = true;
  26. } else {
  27. this.$message.error("看板未发布");
  28. }
  29. }
  30. });
  31. },
  32. };
  33. </script>
  34. <style scoped>
  35. </style>