Commit 0739b60b authored by youjie's avatar youjie

no message

parent ed39a237
......@@ -62,10 +62,10 @@
<div class="subIdeImg1relative relative UpgradedVersion-Hover">
<div class="subIdeImgForm1Box absolute">
<FeatureControls v-if="FeatureData" :index="index" :FeatureData="FeatureData" :isUploadImg="true"
:isSelectImg="true" :isDeleteImg="false" @toUploadImg="toUploadImg" @toSelectImg="toSelectImg"
@toAddImg="toAddImg" @toDeleteImg="toDeleteImg" />
:isSelectImg="true" :isDeleteImg="false" @toUploadImg="toUploadImg(0)" @toSelectImg="toSelectImg(0)"
@toAddImg="toAddImg" @toDeleteImg="toDeleteImg(0)" />
</div>
<img src="http://192.168.10.214:8130/Upload/NewTripFeature/homeBj.png" />
<img v-if="FeatureData.dataObj&&FeatureData.dataObj.SubList" :src="FeatureData.dataObj.SubList[0].url" />
</div>
</div>
</div>
......@@ -76,10 +76,10 @@
<div class="subIdeImg1relative relative">
<div class="subIdeImgForm1Box absolute">
<FeatureControls v-if="FeatureData" :index="index" :FeatureData="FeatureData" :isUploadImg="true"
:isSelectImg="true" :isDeleteImg="false" @toUploadImg="toUploadImg" @toSelectImg="toSelectImg"
@toAddImg="toAddImg" @toDeleteImg="toDeleteImg" />
:isSelectImg="true" :isDeleteImg="false" @toUploadImg="toUploadImg(1)" @toSelectImg="toSelectImg(1)"
@toAddImg="toAddImg" @toDeleteImg="toDeleteImg(1)" />
</div>
<img src="http://192.168.10.214:8130/Upload/NewTripFeature/homeBj.png" />
<img v-if="FeatureData.dataObj&&FeatureData.dataObj.SubList" :src="FeatureData.dataObj.SubList[1].url" />
</div>
</div>
</div>
......@@ -121,20 +121,20 @@
};
},
methods: {
toUploadImg() {
this.$emit('toUploadImg')
toUploadImg(index) {
this.$emit('toUploadImg',index,'模版图')
},
toSelectImg() {
this.$emit('toSelectImg')
toSelectImg(index) {
this.$emit('toSelectImg',index,'模版图')
},
toAddImg() {
this.$emit('toAddImg')
},
toDeleteImg() {
this.$emit('toDeleteImg')
toDeleteImg(index) {
this.$emit('toDeleteImg',index,'模版图')
},
setTemplate(TemplateType) {
this.$emit('setTemplate', this.index, TemplateType)
this.$emit('setTemplate',TemplateType)
}
},
computed: {},
......@@ -388,6 +388,8 @@
.subIdeImg1relative {
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.subIdeImg1relative img {
......
......@@ -13,7 +13,7 @@
<headerTitle :FeatureItem="item" :TripColor="TripColor"></headerTitle>
<!-- 介绍、宿食景页 -->
<otherJourney :index="index" :FeatureItem="item" :TripColor="TripColor" @toAddPages="AddPages"
@toDeletePages="DeletePages" @setTemplate="setTemplate" v-if="item.pageType!=1&&item.pageType!=3">
@toDeletePages="DeletePages" v-if="item.pageType!=1&&item.pageType!=3">
</otherJourney>
<!-- 食详情页 -->
<UpgradedVersionDetails :index="index" :FeatureData="item" :TripColor="TripColor" @toAddPages="AddPages"
......@@ -133,10 +133,6 @@
DeletePages(index, FeatureData) {
this.pageList.splice(1, index);
},
setTemplate(index, TemplateType) {
this.pageList[index].pageTemplate = TemplateType
this.$forceUpdate()
},
getDetailsObj() {
var detailsObj = {
LineName: "", //线路名称
......@@ -148,7 +144,14 @@
DetailsName: "", //详细标题
ImgList: [], //图片
MainDesc: "", //描述
SubList: [],
SubList: [
{
url:null
},
{
url:null
},
],
};
return detailsObj;
},
......
......@@ -9,28 +9,19 @@
:isDeletePage="FeatureItem.isDeletePage" :pagesType="1" @toAddPages="toAddPages"
@toDeletePages="toDeletePages">
</FeatureControls>
<input type="file" style="display:none" :id="'introducefile_'+(FeatureItem * 2 + 1) + '_0'" @change="uploadpic">
<input type="file" style="display:none" :id="'introducefile_'+(index * 2 + 1) + '_0'" @change="uploadpic">
</div>
<div class="MasterMapList-box-two absolute z-index3">
<FeatureControls :index="index" :FeatureData="FeatureItem" :ControlsType="'column'"
:isUploadImg="FeatureItem.pageType==2?true:false" :isSelectImg="FeatureItem.pageType==2?true:false"
:isAddImg="FeatureItem.pageType==2?false:
FeatureItem.pageType!=2&&FeatureItem.dataObj.ImgList
&&FeatureItem.dataObj.ImgList.length<9?false:true" :isDeleteImg="false" @toUploadImg="UploadImg"
&&FeatureItem.dataObj.ImgList.length!=9?true:false" :isDeleteImg="false" @toUploadImg="UploadImg"
@toSelectImg="SelectImg" @toAddImg="AddImg" @toDeleteImg="DeleteImg"></FeatureControls>
</div>
</div>
<!-- 上传文件 -->
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_0'" @change="uploadpic">
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_1'" @change="uploadpic">
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_2'" @change="uploadpic">
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_3'" @change="uploadpic">
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_4'" @change="uploadpic">
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_5'" @change="uploadpic">
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_6'" @change="uploadpic">
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_7'" @change="uploadpic">
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_8'" @change="uploadpic">
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_9'" @change="uploadpic">
<!-- 上传主图文件 -->
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1)" @change="uploadpic">
<MasterMapList :index="index" :FeatureData="FeatureItem.dataObj" :pageType="FeatureItem.pageType" @toUploadImg="UploadImg" @toSelectImg="SelectImg"
@toAddImg="AddImg" @toDeleteImg="DeleteImg"></MasterMapList>
<!-- 副标题 -->
......@@ -82,25 +73,24 @@
queryName: '',
queryId: 0,
},
MasterMapIndex: null,
MasterMapIndex: null,//主图下标
StencilDrawing: false,//是否是模版图
};
},
methods: {
UploadImg(index) {
UploadImg(index,type) {
this.MasterMapIndex = index?index:0
console.log(`#MasterMapfile_${(this.index * 2 + 1)}_${index}`)
if(type) this.StencilDrawing = true
else this.StencilDrawing = false
if(this.FeatureItem.pageType==2){
document.querySelector(`#introducefile_${(this.index * 2 + 1)}_0`).click();
}else{
document.querySelector(`#MasterMapfile_${(this.index * 2 + 1)}_${index}`).click();
document.querySelector(`#MasterMapfile_${(this.index * 2 + 1)}`).click();
}
console.log(this.uploadpic(),'=====')
},
uploadpic(e) {
let that = this;
console.log(this.MasterMapIndex,'=========')
if (e.target.files.length > 0 && e.target.files[0].size > 0) {
var reader = new FileReader();
reader.onload = function (event) {
......@@ -112,21 +102,20 @@
that.uploadSelfBlob(path, newArr, x => {
let allPath = that.domainManager().ViittoFileUrl + x.data.FilePath;
let i = e.target.id.split("_")[2];
if(that.FeatureItem.pageType==2){
that.FeatureItem.dataObj.ImgList[0].url = allPath
if(that.StencilDrawing){
that.FeatureItem.dataObj.SubList[that.MasterMapIndex].url = allPath
}else{
that.FeatureItem.dataObj.ImgList[that.MasterMapIndex].url = allPath
}
that.FeatureItem.dataObj.ImgList[that.MasterMapIndex].url = allPath
});
};
reader.readAsDataURL(e.target.files[0]);
// return allPath
}
},
SelectImg(index) {
console.log(index,'--------SelectImg')
SelectImg(index,type) {
this.MasterMapIndex = index?index:0
if(type) this.StencilDrawing = true
else this.StencilDrawing = false
if(this.FeatureItem.pageType==4) this.choseType = 1
else if(this.FeatureItem.pageType==5) this.choseType = 2
else if(this.FeatureItem.pageType==6) this.choseType = 3
......@@ -139,8 +128,14 @@
}
this.FeatureItem.dataObj.ImgList.push(obj)
},
DeleteImg(index) {
DeleteImg(index,type) {
if(type) this.StencilDrawing = true
else this.StencilDrawing = false
if(this.StencilDrawing){
this.FeatureItem.dataObj.SubList.splice(index,1)
}else{
this.FeatureItem.dataObj.ImgList.splice(index,1)
}
},
toAddPages() {
this.$emit('toAddPages', this.index, this.FeatureItem)
......@@ -148,20 +143,19 @@
toDeletePages() {
this.$emit('toDeletePages', this.index, this.FeatureItem)
},
setTemplate(index, TemplateType) {
this.$emit('setTemplate', index, TemplateType)
setTemplate(TemplateType) {
this.FeatureItem.pageTemplate = TemplateType
},
closeDMCchooseImg() {
this.isShowScenicImg = false
},
getDMCimg(selectImgArr) {
let Path = selectImgArr[0].Path
// if(this.FeatureItem.pageType==2){
// this.FeatureItem.dataObj.ImgList[0].url = Path
// }else if(this.FeatureItem.pageType==4||this.FeatureItem.pageType==5||this.FeatureItem.pageType==6){
// this.FeatureItem.dataObj.ImgList[this.MasterMapIndex].url = Path
// }
if(this.StencilDrawing){
this.FeatureItem.dataObj.SubList[this.MasterMapIndex].url = Path
}else{
this.FeatureItem.dataObj.ImgList[this.MasterMapIndex].url = Path
}
this.isShowScenicImg = false
}
......@@ -178,7 +172,7 @@
},
MasterMapIndex:{
handler(val,oldVal){
console.log(val,oldVal)
},
deep: true,
immediate: true
......
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