#5 20240315

Обединени
wangs обедини 5 ревизии от elab-damai-h5/feature_柔性定制增加更改功能 във elab-damai-h5/develop преди 1 година
променени са 45 файла, в които са добавени 1449 реда и са изтрити 779 реда
  1. 0 1
      src/components/mapComponent/mapComponent.vue
  2. 1 1
      src/components/newBottomCom/viewCareful/viewCareful.html
  3. 1 1
      src/components/newBottomCom/viewCareful/viewCareful.scss
  4. 65 27
      src/components/newBottomCom/viewCareful/viewCareful.vue
  5. 14 41
      src/components/newBottomCom/viewMask/viewMask.html
  6. 16 1
      src/components/newBottomCom/viewMask/viewMask.scss
  7. 240 147
      src/components/newBottomCom/viewMask/viewMask.vue
  8. 37 0
      src/components/newBottomCom/viewPlot/viewPlot.html
  9. 176 0
      src/components/newBottomCom/viewPlot/viewPlot.scss
  10. 204 0
      src/components/newBottomCom/viewPlot/viewPlot.vue
  11. 8 3
      src/components/newBottomCom/viewShell/viewShell.html
  12. 6 3
      src/components/newBottomCom/viewShell/viewShell.scss
  13. 31 8
      src/components/newBottomCom/viewShell/viewShell.vue
  14. 24 4
      src/components/newBottomCom/viewlayout/viewlayout.html
  15. 5 2
      src/components/newBottomCom/viewlayout/viewlayout.scss
  16. 50 34
      src/components/newBottomCom/viewlayout/viewlayout.vue
  17. 1 1
      src/components/newQCCom/viewCareful/viewCareful.html
  18. 24 2
      src/components/newQCCom/viewCareful/viewCareful.vue
  19. 4 16
      src/components/newQCCom/viewMask/viewMask.vue
  20. 7 4
      src/components/newQCCom/viewPlot/viewPlot.html
  21. 7 3
      src/components/newQCCom/viewPlot/viewPlot.scss
  22. 39 18
      src/components/newQCCom/viewPlot/viewPlot.vue
  23. 4 3
      src/components/newQCCom/viewShell/viewShell.html
  24. 3 3
      src/components/newQCCom/viewShell/viewShell.scss
  25. 20 20
      src/components/newQCCom/viewShell/viewShell.vue
  26. 26 13
      src/components/newQCCom/viewlayout/viewlayout.html
  27. 5 2
      src/components/newQCCom/viewlayout/viewlayout.scss
  28. 141 340
      src/components/newQCCom/viewlayout/viewlayout.vue
  29. 76 24
      src/mixins/loadModel.js
  30. 0 3
      src/pages/webgl_rxdz/webgl_rxdz - 副本.vue
  31. 3 3
      src/pages/webgl_rxdz/webgl_rxdz.html
  32. 80 11
      src/pages/webgl_rxdz/webgl_rxdz.vue
  33. 1 1
      src/pages/webgl_rxdz_customize/webgl_rxdz_customize.html
  34. 13 3
      src/pages/webgl_rxdz_customize/webgl_rxdz_customize.vue
  35. 10 2
      src/pages/webgl_rxdz_look/webgl_rxdz_look.vue
  36. 1 1
      src/pages/webgl_rxdz_roam/webgl_rxdz_roam.html
  37. 30 8
      src/pages/webgl_rxdz_roam/webgl_rxdz_roam.vue
  38. 1 1
      src/pages/webgl_rxdz_test/webgl_rxdz_test.html
  39. 29 21
      src/pages/webgl_rxdz_test/webgl_rxdz_test.vue
  40. 32 1
      src/pages/webgl_rxdz_test_env/webgl_rxdz_test_env.vue
  41. 4 1
      src/pages/webgl_rxdz_test_roam/webgl_rxdz_test_roam.vue
  42. 1 1
      src/services/urlConfig.js
  43. 5 0
      src/store/actions.js
  44. 3 0
      src/store/mutations.js
  45. 1 0
      src/store/state.js

+ 0 - 1
src/components/mapComponent/mapComponent.vue

@@ -117,7 +117,6 @@
 				curLayoutStruct:null,//当前户型大类下所有楼层数据-用于提交
 				overChange:false,	//是否形变中
 				isIos:false,	//是否ios手机。默认不是
-				currentChangeSpaceId:null,	//当前变化的空间id
 				styleType:1,
 				controls:null,
 			}

+ 1 - 1
src/components/newBottomCom/viewCareful/viewCareful.html

@@ -6,7 +6,7 @@
 			<div class="careful-item" v-for="(carefulItem,index) in carefulList" :key="carefulItem.spaceId">
 				<div class="columns rows-between" >
 					<div class="item-top rows rows-between" :class="{active:selectIndex==index}">
-						<div class="rows">
+						<div class="rows" @click="selectSpace(carefulItem,index)">
 							<div class="index-view rows justify-center">{{carefulItem.index+1}}</div>
 							<div class="name-view eslipe" >{{carefulItem.name}}</div>
 							<div class="percent-view">{{carefulItem.percent}}%</div>

+ 1 - 1
src/components/newBottomCom/viewCareful/viewCareful.scss

@@ -12,7 +12,7 @@
 }
 .careful-list{
 	width: 100%;
-	max-height:584px;
+	max-height:380px;
 }
 .item-top{
 	width: 100%;

+ 65 - 27
src/components/newBottomCom/viewCareful/viewCareful.vue

@@ -2,8 +2,9 @@
 
 </template>
 <script>
-	// const util = require('@/static/utils/util.js');
+	const util = require('@/utils/util.js').default;
 	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';
@@ -43,6 +44,20 @@
 				},
 				deep:true,
 			},
+			curSpaceId: {
+				handler(newVal,oldVal) {
+					if (newVal) {
+						console.warn("***curSpaceId-CHANGE-viewCareful***", newVal)
+						let index = this.carefulList.findIndex(it=>it.spaceId==newVal);
+						this.selectIndex = index;
+					}
+				},
+			},
+		},
+		computed: {
+			curSpaceId() {
+				return this.$store.state.curSpaceId;
+			},
 		},
 		mixins: [],
 		async mounted() {//组件挂载时事件
@@ -64,10 +79,8 @@
 				this.lastCareList = [];
 				const spaceDetail = this.curHouseObj;
 				const spaceList = JSON.parse(spaceDetail.houseJson);
+				let result = 0;
 				spaceList && spaceList.forEach((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')){
@@ -76,39 +89,58 @@
 					if(item.hasOwnProperty('spaceWidthMax') && item.hasOwnProperty('spaceHeightMax')){
 						maxArea = parseFloat((item.spaceWidthMax * item.spaceHeightMax) / 10000).toFixed(1);
 					}
-					let text = item.spaceName;
-					// console.warn("***carefulList-change1***", item,item.spaceType)
-					if(text && !item.isSizeLock){//楼梯不显示
+					//修改为显示空间类型名称
+					let text = spaceTypes[item.spaceType - 1] || item.spaceName;
+					if(item.spaceType==15 && item.layoutSpaceType){
+						text = spaceTypes[item.layoutSpaceType - 1]; 
+					}
+					if(item.spaceName && !item.isSizeLock){//楼梯不显示
+						let curSpaceArea = Number(parseFloat(
+							(item.spaceWidth * item.spaceHeight) / 10000
+						).toFixed(1));
 						let data = {
 							spaceId:item.spaceId,
 							index:this.carefulList.length,
 							name:text,
-							area:parseFloat(curSpaceArea),
-							percent:null,
+							area:curSpaceArea,
+							percent:0,
 							minArea:parseFloat(minArea),	//最小面积
 							maxArea:parseFloat(maxArea),	//最大面积
 						}
+						result = result + curSpaceArea;
 						this.carefulList.push(data);
 						this.lastCareList.push({
 							spaceId:item.spaceId,
 							index:this.carefulList.length,
-							area:parseFloat(curSpaceArea),
+							area:curSpaceArea,
 						})
 					}
 				})
-				
-				let result = this.carefulList.reduce((prev, cur)=>{
-				    return prev + parseFloat(cur.area);
-				},0);
+				// let result = this.carefulList.reduce((prev, cur)=>{
+				//     return prev + parseFloat(cur.area);
+				// },0);
 				this.carefulList.forEach(it=>{
 					if(!result){
 						it.percent = 100;
 					}else{
 						it.percent = (parseFloat(it.area) / parseFloat(result)*100).toFixed(0);
 					}
+					// console.warn("***carefulList-change1***", it.area,it)
 				})
+				if(this.curSpaceId){
+					let index = this.carefulList.findIndex(it=>it.spaceId==this.curSpaceId);
+					this.selectIndex = index;
+				}
 				console.warn("***viewCareful-change***", this.carefulList)
 			},
+			updataData(spaceId,layoutObj){
+				let lable = this.carefulList.find(it=>it.spaceId == spaceId);
+				let name = spaceTypes[layoutObj.type - 1];
+				if(lable){
+					lable.name = name;
+				}
+				console.warn("***updataData***",lable)
+			},
 			sliderChanging(e,item) {
 				// const wallValue = e.detail.value;
 				// item.percent = 60;
@@ -124,7 +156,7 @@
 					return false;
 				}
 				this.selectIndex = index;
-				this.$parent.$parent.selectSpaceId = item.spaceId;
+				// this.$parent.$parent.selectSpaceId = item.spaceId;
 				let _area = value - parseFloat(item.area);
 				if(_area==0){
 					return false;
@@ -139,20 +171,12 @@
 					clkId: 'clk_2cmina_23080405', //点击ID
 					clkName: 'zoomin_clk', //点击前往的页面名称
 					clkParams: {
-						locusName: "精细调整放大",
+						locusName: this.curHouseObj.houseType + "·" + this.$parent.$parent.fixedArea + " " + this.curHouseObj.note,
+						locusValue:this.carefulList[index].name + "面积由" + parseFloat(item.area).toFixed(1)
+						+ "㎡调整为"+ value + "㎡",
 					}
 				};
-				if(_area<0){//缩小
-					param = {
-						type: 'CLK', //埋点类型
-						clkId: 'clk_2cmina_23080406', //点击ID
-						clkName: 'zoomout_clk', //点击前往的页面名称
-						clkParams: {
-							locusName: "精细调整缩小",
-						}
-					};
-				}
-				// util.trackRequest(param);
+				util.trackRequest(param);
 				console.log("发送消息-空间变化: ",data, JSON.stringify(item));
 				// this.selectItem = item;
 				item.area = value;
@@ -161,10 +185,24 @@
 				this.$parent.$parent.callBackFun = this.callBack;//向父页面注册通知回调函数
 				this.$emit("curSpaceChange",data);//通知父组件-空间面积变化
 			},
+			selectSpace(item,index){
+				this.selectIndex = index;
+				this.$parent.$parent.curSpaceSelect(item);//向父页面通知空间被选中了
+			},
 			//去往详情页面
 			goRoam(){
 				let item = this.lastCareList[this.selectIndex];
 				this.$parent.$parent.goRoam1(item.spaceId);
+				let param = {
+					type: 'CLK', //埋点类型
+					clkId: 'clk_2cmina_24012901', //点击ID
+					clkName: 'AI_clk', //点击前往的页面名称
+					clkParams: {
+						locusName: "AI精软装",
+						carefulList:this.carefulList
+					}
+				};
+				util.trackRequest(param);
 			},
 			callBack(type){
 				console.warn("***callBack***",type)

+ 14 - 41
src/components/newBottomCom/viewMask/viewMask.html

@@ -13,7 +13,7 @@
 			    :src="item.image"
 				fit='cover'
 			    >
-			  </el-image>
+			</el-image>
 		</el-carousel-item>
 	</el-carousel>
 	<div class="indicator-view rows" v-if="aiImagesList && aiImagesList.length>1 && showAIImage">
@@ -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.text}}</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="submitHouse">
+					提交空间清单
 				</div>
 			</div>
 		</div>
@@ -104,37 +110,4 @@
 		<img src="https://skyforest.static.elaber.cn/detail/loading.gif" alt="" />
 		<div class="loadingMsg">{{loadingMsg}}</div>
 	</div>
-	<!-- <div class="dialog">
-		
-	</div> -->
-	<el-dialog
-		title="提醒"
-		:visible.sync="dialogVisible"
-		width="80%"
-		top="35vh"
-		:modal="false"
-		style="pointer-events: auto;"
-		:before-close="cancelHandle"
-		>
-		<span>当前AI使用火爆,请继续尝试</span>
-		<span slot="footer" class="dialog-footer">
-			<el-button @click.stop="cancelHandle();">取消等待</el-button>
-			<el-button type="primary" @click.stop="confirmHandle(1);">继续尝试</el-button>
-		</span>
-	</el-dialog>
-	<el-dialog
-		title="提醒"
-		:visible.sync="dialogAIVisible"
-		width="80%"
-		top="35vh"
-		:modal="false"
-		style="pointer-events: auto;"
-		:before-close="cancelHandle"
-		>
-		<span>AI开了小差,是否重新生成</span>
-		<span slot="footer" class="dialog-footer">
-			<el-button @click.stop="cancelHandle();">放弃生成</el-button>
-			<el-button type="primary" @click.stop="confirmHandle(0);">继续生成</el-button>
-		</span>
-	</el-dialog>
 </div>

+ 16 - 1
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;
@@ -429,4 +438,10 @@
 		box-sizing: border-box;
 	}
 	    
+}
+::-webkit-scrollbar {
+    width: 0;
+    height: 0;
+    color: transparent;
+	display: none;
 }

+ 240 - 147
src/components/newBottomCom/viewMask/viewMask.vue

@@ -3,9 +3,15 @@
 </template>
 <script>
 	const util = require('@/utils/util.js').default;
