Commit 612015f6 authored by 沈良进's avatar 沈良进

页面修改

parent 61f6c9b6
...@@ -61,14 +61,16 @@ ...@@ -61,14 +61,16 @@
<vEditSpan :canEdit='canEdit' v-model="jindian.Description"></vEditSpan> <vEditSpan :canEdit='canEdit' v-model="jindian.Description"></vEditSpan>
</div> </div>
</template> </template>
<div v-if="item.ScenicArray.length==0&&item.TrafficObj.trafficIntroduce.IntroduceTitle" class="travelDaysContent-text"> <div v-if="item.ScenicArray.length==0&&item.TrafficObj.trafficIntroduce.IntroduceTitle"
class="travelDaysContent-text">
<span class="textBold"> <span class="textBold">
<vEditDiv class="dayCouponsName" :canEdit='canEdit' <vEditDiv class="dayCouponsName" :canEdit='canEdit'
v-model="'【'+item.TrafficObj.trafficIntroduce.IntroduceTitle+'】'"></vEditDiv> v-model="'【'+item.TrafficObj.trafficIntroduce.IntroduceTitle+'】'"></vEditDiv>
</span> </span>
<vEditSpan :canEdit='canEdit' v-model="item.TrafficObj.trafficIntroduce.IntroduceDetail"></vEditSpan> <vEditSpan :canEdit='canEdit' v-model="item.TrafficObj.trafficIntroduce.IntroduceDetail"></vEditSpan>
</div> </div>
<div v-if="item.ScenicArray.length==0&&!item.TrafficObj.trafficIntroduce.IntroduceTitle" class="travelDaysContent-text"> <div v-if="item.ScenicArray.length==0&&!item.TrafficObj.trafficIntroduce.IntroduceTitle"
class="travelDaysContent-text">
{{item.TitleObj.Title}} {{item.TitleObj.Title}}
</div> </div>
</div> </div>
...@@ -189,8 +191,7 @@ ...@@ -189,8 +191,7 @@
defaultScenicIndex: 0, //当前默认选中的景点 defaultScenicIndex: 0, //当前默认选中的景点
}; };
}, },
mounted() { mounted() {},
},
methods: { methods: {
getHtmlPlainText(html_str) { getHtmlPlainText(html_str) {
//提取字符串中的文字 //提取字符串中的文字
...@@ -207,7 +208,7 @@ ...@@ -207,7 +208,7 @@
getFontSize(title) { getFontSize(title) {
if (!title) return if (!title) return
let size = 30; let size = 30;
if (title&&title.length>0&&title.length > 80) { if (title && title.length > 0 && title.length > 80) {
var tempSize = Number(80) / Number(title.length); var tempSize = Number(80) / Number(title.length);
tempSize = tempSize * 30; tempSize = tempSize * 30;
size = tempSize.toFixed(1); size = tempSize.toFixed(1);
...@@ -282,9 +283,14 @@ ...@@ -282,9 +283,14 @@
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];
if (that.ScenicArrayList.length > 0) { if (that.ScenicArrayList.length > 0) {
that.ScenicArrayList[that.imgIndex].NewImaArray[0].Url = allPath that.ScenicArrayList[0].NewImaArray[0].Url = allPath
that.ScenicArrayList[that.imgIndex].NewImaArray[0].x = 0 that.ScenicArrayList[0].NewImaArray[0].x = 0
that.ScenicArrayList[that.imgIndex].NewImaArray[0].y = 0 that.ScenicArrayList[0].NewImaArray[0].y = 0
that.ScenicArrayList[0].NewScenicImg = JSON.stringify(that.ScenicArrayList[0].NewImaArray);
if (that.item.ScenicArray && that.item.ScenicArray.length > 0) {
that.item.ScenicArray[that.defaultScenicIndex] = JSON.parse(JSON.stringify(that.ScenicArrayList[
0]));
}
} else { } else {
that.item.TrafficObj.trafficIntroduce.IntroduceImage = allPath that.item.TrafficObj.trafficIntroduce.IntroduceImage = allPath
that.item.TrafficObj.trafficIntroduce.x = 0 that.item.TrafficObj.trafficIntroduce.x = 0
...@@ -292,7 +298,6 @@ ...@@ -292,7 +298,6 @@
that.item.TrafficObj.Introduce = JSON.stringify(this.item.TrafficObj.trafficIntroduce); that.item.TrafficObj.Introduce = JSON.stringify(this.item.TrafficObj.trafficIntroduce);
} }
that.$message.success('上传成功'); that.$message.success('上传成功');
that.item.ScenicArray = JSON.parse(JSON.stringify(that.ScenicArrayList))
}); });
}; };
reader.readAsDataURL(e.target.files[0]); reader.readAsDataURL(e.target.files[0]);
...@@ -316,11 +321,11 @@ ...@@ -316,11 +321,11 @@
if (imgItem.FileType) { if (imgItem.FileType) {
obj.FileType = imgItem.FileType; obj.FileType = imgItem.FileType;
} }
that.ScenicArrayList[that.imgIndex].NewImaArray = []; that.ScenicArrayList[0].NewImaArray = [];
that.ScenicArrayList[that.imgIndex].NewImaArray.push(obj); that.ScenicArrayList[0].NewImaArray.push(obj);
that.ScenicArrayList[that.imgIndex].ScenicJson.x = 0 that.ScenicArrayList[0].ScenicJson.x = 0
that.ScenicArrayList[that.imgIndex].ScenicJson.y = 0 that.ScenicArrayList[0].ScenicJson.y = 0
that.ScenicArrayList[that.imgIndex].NewScenicImg = JSON.stringify(that.ScenicArrayList[0].NewImaArray); that.ScenicArrayList[0].NewScenicImg = JSON.stringify(that.ScenicArrayList[0].NewImaArray);
}); });
} else { } else {
this.item.TrafficObj.trafficIntroduce.IntroduceImage = selectImgArr[0].Path this.item.TrafficObj.trafficIntroduce.IntroduceImage = selectImgArr[0].Path
...@@ -328,19 +333,17 @@ ...@@ -328,19 +333,17 @@
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))
} }
}, },
computed: {}, computed: {},
watch: { watch: {
item: { item: {
handler(val, oldVal) { handler(val, oldVal) {
// console.log("changeScenic",this.item.ScenicArray);
this.RenderingOk = false; this.RenderingOk = false;
this.ScenicArrayList = [] this.ScenicArrayList = []
this.item.ScenicArray.forEach((x, index) => { this.item.ScenicArray.forEach((x, index) => {
......
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