index.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <div class="page-main">
  3. <!-- <el-button @click="changePage">切换</el-button> -->
  4. <iframe-page v-if="showIframe" :path="path" />
  5. </div>
  6. </template>
  7. <script>
  8. import IframePage from "@/components/IframePage";
  9. export default {
  10. components: { IframePage },
  11. data() {
  12. return {
  13. path: "main",
  14. basePath: ISMSAdminWeb.path,
  15. showIframe: true,
  16. };
  17. },
  18. watch: {
  19. "$route.query.path": {
  20. handler(newVal, oldVal) {
  21. this.showIframe = false;
  22. if (!newVal) {
  23. // this.path = ISMSAdminWeb.path + "main";
  24. this.path = this.basePath + "video/cameraConfig";
  25. } else {
  26. // this.path = ISMSAdminWeb.path + newVal;
  27. this.path = this.basePath + newVal;
  28. }
  29. this.$nextTick(() => {
  30. this.showIframe = true;
  31. });
  32. },
  33. deep: true,
  34. immediate: true,
  35. },
  36. },
  37. methods: {
  38. // http://localhost:9901/#/page1?path=http://localhost:9528/#/main
  39. // http://localhost:9901/#/page1?path=http://localhost:9528/#/system/menu
  40. changePage() {
  41. this.path = ISMSAdminWeb.path + "system/menu";
  42. },
  43. },
  44. };
  45. </script>
  46. <style lang="less" scoped>
  47. .page-main {
  48. width: 100%;
  49. height: 100%;
  50. padding: 100px 30px 0;
  51. color: #fff;
  52. font-size: 32px;
  53. display: flex;
  54. justify-content: center;
  55. align-items: center;
  56. // background: #001012;
  57. // background: ;
  58. pointer-events: auto;
  59. // position: absolute;
  60. // z-index: 3000; // loading层是2000 设置高一些,下拉菜单会盖住loading层
  61. }
  62. </style>