+	import router from "@/router";
 	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 {
+		setStorage,
+		getStorage,
+	} from '@/utils/localStorage';
 	// import requestConfig from '@/static/lib/requestConfig';
 	// const app = getApp(); //获取应用实例
 	export default {
@@ -34,79 +40,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,
@@ -228,8 +162,10 @@
 						resultImg:'',
 					}
 				],
-				dialogVisible: false,
-				dialogAIVisible: false,
+				// dialogVisible: false,
+				// dialogAIVisible: false,
+				datalist:[],
+				curSpaceId:'',
 			}
 		},
 		props:{
@@ -237,19 +173,53 @@
 				type: Object,
 				default: null,
 			},
+			spaceList: {
+				type: [Array ,Object],
+				default: [],
+			},
+			layoutList:{
+				type: [Array ,Object],
+				default: [],
+			}
 		},
 		watch: {
 			spaceObj(newVal, oldVal) {
 				if (newVal == null) {
 					return;
 				}
-				console.log("当前空间数据view-mark-watch:", newVal);
+				console.log("当前空间数据view-mark-watch:", newVal,newVal.layoutSpaceName,newVal.layoutSpaceType);
 				this.getAiBeautyFamily();
 				// this.curSpaceArea = parseFloat(
 				// 	(newVal.spaceWidth * newVal.spaceHeight) / 10000
 				// ).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);
+						}
+					})
+				}
+			},
+			layoutList(newVal, oldVal) {
+				if (newVal == null) {
+					return;
+				}
+				this.updataLable();
+			},
+		},
+		filters:{
+		// 	spaceTypeFilter(type){
+		// 		let name = spaceTypes[type - 1];
+		// 		return name || '-'
+		// 	},
 		},
 		mounted() {//组件挂载时事件
 			// console.warn("***mounted-nav***",this.seedItem)
@@ -278,13 +248,6 @@
 				this.screenHeight = Math.min(window.innerHeight,window.screen.height)
 			}
 		},
-		// 页面被展示时执行
-		onPageShow: function() {  
-			
-		},
-		//页面被隐藏时执行
-        onPageHide: function() {
-        },
 		beforeDestroy:function(){
 			console.warn("***beforeDestroy***");//更新到页面上的数据
 			this.stopInterval();
@@ -296,13 +259,51 @@
 			curHouseObj() {
 				return this.$store.state.curHouseObj;
 			},
+			userId() {
+				return this.$store.state.userId;
+			},
 		},
 		methods:{
+			//更改空间显示名称 X空间 类型 根据布局所属类型来显示
+			updataLable(){
+				let list = this.layoutList;
+				this.datalist.forEach(lable=>{
+					if(lable.spaceType==15){
+						let layoutId = lable.layoutId;
+						let layout = list.find(it=>it.id == layoutId);
+						if(layout){
+							let name = spaceTypes[layout.type - 1];
+							lable.text = name;
+						}
+					}else{
+						let name = spaceTypes[lable.spaceType - 1];
+						lable.text = name;
+					}
+				})
+				this.$forceUpdate()
+				console.warn("***updataLable***",this.datalist)
+			},
 			swiperChangeImg(e){
 				this.currentIndex = e.detail?e.detail.current:e;
 				this.checked = this.aiImagesList[this.currentIndex].checked;
 				console.warn("***swiperChangeImg***",this.checked);//更新到页面上的数据
 			},
+			//切换空间
+			changeSpace(item){
+				this.$parent.changeSpace(item.spaceId);
+				let param = {
+					type: 'CLK', //埋点类型
+					clkId: 'clk_2cmina_23080417', //点击ID
+					clkName: 'changeangle_clk', //点击前往的页面名称
+					clkParams: {
+						locusName: "空间切换",
+						locusValue:item.text,
+						spaceId:item.spaceId,
+						type:item.text,
+					}
+				};
+				util.trackRequest(param);
+			},
 			//视角切换
 			switchActor(){
 				// this.$parent.clearHandle()
@@ -430,7 +431,10 @@
 						return it.spaceId == this.spaceObj.spaceId
 					})
 					if(space){
-						space.aiImagesList[this.currentIndex].checked = this.checked;
+						let cind = space.aiImagesList.find(it=>it.image == this.aiImagesList[this.currentIndex].image)
+						if(cind){
+							cind.checked = this.checked;
+						}
 					}
 				}
 				if(this.checked){
@@ -480,10 +484,6 @@
 					})
 				}
 			},
-			//返回上一页
-			goback(){
-				this.$router.go(-1);
-			},
 			mynavigateFuc(e) {
 				if (e) {
 					// this.$parent.clearHandle();
@@ -510,25 +510,16 @@
 			async getAiBeautyFamily() {
 				// const spaceName = this.spaceTypes[this.spaceObj.spaceType - 1].title;
 				let res = await requestConfig("getHardboundEffects", {
-					"houseId": this.$route.query.houseId,
-					"spaceType": this.spaceObj.spaceType,
-					"spaceName": this.spaceObj.spaceName,
+					"houseId": this.$route.query.houseId || this.$store.state.houseId,
+					"spaceType": this.spaceObj.layoutSpaceType || this.spaceObj.spaceType,
+					"spaceName": this.spaceObj.layoutSpaceName || this.spaceObj.spaceName,
 				});
 				this.styleList = [];
+				// alert("***getAiBeautyFamily-res***"+JSON.stringify(res))
 				if (res.success) {
 					let list = res.list;
 					this.styleList = list;
 				}
-				if(!this.styleList || this.styleList.length==0){
-					// this.disableAble = true;//不能点击-没有风格
-					let unit = this.screenWidth / 750;//单位rpm 对应 px 的值
-					this.$parent.canvasHeight = this.screenHeight - (208 * unit);
-					this.$parent.camera.aspect = this.screenWidth / this.$parent.canvasHeight;
-					this.$parent.camera.updateProjectionMatrix();
-					this.$parent.renderer.setSize(this.screenWidth, this.$parent.canvasHeight);
-				}else{
-					// this.disableAble = false;//可以点击
-				}
 			},
 			//风格选择
 			selectStyle(idx){
@@ -609,30 +600,6 @@
 					util.trackRequest(param);
 				}
 			},
-			image2Base64(imgUrl) {//导入的图片路径
-				var toBase64= new Promise(function(resolve, reject){
-				    window.URL = window.URL || window.webkitURL;
-				    var xhr = new XMLHttpRequest();
-				    xhr.open("get", imgUrl, true);
-				    // 至关重要
-				    xhr.responseType = "blob";//文件流
-				    xhr.onload = function (res) {
-				        if (res.currentTarget.status == 200) {
-				            //得到一个blob对象
-				            var blob = res.currentTarget.response;
-				            // 至关重要
-				            let oFileReader = new FileReader();
-				            oFileReader.onloadend = function (e) {
-					            let base64 = e.target.result;//base64
-					            resolve(base64)
-				            };
-				            oFileReader.readAsDataURL(blob);
-				        }
-			        }
-				    xhr.send();
-			    });
-				return toBase64;
-			},
 			changeImg2Base64(url, isRepeat) {
 				var self = this;
 				if(isRepeat && self.inputBase64Url){//重复使用
@@ -713,6 +680,7 @@
 						parmas.model = "deployments/elabgroup/elab-ssd-1b";
 					}
 				}
+				this.curSpaceId = this.spaceObj.spaceId;//生成时的空间id
 				let result = await this.prevHandle(parmas);
 				console.warn("***prevHandle***",result)
 				if(result && result.length>0){
@@ -885,15 +853,11 @@
 			},
 			confirmHandle(type){
 				console.log('用户点击确定')
-				this.dialogVisible = false;
-				this.dialogAIVisible = false;
 				this.subType = type || 0;
 				this.startServer();
 			},
 			cancelHandle(){
 				console.log('用户点击取消')
-				this.dialogVisible = false;
-				this.dialogAIVisible = false;
 				this.subType = 0;
 			},
 			//获取生成图结果
@@ -999,25 +963,12 @@
 					if(random >= 100){
 						random = 99;
 					}
-					// uni.showLoading({
-					// 	icon: 'loading',
-					// 	title: '生成中…' + parseInt(random) + '%'
-					// })
-					// if(!this.showAIImage){
-						this.myloading = true;
-						this.loadingMsg = '生成中…' + parseInt(random) + '%';
-					// }
+					this.myloading = true;
+					this.loadingMsg = '生成中…' + parseInt(random) + '%';
 					this.getOutPicture();
 				}else if(single.status=='succeeded'){
-					// uni.showLoading({
-					// 	icon: 'loading',
-					// 	title: '生成中…100%',
-					// 	duration:2000,
-					// })
-					// if(!this.showAIImage){
-						this.myloading = true;
-						this.loadingMsg = '生成中…100%';
-					// }
+					this.myloading = true;
+					this.loadingMsg = '生成中…100%';
 				}
 			},
 			//返回结果处理
@@ -1032,6 +983,8 @@
 					image:newImage,
 					checked:false,
 					list:[newImage],
+					spaceId:this.curSpaceId,//记录下当前生成的AI图是哪个空间的,因为会切换空间
+					aiStyleName:aiStyleName,
 				}
 				this.aiImagesList.push(_data);
 				this.showAIImage = true;//显示AI结果集合-因为生成了AI图片
@@ -1069,11 +1022,151 @@
 				this.stopInterval();
 				if(this.aiImagesList.length>1){
 					setTimeout(()=>{
-						// this.$refs.carousel.next();
 						this.$refs.carousel.setActiveItem(this.aiImagesList.length-1);//切换到最后一张
 					}, 1000);
 				}
 			},
