Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
electron-printer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhuzhequan
electron-printer
Commits
f698952b
Commit
f698952b
authored
Feb 11, 2026
by
linjinhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修改图片位置问题
parent
2d90bc5b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
+23
-12
src/views/design/main/index.vue
+23
-12
No files found.
src/views/design/main/index.vue
View file @
f698952b
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment