Commit d3525d91 authored by youjie's avatar youjie

no message

parent 27970613
......@@ -213,8 +213,8 @@
DeleteImg() {
},
toAddPages() {
this.$emit('toAddPages', this.index, this.FeatureData)
toAddPages(index,item) {
this.$emit('toAddPages', index, item)
},
toDeletePages() {
this.$emit('toDeletePages', this.index)
......
......@@ -49,11 +49,25 @@
<i class="iconfont icon-shangyi"></i>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="添加页面" placement="top">
<el-tooltip class="item" effect="dark" content="选添加页面模版" placement="top">
<el-popover trigger="hover" placement="right">
<div class="featureControls-Template" style="height: 500px;overflow: auto;width: 300px;">
<div class="Template-img relative" v-for="(item,index) in PagesList" @click="toAddPages(item)"
:key="index">
<img :src="item.url" />
<!-- <div v-if="item.id==TemplateType" class="Template-imgSelect absolute row-ajc el-icon-success"></div> -->
</div>
</div>
<div slot="reference" style="padding: 0 4px;">
<i class="el-icon-plus"></i>
</div>
</el-popover>
</el-tooltip>
<!-- <el-tooltip class="item" effect="dark" content="添加页面" placement="top">
<div @click="toAddPages">
<i class="el-icon-plus"></i>
</div>
</el-tooltip>
</el-tooltip> -->
<el-tooltip class="item" effect="dark" content="删除页面" placement="top">
<div @click="toDeletePages" v-if="isDeletePage">
<i class="el-icon-delete"></i>
......@@ -106,6 +120,32 @@
],
data() {
return {
PagesList:[
{
url: 'https://imgfile.oytour.com/static/page1.png',
pageType: 1,
},
{
url: 'https://imgfile.oytour.com/static/page2.png',
pageType: 7,
},
{
url: 'https://imgfile.oytour.com/static/page3.png',
pageType: 2,
},
{
url: 'https://imgfile.oytour.com/static/page4.png',
pageType: 4,
},
{
url: 'https://imgfile.oytour.com/static/page5.png',
pageType: 5,
},
{
url: 'https://imgfile.oytour.com/static/page6.png',
pageType: 6,
}
],
TemplateType: 1,
TemplateList: [{
url: 'http://imgfile.oytour.com/Static/NewTripFeature/featureTemplateOne.png',
......@@ -163,9 +203,9 @@
toDeleteImg() {
this.$emit('toDeleteImg')
},
toAddPages() {
// this.pagesType 1 首页 2 介绍 3餐食介绍 4宿 5食 6景
this.$emit('toAddPages')
toAddPages(item) {
// this.pagesType 1 首页 2 介绍 3餐食介绍 4宿 5食 6景 7新首页
this.$emit('toAddPages',this.index,item)
},
toDeletePages() {
this.$emit('toDeletePages')
......
......@@ -239,8 +239,8 @@
DeleteImg() {
},
toAddPages() {
this.$emit('toAddPages', this.index, this.FeatureItem)
toAddPages(index,item) {
this.$emit('toAddPages', index, item)
},
toDeletePages() {
this.$emit('toDeletePages', this.index)
......
......@@ -47,7 +47,7 @@
:h="749" :ref="'viewSpotVds_' + (FeatureItem * 4 + 1) + '_'+index" tabindex="0" :resizable="false"
:active="false" :parent="false" axis="y" @activated="onActivated(FeatureItem * 4 + 1, index)"
:x="FeatureItem.dataObj.ImgList[0].x" :y="FeatureItem.dataObj.ImgList[0].y" :z="2" @dragstop="onViewSpotDragstop">
<img :src="FeatureItem.dataObj.ImgList[0].url" :id="'viewSpotImg_' + (FeatureItem * 4 + 1) + '_'+index" />
<img style="height: auto;" :src="FeatureItem.dataObj.ImgList[0].url" :id="'viewSpotImg_' + (FeatureItem * 4 + 1) + '_'+index" />
</VueDraggableResizable>
<!-- 蒙层 -->
<div class="featureHome2-form featureHome2-formHover relative z-index3"
......@@ -286,8 +286,8 @@
DeleteImg() {
},
toAddPages() {
this.$emit('toAddPages', this.index, this.FeatureItem)
toAddPages(index,item) {
this.$emit('toAddPages', index, item)
},
toDeletePages() {
this.$emit('toDeletePages', this.index)
......
......@@ -165,55 +165,38 @@
newObj.Title = this.FeatureData.Title;
newObj.LineShortName = this.FeatureData.LineShortName;
//首页
if (pageData.pageType == 1) {
if (featureDataObj.pageType == 1) {
pageData.pageTitle = "首页";
this.getHomeData(tripObj, newObj);
}
//介绍页
else if (pageData.pageType == 2) {
else if (featureDataObj.pageType == 2) {
pageData.pageTitle = "介绍";
this.getIntroduceData(tripObj, newObj);
} //食详情
else if (pageData.pageType == 3) {
else if (featureDataObj.pageType == 3) {
pageData.pageTitle = "食详情";
this.getDetailsData(tripObj, newObj);
} //宿
else if (pageData.pageType == 4) {
else if (featureDataObj.pageType == 4) {
pageData.pageTitle = "宿";
this.getHotelData(tripObj, newObj);
} //食
else if (pageData.pageType == 5) {
else if (featureDataObj.pageType == 5) {
pageData.pageTitle = "食";
this.getDinnerData(tripObj, newObj);
}
//景MainDescTextScene
else if (pageData.pageType == 6) {
else if (featureDataObj.pageType == 6) {
pageData.pageTitle = "景";
this.getScenicData(tripObj, newObj);
}
//首页2
else if (pageData.pageType == 7) {
else if (featureDataObj.pageType == 7) {
pageData.pageTitle = "首页2";
pageData.dataObj.ImgList[0].x = 0
if(!newObj.SceneDesc){
newObj.maskPosition = false
newObj.Meal = '餐食'
newObj.MealName = tripObj.dinnerArray.length>0?tripObj.dinnerArray[0].MainName:'餐食名称'
newObj.MealName2 = tripObj.dinnerArray.length>1?tripObj.dinnerArray[1].MainName:'餐食名称'
newObj.Host = '住宿'
newObj.HostName = tripObj.hotelArray.length>0?tripObj.hotelArray[0].MainName:'酒店名称'
newObj.HostName2 = tripObj.hotelArray.length>1?tripObj.hotelArray[1].MainName:'酒店名称'
newObj.Scene = '风景'
newObj.SceneDesc = tripObj.scenicArray.length>0?tripObj.scenicArray[0].MainName+':'+tripObj.scenicArray[0].MainDesc:'景点描述信息'
newObj.SceneTitle2 = tripObj.scenicArray.length>1?tripObj.scenicArray[1].MainName:'景点名称'
newObj.SceneDesc2 = tripObj.scenicArray.length>1?tripObj.scenicArray[1].MainDesc:'景点描述信息'
newObj.HostTitle = tripObj.hotelArray.length>1?tripObj.hotelArray[1].MainName:'酒店名称'
newObj.HostDesc = tripObj.hotelArray.length>1?tripObj.hotelArray[1].MainDesc:'酒店描述信息'
newObj.SceneTitle3 = tripObj.scenicArray.length>2?tripObj.scenicArray[2].MainName:'景点名称'
newObj.SceneDesc3 = tripObj.scenicArray.length>2?tripObj.scenicArray[2].MainDesc:'景点描述信息'
}
this.getHomeData(tripObj, newObj);
if(pageData.dataObj&&pageData.dataObj.ImgList&&pageData.dataObj.ImgList.length>0) pageData.dataObj.ImgList[0].x = 0
this.getHomeData(tripObj, newObj,1);
}
pageData.dataObj = newObj;
this.pageList.splice(index, 0, pageData);
......@@ -281,76 +264,9 @@
oldJson.forEach(item => {
item.isDeletePage = true;
});
let PageType = oldJson.find(x=>{
return x.pageType == 7
})
if(!PageType){
let obj = {
...oldJson[0]
}
obj.pageType = 7
oldJson.unshift(JSON.parse(JSON.stringify(obj)))
}
oldJson.forEach(x=>{
if(x.pageType == 7){
x.dataObj.ImgList[0].x = 0
if(!x.dataObj.SceneDesc) {
x.dataObj.maskPosition= false
x.dataObj.Meal = '餐食'
x.dataObj.MealName = tripObj.dinnerArray.length>0?tripObj.dinnerArray[0].MainName:'餐食名称'
x.dataObj.MealName2 = tripObj.dinnerArray.length>1?tripObj.dinnerArray[1].MainName:'餐食名称'
x.dataObj.Host = '住宿'
x.dataObj.HostName = tripObj.hotelArray.length>0?tripObj.hotelArray[0].MainName:'酒店名称'
x.dataObj.HostName2 = tripObj.hotelArray.length>1?tripObj.hotelArray[1].MainName:'酒店名称'
x.dataObj.Scene = '风景'
x.dataObj.SceneDesc = tripObj.scenicArray.length>0?tripObj.scenicArray[0].MainName+':'+tripObj.scenicArray[0].MainDesc:'景点描述信息'
x.dataObj.SceneTitle2 = tripObj.scenicArray.length>1?tripObj.scenicArray[1].MainName:'景点名称'
x.dataObj.SceneDesc2 = tripObj.scenicArray.length>1?tripObj.scenicArray[1].MainDesc:'景点描述信息'
x.dataObj.HostTitle = tripObj.hotelArray.length>1?tripObj.hotelArray[1].MainName:'酒店名称'
x.dataObj.HostDesc = tripObj.hotelArray.length>1?tripObj.hotelArray[1].MainDesc:'酒店描述信息'
x.dataObj.SceneTitle3 = tripObj.scenicArray.length>2?tripObj.scenicArray[2].MainName:'景点名称'
x.dataObj.SceneDesc3 = tripObj.scenicArray.length>2?tripObj.scenicArray[2].MainDesc:'景点描述信息'
}
}
})
this.pageList = oldJson;
console.log(this.pageList,'====6666')
this.RenderingOk = true;
} else {
let PageType = this.pageList.find(x=>{
return x.pageType == 7
})
if(!PageType){
let obj = {
...this.pageList[0]
}
obj.pageType = 7
this.pageList.unshift(JSON.parse(JSON.stringify(obj)))
}
this.pageList.forEach(x=>{
if(x.pageType == 7){
x.dataObj.ImgList[0].x = 0
if(!x.dataObj.SceneDesc) {
x.dataObj.maskPosition= false
x.dataObj.Meal = '餐食'
x.dataObj.MealName = tripObj.dinnerArray.length>0?tripObj.dinnerArray[0].MainName:'餐食名称'
x.dataObj.MealName2 = tripObj.dinnerArray.length>1?tripObj.dinnerArray[1].MainName:'餐食名称'
x.dataObj.Host = '住宿'
x.dataObj.HostName = tripObj.hotelArray.length>0?tripObj.hotelArray[0].MainName:'酒店名称'
x.dataObj.HostName2 = tripObj.hotelArray.length>1?tripObj.hotelArray[1].MainName:'酒店名称'
x.dataObj.Scene = '风景'
x.dataObj.SceneDesc = tripObj.scenicArray.length>0?tripObj.scenicArray[0].MainName+':'+tripObj.scenicArray[0].MainDesc:'景点描述信息'
x.dataObj.SceneTitle2 = tripObj.scenicArray.length>1?tripObj.scenicArray[1].MainName:'景点名称'
x.dataObj.SceneDesc2 = tripObj.scenicArray.length>1?tripObj.scenicArray[1].MainDesc:'景点描述信息'
x.dataObj.HostTitle = tripObj.hotelArray.length>1?tripObj.hotelArray[1].MainName:'酒店名称'
x.dataObj.HostDesc = tripObj.hotelArray.length>1?tripObj.hotelArray[1].MainDesc:'酒店描述信息'
x.dataObj.SceneTitle3 = tripObj.scenicArray.length>2?tripObj.scenicArray[2].MainName:'景点名称'
x.dataObj.SceneDesc3 = tripObj.scenicArray.length>2?tripObj.scenicArray[2].MainDesc:'景点描述信息'
}
}
})
this.pageList.forEach(pItem => {
var newObj = this.getDetailsObj();
newObj.LineName = this.FeatureData.LineName;
......@@ -382,24 +298,6 @@
}
//首页2
else if (pItem.pageType == 7) {
newObj.ImgList[0].x = 0
if(!newObj.SceneDesc){
newObj.maskPosition = false
newObj.Meal = '餐食'
newObj.MealName = tripObj.dinnerArray.length>0?tripObj.dinnerArray[0].MainName:'餐食名称'
newObj.MealName2 = tripObj.dinnerArray.length>1?tripObj.dinnerArray[1].MainName:'餐食名称'
newObj.Host = '住宿'
newObj.HostName = tripObj.hotelArray.length>0?tripObj.hotelArray[0].MainName:'酒店名称'
newObj.HostName2 = tripObj.hotelArray.length>1?tripObj.hotelArray[1].MainName:'酒店名称'
newObj.Scene = '风景'
newObj.SceneDesc = tripObj.scenicArray.length>0?tripObj.scenicArray[0].MainName+':'+tripObj.scenicArray[0].MainDesc:'景点描述信息'
newObj.SceneTitle2 = tripObj.scenicArray.length>1?tripObj.scenicArray[1].MainName:'景点名称'
newObj.SceneDesc2 = tripObj.scenicArray.length>1?tripObj.scenicArray[1].MainDesc:'景点描述信息'
newObj.HostTitle = tripObj.hotelArray.length>1?tripObj.hotelArray[1].MainName:'酒店名称'
newObj.HostDesc = tripObj.hotelArray.length>1?tripObj.hotelArray[1].MainDesc:'酒店描述信息'
newObj.SceneTitle3 = tripObj.scenicArray.length>2?tripObj.scenicArray[2].MainName:'景点名称'
newObj.SceneDesc3 = tripObj.scenicArray.length>2?tripObj.scenicArray[2].MainDesc:'景点描述信息'
}
this.getHomeData(tripObj, newObj);
}
pItem.dataObj = newObj;
......@@ -408,7 +306,7 @@
}
},
//首页数据渲染
getHomeData(tripObj, newObj) {
getHomeData(tripObj, newObj,type) {
if (tripObj.cityStr && tripObj.cityStr != '') {
newObj.MainName = tripObj.cityStr; //地区1
} else {
......@@ -444,6 +342,26 @@
}];
newObj.MainDesc = "景点描述";
}
// 新版首页2023/11/20
if(type){
if(!newObj.SceneDesc){
newObj.maskPosition = false
newObj.Meal = '餐食'
newObj.MealName = tripObj.dinnerArray.length>0?tripObj.dinnerArray[0].MainName:'餐食名称'
newObj.MealName2 = tripObj.dinnerArray.length>1?tripObj.dinnerArray[1].MainName:'餐食名称'
newObj.Host = '住宿'
newObj.HostName = tripObj.hotelArray.length>0?tripObj.hotelArray[0].MainName:'酒店名称'
newObj.HostName2 = tripObj.hotelArray.length>1?tripObj.hotelArray[1].MainName:'酒店名称'
newObj.Scene = '风景'
newObj.SceneDesc = tripObj.scenicArray.length>0?tripObj.scenicArray[0].MainName+':'+tripObj.scenicArray[0].MainDesc:'景点描述信息'
newObj.SceneTitle2 = tripObj.scenicArray.length>1?tripObj.scenicArray[1].MainName:'景点名称'
newObj.SceneDesc2 = tripObj.scenicArray.length>1?tripObj.scenicArray[1].MainDesc:'景点描述信息'
newObj.HostTitle = tripObj.hotelArray.length>1?tripObj.hotelArray[1].MainName:'酒店名称'
newObj.HostDesc = tripObj.hotelArray.length>1?tripObj.hotelArray[1].MainDesc:'酒店描述信息'
newObj.SceneTitle3 = tripObj.scenicArray.length>2?tripObj.scenicArray[2].MainName:'景点名称'
newObj.SceneDesc3 = tripObj.scenicArray.length>2?tripObj.scenicArray[2].MainDesc:'景点描述信息'
}
}
},
//介绍页数据
getIntroduceData(tripObj, newObj) {
......
......@@ -171,8 +171,8 @@
});
}
},
toAddPages() {
this.$emit('toAddPages', this.index, this.FeatureItem)
toAddPages(index,item) {
this.$emit('toAddPages', index, item)
},
toDeletePages() {
this.$emit('toDeletePages', this.index, this.FeatureItem)
......
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