Commit d0de1d05 authored by youjie's avatar youjie
parents a9d334ee fdfa12da
......@@ -176,7 +176,7 @@
queryId: 0,
},
imgIndex: null,
defaultScenicIndex:0,//当前默认选中的景点
defaultScenicIndex: 0, //当前默认选中的景点
};
},
......@@ -317,14 +317,12 @@
this.item.TrafficObj.trafficIntroduce.y = 0
this.item.TrafficObj.Introduce = JSON.stringify(this.item.TrafficObj.trafficIntroduce);
}
this.isShowScenicImg = false;
if(this.item.ScenicArray&&this.item.ScenicArray.length>0)
{
this.item.ScenicArray[this.defaultScenicIndex]=JSON.parse(JSON.stringify(this.ScenicArrayList[0]));
}
if (this.item.ScenicArray && this.item.ScenicArray.length > 0) {
this.item.ScenicArray[this.defaultScenicIndex] = JSON.parse(JSON.stringify(this.ScenicArrayList[0]));
}
//this.item.ScenicArray = JSON.parse(JSON.stringify(this.ScenicArrayList))
}
},
computed: {},
......@@ -333,12 +331,21 @@
handler(val, oldVal) {
this.RenderingOk = false;
this.ScenicArrayList = []
this.item.ScenicArray.forEach((x ,index)=> {
this.item.ScenicArray.forEach((x, index) => {
if (x.DefaultNum > 0) {
this.defaultScenicIndex=index;
this.defaultScenicIndex = index;
this.ScenicArrayList.push(x)
}
});
if (this.ScenicArrayList.length == 0) {
this.item.ScenicArray.forEach((x, index) => {
if (index == 0) {
x.DefaultNum = 1;
this.defaultScenicIndex = index;
this.ScenicArrayList.push(x)
}
});
}
if (this.ScenicArrayList && this.ScenicArrayList.length > 0) this.ScenicArrayList.sort((a, b) => {
return a.Rank - b.Rank
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment