gqImg.vue 864 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <div class="iframe-wrap" v-if="gqPath">
  3. <iframe id="gqImgFrame" :src="'/geminiRender/render_dxf_project.html?path=/static'+gqPath" frameborder="none" :onload="loadDone"/>
  4. </div>
  5. </template>
  6. <script>
  7. import {chartMap} from '@/api/dashboard-json'
  8. export default {
  9. name: 'GqImg',
  10. props: {
  11. gqPath: {
  12. type: String,
  13. default: null
  14. }
  15. },
  16. data() {
  17. return {
  18. }
  19. },
  20. created() {
  21. window['gqImgIs'] = this
  22. },
  23. mounted() {
  24. // this.$refs.gqImgFrame.onload = () => {
  25. // this.loadDone()
  26. // }
  27. },
  28. methods: {
  29. loadDone() {
  30. console.log('loadDone')
  31. }
  32. }
  33. }
  34. </script>
  35. <style scoped lang="scss">
  36. .iframe-wrap {
  37. width: 100%;
  38. height: calc(100vh - 220px);
  39. iframe {
  40. width: 100%;
  41. height: 100%;
  42. }
  43. }
  44. ::v-deep {
  45. #container {
  46. background-image: none !important;
  47. }
  48. }
  49. </style>