123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 |
- <template src="./viewShell.html">
- </template>
- <script>
- const util = require('@/utils/util.js').default;
-
-
-
- import viewlayout from'@/components/newBottomCom/viewlayout/viewlayout.vue';
- import viewCareful from'@/components/newBottomCom/viewCareful/viewCareful.vue';
-
-
-
-
- export default {
- data: function() {
- return {
- floorList:[
- {
- text:'1F',
- },
- {
- text:'2F',
- }
- ],
- floorId:0,
- shellHeight:'200rem',
- isShare: false,
- shareVideoItem:null,
- styleType:1,
- seedItem:null,
- showSignscoll:true,
- }
- },
- props:{
- overChange: {
- type: Boolean,
- default: false,
- },
- pageType: {
- type: [String, Number],
- default: 1,
- },
- curHouseType: {
- type: [String, Number],
- default: '',
- },
- houseList: {
- type: Array,
- default: () => {
- return []
- }
- },
- houseObj: {
- type: Object,
- default: () => {
- return null
- }
- },
- spaceObj: {
- type: Object,
- default: () => {
- return null
- }
- },
- },
- watch: {
- curHouseType: {
- handler(newVal) {
- if (newVal) {
-
- console.warn("***curHouseType-change***",newVal)
- this.initData()
- }
- },
- },
- styleType: {
- handler(newVal,oldVal) {
- if (newVal) {
- console.warn("***styleType***",newVal,oldVal)
- let _starHeight = parseInt(this.shellHeight);
- let _endHeight = 380;
- if(this.inter){
- return false;
- }
- if(newVal==1){
- this.shellHeight = '200rem';
- _endHeight = 200;
- }else if(newVal==2){
- this.shellHeight = '800rem';
- _endHeight = 800;
- }else if(newVal==3){
- this.shellHeight = '200rem';
- _endHeight = 200;
- }
-
- if(this.$parent && this.$parent.hasOwnProperty('canvasHeight')){
- this.$parent.gradientResize(1,_starHeight,_endHeight)
- }
- this.$parent.styleType = newVal;
- }
- },
- },
-
-
-
-
-
-
-
-
- },
- components:{
- viewlayout,
- viewCareful,
-
- },
-
- async mounted() {
-
- if(this.pageType==2){
- this.shellHeight = '448rem';
- }
- console.warn("***viewShell***",this.houseList)
- },
-
- onPageShow: function() {
-
- },
-
- onPageHide: function() {
-
- },
- methods:{
- initData(){
- let houseList = this.houseList;
-
-
- let curHouseType = this.curHouseType || houseList[0].spaceStructure;
-
- let curData = houseList.find(item=>{
- return item.spaceStructure == curHouseType;
- })
- this.floorList = [];
- curData.layoutStruct && curData.layoutStruct.forEach(item=>{
- this.floorList.push(item);
- })
- console.warn("***floorList-init***",this.floorList)
- if(this.floorList && this.floorList[0]){
- this.floorId = this.floorList[0].id;
- this.$emit("curHouseFloorChange", this.floorList[0]);
- }
- },
- catchTouchMove: function() {
- return false;
- },
-
-
-
-
- streamRecord(){
- this.showSignscoll = false;
- },
-
- streamRecordEnd(){
- this.showSignscoll = true;
- },
-
- floorChange(item){
- if(this.floorId==item.id){
- return false;
- }
- this.floorId = item.id;
- let param = {
- type: 'CLK',
- clkId: 'clk_2cmina_23080410',
- clkName: 'floorswitching_clk',
- clkParams: {
- locusName: "楼层切换",
- }
- };
- util.trackRequest(param);
- this.$emit("curHouseFloorChange", item);
- },
-
- seedChange(item){
- console.warn("***seedChange***",item)
- this.seedItem = item;
- this.$emit("curHouseTypeChange", item);
- },
-
- zoomInOut(){
- if(this.styleType == 2){
- this.styleType = 1;
- }else if(this.styleType == 1){
- this.styleType = 2;
- }
- },
-
- upCom(){
- if(this.styleType==1 || this.styleType==3){
- this.styleType = 2;
- }
- },
- curSpaceChange(data){
- this.$emit("curSpaceChange", data);
- },
-
- upScrollOrDown(){
- if(this.pageType!=1){
- return false
- }
- if(this.styleType==1 || this.styleType==3){
- this.styleType = 2;
- }
- else if(this.styleType==2){
- this.styleType = 1;
- }
- },
-
- upScroll(){
- if(this.pageType!=1){
- return false
- }
- if(this.styleType==1 || this.styleType==3){
- this.styleType = 2;
- }
- },
-
- downScroll(){
- if(this.pageType!=1){
- return false
- }
- let carefulList = this.$refs.viewCareful && this.$refs.viewCareful.carefulList ? JSON.parse(JSON.stringify(this.$refs.viewCareful.carefulList)) : {};
- if(this.styleType==2 || this.styleType==3){
- this.styleType = 1;
- let trackparam = {
- type: 'CLK',
- clkId: 'clk_2cmina_23080404',
- clkName: 'adjust_back_clk',
- clkParams: {
- locusName: "精细调整返回 /下划线",
- userparamter:carefulList,
- }
- };
- util.trackRequest(trackparam);
- }
- },
- mynavigateFuc(e) {
- if (e) {
- let param = {
- type: 'CLK',
- clkId: 'clk_2cmina_23080408',
- clkName: 'WeCom_clk',
- clkParams: {
- locusName: "联系定制",
- }
- };
- util.trackRequest(param);
- if(window.__wxjs_environment === 'miniprogram'){
- wx.miniProgram.navigateTo({url: '/pages/transfer/transfer?event=openCustomerServiceChat&houseId='+this.$store.state.houseId})
- }else{
- this.$message.warning("敬请期待");
- }
- }
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- @import "./viewShell.scss";
-
- </style>
|