+			//空间数据整理
+			spaceAIHandle(){
+				let curHouseObj = this.$parent.curHouseObj;//当前户型数据对象
+				let aiImagesList = this.aiImagesList;//AI生成图数据对象
+				let wallList = this.$parent.wallList;//当前户型墙体数据列表对象
+				let spaceList =  JSON.parse(curHouseObj.houseJson);
+				
+				//遍历当前户型下的每一个空间
+				spaceList.forEach((item)=>{
+					let space = item;
+					let list = aiImagesList.filter(it=>it.spaceId==space.spaceId);//找到AI生成图中的当前空间
+					if(list && list.length>0){
+						list = list.filter(it=>it.checked==true);//过滤选中的
+						list = list.map(it=>{
+							return it.image
+						})
+						space.hardboundEffect = list;
+						console.warn("submitHouse: ", list,space);
+					}
+					let wall = wallList.find(it=>it.id==space.wallId);
+					if(wall){//找到当前空间的墙体数据
+						space.wallList = JSON.stringify(wall);
+					}
+				})
+				setStorage('spaceList', spaceList);//把空间选择的数据存入本地缓存里面,方便后续使用
+				console.warn("**spaceList**",spaceList)
+			},
+			async submitHouse(){
+				const loading = this.$loading({
+					lock: true,
+					text: '提交中...',
+					spinner: 'el-icon-loading',
+					background: 'rgba(0, 0, 0, 0.7)'
+				});
+				let shottingImg = getStorage('shottingImg');//把空间选择的数据存入本地缓存里面,方便后续使用
+				console.warn("***shottingImg***",shottingImg);
+				let userId = this.userId ? this.userId : '';
+				let curLayoutStruct = JSON.parse(getStorage('curLayoutStruct')) ;//获取楼层的数据-户型数组
+				let curHouseObj = this.$parent.curHouseObj;//当前户型数据对象
+				let curHouseType = setStorage('curHouseType');//把楼层的数据存入缓存中
+				let curHouseName = setStorage('curHouseName');//把楼层的数据存入缓存中
+				let param = {
+					"brandId": $config.brandId,
+					"houseId": curHouseObj.houseId,
+					"userId": userId,
+					"floot": curHouseObj.houseFloor,
+					"spaceName": curHouseName,
+					"spaceStructure": curHouseType,
+					"curFloor":curHouseObj.houseFloor,
+					layoutStruct:[],
+				}
+				let wallList = this.$parent.wallList;//当前户型墙体数据列表对象
+				//处理每一个楼层
+				curLayoutStruct.forEach((layoutStruct,index)=>{
+					let houseData = {
+						"layoutId": layoutStruct.id,
+						"layoutName": layoutStruct.name,
+						"layoutArea": layoutStruct.houseArea,
+						"floor": layoutStruct.houseFloor,
+						"layoutImgCustomized": shottingImg,
+						"style": "",
+						"houseJson": []
+					}
+					let spaceList =  JSON.parse(layoutStruct.houseJson);
+					let styleList = [];
+					//遍历当前户型下的每一个空间
+					spaceList.forEach((item)=>{
+						let space = JSON.parse(JSON.stringify(item));
+						//找到当前空间对象对应的AI数据对象
+						let AISpace = null;
+						AISpace = this.aiData && this.aiData.find(it=>{
+							return it.houseFloor == layoutStruct.houseFloor && it.spaceId == space.spaceId
+						});
+						if(AISpace){
+							let list = AISpace.aiImagesList.filter(it=>it.checked==true);//过滤选中的
+							list.forEach(it=>{
+								styleList.push(it.aiStyleName);
+							})
+							list = list.map(it=>{
+								return it.image
+							})
+							space.hardboundEffect = list;
+							console.warn("submitHouse: ", list,space);
+						}
+						let wall = wallList.find(it=>it.id==space.wallId);
+						if(wall){//找到当前空间的墙体数据
+							space.wallList = JSON.stringify(wall);
+						}
+						houseData.houseJson.push(space)
+					})
+					//寻找styleList里面出现最多次数的风格
+					if(styleList && styleList.length>0){
+						let maxEle = styleList[0];
+						let maxNum = 1;
+						styleList.reduce((p,k)=>{
+							p[k] ? p[k]++ : p[k]=1;
+							if(p[k] > maxNum){
+								maxEle = k;
+								maxNum ++
+							}
+							return p;
+						},{});
+						houseData.style = maxEle;
+					}
+					param.layoutStruct.push(houseData)
+				})
+				param.expand = getStorage('expand') || ''
+				console.warn("submitHouse-param: ", param);
+				let trackparam = {
+					type: 'CLK', //埋点类型
+					clkId: 'clk_2cmina_23080409', //点击ID
+					clkName: 'submit_clk', //点击前往的页面名称
+					clkParams: {
+						locusName: "数据提交",
+						postAIData:this.aiData,
+					}
+				};
+				util.trackRequest(trackparam);
+				let res = await requestConfig("saveCustomizedRecord", param);
+				loading.close();
+				if(res && res.success && res.single){//提交成功
+					let data = {
+						houseId:this.houseId,
+						id:res.single,
+					}
+					router.push({
+						name: "webgl_rxdz_customize",
+						query:data
+					});
+				}
+			},
+			//进入下一步
+			gonext(){
+				this.spaceAIHandle()
+				router.push({
+					name: "webgl_rxdz_test_env",
+					query:{
+						houseId:this.$route.query.houseId || this.$store.state.houseId,
+					}
+				});
+			},
 			showToast(title,time=3000){
 				this.myloading = false;
 				this.$store.state.loading = true;

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

@@ -0,0 +1,37 @@
+<!-- 布局切换操作视图 -->
+<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="changeType(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  rows flex-start">
+			<div @click="changeOption(item,index)" class="item columns"
+				:class="{'active': selectIndex == index}" 
+				v-for="(item,index) in plotList[tabIndex].dataList" :key="index" >
+				<img class="img" :src="item.renderImage" mode="aspectFill" />
+				<!-- <div class="gou rows justify-center">√</div> -->
+				<i class="iconfont icon-Hook-1 gou rows justify-center"></i>
+				<div class="text eslipe">{{item.name}}</div>
+			</div>
+		</div>
+	</div>
+	<div class="btn-list rows rows-between" v-if="unSelect">
+		<div class="btn rows up up3 justify-center">确认</div>
+	</div>
+	<div class="btn-list rows rows-between" v-else>
+		<div class="btn rows up up2 justify-center" @click="confirm">确认</div>
+	</div>
+</div>

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

@@ -0,0 +1,176 @@
+.plot-view{
+	position: relative;
+	width: auto;
+	box-sizing: border-box;
+	z-index: 12;
+	padding-top: 0px;
+	.title{
+		font-family: "Verdana Bold";
+		font-weight: 700;
+		font-size: 32px;
+		color: #000;
+		margin-bottom: 30px;
+	}
+	.close{
+		position: absolute;
+		right: -50px;
+		top: -40px;
+		width: 30px;
+		height: 30px;
+		color: rgba(0, 0, 0, 0.22);
+		font-size: 30px;
+		padding: 60px;
+		z-index: 99;
+	}
+}
+.swiper-view{
+	position: relative;
+	width: 100%;
+	height: 98px;
+	// top:926px;
+	overflow-x: auto;
+	overflow-y: hidden;
+	margin-bottom: 30px;
+	z-index: 9;
+	box-sizing: border-box;
+	.tab-content{
+		position: absolute;
+		box-sizing: border-box;
+	}
+	.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;
+		height: 98px;
+		&.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{
+			position: relative;
+			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: 30px;
+	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%);
+}
+.up3{
+	color: rgba(255, 255, 255, 1);
+	background-image:linear-gradient(124deg, #ccc 0%, #ccc 100%);
+}

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

@@ -0,0 +1,204 @@
+<template src="./viewPlot.html">
+
+</template>
+<script>
+	const util = require('@/utils/util.js').default;
+	const config = require('@/services/urlConfig.js');
+	import spaceTypes from '@/static/spaceTypesIE.js';
+	import {
+		Toast
+	} from 'mint-ui';
+	import {
+		getStorage,
+	} from '@/utils/localStorage';
+	// 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,
+				lastTabIndex:0,
+				selectSpace:null,
+				plotList:[],//布局数据
+				spaceList:[],
+				unSelect:false,
+			}
+		},
+		props:{
+			overChange: {//当前页面是否处在忙碌状态
+				type: Boolean,
+				default: false,
+			},
+			curHouseObj: {//当前展示的户型
+				type: Object,
+				default: () => {
+					return null
+				}
+			},
+		},
+		watch: {
+			curHouseObj: {
+				handler(newVal,oldVal) {
+					if (newVal) {
+						console.warn("***curHouseObj-CHANGE-viewPlot***", newVal)
+						let spaceDetail = newVal;
+						let spaceList = JSON.parse(spaceDetail.houseJson);
+						this.spaceList = spaceList;
+					}
+				},
+			},
+			curSpaceId: {
+				handler(newVal,oldVal) {
+					if (newVal) {
+						console.warn("***curSpaceId-CHANGE-viewPlot***", newVal,oldVal)
+						// this.initData();
+					}
+				},
+			},
+		},
+		computed: {
+			curSpaceId() {
+				return this.$store.state.curSpaceId;
+			},
+		},
+		async mounted() {//组件挂载时事件
+			// var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
+		},
+		methods:{
+			//初始化数据
+			initData(){
+				console.warn("***initData***",this.curSpaceId,this.spaceList)
+				const spaceDetail = this.spaceList.find(it=>it.spaceId == this.curSpaceId);
+				this.selectSpace = spaceDetail;
+				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;
+				}
+				this.tabIndex = 0;
+				this.plotList = [];
+				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.count ++;
+						data.dataList.push(item);
+					}
+					if(item.id==this.selectSpace.layoutId){
+						let index = this.plotList.findIndex(it=>it.type==item.type);
+						this.tabIndex = index;
+						this.selectIndex = this.plotList[this.tabIndex].dataList.findIndex(it=>it.id==this.selectSpace.layoutId);;
+						this.lastTabIndex = this.tabIndex;
+						this.unSelect = true;
+					}
+				});
+				console.warn("***viewPlot***", this.plotList,this.selectSpace,this.unSelect)
+			},
+			changeType(index){
+				this.tabIndex=index;
+				this.selectIndex=0;
+				let item = this.plotList[this.tabIndex].dataList[this.selectIndex];
+				if(item.id==this.selectSpace.layoutId){
+					this.unSelect = true;
+				}else{
+					this.unSelect = false;
+				}
+			},
+			//切换选项
+			changeOption(item,id) {
+				if (id == this.selectIndex) {
+					return false;
+				}
+				this.selectIndex = id;
+				if(item.id==this.selectSpace.layoutId){
+					this.unSelect = true;
+				}else{
+					this.unSelect = false;
+				}
+				// 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)
+			},
+			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];
+				if(!plot){
+					Toast({
+						message: '请选择具体的布局',
+					});
+					return false
+				}
+				let typeName = this.plotList[this.lastTabIndex].name;
+				let newTypeName = this.plotList[this.tabIndex].name;
+				let optionName = this.plotList[this.tabIndex].dataList[this.selectIndex].name;
+				let param = {
+					type: 'CLK', //埋点类型
+					clkId: 'clk_2cmina_24012302', //点击ID
+					clkName: 'option_clk', //点击前往的页面名称
+					clkParams: {
+						locusName: this.curHouseObj.houseType + "·" + this.curHouseObj.houseArea + " " + this.curHouseObj.note,
+						locusValue: typeName + "调整为" + newTypeName + "-" + optionName,
+					}
+				};
+				util.trackRequest(param);
+				this.selectSpace.layoutId = plot.id;
+				this.unSelect = true;
+				this.$parent.$parent.userSelectPlot(plot,this.selectSpace);//告知页面,用户选择的布局id
+				this.lastTabIndex = this.tabIndex;
+			},
+			// 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>

+ 8 - 3
src/components/newBottomCom/viewShell/viewShell.html

@@ -1,5 +1,5 @@
 <!-- 弹出层的壳子 -->
-<div class="shell-view" :class="styleType==2?'shell-view2':''">
+<div class="shell-view" :class="styleType==2?'shell-view2':(styleType==3?'shell-view3':'')">
 	<!-- 楼层 -->
 	<div class="floor-view" v-if="pageType==1 && floorList&&floorList.length>1">
 		<div class="floor-item rows justify-center" :class="floorId==floor.id?'active':''" 
@@ -26,8 +26,13 @@
 	</div> -->
 	<!-- 精细化视图 -->
 	<viewCareful ref="viewCareful" v-show="styleType==2" @curSpaceChange="curSpaceChange" :overChange="overChange" :curHouseObj="houseObj"></viewCareful>
-	<!-- 种子户型视图 -->
-	<viewlayout ref="viewlayout" @curSpaceChange="curSpaceChange" :styleType="styleType" :overChange="overChange" :curHouseObj="houseObj" :houseList="houseList" @upCom="upCom" @streamRecord="streamRecord" @streamRecordEnd="streamRecordEnd" @seedChange="seedChange"></viewlayout>
+	<!-- 布局选择 -->
+	<viewPlot ref="viewPlot" v-show="styleType==3" @curSpaceChange="curSpaceChange"
+	:overChange="overChange" :curHouseObj="houseObj"></viewPlot>
+	<!-- 底部按钮视图 -->
+	<viewlayout ref="viewlayout" @curSpaceChange="curSpaceChange" :styleType="styleType" 
+	:overChange="overChange" :curHouseObj="houseObj" :houseList="houseList" @changeStyle="changeStyle"
+	@streamRecord="streamRecord" @streamRecordEnd="streamRecordEnd" @seedChange="seedChange"></viewlayout>
 	<!-- nav视图 -->
 	<!-- <viewToolNav v-show="pageType==1 && (styleType==2 || styleType==3)" :seedItem="seedItem" @downCom="downScroll"></viewToolNav> -->
 	<!-- 风格选择视图 -->

+ 6 - 3
src/components/newBottomCom/viewShell/viewShell.scss

@@ -6,7 +6,7 @@
 	left: 0px;
 	bottom: 0px;
 	width: 100vw;
-	height: 200px;
+	height: 170px;
 	border-radius: 40px 40px 0 0;
 	background: #fff;
 	box-shadow: 0 -6px 12px #0000001f;
@@ -14,11 +14,14 @@
 	z-index: 315;
 	padding:0px 40px;
 	padding-top:30px;
-	padding-bottom:60px;
+	padding-bottom:30px;
 	transition: height 1s;
 }
 .shell-view2{
-	height: 800px;
+	height: 600px;
+}
+.shell-view3{
+	height: 600px;
 }
 .shell-signscoll{
 	position: absolute;

+ 31 - 8
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:{
@@ -88,11 +91,11 @@
 							this.shellHeight = '200px';
 							_endHeight = 200;
 						}else if(newVal==2){//变更为展开状态
-							this.shellHeight = '800px';
-							_endHeight = 800;
-						}else if(newVal==3){//变更为最小状态
-							this.shellHeight = '200px';
-							_endHeight = 200;
+							this.shellHeight = '600px';
+							_endHeight = 600;
+						}else if(newVal==3){//变更为更改功能
+							this.shellHeight = '600';
+							_endHeight = 600;
 						}
 						// 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,6 +134,19 @@
         	// console.warn("***detached-hide***")
         },
 		methods:{
+			changeStyleType(type,selectSpace){
+				console.warn("***changeStyleType***",this.lastStyleType)
+				if(this.styleType != type){
+					this.lastStyleType = this.styleType;//记录下当前的状态,因为会返回到这个状态
+				}
+				this.styleType = type;
+				this.selectSpace = selectSpace;
+			},
+			rebackLast(){
+				console.warn("***rebackLast***",this.lastStyleType)
+				this.styleType = 2;//返回记录下的状态
+				this.selectSpace = null;
+			},
 			initData(){
 				let houseList = this.houseList;
 				// let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
@@ -199,9 +216,15 @@
 				}
 			},
 			//子组件通知上划到状态2
