zjs_project 1 سال پیش
والد
کامیت
cabb4fcd88
27فایلهای تغییر یافته به همراه4087 افزوده شده و 445 حذف شده
  1. 4 2
      src/components/newBottomCom/viewCareful/viewCareful.vue
  2. 13 7
      src/components/newBottomCom/viewMask/viewMask.html
  3. 11 2
      src/components/newBottomCom/viewMask/viewMask.scss
  4. 39 80
      src/components/newBottomCom/viewMask/viewMask.vue
  5. 33 0
      src/components/newBottomCom/viewPlot/viewPlot.html
  6. 166 0
      src/components/newBottomCom/viewPlot/viewPlot.scss
  7. 162 0
      src/components/newBottomCom/viewPlot/viewPlot.vue
  8. 12 7
      src/components/newBottomCom/viewShell/viewShell.html
  9. 58 64
      src/components/newBottomCom/viewShell/viewShell.vue
  10. 14 7
      src/components/newBottomCom/viewlayout/viewlayout.html
  11. 133 227
      src/components/newBottomCom/viewlayout/viewlayout.vue
  12. 34 3
      src/mixins/floorMethod.js
  13. 16 2
      src/mixins/loadModel.js
  14. 36 0
      src/pages/webgl_rxdz_houseList/webgl_rxdz_houseList.html
  15. 156 0
      src/pages/webgl_rxdz_houseList/webgl_rxdz_houseList.scss
  16. 168 0
      src/pages/webgl_rxdz_houseList/webgl_rxdz_houseList.vue
  17. 1 1
      src/pages/webgl_rxdz_roam/webgl_rxdz_roam.html
  18. 22 6
      src/pages/webgl_rxdz_roam/webgl_rxdz_roam.vue
  19. 2 2
      src/pages/webgl_rxdz_role/webgl_rxdz_role.html
  20. 54 29
      src/pages/webgl_rxdz_role/webgl_rxdz_role.vue
  21. 37 0
      src/pages/webgl_rxdz_test/webgl_rxdz_test.html
  22. 205 0
      src/pages/webgl_rxdz_test/webgl_rxdz_test.scss
  23. 2685 0
      src/pages/webgl_rxdz_test/webgl_rxdz_test.vue
  24. 18 1
      src/router/index.js
  25. 1 1
      src/services/requestConfig.js
  26. 3 0
      src/static/spaceTypesIE.js
  27. 4 4
      src/utils/util.js

+ 4 - 2
src/components/newBottomCom/viewCareful/viewCareful.vue

@@ -4,6 +4,7 @@
 <script>
 	// const util = require('@/static/utils/util.js');
 	const config = require('@/services/urlConfig.js');
+	import spaceTypes from '@/static/spaceTypesIE.js';
 	// import Bus from '@/common/bus';
 	// import commonMethod from '@/common/commonMethod.js';
 	// import requestConfig from '@/static/lib/requestConfig';
@@ -76,9 +77,10 @@
 					if(item.hasOwnProperty('spaceWidthMax') && item.hasOwnProperty('spaceHeightMax')){
 						maxArea = parseFloat((item.spaceWidthMax * item.spaceHeightMax) / 10000).toFixed(1);
 					}
-					let text = item.spaceName;
+					//修改为显示空间类型名称
+					let text = spaceTypes[item.spaceType - 1] || item.spaceName;
 					// console.warn("***carefulList-change1***", item,item.spaceType)
