Commit 3863cfc7 authored by youjie's avatar youjie

no message

parent e78cbf11
......@@ -5,7 +5,7 @@
</template>
<script>
export default {
props: ["value", "canEdit"],
props: ["value", "canEdit","textLength"],
data() {
return {
innerText: this.value,
......@@ -23,6 +23,10 @@
changeText: function () {
let sel = window.getSelection()
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);
setTimeout(() => {
var range = sel.getRangeAt(0);
......
......@@ -4,11 +4,11 @@
<div class="MasterMapList-1 relative bjE6 UpgradedVersion-Hover">
<div class="MasterMapList1 absolute z-index1">
<FeatureControls v-if="FeatureData" :index="index" :FeatureData="FeatureData"
:isUploadImg="FeatureData.pageTitle=='介绍'?false:true" :isSelectImg="FeatureData.pageTitle=='介绍'?false:true"
:isDeleteImg="FeatureData.pageTitle=='介绍'?false:true" @toUploadImg="toUploadImg" @toSelectImg="toSelectImg"
:isUploadImg="FeatureData.pageType==2?false:true" :isSelectImg="FeatureData.pageType==2?false:true"
:isDeleteImg="FeatureData.pageType==2?false:true" @toUploadImg="toUploadImg" @toSelectImg="toSelectImg"
@toAddImg="toAddImg" @toDeleteImg="toDeleteImg" />
</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 v-if="FeatureData.imgList&&FeatureData.imgList.length==2" class="MasterMapList-2 row-sb">
......@@ -492,7 +492,7 @@
},
deep: true,
immediate: true
immediate: false
},
},
mounted() {
......
......@@ -97,10 +97,10 @@
},
toAddPages() {
// this.pagesType 1 首页 2 介绍 3餐食介绍 4宿 5食 6景
this.$emit('toAddPages', this.index, this.FeatureData)
this.$emit('toAddPages')
},
toDeletePages() {
this.$emit('toDeletePages', this.index, this.FeatureData)
this.$emit('toDeletePages')
},
},
computed: {},
......
......@@ -3,12 +3,12 @@
<div class="UpgradedVersion-subIde absolute z-index3">
<!-- UpgradedVersion-otherSubheading 宿、食、景 标记 -->
<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-subIdeBj1 absolute z-index2" :style="{'background':TripColor}">&nbsp;</div>
<!-- <div class="UpgradedVersion-subIdeBj2 absolute z-index1">&nbsp;</div> -->
<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>
<img class="UpgradedVersion-titleIcon relative"
......@@ -16,7 +16,7 @@
</div>
<!-- 宿、食、景 副标题 -->
<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">
<vEditDiv :canEdit='canEdit' v-model="FeatureData.dataObj.SubName"></vEditDiv>
</div>
......@@ -198,12 +198,12 @@
overflow: hidden;
left: 22px;
top: 41px;
text-align: center;
}
.UpgradedVersion-otherSubheading .UpgradedVersion-subIdeBj-h {
width: 54px;
height: 71px;
text-align: center;
left: 34px;
top: 20px;
}
......
......@@ -15,11 +15,16 @@
</div>
<div class="featureHome-left UpgradedVersion-Hover">
<div class="featureHome-vToolBar-one absolute z-index3">
<FeatureControls :index="index" :FeatureData="FeatureItem" :ControlsType="'row'"
:isDeletePage="FeatureItem.isDeletePage" :pagesType="1" @toAddPages="toAddPages"
@toDeletePages="toDeletePages">
<FeatureControls
:index="index"
:FeatureData="FeatureItem"
:ControlsType="'row'"
:isDeletePage="FeatureItem.isDeletePage"
:pagesType="1"
@toAddPages="toAddPages"
@toDeletePages="toDeletePages">
</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 class="featureHome-vToolBar-two absolute z-index3">
<FeatureControls :index="index" :FeatureData="FeatureItem" :ControlsType="'column'" :isTemplate="false"
......@@ -118,7 +123,7 @@
},
methods: {
UploadImg() {
document.querySelector(`#homefile_${(this.FeatureItem * 2 + 1)}_0`).click();
},
uploadpic(e) {
let that = this;
......@@ -134,7 +139,7 @@
that.uploadSelfBlob(path, newArr, x => {
let allPath = that.domainManager().ViittoFileUrl + x.data.FilePath;
let i = e.target.id.split("_")[2];
that.imgUrlChange(allPath);
that.FeatureItem.dataObj.ImgList[0].url = allPath
});
};
reader.readAsDataURL(e.target.files[0]);
......@@ -149,17 +154,17 @@
DeleteImg() {
},
toAddPages(index, FeatureData) {
this.$emit('toAddPages', index, FeatureData)
toAddPages() {
this.$emit('toAddPages', this.index, this.FeatureData)
},
toDeletePages(index, FeatureData) {
this.$emit('toDeletePages', index, FeatureData)
toDeletePages() {
this.$emit('toDeletePages', this.index)
},
closeDMCchooseImg() {
this.isShowScenicImg = false
},
getDMCimg(selectImgArr) {
console.log(selectImgArr, '已选图')
this.FeatureItem.dataObj.ImgList[0].url = selectImgArr[0].Path
this.isShowScenicImg = false
}
......
......@@ -13,15 +13,15 @@
<headerTitle :FeatureItem="item" :TripColor="TripColor"></headerTitle>
<!-- 介绍、宿食景页 -->
<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"
@toDeletePages="DeletePages" v-if="item.name=='食详情'"></UpgradedVersionDetails>
@toDeletePages="DeletePages" v-if="item.pageType==3"></UpgradedVersionDetails>
<!-- otherJourney-footer 食景 食详情 -->
<div v-if="item.name!='首页'" :class="{'otherJourney-footer':item.name=='食'||item.name=='景'||item.name=='食详情'}">
<div v-if="item.pageType!=1" :class="{'otherJourney-footer':item.pageType==5||item.pageType==6||item.pageType==3}">
<div class="otherJourney-introduceFooter absolute z-index1 row-aic"
:style="{'background':item.name=='食'||item.name=='景'||item.name=='食详情'?TripColor:''}">
<template v-if="item.name!=='食'&&item.name!=='景'&&item.name!=='食详情'">
:style="{'background':item.pageType==5||item.pageType==6||item.pageType==3?TripColor:''}">
<template v-if="item.pageType!==5&&item.pageType!==6&&item.pageType==3">
<div class="introduceFooterBJ introduceFooterOne" :style="{'background':TripColor}">&nbsp;</div>
<div class="introduceFooterBJ introduceFootertTwo" :style="{'background':TripColor}">&nbsp;</div>
<div class="introduceFooter-text row-aic">
......@@ -66,41 +66,41 @@
pageTitle: '首页',
pageType: 1,
pageTemplate: 0,
isDeletePage: false,
isDeletePage: true,
dataObj: {},
},
{
pageTitle: '介绍',
pageType: 2,
pageTemplate: 0,
isDeletePage: false,
isDeletePage: true,
dataObj: {},
},
{
pageTitle: '食详情',
pageType: 3,
pageTemplate: 0,
isDeletePage: false,
isDeletePage: true,
dataObj: {},
},
{
pageTitle: '宿',
pageType: 4,
isDeletePage: false,
isDeletePage: true,
pageTemplate: 1,
dataObj: {},
},
{
pageTitle: '食',
pageType: 5,
isDeletePage: false,
isDeletePage: true,
pageTemplate: 2,
dataObj: {},
},
{
pageTitle: '景',
pageType: 6,
isDeletePage: false,
isDeletePage: true,
pageTemplate: 3,
dataObj: {},
}
......@@ -108,6 +108,9 @@
};
},
methods: {
getImgList() {
},
getPageObj() {
var pageObj = {
pageTitle: '首页', //页面名称
......@@ -127,8 +130,8 @@
}
this.pageList.splice(index, 0, this.pageData)
},
DeletePages(index, FeatureData) {
this.pageList.splice(1, index)
DeletePages(index) {
this.pageList.splice(index, 1)
},
setTemplate(index, TemplateType) {
this.pageList[index].Template = TemplateType
......@@ -186,7 +189,7 @@
newObj.MainDesc =
"印象日本独家使用京 都 车 站旁 的 京都 千 饭店 ~酒店房间 37 平 方公 尺! 房型 多样 设 计, 京都千饭店外观为京町家的格子风格,非常引人注目。饭店以「Personal Comfort Hotel」为概念所打造,意思就是追求每个人入住时的舒适感。从有着庭院的大厅穿过以京町家的内庭长廊为主题所建的信道,便可看见用玻璃纱创作的艺术装置随风轻柔地飘动着。再往旁边一看,眼前只见充满开放感的挑高空间。有如通往神社寺庙大门般的大型阶梯充满了存在感。在柔和的光线包围下,一瞬间忘了自己是身处在建筑物之中。让人联想到京都传统建筑的内部装潢没有刻意的高调奢华,但连小细节都做得非常精致,散发出古都特有的风情。低調沉穩的寬敞客房。讓入住者可以從陽台或窗邊觀賞庭園的綠色景緻,同時享受頂級的休閒時光。 ";
}
//详情页面
//详情页面
else if (pItem.pageType == 3) {
var dinnerObj = {
MainName: "特色餐1",
......@@ -199,7 +202,7 @@
newObj.SubList.push(dinnerObj);
newObj.SubList.push(dinnerObj);
}
//酒店
//酒店
else if (pItem.pageType == 4) {
newObj.MainName = "富士山花园酒店";
newObj.SubName = "特色酒店";
......@@ -207,7 +210,7 @@
url: "https://imgfile.oytour.com/Upload/DMC/202305290204327370000000012.jpg"
}];
newObj.MainDesc = "新大谷INN东京位于山手线大崎车站徒步一分钟,离品川,涉谷,原宿,都非常近,方便购物 观光,酒店房间干净 舒适,";
} //餐
} //餐
else if (pItem.pageType == 5) {
newObj.MainName = "箱根湖畔日式料理";
newObj.SubName = "特色餐食";
......@@ -216,7 +219,7 @@
}];
newObj.MainDesc = "箱根湖畔日式料理箱根湖畔日式料理箱根湖畔日式料理箱根湖畔日式料理箱根湖畔日式料理箱根湖畔日式料理箱根湖畔日式料理";
}
//景点
//景点
else if (pItem.pageType == 6) {
newObj.MainName = "东京秋叶原动漫.电器";
newObj.SubName = "特色景点";
......
<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"
:class="[FeatureItem.pageType==2?'':'UpgradedVersion-Hover']">
......@@ -9,25 +9,25 @@
:isDeletePage="FeatureItem.isDeletePage" :pagesType="1" @toAddPages="toAddPages"
@toDeletePages="toDeletePages">
</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 class="MasterMapList-box-two absolute z-index3">
<FeatureControls :index="index" :FeatureData="FeatureItem" :ControlsType="'column'"
:isUploadImg="FeatureItem.pageTitle=='介绍'?true:false" :isSelectImg="FeatureItem.pageTitle=='介绍'?true:false"
:isAddImg="FeatureItem.pageTitle=='介绍'?false:true" :isDeleteImg="false" @toUploadImg="UploadImg"
:isUploadImg="FeatureItem.pageType==2?true:false" :isSelectImg="FeatureItem.pageType==2?true:false"
:isAddImg="FeatureItem.pageType==2?false:true" :isDeleteImg="false" @toUploadImg="UploadImg"
@toSelectImg="SelectImg" @toAddImg="AddImg" @toDeleteImg="DeleteImg"></FeatureControls>
</div>
</div>
<MasterMapList :index="index" :FeatureData="FeatureItem" @toUploadImg="UploadImg" @toSelectImg="SelectImg"
@toAddImg="AddImg" @toDeleteImg="DeleteImg"></MasterMapList>
<!-- 副标题 -->
<subheading :Template="FeatureItem.pageTemplate" :index="index" :FeatureData="FeatureItem" :TripColor="TripColor"
@toUploadImg="UploadImg" @toSelectImg="SelectImg" @setTemplate="setTemplate"></subheading>
<!-- 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">
<vEditDiv :canEdit='canEdit' v-model="FeatureItem.dataObj.MainDesc"></vEditDiv>
</div>
......@@ -74,7 +74,9 @@
},
methods: {
UploadImg() {
if(this.FeatureItem.pageType==2){
document.querySelector(`#introducefile_${(this.FeatureItem * 2 + 1)}_0`).click();
}
},
uploadpic(e) {
let that = this;
......@@ -90,7 +92,9 @@
that.uploadSelfBlob(path, newArr, x => {
let allPath = that.domainManager().ViittoFileUrl + x.data.FilePath;
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]);
......@@ -118,7 +122,9 @@
this.isShowScenicImg = false
},
getDMCimg(selectImgArr) {
console.log(selectImgArr, '已选图')
if(this.FeatureItem.pageType==2){
this.FeatureItem.dataObj.ImgList[0].url = selectImgArr[0].Path
}
this.isShowScenicImg = false
}
......
......@@ -120,7 +120,8 @@ export default {
let crmUrl = ""; //crm API
let locationName = window.location.hostname;
// 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";
let crmLocalFileStreamDownLoadUrl = "";
......@@ -1738,5 +1739,43 @@ export default {
var b = parseInt(rgb[3], 16);
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