-			upCom(){
-				if(this.styleType==1 || this.styleType==3){//初始状态 或者 收缩状态
-					this.styleType = 2;//变更为展开状态
+			// upCom(type){
+			// 	if(this.styleType==1 || this.styleType==3){//初始状态 或者 收缩状态
+			// 		this.styleType = 2;//变更为精细化状态
+			// 	}
+			// },
+			changeStyle(style){
+				this.styleType = style;//打开功能空间
+				if(this.styleType == 3){//功能变更
+					this.$refs.viewPlot.initData()
 				}
 			},
 			curSpaceChange(data){

+ 24 - 4
src/components/newBottomCom/viewlayout/viewlayout.html

@@ -3,20 +3,40 @@
 <div class="layout-view">
 	<!-- 种子区域 -->
 	<div>
-		<div class="btn-list rows rows-between" v-if="styleType==1 || styleType==3">
+		<div class="btn-list rows rows-between" v-if="styleType==1">
 			<!-- <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 rows up justify-center" @click="upCom" :class="styleType==1?'up1':'up2'">开始定制户型 ></div>
+			<!-- 版本2 -->
+			<!-- <div class="btn rows up justify-center" @click="upCom" :class="styleType==1?'up1':'up2'">开始定制户型 ></div> -->
 			
+			<div class="btn houseType rows justify-center up2" @click="openLayout(2)">
+				<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-else-if="styleType==2">
-			<div class="btn houseType rows justify-center up2" >
-				<div class="iconfont icon-huxingjianshang style1"></div>户型空间
+			<div class="btn houseType rows justify-center up2" @click="openLayout(3)" v-if="showX">
+				<div class="iconfont icon-huxingjianshang style1"></div>更改功能
+			</div>
+			<div class="btn houseType rows justify-center up3" @click="openLayout(3)" v-else>
+				<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-else-if="styleType==3">
+			<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>
 </div>

+ 5 - 2
src/components/newBottomCom/viewlayout/viewlayout.scss

@@ -2,7 +2,7 @@
 	position: fixed;
 	left: 30px;
 	bottom: 0px;
-	padding-bottom: 60px;
+	padding-bottom: 30px;
 	width: 690px;
 	z-index: 15;
 	background-color: rgba(255, 255, 255, 1);
@@ -71,7 +71,10 @@
 	color: rgba(255, 255, 255, 1);
 	background-image:linear-gradient(124deg, rgba(245, 201, 82, 1) 0%, rgba(239, 149, 57, 1) 100%);
 }
-
+.up3{
+	color: rgba(255, 255, 255, 1);
+	background-image:linear-gradient(124deg, #ccc 0%, #ccc  100%);
+}
 .houseType{
 	width: 320px;
 	box-shadow: 0 6px 20px #f2980233;

+ 50 - 34
src/components/newBottomCom/viewlayout/viewlayout.vue

@@ -4,6 +4,9 @@
 <script>
 	// const util = require('@/static/utils/util.js');
 	const config = require('@/services/urlConfig.js');
+	import {
+		Toast
+	} from 'mint-ui';
 	// import Bus from '@/common/bus';
 	// import commonMethod from '@/common/commonMethod.js';
 	// import requestConfig from '@/static/lib/requestConfig';
@@ -38,6 +41,8 @@
 				smaillWord:"变小,缩放,小一点,变窄",
 				smaillWordPY:"bianxiao,suofang,xiaoyidian,bianzhai",
 				changeRate:0.05,	//每次变化的比例
+				spaceList:[],
+				showX:false,
 			}
 		},
 		props: {
@@ -75,13 +80,36 @@
 				handler(newVal,oldVal) {
 					if (newVal) {
 						console.warn("***curHouseObj-CHANGE-layout***", newVal)
-						if((oldVal && oldVal.id != newVal.id) || !oldVal){
-							this.initSpanceData();
+						// if((oldVal && oldVal.id != newVal.id) || !oldVal){
+						// 	this.initSpanceData();
+						// }
+						const spaceDetail = newVal;
+						this.spaceList = JSON.parse(spaceDetail.houseJson);
+					}
+				},
+			},
+			curSpaceId: {
+				handler(newVal,oldVal) {
+					if (newVal) {
+						console.warn("***curSpaceId-CHANGE-layout***", newVal)
+						// if((oldVal && oldVal.id != newVal.id) || !oldVal){
+						// 	this.initSpanceData();
+						// }
+						let space = this.spaceList.find(it=>it.spaceId==this.curSpaceId);
+						if(space && space.spaceType==15){//X空间
+							this.showX = true;
+						}else{
+							this.showX = false;
 						}
 					}
 				},
 			},
 		},
+		computed: {
+			curSpaceId() {
+				return this.$store.state.curSpaceId;
+			},
+		},
 		async mounted() {
 			// this.getRecordAuth();//获取录音权限
 			// this.initRecord();
@@ -176,39 +204,27 @@
 				}
 				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***")
-				this.$emit("upCom");
-				let param = {
-					type: 'CLK', //埋点类型
-					clkId: 'clk_2cmina_23080403', //点击ID
-					clkName: 'adjust_clk', //点击前往的页面名称
-					clkParams: {
-						locusName: "精细调整",
+			//打开布局
+			openLayout(style) {
+				console.warn("***openLayout***",style)
+				let space = this.spaceList.find(it=>it.spaceId==this.curSpaceId);
+				if(space && space.spaceType==15){//X空间
+					this.showX = true;
+				}else{
+					this.showX = false;
+				}
+				if(style==3){
+					if(this.showX){//X空间
+						this.$emit("changeStyle",style);
+					}else{
+						Toast({
+							message: '此空间无法更改功能',
+						});
+						return false
 					}
-				};
+				}else{
+					this.$emit("changeStyle",style);
+				}
 				// util.trackRequest(param);
 			},
 			goRoam(){

+ 1 - 1
src/components/newQCCom/viewCareful/viewCareful.html

@@ -6,7 +6,7 @@
 			<div class="careful-item" v-for="(carefulItem,index) in carefulList" :key="carefulItem.spaceId">
 				<div class="columns rows-between" >
 					<div class="item-top rows rows-between" :class="{active:selectIndex==index}">
-						<div class="rows">
+						<div class="rows" @click="selectSpace(carefulItem,index)">
 							<div class="index-view rows justify-center">{{carefulItem.index+1}}</div>
 							<div class="name-view eslipe" >{{carefulItem.name}}</div>
 							<div class="percent-view">{{carefulItem.percent}}%</div>

+ 24 - 2
src/components/newQCCom/viewCareful/viewCareful.vue

@@ -44,6 +44,20 @@
 				},
 				deep:true,
 			},
+			curSpaceId: {
+				handler(newVal,oldVal) {
+					if (newVal) {
+						console.warn("***curSpaceId-CHANGE-viewCareful***", newVal)
+						let index = this.carefulList.findIndex(it=>it.spaceId==newVal);
+						this.selectIndex = index;
+					}
+				},
+			},
+		},
+		computed: {
+			curSpaceId() {
+				return this.$store.state.curSpaceId;
+			},
 		},
 		mixins: [],
 		async mounted() {//组件挂载时事件
@@ -113,7 +127,11 @@
 					}
 					// console.warn("***carefulList-change1***", it.area,it)
 				})
-				console.warn("***viewCareful-change***", this.carefulList)
+				if(this.curSpaceId){
+					let index = this.carefulList.findIndex(it=>it.spaceId==this.curSpaceId);
+					this.selectIndex = index;
+				}
+				console.warn("***viewCareful-change***", this.carefulList,this.curSpaceId)
 			},
 			updataData(spaceId,layoutObj){
 				let lable = this.carefulList.find(it=>it.spaceId == spaceId);
@@ -138,7 +156,7 @@
 					return false;
 				}
 				this.selectIndex = index;
-				this.$parent.$parent.selectSpaceId = item.spaceId;
+				// this.$parent.$parent.selectSpaceId = item.spaceId;
 				let _area = value - parseFloat(item.area);
 				if(_area==0){
 					return false;
@@ -167,6 +185,10 @@
 				this.$parent.$parent.callBackFun = this.callBack;//向父页面注册通知回调函数
 				this.$emit("curSpaceChange",data);//通知父组件-空间面积变化
 			},
+			selectSpace(item,index){
+				this.selectIndex = index;
+				this.$parent.$parent.curSpaceSelect(item);//向父页面通知空间被选中了
+			},
 			//去往详情页面
 			goRoam(){
 				let item = this.lastCareList[this.selectIndex];

+ 4 - 16
src/components/newQCCom/viewMask/viewMask.vue

@@ -208,11 +208,6 @@
 						}
 					})
 				}
-				
-				// this.curSpaceArea = parseFloat(
-				// 	(newVal.spaceWidth * newVal.spaceHeight) / 10000
-				// ).toFixed(2);
-				// this.getOverallArrangementDetailsList();
 			},
 			layoutList(newVal, oldVal) {
 				if (newVal == null) {
@@ -253,8 +248,11 @@
 			if(window.innerHeight && window.screen.height){
 				this.screenHeight = Math.min(window.innerHeight,window.screen.height)
 			}
+			this.connectUsImg = 'https://dm.static.elab-plus.com/miniProgram/conentUs.png';
 			let firstData = JSON.parse(getStorage('firstData'));
-			this.connectUsImg = firstData[0].selectOptionImageUrl;
+			if(firstData && firstData[0]){
+				this.connectUsImg = firstData[0].selectOptionImageUrl;
+			}
 		},
 		beforeDestroy:function(){
 			console.warn("***beforeDestroy***");//更新到页面上的数据
@@ -522,16 +520,6 @@
 					let list = res.list;
 					this.styleList = list;
 				}
-				if(!this.styleList || this.styleList.length==0){
-					// this.disableAble = true;//不能点击-没有风格
-					let unit = this.screenWidth / 750;//单位rpm 对应 px 的值
-					this.$parent.canvasHeight = this.screenHeight - (208 * unit);
-					this.$parent.camera.aspect = this.screenWidth / this.$parent.canvasHeight;
-					this.$parent.camera.updateProjectionMatrix();
-					this.$parent.renderer.setSize(this.screenWidth, this.$parent.canvasHeight);
-				}else{
-					// this.disableAble = false;//可以点击
-				}
 			},
 			//风格选择
 			selectStyle(idx){

+ 7 - 4
src/components/newQCCom/viewPlot/viewPlot.html

@@ -1,13 +1,13 @@
 <!-- 布局切换操作视图 -->
 <div class="plot-view">
-	<div class="title rows justify-center">选择要更换成的功能空间</div>
+	<!-- <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;selectIndex=0;" class="tab-item columns"
+			<div @click="changeType(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" /> -->
@@ -18,7 +18,7 @@
 	</div>
 	<div class="plot-content" v-if="plotList && plotList.length>0">
 		<div class="content  rows flex-start">
-			<div @click="changeOption(index)" class="item columns"
+			<div @click="changeOption(item,index)" class="item columns"
 				:class="{'active': selectIndex == index}" 
 				v-for="(item,index) in plotList[tabIndex].dataList" :key="index" >
 				<img class="img" :src="item.renderImage" mode="aspectFill" />
@@ -28,7 +28,10 @@
 			</div>
 		</div>
 	</div>
-	<div class="btn-list rows rows-between">
+	<div class="btn-list rows rows-between" v-if="unSelect">
+		<div class="btn rows up up3 justify-center">确认</div>
+	</div>
+	<div class="btn-list rows rows-between" v-else>
 		<div class="btn rows up up2 justify-center" @click="confirm">确认</div>
 	</div>
 </div>

+ 7 - 3
src/components/newQCCom/viewPlot/viewPlot.scss

@@ -3,7 +3,7 @@
 	width: auto;
 	box-sizing: border-box;
 	z-index: 12;
-	padding-top: 30px;
+	padding-top: 0px;
 	.title{
 		font-family: "Verdana Bold";
 		font-weight: 700;
@@ -20,7 +20,7 @@
 		color: rgba(0, 0, 0, 0.22);
 		font-size: 30px;
 		padding: 60px;
-		z-index: 9;
+		z-index: 99;
 	}
 }
 .swiper-view{
@@ -145,7 +145,7 @@
 	position: fixed;
 	left: 140px;
 	bottom: 0px;
-	padding-bottom: 60px;
+	padding-bottom: 30px;
 	width: 470px;
 	z-index: 15;
 	background-color: rgba(255, 255, 255, 1);
@@ -169,4 +169,8 @@
 .up2{
 	color: rgba(255, 255, 255, 1);
 	background-image:linear-gradient(124deg, rgba(245, 201, 82, 1) 0%, rgba(239, 149, 57, 1) 100%);
+}
+.up3{
+	color: rgba(255, 255, 255, 1);
+	background-image:linear-gradient(124deg, #ccc 0%, #ccc 100%);
 }

+ 39 - 18
src/components/newQCCom/viewPlot/viewPlot.vue

@@ -26,6 +26,8 @@
 				lastTabIndex:0,
 				plotList:[],//布局数据
 				curHouseObj:null,
+				spaceList:[],
+				unSelect:false,
 			}
 		},
 		props:{
@@ -33,29 +35,28 @@
 				type: Boolean,
 				default: false,
 			},
-			selectSpace: {//当前展示的户型
-				type: Object,
-				default: () => {
-					return null
-				}
-			},
 		},
 		watch: {
-			selectSpace: {
+			curSpaceId: {
 				handler(newVal,oldVal) {
 					if (newVal) {
-						console.warn("***selectSpace-CHANGE-viewPlot***", newVal,oldVal)
-						if(!oldVal || (oldVal && oldVal.spaceId != newVal.spaceId)){
-							this.initData();
-						}
+						console.warn("***curSpaceId-CHANGE-viewPlot***", newVal,oldVal)
+						// this.initData();
 					}
 				},
-				deep:true,
+			},
+		},
+		computed: {
+			curSpaceId() {
+				return this.$store.state.curSpaceId;
 			},
 		},
 		mixins: [],
 		async mounted() {//组件挂载时事件
 			this.curHouseObj = JSON.parse(getStorage('curHouseObj'));
+			let spaceDetail = this.curHouseObj;
+			let spaceList = JSON.parse(spaceDetail.houseJson);
+			this.spaceList = spaceList;
 			// this.initData();
 			// var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
 			// this.$parent.$parent.updateCareFul = this.initData;//页面注册变更方法
@@ -70,8 +71,9 @@
 			//初始化数据
 			initData(){
 				// var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
-				this.plotList = [];
-				const spaceDetail = this.selectSpace;
+				console.warn("***initData***",this.curSpaceId,this.spaceList)
+				const spaceDetail = this.spaceList.find(it=>it.spaceId == this.curSpaceId);
+				this.selectSpace = spaceDetail;
 				if(spaceDetail.layouts){
 					this.getOverallArrangementDetailsList(spaceDetail.layouts);
 				}
@@ -108,19 +110,36 @@
 						data.dataList.push(item);
 					}
 					if(item.id==this.selectSpace.layoutId){
-						this.tabIndex = this.plotList.length - 1;
-						this.selectIndex = this.plotList[this.tabIndex].dataList.length - 1;
+						let index = this.plotList.findIndex(it=>it.type==item.type);
+						this.tabIndex = index;
+						this.selectIndex = this.plotList[this.tabIndex].dataList.findIndex(it=>it.id==this.selectSpace.layoutId);;
 						this.lastTabIndex = this.tabIndex;
+						this.unSelect = true;
 					}
 				});
-				console.warn("***viewPlot***", this.plotList)
+				console.warn("***viewPlot***", this.plotList,this.selectSpace,this.unSelect)
+			},
+			changeType(index){
+				this.tabIndex=index;
+				this.selectIndex=0;
+				let item = this.plotList[this.tabIndex].dataList[this.selectIndex];
+				if(item.id==this.selectSpace.layoutId){
+					this.unSelect = true;
+				}else{
+					this.unSelect = false;
+				}
 			},
 			//切换选项
