|
@@ -707,14 +707,46 @@
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ async getInitData(){
|
|
|
+ let parmas = {
|
|
|
+ childLayout:this.childLayout || 0,
|
|
|
+ houseId:this.houseId,
|
|
|
+ }
|
|
|
+ const res = await requestConfig('getHouseTypeSpaceDetailsV2', parmas, true);
|
|
|
+ if (res.success && res.list) {
|
|
|
+ let list = res.list || [];
|
|
|
+ list && list.forEach((single,index)=>{
|
|
|
+ single.layoutStruct.forEach((item)=>{
|
|
|
+ if(item.houseJson){
|
|
|
+ let spaceList = JSON.parse(item.houseJson);
|
|
|
+ // 交换centerX, centerY
|
|
|
+ for (let index = 0; index < spaceList.length; index++) {
|
|
|
+ var element = spaceList[index];
|
|
|
+ const {centerX, centerY} = element;
|
|
|
+ element.centerX = centerY;
|
|
|
+ element.centerY = centerX;
|
|
|
+ }
|
|
|
+ item.houseJson = JSON.stringify(spaceList);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ console.log("户型详情列表-接口原始数据: ", list);
|
|
|
+ this.houseList = list;//数据会同步到组件中-进而反馈更新页面数据
|
|
|
+ }
|
|
|
+ },
|
|
|
// 查询户型列表
|
|
|
async findHouseTypeSpaceListByIds() {
|
|
|
+ // let parmas = {
|
|
|
+ // childLayout:this.childLayout || 0,
|
|
|
+ // houseId:this.houseId,
|
|
|
+ // }
|
|
|
+ // let _url = "getHouseTypeSpaceDetailsV2";
|
|
|
var parmas = {
|
|
|
brandId: $config.brandId,
|
|
|
houseId: this.houseId,
|
|
|
pageNo: 1,
|
|
|
pageSize: 2000,
|
|
|
- ids: [this.ueId],
|
|
|
+ ids: this.ueId ? [this.ueId] : [286],
|
|
|
};
|
|
|
let res = await requestConfig("findHouseTypeSpaceListByIds", parmas);
|
|
|
if (res.success && res.list) {
|
|
@@ -746,7 +778,6 @@
|
|
|
this.curHouseObj = res.list[0];
|
|
|
setStorage('curHouseObj', this.curHouseObj);
|
|
|
this.houseInit();
|
|
|
- // this.houseList = res.list || [];
|
|
|
}
|
|
|
},
|
|
|
voiceMaskChange(voiceMask){
|