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
75afe767
Commit
75afe767
authored
Apr 28, 2025
by
zhuzhequan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加自动打印逻辑
parent
e9809902
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
src/views/design/head/index.vue
+1
-1
src/views/design/main/index.vue
+19
-1
No files found.
src/views/design/head/index.vue
View file @
75afe767
...
...
@@ -239,7 +239,7 @@ export default {
bus
.
$emit
(
"busEmit"
,
{
type
:
"sendFile"
,
value
:
res
.
data
,
//
size: { width: this.detail.mssWidth || 500, height: this.detail.mssHeight || 500 }
size
:
{
width
:
this
.
detail
.
mssWidth
||
500
,
height
:
this
.
detail
.
mssHeight
||
500
}
});
this
.
productionNo
=
""
;
...
...
src/views/design/main/index.vue
View file @
75afe767
...
...
@@ -5,7 +5,6 @@ import ImgSetting from "./imgSetting.vue";
import
bus
from
"@/bus"
;
import
PrintDialog
from
"@/views/design/head/printDialog.vue"
;
import
{
mmToPx
}
from
"@/utils"
;
import
{
raw
}
from
"express"
;
const
img
=
require
(
"../../../assets/bg_tshirt_shadow.png"
);
export
default
{
...
...
@@ -79,6 +78,7 @@ export default {
data
()
{
return
{
actionList
:
[],
hasSize
:
false
,
parentWidth
:
0
,
systemSetting
:
{},
imgHeight
:
0
,
...
...
@@ -601,6 +601,11 @@ export default {
});
break
;
case
"sendFile"
:
if
(
size
.
width
&&
size
.
height
)
{
this
.
hasSize
=
true
}
else
{
this
.
hasSize
=
false
}
this
.
imgList
=
[];
this
.
selectIndex
=
-
1
;
if
(
value
.
length
>
0
)
{
...
...
@@ -708,6 +713,10 @@ export default {
</div>
</div>
<img
class=
"template-img"
draggable=
"false"
:src=
"img"
alt=
""
/>
<div
class=
"print-tip"
v-if=
"imgList.length"
>
<b
style=
"color: green"
v-if=
"hasSize "
>
该生产单无需拖动设计,直接打印
</b>
<b
style=
"color: red"
v-else
>
该生产单需要拖动设计打印
</b>
</div>
</div>
<print-dialog
...
...
@@ -722,6 +731,7 @@ export default {
"
></i>
</print-dialog>
</div>
</div>
<img-setting
...
...
@@ -746,6 +756,12 @@ export default {
</
template
>
<
style
lang=
"less"
scoped
>
.print-tip
{
position
:
absolute
;
bottom
:
130px
;
font-size
:
24px
;
left
:
35%
;
}
.page-main
{
flex
:
1
;
flex-shrink
:
0
;
...
...
@@ -829,6 +845,7 @@ export default {
justify-content
:
center
;
align-items
:
center
;
position
:
relative
;
}
.sucaitu
{
...
...
@@ -867,6 +884,7 @@ export default {
height
:
100%
;
cursor
:
move
;
border
:
1px
dashed
transparent
;
}
}
...
...
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