-			changeOption(id) {
+			changeOption(item,id) {
 				if (id == this.selectIndex) {
 					return false;
 				}
 				this.selectIndex = id;
+				if(item.id==this.selectSpace.layoutId){
+					this.unSelect = true;
+				}else{
+					this.unSelect = false;
+				}
 				// this.plotList[this.tabIndex].checkedIndex = this.optionIndex;
 				// if (this.tabIndex == 0) { //当前为角色时,则需要同步变更上面的
 				// 	this.currImgIdx = id;
@@ -164,6 +183,8 @@
 					}
 				};
 				util.trackRequest(param);
+				this.selectSpace.layoutId = plot.id;
+				this.unSelect = true;
 				this.$parent.$parent.userSelectPlot(plot,this.selectSpace);//告知页面,用户选择的布局id
 				this.lastTabIndex = this.tabIndex;
 			},

+ 4 - 3
src/components/newQCCom/viewShell/viewShell.html

@@ -29,10 +29,11 @@
 	:overChange="overChange" :curHouseObj="houseObj"></viewCareful>
 	<!-- 布局选择 -->
 	<viewPlot ref="viewPlot" v-show="styleType==3" @curSpaceChange="curSpaceChange"
-	:overChange="overChange" :selectSpace="selectSpace"></viewPlot>
+	:overChange="overChange" :curHouseObj="houseObj"></viewPlot>
 	<!-- 种子户型视图 -->
-	<viewlayout ref="viewlayout" @curSpaceChange="curSpaceChange" :styleType="styleType" :overChange="overChange" :curHouseObj="houseObj" 
-	@upCom="upCom" @streamRecord="streamRecord" @streamRecordEnd="streamRecordEnd"></viewlayout>
+	<viewlayout ref="viewlayout" @curSpaceChange="curSpaceChange" :styleType="styleType" 
+	:overChange="overChange" :curHouseObj="houseObj" @changeStyle="changeStyle"
+	@streamRecord="streamRecord" @streamRecordEnd="streamRecordEnd"></viewlayout>
 	<!-- nav视图 -->
 	<!-- <viewToolNav v-show="pageType==1 && (styleType==2 || styleType==3)" :seedItem="seedItem" @downCom="downScroll"></viewToolNav> -->
 	<!-- 风格选择视图 -->

+ 3 - 3
src/components/newQCCom/viewShell/viewShell.scss

@@ -6,7 +6,7 @@
 	left: 0px;
 	bottom: 0px;
 	width: 100vw;
-	height: 200px;
+	height: 170px;
 	border-radius: 40px 40px 0 0;
 	background: #fff;
 	box-shadow: 0 -6px 12px #0000001f;
@@ -14,11 +14,11 @@
 	z-index: 315;
 	padding:0px 40px;
 	padding-top:30px;
