Commit ad329761 authored by liudong1993's avatar liudong1993
parents 3b0385b9 ab019ad8
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</template> </template>
<script> <script>
export default { export default {
props: ["value", "canEdit"], props: ["value", "canEdit","textLength"],
data() { data() {
return { return {
innerText: this.value, innerText: this.value,
...@@ -23,15 +23,23 @@ ...@@ -23,15 +23,23 @@
changeText: function () { changeText: function () {
let sel = window.getSelection() let sel = window.getSelection()
let offset = sel.anchorOffset let offset = sel.anchorOffset
if(this.$el.innerText.length>this.textLength){
this.$el.innerText = this.$el.innerText.slice(0,3)
}
if(this.textLength) this.$el.innerText = this.$el.innerText.slice(0,this.textLength)
this.$emit("input", this.$el.innerText); this.$emit("input", this.$el.innerText);
setTimeout(() => { setTimeout(() => {
var range = sel.getRangeAt(0); var range = sel.getRangeAt(0);
if (range) { if (range) {
var textNode = range.startContainer; var textNode = range.startContainer;
if (textNode) {
range.setStart(textNode, offset) range.setStart(textNode, offset)
}
if (sel) {
sel.removeAllRanges() sel.removeAllRanges()
sel.addRange(range) sel.addRange(range)
} }
}
}, 0) }, 0)
} }
} }
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
<div class="MasterMapList-1 relative bjE6 UpgradedVersion-Hover"> <div class="MasterMapList-1 relative bjE6 UpgradedVersion-Hover">
<div class="MasterMapList1 absolute z-index1"> <div class="MasterMapList1 absolute z-index1">
<FeatureControls v-if="FeatureData" :index="index" :FeatureData="FeatureData" <FeatureControls v-if="FeatureData" :index="index" :FeatureData="FeatureData"
:isUploadImg="FeatureData.pageTitle=='介绍'?false:true" :isSelectImg="FeatureData.pageTitle=='介绍'?false:true" :isUploadImg="FeatureData.pageType==2?false:true" :isSelectImg="FeatureData.pageType==2?false:true"
:isDeleteImg="FeatureData.pageTitle=='介绍'?false:true" @toUploadImg="toUploadImg" @toSelectImg="toSelectImg" :isDeleteImg="FeatureData.pageType==2?false:true" @toUploadImg="toUploadImg" @toSelectImg="toSelectImg"
@toAddImg="toAddImg" @toDeleteImg="toDeleteImg" /> @toAddImg="toAddImg" @toDeleteImg="toDeleteImg" />
</div> </div>
<img class="absolute" src="http://192.168.10.214:8130/Upload/NewTripFeature/homeBj.png" /> <img v-if="FeatureData.dataObj.ImgList.length>0" class="absolute" :src="FeatureData.dataObj.ImgList[0].url" />
</div> </div>
<div v-if="FeatureData.imgList&&FeatureData.imgList.length==2" class="MasterMapList-2 row-sb"> <div v-if="FeatureData.imgList&&FeatureData.imgList.length==2" class="MasterMapList-2 row-sb">
...@@ -492,7 +492,7 @@ ...@@ -492,7 +492,7 @@
}, },
deep: true, deep: true,
immediate: true immediate: false
}, },
}, },
mounted() { mounted() {
......
...@@ -97,10 +97,10 @@ ...@@ -97,10 +97,10 @@
}, },
toAddPages() { toAddPages() {
// this.pagesType 1 首页 2 介绍 3餐食介绍 4宿 5食 6景 // this.pagesType 1 首页 2 介绍 3餐食介绍 4宿 5食 6景
this.$emit('toAddPages', this.index, this.FeatureData) this.$emit('toAddPages')
}, },
toDeletePages() { toDeletePages() {
this.$emit('toDeletePages', this.index, this.FeatureData) this.$emit('toDeletePages')
}, },
}, },
computed: {}, computed: {},
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
<div class="UpgradedVersion-subIde absolute z-index3"> <div class="UpgradedVersion-subIde absolute z-index3">
<!-- UpgradedVersion-otherSubheading 宿、食、景 标记 --> <!-- UpgradedVersion-otherSubheading 宿、食、景 标记 -->
<div <div
:class="[FeatureData.pageTitle=='宿'||FeatureData.pageTitle=='食'||FeatureData.pageTitle=='景'?'UpgradedVersion-otherSubheading':'']"> :class="[FeatureData.pageType==4||FeatureData.pageType==5||FeatureData.pageType==6?'UpgradedVersion-otherSubheading':'']">
<div class="UpgradedVersion-subIdeBj relative z-index2"> <div class="UpgradedVersion-subIdeBj relative z-index2">
<div class="UpgradedVersion-subIdeBj1 absolute z-index2" :style="{'background':TripColor}">&nbsp;</div> <div class="UpgradedVersion-subIdeBj1 absolute z-index2" :style="{'background':TripColor}">&nbsp;</div>
<!-- <div class="UpgradedVersion-subIdeBj2 absolute z-index1">&nbsp;</div> --> <!-- <div class="UpgradedVersion-subIdeBj2 absolute z-index1">&nbsp;</div> -->
<div class="UpgradedVersion-subIdeBj-h absolute z-index3"> <div class="UpgradedVersion-subIdeBj-h absolute z-index3">
<vEditDiv :canEdit='canEdit2' v-model="FeatureData.pageTitle"></vEditDiv> <vEditDiv :canEdit='canEdit2' :textLength="FeatureData.pageType==2?2:1" v-model="FeatureData.pageTitle"></vEditDiv>
</div> </div>
</div> </div>
<img class="UpgradedVersion-titleIcon relative" <img class="UpgradedVersion-titleIcon relative"
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</div> </div>
<!-- 宿、食、景 副标题 --> <!-- 宿、食、景 副标题 -->
<div class="UpgradedVersion-subIdeText-box" <div class="UpgradedVersion-subIdeText-box"
v-if="FeatureData.pageTitle=='宿'||FeatureData.pageTitle=='食'||FeatureData.pageTitle=='景'"> v-if="FeatureData.pageType==4||FeatureData.pageType==5||FeatureData.pageType==6">
<div class="UpgradedVersion-subIdeText absolute z-index3"> <div class="UpgradedVersion-subIdeText absolute z-index3">
<vEditDiv :canEdit='canEdit' v-model="FeatureData.dataObj.SubName"></vEditDiv> <vEditDiv :canEdit='canEdit' v-model="FeatureData.dataObj.SubName"></vEditDiv>
</div> </div>
...@@ -198,12 +198,12 @@ ...@@ -198,12 +198,12 @@
overflow: hidden; overflow: hidden;
left: 22px; left: 22px;
top: 41px; top: 41px;
text-align: center;
} }
.UpgradedVersion-otherSubheading .UpgradedVersion-subIdeBj-h { .UpgradedVersion-otherSubheading .UpgradedVersion-subIdeBj-h {
width: 54px; width: 54px;
height: 71px; height: 71px;
text-align: center;
left: 34px; left: 34px;
top: 20px; top: 20px;
} }
......
...@@ -15,11 +15,16 @@ ...@@ -15,11 +15,16 @@
</div> </div>
<div class="featureHome-left UpgradedVersion-Hover"> <div class="featureHome-left UpgradedVersion-Hover">
<div class="featureHome-vToolBar-one absolute z-index3"> <div class="featureHome-vToolBar-one absolute z-index3">
<FeatureControls :index="index" :FeatureData="FeatureItem" :ControlsType="'row'" <FeatureControls
:isDeletePage="FeatureItem.isDeletePage" :pagesType="1" @toAddPages="toAddPages" :index="index"
:FeatureData="FeatureItem"
:ControlsType="'row'"
:isDeletePage="FeatureItem.isDeletePage"
:pagesType="1"
@toAddPages="toAddPages"
@toDeletePages="toDeletePages"> @toDeletePages="toDeletePages">
</FeatureControls> </FeatureControls>
<input type="file" style="display:none" id='restaurantfile' @change="uploadpic"> <input type="file" style="display:none" :id="'homefile_'+(FeatureItem * 2 + 1) + '_0'" @change="uploadpic">
</div> </div>
<div class="featureHome-vToolBar-two absolute z-index3"> <div class="featureHome-vToolBar-two absolute z-index3">
<FeatureControls :index="index" :FeatureData="FeatureItem" :ControlsType="'column'" :isTemplate="false" <FeatureControls :index="index" :FeatureData="FeatureItem" :ControlsType="'column'" :isTemplate="false"
...@@ -118,7 +123,7 @@ ...@@ -118,7 +123,7 @@
}, },
methods: { methods: {
UploadImg() { UploadImg() {
document.querySelector(`#homefile_${(this.FeatureItem * 2 + 1)}_0`).click();
}, },
uploadpic(e) { uploadpic(e) {
let that = this; let that = this;
...@@ -134,7 +139,7 @@ ...@@ -134,7 +139,7 @@
that.uploadSelfBlob(path, newArr, x => { that.uploadSelfBlob(path, newArr, x => {
let allPath = that.domainManager().ViittoFileUrl + x.data.FilePath; let allPath = that.domainManager().ViittoFileUrl + x.data.FilePath;
let i = e.target.id.split("_")[2]; let i = e.target.id.split("_")[2];
that.imgUrlChange(allPath); that.FeatureItem.dataObj.ImgList[0].url = allPath
}); });
}; };
reader.readAsDataURL(e.target.files[0]); reader.readAsDataURL(e.target.files[0]);
...@@ -149,17 +154,17 @@ ...@@ -149,17 +154,17 @@
DeleteImg() { DeleteImg() {
}, },
toAddPages(index, FeatureData) { toAddPages() {
this.$emit('toAddPages', index, FeatureData) this.$emit('toAddPages', this.index, this.FeatureData)
}, },
toDeletePages(index, FeatureData) { toDeletePages() {
this.$emit('toDeletePages', index, FeatureData) this.$emit('toDeletePages', this.index)
}, },
closeDMCchooseImg() { closeDMCchooseImg() {
this.isShowScenicImg = false this.isShowScenicImg = false
}, },
getDMCimg(selectImgArr) { getDMCimg(selectImgArr) {
console.log(selectImgArr, '已选图') this.FeatureItem.dataObj.ImgList[0].url = selectImgArr[0].Path
this.isShowScenicImg = false this.isShowScenicImg = false
} }
......
...@@ -13,15 +13,15 @@ ...@@ -13,15 +13,15 @@
<headerTitle :FeatureItem="item" :TripColor="TripColor"></headerTitle> <headerTitle :FeatureItem="item" :TripColor="TripColor"></headerTitle>
<!-- 介绍、宿食景页 --> <!-- 介绍、宿食景页 -->
<otherJourney :index="index" :FeatureItem="item" :TripColor="TripColor" @toAddPages="AddPages" <otherJourney :index="index" :FeatureItem="item" :TripColor="TripColor" @toAddPages="AddPages"
@toDeletePages="DeletePages" @setTemplate="setTemplate" v-if="item.pageType!=1"></otherJourney> @toDeletePages="DeletePages" @setTemplate="setTemplate" v-if="item.pageType!=1&&item.pageType!=3"></otherJourney>
<!-- 食详情页 --> <!-- 食详情页 -->
<UpgradedVersionDetails :index="index" :FeatureData="item" :TripColor="TripColor" @toAddPages="AddPages" <UpgradedVersionDetails :index="index" :FeatureData="item" :TripColor="TripColor" @toAddPages="AddPages"
@toDeletePages="DeletePages" v-if="item.name=='食详情'"></UpgradedVersionDetails> @toDeletePages="DeletePages" v-if="item.pagesType==3"></UpgradedVersionDetails>
<!-- otherJourney-footer 食景 食详情 --> <!-- otherJourney-footer 食景 食详情 -->
<div v-if="item.name!='首页'" :class="{'otherJourney-footer':item.name=='食'||item.name=='景'||item.name=='食详情'}"> <div v-if="item.pagesType!=1" :class="{'otherJourney-footer':item.pagesType==5||item.pagesType==6||item.pagesType==3}">
<div class="otherJourney-introduceFooter absolute z-index1 row-aic" <div class="otherJourney-introduceFooter absolute z-index1 row-aic"
:style="{'background':item.name=='食'||item.name=='景'||item.name=='食详情'?TripColor:''}"> :style="{'background':item.pagesType==5||item.pagesType==6||item.pagesType==3?TripColor:''}">
<template v-if="item.name!=='食'&&item.name!=='景'&&item.name!=='食详情'"> <template v-if="item.pagesType!==5&&item.pagesType!==6&&item.pagesType!==3">
<div class="introduceFooterBJ introduceFooterOne" :style="{'background':TripColor}">&nbsp;</div> <div class="introduceFooterBJ introduceFooterOne" :style="{'background':TripColor}">&nbsp;</div>
<div class="introduceFooterBJ introduceFootertTwo" :style="{'background':TripColor}">&nbsp;</div> <div class="introduceFooterBJ introduceFootertTwo" :style="{'background':TripColor}">&nbsp;</div>
<div class="introduceFooter-text row-aic"> <div class="introduceFooter-text row-aic">
...@@ -156,7 +156,8 @@ ...@@ -156,7 +156,8 @@
if (JSON.stringify(oldJson) !== "{}" && oldJson) { if (JSON.stringify(oldJson) !== "{}" && oldJson) {
} else { } else {
this.getTripData(); var tripObj = this.getTripData();
console.log("tripObj", tripObj);
this.pageList.forEach(pItem => { this.pageList.forEach(pItem => {
var newObj = this.getDetailsObj(); var newObj = this.getDetailsObj();
newObj.LineName = this.FeatureData.LineName; newObj.LineName = this.FeatureData.LineName;
...@@ -165,8 +166,15 @@ ...@@ -165,8 +166,15 @@
newObj.LineShortName = this.FeatureData.LineShortName; newObj.LineShortName = this.FeatureData.LineShortName;
//首页 //首页
if (pItem.pageType == 1) { if (pItem.pageType == 1) {
newObj.MainName = "大阪 京都 富士山 伊豆 都 H"; //地区1 newObj.MainName = tripObj.cityStr; //地区1
newObj.SubName = "冲绳 大阪城公园湖 伊豆 H"; //地区2 newObj.SubName = tripObj.cityStr2; //地区2
if (tripObj.scenicArray && tripObj.scenicArray.length > 0) {
newObj.DetailsName = tripObj.scenicArray[0].MainName;
newObj.ShadowName = "遇见最美好的自己";
newObj.SubShadowName = "在古老的日本樱花街道";
newObj.ImgList = tripObj.scenicArray[0].ImgList;
newObj.MainDesc = tripObj.scenicArray[0].MainDesc;
} else {
newObj.DetailsName = "浅草寺 Senso-ji Temple"; newObj.DetailsName = "浅草寺 Senso-ji Temple";
newObj.ShadowName = "遇见最美好的自己"; newObj.ShadowName = "遇见最美好的自己";
newObj.SubShadowName = "在古老的日本樱花街道"; newObj.SubShadowName = "在古老的日本樱花街道";
...@@ -176,6 +184,7 @@ ...@@ -176,6 +184,7 @@
newObj.MainDesc = newObj.MainDesc =
"东京最著名、最古老的寺庙,也是日本的门脸、浅草的象征。频繁的庙会活动让你零距离感受日本江户风俗。据说寺内有一座在公元628年偶然被当地渔民打捞上来的观音金像,每年都有许多人前来寺庙祈福保平安。院内有雷门、五重塔等著名古迹;还有90余家商铺的仲见世商店街,可以买到当地特产和吉祥物。在浅草寺可以求签问凶吉,如果不走运抽到了“凶”,和当地人一样系在抽签的地方就可以驱散霉运了。"; "东京最著名、最古老的寺庙,也是日本的门脸、浅草的象征。频繁的庙会活动让你零距离感受日本江户风俗。据说寺内有一座在公元628年偶然被当地渔民打捞上来的观音金像,每年都有许多人前来寺庙祈福保平安。院内有雷门、五重塔等著名古迹;还有90余家商铺的仲见世商店街,可以买到当地特产和吉祥物。在浅草寺可以求签问凶吉,如果不走运抽到了“凶”,和当地人一样系在抽签的地方就可以驱散霉运了。";
} }
}
//介绍页面 //介绍页面
else if (pItem.pageType == 2) { else if (pItem.pageType == 2) {
newObj.MainName = "日本旅行专家"; newObj.MainName = "日本旅行专家";
...@@ -188,6 +197,9 @@ ...@@ -188,6 +197,9 @@
} }
//详情页面 //详情页面
else if (pItem.pageType == 3) { else if (pItem.pageType == 3) {
if (tripObj.dinnerArray && tripObj.dinnerArray.length > 0) {
}
var dinnerObj = { var dinnerObj = {
MainName: "特色餐1", MainName: "特色餐1",
ImgList: [{ ImgList: [{
...@@ -195,36 +207,54 @@ ...@@ -195,36 +207,54 @@
}], }],
MainDesc: "特色餐描述" MainDesc: "特色餐描述"
}; };
newObj.SubList.push(dinnerObj); newObj.SubList.push(dinnerObj);
newObj.SubList.push(dinnerObj); newObj.SubList.push(dinnerObj);
newObj.SubList.push(dinnerObj); newObj.SubList.push(dinnerObj);
} }
//酒店 //酒店
else if (pItem.pageType == 4) { else if (pItem.pageType == 4) {
newObj.MainName = "富士山花园酒店";
newObj.SubName = "特色酒店"; newObj.SubName = "特色酒店";
if (tripObj.hotelArray && tripObj.hotelArray.length > 0) {
newObj.MainName = tripObj.hotelArray[0].MainName;
newObj.ImgList = tripObj.hotelArray[0].ImgList;
newObj.MainDesc = tripObj.hotelArray[0].MainDesc;
} else {
newObj.MainName = "默认酒店";
newObj.ImgList = [{ newObj.ImgList = [{
url: "https://imgfile.oytour.com/Upload/DMC/202305290204327370000000012.jpg" url: "https://imgfile.oytour.com/Upload/DMC/202305290204327370000000012.jpg"
}]; }];
newObj.MainDesc = "新大谷INN东京位于山手线大崎车站徒步一分钟,离品川,涉谷,原宿,都非常近,方便购物 观光,酒店房间干净 舒适,"; newObj.MainDesc = "默认酒店描述信息";
}
} //餐 } //餐
else if (pItem.pageType == 5) { else if (pItem.pageType == 5) {
newObj.MainName = "箱根湖畔日式料理";
newObj.SubName = "特色餐食"; newObj.SubName = "特色餐食";
if (tripObj.dinnerArray && tripObj.dinnerArray.length > 0) {
newObj.MainName = tripObj.dinnerArray[0].MainName;
newObj.ImgList = tripObj.dinnerArray[0].ImgList;
newObj.MainDesc = tripObj.dinnerArray[0].MainDesc;
} else {
newObj.MainName = "默认餐食";
newObj.ImgList = [{ newObj.ImgList = [{
url: "http://imgfile.oytour.com/Upload/DMC/Z4DbAPRPmBPkaJQyxwesEWAz3sbZadNj.jpg" url: "http://imgfile.oytour.com/Upload/DMC/Z4DbAPRPmBPkaJQyxwesEWAz3sbZadNj.jpg"
}]; }];
newObj.MainDesc = "箱根湖畔日式料理箱根湖畔日式料理箱根湖畔日式料理箱根湖畔日式料理箱根湖畔日式料理箱根湖畔日式料理箱根湖畔日式料理"; newObj.MainDesc = "默认餐食描述";
}
} }
//景点 //景点
else if (pItem.pageType == 6) { else if (pItem.pageType == 6) {
newObj.MainName = "东京秋叶原动漫.电器";
newObj.SubName = "特色景点"; newObj.SubName = "特色景点";
if (tripObj.scenicArray && tripObj.scenicArray.length > 0) {
newObj.MainName = tripObj.scenicArray[0].MainName;
newObj.ImgList = tripObj.scenicArray[0].ImgList;
newObj.MainDesc = tripObj.scenicArray[0].MainDesc;
} else {
newObj.MainName = "默认景点";
newObj.ImgList = [{ newObj.ImgList = [{
url: "http://imgfile.oytour.com/Upload/DMC/20200201061804955.jpg" url: "http://imgfile.oytour.com/Upload/DMC/20200201061804955.jpg"
}]; }];
newObj.MainDesc = newObj.MainDesc = "默认景点描述信息";
"秋叶原是与时代尖端产业同步的电器大街,亦是目前世界上数一数二的电子科技街,集和了各种世界尖端科技产品,以及动漫商店,是许多年轻游客赴日必到的景点之一。秋叶原动漫大道这里可以说是动漫控们的天堂,因为不仅仅可以看到原汁原味的日本萌妹子化装成各种动漫造型,你也可以购买动漫人物的各种Q版造型,这条街上随处可见这种COS造型"; }
} }
pItem.dataObj = newObj; pItem.dataObj = newObj;
}); });
...@@ -234,8 +264,12 @@ ...@@ -234,8 +264,12 @@
//获取行程信息 //获取行程信息
getTripData() { getTripData() {
var cityArray = []; var cityArray = [];
var scenicArray = [];
var hotelArray = [];
var dinnerArray = [];
if (this.FeatureData && this.FeatureData.DayList && this.FeatureData.DayList.length > 0) { if (this.FeatureData && this.FeatureData.DayList && this.FeatureData.DayList.length > 0) {
this.FeatureData.DayList.forEach(dItem => { this.FeatureData.DayList.forEach(dItem => {
//城市
if (dItem.TrafficObj && dItem.TrafficObj.SubTraffic && dItem.TrafficObj.SubTraffic.length > 0) { if (dItem.TrafficObj && dItem.TrafficObj.SubTraffic && dItem.TrafficObj.SubTraffic.length > 0) {
dItem.TrafficObj.SubTraffic.forEach(tItem => { dItem.TrafficObj.SubTraffic.forEach(tItem => {
if (tItem.StartCityName && tItem.StartCityName != '' && !cityArray.includes(tItem if (tItem.StartCityName && tItem.StartCityName != '' && !cityArray.includes(tItem
...@@ -248,13 +282,103 @@ ...@@ -248,13 +282,103 @@
} }
}); });
} }
//景点
if (dItem.ScenicArray && dItem.ScenicArray.length > 0) {
dItem.ScenicArray.forEach(sItem => {
var tempImgList = [];
if (sItem.NewImaArray && sItem.NewImaArray.length > 0) {
sItem.NewImaArray.forEach(iItem => {
tempImgList.push({
url: iItem.Url
});
})
}
var sObj = {
MainName: sItem.CouponsName,
MainDesc: sItem.Description,
ImgList: tempImgList,
SourceType: 6
}
var temoScenic = scenicArray.find(x => x.MainName == sObj.MainName)
if (!temoScenic) {
scenicArray.push(sObj)
}
}); });
} }
if (dItem.HotelArray && dItem.HotelArray.length > 0) {
dItem.HotelArray.forEach(sItem => {
var tempImgList = [];
if (sItem.ImaArray && sItem.ImaArray.length > 0) {
sItem.ImaArray.forEach(iItem => {
tempImgList.push({
url: iItem.Url
});
})
}
var hObj = {
MainName: sItem.HotelName,
MainDesc: sItem.Description,
ImgList: tempImgList,
SourceType: 4
}
var tempHotel = hotelArray.find(x => x.MainName == hObj.MainName)
if (!tempHotel) {
hotelArray.push(hObj);
}
});
}
if (dItem.DinnerArray && dItem.DinnerArray.length > 0) {
dItem.DinnerArray.forEach(sItem => {
if (sItem.DinnerId > 0) {
var tempImgList = [];
if (sItem.ImaArray && sItem.ImaArray.length > 0) {
sItem.ImaArray.forEach(iItem => {
tempImgList.push({
url: iItem.Url
});
})
}
var description = "暂无描述";
if (sItem.Description && sItem.Description != '') {
description = sItem.Description;
}
var dObj = {
MainName: sItem.DinnerName,
MainDesc: description,
ImgList: tempImgList,
SourceType: 5
};
var tempDinner = dinnerArray.find(x => x.MainName == dObj.MainName)
if (!tempDinner) {
dinnerArray.push(dObj)
}
}
});
}
});
}
var cityStr = "";
var cityStr2 = "";
var cityArray1 = [];
var cityArray2 = [];
if (cityArray && cityArray.length > 0) { if (cityArray && cityArray.length > 0) {
var num = cityArray.length / 2; var num = cityArray.length / 2;
console.log("num", num) for (var i = 0; i < num; i++) {
cityArray1.push(cityArray[i]);
}
cityStr = cityArray1.join(" ");
for (var j = num; j < cityArray.length; j++) {
cityArray2.push(cityArray[j]);
}
cityStr2 = cityArray2.join(" ");
}
return {
cityStr,
cityStr2,
hotelArray,
scenicArray,
dinnerArray,
} }
console.log("cityArray,", cityArray);
} }
}, },
computed: { computed: {
......
<template> <template>
<div class="otherJourney-form" :class="[FeatureItem.pageTitle=='介绍'?'UpgradedVersion-Hover':'']"> <div class="otherJourney-form" :class="[FeatureItem.pageType==2?'UpgradedVersion-Hover':'']">
<!-- 主图 --> <!-- 主图 -->
<div class="MasterMapList-boxRelative absolute z-index1" <div class="MasterMapList-boxRelative absolute z-index1"
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
:isDeletePage="FeatureItem.isDeletePage" :pagesType="1" @toAddPages="toAddPages" :isDeletePage="FeatureItem.isDeletePage" :pagesType="1" @toAddPages="toAddPages"
@toDeletePages="toDeletePages"> @toDeletePages="toDeletePages">
</FeatureControls> </FeatureControls>
<input type="file" style="display:none" id='restaurantfile' @change="uploadpic"> <input type="file" style="display:none" :id="'introducefile_'+(FeatureItem * 2 + 1) + '_0'" @change="uploadpic">
</div> </div>
<div class="MasterMapList-box-two absolute z-index3"> <div class="MasterMapList-box-two absolute z-index3">
<FeatureControls :index="index" :FeatureData="FeatureItem" :ControlsType="'column'" <FeatureControls :index="index" :FeatureData="FeatureItem" :ControlsType="'column'"
:isUploadImg="FeatureItem.pageTitle=='介绍'?true:false" :isSelectImg="FeatureItem.pageTitle=='介绍'?true:false" :isUploadImg="FeatureItem.pageType==2?true:false" :isSelectImg="FeatureItem.pageType==2?true:false"
:isAddImg="FeatureItem.pageTitle=='介绍'?false:true" :isDeleteImg="false" @toUploadImg="UploadImg" :isAddImg="FeatureItem.pageType==2?false:true" :isDeleteImg="false" @toUploadImg="UploadImg"
@toSelectImg="SelectImg" @toAddImg="AddImg" @toDeleteImg="DeleteImg"></FeatureControls> @toSelectImg="SelectImg" @toAddImg="AddImg" @toDeleteImg="DeleteImg"></FeatureControls>
</div> </div>
</div> </div>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
@toUploadImg="UploadImg" @toSelectImg="SelectImg" @setTemplate="setTemplate"></subheading> @toUploadImg="UploadImg" @toSelectImg="SelectImg" @setTemplate="setTemplate"></subheading>
<!-- otherJourney-otherDetails 宿、食 景详情 --> <!-- otherJourney-otherDetails 宿、食 景详情 -->
<div :class="[FeatureItem.pageTitle=='宿'||FeatureItem.pageTitle=='食'||FeatureItem.pageTitle=='景'?'otherJourney-otherDetails':'']"> <div :class="[FeatureItem.pageType==4||FeatureItem.pageType==5||FeatureItem.pageType==6?'otherJourney-otherDetails':'']">
<div class="otherJourney-details absolute z-index1"> <div class="otherJourney-details absolute z-index1">
<vEditDiv :canEdit='canEdit' v-model="FeatureItem.dataObj.MainDesc"></vEditDiv> <vEditDiv :canEdit='canEdit' v-model="FeatureItem.dataObj.MainDesc"></vEditDiv>
</div> </div>
...@@ -74,7 +74,9 @@ ...@@ -74,7 +74,9 @@
}, },
methods: { methods: {
UploadImg() { UploadImg() {
if(this.FeatureItem.pageType==2){
document.querySelector(`#introducefile_${(this.FeatureItem * 2 + 1)}_0`).click();
}
}, },
uploadpic(e) { uploadpic(e) {
let that = this; let that = this;
...@@ -90,7 +92,9 @@ ...@@ -90,7 +92,9 @@
that.uploadSelfBlob(path, newArr, x => { that.uploadSelfBlob(path, newArr, x => {
let allPath = that.domainManager().ViittoFileUrl + x.data.FilePath; let allPath = that.domainManager().ViittoFileUrl + x.data.FilePath;
let i = e.target.id.split("_")[2]; let i = e.target.id.split("_")[2];
that.imgUrlChange(allPath); if(that.FeatureItem.pageType==2){
that.FeatureItem.dataObj.ImgList[0].url = allPath
}
}); });
}; };
reader.readAsDataURL(e.target.files[0]); reader.readAsDataURL(e.target.files[0]);
...@@ -118,7 +122,9 @@ ...@@ -118,7 +122,9 @@
this.isShowScenicImg = false this.isShowScenicImg = false
}, },
getDMCimg(selectImgArr) { getDMCimg(selectImgArr) {
console.log(selectImgArr, '已选图') if(this.FeatureItem.pageType==2){
this.FeatureItem.dataObj.ImgList[0].url = selectImgArr[0].Path
}
this.isShowScenicImg = false this.isShowScenicImg = false
} }
......
...@@ -120,7 +120,8 @@ export default { ...@@ -120,7 +120,8 @@ export default {
let crmUrl = ""; //crm API let crmUrl = ""; //crm API
let locationName = window.location.hostname; let locationName = window.location.hostname;
// domainUrl = "http://192.168.10.238:8083"; // 刘东电脑 // domainUrl = "http://192.168.10.238:8083"; // 刘东电脑
domainUrl = "http://192.168.10.226"; //春姐 // domainUrl = "http://192.168.10.226"; //春姐
domainUrl = "http://192.168.10.128"; //奎哥
// domainUrl = "http://reborn.oytour.com"; // domainUrl = "http://reborn.oytour.com";
let crmLocalFileStreamDownLoadUrl = ""; let crmLocalFileStreamDownLoadUrl = "";
...@@ -1738,5 +1739,43 @@ export default { ...@@ -1738,5 +1739,43 @@ export default {
var b = parseInt(rgb[3], 16); var b = parseInt(rgb[3], 16);
return 'rgba(' + r + ',' + g + ',' + b + ',' + opc + ')'; return 'rgba(' + r + ',' + g + ',' + b + ',' + opc + ')';
} }
Vue.prototype.base64ToBlob = function (code) {
let parts = code.split(";base64,");
let contentType = parts[0].split(":")[1];
let raw = window.atob(parts[1]);
let rawLength = raw.length;
let uInt8Array = new Uint8Array(rawLength);
for (let i = 0; i < rawLength; ++i) {
uInt8Array[i] = raw.charCodeAt(i);
}
return new Blob([uInt8Array], {
type: contentType
});
}
Vue.prototype.uuid = function (len, radix) {
let chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(
""
);
let uuid = [],
i;
radix = radix || chars.length;
if (len) {
// Compact form
for (i = 0; i < len; i++) uuid[i] = chars[0 | (Math.random() * radix)];
} else {
let r;
uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
uuid[14] = "4";
for (i = 0; i < 36; i++) {
if (!uuid[i]) {
r = 0 | (Math.random() * 16);
uuid[i] = chars[i === 19 ? (r & 0x3) | 0x8 : r];
}
}
}
return uuid.join("");
}
} }
} }
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