Commit 268b6f56 by linjinhong

fix:修改问题

parent f53236a1
...@@ -443,6 +443,7 @@ export default { ...@@ -443,6 +443,7 @@ export default {
async hasDesignImagesCanvasJsonList(designImagesCanvasJsonList, bool) { async hasDesignImagesCanvasJsonList(designImagesCanvasJsonList, bool) {
let imageResList = []; let imageResList = [];
let isCustom = false;
//当adjustable有值时 直接赋值宽高 //当adjustable有值时 直接赋值宽高
if ( if (
!this.checked && !this.checked &&
...@@ -452,6 +453,7 @@ export default { ...@@ -452,6 +453,7 @@ export default {
) { ) {
designImagesCanvasJsonList = JSON.parse(designImagesCanvasJsonList); designImagesCanvasJsonList = JSON.parse(designImagesCanvasJsonList);
if (!designImagesCanvasJsonList[0].images) { if (!designImagesCanvasJsonList[0].images) {
isCustom = true;
let imageList = await this.canvasToImage(designImagesCanvasJsonList); let imageList = await this.canvasToImage(designImagesCanvasJsonList);
let fm = new FormData(); let fm = new FormData();
for (let img of imageList) { for (let img of imageList) {
...@@ -555,6 +557,7 @@ export default { ...@@ -555,6 +557,7 @@ export default {
let obj = { let obj = {
type: "sendFile", type: "sendFile",
value: [...newImgList], value: [...newImgList],
isCustom,
}; };
if ( if (
......
...@@ -759,7 +759,7 @@ export default { ...@@ -759,7 +759,7 @@ export default {
); );
return img?.productionFile; return img?.productionFile;
}, },
getBackFile({ files, size }, callback) { getBackFile({ files, size, isCustom }, callback) {
let that = this; let that = this;
let bw = document.getElementById("line"); let bw = document.getElementById("line");
let bh = bw.clientHeight; let bh = bw.clientHeight;
...@@ -784,8 +784,8 @@ export default { ...@@ -784,8 +784,8 @@ export default {
y = h; y = h;
rate = height_px / width_px; rate = height_px / width_px;
} else { } else {
width_px = that.WHproportion * mmToPx(size.width); width_px = mmToPx(size.width);
height_px = that.WHproportion * mmToPx(size.height); height_px = mmToPx(size.height);
x = w; x = w;
y = h; y = h;
rate = height_px / width_px; rate = height_px / width_px;
...@@ -829,9 +829,9 @@ export default { ...@@ -829,9 +829,9 @@ export default {
that.showImgSetting = true; that.showImgSetting = true;
if (this.newDesktopDevice != 3) { if (this.newDesktopDevice != 3) {
if (size && !files[i].isCut) { if (size && !files[i].isCut) {
console.log(7898); console.log(7898, isCustom);
that.ev("cover"); isCustom ? that.ev("center") : that.ev("cover");
} else { } else {
that.ev("x_center"); that.ev("x_center");
} }
...@@ -1267,7 +1267,7 @@ export default { ...@@ -1267,7 +1267,7 @@ export default {
// console.log(1297, this.newDesktopDevice); // console.log(1297, this.newDesktopDevice);
bus.$on("busEmit", (v) => { bus.$on("busEmit", (v) => {
let { type, value, size } = v; let { type, value, size, isCustom } = v;
switch (type) { switch (type) {
case "completeMessage": case "completeMessage":
...@@ -1353,6 +1353,7 @@ export default { ...@@ -1353,6 +1353,7 @@ export default {
{ {
files: [value[this.selectImgIndex]], files: [value[this.selectImgIndex]],
size: this.detail.designImageSize || null, size: this.detail.designImageSize || null,
isCustom,
}, },
() => { () => {
this.imgHistoryList.push( this.imgHistoryList.push(
...@@ -1818,6 +1819,9 @@ export default { ...@@ -1818,6 +1819,9 @@ export default {
> >
<b style="color: red" v-else>该生产单需要拖动设计打印</b> <b style="color: red" v-else>该生产单需要拖动设计打印</b>
</div> </div>
<div class="print-tip" v-else>
<b style="color: red">该生产单需要拖动设计打印</b>
</div>
</div> </div>
<img <img
......
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