-	padding-bottom:60px;
+	padding-bottom:30px;
 	transition: height 1s;
 }
 .shell-view2{
-	height: 748px;
+	height: 600px;
 }
 .shell-signscoll{
 	position: absolute;

+ 20 - 20
src/components/newQCCom/viewShell/viewShell.vue

@@ -53,12 +53,6 @@
 			// 	type: [String, Number],
 			// 	default: '',
 			// },
-			// houseList: {//当前户型所有的户型详情,可以切换
-			// 	type: Array,
-			// 	default: () => {
-			// 		return []
-			// 	}
-			// },
 			houseObj: {//当前户型的具体详情
 				type: Object,
 				default: () => {
@@ -95,11 +89,11 @@
 							this.shellHeight = '200px';
 							_endHeight = 200;
 						}else if(newVal==2){//变更为展开状态
-							this.shellHeight = '800px';
-							_endHeight = 800;
+							this.shellHeight = '600px';
+							_endHeight = 600;
 						}else if(newVal==3){//变更为最小状态
-							this.shellHeight = '748';
-							_endHeight = 748;
+							this.shellHeight = '600px';
+							_endHeight = 600;
 						}
 						// let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
 						if(this.$parent && this.$parent.hasOwnProperty('canvasHeight')){
@@ -127,23 +121,29 @@
 		mixins: [touchHandle],
 		async mounted() {
 			// await this.getCityHouseList();		
-			console.warn("***viewShell***",this.houseList)
+			console.warn("***viewShell***")
 			let firstData = JSON.parse(getStorage('firstData'));
-			this.connectUsImg = firstData[0].selectOptionImageUrl;
+			if(firstData && firstData[0] && firstData[0].selectOptionImageUrl){
+				this.connectUsImg = firstData[0].selectOptionImageUrl;
+			}
 		},
 		methods:{
 			changeStyleType(type,selectSpace){
-				console.warn("***changeStyleType***",this.lastStyleType)
-				if(this.styleType != type){
-					this.lastStyleType = this.styleType;//记录下当前的状态,因为会返回到这个状态
+				// console.warn("***changeStyleType***",this.lastStyleType)
+				// if(this.styleType != type){
+				// 	this.lastStyleType = this.styleType;//记录下当前的状态,因为会返回到这个状态
+				// }
+				// this.styleType = type;
+				// this.selectSpace = selectSpace;
+			},
+			changeStyle(style){
+				this.styleType = style;//打开功能空间
+				if(this.styleType == 3){//功能变更
+					this.$refs.viewPlot.initData()
 				}
-				this.styleType = type;
-				this.selectSpace = selectSpace;
 			},
 			rebackLast(){
-				console.warn("***rebackLast***",this.lastStyleType)
-				this.styleType = this.lastStyleType;//返回记录下的状态
-				this.selectSpace = null;
+				this.styleType = 2;//返回记录下的状态
 			},
 			catchTouchMove: function() {
 				return false;

+ 26 - 13
src/components/newQCCom/viewlayout/viewlayout.html

@@ -3,27 +3,40 @@
 <div class="layout-view">
 	<!-- 种子区域 -->
 	<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 class="btn houseType rows justify-center up2" >
-				<div class="iconfont icon-huxingjianshang style1"></div>户型空间
+		<div class="btn-list rows rows-between" v-if="styleType==1">
+			<!-- <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> -->
+			<!-- 版本2 -->
+			<!-- <div class="btn rows up justify-center" @click="upCom" :class="styleType==1?'up1':'up2'">开始定制户型 ></div> -->
+			
+			<div class="btn houseType rows justify-center up2" @click="openLayout(2)">
+				<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-list rows rows-between" v-else-if="styleType==2">
+			<div class="btn houseType rows justify-center up2" @click="openLayout(3)" v-if="showX">
+				<div class="iconfont icon-huxingjianshang style1"></div>更改功能
+			</div>
+			<div class="btn houseType rows justify-center up3" @click="openLayout(3)" v-else>
+				<div class="iconfont icon-huxingjianshang style1"></div>更改功能
 			</div>
-			<div class="btn AiBtn rows justify-center up2" @click="goRoam">
+			<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==3">
-			<div class="btn rows up justify-center" @click="upCom" :class="styleType==1?'up1':'up2'">确认</div>
+		<!-- 布局 -->
+		<!-- <div class="btn-list rows rows-between" v-else-if="styleType==3">
+			<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>
 </div>

+ 5 - 2
src/components/newQCCom/viewlayout/viewlayout.scss

@@ -2,7 +2,7 @@
 	position: fixed;
 	left: 30px;
 	bottom: 0px;
-	padding-bottom: 60px;
+	padding-bottom: 30px;
 	width: 690px;
 	z-index: 15;
 	background-color: rgba(255, 255, 255, 1);
@@ -71,7 +71,10 @@
 	color: rgba(255, 255, 255, 1);
 	background-image:linear-gradient(124deg, rgba(245, 201, 82, 1) 0%, rgba(239, 149, 57, 1) 100%);
 }
-
+.up3{
+	color: rgba(255, 255, 255, 1);
+	background-image:linear-gradient(124deg, #ccc 0%, #ccc  100%);
+}
 .houseType{
 	width: 320px;
 	box-shadow: 0 6px 20px #f2980233;

+ 141 - 340
src/components/newQCCom/viewlayout/viewlayout.vue

@@ -4,6 +4,9 @@
 <script>
 	// const util = require('@/static/utils/util.js');
 	const config = require('@/services/urlConfig.js');
+	import {
+		Toast
+	} from 'mint-ui';
 	// import Bus from '@/common/bus';
 	// import commonMethod from '@/common/commonMethod.js';
 	// import requestConfig from '@/static/lib/requestConfig';
@@ -26,18 +29,20 @@
 					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,	//每次变化的比例
+				spaceList:[],
+				showX:false,
 			}
 		},
 		props: {
@@ -47,17 +52,17 @@
 			// 		return []
 			// 	}
 			// },
-			// curHouseObj: {//当前展示的户型
-			// 	type: Object,
-			// 	default: () => {
-			// 		return null
-			// 	}
-			// },
-			overChange: { //当前选中的户型类型
+			curHouseObj: {//当前展示的户型
+				type: Object,
+				default: () => {
+					return null
+				}
+			},
+			overChange: {//当前选中的户型类型
 				type: Boolean,
 				default: false,
 			},
-			styleType: {
+			styleType:{
 				type: [String, Number],
 				default: '',
 			}
@@ -71,16 +76,36 @@
 			// 		}
 			// 	},
 			// },
-			// curHouseObj: {
-			// 	handler(newVal,oldVal) {
-			// 		if (newVal) {
-			// 			console.warn("***curHouseObj-CHANGE-layout***", newVal)
-			// 			if((oldVal && oldVal.id != newVal.id) || !oldVal){
-			// 				this.initSpanceData();
-			// 			}
-			// 		}
-			// 	},
-			// },
+			curHouseObj: {
+				handler(newVal,oldVal) {
+					if (newVal) {
+						console.warn("***curHouseObj-CHANGE-layout***", newVal)
+						// if((oldVal && oldVal.id != newVal.id) || !oldVal){
+						// 	this.initSpanceData();
+						// }
+						const spaceDetail = newVal;
+						this.spaceList = JSON.parse(spaceDetail.houseJson);
+					}
+				},
+			},
+			curSpaceId: {
+				handler(newVal,oldVal) {
+					if (newVal) {
+						console.warn("***curSpaceId-CHANGE-layout***", newVal)
+						let space = this.spaceList.find(it=>it.spaceId==this.curSpaceId);
+						if(space && space.spaceType==15){//X空间
+							this.showX = true;
+						}else{
+							this.showX = false;
+						}
+					}
+				},
+			},
+		},
+		computed: {
+			curSpaceId() {
+				return this.$store.state.curSpaceId;
+			},
 		},
 		async mounted() {
 			// this.getRecordAuth();//获取录音权限
@@ -90,343 +115,119 @@
 		},
 		// 页面被展示时执行
 		onPageShow: function() {
-
+			
 		},
 		//页面被隐藏时执行
 		onPageHide: function() {
 			console.warn("***detached-hide***")
 		},
 		methods: {
-			//返回上一页
-			goback(){
-				this.$router.go(-1);
-			},
-			//上划触发
-			upCom() {
-				console.warn("***upCom***")
-				this.$emit("upCom");
-				let param = {
-					type: 'CLK', //埋点类型
-					clkId: 'clk_2cmina_23080403', //点击ID
-					clkName: 'adjust_clk', //点击前往的页面名称
-					clkParams: {
-						locusName: "精细调整",
+			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);
 					}
-				};
-				// util.trackRequest(param);
-			},
-			goRoam() {
-				this.$parent.$refs.viewCareful.goRoam();
-			},
-			//获取录音权限
-			getRecordAuth: function() {
-				uni.getSetting({
-					success(res) {
-						console.log("succ")
-						console.log(res)
-						if (!res.authSetting['scope.record']) {
-							uni.authorize({
-								scope: 'scope.record',
-								success() {
-									// 用户已经同意小程序使用录音功能,后续调用 wx.startRecord 接口不会弹窗询问
-									console.log("succ auth")
-								},
-								fail() {
-									console.log("fail auth")
-								}
-							})
-						} else {
-							console.log("record has been authed")
-						}
-					},
-					fail(res) {
-						console.log("fail")
-						console.log(res)
+					if(item.hasOwnProperty('spaceWidthMax') && item.hasOwnProperty('spaceHeightMax')){
+						maxArea = parseFloat((item.spaceWidthMax * item.spaceHeightMax) / 10000).toFixed(1);
 					}
-				})
-			},
-			//求最长公共子集
-			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;
+					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)
 					}
-				}
-				return "";
-			},
-			//声音变化
-			async textChange(text) {
-				if (this.overChange) {
-					uni.showToast({
-						title: '请慢一点',
-						icon: 'none',
-						duration: 2000
-					})
-					return false;
-				}
-				let res = await requestConfig("chineseToPinyin", {
-					chinese: text
-				});
-				let pinyin = res.single;
-				console.warn("****pinyin***", pinyin)
-				text = pinyin;
-				//全匹配轮一遍
-				let curSpace = this.carefulList.find(space => {
-					return text.includes(space.namePY)
 				})
-				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,
-							comStr,
-							index,
-						}
-					})
-					//寻找5个字符串以上的
-					let tmpList = list.filter(it => {
-						return it.comStr.length > 5;
-					})
-					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 {
-						curSpace = this.lastSpace;
-					}
-				}
-
-				//没有找到语音操作对象
-				if (!curSpace) {
-					uni.showToast({
-						title: '请再说一次',
-						icon: 'none',
-						duration: 2000
-					})
-					return false;
-				}
-				this.lastSpace = curSpace;
-
-				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 => {
-					return text.lastIndexOf(word)
+				console.warn("***viewlayout-init***", this.carefulList)
+			},
+			initData(houseList){
+				this.seedLayoutList = [];
+				houseList && houseList.forEach(item=>{
+					let data = {
+						spaceStructure: item.spaceStructure,
+						spaceName: item.spaceName,
+						set: false, //是否已经设置过
+					};
+					this.seedLayoutList.push(data);
 				})
-				let a = Math.max(...biglist);
-				let b = Math.max(...smalllist);
-				let big = false;
-				if (a == -1 && b == -1) { //都没命中
-					uni.showToast({
-						title: '请再说一次',
-						icon: 'none',
-						duration: 2000
-					})
-					return false;
-				} else if (a > -1 && b > -1) { //两个都命中了
-					if (a > b) { //放大靠后-命中靠后
-						big = true;
-					} else {
-						big = false;
+				// 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;
 					}
-				} else if (a > -1) {
-					big = true;
 				}
-				let _area = parseFloat(curSpace.area) * this.changeRate;
-				let data = {
-					spaceId: curSpace.spaceId,
-					area: _area,
-					isZoomIn: big, //true 放大 false 缩放
-				}
-				console.log("viewlayout-发送消息-空间变化: ", data, curSpace.area, big);
-				uni.showToast({
-					title: '正在变化,请稍后',
-					icon: 'none',
-					duration: 2000
-				})
-				// this.sendMessageAction(JSON.stringify(parmas));
-				this.$emit("curSpaceChange", data); //通知父组件-当前已经选中了户型大类
-			},
-			/**
-			 * 初始化语音识别回调
-			 * 绑定语音播放开始事件
-			 */
-			initRecord: function() {
-				// var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
-				//有新的识别内容返回,则会调用此事件
-				manager.onRecognize = (res) => {
-					let currentData = Object.assign({}, this.currentTranslate, {
-						text: res.result,
+				if(this.selectSeedId){
+					let item = this.seedLayoutList.find(it=>{
+						return it.spaceStructure == this.selectSeedId
 					})
-					this.currentTranslate = currentData;
-					console.warn("***manager-正在录音***", this.currentTranslate)
-				}
-				// 识别结束事件
-				manager.onStop = (res) => {
-					console.warn("***manager-识别结束0***", this.recording, res)
-					// this.textChange("客厅大一点");
-					if (this.recording == false) { //已经强制结束识别了
-						return false; //不识别
-					}
-					let text = res.result
-					if (text == '') { //识别内容为空时的反馈
-						this.showRecordEmptyTip()
-						return
-					}
-					console.warn("***manager-识别结束***", text);
+					this.$emit("seedChange", item);//通知父组件-当前已经选中了户型大类
 					let param = {
 						type: 'CLK', //埋点类型
-						clkId: 'clk_2cmina_23080407', //点击ID
-						clkName: 'voice_clk', //点击前往的页面名称
+						clkId: 'clk_2cmina_23080402', //点击ID
+						clkName: 'seedroom_clk', //点击前往的页面名称
 						clkParams: {
-							locusName: "语音调整",
-							text: text
+							type: item.spaceName,
+							locusValue: item.spaceStructure,
+							locusName: "切换种子户型",
 						}
 					};
 					// util.trackRequest(param);
-					text = text.replaceAll(/,|。/ig, "");
-					this.textChange(text);
-					this.stopRecordHandle();
-					//翻译
-					// this.translateText(currentData, this.dialogList.length)
 				}
-
-				// 识别错误事件
-				manager.onError = (res) => {
-					console.warn("***manager-识别错误***", this.recording, res)
-					if (this.recording == false) {
-						return false;
-					}
-					this.stopRecordHandle();
-					uni.showToast({
-						title: '请再说一次',
-						icon: 'none',
-						duration: 2000
-					})
-				}
-				// 语音播放开始事件
-				uni.onBackgroundAudioPlay(res => {
-					const backgroundAudioManager = uni.getBackgroundAudioManager()
-					let src = backgroundAudioManager.src
-
-					this.currentTranslateVoice = src;
-				})
-			},
-			//执行停止录音的方法
-			stopRecordHandle() {
-				// var currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages().length - 1].$vm : null;
-				this.recording = false;
-				this.$emit("streamRecordEnd"); //通知父组件
-				// currPage.voiceMaskChange(false);//关闭蒙层
-			},
-			//用户语音为空
-			showRecordEmptyTip() {
-				this.stopRecordHandle();
-				uni.showToast({
-					title: '告诉我您的想法',
-					icon: 'none',
-					duration: 2000
-				})
-			},
-			catchTapEvent: function() {
-				return false;
+				console.warn("***curHouseType-init***",this.seedLayoutList)
 			},
-			/**
-			 * 按住按钮开始语音识别
-			 */
-			streamRecord: function(e) {
-				// this.getRecordAuth();//获取录音权限
-				console.warn("streamrecord", e)
-				let currPage = getCurrentPages()[getCurrentPages().length - 1] ? getCurrentPages()[getCurrentPages()
-					.length - 1].$vm : null;
-				// let buttonItem = detail.buttonItem || {}
-				manager.start({
-					lang: language[0].lang_content,
-				})
-				// this.recordStatus = 0;
-				this.clientX = 0;
-				this.clientY = 0;
-				this.startX = e.changedTouches[0].clientX;
-				this.startY = e.changedTouches[0].clientY;
-				this.recording = true; //录音中
-				currPage.voiceMaskChange(true); //显示蒙层
-				this.$emit("streamRecord");
-			},
-			mytouchmove(e) {
-				let startX = this.startX // 开始x坐标 
-				let startY = this.startY //开始y坐标
-				let touchMoveX = e.changedTouches[0].clientx //滑动变化坐标 
-				let touchMoveY = e.changedTouches[0].clientY //滑动变化坐标 
-				this.clientX = touchMoveX - startX;
-				this.clientY = touchMoveY - startY;
-			},
-			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))
-			},
-			/**
-			 * 松开按钮结束语音识别
-			 */
-			streamRecordEnd: function(e) {
-				console.warn("streamRecordEnd", this.recording, e)
-				// let detail = e.detail || {} // 自定义组件触发事件时提供的detail对象
-				// let buttonItem = detail.buttonItem || {}
-
-				// 防止重复触发stop函数
-				if (this.recording == false) {
-					console.warn("has finished!")
-					return
+			//打开布局
+			openLayout(style) {
+				console.warn("***openLayout***",style,this.curSpaceId)
+				let space = this.spaceList.find(it=>it.spaceId==this.curSpaceId);
+				if(space && space.spaceType==15){//X空间
+					this.showX = true;
+				}else{
+					this.showX = false;
 				}
-				let startX = this.startX; // 开始x坐标
-				let startY = this.startY; //开始y坐标
-				let touchMoveX = e.changedTouches[0].clientX; //滑动变化坐标 
-				let touchMoveY = e.changedTouches[0].clientY; //滑动变化坐标 
-				let angle = this.angle({
-					X: startX,
-					Y: startY
-				}, {
-					X: touchMoveX,
-					Y: touchMoveY
-				})
-				//滑动角度超过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(); //停止录音了
-						manager.stop()
-						uni.showToast({
-							title: '识别已取消!',
-							icon: 'none',
-							duration: 2000
-						})
-					} else {
-						this.stopRecordHandle(); //停止录音了
-						manager.stop()
-						console.warn("streamRecordEnd-stop1", this.recording)
+				if(style==3){
+					if(this.showX){//X空间
+						this.$emit("changeStyle",style);
+					}else{
+						Toast({
+							message: '此空间无法更改功能',
+						});
+						return false
 					}
-				} else {
-					this.stopRecordHandle(); //停止录音了
-					manager.stop();
-					console.warn("streamRecordEnd-stop2", this.recording)
+				}else{
+					this.$emit("changeStyle",style);
 				}
+				// util.trackRequest(param);
+			},
+			goRoam(){
+				this.$parent.$refs.viewCareful.goRoam();
 			},
+			
 		}
 	}
 </script>

+ 76 - 24
src/mixins/loadModel.js

@@ -146,6 +146,73 @@ export default {
 			this.furnHandle(list,spaceList)
 			this.changeSpaces = []
 		},
+		//加载单个空间的家具模型
+		furnSingleSpaceHandle(space){
+			let arrFrunList = this.arrFrunList;
+			// let space = this.curSpaceObj;
+			let allowSpaceId = [space.spaceId];
+			if(!arrFrunList || arrFrunList.length == 0){
+				return
+			}
+			this.clearAllLayoutData();//清空家具模型
+			this.promise_list = [];
+			this.gltfLayouts = []; //模型列表,所有空间里面的每个模型(家具)对应一条记录
+			
+			let startTime = new Date().getTime();
+			let tmpList = [];//临时数据-精简模型数据
+			let curSpaceList = [];//当前空间的数据对象
+			console.warn("重新加载布局", arrFrunList,this.gltfLayouts,allowSpaceId);
+			//每个空间都处理下,确保空间不遗漏,arrFrunList遍历,如果不同空间使用同一个布局,会出现只处理第一个空间
+			let spaceId = space.spaceId;
+			let signel = arrFrunList.find(it => it.id == space.layoutId);
+			if(signel){//只加载允许的空间的布局,其他不加载
+				let md = JSON.parse(signel.modelJson); //获取布局里面的模型信息
+				//遍历模型信息,获取模型列表
+				for (let i = 0; i < md.modelData.length; i++) {
+					let item = md.modelData[i];
+					item.spaceId = spaceId;
+					item.layoutId = signel.id;
+					item.h5Id = signel.id+""+item.id;//唯一标识
+					if(item.modelName=='BP_furnitureBase_C'){
+						continue;
+					}else{
+						if(spaceId==this.curSpaceObj.spaceId){
+							curSpaceList.push(item);
+						}else{
+							tmpList.push(item);
+						}
+					}
+				}
+			}
+			this.realList = []
+			this.tmpList = tmpList;
+			this.fliterList(tmpList);//精简模式下,只计算白名单里面的模型位置等信息
+			console.warn("***fliterList***",this.type,this.realList.length);
+			tmpList = this.realList;
+			tmpList = tmpList.concat(curSpaceList);//合并详细空间的模型
+			
+			let realFurArr = this.preFurnitureData(tmpList);//统一处理家具模型
+			this.calculateLayoutModelSize() // 提前计算模型的位置
+			tmpList = [];
+			this.realList = [];
+			this.tmpList = []
+			console.log("***realFurArr***", realFurArr,this.gltfLayouts);
+			realFurArr && realFurArr.forEach((item,index) => {
+				this.loadLayFlag = true;
+				this.promise_list.push(
+					new Promise((resolve, reject) => {
+						this.loadLayoutModels(item, resolve);
+					})
+				)
+			});
+			Promise.all(this.promise_list).then(() => {
+				let endTime = new Date().getTime();
+				this.loadLayFlag = false;
+				realFurArr = [];
+				console.log("家具模型全部加载完成,时间:", endTime - startTime, this.gltfLayouts);
+				this.loadLastSpaceModel();//加载剩余空间的家具模型
+			})
+		},
 		//拆分家具模型加载逻辑
 		furnHandle(arrFrunList, tmpSpaceList=[]){
 			if(!arrFrunList || arrFrunList.length == 0){
@@ -201,28 +268,6 @@ export default {
 					}
 				}
 			});
-			// 处理删除模型时,其他空间引用了该模型时的重新载入处理
-			// if(this.lastFrunList && this.lastFrunList.length>0){
-			// 	let spaceIds = tmpSpaceList.map(it=>it.spaceId);
-			// 	this.arrFrunList.forEach(signel => {
-			// 		let spaceId = this.spaceList.find(it => it.layoutId == signel.id).spaceId;
-			// 		let md = JSON.parse(signel.modelJson); //获取布局里面的模型信息
-			// 		//遍历模型信息,获取模型列表
-			// 		for (let i = 0; i < md.modelData.length; i++) {
-			// 			let item = md.modelData[i];
-			// 			if(this.lastFrunList.includes(item.modelName) && !spaceIds.includes(spaceId)){
-			// 				item.spaceId = spaceId;
-			// 				item.layoutId = signel.id;
-			// 				item.h5Id = signel.id+""+item.id;//唯一标识
-			// 				if(!tmpList.find(it=>it.h5Id==item.h5Id)){
-			// 					// tmpList.push(item);
-			// 					console.warn("***布局xxxx***", item, signel.id)
-			// 				}
-			// 			}
-			// 		}
-			// 	})
-			// 	this.lastFrunList = [];
-			// }
 			this.tmpList = tmpList;
 			if(this.type==2){//全局精简模型;需要的是所有空间的模型
 				this.fliterList(tmpList);//精简模式下,只计算白名单里面的模型位置等信息
@@ -1000,7 +1045,7 @@ export default {
 			
 			}
 			// console.log("模型计算位置--", positionX, positionY)
-			console.log("模型计算位置", cubeInfo, centerX, centerY, spaceWidth, spaceHeight, modelWidth, modelHeight, spaceId, scaleX, scaleY, positionX, positionY, cubeInfo.modelName)
+			// console.log("模型计算位置", cubeInfo, centerX, centerY, spaceWidth, spaceHeight, modelWidth, modelHeight, spaceId, scaleX, scaleY, positionX, positionY, cubeInfo.modelName)
 			let oldPosition = new THREE.Vector3();//当前几何体的位置参数
 			oldPosition.copy(cube.position);
 			let oldScale = new THREE.Vector3();//当前几何体的位置参数
@@ -1335,7 +1380,14 @@ export default {
 			const element = this.spaceList.find(it=>it.spaceId == spaceObj.spaceId);
 			if(element){
 				this.deleteLayoutModel(element, layoutObj)
-				element.layoutId = layoutObj.id
+				element.layoutId = layoutObj.id;
+				if(element.spaceType==15){
+					element.layoutSpaceType = layoutObj.type;//更新布局信息到空间对象里面
+					element.layoutSpaceName = layoutObj.spacexName || layoutObj.name;//更新布局信息到空间对象里面
+					if(this.updataLable && typeof(this.updataLable)=='function'){
+						this.updataLable(element.spaceId,layoutObj);
+					}
+				}
 				console.log("替换空间的布局ID", spaceObj.spaceId, layoutObj.id);
 			}
 			this.changeLayouts.push(layoutObj)

+ 0 - 3
src/pages/webgl_rxdz/webgl_rxdz - 副本.vue

@@ -136,7 +136,6 @@
 				curLayoutStruct:null,//当前户型大类下所有楼层数据-用于提交
 				overChange:false,	//是否形变中
 				isIos:false,	//是否ios手机。默认不是
-				currentChangeSpaceId:null,	//当前变化的空间id
 				styleType:1,
 			}
 		},
