Commit 823d44dd authored by 罗超's avatar 罗超

修改行程特色储存方式

parent 9370d876
......@@ -8,7 +8,7 @@
<div class="travelControlTrip detail-box">
<div class="trip_cover" v-show="pdfLoading" v-loading="pdfLoading"></div>
<input type="button" class="travelControlTripBtn" value="下载PDF" @click="toPDF(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游')" />
<input style="display:none;" type="button" class="travelControlTripBtn" value="下载WORD" @click="ToWord(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游')" />
<input type="button" class="travelControlTripBtn" value="下载WORD" @click="gernalFeature()" /><!-- ToWord(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游') -->
<!-- <input type="button" class="travelControlTripBtn" value="下载Word" @click="toWord(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游')" /> -->
<!--&&isopOperation HK 注释 可以让销售修改基本信息-->
<input type="button" v-if="orderId>0" class="travelControlTripBtn" value="修改信息" @click="editMsgShow=true" />
......@@ -213,7 +213,7 @@
<div class="zidingyi" v-if="showType==3&&loadNone==false&&vshowC">
<div v-html="feature.featureContent"></div>
</div>
<div class="template-box" v-if="(showType==4||showType==5)&&loadNone==false&&vshowC">
<div class="template-box" v-if="(showType==4||showType==5)&&loadNone==false&&vshowC" id='gernalCanvas'>
<div v-if="vshowC" class="module-title">
<h2>行程特色</h2>
<div class="short-line"></div>
......@@ -642,6 +642,33 @@
}, 2000)
},
methods: {
gernalFeature(){
console.log(document.querySelector("#gernalCanvas").querySelectorAll('img'))
document.querySelector("#gernalCanvas").querySelectorAll('img').forEach(x => {
if(x.src.indexOf('http')!=-1){
x.setAttribute('crossOrigin','anonymous')
}
});
document.querySelectorAll('.feature-box').forEach(x => {
html2Canvas(x,{
useCORS:true,
scale:0.7,
backgroundColor:'#FFFFFF'
}).then((canvas) => {
if(canvas){
var context = canvas.getContext('2d')
context.mozImageSmoothingEnabled = false
context.webkitImageSmoothingEnabled = false
context.msImageSmoothingEnabled = false
context.imageSmoothingEnabled = false
var image = new Image();
image.src = canvas.toDataURL("image/png");
document.body.appendChild(image)
}
});
});
},
//保存基础数据
submitForm: function () {
this.editForm.travelOrderFlightList.forEach(x => {
......
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