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
a327daff
Commit
a327daff
authored
Jan 08, 2026
by
linjinhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:添加删除模式
parent
2c071741
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
104 additions
and
33 deletions
+104
-33
logs/2025-12-31/print.json
+2
-0
print/send.bat
+2
-1
src/background.js
+6
-1
src/server/utils/index.js
+18
-1
src/server/utils/store.js
+4
-0
src/views/design/head/index.vue
+70
-28
src/views/design/head/printDialog.vue
+2
-2
No files found.
logs/2025-12-31/print.json
0 → 100644
View file @
a327daff
[{
"head_setting"
:{
"gridShow"
:
1
,
"gridValue"
:
0
,
"unit"
:
"inch"
,
"language"
:
"cn"
,
"autoPrint"
:
false
,
"gridSpacing"
:
1
},
"version"
:
"1.0.23"
,
"print_setting"
:{
"printer"
:
""
,
"xy"
:
""
,
"byInk"
:
2
,
"byInkVolume"
:
1
,
"byDoublePrint"
:
3
,
"bEcoMode"
:
false
,
"bMaterialBlack"
:
false
,
"byHighlight"
:
5
,
"printNum"
:
1
,
"bFastMode"
:
false
,
"bUniPrint"
:
false
,
"bDivide"
:
false
,
"bPause"
:
false
,
"byMask"
:
3
,
"bTransColor"
:
false
,
"byChoke"
:
2
,
"minWhiteInkType"
:
0
,
"bySaturation"
:
5
,
"byBrightness"
:
5
,
"byContrast"
:
5
,
"iCyanBalance"
:
0
,
"iMagentaBalance"
:
0
,
"iBlackBalance"
:
0
,
"iYellowBalance"
:
0
,
"byMinWhite"
:
1
,
"bMultiple"
:
false
},
"production_no"
:
"CNPSC2512192256"
,
"print_time"
:
"2025-12-31 13:50:56"
,
"position_unit"
:{
"x"
:
408.8
,
"rate"
:
1.396341463414634
,
"sx"
:
0
,
"zIndex"
:
0
,
"sh"
:
0
,
"sw"
:
0
,
"sy"
:
0
,
"y"
:
458.6
,
"w"
:
594.4
,
"h"
:
826.7
,
"r"
:
0
},
"position_after_px"
:{
"x"
:
"3.4"
,
"rate"
:
1.1248941574936495
,
"sx"
:
0
,
"zIndex"
:
0
,
"sh"
:
0
,
"sw"
:
0
,
"sy"
:
0
,
"y"
:
"3.8"
,
"w"
:
"20.3"
,
"h"
:
"22.9"
,
"r"
:
0
},
"position_before_px"
:{
"url"
:
"D:
\\
work
\\
electron-printer
\\
print4.0
\\
Input
\\
66e5699c-55d1-4cf7-8c96-d520ae2af971.png"
,
"fileName"
:
"66e5699c-55d1-4cf7-8c96-d520ae2af971.png"
,
"rate"
:
1.1248941574936495
,
"w"
:
613.3910425291682
,
"zIndex"
:
0
,
"x"
:
102.3044787354159
,
"y"
:
115
,
"h"
:
690
,
"r"
:
0
},
"send_api_data"
:{
"printer"
:
""
,
"xy"
:
""
,
"byInk"
:
2
,
"byInkVolume"
:
1
,
"byDoublePrint"
:
3
,
"bEcoMode"
:
false
,
"bMaterialBlack"
:
false
,
"byHighlight"
:
5
,
"printNum"
:
1
,
"bFastMode"
:
false
,
"bUniPrint"
:
false
,
"bDivide"
:
false
,
"bPause"
:
false
,
"byMask"
:
3
,
"bTransColor"
:
false
,
"byChoke"
:
2
,
"minWhiteInkType"
:
0
,
"bySaturation"
:
5
,
"byBrightness"
:
5
,
"byContrast"
:
5
,
"iCyanBalance"
:
0
,
"iMagentaBalance"
:
0
,
"iBlackBalance"
:
0
,
"iYellowBalance"
:
0
,
"byMinWhite"
:
1
,
"bMultiple"
:
false
,
"byPlatenSize"
:
1
,
"cmd"
:
"GTXproCMD.exe print -X
\"
Profile
\\
66e5699c-55d1-4cf7-8c96-d520ae2af971.xml
\"
-I
\"
Input
\\
66e5699c-55d1-4cf7-8c96-d520ae2af971.png
\"
-A
\"
Output
\\
66e5699c-55d1-4cf7-8c96-d520ae2af971.arxp
\"
-S 30363417 -L 05120574 -D 0 -W 1"
,
"fileName"
:
"66e5699c-55d1-4cf7-8c96-d520ae2af971.png"
,
"print_cmd"
:
"GTXproCMD.exe send -A
\"
Output
\\
66e5699c-55d1-4cf7-8c96-d520ae2af971.arxp
\"
-P
\"
导出为WPS PDF
\"
-D 1"
}},{
"head_setting"
:{
"gridShow"
:
1
,
"gridValue"
:
0
,
"unit"
:
"inch"
,
"language"
:
"cn"
,
"autoPrint"
:
false
,
"gridSpacing"
:
1
},
"version"
:
"1.0.23"
,
"print_setting"
:{
"printer"
:
""
,
"xy"
:
""
,
"byInk"
:
2
,
"byInkVolume"
:
1
,
"byDoublePrint"
:
3
,
"bEcoMode"
:
false
,
"bMaterialBlack"
:
false
,
"byHighlight"
:
5
,
"printNum"
:
1
,
"bFastMode"
:
false
,
"bUniPrint"
:
false
,
"bDivide"
:
false
,
"bPause"
:
false
,
"byMask"
:
3
,
"bTransColor"
:
false
,
"byChoke"
:
2
,
"minWhiteInkType"
:
0
,
"bySaturation"
:
5
,
"byBrightness"
:
5
,
"byContrast"
:
5
,
"iCyanBalance"
:
0
,
"iMagentaBalance"
:
0
,
"iBlackBalance"
:
0
,
"iYellowBalance"
:
0
,
"byMinWhite"
:
1
,
"bMultiple"
:
false
},
"production_no"
:
"CNPSC2512192256"
,
"print_time"
:
"2025-12-31 13:50:46"
,
"position_unit"
:{
"x"
:
408.8
,
"rate"
:
1.396341463414634
,
"sx"
:
0
,
"zIndex"
:
0
,
"sh"
:
0
,
"sw"
:
0
,
"sy"
:
0
,
"y"
:
458.6
,
"w"
:
594.4
,
"h"
:
826.7
,
"r"
:
0
},
"position_after_px"
:{
"x"
:
"3.4"
,
"rate"
:
1.1248941574936495
,
"sx"
:
0
,
"zIndex"
:
0
,
"sh"
:
0
,
"sw"
:
0
,
"sy"
:
0
,
"y"
:
"3.8"
,
"w"
:
"20.3"
,
"h"
:
"22.9"
,
"r"
:
0
},
"position_before_px"
:{
"url"
:
"D:
\\
work
\\
electron-printer
\\
print4.0
\\
Input
\\
66e5699c-55d1-4cf7-8c96-d520ae2af971.png"
,
"fileName"
:
"66e5699c-55d1-4cf7-8c96-d520ae2af971.png"
,
"rate"
:
1.1248941574936495
,
"w"
:
613.3910425291682
,
"zIndex"
:
0
,
"x"
:
102.3044787354159
,
"y"
:
115
,
"h"
:
690
,
"r"
:
0
},
"send_api_data"
:{
"printer"
:
""
,
"xy"
:
""
,
"byInk"
:
2
,
"byInkVolume"
:
1
,
"byDoublePrint"
:
3
,
"bEcoMode"
:
false
,
"bMaterialBlack"
:
false
,
"byHighlight"
:
5
,
"printNum"
:
1
,
"bFastMode"
:
false
,
"bUniPrint"
:
false
,
"bDivide"
:
false
,
"bPause"
:
false
,
"byMask"
:
3
,
"bTransColor"
:
false
,
"byChoke"
:
2
,
"minWhiteInkType"
:
0
,
"bySaturation"
:
5
,
"byBrightness"
:
5
,
"byContrast"
:
5
,
"iCyanBalance"
:
0
,
"iMagentaBalance"
:
0
,
"iBlackBalance"
:
0
,
"iYellowBalance"
:
0
,
"byMinWhite"
:
1
,
"bMultiple"
:
false
,
"byPlatenSize"
:
1
,
"cmd"
:
"GTXproCMD.exe print -X
\"
Profile
\\
66e5699c-55d1-4cf7-8c96-d520ae2af971.xml
\"
-I
\"
Input
\\
66e5699c-55d1-4cf7-8c96-d520ae2af971.png
\"
-A
\"
Output
\\
66e5699c-55d1-4cf7-8c96-d520ae2af971.arxp
\"
-S 30363417 -L 05120574 -D 0 -W 1"
,
"fileName"
:
"66e5699c-55d1-4cf7-8c96-d520ae2af971.png"
,
"print_cmd"
:
"GTXproCMD.exe send -A
\"
Output
\\
66e5699c-55d1-4cf7-8c96-d520ae2af971.arxp
\"
-P
\"
导出为WPS PDF
\"
-D 0"
}},{
"head_setting"
:{
"gridShow"
:
1
,
"gridValue"
:
0
,
"unit"
:
"inch"
,
"language"
:
"cn"
,
"autoPrint"
:
false
,
"gridSpacing"
:
1
},
"version"
:
"1.0.23"
,
"print_setting"
:{
"printer"
:
""
,
"xy"
:
""
,
"byInk"
:
2
,
"byInkVolume"
:
1
,
"byDoublePrint"
:
3
,
"bEcoMode"
:
false
,
"bMaterialBlack"
:
false
,
"byHighlight"
:
5
,
"printNum"
:
1
,
"bFastMode"
:
false
,
"bUniPrint"
:
false
,
"bDivide"
:
false
,
"bPause"
:
false
,
"byMask"
:
3
,
"bTransColor"
:
false
,
"byChoke"
:
2
,
"minWhiteInkType"
:
0
,
"bySaturation"
:
5
,
"byBrightness"
:
5
,
"byContrast"
:
5
,
"iCyanBalance"
:
0
,
"iMagentaBalance"
:
0
,
"iBlackBalance"
:
0
,
"iYellowBalance"
:
0
,
"byMinWhite"
:
1
,
"bMultiple"
:
false
},
"production_no"
:
"CNPSC2512192256"
,
"print_time"
:
"2025-12-31 12:32:45"
,
"position_unit"
:{
"x"
:
408.8
,
"rate"
:
1.396341463414634
,
"sx"
:
0
,
"zIndex"
:
0
,
"sh"
:
0
,
"sw"
:
0
,
"sy"
:
0
,
"y"
:
458.6
,
"w"
:
594.4
,
"h"
:
826.7
,
"r"
:
0
},
"position_after_px"
:{
"x"
:
"3.4"
,
"rate"
:
1.1248941574936495
,
"sx"
:
0
,
"zIndex"
:
0
,
"sh"
:
0
,
"sw"
:
0
,
"sy"
:
0
,
"y"
:
"3.8"
,
"w"
:
"20.3"
,
"h"
:
"22.9"
,
"r"
:
0
},
"position_before_px"
:{
"url"
:
"D:
\\
work
\\
electron-printer
\\
print4.0
\\
Input
\\
1e5e1b4f-a481-4f34-9e13-09b05da5cdd3.png"
,
"fileName"
:
"1e5e1b4f-a481-4f34-9e13-09b05da5cdd3.png"
,
"rate"
:
1.1248941574936495
,
"w"
:
613.3910425291682
,
"zIndex"
:
0
,
"x"
:
102.3044787354159
,
"y"
:
115
,
"h"
:
690
,
"r"
:
0
},
"send_api_data"
:{
"printer"
:
""
,
"xy"
:
""
,
"byInk"
:
2
,
"byInkVolume"
:
1
,
"byDoublePrint"
:
3
,
"bEcoMode"
:
false
,
"bMaterialBlack"
:
false
,
"byHighlight"
:
5
,
"printNum"
:
1
,
"bFastMode"
:
false
,
"bUniPrint"
:
false
,
"bDivide"
:
false
,
"bPause"
:
false
,
"byMask"
:
3
,
"bTransColor"
:
false
,
"byChoke"
:
2
,
"minWhiteInkType"
:
0
,
"bySaturation"
:
5
,
"byBrightness"
:
5
,
"byContrast"
:
5
,
"iCyanBalance"
:
0
,
"iMagentaBalance"
:
0
,
"iBlackBalance"
:
0
,
"iYellowBalance"
:
0
,
"byMinWhite"
:
1
,
"bMultiple"
:
false
,
"byPlatenSize"
:
1
,
"cmd"
:
"GTXproCMD.exe print -X
\"
Profile
\\
1e5e1b4f-a481-4f34-9e13-09b05da5cdd3.xml
\"
-I
\"
Input
\\
1e5e1b4f-a481-4f34-9e13-09b05da5cdd3.png
\"
-A
\"
Output
\\
1e5e1b4f-a481-4f34-9e13-09b05da5cdd3.arxp
\"
-S 30363417 -L 05120574 -D 0 -W 1"
,
"fileName"
:
"1e5e1b4f-a481-4f34-9e13-09b05da5cdd3.png"
,
"print_cmd"
:
"GTXproCMD.exe send -A
\"
Output
\\
1e5e1b4f-a481-4f34-9e13-09b05da5cdd3.arxp
\"
-P
\"
Brother GTX pro FileOutput
\"
-D 1"
}},{
"head_setting"
:{
"gridShow"
:
1
,
"gridValue"
:
0
,
"unit"
:
"inch"
,
"language"
:
"cn"
,
"autoPrint"
:
false
,
"gridSpacing"
:
1
},
"version"
:
"1.0.23"
,
"print_setting"
:{
"printer"
:
""
,
"xy"
:
""
,
"byInk"
:
2
,
"byInkVolume"
:
1
,
"byDoublePrint"
:
3
,
"bEcoMode"
:
false
,
"bMaterialBlack"
:
false
,
"byHighlight"
:
5
,
"printNum"
:
1
,
"bFastMode"
:
false
,
"bUniPrint"
:
false
,
"bDivide"
:
false
,
"bPause"
:
false
,
"byMask"
:
3
,
"bTransColor"
:
false
,
"byChoke"
:
2
,
"minWhiteInkType"
:
0
,
"bySaturation"
:
5
,
"byBrightness"
:
5
,
"byContrast"
:
5
,
"iCyanBalance"
:
0
,
"iMagentaBalance"
:
0
,
"iBlackBalance"
:
0
,
"iYellowBalance"
:
0
,
"byMinWhite"
:
1
,
"bMultiple"
:
false
},
"production_no"
:
"CNPSC2512192256"
,
"print_time"
:
"2025-12-31 12:32:10"
,
"position_unit"
:{
"x"
:
408.8
,
"rate"
:
1.396341463414634
,
"sx"
:
0
,
"zIndex"
:
0
,
"sh"
:
0
,
"sw"
:
0
,
"sy"
:
0
,
"y"
:
458.6
,
"w"
:
594.4
,
"h"
:
826.7
,
"r"
:
0
},
"position_after_px"
:{
"x"
:
"3.4"
,
"rate"
:
1.1248941574936495
,
"sx"
:
0
,
"zIndex"
:
0
,
"sh"
:
0
,
"sw"
:
0
,
"sy"
:
0
,
"y"
:
"3.8"
,
"w"
:
"20.3"
,
"h"
:
"22.9"
,
"r"
:
0
},
"position_before_px"
:{
"url"
:
"D:
\\
work
\\
electron-printer
\\
print4.0
\\
Input
\\
1e5e1b4f-a481-4f34-9e13-09b05da5cdd3.png"
,
"fileName"
:
"1e5e1b4f-a481-4f34-9e13-09b05da5cdd3.png"
,
"rate"
:
1.1248941574936495
,
"w"
:
613.3910425291682
,
"zIndex"
:
0
,
"x"
:
102.3044787354159
,
"y"
:
115
,
"h"
:
690
,
"r"
:
0
},
"send_api_data"
:{
"printer"
:
""
,
"xy"
:
""
,
"byInk"
:
2
,
"byInkVolume"
:
1
,
"byDoublePrint"
:
3
,
"bEcoMode"
:
false
,
"bMaterialBlack"
:
false
,
"byHighlight"
:
5
,
"printNum"
:
1
,
"bFastMode"
:
false
,
"bUniPrint"
:
false
,
"bDivide"
:
false
,
"bPause"
:
false
,
"byMask"
:
3
,
"bTransColor"
:
false
,
"byChoke"
:
2
,
"minWhiteInkType"
:
0
,
"bySaturation"
:
5
,
"byBrightness"
:
5
,
"byContrast"
:
5
,
"iCyanBalance"
:
0
,
"iMagentaBalance"
:
0
,
"iBlackBalance"
:
0
,
"iYellowBalance"
:
0
,
"byMinWhite"
:
1
,
"bMultiple"
:
false
,
"byPlatenSize"
:
1
,
"cmd"
:
"GTXproCMD.exe print -X
\"
Profile
\\
1e5e1b4f-a481-4f34-9e13-09b05da5cdd3.xml
\"
-I
\"
Input
\\
1e5e1b4f-a481-4f34-9e13-09b05da5cdd3.png
\"
-A
\"
Output
\\
1e5e1b4f-a481-4f34-9e13-09b05da5cdd3.arxp
\"
-S 30363417 -L 05120574 -D 0 -W 1"
,
"fileName"
:
"1e5e1b4f-a481-4f34-9e13-09b05da5cdd3.png"
,
"print_cmd"
:
"GTXproCMD.exe send -A
\"
Output
\\
1e5e1b4f-a481-4f34-9e13-09b05da5cdd3.arxp
\"
-P
\"
导出为WPS PDF
\"
-D 1"
}},{
"head_setting"
:{
"gridShow"
:
1
,
"gridValue"
:
0
,
"unit"
:
"inch"
,
"language"
:
"cn"
,
"autoPrint"
:
false
,
"gridSpacing"
:
1
},
"version"
:
"1.0.23"
,
"print_setting"
:{
"printer"
:
""
,
"xy"
:
""
,
"byInk"
:
2
,
"byInkVolume"
:
1
,
"byDoublePrint"
:
3
,
"bEcoMode"
:
false
,
"bMaterialBlack"
:
false
,
"byHighlight"
:
5
,
"printNum"
:
1
,
"bFastMode"
:
false
,
"bUniPrint"
:
false
,
"bDivide"
:
false
,
"bPause"
:
false
,
"byMask"
:
3
,
"bTransColor"
:
false
,
"byChoke"
:
2
,
"minWhiteInkType"
:
0
,
"bySaturation"
:
5
,
"byBrightness"
:
5
,
"byContrast"
:
5
,
"iCyanBalance"
:
0
,
"iMagentaBalance"
:
0
,
"iBlackBalance"
:
0
,
"iYellowBalance"
:
0
,
"byMinWhite"
:
1
,
"bMultiple"
:
false
},
"production_no"
:
"CNPSC2512192256"
,
"print_time"
:
"2025-12-31 12:30:43"
,
"position_unit"
:{
"x"
:
408.8
,
"rate"
:
1.396341463414634
,
"sx"
:
0
,
"zIndex"
:
0
,
"sh"
:
0
,
"sw"
:
0
,
"sy"
:
0
,
"y"
:
458.6
,
"w"
:
594.4
,
"h"
:
826.7
,
"r"
:
0
},
"position_after_px"
:{
"x"
:
"3.4"
,
"rate"
:
1.1248941574936495
,
"sx"
:
0
,
"zIndex"
:
0
,
"sh"
:
0
,
"sw"
:
0
,
"sy"
:
0
,
"y"
:
"3.8"
,
"w"
:
"20.3"
,
"h"
:
"22.9"
,
"r"
:
0
},
"position_before_px"
:{
"url"
:
"D:
\\
work
\\
electron-printer
\\
print4.0
\\
Input
\\
0a8b8a0c-38cf-498f-983e-5edcca81ea83.png"
,
"fileName"
:
"0a8b8a0c-38cf-498f-983e-5edcca81ea83.png"
,
"rate"
:
1.1248941574936495
,
"w"
:
613.3910425291682
,
"zIndex"
:
0
,
"x"
:
102.3044787354159
,
"y"
:
115
,
"h"
:
690
,
"r"
:
0
},
"send_api_data"
:{
"printer"
:
""
,
"xy"
:
""
,
"byInk"
:
2
,
"byInkVolume"
:
1
,
"byDoublePrint"
:
3
,
"bEcoMode"
:
false
,
"bMaterialBlack"
:
false
,
"byHighlight"
:
5
,
"printNum"
:
1
,
"bFastMode"
:
false
,
"bUniPrint"
:
false
,
"bDivide"
:
false
,
"bPause"
:
false
,
"byMask"
:
3
,
"bTransColor"
:
false
,
"byChoke"
:
2
,
"minWhiteInkType"
:
0
,
"bySaturation"
:
5
,
"byBrightness"
:
5
,
"byContrast"
:
5
,
"iCyanBalance"
:
0
,
"iMagentaBalance"
:
0
,
"iBlackBalance"
:
0
,
"iYellowBalance"
:
0
,
"byMinWhite"
:
1
,
"bMultiple"
:
false
,
"byPlatenSize"
:
1
,
"cmd"
:
"GTXproCMD.exe print -X
\"
Profile
\\
0a8b8a0c-38cf-498f-983e-5edcca81ea83.xml
\"
-I
\"
Input
\\
0a8b8a0c-38cf-498f-983e-5edcca81ea83.png
\"
-A
\"
Output
\\
0a8b8a0c-38cf-498f-983e-5edcca81ea83.arxp
\"
-S 30363417 -L 05120574 -D 0 -W 1"
,
"fileName"
:
"0a8b8a0c-38cf-498f-983e-5edcca81ea83.png"
,
"print_cmd"
:
"GTXproCMD.exe send -A
\"
Output
\\
0a8b8a0c-38cf-498f-983e-5edcca81ea83.arxp
\"
-P
\"
Brother GTX pro FileOutput -D 1"
}},{
"head_setting"
:{
"gridShow"
:
1
,
"gridValue"
:
0
,
"unit"
:
"inch"
,
"language"
:
"cn"
,
"autoPrint"
:
false
,
"gridSpacing"
:
1
},
"version"
:
"1.0.23"
,
"print_setting"
:{
"printer"
:
""
,
"xy"
:
""
,
"byInk"
:
2
,
"byInkVolume"
:
1
,
"byDoublePrint"
:
3
,
"bEcoMode"
:
false
,
"bMaterialBlack"
:
false
,
"byHighlight"
:
5
,
"printNum"
:
1
,
"bFastMode"
:
false
,
"bUniPrint"
:
false
,
"bDivide"
:
false
,
"bPause"
:
false
,
"byMask"
:
3
,
"bTransColor"
:
false
,
"byChoke"
:
2
,
"minWhiteInkType"
:
0
,
"bySaturation"
:
5
,
"byBrightness"
:
5
,
"byContrast"
:
5
,
"iCyanBalance"
:
0
,
"iMagentaBalance"
:
0
,
"iBlackBalance"
:
0
,
"iYellowBalance"
:
0
,
"byMinWhite"
:
1
,
"bMultiple"
:
false
},
"production_no"
:
"CNPSC2512192256"
,
"print_time"
:
"2025-12-31 12:30:33"
,
"position_unit"
:{
"x"
:
408.8
,
"rate"
:
1.396341463414634
,
"sx"
:
0
,
"zIndex"
:
0
,
"sh"
:
0
,
"sw"
:
0
,
"sy"
:
0
,
"y"
:
458.6
,
"w"
:
594.4
,
"h"
:
826.7
,
"r"
:
0
},
"position_after_px"
:{
"x"
:
"3.4"
,
"rate"
:
1.1248941574936495
,
"sx"
:
0
,
"zIndex"
:
0
,
"sh"
:
0
,
"sw"
:
0
,
"sy"
:
0
,
"y"
:
"3.8"
,
"w"
:
"20.3"
,
"h"
:
"22.9"
,
"r"
:
0
},
"position_before_px"
:{
"url"
:
"D:
\\
work
\\
electron-printer
\\
print4.0
\\
Input
\\
0a8b8a0c-38cf-498f-983e-5edcca81ea83.png"
,
"fileName"
:
"0a8b8a0c-38cf-498f-983e-5edcca81ea83.png"
,
"rate"
:
1.1248941574936495
,
"w"
:
613.3910425291682
,
"zIndex"
:
0
,
"x"
:
102.3044787354159
,
"y"
:
115
,
"h"
:
690
,
"r"
:
0
},
"send_api_data"
:{
"printer"
:
""
,
"xy"
:
""
,
"byInk"
:
2
,
"byInkVolume"
:
1
,
"byDoublePrint"
:
3
,
"bEcoMode"
:
false
,
"bMaterialBlack"
:
false
,
"byHighlight"
:
5
,
"printNum"
:
1
,
"bFastMode"
:
false
,
"bUniPrint"
:
false
,
"bDivide"
:
false
,
"bPause"
:
false
,
"byMask"
:
3
,
"bTransColor"
:
false
,
"byChoke"
:
2
,
"minWhiteInkType"
:
0
,
"bySaturation"
:
5
,
"byBrightness"
:
5
,
"byContrast"
:
5
,
"iCyanBalance"
:
0
,
"iMagentaBalance"
:
0
,
"iBlackBalance"
:
0
,
"iYellowBalance"
:
0
,
"byMinWhite"
:
1
,
"bMultiple"
:
false
,
"byPlatenSize"
:
1
,
"cmd"
:
"GTXproCMD.exe print -X
\"
Profile
\\
0a8b8a0c-38cf-498f-983e-5edcca81ea83.xml
\"
-I
\"
Input
\\
0a8b8a0c-38cf-498f-983e-5edcca81ea83.png
\"
-A
\"
Output
\\
0a8b8a0c-38cf-498f-983e-5edcca81ea83.arxp
\"
-S 30363417 -L 05120574 -D 0 -W 1"
,
"fileName"
:
"0a8b8a0c-38cf-498f-983e-5edcca81ea83.png"
,
"print_cmd"
:
"GTXproCMD.exe send -A
\"
Output
\\
0a8b8a0c-38cf-498f-983e-5edcca81ea83.arxp
\"
-P
\"
导出为WPS PDF -D 1"
}},{
"head_setting"
:{
"gridShow"
:
1
,
"gridValue"
:
0
,
"unit"
:
"inch"
,
"language"
:
"cn"
,
"autoPrint"
:
false
,
"gridSpacing"
:
1
},
"version"
:
"1.0.23"
,
"print_setting"
:{
"printer"
:
""
,
"xy"
:
""
,
"byInk"
:
2
,
"byInkVolume"
:
1
,
"byDoublePrint"
:
3
,
"bEcoMode"
:
false
,
"bMaterialBlack"
:
false
,
"byHighlight"
:
5
,
"printNum"
:
1
,
"bFastMode"
:
false
,
"bUniPrint"
:
false
,
"bDivide"
:
false
,
"bPause"
:
false
,
"byMask"
:
3
,
"bTransColor"
:
false
,
"byChoke"
:
2
,
"minWhiteInkType"
:
0
,
"bySaturation"
:
5
,
"byBrightness"
:
5
,
"byContrast"
:
5
,
"iCyanBalance"
:
0
,
"iMagentaBalance"
:
0
,
"iBlackBalance"
:
0
,
"iYellowBalance"
:
0
,
"byMinWhite"
:
1
,
"bMultiple"
:
false
},
"production_no"
:
"CNPSC2512192256"
,
"print_time"
:
"2025-12-31 12:05:14"
,
"position_unit"
:{
"x"
:
408.8
,
"rate"
:
1.396341463414634
,
"sx"
:
0
,
"zIndex"
:
0
,
"sh"
:
0
,
"sw"
:
0
,
"sy"
:
0
,
"y"
:
458.6
,
"w"
:
594.4
,
"h"
:
826.7
,
"r"
:
0
},
"position_after_px"
:{
"x"
:
"3.4"
,
"rate"
:
1.1248941574936495
,
"sx"
:
0
,
"zIndex"
:
0
,
"sh"
:
0
,
"sw"
:
0
,
"sy"
:
0
,
"y"
:
"3.8"
,
"w"
:
"20.3"
,
"h"
:
"22.9"
,
"r"
:
0
},
"position_before_px"
:{
"url"
:
"D:
\\
work
\\
electron-printer
\\
print4.0
\\
Input
\\
63360d8e-8359-480d-9454-947ffb08dc5c.png"
,
"fileName"
:
"63360d8e-8359-480d-9454-947ffb08dc5c.png"
,
"rate"
:
1.1248941574936495
,
"w"
:
613.3910425291682
,
"zIndex"
:
0
,
"x"
:
102.3044787354159
,
"y"
:
115
,
"h"
:
690
,
"r"
:
0
},
"send_api_data"
:{
"printer"
:
""
,
"xy"
:
""
,
"byInk"
:
2
,
"byInkVolume"
:
1
,
"byDoublePrint"
:
3
,
"bEcoMode"
:
false
,
"bMaterialBlack"
:
false
,
"byHighlight"
:
5
,
"printNum"
:
1
,
"bFastMode"
:
false
,
"bUniPrint"
:
false
,
"bDivide"
:
false
,
"bPause"
:
false
,
"byMask"
:
3
,
"bTransColor"
:
false
,
"byChoke"
:
2
,
"minWhiteInkType"
:
0
,
"bySaturation"
:
5
,
"byBrightness"
:
5
,
"byContrast"
:
5
,
"iCyanBalance"
:
0
,
"iMagentaBalance"
:
0
,
"iBlackBalance"
:
0
,
"iYellowBalance"
:
0
,
"byMinWhite"
:
1
,
"bMultiple"
:
false
,
"byPlatenSize"
:
1
,
"cmd"
:
"GTXproCMD.exe print -X
\"
Profile
\\
63360d8e-8359-480d-9454-947ffb08dc5c.xml
\"
-I
\"
Input
\\
63360d8e-8359-480d-9454-947ffb08dc5c.png
\"
-A
\"
Output
\\
63360d8e-8359-480d-9454-947ffb08dc5c.arxp
\"
-S 30363417 -L 05120574 -D 0 -W 1"
,
"fileName"
:
"63360d8e-8359-480d-9454-947ffb08dc5c.png"
,
"print_cmd"
:
"GTXproCMD.exe send -A
\"
Output
\\
63360d8e-8359-480d-9454-947ffb08dc5c.arxp
\"
-P
\"
Brother GTX pro FileOutput"
}}]
\ No newline at end of file
print/send.bat
View file @
a327daff
GTXproCMD.exe send -A "
D:\sample\
Output\pO12.arxp" -P "Brother GTX pro" -D 1
GTXproCMD.exe send -A "Output\pO12.arxp" -P "Brother GTX pro" -D 1
echo %errorlevel%
\ No newline at end of file
src/background.js
View file @
a327daff
...
...
@@ -7,7 +7,7 @@ import { autoUpdater } from "electron-updater";
import
path
from
"path"
;
// 引入 path 模块
const
{
exec
}
=
require
(
"child_process"
);
const
{
setVersion
}
=
require
(
"@/server/utils/store"
);
const
{
setVersion
,
setDeleteSetting
}
=
require
(
"@/server/utils/store"
);
Object
.
defineProperty
(
app
,
"isPackaged"
,
{
get
()
{
...
...
@@ -202,6 +202,11 @@ app.on("ready", async () => {
setVersion
(
version
);
// 保存到 electron-store
});
ipcMain
.
on
(
"update-deleteSetting"
,
(
_
,
version
)
=>
{
console
.
log
(
72
,
version
);
setDeleteSetting
(
version
);
// 保存到 electron-store
});
});
app
.
on
(
"will-quit"
,
()
=>
{
...
...
src/server/utils/index.js
View file @
a327daff
...
...
@@ -144,6 +144,13 @@ export const downloadImage = (list) => {
fs
.
mkdirSync
(
dirPath
,
{
recursive
:
true
});
}
try
{
await
fs
.
promises
.
access
(
dirPath
,
fs
.
constants
.
W_OK
);
}
catch
(
error
)
{
console
.
error
(
"没有目录写入权限:"
,
dirPath
);
// return reject(new Error('没有写入权限'));
}
// 过滤出有效的下载项
const
downloadItems
=
list
.
filter
(
(
item
)
=>
item
.
url
&&
item
.
url
.
includes
(
"http"
)
...
...
@@ -153,6 +160,7 @@ export const downloadImage = (list) => {
if
(
downloadItems
.
length
===
0
)
{
return
resolve
(
list
);
}
// 检查写入权限
// 并行处理所有下载
const
downloadPromises
=
downloadItems
.
map
((
item
)
=>
{
...
...
@@ -205,7 +213,16 @@ export const downloadImage = (list) => {
if
(
isArchive
)
{
// 处理压缩文件
item
.
list
=
await
zip
(
filePath
,
dirPath
);
try
{
// 添加await确保异步完成
const
result
=
await
zip
(
filePath
,
dirPath
);
// 显式赋值,确保引用正确
item
.
list
=
result
||
[];
console
.
log
(
"解压完成,文件数量:"
,
item
.
list
.
length
);
}
catch
(
zipError
)
{
console
.
error
(
"解压失败:"
,
zipError
);
item
.
list
=
[];
}
}
else
{
// 处理普通图片文件
if
(
!
item
.
list
)
item
.
list
=
[];
...
...
src/server/utils/store.js
View file @
a327daff
...
...
@@ -5,7 +5,11 @@ module.exports = {
setVersion
:
(
version
)
=>
{
store
.
set
(
"desktoVersion"
,
version
);
},
setDeleteSetting
:
(
setting
)
=>
{
store
.
set
(
"deleteSetting"
,
setting
);
},
getVersion
:
()
=>
store
.
get
(
"desktoVersion"
)
||
"print"
,
getDeleteSetting
:
()
=>
store
.
get
(
"deleteSetting"
)
||
"0"
,
setBoard
:
(
version
)
=>
{
store
.
set
(
"desktoBoard"
,
version
);
console
.
log
(
"store"
,
store
.
get
(
"desktoBoard"
));
...
...
src/views/design/head/index.vue
View file @
a327daff
...
...
@@ -12,7 +12,7 @@ import { extractValue } from "@/utils/index.js";
const
uuid
=
require
(
"uuid"
);
const
fs
=
require
(
"fs"
);
import
{
mapState
}
from
"vuex"
;
const
{
getVersion
}
=
require
(
"@/server/utils/store"
);
const
{
getVersion
,
getDeleteSetting
}
=
require
(
"@/server/utils/store"
);
export
default
{
components
:
{
UpdateDialog
},
...
...
@@ -31,6 +31,7 @@ export default {
checkList
:
[],
desktopDevice
:
1
,
desktoVersion
:
getVersion
(),
deleteSetting
:
getDeleteSetting
(),
checked
:
false
,
isFirst
:
true
,
cacheList
:
[
...
...
@@ -621,6 +622,24 @@ export default {
this.$store.commit("
getNewGrid
");
this.command(0);
},
changeDeleteSetting(value) {
const oldValue = this.deleteSetting; // 缓存旧值
console.log(626, oldValue);
// this.$confirm("
选择该操作打印后会导致打印记录清空,是否继续?
", "
警告
", {
// confirmButtonText: "
确定
",
// cancelButtonText: "
取消
",
// type: "
warning
",
// })
// .then(() => {
// ipcRenderer.send("
update
-
deleteSetting
", value);
// })
// .catch(() => {
// this.deleteSetting = oldValue;
// });
ipcRenderer.send("
update
-
deleteSetting
", value);
// console.log(626, this.deleteSetting);
},
async cutImgFn(arr) {
if (!arr.length) return arr;
console.log(arr);
...
...
@@ -717,6 +736,7 @@ export default {
.left-btn
{
display
:
flex
;
flex
:
1
;
}
</
style
>
<
template
>
...
...
@@ -727,6 +747,7 @@ export default {
<div>
设备类型:
</div>
<el-select
class=
"selectItem"
v-model=
"desktopDevice"
@
change=
"changeDesktopDeviceFn"
placeholder=
"请选择设备类型"
...
...
@@ -735,10 +756,12 @@ export default {
<el-option
label=
"其他"
:value=
"2"
></el-option>
</el-select>
</div>
<div
class=
"selectInput"
>
<div>
驱动版本:
</div>
<el-select
class=
"selectItem"
v-model=
"desktoVersion"
@
change=
"changeDesktoVersionFn"
placeholder=
"请选择版本"
...
...
@@ -748,8 +771,25 @@ export default {
<el-option
label=
"600"
value=
"print600"
></el-option>
</el-select>
</div>
<div
class=
"selectInput"
>
<div>
删除模式:
</div>
<el-dropdown
trigger=
"click"
@
command=
"command"
:hide-on-click=
"false"
>
<el-select
class=
"selectDelete"
v-model=
"deleteSetting"
@
change=
"changeDeleteSetting"
placeholder=
"请选择"
>
<el-option
label=
"自动删除打印素材(打印后)"
value=
"1"
></el-option>
<el-option
label=
"保留打印素材(打印后)"
value=
"0"
></el-option>
</el-select>
</div>
<el-dropdown
class=
"selectInput"
trigger=
"click"
@
command=
"command"
:hide-on-click=
"false"
>
<el-button
style=
"height: 100%;margin-right: 0"
size=
"small"
>
{{
grid
[
selectGridIndex
]?.
label
}}
</el-button>
...
...
@@ -760,7 +800,7 @@ export default {
</el-dropdown-menu>
</el-dropdown>
<el-tooltip
content=
"图片"
>
<el-tooltip
c
lass=
"selectInput"
c
ontent=
"图片"
>
<el-upload
accept=
".png"
action=
""
...
...
@@ -769,7 +809,7 @@ export default {
:before-upload=
"uploadImage"
style=
"height: 100%;"
>
<el-button
style=
"height: 100%
;margin:0 8px
"
size=
"small"
>
<el-button
style=
"height: 100%"
size=
"small"
>
<i
class=
"el-icon-picture"
style=
"font-size: 15px;"
></i>
</el-button>
</el-upload>
...
...
@@ -792,7 +832,7 @@ export default {
trigger=
"click"
placement=
"bottom"
>
<div
class=
"setting-form"
>
<div
class=
"setting-form
selectInput
"
>
<el-form
:model=
"setting"
label-position=
"left"
...
...
@@ -902,20 +942,19 @@ export default {
type=
"success"
>
生产完成
</el-button>
<div
class=
"check"
>
<el-checkbox
v-model=
"isAutoFinish"
>
自动完成上一单
</el-checkbox>
</div>
</div>
<div
style=
"margin-left:
10
px;"
>
<el-checkbox
v-model=
"
checked"
>
自动裁切素材
</el-checkbox>
<div
style=
"margin-left:
8
px;"
>
<el-checkbox
v-model=
"
isAutoFinish"
>
自动完成上一单
</el-checkbox>
</div>
<el-button
<div
style=
"margin-left: 8px;"
>
<el-checkbox
v-model=
"checked"
>
自动裁切
</el-checkbox>
</div>
<!--
<el-button
@
click=
"downloadImage"
size=
"medium"
style=
"margin-left: 15px"
style=
"margin-left: 8px"
type=
"primary"
>
下载素材
</el-button>
</el-button>
-->
</div>
<div
class=
"right-user"
>
<div
...
...
@@ -1019,28 +1058,28 @@ export default {
.
center
-
input
{
display
:
flex
;
align
-
items
:
center
;
justify
-
content
:
center
;
//
justify-content: center;
flex
:
1
;
flex
-
shrink
:
0
;
overflow
:
hidden
;
padding
-
left
:
100
px
;
//
padding-left: 100px;
}
.
sure
-
btn
{
width
:
30
0
px
;
// width: 25
0px;
position
:
relative
;
display
:
flex
;
align
-
items
:
center
;
justify
-
content
:
center
;
::
v
-
deep
{
.
el
-
button
{
span
{
position
:
relative
;
left
:
-
40
px
;
}
}
}
//
::v-deep
{
//
.el-button
{
//
span
{
//
position: relative;
//
left: -40px;
//
}
//
}
//
}
}
.
check
{
...
...
@@ -1065,12 +1104,15 @@ export default {
.
selectInput
{
display
:
flex
;
align
-
items
:
center
;
margin
:
0
10
px
;
margin
-
right
:
5
px
;
font
-
size
:
14
px
;
::
v
-
deep
{
.
el
-
select
.
el
-
input
{
.
selectItem
.
el
-
input
{
max
-
width
:
80
px
;
}
.
selectDelete
.
el
-
input
{
max
-
width
:
110
px
;
}
}
}
::
v
-
deep
{
...
...
src/views/design/head/printDialog.vue
View file @
a327daff
...
...
@@ -7,7 +7,7 @@ import moment from "moment";
import
pkg
from
"../../../../package.json"
;
import
{
pxToUnit
}
from
"../../../utils/index"
;
import
{
mapState
}
from
"vuex"
;
const
{
getVersion
}
=
require
(
"@/server/utils/store"
);
const
{
getVersion
,
getDeleteSetting
}
=
require
(
"@/server/utils/store"
);
export
default
{
data
()
{
return
{
...
...
@@ -434,7 +434,7 @@ export default {
let
print_cmd
=
`
${
printCmd
}
send -A "Output\\
${
imgFileName
.
replace
(
".png"
,
""
)}
.arxp" -P "
${
this
.
printer
}
`
;
)}
.arxp" -P "
${
this
.
printer
}
" -D
${
getDeleteSetting
()}
`
;
let
data
=
{
...
this
.
printSetting
,
...{
...
...
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