@@ -842,7 +841,6 @@
 			curSpaceChange(data){
 				console.warn("***空间面积变化***",this.overChange,data)
 				this.overChange = true;//变形开始 防止在形变结束前,再次形变
-				this.currentChangeSpaceId = data.spaceId
 				this.changCurSpaceArea(data);
 			},
 
@@ -1513,7 +1511,6 @@
 					return it.houseFloor == this.curHouseFloor
 				})
 				layoutStruct.houseJson = str;
-				this.currentChangeSpaceId = null;//变化结束后
 				console.warn("***curLayoutStruct-updataPageData***",this.curHouseFloor,this.curHouseObj,layoutStruct)
 			},
 			//户型大类发生了变更

+ 3 - 3
src/pages/webgl_rxdz/webgl_rxdz.html

@@ -1,7 +1,7 @@
 <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="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">
@@ -21,10 +21,10 @@
 		你的浏览器似乎不支持或者禁用了 HTML5 <code>&lt;canvas&gt;</code> 元素。
 	</canvas>
 	<!-- 主要操作视图 -->
-	<viewShell pageType="1" :overChange="overChange" :houseList="houseList" :houseObj="curHouseObj" :curHouseType="curHouseType" @curSpaceChange="curSpaceChange" @curHouseTypeChange="curHouseTypeChange" @curHouseFloorChange="curHouseFloorChange"></viewShell>
+	<viewShell ref="viewShell" pageType="1" :overChange="overChange" :houseList="houseList" :houseObj="curHouseObj" :curHouseType="curHouseType" @curSpaceChange="curSpaceChange" @curHouseTypeChange="curHouseTypeChange" @curHouseFloorChange="curHouseFloorChange"></viewShell>
 	
 	<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}" @click="goRoam(gltf)">
+	:style="{'transform':gltf.transform}" @click="selectSpaceHandle(gltf)">
 		<div v-if="styleType==2" user-select="false" :class="['number-view ',(index+1)>9?'number-more':'',currentChangeSpaceId==gltf.spaceId?' active':'']">{{gltf.spaceIndex+1}}</div>
 		<div v-else user-select="false" class="word" :class="currentChangeSpaceId==gltf.spaceId?'active':''">{{gltf.text}}></div>
 	</div>

+ 80 - 11
src/pages/webgl_rxdz/webgl_rxdz.vue

@@ -4,7 +4,7 @@
 	import Stats from 'three/addons/libs/stats.module.js';
 	import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
 	import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
-
+	import spaceTypes from '@/static/spaceTypesIE.js';
     import TWEEN from 'three/addons/libs/tween.module.js';
 	import router from "@/router";
 	import {
@@ -657,8 +657,8 @@
 				expand.landDescription = this.$route.query.landDescription || '';//地形地势
 				expand.scenery = this.$route.query.scenery || '';//景观
 				expand.structureDescription = this.$route.query.structureDescription || '';//空间特质-结构
-				param.expand = JSON.stringify(expand);
-				return param;
+				setStorage('expand', expand);//把空间选择的数据存入本地缓存里面,方便后续使用
+				return JSON.stringify(expand);
 			},
 			async submitHouse(){
 				if(this.overChange){
@@ -740,7 +740,7 @@
 					}
 					param.layoutStruct.push(houseData)
 				})
-				param = this.hushangHandle(param)
+				param.expand = this.hushangHandle()
 				console.warn("submitHouse-param: ", param);
 				let trackparam = {
 					type: 'CLK', //埋点类型
@@ -915,7 +915,20 @@
 			
 			    }
 			},
-			
+			curSpaceSelect(data){
+				console.warn("***curSpaceSelect***",data);
+				if(this.selectSpace){
+					this.changeSpaceColor(this.selectSpace.spaceId,2);//取消上一个空间的颜色
+				}
+				let spaceId = data.spaceId;
+				let space = this.spaceList.find(it=>it.spaceId==spaceId);
+				this.selectSpace = space;
+				this.currentChangeSpaceId = spaceId;
+				this.$store.state.curSpaceId = data.spaceId;
+				
+				this.changeSpaceColor(data.spaceId,1);//设置选中空间的颜色
+				this.moveMeshCenter(space);
+			},
 			//具体空间面积变化-拖动产生的
 			//data = {
 			//		spaceId:245,
@@ -927,7 +940,8 @@
 				// this.changeArea = changArea;//当次变化的面积,有正负值
 				// this.sumArea = parseFloat((this.sumArea + changArea).toFixed(2));
 				this.overChange = true;//变形开始 防止在形变结束前,再次形变
-				this.currentChangeSpaceId = data.spaceId
+				this.currentChangeSpaceId = data.spaceId;
+				this.$store.state.curSpaceId = data.spaceId;
 				this.changCurSpaceArea(data);
 				let space = this.spaceList.find(it=>it.spaceId==this.currentChangeSpaceId);
 				this.moveMeshCenter(space);
@@ -1676,6 +1690,7 @@
 					return it.houseFloor == this.curHouseFloor
 				})
 				layoutStruct.houseJson = str;
+				setStorage('curLayoutStruct', this.curLayoutStruct);//把楼层的数据存入缓存中
 				this.currentChangeSpaceId = null;//变化结束后
 				console.warn("***curLayoutStruct-updataPageData***",this.changeArea,this.sumArea,this.curHouseFloor,this.curHouseObj,layoutStruct)
 			},
@@ -1683,11 +1698,14 @@
 			curHouseTypeChange(item){
 				this.curHouseType = item.spaceStructure;//当前选中的户型类型-传递给子组件触发具体的户型数据选取
 				this.curHouseName = item.spaceName;//当前选中的户型类型名称
+				setStorage('curHouseType', this.curHouseType);//把楼层的数据存入缓存中
+				setStorage('curHouseName', this.curHouseName);//把楼层的数据存入缓存中
 				//获取当前户型大类下的所有户型信息-用于用户提交
 				this.curLayoutStruct = this.houseList.find(it=>it.spaceStructure == this.curHouseType).layoutStruct;
 				this.curLayoutStruct.forEach(it=>{
 					this.layoutArea += it.houseArea
 				})
+				setStorage('curLayoutStruct', this.curLayoutStruct);//把楼层的数据存入缓存中
 				console.warn("***curLayoutStruct***",this.curLayoutStruct)
 			},
 			//户型楼层发生了变更
@@ -1757,12 +1775,45 @@
 					this.houseList = list;//数据会同步到组件中-进而反馈更新页面数据
 				}
 			},
