Commit fdfa12da authored by 黄奎's avatar 黄奎

页面修改

parent 9b0932de
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
queryId: 0, queryId: 0,
}, },
imgIndex: null, imgIndex: null,
defaultScenicIndex:0,//当前默认选中的景点 defaultScenicIndex: 0, //当前默认选中的景点
}; };
}, },
...@@ -317,14 +317,12 @@ ...@@ -317,14 +317,12 @@
this.item.TrafficObj.trafficIntroduce.y = 0 this.item.TrafficObj.trafficIntroduce.y = 0
this.item.TrafficObj.Introduce = JSON.stringify(this.item.TrafficObj.trafficIntroduce); this.item.TrafficObj.Introduce = JSON.stringify(this.item.TrafficObj.trafficIntroduce);
} }
this.isShowScenicImg = false; this.isShowScenicImg = false;
if(this.item.ScenicArray&&this.item.ScenicArray.length>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[this.defaultScenicIndex]=JSON.parse(JSON.stringify(this.ScenicArrayList[0])); }
}
//this.item.ScenicArray = JSON.parse(JSON.stringify(this.ScenicArrayList)) //this.item.ScenicArray = JSON.parse(JSON.stringify(this.ScenicArrayList))
} }
}, },
computed: {}, computed: {},
...@@ -333,12 +331,21 @@ ...@@ -333,12 +331,21 @@
handler(val, oldVal) { handler(val, oldVal) {
this.RenderingOk = false; this.RenderingOk = false;
this.ScenicArrayList = [] this.ScenicArrayList = []
this.item.ScenicArray.forEach((x ,index)=> { this.item.ScenicArray.forEach((x, index) => {
if (x.DefaultNum > 0) { if (x.DefaultNum > 0) {
this.defaultScenicIndex=index; this.defaultScenicIndex = index;
this.ScenicArrayList.push(x) 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) => { if (this.ScenicArrayList && this.ScenicArrayList.length > 0) this.ScenicArrayList.sort((a, b) => {
return a.Rank - b.Rank 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