Commit f698952b by linjinhong

fix:修改图片位置问题

parent 2d90bc5b
...@@ -826,7 +826,7 @@ export default { ...@@ -826,7 +826,7 @@ export default {
let width_px, height_px, rate, x, y; let width_px, height_px, rate, x, y;
let data = await that.getImageSize(files[i].url); let data = await that.getImageSize(files[i].url);
console.log("data", data); console.log("data", data);
// console.log("h", h); console.log("that.WHproportion", that.WHproportion);
if (size && !files[i].isCut) { if (size && !files[i].isCut) {
console.log("size", size); console.log("size", size);
...@@ -845,8 +845,9 @@ export default { ...@@ -845,8 +845,9 @@ export default {
rate = height_px / width_px; rate = height_px / width_px;
} }
} else { } else {
console.log("data", data);
rate = data.height / data.width; rate = data.height / data.width;
console.log("data", data);
console.log("rate", rate);
if (rate > 1) { if (rate > 1) {
height_px = bh * (7.5 / 10); height_px = bh * (7.5 / 10);
...@@ -880,11 +881,13 @@ export default { ...@@ -880,11 +881,13 @@ export default {
that.selectIndex = that.imgList.length - 1; that.selectIndex = that.imgList.length - 1;
that.showImgSetting = true; that.showImgSetting = true;
// if (this.newDesktopDevice != 3) { if (this.newDesktopDevice != 3) {
// that.$nextTick(() => { if (size && !files[i].isCut) {
// that.ev("center"); that.ev("cover");
// }); } else {
// } that.ev("center");
}
}
// setTimeout(() => { // setTimeout(() => {
// that.ev("center"); // that.ev("center");
...@@ -1045,7 +1048,7 @@ export default { ...@@ -1045,7 +1048,7 @@ export default {
// 等待所有异步操作完成 // 等待所有异步操作完成
await new Promise((resolve) => setTimeout(resolve, 100)); await new Promise((resolve) => setTimeout(resolve, 100));
const newMap = new Map(processQueue.map((el) => [el.designId, el])); const newMap = new Map(processQueue.map((el) => [el.designId, el]));
// console.log("newMap", newMap); console.log("newMap", newMap);
this.selectImgList.forEach((el) => { this.selectImgList.forEach((el) => {
if (newMap.has(el.designId)) { if (newMap.has(el.designId)) {
...@@ -1065,6 +1068,7 @@ export default { ...@@ -1065,6 +1068,7 @@ export default {
this.selectIndex = -1; this.selectIndex = -1;
} }
} }
console.log("this.selectImgList", this.selectImgList);
this.checkList = []; this.checkList = [];
this.getBackFile({ files: [this.selectImgList[0]] }); this.getBackFile({ files: [this.selectImgList[0]] });
...@@ -1849,12 +1853,19 @@ export default { ...@@ -1849,12 +1853,19 @@ export default {
detail && detail &&
detail.mssWidth && detail.mssWidth &&
detail.mssHeight && detail.mssHeight &&
selectImgList.length && selectImgList.length
!detail?.saveImgList.some((el) => el.isCut)
" "
> >
<b style="color: green" v-if="hasSize" <b
>该生产单无需拖动设计,直接打印</b :style="{
color: selectImgList.some((el) => el.isCut) ? 'red' : 'green',
}"
v-if="hasSize"
>{{
selectImgList.some((el) => el.isCut)
? "该生产单被裁切需拖动设计打印"
: "该生产单无需拖动设计,直接打印"
}}</b
> >
<b style="color: red" v-else>该生产单需要拖动设计打印</b> <b style="color: red" v-else>该生产单需要拖动设计打印</b>
</div> </div>
......
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