Commit c2d059ee by linjinhong

fix:修改切换压板后图片的问题

parent 268b6f56
......@@ -443,7 +443,7 @@ export default {
async hasDesignImagesCanvasJsonList(designImagesCanvasJsonList, bool) {
let imageResList = [];
let isCustom = false;
//当adjustable有值时 直接赋值宽高
if (
!this.checked &&
......@@ -453,7 +453,7 @@ export default {
) {
designImagesCanvasJsonList = JSON.parse(designImagesCanvasJsonList);
if (!designImagesCanvasJsonList[0].images) {
isCustom = true;
this.detail.isCustom = true;
let imageList = await this.canvasToImage(designImagesCanvasJsonList);
let fm = new FormData();
for (let img of imageList) {
......@@ -557,7 +557,6 @@ export default {
let obj = {
type: "sendFile",
value: [...newImgList],
isCustom,
};
if (
......@@ -690,7 +689,7 @@ export default {
designImagesCanvasJsonList,
this.desktopDevice === 3 ? (localItem ? true : false) : false,
);
this.$store.commit("setProductDetail", findByPodProductionNo.data);
this.$store.commit("setProductDetail", this.detail);
ipcRenderer.send("win-subScreen", findByPodProductionNo.data);
this.$dataStore.set("production_no", this.productionNo);
this.productionNo = "";
......
......@@ -341,7 +341,10 @@ export default {
}
if (this.imgList?.length) {
this.getBackFile({ files: this.imgList });
this.getBackFile({
files: this.imgList,
size: this.detail.designImageSize || null,
});
}
},
immediate: true,
......@@ -759,7 +762,9 @@ export default {
);
return img?.productionFile;
},
getBackFile({ files, size, isCustom }, callback) {
getBackFile({ files, size }, callback) {
console.log(333333333);
let that = this;
let bw = document.getElementById("line");
let bh = bw.clientHeight;
......@@ -829,9 +834,9 @@ export default {
that.showImgSetting = true;
if (this.newDesktopDevice != 3) {
if (size && !files[i].isCut) {
console.log(7898, isCustom);
console.log(7898, this.detail);
isCustom ? that.ev("center") : that.ev("cover");
this.detail.isCustom ? that.ev("center") : that.ev("cover");
} else {
that.ev("x_center");
}
......@@ -1267,7 +1272,7 @@ export default {
// console.log(1297, this.newDesktopDevice);
bus.$on("busEmit", (v) => {
let { type, value, size, isCustom } = v;
let { type, value, size } = v;
switch (type) {
case "completeMessage":
......@@ -1293,19 +1298,21 @@ export default {
height: this.detail.mssHeight,
};
}
if (this.selectImgIndex != -1 && this.selectImgList.length) {
this.getBackFile(
{
files: [this.selectImgList[this.selectImgIndex]],
size: this.detail.designImageSize || null,
},
() => {
this.imgHistoryList.push(
JSON.parse(JSON.stringify(this.imgList)),
);
},
);
}
console.log(1296, this.detail);
// if (this.selectImgIndex != -1 && this.selectImgList.length) {
// this.getBackFile(
// {
// files: [this.selectImgList[this.selectImgIndex]],
// size: this.detail.designImageSize || null,
// },
// () => {
// this.imgHistoryList.push(
// JSON.parse(JSON.stringify(this.imgList)),
// );
// },
// );
// }
break;
case "index":
this.indexChange(value);
......@@ -1353,7 +1360,6 @@ export default {
{
files: [value[this.selectImgIndex]],
size: this.detail.designImageSize || null,
isCustom,
},
() => {
this.imgHistoryList.push(
......@@ -1819,9 +1825,9 @@ export default {
>
<b style="color: red" v-else>该生产单需要拖动设计打印</b>
</div>
<div class="print-tip" v-else>
<!-- <div class="print-tip" v-else>
<b style="color: red">该生产单需要拖动设计打印</b>
</div>
</div> -->
</div>
<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