Commit 5bebbdc5 authored by 华国豪's avatar 华国豪 🙄

‘xcts@’

parent cb2d63bf
......@@ -951,7 +951,8 @@ div{
height: 100% !important;
}
.viewSpot_1_info_2_bottom>.viewSpot_1_info_2_bottom_img>div>.dragDiv>div>img{
width: 100%;
/* width: 100%; */
height: 100%;
}
.viewSpot_1_info_2_bottom>.viewSpot_1_info_2_bottom_img>div:nth-child(1){}
.viewSpot_1_info_2_bottom_img>div:nth-child(1)::before{
......@@ -1435,7 +1436,8 @@ div{
height: 100% !important;
}
.viewSpot_2_info_2>.viewSpot_2_info_2_img>div>.dragDiv>div>img{
width: 100%;
/* width: 100%; */
height: 100%;
}
.viewSpot_2_info_2>.viewSpot_2_info_2_img>div:nth-child(1){}
/*.viewSpot_2_info_2_img>div:nth-child(1)::before{*/
......
......@@ -9,7 +9,7 @@
<div class="trip_cover" v-show="pdfLoading" v-loading="pdfLoading"></div>
<input type="button" style="width: auto !important;" class="travelControlTripBtn" value="下载电脑版PDF" @click="toPDF(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游')" />
<input type="button" style="width: auto !important;" class="travelControlTripBtn" value="下载手机版WORD" @click="gernalFeature(0)" />
<input type="button" style="width: auto !important;" class="travelControlTripBtn" value="下载电脑版WORD" @click="gernalFeature(1)" />
<!-- <input type="button" style="width: auto !important;" class="travelControlTripBtn" value="下载电脑版WORD" @click="gernalFeature(1)" /> -->
<!-- ToWord(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游') -->
<!--&&isopOperation HK 注释 可以让销售修改基本信息-->
<input type="button" v-if="orderId>0" class="travelControlTripBtn" value="修改信息" @click="editMsgShow=true" />
......@@ -643,7 +643,7 @@
}, 2000)
},
methods: {
gernalFeature(type){
gernalFeature(isPc){
this.pdfLoading = true;
let tcid = this.$route.query.tcid;
let UploadUrl = this.domainManager().UploadUrl
......@@ -656,8 +656,13 @@
success: function (data) {
let msg = JSON.parse(data)
if (msg.ResultCode) { // 已经存在文件 直接调用下载
_this.ToWord(_this.orderMsg.startDate + _this.orderMsg.lineteamName + _this.orderMsg.dayNum + '日游',type)
_this.ToWord(_this.orderMsg.startDate + _this.orderMsg.lineteamName + _this.orderMsg.dayNum + '日游',isPc)
} else { // 不存在图片保存图片后下载
console.log(document.querySelector("#gernalCanvas").querySelectorAll('img').length)
if (document.querySelector("#gernalCanvas").querySelectorAll('img').length === 0) {
_this.ToWord(_this.orderMsg.startDate + _this.orderMsg.lineteamName + _this.orderMsg.dayNum + '日游',isPc)
return
}
document.querySelector("#gernalCanvas").querySelectorAll('img').forEach(x => {
let src = x.src
src = src.replace('https:','http:')
......@@ -934,7 +939,7 @@
//是否显示行程图片
isShowTripImage:this.vshowK?1:0,
//isPc是否PC下载
isPc: type,
isPc: isPc,
};
this.GetLocalFile("DownLoadTripWord", msg,title+ ".doc", res=>{
this.pdfLoading = false
......
......@@ -7,7 +7,7 @@
<span class="foldList" @click="fold" v-if="isFold==''">点击折叠</span>
<span class="foldList" @click="fold" v-if="isFold==1">点击展开</span>
<div class="TrfList clearfix">
<!-- v-if="item.TypeState === 4 && this.FeatureData.FeatureType!==4" -->
<!-- 'display_none':(item.TypeState===4 && FeatureData.FeatureType !== 4) || (item.TypeState===4 && !$route.query.configId)-->
<div class="TFslide" v-for="item in TypeArray" :class="{'TFcked':item.isShow,'display_none':(item.TypeState===4 && FeatureData.FeatureType !== 4) || (item.TypeState===4 && !$route.query.configId)}" @click="clickFeature(item)"
:key="item.subCode">
<img v-bind:src="item.imgUrl">
......@@ -469,6 +469,7 @@
});
this.FeatureData.FeatureHtmlJson = null
this.FeatureData.FeatureHtmlJsonDelete = null
this.FeatureData.lastFeatureType = this.FeatureData.FeatureType
this.FeatureData.switch4or5 = true
this.$forceUpdate()
}).catch(() => {
......@@ -493,6 +494,8 @@
x.isShow = true;
this.ckTitle = x.ckTitle;
this.FeatureData.FeatureType = item.TypeState;
this.FeatureData.lastFeatureType = this.FeatureData.FeatureType
this.FeatureData.switch4or5 = true
} else {
x.isShow = false;
}
......@@ -561,6 +564,7 @@
},
initFeature() {
this.TypeArray.forEach(x => {
console.log("this.FeatureData.FeatureType",this.FeatureData.FeatureType)
if (x.TypeState == this.FeatureData.FeatureType) {
x.isShow = true;
this.ckTitle = x.ckTitle;
......
......@@ -560,7 +560,7 @@
</div>
<div class="travel_noImg dragDiv" :id='"viewSpotBox_"+(item*4+1)+"_0"'>
<div class="triangle_border_rb"></div>
<VueDraggableResizable v-if="viewSpotObj.list[item*4+1].images[0]" :ref='"viewSpotVds_"+(item*4+1)+"_0"' tabindex="0" :resizable='false' :active="false" :parent="false" axis='y' @activated="onActivated(item*4+1,0)" :x="viewSpotObj.list[item*4+1].images[0].x" :y="viewSpotObj.list[item*4+1].images[0].y" :z="2" @dragstop="onViewSpotDragstop">
<VueDraggableResizable v-if="viewSpotObj.list[item*4+1].images[0]" :ref='"viewSpotVds_"+(item*4+1)+"_0"' tabindex="0" :resizable='false' :active="false" :parent="false" axis='x' @activated="onActivated(item*4+1,0)" :x="viewSpotObj.list[item*4+1].images[0].x" :y="0" :z="2" @dragstop="onViewSpotDragstopY">
<img :src='viewSpotObj.list[item*4+1].images[0].Url' :id='"viewSpotImg_"+(item*4+1)+"_0"' />
</VueDraggableResizable>
<div class="triangle_border_rb_b"></div>
......@@ -588,7 +588,8 @@
</div>
<div class="travel_noImg dragDiv" :id='"viewSpotBox_"+(item*4+1)+"_1"'>
<div class="triangle_border_rb_c"></div>
<VueDraggableResizable v-if="viewSpotObj.list[item*4+1].images[1]" :ref='"viewSpotVds_"+(item*4+1)+"_1"' tabindex="0" :resizable='false' :active="false" :parent="false" axis='y' @activated="onActivated(item*4+1,1)" :x="viewSpotObj.list[item*4+1].images[1].x" :y="viewSpotObj.list[item*4+1].images[1].y" :z="2" @dragstop="onViewSpotDragstop">
<!-- viewSpotObj.list[item*4+1].images[1].y -->
<VueDraggableResizable v-if="viewSpotObj.list[item*4+1].images[1]" :ref='"viewSpotVds_"+(item*4+1)+"_1"' tabindex="0" :resizable='false' :active="false" :parent="false" axis='x' @activated="onActivated(item*4+1,1)" :x="viewSpotObj.list[item*4+1].images[1].x" :y="0" :z="2" @dragstop="onViewSpotDragstopY">
<img :src='viewSpotObj.list[item*4+1].images[1].Url' :id='"viewSpotImg_"+(item*4+1)+"_1"' />
</VueDraggableResizable>
<div class="triangle_border_rb_b"></div>
......@@ -773,7 +774,7 @@
</div>
<div class="travel_noImg dragDiv" :id='"viewSpotBox_"+(item*4-1)+"_0"'>
<div class="triangle_border_rb"></div>
<VueDraggableResizable v-if="viewSpotObj.list[item*4-1].images[0]" :ref='"viewSpotVds_"+(item*4-1)+"_0"' tabindex="0" :resizable='false' :active="false" :parent="false" axis='y' @activated="onActivated(item*4-1,0)" :x="viewSpotObj.list[item*4-1].images[0].x" :y="viewSpotObj.list[item*4-1].images[0].y" :z="2" @dragstop="onViewSpotDragstop">
<VueDraggableResizable v-if="viewSpotObj.list[item*4-1].images[0]" :ref='"viewSpotVds_"+(item*4-1)+"_0"' tabindex="0" :resizable='false' :active="false" :parent="false" axis='x' @activated="onActivated(item*4-1,0)" :x="viewSpotObj.list[item*4-1].images[0].x" :y="0" :z="2" @dragstop="onViewSpotDragstopY">
<img :src='viewSpotObj.list[item*4-1].images[0].Url' :id='"viewSpotImg_"+(item*4-1)+"_0"' />
</VueDraggableResizable>
<div class="triangle_border_rb_b"></div>
......@@ -819,7 +820,7 @@
</div>
<div class="travel_noImg dragDiv" :id='"viewSpotBox_"+(item*4)+"_0"'>
<div class="triangle_border_rb_c"></div>
<VueDraggableResizable v-if="viewSpotObj.list[item*4].images[0]" :ref='"viewSpotVds_"+(item*4)+"_0"' tabindex="0" :resizable='false' :active="false" :parent="false" axis='y' @activated="onActivated(item*4,0)" :x="viewSpotObj.list[item*4].images[0].x" :y="viewSpotObj.list[item*4].images[0].y" :z="2" @dragstop="onViewSpotDragstop">
<VueDraggableResizable v-if="viewSpotObj.list[item*4].images[0]" :ref='"viewSpotVds_"+(item*4)+"_0"' tabindex="0" :resizable='false' :active="false" :parent="false" axis='x' @activated="onActivated(item*4,0)" :x="viewSpotObj.list[item*4].images[0].x" :y="0" :z="2" @dragstop="onViewSpotDragstopY">
<img :src='viewSpotObj.list[item*4].images[0].Url' :id='"viewSpotImg_"+(item*4)+"_0"' />
</VueDraggableResizable>
<div class="triangle_border_rb_b_c"></div>
......@@ -865,7 +866,7 @@
</div>
<div class="travel_noImg dragDiv" :id='"viewSpotBox_"+(item*4+1)+"_0"'>
<div class="triangle_border_rb"></div>
<VueDraggableResizable v-if="viewSpotObj.list[item*4+1].images[0]" :ref='"viewSpotVds_"+(item*4+1)+"_0"' tabindex="0" :resizable='false' :active="false" :parent="false" axis='y' @activated="onActivated(item*4+1,0)" :x="viewSpotObj.list[item*4+1].images[0].x" :y="viewSpotObj.list[item*4+1].images[0].y" :z="2" @dragstop="onViewSpotDragstop">
<VueDraggableResizable v-if="viewSpotObj.list[item*4+1].images[0]" :ref='"viewSpotVds_"+(item*4+1)+"_0"' tabindex="0" :resizable='false' :active="false" :parent="false" axis='x' @activated="onActivated(item*4+1,0)" :x="viewSpotObj.list[item*4+1].images[0].x" :y="0" :z="2" @dragstop="onViewSpotDragstopY">
<img :src='viewSpotObj.list[item*4+1].images[0].Url' :id='"viewSpotImg_"+(item*4+1)+"_0"' />
</VueDraggableResizable>
<div class="triangle_border_rb_b_c"></div>
......@@ -1354,7 +1355,8 @@
let deleteDataList = JSON.parse(JSON.stringify(this.FeatureData.FeatureHtmlJsonDelete));
this.deleteArray = deleteDataList==="" ? this.deleteArray : deleteDataList;
console.log("dataList",dataList,!this.$route.query.configId,dataList.switch4or5)
if (!this.$route.query.configId || (this.$route.query.configId && dataList.switch4or5) || (this.FeatureData.FeatureType !== 4 || this.FeatureData.FeatureType !== 5) ){
// console.log("this.$route.query.configId && this.FeatureData.FeatureType<4",this.$route.query.configId && this.FeatureData.FeatureType<4) || (this.$route.query.configId && this.FeatureData.FeatureType<4)
if (!this.$route.query.configId || (this.$route.query.configId && dataList.switch4or5) || (this.$route.query.configId && this.FeatureData.lastFeatureType<4)){
for (let i = 0; i < dataList.DayList.length; i++) { //组装数据
let restaurantObj = travelFeatureTwo.DinnerInit(i, dataList.DayList) // 餐饮
let hotelObj = travelFeatureTwo.HotelInit(i, dataList.DayList) // 酒店
......@@ -1456,6 +1458,26 @@
this.viewSpotObj.list[this.currentIndex].images[this.imgIndex].y=y;
this.$refs["viewSpotVds_"+this.currentIndex+"_"+this.imgIndex][0]._data.top=y
},
onViewSpotDragstopY(x,y){
let imgWidth=document.querySelector("#viewSpotImg_"+this.currentIndex+"_"+this.imgIndex).width;
let boxWidth=document.querySelector("#viewSpotBox_"+this.currentIndex+"_"+this.imgIndex).offsetWidth;
let cha=boxWidth-imgWidth;
if (cha <= 0) {
if(x < 0 && x < cha) {
x=cha
} else if (x > 0) {
x=0
}
} else {
if (x < 0) {
x = 0
} else if (x > 0 && x > cha) {
x = cha
}
}
this.viewSpotObj.list[this.currentIndex].images[this.imgIndex].x=x;
this.$refs["viewSpotVds_"+this.currentIndex+"_"+this.imgIndex][0]._data.left=x
},
// 餐厅图片拖拽
onRestaurantDragstop(x,y){
let imgHeight=document.querySelector("#restaurantImg_"+this.currentIndex+"_"+this.imgIndex).height;
......
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