Commit 71d60c1a by linjinhong

feat:添加600SC驱动兼容

parent 8163590c
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "JomallProductionAssistant", "name": "JomallProductionAssistant",
"productName": "JomallProductionAssistant", "productName": "JomallProductionAssistant",
"description": "", "description": "",
"version": "1.0.32", "version": "1.0.33",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
......
<?xml version="1.0" encoding="utf-8"?>
<GTOPTION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<szFileName />
<uiCopies>1</uiCopies>
<byPlatenSize>5</byPlatenSize>
<bEcoMode>false</bEcoMode>
<byInk>2</byInk>
<bMaterialBlack>false</bMaterialBlack>
<bMultiple>false</bMultiple>
<byHighlight>5</byHighlight>
<byMask>3</byMask>
<bFastMode>false</bFastMode>
<bDivide>false</bDivide>
<bPause>false</bPause>
<bTransColor>false</bTransColor>
<byChoke>2</byChoke>
<byMinWhite>1</byMinWhite>
<bySaturation>5</bySaturation>
<byBrightness>5</byBrightness>
<byContrast>5</byContrast>
<iCyanBalance>0</iCyanBalance>
<bUniPrint>false</bUniPrint>
<iMagentaBalance>0</iMagentaBalance>
<iYellowBalance>0</iYellowBalance>
<iBlackBalance>0</iBlackBalance>
<byResolution>1</byResolution>
</GTOPTION>
\ No newline at end of file
GTX6SPCMD.exe print -X "Profile\CO12.xml" -I "Input\sample.png" -A "Output\pO12.arxp" -S 01000200 -L 02540254
echo %errorlevel%
\ No newline at end of file
GTX6SPCMD.exe print -X "Profile\CO12.xml" -I "Input\sample.png" -A "Output\pO12.arxp" -S 01000200 -L 02540254
echo %errorlevel%
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<GTOPTION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<szFileName />
<uiCopies>1</uiCopies>
<byPlatenSize>1</byPlatenSize>
<bMultiple>1</bMultiple>
<byResolution>1</byResolution>
<byInk>1</byInk>
<byInkVolume>1</byInkVolume>
<byDoublePrint>1</byDoublePrint>
<bySaturation>1</bySaturation>
<byBrightness>1</byBrightness>
<byContrast>1</byContrast>
<iCyanBalance>1</iCyanBalance>
<iMagentaBalance>1</iMagentaBalance>
<iYellowBalance>1</iYellowBalance>
<iBlackBalance>1</iBlackBalance>
<bUniPrint>1</bUniPrint>
</GTOPTION>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<GTOPTION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<szFileName />
<uiCopies>1</uiCopies>
<byPlatenSize>1</byPlatenSize>
<bEcoMode>false</bEcoMode>
<byInk>2</byInk>
<bMaterialBlack>false</bMaterialBlack>
<bMultiple>false</bMultiple>
<byHighlight>5</byHighlight>
<byMask>3</byMask>
<bFastMode>false</bFastMode>
<bDivide>false</bDivide>
<bPause>false</bPause>
<bTransColor>false</bTransColor>
<byChoke>2</byChoke>
<byMinWhite>1</byMinWhite>
<bySaturation>5</bySaturation>
<byBrightness>5</byBrightness>
<byContrast>5</byContrast>
<iCyanBalance>0</iCyanBalance>
<bUniPrint>false</bUniPrint>
<iMagentaBalance>0</iMagentaBalance>
<iYellowBalance>0</iYellowBalance>
<iBlackBalance>0</iBlackBalance>
<byResolution>1</byResolution>
</GTOPTION>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<GTOPTION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<szFileName />
<uiCopies>1</uiCopies>
<byPlatenSize>1</byPlatenSize>
<byHighlight>1</byHighlight>
<byMask>1</byMask>
<bDivide>1</bDivide>
<bTransColor>1</bTransColor>
<bySaturation>1</bySaturation>
<byBrightness>1</byBrightness>
<byContrast>1</byContrast>
<bUniPrint>1</bUniPrint>
<byResolution>1</byResolution>
<byInk>1</byInk>
</GTOPTION>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<GTOPTION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<szFileName />
<uiCopies>1</uiCopies>
<byPlatenSize>1</byPlatenSize>
<bEcoMode>false</bEcoMode>
<byInk>2</byInk>
<bMaterialBlack>false</bMaterialBlack>
<bMultiple>false</bMultiple>
<byHighlight>5</byHighlight>
<byMask>3</byMask>
<bFastMode>false</bFastMode>
<bDivide>false</bDivide>
<bPause>false</bPause>
<bTransColor>false</bTransColor>
<byChoke>2</byChoke>
<byMinWhite>1</byMinWhite>
<bySaturation>5</bySaturation>
<byBrightness>5</byBrightness>
<byContrast>5</byContrast>
<iCyanBalance>0</iCyanBalance>
<bUniPrint>false</bUniPrint>
<iMagentaBalance>0</iMagentaBalance>
<iYellowBalance>0</iYellowBalance>
<iBlackBalance>0</iBlackBalance>
<byResolution>1</byResolution>
</GTOPTION>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<GTOPTION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<szFileName />
<uiCopies>1</uiCopies>
<byPlatenSize>1</byPlatenSize>
<bEcoMode>1</bEcoMode>
<byInk>1</byInk>
<bMaterialBlack>1</bMaterialBlack>
<bMultiple>1</bMultiple>
<byHighlight>1</byHighlight>
<byMask>1</byMask>
<bFastMode>1</bFastMode>
<bDivide>1</bDivide>
<bPause>1</bPause>
<bTransColor>1</bTransColor>
<byChoke>1</byChoke>
<byMinWhite>1</byMinWhite>
<bySaturation>1</bySaturation>
<byBrightness>1</byBrightness>
<byContrast>1</byContrast>
<iCyanBalance>1</iCyanBalance>
<bUniPrint>1</bUniPrint>
<iMagentaBalance>1</iMagentaBalance>
<iYellowBalance>1</iYellowBalance>
<iBlackBalance>1</iBlackBalance>
<byResolution>1</byResolution>
</GTOPTION>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<GTOPTION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<szFileName />
<uiCopies>1</uiCopies>
<byPlatenSize>0</byPlatenSize>
<bEcoMode>false</bEcoMode>
<byInk>2</byInk>
<bMaterialBlack>false</bMaterialBlack>
<bMultiple>false</bMultiple>
<byHighlight>5</byHighlight>
<byMask>3</byMask>
<bFastMode>false</bFastMode>
<bDivide>false</bDivide>
<bPause>false</bPause>
<bTransColor>false</bTransColor>
<byChoke>2</byChoke>
<byMinWhite>1</byMinWhite>
<bySaturation>5</bySaturation>
<byBrightness>5</byBrightness>
<byContrast>5</byContrast>
<iCyanBalance>0</iCyanBalance>
<bUniPrint>false</bUniPrint>
<iMagentaBalance>0</iMagentaBalance>
<iYellowBalance>0</iYellowBalance>
<iBlackBalance>0</iBlackBalance>
<byResolution>1</byResolution>
</GTOPTION>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<GTOPTION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<szFileName />
<uiCopies>1</uiCopies>
<byPlatenSize>1</byPlatenSize>
<byResolution>1</byResolution>
<byInk>1</byInk>
<bMultiple>1</bMultiple>
<byInkVolume>1</byInkVolume>
<byDoublePrint>1</byDoublePrint>
<bySaturation>1</bySaturation>
<byBrightness>1</byBrightness>
<byContrast>1</byContrast>
<iBlackBalance>1</iBlackBalance>
<bUniPrint>1</bUniPrint>
</GTOPTION>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<GTOPTION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<szFileName />
<uiCopies>1</uiCopies>
<byPlatenSize>1</byPlatenSize>
<bEcoMode>false</bEcoMode>
<byInk>2</byInk>
<bMaterialBlack>false</bMaterialBlack>
<bMultiple>false</bMultiple>
<byHighlight>5</byHighlight>
<byMask>3</byMask>
<bFastMode>false</bFastMode>
<bDivide>false</bDivide>
<bPause>false</bPause>
<bTransColor>false</bTransColor>
<byChoke>2</byChoke>
<byMinWhite>1</byMinWhite>
<bySaturation>5</bySaturation>
<byBrightness>5</byBrightness>
<byContrast>5</byContrast>
<iCyanBalance>0</iCyanBalance>
<bUniPrint>false</bUniPrint>
<iMagentaBalance>0</iMagentaBalance>
<iYellowBalance>0</iYellowBalance>
<iBlackBalance>0</iBlackBalance>
<byResolution>1</byResolution>
</GTOPTION>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<GTOPTION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<szFileName />
<uiCopies>1</uiCopies>
<byPlatenSize>4</byPlatenSize>
<bEcoMode>false</bEcoMode>
<byInk>2</byInk>
<bMaterialBlack>false</bMaterialBlack>
<bMultiple>false</bMultiple>
<byHighlight>5</byHighlight>
<byMask>3</byMask>
<bFastMode>false</bFastMode>
<bDivide>false</bDivide>
<bPause>false</bPause>
<bTransColor>false</bTransColor>
<byChoke>2</byChoke>
<byMinWhite>1</byMinWhite>
<bySaturation>5</bySaturation>
<byBrightness>5</byBrightness>
<byContrast>5</byContrast>
<iCyanBalance>0</iCyanBalance>
<bUniPrint>false</bUniPrint>
<iMagentaBalance>0</iMagentaBalance>
<iYellowBalance>0</iYellowBalance>
<iBlackBalance>0</iBlackBalance>
<byResolution>1</byResolution>
</GTOPTION>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<GTOPTION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<szFileName />
<uiCopies>1</uiCopies>
<byPlatenSize>1</byPlatenSize>
<bEcoMode>false</bEcoMode>
<byInk>2</byInk>
<bMaterialBlack>false</bMaterialBlack>
<bMultiple>false</bMultiple>
<byHighlight>5</byHighlight>
<byMask>3</byMask>
<bFastMode>false</bFastMode>
<bDivide>false</bDivide>
<bPause>false</bPause>
<bTransColor>false</bTransColor>
<byChoke>2</byChoke>
<byMinWhite>1</byMinWhite>
<bySaturation>5</bySaturation>
<byBrightness>5</byBrightness>
<byContrast>5</byContrast>
<iCyanBalance>0</iCyanBalance>
<bUniPrint>false</bUniPrint>
<iMagentaBalance>0</iMagentaBalance>
<iYellowBalance>0</iYellowBalance>
<iBlackBalance>0</iBlackBalance>
<byResolution>1</byResolution>
</GTOPTION>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<GTOPTION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<szFileName />
<uiCopies>1</uiCopies>
<byPlatenSize>1</byPlatenSize>
<bEcoMode>false</bEcoMode>
<byInk>2</byInk>
<bMaterialBlack>false</bMaterialBlack>
<bMultiple>false</bMultiple>
<byHighlight>5</byHighlight>
<byMask>3</byMask>
<bFastMode>false</bFastMode>
<bDivide>false</bDivide>
<bPause>false</bPause>
<bTransColor>false</bTransColor>
<byChoke>2</byChoke>
<byMinWhite>1</byMinWhite>
<bySaturation>5</bySaturation>
<byBrightness>5</byBrightness>
<byContrast>5</byContrast>
<iCyanBalance>0</iCyanBalance>
<bUniPrint>false</bUniPrint>
<iMagentaBalance>0</iMagentaBalance>
<iYellowBalance>0</iYellowBalance>
<iBlackBalance>0</iBlackBalance>
<byResolution>1</byResolution>
</GTOPTION>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<GTOPTION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<szFileName />
<uiCopies>1</uiCopies>
<byPlatenSize>4</byPlatenSize>
<bEcoMode>false</bEcoMode>
<byInk>2</byInk>
<bMaterialBlack>false</bMaterialBlack>
<bMultiple>false</bMultiple>
<byHighlight>5</byHighlight>
<byMask>3</byMask>
<bFastMode>false</bFastMode>
<bDivide>false</bDivide>
<bPause>false</bPause>
<bTransColor>false</bTransColor>
<byChoke>2</byChoke>
<byMinWhite>1</byMinWhite>
<bySaturation>5</bySaturation>
<byBrightness>5</byBrightness>
<byContrast>5</byContrast>
<iCyanBalance>0</iCyanBalance>
<bUniPrint>false</bUniPrint>
<iMagentaBalance>0</iMagentaBalance>
<iYellowBalance>0</iYellowBalance>
<iBlackBalance>0</iBlackBalance>
<byResolution>1</byResolution>
</GTOPTION>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<GTOPTION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<szFileName />
<uiCopies>1</uiCopies>
<byPlatenSize>1</byPlatenSize>
<bEcoMode>false</bEcoMode>
<byInk>2</byInk>
<bMaterialBlack>false</bMaterialBlack>
<bMultiple>false</bMultiple>
<byHighlight>5</byHighlight>
<byMask>3</byMask>
<bFastMode>false</bFastMode>
<bDivide>false</bDivide>
<bPause>false</bPause>
<bTransColor>false</bTransColor>
<byChoke>2</byChoke>
<byMinWhite>1</byMinWhite>
<bySaturation>5</bySaturation>
<byBrightness>5</byBrightness>
<byContrast>5</byContrast>
<iCyanBalance>0</iCyanBalance>
<bUniPrint>false</bUniPrint>
<iMagentaBalance>0</iMagentaBalance>
<iYellowBalance>0</iYellowBalance>
<iBlackBalance>0</iBlackBalance>
<byResolution>1</byResolution>
</GTOPTION>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<GTOPTION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<szFileName />
<uiCopies>1</uiCopies>
<byPlatenSize>4</byPlatenSize>
<bEcoMode>false</bEcoMode>
<byInk>2</byInk>
<bMaterialBlack>false</bMaterialBlack>
<bMultiple>false</bMultiple>
<byHighlight>5</byHighlight>
<byMask>3</byMask>
<bFastMode>false</bFastMode>
<bDivide>false</bDivide>
<bPause>false</bPause>
<bTransColor>false</bTransColor>
<byChoke>2</byChoke>
<byMinWhite>1</byMinWhite>
<bySaturation>5</bySaturation>
<byBrightness>5</byBrightness>
<byContrast>5</byContrast>
<iCyanBalance>0</iCyanBalance>
<bUniPrint>false</bUniPrint>
<iMagentaBalance>0</iMagentaBalance>
<iYellowBalance>0</iYellowBalance>
<iBlackBalance>0</iBlackBalance>
<byResolution>1</byResolution>
</GTOPTION>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<GTOPTION xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<szFileName />
<uiCopies>1</uiCopies>
<byPlatenSize>4</byPlatenSize>
<bEcoMode>false</bEcoMode>
<byInk>2</byInk>
<bMaterialBlack>false</bMaterialBlack>
<bMultiple>false</bMultiple>
<byHighlight>5</byHighlight>
<byMask>3</byMask>
<bFastMode>false</bFastMode>
<bDivide>false</bDivide>
<bPause>false</bPause>
<bTransColor>false</bTransColor>
<byChoke>2</byChoke>
<byMinWhite>1</byMinWhite>
<bySaturation>5</bySaturation>
<byBrightness>5</byBrightness>
<byContrast>5</byContrast>
<iCyanBalance>0</iCyanBalance>
<bUniPrint>false</bUniPrint>
<iMagentaBalance>0</iMagentaBalance>
<iYellowBalance>0</iYellowBalance>
<iBlackBalance>0</iBlackBalance>
<byResolution>1</byResolution>
</GTOPTION>
\ No newline at end of file
GTX6SPCMD.exe print -X "Profile\CO12.xml" -I "Input\sample.png" -A "Output\pO12.arxp" -S 01000200 -L 02540254
echo %errorlevel%
\ No newline at end of file
GTX6SPCMD.exe send -A "D:\sample\Output\pO12.arxp" -P "Brother GTX pro" -D 1
echo %errorlevel%
\ No newline at end of file
...@@ -7,7 +7,7 @@ const defaultSetting = { ...@@ -7,7 +7,7 @@ const defaultSetting = {
language: "cn", language: "cn",
gridValue: 0, gridValue: 0,
autoPrint: false, autoPrint: false,
gridSpacing: "10mm", gridSpacing: "10mm"
}; };
export default new Vuex.Store({ export default new Vuex.Store({
state: { state: {
...@@ -17,8 +17,8 @@ export default new Vuex.Store({ ...@@ -17,8 +17,8 @@ export default new Vuex.Store({
productDetail: {}, productDetail: {},
windowWH: { width: 0, height: 0 }, windowWH: { width: 0, height: 0 },
desktopDevice: 1, //1是兄弟,2是其他 desktopDevice: 1, //1是兄弟,2是其他
desktoVersion: getVersion() || "print", //print2.0是2.0,print4.0是4.0 print600是600 desktoVersion: getVersion() || "print", //print2.0是2.0,print4.0是4.0 print600是600 print600SC是600SC
orderType: "GC", //GC是POD,CN是PODCN US是PODUS orderType: "GC", //GC是POD,CN是PODCN US是PODUS OP是操作单
WHproportion: 1, //宽高比例 WHproportion: 1, //宽高比例
defaultProportion: 1, defaultProportion: 1,
isPreView: false, isPreView: false,
...@@ -30,7 +30,7 @@ export default new Vuex.Store({ ...@@ -30,7 +30,7 @@ export default new Vuex.Store({
unit: "mm", unit: "mm",
language: "cn", language: "cn",
autoPrint: false, autoPrint: false,
gridSpacing: 10, gridSpacing: 10
}, },
defaultGrid: [ defaultGrid: [
{ {
...@@ -39,7 +39,7 @@ export default new Vuex.Store({ ...@@ -39,7 +39,7 @@ export default new Vuex.Store({
row: 16, row: 16,
col: 18, col: 18,
h: 0, h: 0,
w: 0, w: 0
}, },
{ {
label: "16×21", label: "16×21",
...@@ -47,7 +47,7 @@ export default new Vuex.Store({ ...@@ -47,7 +47,7 @@ export default new Vuex.Store({
row: 16, row: 16,
col: 21, col: 21,
h: 0, h: 0,
w: 0, w: 0
}, },
{ {
label: "7×8", label: "7×8",
...@@ -55,7 +55,7 @@ export default new Vuex.Store({ ...@@ -55,7 +55,7 @@ export default new Vuex.Store({
row: 7, row: 7,
col: 8, col: 8,
h: 0, h: 0,
w: 0, w: 0
}, },
{ {
label: "10×12", label: "10×12",
...@@ -63,7 +63,7 @@ export default new Vuex.Store({ ...@@ -63,7 +63,7 @@ export default new Vuex.Store({
value: 3, value: 3,
col: 12, col: 12,
h: 0, h: 0,
w: 0, w: 0
}, },
{ {
label: "14×16", label: "14×16",
...@@ -71,7 +71,7 @@ export default new Vuex.Store({ ...@@ -71,7 +71,7 @@ export default new Vuex.Store({
value: 2, value: 2,
col: 16, col: 16,
h: 0, h: 0,
w: 0, w: 0
}, },
{ {
label: "40×50", label: "40×50",
...@@ -80,10 +80,10 @@ export default new Vuex.Store({ ...@@ -80,10 +80,10 @@ export default new Vuex.Store({
col: 50, col: 50,
h: 0, h: 0,
w: 0, w: 0,
disabled: true, disabled: true
}, }
], ],
grid: [], grid: []
}, },
mutations: { mutations: {
setDefaultSetting(state) { setDefaultSetting(state) {
...@@ -127,15 +127,8 @@ export default new Vuex.Store({ ...@@ -127,15 +127,8 @@ export default new Vuex.Store({
return (state.grid = [arr]); return (state.grid = [arr]);
} }
let proportion = state.WHproportion; let proportion = state.WHproportion;
console.log(130, proportion); state.grid.forEach(el => {
state.grid.forEach((el) => {
if (el.value == 0) { if (el.value == 0) {
// if (state.defaultProportion == 1.5) {
// proportion = 1.4;
// } else if (state.defaultProportion == 1.7) {
// proportion = 1.4;
// }
el.h = 630 * proportion; el.h = 630 * proportion;
el.w = 480 * proportion; el.w = 480 * proportion;
} else if (el.value == 1) { } else if (el.value == 1) {
...@@ -179,7 +172,7 @@ export default new Vuex.Store({ ...@@ -179,7 +172,7 @@ export default new Vuex.Store({
row: 18, row: 18,
col: 22, col: 22,
h: 0, h: 0,
w: 0, w: 0
}, },
{ {
label: "24×24", label: "24×24",
...@@ -187,13 +180,64 @@ export default new Vuex.Store({ ...@@ -187,13 +180,64 @@ export default new Vuex.Store({
row: 24, row: 24,
col: 24, col: 24,
h: 0, h: 0,
w: 0, w: 0
}
];
} else if (state.desktoVersion == "print600SC") {
state.grid = [
{
label: "16×18",
value: 1,
row: 16,
col: 18,
h: 0,
w: 0
},
{
label: "14×16",
row: 14,
value: 2,
col: 16,
h: 0,
w: 0
},
{
label: "7×8",
value: 4,
row: 7,
col: 8,
h: 0,
w: 0
}, },
{
label: "10×12",
row: 10,
value: 3,
col: 12,
h: 0,
w: 0
},
{
label: "24×24",
value: 5,
row: 24,
col: 24,
h: 0,
w: 0
},
{
label: "18×22",
value: 6,
row: 18,
col: 22,
h: 0,
w: 0
}
]; ];
} else { } else {
state.grid = [...state.defaultGrid]; state.grid = [...state.defaultGrid];
} }
}, }
}, },
getters: { getters: {
systemSetting(state) { systemSetting(state) {
...@@ -202,9 +246,9 @@ export default new Vuex.Store({ ...@@ -202,9 +246,9 @@ export default new Vuex.Store({
getActionList(state) { getActionList(state) {
return state.actionList; return state.actionList;
}, },
getActionIndex: (state) => state.actionIndex, getActionIndex: state => state.actionIndex,
imgList: (state) => state.imgList, imgList: state => state.imgList
}, },
actions: {}, actions: {},
modules: {}, modules: {}
}); });
...@@ -24,17 +24,17 @@ export default { ...@@ -24,17 +24,17 @@ export default {
settingName: "", settingName: "",
printInkList: [ printInkList: [
{ {
label: "仅彩色油墨", label: "仅彩色油墨"
}, },
{ {
label: "仅白色油墨", label: "仅白色油墨"
}, },
{ {
label: "彩色 + 白色油墨", label: "彩色 + 白色油墨"
}, },
{ {
label: "仅黑色油墨", label: "仅黑色油墨"
}, }
], ],
detailShow: false, detailShow: false,
showPopover: false, showPopover: false,
...@@ -64,27 +64,27 @@ export default { ...@@ -64,27 +64,27 @@ export default {
iBlackBalance: 0, iBlackBalance: 0,
iYellowBalance: 0, iYellowBalance: 0,
byMinWhite: 1, byMinWhite: 1,
bMultiple: false, bMultiple: false
}, }
}; };
}, },
props: { props: {
visible: { visible: {
default: false, default: false,
type: Boolean, type: Boolean
}, },
isDisabled: { isDisabled: {
default: false, default: false,
type: Boolean, type: Boolean
}, },
byPlatenSize: { byPlatenSize: {
default: 0, default: 0,
type: Number, type: Number
}, },
imgList: { imgList: {
default: () => [], default: () => [],
type: Array, type: Array
}, }
}, },
mounted() { mounted() {
this.$dataStore.set("default-print-setting", this.printSetting); this.$dataStore.set("default-print-setting", this.printSetting);
...@@ -93,24 +93,22 @@ export default { ...@@ -93,24 +93,22 @@ export default {
// console.log(this.$dataStore, "select"); // console.log(this.$dataStore, "select");
if (select) { if (select) {
this.printSettingSelectLabel = select; this.printSettingSelectLabel = select;
let index = this.printSettingList.findIndex( let index = this.printSettingList.findIndex(el => el.label === select);
(el) => el.label === select,
);
if (index >= 0) { if (index >= 0) {
this.printSettingVal = index; this.printSettingVal = index;
this.printSetting = JSON.parse( this.printSetting = JSON.parse(
JSON.stringify(this.printSettingList[index].value), JSON.stringify(this.printSettingList[index].value)
); );
} else { } else {
this.printSettingVal = 0; this.printSettingVal = 0;
this.printSetting = JSON.parse( this.printSetting = JSON.parse(
JSON.stringify(this.printSettingList[0].value), JSON.stringify(this.printSettingList[0].value)
); );
} }
} else { } else {
this.printSettingVal = 0; this.printSettingVal = 0;
this.printSetting = JSON.parse( this.printSetting = JSON.parse(
JSON.stringify(this.printSettingList[0].value), JSON.stringify(this.printSettingList[0].value)
); );
} }
}); });
...@@ -128,7 +126,7 @@ export default { ...@@ -128,7 +126,7 @@ export default {
return "1.5"; return "1.5";
} }
}, },
...mapState(["WHproportion", "grid"]), ...mapState(["WHproportion", "grid"])
}, },
watch: { watch: {
printSetting: { printSetting: {
...@@ -136,11 +134,11 @@ export default { ...@@ -136,11 +134,11 @@ export default {
this.$dataStore.set("print-setting", this.printSetting); this.$dataStore.set("print-setting", this.printSetting);
}, },
deep: true, deep: true,
immediate: true, immediate: true
}, },
visible() { visible() {
this.dialogShow = this.visible; this.dialogShow = this.visible;
}, }
}, },
created() { created() {
this.getPrinter(); this.getPrinter();
...@@ -169,10 +167,10 @@ export default { ...@@ -169,10 +167,10 @@ export default {
this.$confirm(`确定删除该预设?`, "提示", { this.$confirm(`确定删除该预设?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning"
}).then(() => { }).then(() => {
this.$dataStore.delete( this.$dataStore.delete(
this.printSettingList[this.printSettingVal].label + "-print-setting", this.printSettingList[this.printSettingVal].label + "-print-setting"
); );
this.getPrintSettingList(); this.getPrintSettingList();
this.printSettingVal = 0; this.printSettingVal = 0;
...@@ -184,7 +182,7 @@ export default { ...@@ -184,7 +182,7 @@ export default {
if (k.includes("-print-setting")) { if (k.includes("-print-setting")) {
arr.push({ arr.push({
label: k.replace("-print-setting", ""), label: k.replace("-print-setting", ""),
value: this.$dataStore.get(k), value: this.$dataStore.get(k)
}); });
} }
} }
...@@ -195,19 +193,19 @@ export default { ...@@ -195,19 +193,19 @@ export default {
let label = this.printSettingList[v].label; let label = this.printSettingList[v].label;
this.$dataStore.set("print-setting-select", label); this.$dataStore.set("print-setting-select", label);
this.printSetting = JSON.parse( this.printSetting = JSON.parse(
JSON.stringify(this.printSettingList[v].value), JSON.stringify(this.printSettingList[v].value)
); );
}, },
saveSetting() { saveSetting() {
if (this.settingName.trim() === "") { if (this.settingName.trim() === "") {
return this.$message.warning("预设名称不能为空"); return this.$message.warning("预设名称不能为空");
} }
if (this.printSettingList.find((el) => el.label === this.settingName)) { if (this.printSettingList.find(el => el.label === this.settingName)) {
return this.$message.warning("预设名称不能重复"); return this.$message.warning("预设名称不能重复");
} }
this.$dataStore.set( this.$dataStore.set(
`${this.settingName}-print-setting`, `${this.settingName}-print-setting`,
this.printSetting, this.printSetting
); );
this.showPopover = false; this.showPopover = false;
this.printSettingVal = this.printSettingList.length; this.printSettingVal = this.printSettingList.length;
...@@ -263,7 +261,7 @@ export default { ...@@ -263,7 +261,7 @@ export default {
u8arr[n] = bstr.charCodeAt(n); u8arr[n] = bstr.charCodeAt(n);
} }
return new Blob([u8arr], { return new Blob([u8arr], {
type: mime, type: mime
}); });
}, },
...@@ -286,7 +284,7 @@ export default { ...@@ -286,7 +284,7 @@ export default {
canvas: canvas1, canvas: canvas1,
backgroundColor: null, backgroundColor: null,
useCORS: true, useCORS: true,
allowTaint: true, allowTaint: true
}).then(async function(canvas) { }).then(async function(canvas) {
let dataURL = canvas.toDataURL("image/png"); let dataURL = canvas.toDataURL("image/png");
let pageBlob = that.dataURLtoBlob(dataURL); let pageBlob = that.dataURLtoBlob(dataURL);
...@@ -296,13 +294,13 @@ export default { ...@@ -296,13 +294,13 @@ export default {
let { data } = await that.$api.post("/uploadImage", params, { let { data } = await that.$api.post("/uploadImage", params, {
headers: { headers: {
"Content-Type": "application/x-www-form-urlencoded", "Content-Type": "application/x-www-form-urlencoded"
}, }
}); });
let w_mm = Number((canvas1.width * 0.84183).toFixed(1)); let w_mm = Number((canvas1.width * 0.84183).toFixed(1));
let h_mm = Number((canvas1.height * 0.84183).toFixed(1)); let h_mm = Number((canvas1.height * 0.84183).toFixed(1));
let size = `${that.singleStr(Number(w_mm).toFixed(1))}${that.singleStr( let size = `${that.singleStr(Number(w_mm).toFixed(1))}${that.singleStr(
Number(h_mm).toFixed(1), Number(h_mm).toFixed(1)
)}`; )}`;
await that.sendCmd(data.fileName, size, "00000000", 0); await that.sendCmd(data.fileName, size, "00000000", 0);
//canvas转换成url,然后利用a标签的download属性,直接下载,绕过上传服务器再下载 //canvas转换成url,然后利用a标签的download属性,直接下载,绕过上传服务器再下载
...@@ -348,7 +346,7 @@ export default { ...@@ -348,7 +346,7 @@ export default {
y: y_mm, y: y_mm,
w: w_mm, w: w_mm,
h: h_mm, h: h_mm,
r, r
}; };
// 返回计算结果 // 返回计算结果
...@@ -417,22 +415,27 @@ export default { ...@@ -417,22 +415,27 @@ export default {
await this.sendCmd(imgFileName, size, position, r); await this.sendCmd(imgFileName, size, position, r);
}, },
async sendCmd(imgFileName, size, position, r) { async sendCmd(imgFileName, size, position, r) {
// console.log(402, getVersion()); console.log(402, getVersion());
const printMap = {
const printCmd = print600: "GTX6CMD.exe",
getVersion() === "print600" ? "GTX6CMD.exe" : "GTXproCMD.exe"; print: "GTXproCMD.exe",
"print4.0": "GTXproCMD.exe",
print600SC: "GTX6SPCMD.exe"
};
const printCmd = printMap[getVersion()];
// getVersion() === "print600" ? "GTX6CMD.exe" : "GTXproCMD.exe";
const whitePrint = [1, 2].includes(this.printSetting.byInk) ? 1 : 0; // 白色打印 const whitePrint = [1, 2].includes(this.printSetting.byInk) ? 1 : 0; // 白色打印
let cmd = `${printCmd} print -X "${`Profile\\${imgFileName.replace( let cmd = `${printCmd} print -X "${`Profile\\${imgFileName.replace(
".png", ".png",
"", ""
)}.xml`}" -I "${"Input\\" + )}.xml`}" -I "${"Input\\" +
imgFileName}" -A "Output\\${imgFileName.replace( imgFileName}" -A "Output\\${imgFileName.replace(
".png", ".png",
"", ""
)}.arxp" -S ${size} -L ${position} -D ${r} -W ${whitePrint}`; )}.arxp" -S ${size} -L ${position} -D ${r} -W ${whitePrint}`;
let print_cmd = `${printCmd} send -A "Output\\${imgFileName.replace( let print_cmd = `${printCmd} send -A "Output\\${imgFileName.replace(
".png", ".png",
"", ""
)}.arxp" -P "${this.printer}`; )}.arxp" -P "${this.printer}`;
let data = { let data = {
...this.printSetting, ...this.printSetting,
...@@ -440,8 +443,8 @@ export default { ...@@ -440,8 +443,8 @@ export default {
byPlatenSize: this.byPlatenSize, byPlatenSize: this.byPlatenSize,
cmd, cmd,
fileName: imgFileName, fileName: imgFileName,
print_cmd, print_cmd
}, }
}; };
await this.toWritePrintLog(data); await this.toWritePrintLog(data);
...@@ -468,7 +471,7 @@ export default { ...@@ -468,7 +471,7 @@ export default {
position_unit, position_unit,
position_after_px, position_after_px,
position_before_px, position_before_px,
send_api_data, send_api_data
}; };
await this.$api.post("/writePrintLog", data); await this.$api.post("/writePrintLog", data);
}, },
...@@ -485,8 +488,8 @@ export default { ...@@ -485,8 +488,8 @@ export default {
setDetailShow() { setDetailShow() {
this.detailShow = !this.detailShow; this.detailShow = !this.detailShow;
}, }
}, }
}; };
</script> </script>
......
...@@ -10,7 +10,7 @@ module.exports = { ...@@ -10,7 +10,7 @@ module.exports = {
/** vue3.0内置了webpack所有东西, /** vue3.0内置了webpack所有东西,
* webpack配置,see https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md * webpack配置,see https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md
**/ **/
chainWebpack: (config) => { chainWebpack: config => {
const svgRule = config.module.rule("svg"); const svgRule = config.module.rule("svg");
svgRule.uses.clear(); svgRule.uses.clear();
svgRule svgRule
...@@ -18,7 +18,7 @@ module.exports = { ...@@ -18,7 +18,7 @@ module.exports = {
.loader("svg-sprite-loader") .loader("svg-sprite-loader")
.options({ .options({
symbolId: "icon-[name]", symbolId: "icon-[name]",
include: ["./src/icons"], include: ["./src/icons"]
}); });
config.module config.module
...@@ -28,15 +28,15 @@ module.exports = { ...@@ -28,15 +28,15 @@ module.exports = {
.loader("pug-html-loader") .loader("pug-html-loader")
.end(); .end();
}, },
configureWebpack: (config) => { configureWebpack: config => {
config.resolve = { config.resolve = {
// 配置解析别名 // 配置解析别名
extensions: [".js", ".json", ".vue"], // 自动添加文件名后缀 extensions: [".js", ".json", ".vue"], // 自动添加文件名后缀
alias: { alias: {
vue: "vue/dist/vue.js", vue: "vue/dist/vue.js",
"@": path.resolve(__dirname, "./src"), "@": path.resolve(__dirname, "./src"),
"@c": path.resolve(__dirname, "./src/components"), "@c": path.resolve(__dirname, "./src/components")
}, }
}; };
}, },
// 生产环境是否生成 sourceMap 文件 // 生产环境是否生成 sourceMap 文件
...@@ -50,11 +50,11 @@ module.exports = { ...@@ -50,11 +50,11 @@ module.exports = {
// css预设器配置项 // css预设器配置项
loaderOptions: { loaderOptions: {
sass: { sass: {
prependData: `@import "./src/styles/main.css";`, prependData: `@import "./src/styles/main.css";`
}, }
}, },
// 启用 CSS modules for all css / pre-processor files. // 启用 CSS modules for all css / pre-processor files.
requireModuleExtension: true, // 是否开启支持‘foo.module.css’样式 requireModuleExtension: true // 是否开启支持‘foo.module.css’样式
}, },
// use thread-loader for babel & TS in production build // use thread-loader for babel & TS in production build
// enabled by default if the machine has more than 1 cores // enabled by default if the machine has more than 1 cores
...@@ -80,15 +80,15 @@ module.exports = { ...@@ -80,15 +80,15 @@ module.exports = {
ws: true, ws: true,
changOrigin: true, changOrigin: true,
pathRewrite: { pathRewrite: {
"^/devApi": "", "^/devApi": ""
}, }
}, }
}, },
overlay: { overlay: {
// 全屏模式下是否显示脚本错误 // 全屏模式下是否显示脚本错误
warnings: true, warnings: true,
errors: true, errors: true
}, }
}, },
/** /**
* 第三方插件配置 * 第三方插件配置
...@@ -100,41 +100,45 @@ module.exports = { ...@@ -100,41 +100,45 @@ module.exports = {
extraResources: [ extraResources: [
{ {
from: "./print/", from: "./print/",
to: "../print", to: "../print"
}, },
{ {
from: "./print4.0/", from: "./print4.0/",
to: "../print4.0", to: "../print4.0"
}, },
{ {
from: "./print600/", from: "./print600/",
to: "../print600", to: "../print600"
},
{
from: "./print600SC/",
to: "../print600SC"
}, },
{ {
from: "./logs/", from: "./logs/",
to: "../logs", to: "../logs"
}, },
{ {
from: "./config/", from: "./config/",
to: "../config", to: "../config"
}, },
{ {
from: "./dialogstatic/", from: "./dialogstatic/",
to: "../dialogstatic", to: "../dialogstatic"
}, },
{ {
from: "./html/", from: "./html/",
to: "../html", to: "../html"
}, },
{ {
from: "./huiLiCaiImg/", from: "./huiLiCaiImg/",
to: "../huiLiCaiImg", to: "../huiLiCaiImg"
}, },
{ {
from: "scripts", // 本地脚本目录 from: "scripts", // 本地脚本目录
to: "scripts", // 输出到 resources/scripts to: "scripts", // 输出到 resources/scripts
filter: ["**/*"], // 包含所有文件 filter: ["**/*"] // 包含所有文件
}, }
], ],
win: { win: {
...@@ -142,16 +146,16 @@ module.exports = { ...@@ -142,16 +146,16 @@ module.exports = {
target: [ target: [
{ {
target: "nsis", target: "nsis",
arch: ["x64", "ia32"], // 支持64位和32位系统 arch: ["x64", "ia32"] // 支持64位和32位系统
}, }
], ]
}, },
nsis: { nsis: {
oneClick: false, // 禁用一键安装 oneClick: false, // 禁用一键安装
allowToChangeInstallationDirectory: true, // 允许用户更改安装目录 allowToChangeInstallationDirectory: true, // 允许用户更改安装目录
perMachine: true, // 为所有用户安装 perMachine: true // 为所有用户安装
}, }
}, }
}, }
}, }
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment