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
b6e63b47
Commit
b6e63b47
authored
Aug 27, 2025
by
linjinhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加压板尺寸图片兼容
parent
e6246077
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
13 deletions
+46
-13
logs/2025-08-26/api.log
+0
-0
src/views/design/main/index.vue
+46
-13
No files found.
logs/2025-08-26/api.log
deleted
100644 → 0
View file @
e6246077
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/views/design/main/index.vue
View file @
b6e63b47
<
script
>
import
VueDragResizeRotate
from
"@minogin/vue-drag-resize-rotate"
;
import
PicScrollbarBox
from
"../../../components/PicScrollbarBox.vue"
;
//
import PicScrollbarBox from "../../../components/PicScrollbarBox.vue";
const
{
ipcRenderer
}
=
require
(
"electron"
);
// import { fabric } from "fabric";
...
...
@@ -24,7 +24,6 @@ export default {
PrintDialog
,
VueDragResizeRotate
,
ImgSetting
,
PicScrollbarBox
,
},
props
:
{
factoryType
:
{
type
:
String
,
default
:
"CN"
}
},
destroyed
()
{
...
...
@@ -193,12 +192,14 @@ export default {
isView
:
false
,
imgHistoryList
:
[[]],
imgHistoryIndex
:
0
,
row
:
8
,
row
:
7
,
img
,
col
:
7
,
col
:
8
,
oldImgStyle
:
""
,
drrDom
:
null
,
imgDom
:
null
,
leftPosition
:
"22%"
,
topPosition
:
"52%"
,
};
},
watch
:
{
...
...
@@ -262,8 +263,28 @@ export default {
}
console
.
log
(
249
,
this
.
detail
.
imageAry
);
},
changeCheckFn
(
value
)
{
console
.
log
(
"check"
,
value
);
col
:
{
handler
(
newValue
)
{
const
positionMap
=
{
8
:
{
left
:
"36%"
,
top
:
"36%"
},
12
:
{
left
:
"32%"
,
top
:
"43%"
},
16
:
{
left
:
"26%"
,
top
:
"49%"
},
18
:
{
left
:
"22%"
,
top
:
"52%"
},
21
:
{
left
:
"22%"
,
top
:
"56%"
},
};
// 查找对应的位置设置
const
position
=
positionMap
[
newValue
];
if
(
position
)
{
this
.
leftPosition
=
position
.
left
;
this
.
topPosition
=
position
.
top
;
}
if
(
this
.
imgList
?.
length
)
{
this
.
getBackFile
({
files
:
this
.
imgList
});
}
},
immediate
:
true
,
},
isView
:
{
...
...
@@ -681,7 +702,7 @@ export default {
console
.
log
(
679
,
rate
);
if
(
rate
>
1
)
{
height_px
=
bh
*
(
8
/
10
);
height_px
=
bh
*
(
7.5
/
10
);
// width_px = height_px / rate > bw ? bw : height_px / rate;
width_px
=
height_px
/
rate
;
x
=
width_px
/
2
;
...
...
@@ -1052,6 +1073,17 @@ export default {
console
.
log
(
error
);
}
},
getWHproportion
(
data
)
{
if
(
this
.
gridWH
.
col
==
8
)
{
return
data
+
1.8
;
}
else
if
(
this
.
gridWH
.
col
==
12
)
{
return
data
+
1
;
}
else
if
(
this
.
gridWH
.
col
==
21
)
{
return
1.4
;
}
else
{
return
data
;
}
},
},
mounted
()
{
this
.
imgHeight
=
window
.
screen
.
height
+
"px"
;
...
...
@@ -1385,22 +1417,23 @@ export default {
<div
v-if=
"isView"
id=
"img"
>
<div
id=
"line"
style=
"left: 22%;top: 52%;background-color: transparent;overflow: hidden"
style=
"background-color: transparent;overflow: hidden"
:style=
"{ left: leftPosition, top: topPosition }"
>
<div
class=
"sucaitu vieWsucaitu"
:style=
"{ width: '100%', height: '100%' }"
>
<vue-drag-resize-rotate
:w=
"item.w /
WHproportion
"
:w=
"item.w /
getWHproportion(WHproportion)
"
class-name=
"my-drag-resize-rotate"
:prevent-deactivation=
"false"
:h=
"item.h /
WHproportion
"
:x=
"item.x /
WHproportion
"
:z=
"item.zIndex /
WHproportion
"
:h=
"item.h /
getWHproportion(WHproportion)
"
:x=
"item.x /
getWHproportion(WHproportion)
"
:z=
"item.zIndex /
getWHproportion(WHproportion)
"
:aspectRatio=
"false"
:isActive=
"false"
:y=
"item.y /
WHproportion
"
:y=
"item.y /
getWHproportion(WHproportion)
"
v-for=
"(item, index) in imgList"
:key=
"index"
:draggable=
"false"
...
...
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