-			
-			onMouseMove(e){
-				return false;
+			//进入布局选择模式
+			enterPlot(gltf){
+				if(gltf.spaceType==13){//楼梯不处理
+					return false
+				}
+				// this.selectSpace = this.spaceList.find(it=>it.spaceId==gltf.spaceId);
+				this.$refs.viewShell.changeStyleType(3,this.selectSpace)
+			},
+			selectSpaceHandle(gltf){
+				if(gltf.spaceType==13){//楼梯不处理
+					return false
+				}
+				if(this.selectSpace){
+					this.changeSpaceColor(this.selectSpace.spaceId,2);//取消上一个空间的颜色
+				}
+				this.selectSpace = this.spaceList.find(it=>it.spaceId==gltf.spaceId);
+				this.$store.state.curSpaceId = this.selectSpace.spaceId;
+				this.currentChangeSpaceId = this.selectSpace.spaceId;
+				// this.moveMeshCenter(this.selectSpace);
+				this.changeSpaceColor(this.selectSpace.spaceId,1);//设置选中空间的颜色
+				console.warn("***selectSpaceHandle***",this.selectSpace)
+			},
+			//用户选择的布局id-需要切换到这个布局去
+			userSelectPlot(layoutObj,space=null){
+				if(!layoutObj){
+					console.warn("***userSelectPlot***数据错误")
+					return false
+				}
+				let spaceId = space ? space.spaceId : this.selectSpace.spaceId;
+				console.warn("***userSelectPlot***",spaceId,layoutObj)
+				this.changeSingleLayout(space,layoutObj);
+				this.updataLable(spaceId,layoutObj);
 			},
-			goRoam1(spaceId){
+			async goRoam1(spaceId){
 				let gltf = this.lableItem.find(it=>it.spaceId==spaceId);
+				let shottingImg = await this.shottingAction() + "?x-oss-process=image/auto-orient,1/quality,Q_46/format,jpg";//开始截图
+				console.warn("***shottingImg***",shottingImg);
+				setStorage('shottingImg', shottingImg);//把空间选择的数据存入本地缓存里面,方便后续使用
+				this.hushangHandle()
 				if(gltf){
 					this.goRoam(gltf)
 				}
@@ -1840,10 +1891,20 @@
                 console.log("该户型空间数据:", this.spaceList, this.layoutIds,type);
                 console.log("当前选中的空间:", this.curSpaceObj,this.curHouseObj);
 				this.spaceListBackup = JSON.parse(JSON.stringify(this.spaceList));
+				this.$store.state.curSpaceId = this.curSpaceObj.spaceId;
 				this.loaderSpaceArr(this.spaceList);
                 // 绘制墙体
                 this.getHouseTypeSpaceWalls();
             },
+			//更改空间显示名称 X空间 类型 根据布局所属类型来显示
+			updataLable(spaceId,layoutObj){
+				let list = this.arrFrunList;
+				let lable = this.lableItem.find(it=>it.spaceId == spaceId);
+				let name = spaceTypes[layoutObj.type - 1];
+				lable.text = name;
+				console.warn("***updataLable***",lable)
+				this.$refs.viewShell.$refs.viewCareful.updataData(spaceId,layoutObj);
+			},
 			// 添加文字标签
 			addWordLabel(){
 				if(!this.gltfSpaces || this.gltfSpaces.length <= 0){
@@ -1855,9 +1916,17 @@
 					// 给地板加上空间类型标注, 空间为链接空间的不显示
 					if(cube.spaceName && !cube.isSizeLock){
 						let spaceIndex = this.spaceList.filter(it=>it.spaceName && !it.isSizeLock).findIndex(item=>item.spaceId==cube.spaceId);
+						let name = spaceTypes[cube.spaceType - 1];
+						if(cube.spaceType==15){			//更改空间显示名称 X空间 类型 根据布局所属类型来显示
+							let layoutId = this.spaceList.find(it => it.spaceId == cube.spaceId).layoutId;
+							let layout = this.arrFrunList.find(it=>it.id == layoutId);
+							if(layout){
+								name = spaceTypes[layout.type - 1];
+							}
+						}
 						this.lableItem.push(
 							{
-								text:cube.spaceName,
+								text:name,
 								spaceId:cube.spaceId,
 								spaceType:cube.spaceType,
 								transform:'',

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

@@ -11,7 +11,7 @@
 					:current="currImgIdx" ref="carousel">
                     <el-carousel-item v-for="(img,s) in tabData[tabIndex].hardboundEffect" :key="s" :item-id="s" class="master-pic-img">
                         <img @touchstart="mytouchstart" @touchmove="mytouchmove" @touchend="mytouchend" class="master-pic-img" :src="img" mode="aspectFill" />
-						<div class="lookHouseView rows justify-center" v-if="tabIndex==2 && (!shareUserId || shareUserId==userId)" @click="toMode">
+						<div class="lookHouseView rows justify-center" v-if="tabIndex==TdIndex && (!shareUserId || shareUserId==userId)" @click="toMode">
 							<img class="icon-ai" src="https://dm.static.elab-plus.com/miniProgram/iconfont/icon-ai.png" mode="widthFix"/>
 							查看户型
 						</div>

+ 13 - 3
src/pages/webgl_rxdz_customize/webgl_rxdz_customize.vue

@@ -7,6 +7,7 @@
 	import router from "@/router";
 	import touchHandle from '@/mixins/touchHandle.js';
 	import commonPageMethod from '@/mixins/commonPageMethod.js';
+	import spaceTypes from '@/static/spaceTypesIE.js';
 // const app = getApp(); //获取应用实例
 // import requestConfig from '@/static/lib/requestConfig.js';
 // import commonPageMethod from '@/common/commonPageMethod.js';
@@ -54,6 +55,7 @@ export default {
 			showPhoneModel:false,
 			gsImage:'',
 			layoutStruct:null,
+			TdIndex:0,
 		}
     },
     /**
@@ -64,7 +66,7 @@ export default {
         const that = this;
         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:'6523d91af65c626211ee21c8';
+        this.id = this.$route.query.id?this.$route.query.id:'';
 		if(!this.id){
 			this.showToast("没有数据!");
 			return false;
@@ -130,7 +132,8 @@ export default {
 				gsImage:tmp.baseImg,
 				area:'',
 			}
-			this.tabData.push(data)
+			this.tabData.push(data);
+			this.TdIndex = 2;
 		},
         async getIdData(){
 			let userId = this.userId || '';
@@ -173,8 +176,15 @@ export default {
 				this.form.houseJson.forEach((item,index)=>{
 					//获取面积
 					let curSpaceArea = parseFloat((item.spaceWidth * item.spaceHeight) / 10000).toFixed(1);
+					let text = item.spaceName;
+					if(item.spaceId && item.spaceType){
+						text = spaceTypes[item.spaceType - 1];
+						if(item.spaceType==15 && item.layoutSpaceType){
+							text = spaceTypes[item.layoutSpaceType - 1]; 
+						}
+					}
 					let data = {
-						name : item.spaceName,
+						name : text,
 						imgUrl : item.hardboundEffect[0],
 						hardboundEffect:item.hardboundEffect,
 						gsImage:item.hardboundEffect[0],

+ 10 - 2
src/pages/webgl_rxdz_look/webgl_rxdz_look.vue

@@ -6,7 +6,7 @@
 	import Stats from 'three/addons/libs/stats.module.js';
 	import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
 	import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
-	
+	import spaceTypes from '@/static/spaceTypesIE.js';
 	import TWEEN from 'three/addons/libs/tween.module.js';
 
 	var requestId = "";
@@ -541,9 +541,17 @@
 				this.gltfSpaces.forEach((cube,index) =>{
 					// 给地板加上空间类型标注, 空间为链接空间的不显示
 					if(cube.spaceName && !cube.isSizeLock){
+						let name = spaceTypes[cube.spaceType - 1];
+						if(cube.spaceType==15){			//更改空间显示名称 X空间 类型 根据布局所属类型来显示
+							let layoutId = this.spaceList.find(it => it.spaceId == cube.spaceId).layoutId;
+							let layout = this.arrFrunList.find(it=>it.id == layoutId);
+							if(layout){
+								name = spaceTypes[layout.type - 1];
+							}
+						}
 						this.lableItem.push(
 							{
-								text:cube.spaceName,
+								text:name,
 								spaceId:cube.spaceId,
 								transform:'',
 								cubeIndex:index,

+ 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" :layoutList="arrFrunList" ></viewMask>
 	<!-- 生成截屏的画布对象 -->
 	<canvas id="canvas" type="2d" :style="{'height':canvasHeight+'px','top':'100vh'}"></canvas>
 </div>

+ 30 - 8
src/pages/webgl_rxdz_roam/webgl_rxdz_roam.vue

@@ -14,7 +14,7 @@
 	// import util from '@/utils/util.js';
     // const config = require('@/services/urlConfig.js');
     // import requestConfig from '@/static/lib/requestConfig.js';
-	import viewShell from'@/components/newBottomCom/viewShell/viewShell.vue';
+	// import viewShell from'@/components/newBottomCom/viewShell/viewShell.vue';
 	import viewMask from'@/components/newBottomCom/viewMask/viewMask.vue';
 
 	// import { RGBELoader } from '@/webgl/jsm/loaders/RGBELoader.js';
@@ -26,7 +26,7 @@
 	// import commonPageMethod from '@/common/commonPageMethod.js';
     // const app = getApp(); //获取应用实例
     export default {
-		components:{viewShell,viewMask},
+		components:{viewMask},
 		mixins:[screenshot,loadModel,floorMethod,wallMethod,commonPageMethod],
         /**
          * 页面的初始数据
@@ -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;//增加偏差,防止极点翻转问题?不知道为啥会有用
 				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,21 @@
                 // 获取墙体数据并且绘制墙体
                 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);
+				if(this.isIOS){
+					this.furnSingleSpaceHandle(this.curSpaceObj);
+				}
+				this.positionCamer(this.curSpaceObj,true);
+				let curSpaceArea = parseFloat((this.curSpaceObj.spaceWidth * this.curSpaceObj.spaceHeight) / 10000).toFixed(1);
+				this.navbar.title = this.curSpaceObj.spaceName + "  " + curSpaceArea + "㎡";
+				document.title = this.navbar.title;
+			},
 			// 获取墙体数据
             async getHouseTypeSpaceWalls(){
 				let wallList = [];

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

@@ -29,7 +29,7 @@
 		<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 class="change-view rows justify-center" @click="enterPlot(gltf)" v-if="selectSpace && selectSpace.spaceId==gltf.spaceId">更改功能</div> -->
 	</div>
 	<!-- <div id="labels"></div> -->
 	<!-- 左侧操作区域 -->

+ 29 - 21
src/pages/webgl_rxdz_test/webgl_rxdz_test.vue

@@ -544,15 +544,15 @@
 						camera.aspect = screenWidth / object.h1;
 						camera.updateProjectionMatrix();
 						renderer.setSize( screenWidth, object.h1 );
-						let step = 0.12;//每次缩放放大的尺度
-						let _juli = step * Math.tan(Math.PI / 8);//由于观测点和相机存在角度,所以要计算每次变化尺度产生的Z轴变化量
-						if(_height>0){
-							camera.position.y = camera.position.y + step;
-							camera.position.z = camera.position.z + _juli;
-						}else{
-							camera.position.y = camera.position.y - step;
-							camera.position.z = camera.position.z - _juli;
-						}
+						// let step = 0.12;//每次缩放放大的尺度
+						// let _juli = step * Math.tan(Math.PI / 8);//由于观测点和相机存在角度,所以要计算每次变化尺度产生的Z轴变化量
+						// if(_height>0){
+						// 	camera.position.y = camera.position.y + step;
+						// 	camera.position.z = camera.position.z + _juli;
+						// }else{
+						// 	camera.position.y = camera.position.y - step;
+						// 	camera.position.z = camera.position.z - _juli;
+						// }
 						// that.canvasHeight = object.h1;
 					}
 				}).onComplete(()=>{
@@ -802,7 +802,20 @@
 			
 			    }
 			},
-			
+			curSpaceSelect(data){
+				console.warn("***curSpaceSelect***",data);
+				if(this.selectSpace){
+					this.changeSpaceColor(this.selectSpace.spaceId,2);//取消上一个空间的颜色
+				}
+				let spaceId = data.spaceId;
+				let space = this.spaceList.find(it=>it.spaceId==spaceId);
+				this.selectSpace = space;
+				this.currentChangeSpaceId = spaceId;
+				this.$store.state.curSpaceId = data.spaceId;
+				
+				this.changeSpaceColor(data.spaceId,1);//设置选中空间的颜色
+				this.moveMeshCenter(space);
+			},
 			//具体空间面积变化-拖动产生的
 			//data = {
 			//		spaceId:245,
@@ -814,7 +827,8 @@
 				// this.changeArea = changArea;//当次变化的面积,有正负值
 				// this.sumArea = parseFloat((this.sumArea + changArea).toFixed(2));
 				this.overChange = true;//变形开始 防止在形变结束前,再次形变
-				this.currentChangeSpaceId = data.spaceId
+				this.currentChangeSpaceId = data.spaceId;
+				this.$store.state.curSpaceId = data.spaceId;
 				this.changCurSpaceArea(data);
 				let space = this.spaceList.find(it=>it.spaceId==this.currentChangeSpaceId);
 				this.moveMeshCenter(space);
@@ -1601,6 +1615,9 @@
 					this.changeSpaceColor(this.selectSpace.spaceId,2);//取消上一个空间的颜色
 				}
 				this.selectSpace = this.spaceList.find(it=>it.spaceId==gltf.spaceId);
+				this.$store.state.curSpaceId = this.selectSpace.spaceId;
+				this.currentChangeSpaceId = this.selectSpace.spaceId;
+				// this.moveMeshCenter(this.selectSpace);
 				this.changeSpaceColor(this.selectSpace.spaceId,1);//设置选中空间的颜色
 				console.warn("***selectSpaceHandle***",this.selectSpace)
 			},
@@ -1701,6 +1718,7 @@
                 console.log("该户型空间数据:", this.spaceList, this.layoutIds,type);
                 console.log("当前选中的空间:", this.curSpaceObj,this.curHouseObj);
 				this.spaceListBackup = JSON.parse(JSON.stringify(this.spaceList));
+				this.$store.state.curSpaceId = this.curSpaceObj.spaceId;
 				this.loaderSpaceArr(this.spaceList);
                 // 绘制墙体
                 this.getHouseTypeSpaceWalls();
@@ -1711,16 +1729,6 @@
 				let lable = this.lableItem.find(it=>it.spaceId == spaceId);
 				let name = spaceTypes[layoutObj.type - 1];
 				lable.text = name;
-				// this.lableItem.forEach(lable=>{
-				// 	if(lable.spaceType==15){
-				// 		let layoutId = this.spaceList.find(it => it.spaceId == lable.spaceId).layoutId;
-				// 		let layout = list.find(it=>it.id == layoutId);
-				// 		if(layout){
-				// 			let name = spaceTypes[layout.type - 1];
-				// 			lable.text = name
-				// 		}
-				// 	}
-				// })
 				console.warn("***updataLable***",lable)
 				this.$refs.viewShell.$refs.viewCareful.updataData(spaceId,layoutObj);
 			},

+ 32 - 1
src/pages/webgl_rxdz_test_env/webgl_rxdz_test_env.vue

@@ -13,6 +13,7 @@
 	import {
 		Toast
 	} from 'mint-ui';
+	import { MessageBox } from 'mint-ui';
 	import touchHandle from '@/mixins/touchHandle.js';
 	// import createImgHandle from '@/mixins/createImgHandle.js';
 	import commonPageMethod from '@/mixins/commonPageMethod.js';
@@ -370,7 +371,37 @@
 					});
 					return false;
 				}
-				this.resultDataHandle();
+				//三个题都存在,则是完整的前测
+				if(this.queryObj && this.queryObj.id1 && this.queryObj.id2 && this.queryObj.id3){
+					this.resultDataHandle();
+				}else{
+					// Toast({
+					// 	message: '谢谢参与',
+					// });
+					MessageBox.confirm('',{
+						title: '提示',
+						message: '感谢您的参与',
+						showCancelButton: true,
+						confirmButtonText:'返回首页',
+						cancelButtonText:'确认',
+					}).then(action => {
+						console.warn("***MessageBox-action***",action)
+						if(action == 'confirm'){
+							if(window.__wxjs_environment === 'miniprogram'){
+								this.pvCloseHandle();//小程序跳转会主动杀死关闭当前页面-不经过vue跳转关闭逻辑-所以需要主动触发关闭埋点
+								wx.miniProgram.redirectTo({url: '/pages/index/index?houseId='+this.houseId})
+							}else{
+								// this.$message.warning("敬请期待");
+								// this.showPop();
+							}
+						}
+					}).catch(err=>{
+						console.warn("***MessageBox-err***",err)
+						if(err == 'cancel'){
+							// self.cancelHandle();
+						}
+					});
+				}
 				// console.log("进入订制户型: ", this.curHouseObj);
 				// setStorage('curHouseObj', this.curHouseObj);
 				// this.$store.dispatch('setCurHouseObj', this.curHouseObj);

+ 4 - 1
src/pages/webgl_rxdz_test_roam/webgl_rxdz_test_roam.vue

@@ -651,7 +651,7 @@
 				let data = roamPositionHandle();
 				let cameraNewPosition = data.cameraNewPosition;
 				let targetNewPosition = data.targetNewPosition;
-				targetNewPosition.z = targetNewPosition.z + 0.5;//增加偏差,防止极点翻转问题?不知道为啥会有用
+				targetNewPosition.z = targetNewPosition.z;//增加偏差,防止极点翻转问题?不知道为啥会有用
 				let lookPosition = data.lookPosition;
 				creatMoveTip(cameraNewPosition);//创建移动的地标
 				if(needAni){
@@ -868,6 +868,9 @@
 				}
 				this.spaceId = spaceId;
 				this.curSpaceObj = this.spaceList.find(it=>it.spaceId == spaceId);
+				if(this.isIOS){
+					this.furnSingleSpaceHandle(this.curSpaceObj);
+				}
 				this.positionCamer(this.curSpaceObj,true);
 				let curSpaceArea = parseFloat((this.curSpaceObj.spaceWidth * this.curSpaceObj.spaceHeight) / 10000).toFixed(1);
 				this.navbar.title = this.curSpaceObj.spaceName + "  " + curSpaceArea + "㎡";

+ 1 - 1
src/services/urlConfig.js

@@ -188,7 +188,7 @@ var config = function(env) {
             uploadUrl: 'https://dm-api.elab-plus.cn', //文件上传
             api_url: 'https://dm-api.elab-plus.cn/', //接口地址
             redirect_uri: 'http://city.1949plus.com', // 授权回调地址
-			min_uri: 'https://dm.static.elab-plus.com/miniProgram/webgl/test1/index.html#/', // H5小程序的地址
+			min_uri: 'https://map.elab-plus.com.cn/1949plus/index.html#/', // H5小程序的地址
 			ws_url: 'wss://websocket.elab-plus.cn/',
 			xcxHouseId: '11121',
             themeColor1: '#7AB47C',

+ 5 - 0
src/store/actions.js

@@ -39,6 +39,11 @@ const actions = {
 	}, houseId) {
 		commit('SET_HOUSEID', houseId)
 	},
+	setCurSpaceId({
+		commit
+	}, curSpaceId) {
+		commit('SET_CURSPACEID', curSpaceId)
+	},
 	// setCityListData({
 	// 	commit
 	// }, cityListData) {

+ 3 - 0
src/store/mutations.js

@@ -23,5 +23,8 @@ const mutations = {
 	SET_WALLLIST(state, wallList) {
 		state.wallList = wallList
 	},
+	SET_CURSPACEID(state, curSpaceId) {
+		state.curSpaceId = curSpaceId
+	},
 }
 export default mutations;

+ 1 - 0
src/store/state.js

@@ -8,5 +8,6 @@ const state = {
 	curHouseObj:null,
 	wallList:null,	//墙体数据
 	aiData:null,	//AI生成的数据
+	curSpaceId:null,	//当前选中的空间id
 }
 export default state