-					if(text && !item.isSizeLock){//楼梯不显示
+					if(item.spaceName && !item.isSizeLock){//楼梯不显示
 						let data = {
 							spaceId:item.spaceId,
 							index:this.carefulList.length,

+ 13 - 7
src/components/newBottomCom/viewMask/viewMask.html

@@ -31,10 +31,10 @@
 			<img class="compareIcon" src="https://dm.static.elab-plus.com/miniProgram/space1/compareAI_btn.png" mode="widthFix" />
 		</div>
 		<!-- 切换视角 -->
-		<div class="change-angle columns" @click.stop="switchActor" >
+		<!-- <div class="change-angle columns" @click.stop="switchActor" >
 			<img class="camera" src="https://dm.static.elab-plus.com/miniProgram/iconfont/camera.png" mode="widthFix"/>
 			视角切换
-		</div>
+		</div> -->
 	</div>
 	
 	<!-- 左侧按钮  -->
@@ -65,9 +65,15 @@
 		<!-- 精装修 -->
 		<div class="aiEdit">
 			<!-- tab视图 -->
-			<div class="tab-view rows">
+			<!-- <div class="tab-view rows">
 				<div class='left btn rows justify-center' :class="{active:modelType==2}" @click="changeModel(2)">精准设计</div>
 				<div class='right btn rows justify-center' :class="{active:modelType==1}" @click="changeModel(1)">创意设计</div>
+			</div> -->
+			<div class="tab-view">
+				<div class="content rows">
+					<div class="btn rows justify-center" v-for="(item, idx) in datalist" @click="changeSpace(item)"
+					:class="{active:spaceObj.spaceId==item.spaceId}" :key="idx">{{item.spaceType | spaceTypeFilter}}</div>
+				</div>
 			</div>
 			<div class="aiStyleList rows">
 				<div class="styleItem" v-for="(item, idx) in styleList" :key="idx" :id="'styleItem'+idx"
@@ -91,11 +97,11 @@
 				</div>
 			</div>
 			<div class="btn-list rows rows-between" >
-				<div class="btn houseType rows justify-center up1" @click.stop="goback">
-					<div class="iconfont icon-huxingjianshang style1"></div>返回户型
+				<div class="btn AiBtn rows justify-center up1" @click.stop="aiSubmit(1)">
+					<div class="iconfont icon-a-lujing35039 style1"></div>{{aiImagesList && aiImagesList.length>0?'继续生成':'开始设计'}}
 				</div>
-				<div class="btn AiBtn rows justify-center up2" @click.stop="aiSubmit(1)">
-					<div class="iconfont icon-a-lujing35039 style1"></div>{{aiImagesList && aiImagesList.length>0?'继续设计':'开始设计'}}
+				<div class="btn houseType rows justify-center up2" @click.stop="goback">
+					下一步
 				</div>
 			</div>
 		</div>

+ 11 - 2
src/components/newBottomCom/viewMask/viewMask.scss

@@ -140,9 +140,17 @@
 	// align-items: center;
 	margin-top:30px;
 	.tab-view{
+		position: relative;
 		margin-bottom: 30px;
+		overflow-x: auto;
+		width: 100%;
+		height: 56px;
+		.content{
+			position: absolute;
+		}
 		.btn{
-			width: 148px;
+			// width: 148px;
+			width: max-content;
 			height: 56px;
 			border-radius: 16px;
 			background: transparent;
@@ -151,6 +159,7 @@
 			font-size: 30px;
 			color: #4e4e4e;
 			margin-right:40px;
+			padding: 0px 16px;
 		}
 		.btn.active{
 			background: #343434;
@@ -292,7 +301,7 @@
 	}
 	.up1{
 		color: rgba(245, 145, 39, 1);
-		background-image:linear-gradient(124deg, rgba(245, 201, 82, 0.4) 0%, rgba(239, 149, 57, 0.4) 100%);
+		background-image:linear-gradient(124deg, rgba(245, 201, 82, 0.2) 0%, rgba(239, 149, 57, 0.2) 100%);
 	}
 	.up2{
 		color: rgba(255, 255, 255, 1);

+ 39 - 80
src/components/newBottomCom/viewMask/viewMask.vue

@@ -4,8 +4,12 @@
 <script>
 	const util = require('@/utils/util.js').default;
 	import { MessageBox } from 'mint-ui';
+	import spaceTypes from '@/static/spaceTypesIE.js';
 	// const config = require('@/services/url$config.js');
 	import touchHandle from '@/mixins/touchHandle.js';
+	import {
+		getStorage,
+	} from '@/utils/localStorage';
 	// import requestConfig from '@/static/lib/requestConfig';
 	// const app = getApp(); //获取应用实例
 	export default {
@@ -34,79 +38,7 @@
 				count:0,
 				random:1,
 				// disableAble:false,
-				spaceTypes: [{
-						icon: "",
-						title: "卧室",
-						subtitle: "0个布局",
-						englishRemark: "bedroom",
-					},
-					{
-						icon: "",
-						title: "客厅",
-						subtitle: "0个布局",
-						englishRemark: "living room",
-					},
-					{
-						icon: "",
-						title: "餐厅",
-						subtitle: "0个布局",
-						englishRemark: "dinning room",
-					},
-					{
-						icon: "",
-						title: "厨房",
-						subtitle: "0个个布局",
-						englishRemark: "kitchen",
-					},
-					{
-						icon: "",
-						title: "玄关",
-						subtitle: "0个布局",
-						englishRemark: "hallway",
-					},
-					{
-						icon: "",
-						title: "卫生间",
-						subtitle: "0个布局",
-						englishRemark: "bathroom",
-					},
-					{
-						icon: "",
-						title: "衣帽间",
-						subtitle: "0个布局",
-						englishRemark: "walkin closet",
-					},
-					{
-						icon: "",
-						title: "收纳",
-						subtitle: "0个布局",
-						englishRemark: "storage room",
-					},
-					{
-						icon: "",
-						title: "阳台",
-						subtitle: "0个布局",
-						englishRemark: "balcony",
-					},
-					{
-						icon: "",
-						title: "飘窗",
-						subtitle: "0个布局",
-						englishRemark: "bay window",
-					},
-					{
-						icon: "",
-						title: "链接空间",
-						subtitle: "0个布局",
-						englishRemark: "connecting space between two rooms",
-					},
-					{
-						icon: "",
-						title: "自定义",
-						subtitle: "0个布局",
-						englishRemark: "room",
-					},
-				],
+				
 				myloading:false,
 				loadingMsg:'',
 				screenWidth:0,
@@ -230,6 +162,7 @@
 				],
 				dialogVisible: false,
 				dialogAIVisible: false,
+				datalist:[],
 			}
 		},
 		props:{
@@ -237,6 +170,10 @@
 				type: Object,
 				default: null,
 			},
+			spaceList: {
+				type: [Array ,Object],
+				default: [],
+			},
 		},
 		watch: {
 			spaceObj(newVal, oldVal) {
@@ -250,6 +187,31 @@
 				// ).toFixed(2);
 				// this.getOverallArrangementDetailsList();
 			},
+			spaceList(newVal, oldVal) {
+				if (newVal == null) {
+					return;
+				}
+				console.log("当前空间数据spaceList-watch:", newVal);
+				if(newVal && newVal.length>0){
+					this.datalist = [];
+					newVal.forEach(it=>{
+						if(it.spaceName && !it.isSizeLock){
+							this.datalist.push(it);
+						}
+					})
+				}
+				
+				// this.curSpaceArea = parseFloat(
+				// 	(newVal.spaceWidth * newVal.spaceHeight) / 10000
+				// ).toFixed(2);
+				// this.getOverallArrangementDetailsList();
+			},
+		},
+		filters:{
+		    spaceTypeFilter(type){
+				let name = spaceTypes[type - 1];
+		        return name || '-'
+		    },
 		},
 		mounted() {//组件挂载时事件
 			// console.warn("***mounted-nav***",this.seedItem)
@@ -278,13 +240,6 @@
 				this.screenHeight = Math.min(window.innerHeight,window.screen.height)
 			}
 		},
-		// 页面被展示时执行
-		onPageShow: function() {  
-			
-		},
-		//页面被隐藏时执行
-        onPageHide: function() {
-        },
 		beforeDestroy:function(){
 			console.warn("***beforeDestroy***");//更新到页面上的数据
 			this.stopInterval();
@@ -303,6 +258,10 @@
 				this.checked = this.aiImagesList[this.currentIndex].checked;
 				console.warn("***swiperChangeImg***",this.checked);//更新到页面上的数据
 			},
+			//切换空间
+			changeSpace(item){
+				this.$parent.changeSpace(item.spaceId);
+			},
 			//视角切换
 			switchActor(){
 				// this.$parent.clearHandle()

+ 33 - 0
src/components/newBottomCom/viewPlot/viewPlot.html

@@ -0,0 +1,33 @@
+<!-- 布局切换操作视图 -->
+<div class="plot-view">
+	<div class="title rows justify-center">选择要更换成的功能空间</div>
+	<div class="close rows justify-center" @click="closeHandle">
+		<div class="iconfont icon-close"></div>
+	</div>
+	<!-- 布局空间列表数据 -->
+	<div class="swiper-view">
+		<div class="tab-content rows flex-start">
+			<div @click="tabIndex=index" class="tab-item columns"
+				:class="{'tabActive': tabIndex == index}" 
+				v-for="(tab,index) in plotList" :key="index" >
+				<!-- <img class="tab-img" :src="tab.imageUrl" mode="aspectFill" /> -->
+				<div class="tab-title">{{tab.name}}</div>
+				<div class="tab-text">{{tab.count}}个布局</div>
+			</div>
+		</div>
+	</div>
+	<div class="plot-content" v-if="plotList && plotList.length>0">
+		<div class="content">
+			<div @click="changeOption(index)" class="item columns"
+				:class="{'active': selectIndex == index}" 
+				v-for="(item,index) in plotList[tabIndex].dataList" :key="index" >
+				<img class="img" :src="item.coverImage" mode="aspectFill" />
+				<div class="gou rows justify-center">√</div>
+				<div class="text eslipe">{{item.name}}</div>
+			</div>
+		</div>
+	</div>
+	<div class="btn-list rows rows-between">
+		<div class="btn rows up up2 justify-center" @click="confirm">确认</div>
+	</div>
+</div>

+ 166 - 0
src/components/newBottomCom/viewPlot/viewPlot.scss

@@ -0,0 +1,166 @@
+.plot-view{
+	position: relative;
+	width: auto;
+	box-sizing: border-box;
+	z-index: 12;
+	padding-top: 30px;
+	.title{
+		font-family: "Verdana Bold";
+		font-weight: 700;
+		font-size: 32px;
+		color: #000;
+		margin-bottom: 30px;
+	}
+	.close{
+		position: absolute;
+		right: -10px;
+		top: 10px;
+		width: 30px;
+		height: 30px;
+		color: rgba(0, 0, 0, 0.22);
+		font-size: 30px;
+	}
+}
+.swiper-view{
+	position: relative;
+	width: 100%;
+	height: 98px;
+	// top:926px;
+	overflow-x: auto;
+	overflow-y: hidden;
+	margin-bottom: 30px;
+	z-index: 9;
+	.tab-content{
+		position: absolute;
+	}
+	.tab-item{
+		// width:190px;
+		width:max-content;
+		font-family: "Verdana";
+		font-weight: 400;
+		font-size: 0px;
+		color: rgba(69, 69, 69, 0.6);
+		text-align:center;
+		box-sizing: border-box;
+		margin-right: 10px;
+		border: 2px solid transparent;
+		border-radius: 12px;
+		padding: 12px;
+		&.tabActive{
+			border-color: #ffbd3e;
+			background: rgba(253, 191, 71, 0.08);
+			box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
+		}
+		&:first-child{
+			margin-left: 0px;
+		}
+		&:last-child{
+			margin-right: 0px;
+		}
+		.tab-img{
+			width: 84px;
+			height: 84px;
+			object-fit: cover;
+			margin-bottom: 14px;
+			border-radius: 50%;
+			border: transparent 4px solid;
+			box-sizing: border-box;
+		}
+		.tab-title{
+			font-family: "Verdana";
+			font-weight: 400;
+			font-size: 28px;
+			color: rgba(29, 29, 29, 0.7);
+		}
+		.tab-text{
+			font-family: "Verdana";
+			font-weight: 400;
+			font-size: 22px;
+			color: rgba(132, 132, 132, 1);
+		}
+		&.tabActive .tab-title{
+			font-family: "Verdana Bold";
+			font-weight: 700;
+			color: #ffa700;
+		}
+		&.tabActive .tab-img{
+			border-color: rgba(249, 135, 15, 1);
+		}
+	}
+}  
+.plot-content{
+	position: relative;
+	width: 100%;
+	height: 320px;
+	overflow-x: auto;
+	.content{
+		position: absolute;
+		.item{
+			width:222px;
+			box-sizing: border-box;
+			margin-right: 10px;
+			.img{
+				width: 222px;
+				height: 222px;
+				margin-bottom: 30px;
+			}
+			.text{
+				width: 100%;
+				font-family: "Verdana";
+				font-weight: 400;
+				font-size: 26px;
+				color: #414141;
+			}
+			.gou{
+				position: absolute;
+				top: 10px;
+				right: 20px;
+				width: 40px;
+				height: 40px;
+				font-size: 20px;
+				border-radius: 50%;
+				background: #ff870f;
+				border: 2px solid #fff;
+				color:#fff;
+				opacity: 0;
+			}
+			&.active .gou{
+				opacity: 1;
+			}
+			&.active .text{
+				font-family: "Verdana Bold";
+				font-weight: 700;
+				color: #ffa700;
+			}
+		}
+	}
+}
+.btn-list{
+	position: fixed;
+	left: 140px;
+	bottom: 0px;
+	padding-bottom: 60px;
+	width: 470px;
+	z-index: 15;
+	background-color: rgba(255, 255, 255, 1);
+	box-sizing: border-box;
+}
+.btn{
+	height: 100px;
+	border-radius: 50px;
+	backdrop-filter:blur(40px);
+	--webkit-backdrop-filter: blur(40px);
+	font-family: "Verdana Bold";
+	font-weight: 700;
+	font-size: 32px;
+	color: #272727;
+	box-sizing: border-box;
+}
+.up{
+	width: 690px;
+	box-shadow: 0 6px 20px #f2980233;
+}
+.up2{
+	color: rgba(255, 255, 255, 1);
+	background-image:linear-gradient(124deg, rgba(245, 201, 82, 1) 0%, rgba(239, 149, 57, 1) 100%);
+}

+ 162 - 0
src/components/newBottomCom/viewPlot/viewPlot.vue

@@ -0,0 +1,162 @@
+<template src="./viewPlot.html">
+
+</template>
+<script>
+	// const util = require('@/static/utils/util.js');
+	const config = require('@/services/urlConfig.js');
+	import spaceTypes from '@/static/spaceTypesIE.js';
+	import {
+		Toast
+	} from 'mint-ui';
+	// import Bus from '@/common/bus';
+	// import commonMethod from '@/common/commonMethod.js';
+	// import requestConfig from '@/static/lib/requestConfig';
+	// import bgLoading from "@/components/bgLoading/bgLoading.vue"
+	// import { nextTick } from "vue";
+	// const app = getApp(); //获取应用实例
+	export default {
+		data: function() {
+			return {
+				selectItem:null,
+				selectIndex:0,
+				tabIndex:0,
+				plotList:[],//布局数据
+			}
+		},
+		props:{
+			overChange: {//当前页面是否处在忙碌状态
+				type: Boolean,
+				default: false,
+			},
+			selectSpace: {//当前展示的户型
+				type: Object,
+				default: () => {
+					return null
+				}
+			},
+		},
+		watch: {
+			selectSpace: {
+				handler(newVal,oldVal) {
+					if (newVal) {
+						console.warn("***selectSpace-CHANGE-viewPlot***", newVal,oldVal)
+						if(!oldVal || (oldVal && oldVal.id != newVal.id)){
+							this.initData();
+						}
+					}
+				},
+				deep:true,
+			},
+		},
+		mixins: [],
+		async mounted() {//组件挂载时事件
+			// this.initData();
+			// var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+			// this.$parent.$parent.updateCareFul = this.initData;//页面注册变更方法
+		},
+		// 页面被展示时执行
+		onPageShow: function() {  
+		},
+		//页面被隐藏时执行
+        onPageHide: function() {
+        },
+		methods:{
+			//初始化数据
+			initData(){
+				// var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+				this.plotList = [];
+				const spaceDetail = this.selectSpace;
+				if(spaceDetail.layouts){
+					this.getOverallArrangementDetailsList(spaceDetail.layouts);
+				}
+				// console.warn("***viewCareful-change***", this.carefulList)
+			},
+			async getOverallArrangementDetailsList(layouts) {
+				// 设置空间数组的墙体信息
+				// this.setSpaceListWallInfo();
+				let arr = layouts.map(it => it.layoutId).filter(it => it != 0);
+				let parmas = {
+					ids: arr,
+				};
+				// 默认的布局
+				let res = await requestConfig("getOverallArrangementDetailsList", parmas);
+				if (!res.success || !res.list || res.list.length == 0) {
+					return false;
+				}
+				let list = res.list;
+				list.forEach(item=>{
+					//布局列表当中不存在当前布局的类型
+					let data = this.plotList.find(it=>it.type==item.type);
+					if(!data){
+						let _d0 = {
+							type:item.type,
+							name:spaceTypes[item.type - 1],
+							count:1,
+							dataList:[item],
+						}
+						this.plotList.push(_d0);
+					}else{
+						data.dataList.push(item);
+					}
+				});
+				console.warn("***viewPlot***", this.plotList)
+			},
+			//切换选项
+			changeOption(id) {
+				if (id == this.selectIndex) {
+					return false;
+				}
+				this.selectIndex = id;
+				// this.plotList[this.tabIndex].checkedIndex = this.optionIndex;
+				// if (this.tabIndex == 0) { //当前为角色时,则需要同步变更上面的
+				// 	this.currImgIdx = id;
+				// 	this.$refs.carousel.setActiveItem(this.currImgIdx);
+				// }
+				console.warn("***changeOption***", this.plotList,this.selectIndex)
+				let param = {
+					type: 'CLK', //埋点类型
+					clkId: 'clk_2cmina_24012302', //点击ID
+					clkName: 'option_clk', //点击前往的页面名称
+					clkParams: {
+						type: this.options[this.optionIndex].content,
+						locusName: "选项选择",
+					}
+				};
+				util.trackRequest(param);
+			},
+			closeHandle(){
+				this.$parent.rebackLast();//告知页面,关闭当前弹窗
+			},
+			confirm(){
+				if(!this.plotList || this.plotList.length==0){
+					Toast({
+						message: '没有布局,不能切换',
+					});
+					return false
+				}
+				if(this.selectIndex<0 || this.tabIndex<0){
+					Toast({
+						message: '请选择具体的布局',
+					});
+					return false
+				}
+				let plot = this.plotList[this.tabIndex].dataList[this.selectIndex];
+				this.$parent.$parent.userSelectPlot(plot);//告知页面,用户选择的布局id
+			},
+			//去往详情页面
+			goRoam(){
+				let item = this.lastCareList[this.selectIndex];
+				this.$parent.$parent.goRoam1(item.spaceId);
+			},
+			callBack(type){
+				console.warn("***callBack***",type)
+				this.initData();
+				this.$parent.$parent.callBackFun = null;//注销父页面的通知回调函数
+			}
+		}
+	}
+</script>
+<style lang="scss" scoped>
+    @import "./viewPlot.scss";
+	/* @import "@/common/css/common.css"; */
+</style>

+ 12 - 7
src/components/newBottomCom/viewShell/viewShell.html

@@ -1,19 +1,19 @@
 <!-- 弹出层的壳子 -->
-<div class="shell-view" :class="styleType==2?'shell-view2':''">
+<div class="shell-view" :class="(styleType==2 || styleType==3)?'shell-view2':''">
 	<!-- 楼层 -->
-	<div class="floor-view" v-if="pageType==1 && floorList&&floorList.length>1">
+	<!-- <div class="floor-view" v-if="pageType==1 && floorList&&floorList.length>1">
 		<div class="floor-item rows justify-center" :class="floorId==floor.id?'active':''" 
 			v-for="(floor,index) in floorList" :key="index" @click="floorChange(floor)">
 			{{floor.houseFloor?floor.houseFloor+'F':''}}
 		</div>
-	</div>
+	</div> -->
 	<!-- 提示 -->
 	<!-- <div class="tips-view">
 		{{pageType==1?'点击进入空间':'单击圆点切换视角'}}
 	</div> -->
 	<!-- 放大缩小操作区域 -->
-	<div class="zoom-view" @click.stop="zoomInOut" v-if="styleType==2">
-		<img class="icon":src="styleType==2?'https://dm.static.elab-plus.com/miniProgram/iconfont/zoomin.png':'https://dm.static.elab-plus.com/miniProgram/iconfont/zoomout.png'" mode="widthFix"/>
+	<div class="zoom-view" @click.stop="zoomInOut">
+		<img class="icon" :src="styleType==2?'https://dm.static.elab-plus.com/miniProgram/iconfont/zoomin.png':'https://dm.static.elab-plus.com/miniProgram/iconfont/zoomout.png'" mode="widthFix"/>
 	</div>
 	<!-- 微信客服 -->
 	<div class="connect-view columns"
@@ -25,9 +25,14 @@
 		<div class="signscoll-block"></div>
 	</div> -->
 	<!-- 精细化视图 -->
-	<viewCareful ref="viewCareful" v-show="styleType==2" @curSpaceChange="curSpaceChange" :overChange="overChange" :curHouseObj="houseObj"></viewCareful>
+	<viewCareful ref="viewCareful" v-show="styleType==2" @curSpaceChange="curSpaceChange" 
+	:overChange="overChange" :curHouseObj="houseObj"></viewCareful>
+	<!-- 布局选择 -->
+	<viewPlot ref="viewPlot" v-show="styleType==3" @curSpaceChange="curSpaceChange"
+	:overChange="overChange" :selectSpace="selectSpace"></viewPlot>
 	<!-- 种子户型视图 -->
-	<viewlayout ref="viewlayout" @curSpaceChange="curSpaceChange" :styleType="styleType" :overChange="overChange" :curHouseObj="houseObj" :houseList="houseList" @upCom="upCom" @streamRecord="streamRecord" @streamRecordEnd="streamRecordEnd" @seedChange="seedChange"></viewlayout>
+	<viewlayout ref="viewlayout" @curSpaceChange="curSpaceChange" :styleType="styleType" :overChange="overChange" :curHouseObj="houseObj" 
+	@upCom="upCom" @streamRecord="streamRecord" @streamRecordEnd="streamRecordEnd"></viewlayout>
 	<!-- nav视图 -->
 	<!-- <viewToolNav v-show="pageType==1 && (styleType==2 || styleType==3)" :seedItem="seedItem" @downCom="downScroll"></viewToolNav> -->
 	<!-- 风格选择视图 -->

+ 58 - 64
src/components/newBottomCom/viewShell/viewShell.vue

@@ -8,6 +8,7 @@
 	// import requestConfig from '@/static/lib/requestConfig';
 	import viewlayout from'@/components/newBottomCom/viewlayout/viewlayout.vue';
 	import viewCareful from'@/components/newBottomCom/viewCareful/viewCareful.vue';
+	import viewPlot from'@/components/newBottomCom/viewPlot/viewPlot.vue';
 	// import viewToolNav from'@/components/newBottomCom/viewToolNav/viewToolNav.vue';
 	// import viewStyle from'@/webgl/components/newBottomCom/viewStyle/viewStyle.vue';
 
@@ -31,6 +32,8 @@
 				styleType:1,	//当前底部组件的状态
 				seedItem:null,	//当前选中的种子户型
 				showSignscoll:true,	//是否显示手势操作区域
+				selectSpace:null,//用户选择的空间
+				lastStyleType:null,
 			}
 		},
 		props:{
@@ -42,16 +45,16 @@
 				type: [String, Number],
 				default: 1,
 			},
