webgl_rxdz_roam.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template src="./webgl_rxdz_roam.html">
  2. </template>
  3. <script>
  4. import {getStorage} from '@/utils/localStorage';
  5. var requestId = "";
  6. const util = require('@/utils/util.js').default;
  7. import viewMask from'@/components/newBottomCom/viewMask/viewMask.vue';
  8. import commonPageMethod from '@/mixins/commonPageMethod.js';
  9. // import commonPageMethod from '@/common/commonPageMethod.js';
  10. // const app = getApp(); //获取应用实例
  11. export default {
  12. components:{viewMask},
  13. mixins:[commonPageMethod],
  14. /**
  15. * 页面的初始数据
  16. */
  17. data() {
  18. return {
  19. pvCurPageName: "room_show",
  20. locusBehaviorName: "房间展示",
  21. pvCurPageParams: null,
  22. houseId: "",
  23. pvId: 'p_2cmina_23080402',
  24. canvas:null,
  25. navbar: {
  26. showCapsule: 1,
  27. title: '客厅',
  28. titleColor: '#000',
  29. navPadding: 0,
  30. navPaddingBg:'transparent',
  31. navBarColor: 'transparent',
  32. navBackColor: 'transparent',
  33. haveCallback: true, // 如果是 true 会接手 navbarBackClk
  34. fromShare: false,
  35. fromProject: 0,
  36. shareToken: "",
  37. pageName: this.pvCurPageName,
  38. },
  39. id:'',// 户型编号
  40. canvasHeight:'',
  41. }
  42. },
  43. mounted(options) {
  44. var that = this;
  45. // alert("JavaScript 堆大小限制: "+performance.memory.jsHeapSizeLimit
  46. // +"\n已使用的 JavaScript 堆大小: "+performance.memory.usedJSHeapSize
  47. // +"\nJavaScript 堆的总大小: "+performance.memory.totalJSHeapSize);
  48. console.warn("***webgl_rxdz_roam-options***",this.$route.query)
  49. let screenWidth = window.screen.width;
  50. let screenHeight = window.screen.height;
  51. if(window.innerWidth && window.screen.width){
  52. screenWidth = Math.min(window.innerWidth,window.screen.width)
  53. }
  54. if(window.innerHeight && window.screen.height){
  55. screenHeight = Math.min(window.innerHeight,window.screen.height)
  56. }
  57. let unit = screenWidth / 750;//单位rpm 对应 px 的值
  58. this.canvasHeight = screenHeight - (600 * unit) + (40 * unit);
  59. },
  60. // computed: {
  61. // curHouseObj() {
  62. // return this.$store.state.curHouseObj;
  63. // },
  64. // wallList() {
  65. // return this.$store.state.wallList;
  66. // },
  67. // },
  68. methods: {
  69. navbarBackClk() {
  70. if(!this.$refs.viewMask){
  71. this.$router.go(-1);
  72. return false
  73. }
  74. if (this.$refs.viewMask.showAIImage) {
  75. this.$refs.viewMask.showOrHideWebGl();//隐藏显示的AI生图
  76. // if(this.currentActor.userIndex!=this.defaulIndex){//当前不是默认视角了
  77. this.switchActor(this.defaulIndex);//切换到默认视角
  78. // }
  79. } else {
  80. this.$router.go(-1);
  81. }
  82. },
  83. clearHandle(){
  84. this.clearEvent();
  85. },
  86. save(){
  87. this.$refs.viewMask.save();//下载
  88. },
  89. }
  90. }
  91. </script>
  92. <style lang="scss" scoped>
  93. @import "./webgl_rxdz_roam.scss";
  94. /* @import "@/common/css/common.css"; */
  95. </style>