Commit f698952b by linjinhong

fix:修改图片位置问题

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