-			curHouseType: {//当前选中的户型类型
-				type: [String, Number],
-				default: '',
-			},
-			houseList: {//当前户型所有的户型详情,可以切换
-				type: Array,
-				default: () => {
-					return []
-				}
-			},
+			// curHouseType: {//当前选中的户型类型
+			// 	type: [String, Number],
+			// 	default: '',
+			// },
+			// houseList: {//当前户型所有的户型详情,可以切换
+			// 	type: Array,
+			// 	default: () => {
+			// 		return []
+			// 	}
+			// },
 			houseObj: {//当前户型的具体详情
 				type: Object,
 				default: () => {
@@ -66,15 +69,15 @@
 			},
 		},
 		watch: {
-			curHouseType: {
-				handler(newVal) {
-					if (newVal) {
-						//户型大类发生了变更,此时需要更新楼层信息,并且重新选择具体的户型
-						console.warn("***curHouseType-change***",newVal)
-						this.initData()
-					}
-				},
-			},
+			// curHouseType: {
+			// 	handler(newVal) {
+			// 		if (newVal) {
+			// 			//户型大类发生了变更,此时需要更新楼层信息,并且重新选择具体的户型
+			// 			console.warn("***curHouseType-change***",newVal)
+			// 			this.initData()
+			// 		}
+			// 	},
+			// },
 			styleType: {//组件展开状态切换
 				handler(newVal,oldVal) {
 					if (newVal) {
@@ -91,8 +94,8 @@
 							this.shellHeight = '800px';
 							_endHeight = 800;
 						}else if(newVal==3){//变更为最小状态
-							this.shellHeight = '200px';
-							_endHeight = 200;
+							this.shellHeight = '800';
+							_endHeight = 800;
 						}
 						// let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
 						if(this.$parent && this.$parent.hasOwnProperty('canvasHeight')){
@@ -114,6 +117,7 @@
 		components:{
 			viewlayout,
 			viewCareful,
+			viewPlot,
 			// viewStyle,
 		},
 		// mixins: [touchHandle],
@@ -130,24 +134,14 @@
         	// console.warn("***detached-hide***")
         },
 		methods:{
-			initData(){
-				let houseList = this.houseList;
-				// let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
-				// let curHouseType = currPage.curHouseType?currPage.curHouseType:houseList[0].spaceStructure;//获取当前页面选中的户型类型
-				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]);//通知页面,户型楼层发生了变更
-				}
+			changeStyleType(type,selectSpace){
+				this.lastStyleType = this.styleType;//记录下当前的状态,因为会返回到这个状态
+				this.styleType = type;
+				this.selectSpace = selectSpace;
+			},
+			rebackLast(){
+				this.styleType = this.lastStyleType;//返回记录下的状态
+				this.selectSpace = null;
 			},
 			catchTouchMove: function() {
 				return false;
@@ -164,32 +158,32 @@
 				this.showSignscoll = true;
 			},
 			//楼层切换
-			floorChange(item){
-				if(this.floorId==item.id){
-					return false;
-				}
-				if(this.$parent.loadLayFlag){//加载家具模型中
-					this.$message("加载模型中,请稍后再试");
-					return false
-				}
-				this.floorId = item.id;
-				let param = {
-					type: 'CLK', //埋点类型
-					clkId: 'clk_2cmina_23080410', //点击ID
-					clkName: 'floorswitching_clk', //点击前往的页面名称
-					clkParams: {
-						locusName: "楼层切换",
-					}
-				};
-				util.trackRequest(param);
-				this.$emit("curHouseFloorChange", item);//通知页面,户型楼层发生了变更
-			},
+			// floorChange(item){
+			// 	if(this.floorId==item.id){
+			// 		return false;
+			// 	}
+			// 	if(this.$parent.loadLayFlag){//加载家具模型中
+			// 		this.$message("加载模型中,请稍后再试");
+			// 		return false
+			// 	}
+			// 	this.floorId = item.id;
+			// 	let param = {
+			// 		type: 'CLK', //埋点类型
+			// 		clkId: 'clk_2cmina_23080410', //点击ID
+			// 		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);//通知页面,户型大类发生了变更
-			},
+			// seedChange(item){
+			// 	console.warn("***seedChange***",item)
+			// 	this.seedItem = item;
+			// 	this.$emit("curHouseTypeChange", item);//通知页面,户型大类发生了变更
+			// },
 			//放大缩小
 			zoomInOut(){
 				if(this.styleType == 2){

+ 14 - 7
src/components/newBottomCom/viewlayout/viewlayout.html

@@ -3,20 +3,27 @@
 <div class="layout-view">
 	<!-- 种子区域 -->
 	<div>
-		<div class="btn-list rows rows-between" v-if="styleType==1 || styleType==3">
-			<!-- <div class="btn voice rows justify-center" :class="recording?'voice2':'voice3'" @touchstart="streamRecord" @touchmove="mytouchmove">
-				<img class="icon" :src="recording?'https://dm.static.elab-plus.com/miniProgram/iconfont/source.png':'https://dm.static.elab-plus.com/miniProgram/iconfont/source1.png'" mode="widthFix"/>
-			</div> -->
+		<!-- <div class="btn-list rows rows-between" v-if="styleType==1 || styleType==3">
 			<div class="btn rows up justify-center" @click="upCom" :class="styleType==1?'up1':'up2'">开始定制户型 ></div>
-			
-		</div>
-		<div class="btn-list rows rows-between" v-else-if="styleType==2">
+		</div> -->
+		<!-- <div class="btn-list rows rows-between" v-else-if="styleType==2">
 			<div class="btn houseType rows justify-center up2" >
 				<div class="iconfont icon-huxingjianshang style1"></div>户型空间
 			</div>
 			<div class="btn AiBtn rows justify-center up1" @click="goRoam">
 				<div class="iconfont icon-a-lujing35039 style1"></div>AI精软装
 			</div>
+		</div> -->
+		<div class="btn-list rows rows-between" v-if="styleType==1 || styleType==2">
+			<div class="btn houseType rows justify-center up1" @click="goback">
+				<div class="iconfont icon-huxingjianshang style1"></div>重选空间
+			</div>
+			<div class="btn AiBtn rows justify-center up2" @click="goRoam">
+				<div class="iconfont icon-a-lujing35039 style1"></div>AI精软装
+			</div>
 		</div>
+		<!-- <div class="btn-list rows rows-between" v-if="styleType==3">
+			<div class="btn rows up justify-center" @click="upCom" :class="styleType==1?'up1':'up2'">确认</div>
+		</div> -->
 	</div>
 </div>

+ 133 - 227
src/components/newBottomCom/viewlayout/viewlayout.vue

@@ -26,61 +26,61 @@
 					text: '等待说话',
 				},
 				recording: false, // 正在录音
-				startX:0,
-				startY:0,
-				clientX:0,
-				clientY:0,
-				defaultIndex:0,//默认选中的户型大类
-				carefulList:[],
-				lastSpace:null,	//上一个语音操作的空间对象
-				bigWord:"变大,放大,大一点,变宽",
-				bigWordPY:"bianda,fangda,dayidian,biankuan",
-				smaillWord:"变小,缩放,小一点,变窄",
-				smaillWordPY:"bianxiao,suofang,xiaoyidian,bianzhai",
-				changeRate:0.05,	//每次变化的比例
+				startX: 0,
+				startY: 0,
+				clientX: 0,
+				clientY: 0,
+				defaultIndex: 0, //默认选中的户型大类
+				carefulList: [],
+				lastSpace: null, //上一个语音操作的空间对象
+				bigWord: "变大,放大,大一点,变宽",
+				bigWordPY: "bianda,fangda,dayidian,biankuan",
+				smaillWord: "变小,缩放,小一点,变窄",
+				smaillWordPY: "bianxiao,suofang,xiaoyidian,bianzhai",
+				changeRate: 0.05, //每次变化的比例
 			}
 		},
 		props: {
-			houseList: {//当前户型所有的户型详情,可以切换
-				type: Array,
-				default: () => {
-					return []
-				}
-			},
-			curHouseObj: {//当前展示的户型
-				type: Object,
-				default: () => {
-					return null
-				}
-			},
-			overChange: {//当前选中的户型类型
+			// houseList: {//当前户型所有的户型详情,可以切换
+			// 	type: Array,
+			// 	default: () => {
+			// 		return []
+			// 	}
+			// },
+			// curHouseObj: {//当前展示的户型
+			// 	type: Object,
+			// 	default: () => {
+			// 		return null
+			// 	}
+			// },
+			overChange: { //当前选中的户型类型
 				type: Boolean,
 				default: false,
 			},
-			styleType:{
+			styleType: {
 				type: [String, Number],
 				default: '',
 			}
 		},
 		watch: {
-			houseList: {
-				handler(newVal) {
-					if (newVal) {
-						console.warn("***houseList-change***", newVal)
-						this.initData(newVal);
-					}
-				},
-			},
-			curHouseObj: {
-				handler(newVal,oldVal) {
-					if (newVal) {
-						console.warn("***curHouseObj-CHANGE-layout***", newVal)
-						if((oldVal && oldVal.id != newVal.id) || !oldVal){
-							this.initSpanceData();
-						}
-					}
-				},
-			},
+			// houseList: {
+			// 	handler(newVal) {
+			// 		if (newVal) {
+			// 			console.warn("***houseList-change***", newVal)
+			// 			this.initData(newVal);
+			// 		}
+			// 	},
+			// },
+			// curHouseObj: {
+			// 	handler(newVal,oldVal) {
+			// 		if (newVal) {
+			// 			console.warn("***curHouseObj-CHANGE-layout***", newVal)
+			// 			if((oldVal && oldVal.id != newVal.id) || !oldVal){
+			// 				this.initSpanceData();
+			// 			}
+			// 		}
+			// 	},
+			// },
 		},
 		async mounted() {
 			// this.getRecordAuth();//获取录音权限
@@ -90,113 +90,17 @@
 		},
 		// 页面被展示时执行
 		onPageShow: function() {
-			
+
 		},
 		//页面被隐藏时执行
 		onPageHide: function() {
 			console.warn("***detached-hide***")
 		},
 		methods: {
-			initSpanceData(){
-				this.carefulList = [];
-				// var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
-				const spaceDetail = this.curHouseObj;
-				const spaceList = JSON.parse(spaceDetail.houseJson);
-				spaceList && spaceList.forEach(async (item,index)=>{
-					let curSpaceArea = parseFloat(
-						(item.spaceWidth * item.spaceHeight) / 10000
-					).toFixed(1);
-					let minArea = 0;
-					let maxArea = 100;
-					if(item.hasOwnProperty('spaceWidthMin') && item.hasOwnProperty('spaceHeightMin')){
-						minArea = parseFloat((item.spaceWidthMin * item.spaceHeightMin) / 10000).toFixed(1);
-					}
-					if(item.hasOwnProperty('spaceWidthMax') && item.hasOwnProperty('spaceHeightMax')){
-						maxArea = parseFloat((item.spaceWidthMax * item.spaceHeightMax) / 10000).toFixed(1);
-					}
-					let text = item.spaceName;
-					if(text && !item.isSizeLock){
-						// let res = await requestConfig("chineseToPinyin", {chinese:text},true);
-						// let pinyin = res.single;
-						let data = {
-							spaceId:item.spaceId,
-							index:this.carefulList.length,
-							name:text,
-							namePY:'',
-							area:curSpaceArea,
-							percent:null,
-							minArea:minArea,	//最小面积
-							maxArea:maxArea,	//最大面积
-						}
-						this.carefulList.push(data)
-					}
-				})
-				console.warn("***viewlayout-init***", this.carefulList)
+			//返回上一页
+			goback(){
+				this.$router.go(-1);
 			},
-			initData(houseList){
-				this.seedLayoutList = [];
-				houseList && houseList.forEach(item=>{
-					let data = {
-						spaceStructure: item.spaceStructure,
-						spaceName: item.spaceName,
-						set: false, //是否已经设置过
-					};
-					this.seedLayoutList.push(data);
-				})
-				// var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
-				// if(currPage.curHouseType){//获取当前页面选中的户型类型
-				// 	this.selectSeedId = currPage.curHouseType
-				// } else if(this.seedLayoutList && this.seedLayoutList[this.defaultIndex]){//默认选中第一个
-				// 	this.selectSeedId = this.seedLayoutList[this.defaultIndex].spaceStructure;
-				// }
-				this.selectSeedId = this.seedLayoutList[this.defaultIndex].spaceStructure;
-				let keyWord = this.$route.query.layer;
-				if(keyWord){//如果存在结构特征,则定位到该模型大类下
-					let item = this.seedLayoutList.find(it=>keyWord.includes(it.spaceName));
-					if(item){
-						this.selectSeedId = item.spaceStructure;
-					}
-				}
-				if(this.selectSeedId){
-					let item = this.seedLayoutList.find(it=>{
-						return it.spaceStructure == this.selectSeedId
-					})
-					this.$emit("seedChange", item);//通知父组件-当前已经选中了户型大类
-					let param = {
-						type: 'CLK', //埋点类型
-						clkId: 'clk_2cmina_23080402', //点击ID
-						clkName: 'seedroom_clk', //点击前往的页面名称
-						clkParams: {
-							type: item.spaceName,
-							locusValue: item.spaceStructure,
-							locusName: "切换种子户型",
-						}
-					};
-					// util.trackRequest(param);
-				}
-				console.warn("***curHouseType-init***",this.seedLayoutList)
-			},
-			// seedItemCheck(item) {
-			// 	if (!item || !item.spaceStructure) {
-			// 		return false;
-			// 	}
-			// 	if (item.spaceStructure == this.selectSeedId) {
-			// 		return false;
-			// 	}
-			// 	this.selectSeedId = item.spaceStructure;
-			// 	this.$emit("seedChange", item);
-			// 	let param = {
-			// 		type: 'CLK', //埋点类型
-			// 		clkId: 'clk_2cmina_23080402', //点击ID
-			// 		clkName: 'seedroom_clk', //点击前往的页面名称
-			// 		clkParams: {
-			// 			type: item.spaceName,
-			// 			locusValue: item.spaceStructure,
-			// 			locusName: "切换种子户型",
-			// 		}
-			// 	};
-			// 	// util.trackRequest(param);
-			// },
 			//上划触发
 			upCom() {
 				console.warn("***upCom***")
@@ -211,7 +115,7 @@
 				};
 				// util.trackRequest(param);
 			},
-			goRoam(){
+			goRoam() {
 				this.$parent.$refs.viewCareful.goRoam();
 			},
 			//获取录音权限
@@ -242,27 +146,27 @@
 				})
 			},
 			//求最长公共子集
-			findSubStr(str1, str2){
-			    if (str1.length > str2.length) {
-			      var temp = str1;
-			      str1 = str2;
-			      str2 = temp;
-			    }
-			    let len1 = str1.length;
-			    let len2 = str2.length;
-			    for (var j = len1; j > 0; j--) {
-			      for (var i = 0; i < len1 - j; i++) {
-			        var current = str1.substr(i, j);
-			        if (str2.indexOf(current) >= 0) {
-			          return current;
-			        }
-			      }
-			    }
-			    return "";
+			findSubStr(str1, str2) {
+				if (str1.length > str2.length) {
+					var temp = str1;
+					str1 = str2;
+					str2 = temp;
+				}
+				let len1 = str1.length;
+				let len2 = str2.length;
+				for (var j = len1; j > 0; j--) {
+					for (var i = 0; i < len1 - j; i++) {
+						var current = str1.substr(i, j);
+						if (str2.indexOf(current) >= 0) {
+							return current;
+						}
+					}
+				}
+				return "";
 			},
 			//声音变化
 			async textChange(text) {
-				if(this.overChange){
+				if (this.overChange) {
 					uni.showToast({
 						title: '请慢一点',
 						icon: 'none',
@@ -270,40 +174,42 @@
 					})
 					return false;
 				}
-				let res = await requestConfig("chineseToPinyin", {chinese:text});
+				let res = await requestConfig("chineseToPinyin", {
+					chinese: text
+				});
 				let pinyin = res.single;
-				console.warn("****pinyin***",pinyin)
+				console.warn("****pinyin***", pinyin)
 				text = pinyin;
 				//全匹配轮一遍
-				let curSpace = this.carefulList.find(space=>{
+				let curSpace = this.carefulList.find(space => {
 					return text.includes(space.namePY)
 				})
-				if(!curSpace){
-					let list = this.carefulList.map((space,index)=>{
+				if (!curSpace) {
+					let list = this.carefulList.map((space, index) => {
 						let comStr = this.findSubStr(text, space.namePY + ' ');
 						return {
-							spaceId:space.spaceId,
-							namePY:space.namePY,
-							name:space.name,
+							spaceId: space.spaceId,
+							namePY: space.namePY,
+							name: space.name,
 							comStr,
 							index,
 						}
 					})
 					//寻找5个字符串以上的
-					let tmpList = list.filter(it=>{
+					let tmpList = list.filter(it => {
 						return it.comStr.length > 5;
 					})
-					if(tmpList && tmpList.length>0){
+					if (tmpList && tmpList.length > 0) {
 						tmpList.sort((a, b) => a.comStr.length - b.comStr.length);
-						let index = tmpList[tmpList.length-1].index;//最大值在carefulList的序号
-						curSpace = this.carefulList[index];//
-					}else{
+						let index = tmpList[tmpList.length - 1].index; //最大值在carefulList的序号
+						curSpace = this.carefulList[index]; //
+					} else {
 						curSpace = this.lastSpace;
 					}
 				}
-				
+
 				//没有找到语音操作对象
-				if(!curSpace){
+				if (!curSpace) {
 					uni.showToast({
 						title: '请再说一次',
 						icon: 'none',
@@ -312,48 +218,48 @@
 					return false;
 				}
 				this.lastSpace = curSpace;
-				
-				console.log("textChange:", curSpace,this.carefulList,text,this.bigWordPY,this.smaillWordPY);
-				
-				let biglist = this.bigWordPY.split(',').map(word=>{
+
+				console.log("textChange:", curSpace, this.carefulList, text, this.bigWordPY, this.smaillWordPY);
+
+				let biglist = this.bigWordPY.split(',').map(word => {
 					return text.lastIndexOf(word)
 				})
-				let smalllist = this.smaillWordPY.split(',').map(word=>{
+				let smalllist = this.smaillWordPY.split(',').map(word => {
 					return text.lastIndexOf(word)
 				})
 				let a = Math.max(...biglist);
 				let b = Math.max(...smalllist);
 				let big = false;
-				if(a==-1 && b==-1){//都没命中
+				if (a == -1 && b == -1) { //都没命中
 					uni.showToast({
 						title: '请再说一次',
 						icon: 'none',
 						duration: 2000
 					})
 					return false;
-				}else if(a>-1 && b>-1){//两个都命中了
-					if(a > b){//放大靠后-命中靠后
+				} else if (a > -1 && b > -1) { //两个都命中了
+					if (a > b) { //放大靠后-命中靠后
 						big = true;
-					}else{
+					} else {
 						big = false;
 					}
-				}else if(a>-1){
+				} else if (a > -1) {
 					big = true;
 				}
 				let _area = parseFloat(curSpace.area) * this.changeRate;
 				let data = {
-					spaceId:curSpace.spaceId,
-					area:_area,
-					isZoomIn:big,//true 放大 false 缩放
+					spaceId: curSpace.spaceId,
+					area: _area,
+					isZoomIn: big, //true 放大 false 缩放
 				}
-				console.log("viewlayout-发送消息-空间变化: ",data,curSpace.area,big);
+				console.log("viewlayout-发送消息-空间变化: ", data, curSpace.area, big);
 				uni.showToast({
 					title: '正在变化,请稍后',
 					icon: 'none',
 					duration: 2000
 				})
 				// this.sendMessageAction(JSON.stringify(parmas));
-				this.$emit("curSpaceChange",data);//通知父组件-当前已经选中了户型大类
+				this.$emit("curSpaceChange", data); //通知父组件-当前已经选中了户型大类
 			},
 			/**
 			 * 初始化语音识别回调
@@ -367,28 +273,28 @@
 						text: res.result,
 					})
 					this.currentTranslate = currentData;
-					console.warn("***manager-正在录音***",this.currentTranslate)
+					console.warn("***manager-正在录音***", this.currentTranslate)
 				}
 				// 识别结束事件
 				manager.onStop = (res) => {
-					console.warn("***manager-识别结束0***",this.recording,res)
+					console.warn("***manager-识别结束0***", this.recording, res)
 					// this.textChange("客厅大一点");
-					if(this.recording==false){//已经强制结束识别了
-						return false;//不识别
+					if (this.recording == false) { //已经强制结束识别了
+						return false; //不识别
 					}
 					let text = res.result
-					if (text == '') {//识别内容为空时的反馈
+					if (text == '') { //识别内容为空时的反馈
 						this.showRecordEmptyTip()
 						return
 					}
-					console.warn("***manager-识别结束***",text);
+					console.warn("***manager-识别结束***", text);
 					let param = {
 						type: 'CLK', //埋点类型
 						clkId: 'clk_2cmina_23080407', //点击ID
 						clkName: 'voice_clk', //点击前往的页面名称
 						clkParams: {
 							locusName: "语音调整",
-							text:text
+							text: text
 						}
 					};
 					// util.trackRequest(param);
@@ -401,8 +307,8 @@
 
 				// 识别错误事件
 				manager.onError = (res) => {
-					console.warn("***manager-识别错误***",this.recording,res)
-					if(this.recording == false){
+					console.warn("***manager-识别错误***", this.recording, res)
+					if (this.recording == false) {
 						return false;
 					}
 					this.stopRecordHandle();
@@ -416,19 +322,19 @@
 				uni.onBackgroundAudioPlay(res => {
 					const backgroundAudioManager = uni.getBackgroundAudioManager()
 					let src = backgroundAudioManager.src
-					
+
 					this.currentTranslateVoice = src;
 				})
 			},
 			//执行停止录音的方法
-			stopRecordHandle(){
+			stopRecordHandle() {
 				// var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
 				this.recording = false;
-				this.$emit("streamRecordEnd");//通知父组件
+				this.$emit("streamRecordEnd"); //通知父组件
 				// currPage.voiceMaskChange(false);//关闭蒙层
 			},
 			//用户语音为空
-			showRecordEmptyTip(){
+			showRecordEmptyTip() {
 				this.stopRecordHandle();
 				uni.showToast({
 					title: '告诉我您的想法',
@@ -436,7 +342,7 @@
 					duration: 2000
 				})
 			},
-			catchTapEvent:function(){
+			catchTapEvent: function() {
 				return false;
 			},
 			/**
@@ -445,7 +351,8 @@
 			streamRecord: function(e) {
 				// this.getRecordAuth();//获取录音权限
 				console.warn("streamrecord", e)
-				let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+				let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages()
+					.length - 1].$vm : null;
 				// let buttonItem = detail.buttonItem || {}
 				manager.start({
 					lang: language[0].lang_content,
@@ -455,8 +362,8 @@
 				this.clientY = 0;
 				this.startX = e.changedTouches[0].clientX;
 				this.startY = e.changedTouches[0].clientY;
-				this.recording = true;//录音中
-				currPage.voiceMaskChange(true);//显示蒙层
+				this.recording = true; //录音中
+				currPage.voiceMaskChange(true); //显示蒙层
 				this.$emit("streamRecord");
 			},
 			mytouchmove(e) {
@@ -467,22 +374,22 @@
 				this.clientX = touchMoveX - startX;
 				this.clientY = touchMoveY - startY;
 			},
-			angle(start,end){
+			angle(start, end) {
 				let _X = end.X - start.X;
 				let _Y = end.Y - start.Y;
-				if(_X == 0) return 90;
-				return 360 * Math.atan((_Y / _X) / (2*Math.PI))
+				if (_X == 0) return 90;
+				return 360 * Math.atan((_Y / _X) / (2 * Math.PI))
 			},
 			/**
 			 * 松开按钮结束语音识别
 			 */
 			streamRecordEnd: function(e) {
-				console.warn("streamRecordEnd" ,this.recording,e)
+				console.warn("streamRecordEnd", this.recording, e)
 				// let detail = e.detail || {} // 自定义组件触发事件时提供的detail对象
 				// let buttonItem = detail.buttonItem || {}
 
 				// 防止重复触发stop函数
-				if (this.recording==false) {
+				if (this.recording == false) {
 					console.warn("has finished!")
 					return
 				}
@@ -490,8 +397,7 @@
 				let startY = this.startY; //开始y坐标
 				let touchMoveX = e.changedTouches[0].clientX; //滑动变化坐标 
 				let touchMoveY = e.changedTouches[0].clientY; //滑动变化坐标 
-				let angle = this.angle(
-				{
+				let angle = this.angle({
 					X: startX,
 					Y: startY
 				}, {
@@ -500,25 +406,25 @@
 				})
 				//滑动角度超过45retrun
 				// console.log(Math.abs(angle), "Math.abs(angle)")
-				if (Math.abs(angle) > 45){//上下滑动
-					if (startY > touchMoveY && (startY - touchMoveY)>20) { //上滑
-						console.warn("***touchend-上滑***",startY - touchMoveY);
-						this.stopRecordHandle();//停止录音了
+				if (Math.abs(angle) > 45) { //上下滑动
+					if (startY > touchMoveY && (startY - touchMoveY) > 20) { //上滑
+						console.warn("***touchend-上滑***", startY - touchMoveY);
+						this.stopRecordHandle(); //停止录音了
 						manager.stop()
 						uni.showToast({
 							title: '识别已取消!',
 							icon: 'none',
 							duration: 2000
 						})
-					}else{
-						this.stopRecordHandle();//停止录音了
+					} else {
+						this.stopRecordHandle(); //停止录音了
 						manager.stop()
-						console.warn("streamRecordEnd-stop1" ,this.recording)
+						console.warn("streamRecordEnd-stop1", this.recording)
 					}
-				}else{
-					this.stopRecordHandle();//停止录音了
+				} else {
+					this.stopRecordHandle(); //停止录音了
 					manager.stop();
-					console.warn("streamRecordEnd-stop2" ,this.recording)
+					console.warn("streamRecordEnd-stop2", this.recording)
 				}
 			},
 		}

+ 34 - 3
src/mixins/floorMethod.js

@@ -4,6 +4,7 @@
 // import requestConfig from '@/services/requestConfig.js';
 import * as THREE from 'three';
 import TWEEN from 'three/addons/libs/tween.module.js';
+import spaceTypes from '@/static/spaceTypesIE.js';
 let glbWidth = 300;//空间地板模型的真实尺寸
 let glbHeight = 300;
 export default {
@@ -15,7 +16,7 @@ export default {
 			// gltfSpace1Url: "https://dm.static.elab-plus.com/miniProgram/model/BP_G_tiles01_1.gltf", //模型地址
 			gltfSpace1Url: "https://dm.static.elab-plus.com/miniProgram/model/BP_G_tiles01.glb", //模型地址
 			instancedSpaceMeshList:[],//地板实例对象 当地板复杂是就会存在多个
-			spaceTypes : ["卧室","客厅","餐厅","厨房","玄关","卫生间","衣帽间","收纳","阳台","飘窗","链接空间","自定义","楼梯","花园"],
+			spaceTypes:spaceTypes,
 		}
 	},
 	watch: {},
@@ -71,7 +72,8 @@ export default {
 								let md = {
 									spaceId:obj.spaceId,//模型实例的唯一标识
 									instancedMeshIndexList:[//标识网格实例数组的序号 以及 当前几何体 在网格实例的序号
-										{instancedMeshIndex: this.instancedSpaceMeshList.length - 1, instancedAtIndex : i},
+										{instancedMeshIndex: this.instancedSpaceMeshList.length - 1, instancedAtIndex : i,
+										color:instancedMesh.material.color.clone(),},
 									],
 									spaceName:obj.spaceName,//几何体的id
 									spaceType:obj.spaceType,
@@ -82,7 +84,8 @@ export default {
 								that.gltfSpaces.push(md);
 							}else{//添加另外一组实例
 								gltfSpace.instancedMeshIndexList.push({
-									instancedMeshIndex:this.instancedSpaceMeshList.length - 1, instancedAtIndex:i
+									instancedMeshIndex:this.instancedSpaceMeshList.length - 1, instancedAtIndex:i,
+									color:instancedMesh.material.color.clone(),
 								})
 							}
 						})
@@ -183,6 +186,34 @@ export default {
 				that.scene.add(cube);
 			})
 		},
+		//修改指定空间的颜色
+		changeSpaceColor(spaceId,type=1){
+			// 寻找地板
+			const cube = this.gltfSpaces.find((item)=>{
+			    return item.spaceId == spaceId;
+			})
+			if(cube.instancedMeshIndexList){
+				if(type==1){
+					cube.instancedMeshIndexList.forEach(instanced=>{
+						let _index = instanced.instancedMeshIndex;//第一个geometry实例 在 全局InstancedMesh实例的位置
+						let instancedMesh = this.instancedSpaceMeshList[_index];//获取具体的网格实例
+						instancedMesh.instanceColor.needsUpdate = true;//打开颜色修改开关,不开,颜色是不能修改额
+						let color = new THREE.Color(0xFF9F40); // 使用sRGB颜色值
+						// color.convertSRGBToLinear(); // 将颜色值转换为线性颜色值
+						instancedMesh.setColorAt(instanced.instancedAtIndex, color);//修改这个几何体的颜色
+					})
+				}else{
+					cube.instancedMeshIndexList.forEach(instanced=>{
+						let _index = instanced.instancedMeshIndex;//第一个geometry实例 在 全局Instance
+						let instancedMesh = this.instancedSpaceMeshList[_index];//获取具体的网格实例
+						instancedMesh.instanceColor.needsUpdate = true;//打开颜色修改开关,不开,颜色是不能修改额
+						instancedMesh.setColorAt(instanced.instancedAtIndex, instanced.color);//修改这个几何体的颜色
+					});
+				}
+				
+			}
+			
+		},
 		//修改当前空间的面积大小-动画方案2
 		changeSpacesAnim(curSpace){
 			// 寻找地板

+ 16 - 2
src/mixins/loadModel.js

@@ -506,8 +506,8 @@ export default {
 			})
 			//对应空间的布局替换为新的布局数据
 			if(oldLayoutIndex!=-1 && layoutObj){
-				this.arrFrunList[oldLayoutIndex] = layoutObj
-				// this.arrFrunList.splice(oldLayoutIndex,1)
+				this.arrFrunList[oldLayoutIndex] = layoutObj;
+				// spaceObj.layoutId = layoutObj.id;
 			}
 			if(!layoutObj){//当前空间不存在布局了
 				this.arrFrunList.splice(oldLayoutIndex,1)
@@ -1157,6 +1157,20 @@ export default {
 	
 			return cubeInfo;
 		},
+		//切换单个空间的布局到指定的布局上
+		changeSingleLayout(spaceId,layoutObj){
+			// 更新空间的布局id
+			const element = this.spaceList.find(it=>it.spaceId == spaceId);
+			this.deleteLayoutModel(element, layoutObj);//删除当前空间的布局
+			element.layoutId = layoutObj.id;//更新布局信息到空间对象里面
+			this.changeLayouts = [];
+			this.changeLayouts.push(layoutObj)
+			let changeSpaces = [];
+			changeSpaces.push(element)
+			console.log("新布局替换完成",this.changeLayouts, changeSpaces,this.arrFrunList.map(it=>it.id));
+			this.furnHandle(this.changeLayouts, changeSpaces);//先加载变化的空间的布局
+			this.updataPageData();//更新数据
+		},
 		// 改变空间模型
 		changeLayoutModel(){
 			let changeSpaces = [];

+ 36 - 0
src/pages/webgl_rxdz_houseList/webgl_rxdz_houseList.html

@@ -0,0 +1,36 @@
+<div class="container">
+	<!-- <div class="back"><i class="iconfont icon-fanhui" @click="backFun"></i></div> -->
+	<div class="title rows justify-center">
+		- 选择您喜欢的空间 -
+	</div>
+	<!-- 户型选择区域 -->
+	<div class="scroll-class">
+		<div class="main grid-view1">
+			<div @click="changeHouse(house)" class="item columns" v-for="(house,index) in houseList" :key="index" >
+				<img class="item-img" :src="house.coverImage" />
+				<div class="item-text rows justify-center">{{house.houseType}}·{{house.houseArea}}㎡</div>
+				<div class="item-note rows justify-center">{{house.note}}</div>
+			</div>
+		</div>
+	</div>
+	<!-- 题目数据 -->
+	<div class="topic-view">
+		<!-- 题目列表 -->
+		<div class="screenList">
+			<div class="items" v-for="(item, idx) in tabData" :key="idx">
+				<div class="item_title">
+					{{item.fatherContent}}:
+				</div>
+				<div class="item_list">
+					<div :class="['item', idx1 == item.checkedIndex ? 'item_sel': '']" 
+						v-for="(item1, idx1) in item.options" :key="idx1" 
+						@click.stop="changeOption(idx, idx1)">
+						{{item1.content}}
+					</div>
+				</div>
+			</div>
+		</div>
+		<!-- 按钮 -->
+		<div class="btn rows justify-center" @click="enterAction">下一步,DIY空间</div>
+	</div>
+</div>

+ 156 - 0
src/pages/webgl_rxdz_houseList/webgl_rxdz_houseList.scss

@@ -0,0 +1,156 @@
+.container{
+	height: 100vh;
+	background: #f2f3f4;
+	
+}
+.title{
+	position: absolute;
+	width: 100vw;
+	height: auto;
+	top: 66px;
+	left: 0px;
+	font-family: "Verdana Bold";
+	font-weight: 700;
+	font-size: 32px;
+	color: #343434;
+}
+.scroll-class{
+	position: relative;
+	height: calc(100vh - 404px);
+	padding-top: 170px;
+	.main{
+		// max-height: 400px;
+		max-height: 100%;
+		overflow-y: auto;
+		padding: 0px 20px;
+		.item{
+			font-size: 0px;
+			.item-img{
+				width: 340px;
+				height: 260px;
+				object-fit: contain;
+				margin-bottom: 8px;
+			}
+			.item-text{
+				font-family: "DIN Alternate Bold";
+				font-weight: 700;
+				font-size: 28px;
+				color: #0f0f0f;
+				margin-bottom: 4px;
+			}
+			.item-note{
+				font-family: "Verdana";
+				font-weight: 400;
+				font-size: 28px;
+				color: #e0862e;
+			}
+		}
+			
+	}
+}
+.topic-view{
+	position: relative;
+	width: 100vw;
+	height: 404px;
+	border-radius: 40px 40px 0 0;
+	background: #fff;
+	padding: 50px 30px;
+	box-sizing: border-box;
+	.screenList {
+		width: 100%;
+		// padding: 0px 20px 0px 20px;
+		box-sizing: border-box;
+		position: relative;
+		z-index: 30;
+		margin-bottom: 10px;
+		.items {
+			width: 100%;
+			display: flex;
+			align-items: center;
+			justify-content: flex-start;
+			margin-bottom: 20px;
+	
+			.item_title {
+				width: 94px;
+				min-width: 94px;
+				font-family: "Verdana Bold";
+				font-weight: 700;
+				font-size: 26px;
+				line-height: 56px;
+				text-align: left;
+				white-space: nowrap;
+				color: rgba(38, 38, 38, 0.6);
+				// border: 2px solid #00000000;
+			}
+	
+			.item_list {
+				display: flex;
+				align-items: center;
+				justify-content: flex-start;
+				overflow-x: scroll;
+	
+				.item {
+					font-family: "Verdana";
+					font-weight: 400;
+					font-size: 32px;
+					height: 56px;
+					line-height: 56px;
+					text-align: center;
+					color: #3b3b3b;
+					border: 2px solid #00000000;
+					padding: 0 20px;
+					border-radius: 12px;
+					box-sizing: content-box;
+					white-space: nowrap;
+				}
+	
+				.item_sel {
+					border-radius: 16px;
+					background: #343434;
+					font-family: "DIN Alternate Bold";
+					font-weight: 700;
+					color: #fefefe;
+				}
+			}
+	
+		}
+	}
+	.btn{
+		position: absolute;
+		bottom: 68px;
+		left: 140px;
+		width: 470px;
+		height: 92px;
+		border-radius: 46px;
+		/* Note: currently only Safari supports backdrop-filter */
+		backdrop-filter:blur(40px);
+		background: linear-gradient(130.79deg, rgba(245, 201, 82, 1) 0%, rgba(253, 148, 41, 1) 100%);
+		font-family: "Verdana Bold";
+		font-weight: 700;
+		font-size: 30px;
+		color: #fff;
+	}
+}
+.grid-view1 {
+	display: grid;
+	grid-template-columns: repeat(2, 1fr);
+	/* grid-row-gap: 20rem; */
+	grid-gap: 20px 20px;
+}
+.back{
+	margin-top: 30px;
+	height: 50px;
+	color: #000;
+	display: flex;
+	justify-content: start;
+	align-items: center;
+	position: absolute;
+	z-index: 10;
+	top: 0;
+}
+.icon-fanhui{
+	margin-left: 20px;
+}
+
+
+

+ 168 - 0
src/pages/webgl_rxdz_houseList/webgl_rxdz_houseList.vue

@@ -0,0 +1,168 @@
+<template src="./webgl_rxdz_houseList.html">
+</template>
+
+<script>
+	const util = require('@/utils/util.js').default;
+	const config = require('@/services/urlConfig.js');
+	import router from "@/router";
+	import {
+		setStorage,
+		getStorage,
+	} from '@/utils/localStorage';
+	import {
+		Toast
+	} from 'mint-ui';
+	// import houseList from "../../components/houseList/houseList.vue";
+	// import houseList2 from "../../components/houseList/houseList2.vue";
+	export default {
+		name: 'webgl_rxdz_houseList',
+		data() {
+			return {
+				pvId: 'p_2cmina_24012401',
+				locusBehaviorName: "空间偏好",
+				locusValue: "",
+				locusName: "",
+				pvCurPageName: "space_set",
+				pvCurPageParams: null,
+				navbar: {
+					showCapsule: 1,
+					title: '空间偏好',
+					titleColor: '#fff',
+					navPadding: 0,
+					navPaddingBg: 'transparent',
+					navBarColor: 'transparent',
+					navBackColor: 'transparent',
+					haveCallback: false, // 如果是 true 会接手 navbarBackClk
+					fromShare: false,
+					fromProject: 0,
+					shareToken: "",
+					pageName: this.pvCurPageName,
+				},
+				id:'',	//题目id
+				houseId: 100296,
+				houseList:[],	//户型列表
+				optionIndex: -1, //选项选中的序号
+				tabData: [],	//
+				curHouseObj:null,	//用户选择的户型
+			}
+		},
+		// components: {
+		// 	houseList,
+		// },
+		watch: {},
+		mounted(options) {
+			console.log("***onLoad-webgl_rxdz_houseList***", this.$route.query)
+			this.id = this.$route.query.id ? this.$route.query.id : '110';
+			this.findHouseTypeSpaceList();
+			this.queryTestcaseSingle();
+		},
+		methods: {
+			backFun() {
+				uni.navigateBack({
+					url: 'pages/groupIndex2/groupIndex2'
+				})
+			},
+			selectHouseObj(obj) {
+				console.log("户型", obj);
+				this.enterAction(obj, 0, 0);
+			},
+			//切换选项
+			changeOption(idx, idx1) {
+				if (idx1 == this.tabData[idx].checkedIndex) {
+					return false;
+				}
+				this.tabData[idx].checkedIndex = idx1;
+				// console.warn("***changeOption***", this.tabData,this.allSelect)
+				let param = {
+					type: 'CLK', //埋点类型
+					clkId: 'clk_2cmina_24012401', //点击ID
+					clkName: 'option_clk', //点击前往的页面名称
+					clkParams: {
+						type: this.tabData[idx].options[idx1].content,
+						locusName: "选项选择",
+					}
+				};
+				util.trackRequest(param);
+			},
+			changeHouse(item){
+				this.curHouseObj = item;
+				console.log("changeHouse: ", this.curHouseObj);
+			},
+			//查询题目数据
+			async queryTestcaseSingle() {
+				let params = {
+					id: this.id,
+					brandId: $config.brandId,
+					houseId: this.houseId,
+				};
+				const res = await requestConfig('queryTestcaseSingle', params);
+				if (res.success) {
+					let list = res.list;
+					list.forEach(it => it.checkedIndex = -1); //增加当前题目用户选择的需要,默认不选中
+					this.tabData = list;
+				}
+			},
+			// 查询户型列表
+			async findHouseTypeSpaceList() {
+				// const { houseId, brandId } = getApp().globalData;
+				var parmas = {
+					brandId: 94,
+					houseId: this.houseId,
+					pageNo: 1,
+					pageSize: 2000,
+					isCloud: 1,
+				};
+				let res = await requestConfig("findHouseTypeSpaceList",parmas);
+				if (res.success && res.pageModel) {
+					let list = res.pageModel.resultSet || [];
+					list && list.forEach((item,index)=>{
+						if(item.houseJson){
+							let spaceList = JSON.parse(item.houseJson);
+							// 交换centerX, centerY
+							for (let index = 0; index < spaceList.length; index++) {
+							    var element = spaceList[index];
+							    const {centerX, centerY} = element;
+							    element.centerX = centerY;
+							    element.centerY = centerX;
+							}
+							item.houseJson = JSON.stringify(spaceList);
+							console.log("户型详情列表: ", spaceList);
+						}
+					})
+					this.houseList = res.pageModel.resultSet || [];
+				}
+			},
+			//进入下一步
+			enterAction() {
+				let index = this.tabData.findIndex(it=>it.checkedIndex==-1);
+				if(index>-1){
+					Toast({
+						message: this.tabData[index].fatherContent + '选项不能为空',
+					});
+					return false;
+				}
+				if(!this.curHouseObj){
+					Toast({
+						message: '请选择喜欢的空间',
+					});
+					return false;
+				}
+				console.log("进入订制户型: ", this.curHouseObj);
+				setStorage('curHouseObj', this.curHouseObj);
+				this.$store.dispatch('setCurHouseObj', this.curHouseObj);
+				let data = {
+					houseId:this.houseId,
+				}
+				router.push({
+					name: "webgl_rxdz_test",
+					query:data
+				});
+			},
+		}
+
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "./webgl_rxdz_houseList.scss";
+</style>

+ 1 - 1
src/pages/webgl_rxdz_roam/webgl_rxdz_roam.html

@@ -22,7 +22,7 @@
 	</canvas>
 	<!-- AI结果覆盖层 -->
 	<viewMask ref="viewMask" @switchActor="switchActor" style="z-index: 13;"
-	  :spaceObj="curSpaceObj" ></viewMask>
+	  :spaceObj="curSpaceObj" :spaceList="spaceList" ></viewMask>
 	<!-- 生成截屏的画布对象 -->
 	<canvas id="canvas" type="2d" :style="{'height':canvasHeight+'px','top':'100vh'}"></canvas>
 </div>

+ 22 - 6
src/pages/webgl_rxdz_roam/webgl_rxdz_roam.vue

@@ -628,7 +628,7 @@
 				return {cameraNewPosition,targetNewPosition,lookPosition}
 			}
 			//直接定位到摄像头位置
-			function positionCamer(mesh=null){
+			function positionCamer(mesh=null,needAni=false){
 				if(mesh){//如果传入了模型,则取模型
 					chooseMesh = mesh;
 				}
@@ -653,13 +653,20 @@
 				let data = roamPositionHandle();
 				let cameraNewPosition = data.cameraNewPosition;
 				let targetNewPosition = data.targetNewPosition;
+				targetNewPosition.z = targetNewPosition.z + 0.5;//增加偏差,防止极点翻转问题?不知道为啥会有用
 				let lookPosition = data.lookPosition;
 				creatMoveTip(cameraNewPosition);//创建移动的地标
-				camera.position.set(cameraNewPosition.x, cameraNewPosition.y, cameraNewPosition.z);
-				controls.target.set(lookPosition.x,lookPosition.y,lookPosition.z);
-				// controls.target.set(cameraNewPosition.x,cameraNewPosition.y,cameraNewPosition.z);
-				// controls.target.copy(camera.position);
-				camera.lookAt(targetNewPosition.x,targetNewPosition.y,targetNewPosition.z);
+				if(needAni){
+					let oldUp = {x:0,y:1,z:0};	//俯视
+					let newUp = {x:0,y:1,z:0};	//正视
+					tweenCamera(camera.position,controls.target,cameraNewPosition,targetNewPosition,oldUp,newUp,2000);
+				}else{
+					camera.position.set(cameraNewPosition.x, cameraNewPosition.y, cameraNewPosition.z);
+					controls.target.set(lookPosition.x,lookPosition.y,lookPosition.z);
+					// controls.target.set(cameraNewPosition.x,cameraNewPosition.y,cameraNewPosition.z);
+					// controls.target.copy(camera.position);
+					camera.lookAt(targetNewPosition.x,targetNewPosition.y,targetNewPosition.z);
+				}
 			}
 			// oldP  相机原来的位置
             // oldT  target原来的位置
@@ -855,6 +862,15 @@
                 // 获取墙体数据并且绘制墙体
                 this.getHouseTypeSpaceWalls();
             },
+			changeSpace(spaceId){
+				console.warn("***changeSpace***",spaceId,this.spaceId)
+				if(spaceId == this.spaceId){
+					return false;
+				}
+				this.spaceId = spaceId;
+				this.curSpaceObj = this.spaceList.find(it=>it.spaceId == spaceId);
+				this.positionCamer(this.curSpaceObj,true);
+			},
 			// 获取墙体数据
             async getHouseTypeSpaceWalls(){
 				let wallList = [];

+ 2 - 2
src/pages/webgl_rxdz_role/webgl_rxdz_role.html

@@ -37,13 +37,13 @@
 			<div class="tab-content rows flex-start">
 				<div @click="changeOption(index)" class="tab-item columns"
 					:class="{'tabActive': optionIndex == index}" 
-					v-for="(tab,index) in optionResponseList" :key="index" >
+					v-for="(tab,index) in options" :key="index" >
 					<img class="tab-img" :src="tab.imageUrl" mode="aspectFill" />
 					<div class="tab-text">{{tab.content}}</div>
 				</div>
 			</div>
 		</div>
-		<div class="question rows justify-center">
+		<div class="question rows justify-center" v-if="tabData && tabData[tabIndex]">
 			{{tabData[tabIndex].subName}}
 		</div>
         <!-- 底部按钮 -->

+ 54 - 29
src/pages/webgl_rxdz_role/webgl_rxdz_role.vue

@@ -5,6 +5,13 @@
 	const util = require('@/utils/util.js').default;
 	const config = require('@/services/urlConfig.js');
 	import router from "@/router";
+	import {
+		setStorage,
+		getStorage,
+	} from '@/utils/localStorage';
+	import {
+		Toast
+	} from 'mint-ui';
 	import touchHandle from '@/mixins/touchHandle.js';
 	import commonPageMethod from '@/mixins/commonPageMethod.js';
 	// const app = getApp(); //获取应用实例
@@ -47,27 +54,29 @@
 				showPhoneModel: false,
 				tabIndex: 0, //当前在第几个tab
 				optionIndex: -1, //选项选中的序号
-				optionResponseList: [], //选项数据
+				options: [], //选项数据
 				roleList: [], //角色数据,单独
-				tabData: [{
-					id: 1,
-					fatherContent: '选择角色',
-					checkedIndex: -1, //当前选中的序号
-					subName: '选择你的人物角色',
-					optionResponseList: [{
-							id: 1,
-							text: '- 爱生活 -',
-							content: '角色',
-							imageUrl: 'https://dm.static.elab-plus.com/miniProgram/role/timg17.png',
-						},
-						{
-							id: 2,
-							text: '- 爱时尚 -',
-							content: '角色',
-							imageUrl: 'https://dm.static.elab-plus.com/miniProgram/role/demo2.jpg',
-						}
-					],
-				}],
+				tabData: [
+				// 	{
+				// 	id: 1,
+				// 	fatherContent: '选择角色',
+				// 	checkedIndex: -1, //当前选中的序号
+				// 	subName: '选择你的人物角色',
+				// 	options: [{
+				// 			id: 1,
+				// 			text: '- 爱生活 -',
+				// 			content: '角色',
+				// 			imageUrl: 'https://dm.static.elab-plus.com/miniProgram/role/timg17.png',
+				// 		},
+				// 		{
+				// 			id: 2,
+				// 			text: '- 爱时尚 -',
+				// 			content: '角色',
+				// 			imageUrl: 'https://dm.static.elab-plus.com/miniProgram/role/demo2.jpg',
+				// 		}
+				// 	],
+				// },
+				],
 			}
 		},
 		/**
@@ -79,8 +88,6 @@
 			this.houseId = this.$route.query.houseId ? this.$route.query.houseId : '';
 			// this.spaceId = this.$route.query.spaceId?this.$route.query.spaceId:'';
 			this.id = this.$route.query.id ? this.$route.query.id : '109';
-			this.roleList = this.tabData[0].optionResponseList; //单独获取角色数据
-			this.optionResponseList = this.tabData[0].optionResponseList; //单独获取角色数据
 			this.queryTestcaseSingle();
 		},
 		computed: {
@@ -108,7 +115,7 @@
 					}
 				}
 			},
-
+			//查询题目数据
 			async queryTestcaseSingle() {
 				let userId = this.userId || '';
 				let params = {
@@ -120,11 +127,12 @@
 				// params.userId = this.userId;
 				const res = await requestConfig('queryTestcaseSingle', params);
 				if (res.success) {
-					let single = res.single;
-					single.fullSubQuestionList.forEach(it => it.checkedIndex = -1); //增加当前题目用户选择的需要,默认不选中
+					let list = res.list;
+					list.forEach(it => it.checkedIndex = -1); //增加当前题目用户选择的需要,默认不选中
 					this.tabIndex = 0;
-					this.tabData = this.tabData.concat(single.fullSubQuestionList);
-					this.optionResponseList = this.tabData[this.tabIndex].optionResponseList; //选项数据
+					this.tabData = list;
+					this.options = this.tabData[0].options; //选项数据
+					this.roleList = this.tabData[0].options; //单独获取角色数据
 				}
 			},
 			//切换大类
@@ -133,7 +141,7 @@
 					return
 				}
 				this.tabIndex = id;
-				this.optionResponseList = this.tabData[this.tabIndex].optionResponseList; //选项数据
+				this.options = this.tabData[this.tabIndex].options; //选项数据
 				this.optionIndex = this.tabData[this.tabIndex].checkedIndex; //获取用户已经选中的选项
 				let param = {
 					type: 'CLK', //埋点类型
@@ -164,7 +172,7 @@
 					clkId: 'clk_2cmina_24012302', //点击ID
 					clkName: 'option_clk', //点击前往的页面名称
 					clkParams: {
-						type: this.optionResponseList[this.optionIndex].content,
+						type: this.options[this.optionIndex].content,
 						locusName: "选项选择",
 					}
 				};
@@ -175,6 +183,23 @@
 				return false;
 			},
 			toMode() {
+				let index = this.tabData.findIndex(it=>it.checkedIndex==-1);
+				if(index>-1){
+					Toast({
+						message: this.tabData[index].fatherContent + '选项不能为空',
+					});
+					return false;
+				}
+				// console.log("进入订制户型: ", this.curHouseObj);
+				// setStorage('curHouseObj', this.curHouseObj);
+				// this.$store.dispatch('setCurHouseObj', this.curHouseObj);
+				let data = {
+					houseId:this.houseId,
+				}
+				router.push({
+					name: "webgl_rxdz_houseList",
+					query:data
+				});
 				// let data = {
 				// 	houseId:this.houseId,
 				// 	id:this.id,

+ 37 - 0
src/pages/webgl_rxdz_test/webgl_rxdz_test.html

@@ -0,0 +1,37 @@
+<div class="map" style="position: absolute;width: 100%;height: 100vh;z-index: 1;">
+	<mynavbar :barData='navbar'/>
+	<!-- 提交按钮 -->
+	<!-- <div class="submit-btn" @click="submitHouse" v-if="styleType==1">提交</div> -->
+	<div class="area-view">
+		<!-- <div>总面积:{{layoutArea}}<span style="font-weight: 700;">㎡</span></div> -->
+		<div class="rows style1">
+			<div v-if="changeArea" class="reduce">
+				<div>{{changeArea < 0 ? '减少':'增加'}}</div>
+				<div class="style2" >{{Math.abs(changeArea)}}<span class="style3">㎡</span></div>
+			</div>
+			<div>
+				<div>初始面积:{{fixedArea}}<span style="font-weight: 700;">㎡</span></div>
+				<div>当前面积:{{sumArea}}<span style="font-weight: 700;">㎡</span></div>
+			</div>
+		</div>
+	</div>
+    <div id="mapDiv" ref="webgl"></div>
+	<canvas id="glcanvas" width="100vw" height="100vh" ref="glcanvas"
+	 :style="{'height':canvasHeight+'px'}">
+		你的浏览器似乎不支持或者禁用了 HTML5 <code>&lt;canvas&gt;</code> 元素。
+	</canvas>
+	<!-- 主要操作视图 -->
+	<viewShell ref="viewShell" pageType="1" :overChange="overChange" :houseObj="curHouseObj" 
+	@curSpaceChange="curSpaceChange"></viewShell>
+	<!-- @click="goRoam(gltf)" -->
+	<div v-show="showLables && gltf.text.length>0 && gltf.transform" v-for="(gltf,index) in lableItem" :key="index" class="word-view"
+	:style="{'transform':gltf.transform}" >
+		<div @click="selectSpaceHandle(gltf)" v-if="styleType==2" user-select="false" :class="['number-view ',(index+1)>9?'number-more':'',currentChangeSpaceId==gltf.spaceId?' active':'']">{{gltf.spaceIndex+1}}</div>
+		<div @click="selectSpaceHandle(gltf)" v-else user-select="false" class="word" :class="currentChangeSpaceId==gltf.spaceId?'active':''">{{gltf.text}}></div>
+		<!-- 更改功能按钮 -->
+		<div class="change-view rows justify-center" @click="enterPlot(gltf)" v-if="selectSpace && selectSpace.spaceId==gltf.spaceId">更改功能</div>
+	</div>
+	<!-- <div id="labels"></div> -->
+	<!-- 左侧操作区域 -->
+	<!-- <left-operate-comp @operateHandle="operateHandle"></left-operate-comp> -->
+</div>

+ 205 - 0
src/pages/webgl_rxdz_test/webgl_rxdz_test.scss

@@ -0,0 +1,205 @@
+#mapDiv{
+    width: 100%;
+    height: 100vh;
+    background-color: #fff;
+}
+.map {
+  position: relative;  /* 作为子元素的相对定位元素 */
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+}
+#labels {
+  position: absolute;  /* 把Label定位在容器内 */
+  left: 0;             /* 默认定位在左上角 */
+  top: 0;
+  color: white;
+}
+#labels>div {
+  position: absolute;  /* 让我们的容器决定尺寸 */
+  left: 0;             /* 默认定位在左上角 */
+  top: 0;
+  cursor: pointer;     /* 当悬浮时,变为一个小手 */
+  font-size:12px;
+  user-select: none;   /* 不允许文字被选中 */
+  white-space: nowrap;
+  text-shadow:         
+    -1px -1px 0 #000,
+    0   -1px 0 #000,
+    1px -1px 0 #000,
+    1px  0   0 #000,
+    1px  1px 0 #000,
+    0    1px 0 #000,
+    -1px  1px 0 #000,
+    -1px  0   0 #000;
+}
+#labels>div:hover {
+  color: red;
+}
+canvas:focus {
+  outline:none;
+}
+canvas { width:100vw; height:calc(100vh - 200px);z-index: 10; }
+
+#canvas_webgl{
+	/* background: url(resources/images/daikanyama.jpg) no-repeat center center; */
+	/* background:#6d0909;
+	background-size: cover; */
+	/* transition: height 1s; */
+}
+/* 生成截屏的画布对象 */
+#canvas {
+	width: 100vw;
+	z-index: -1;
+	position: absolute;
+	left:0px;
+}
+.area-view{
+	position: absolute;
+	top:10px;
+	left:30px;
+	width:100%;
+	font-size: 24px;
+	font-family: "Verdana";
+	font-weight: 400;
+	z-index: 301;
+	.style1{
+		margin-top:10px;
+	}
+	.style2{
+		font-weight: 700;
+		font-size: 28px;
+	}
+	.style3{
+		font-size: 24px;
+	}
+	span{
+		font-size: 28px;
+	}
+	.reduce{
+		// width: 92px;
+		height: 72px;
+		border-radius: 12px;
+		color: #fa9f40;
+		background: rgba(250, 159, 64, 0.12);
+		font-size: 24px;
+		margin-right:10px;
+		padding:4px 10px;
+	}
+}
+.tran{
+	transition-timing-function: linear;
+	transition: height 1s;
+}
+.voice-mask{
+	position: fixed;
+	left:0px;
+	top:0px;
+	width: 100vw;
+	height:100vh;
+	z-index: 11;
+	background: rgba(0, 0, 0, 0.5);
+}
+.canvas-view{
+	position:relative;
+}
+.lable-view{
+	position:absolute;
+	width:100vw;
+}
+.word-view{
+	position: absolute; 
+	left: 0;            
+	top: 0;
+	user-select: none;  
+	z-index: 12;
+	text-align: center;
+	border-radius: 5px;
+}
+.word{
+	font-family: "Verdana";
+	font-weight: 400;
+	height: 40px;
+	line-height: 40px;
+	padding:0px 10px;
+	border-radius: 20px;
+	background: #fff;
+	font-size:26px;
+	color: #1d1d1d;
+}
+.number-view{
+	width: 30px;
+	height: 30px;
+	line-height: 30px;
+	background: #fff;
+	color: #121212;
+	font-weight: 700;
+	font-size: 28px;
+	font-family: "DIN Alternate Bold";
+	border-radius: 30px;
+}
+.number-more{
+	width: 40px;
+	height: 40px;
+	line-height: 40px;
+	border-radius: 30px;
+}
+.active{
+	background: #faad5c;
+	color: #fff;
+}
+.submit-btn{
+	position: absolute;
+	top:42px;
+	right:20px;
+	width: 140px;
+	height: 64px;
+	border-radius: 32px;
+	backdrop-filter: blur(40px);
+	background-color: rgba(255, 156, 56, 1);
+	font-family: "Verdana Bold";
+	font-weight: 700;
+	font-size: 28px;
+	color: #fff;
+	text-align:center;
+	line-height:64px;
+	z-index: 302;
+}
+.submit-btn1{
+	left:20px;
+}
+.voice-view{
+	width: 614px;
+	height: 312px;
+	border-radius: 40px;
+	background: #fff;
+	box-shadow: 0 -6px 12px #0000001f;
+	position: absolute;
+	left:50%;
+	top:50%;
+	transform: translate(-50%,-50%);
+	text-align:center;
+}
+.voice-tips{
+	font-size: 28px;
+	color: rgba(36, 36, 36, 0.51);
+	margin-top:12px;
+}
+.voice-gif{
+	width: 100%;
+	margin-top:56px;
+}
+.change-view{
+	position: absolute;
+	top: -100px;
+	left: 50%;
+	transform: translateX(-50%);
+	width: 196px;
+	height: 74px;
+	border-radius: 20px;
+	background: #3c3c3c;
+	font-family: "Verdana";
+	font-weight: 400;
+	font-size: 28px;
+	color: #fff;
+}

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 2685 - 0
src/pages/webgl_rxdz_test/webgl_rxdz_test.vue


+ 18 - 1
src/router/index.js

@@ -17,6 +17,8 @@ import webgl_rxdz_krpanoImg from '@/pages/webgl_rxdz_krpanoImg/webgl_rxdz_krpano
 import webgl_rxdz_krpano720 from '@/pages/webgl_rxdz_krpano720/webgl_rxdz_krpano720';//webgl_rxdz_krpano720
 import webgl_rxdz_krpanoclipImg from '@/pages/webgl_rxdz_krpanoclipImg/webgl_rxdz_krpanoclipImg';//webgl_rxdz_krpanoclipImg
 import webgl_rxdz_role from '@/pages/webgl_rxdz_role/webgl_rxdz_role';//角色偏好
+import webgl_rxdz_houseList from '@/pages/webgl_rxdz_houseList/webgl_rxdz_houseList';//空间偏好
+import webgl_rxdz_test from '@/pages/webgl_rxdz_test/webgl_rxdz_test';//前测-精细调整
 
 Vue.use(Router)
 const router = new Router({
@@ -131,8 +133,23 @@ const router = new Router({
 			meta:{
 				keepAlive:false
 			}
+		},
+		{
+			path: '/pages/webgl_rxdz_houseList',
+			name: 'webgl_rxdz_houseList',
+			component: webgl_rxdz_houseList,
+			meta:{
+				keepAlive:false
+			}
+		},
+		{
+			path: '/pages/webgl_rxdz_test',
+			name: 'webgl_rxdz_test',
+			component: webgl_rxdz_test,
+			meta:{
+				keepAlive:false
+			}
 		}
-		
     ],
 })
 // router.beforeRouteLeave = (to, from, next)=> {

+ 1 - 1
src/services/requestConfig.js

@@ -44,7 +44,7 @@ const endpoints = {
 	getUserVirtural: 'elab-marketing-file/virtual/getUserVirtural', // 查询用户上传的数字人 
 	addUserVirtural: 'elab-marketing-file/virtual/addUserVirtural', // 修改数字人信息
 	aliyunOpenapiUploadOss: "elab-marketing-sms/aliyun/openapi/uploadOss", // 上传文件到oss
-	queryTestcaseSingle: "elab-marketing-content/testcase/queryTestcaseSingle", // 查询单个测试数据
+	queryTestcaseSingle: "elab-marketing-content/testcase/queryTestcaseSingle/v2", // 查询单个测试数据
 	// predictions: "https://api.replicate.com/v1/deployments/feathers-wing/spacely-realistic-style-softedge-a100/predictions", // 分享查看
 };
 // var source = CancelToken.source();

+ 3 - 0
src/static/spaceTypesIE.js

@@ -0,0 +1,3 @@
+//枚举空间类型
+var spaceTypes = ["卧室", "客厅", "餐厅", "厨房", "玄关", "卫生间", "衣帽间", "收纳", "阳台", "飘窗", "链接空间", "自定义", "楼梯", "花园"];
+module.exports = spaceTypes;

+ 4 - 4
src/utils/util.js

@@ -177,9 +177,9 @@ var util = {
 			let brandId = urlObj.special_ID || $config.brandId || ''
 			//在页面参数里面手动添加path参数
 			pvCurPageParams.brandId = brandId;
-			pvCurPageParams.locusBehaviorName = para.locusBehaviorName || currentPage.locusBehaviorName || '';
-			pvCurPageParams.locusValue = para.locusValue || currentPage.locusValue || '';
-			pvCurPageParams.locusName = para.locusName || currentPage.locusName || '';
+			pvCurPageParams.locusBehaviorName = para.locusBehaviorName  || '';
+			pvCurPageParams.locusValue = para.locusValue  || '';
+			pvCurPageParams.locusName = para.locusName  || '';
 			let data = {
 				session: '',
 				userAgent: navigator.userAgent.substring(0, 255) || '',
@@ -206,7 +206,7 @@ var util = {
 				clkName: para.clkName || '',
 				pvId: para.pvId || '', //PV埋点ID
 				clkParams: typeof para.clkParams === 'object' ? JSON.stringify(para.clkParams) : (para.clkParams || ''), //点击参数
-				pvCurPageName: para.pvCurPageName || currentPage.pvCurPageName || '', //当前页面名称
+				pvCurPageName: para.pvCurPageName || '', //当前页面名称
 				pvCurPageParams: typeof pvCurPageParams === 'object' ? JSON.stringify(pvCurPageParams) : (pvCurPageParams ||''), //当前页面参数
 				pvLastPageName: para.pvLastPageName || '', //上一页页面名称
 				pvLastPageParams: para.pvLastPageParams || '', //上一页页面参数