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
268b6f56
Commit
268b6f56
authored
Mar 05, 2026
by
linjinhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修改问题
parent
f53236a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
src/views/design/head/index.vue
+3
-0
src/views/design/main/index.vue
+10
-6
No files found.
src/views/design/head/index.vue
View file @
268b6f56
...
@@ -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 (
...
...
src/views/design/main/index.vue
View file @
268b6f56
...
@@ -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
...
...
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