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 @@
"name": "JomallProductionAssistant",
"productName": "JomallProductionAssistant",
"description": "",
"version": "1.0.32",
"version": "1.0.33",
"private": true,
"scripts": {
"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 = {
language: "cn",
gridValue: 0,
autoPrint: false,
gridSpacing: "10mm",
gridSpacing: "10mm"
};
export default new Vuex.Store({
state: {
......@@ -17,8 +17,8 @@ export default new Vuex.Store({
productDetail: {},
windowWH: { width: 0, height: 0 },
desktopDevice: 1, //1是兄弟,2是其他
desktoVersion: getVersion() || "print", //print2.0是2.0,print4.0是4.0 print600是600
orderType: "GC", //GC是POD,CN是PODCN US是PODUS
desktoVersion: getVersion() || "print", //print2.0是2.0,print4.0是4.0 print600是600 print600SC是600SC
orderType: "GC", //GC是POD,CN是PODCN US是PODUS OP是操作单
WHproportion: 1, //宽高比例
defaultProportion: 1,
isPreView: false,
......@@ -30,7 +30,7 @@ export default new Vuex.Store({
unit: "mm",
language: "cn",
autoPrint: false,
gridSpacing: 10,
gridSpacing: 10
},
defaultGrid: [
{
......@@ -39,7 +39,7 @@ export default new Vuex.Store({
row: 16,
col: 18,
h: 0,
w: 0,
w: 0
},
{
label: "16×21",
......@@ -47,7 +47,7 @@ export default new Vuex.Store({
row: 16,
col: 21,
h: 0,
w: 0,
w: 0
},
{
label: "7×8",
......@@ -55,7 +55,7 @@ export default new Vuex.Store({
row: 7,
col: 8,
h: 0,
w: 0,
w: 0
},
{
label: "10×12",
......@@ -63,7 +63,7 @@ export default new Vuex.Store({
value: 3,
col: 12,
h: 0,
w: 0,
w: 0
},
{
label: "14×16",
......@@ -71,7 +71,7 @@ export default new Vuex.Store({
value: 2,
col: 16,
h: 0,
w: 0,
w: 0
},
{
label: "40×50",
......@@ -80,10 +80,10 @@ export default new Vuex.Store({
col: 50,
h: 0,
w: 0,
disabled: true,
},
disabled: true
}
],
grid: [],
grid: []
},
mutations: {
setDefaultSetting(state) {
......@@ -127,15 +127,8 @@ export default new Vuex.Store({
return (state.grid = [arr]);
}
let proportion = state.WHproportion;
console.log(130, proportion);
state.grid.forEach((el) => {
state.grid.forEach(el => {
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.w = 480 * proportion;
} else if (el.value == 1) {
......@@ -179,7 +172,7 @@ export default new Vuex.Store({
row: 18,
col: 22,
h: 0,
w: 0,
w: 0
},
{
label: "24×24",
......@@ -187,13 +180,64 @@ export default new Vuex.Store({
row: 24,
col: 24,
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 {
state.grid = [...state.defaultGrid];
}
},
}
},
getters: {
systemSetting(state) {
......@@ -202,9 +246,9 @@ export default new Vuex.Store({
getActionList(state) {
return state.actionList;
},
getActionIndex: (state) => state.actionIndex,
imgList: (state) => state.imgList,
getActionIndex: state => state.actionIndex,
imgList: state => state.imgList
},
actions: {},
modules: {},
modules: {}
});
......@@ -24,17 +24,17 @@ export default {
settingName: "",
printInkList: [
{
label: "仅彩色油墨",
label: "仅彩色油墨"
},
{
label: "仅白色油墨",
label: "仅白色油墨"
},
{
label: "彩色 + 白色油墨",
label: "彩色 + 白色油墨"
},
{
label: "仅黑色油墨",
},
label: "仅黑色油墨"
}
],
detailShow: false,
showPopover: false,
......@@ -64,27 +64,27 @@ export default {
iBlackBalance: 0,
iYellowBalance: 0,
byMinWhite: 1,
bMultiple: false,
},
bMultiple: false
}
};
},
props: {
visible: {
default: false,
type: Boolean,
type: Boolean
},
isDisabled: {
default: false,
type: Boolean,
type: Boolean
},
byPlatenSize: {
default: 0,
type: Number,
type: Number
},
imgList: {
default: () => [],
type: Array,
},
type: Array
}
},
mounted() {
this.$dataStore.set("default-print-setting", this.printSetting);
......@@ -93,24 +93,22 @@ export default {
// console.log(this.$dataStore, "select");
if (select) {
this.printSettingSelectLabel = select;
let index = this.printSettingList.findIndex(
(el) => el.label === select,
);
let index = this.printSettingList.findIndex(el => el.label === select);
if (index >= 0) {
this.printSettingVal = index;
this.printSetting = JSON.parse(
JSON.stringify(this.printSettingList[index].value),
JSON.stringify(this.printSettingList[index].value)
);
} else {
this.printSettingVal = 0;
this.printSetting = JSON.parse(
JSON.stringify(this.printSettingList[0].value),
JSON.stringify(this.printSettingList[0].value)
);
}
} else {
this.printSettingVal = 0;
this.printSetting = JSON.parse(
JSON.stringify(this.printSettingList[0].value),
JSON.stringify(this.printSettingList[0].value)
);
}
});
......@@ -128,7 +126,7 @@ export default {
return "1.5";
}
},
...mapState(["WHproportion", "grid"]),
...mapState(["WHproportion", "grid"])
},
watch: {
printSetting: {
......@@ -136,11 +134,11 @@ export default {
this.$dataStore.set("print-setting", this.printSetting);
},
deep: true,
immediate: true,
immediate: true
},
visible() {
this.dialogShow = this.visible;
},
}
},
created() {
this.getPrinter();
......@@ -169,10 +167,10 @@ export default {
this.$confirm(`确定删除该预设?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
type: "warning"
}).then(() => {
this.$dataStore.delete(
this.printSettingList[this.printSettingVal].label + "-print-setting",
this.printSettingList[this.printSettingVal].label + "-print-setting"
);
this.getPrintSettingList();
this.printSettingVal = 0;
......@@ -184,7 +182,7 @@ export default {
if (k.includes("-print-setting")) {
arr.push({
label: k.replace("-print-setting", ""),
value: this.$dataStore.get(k),
value: this.$dataStore.get(k)
});
}
}
......@@ -195,19 +193,19 @@ export default {
let label = this.printSettingList[v].label;
this.$dataStore.set("print-setting-select", label);
this.printSetting = JSON.parse(
JSON.stringify(this.printSettingList[v].value),
JSON.stringify(this.printSettingList[v].value)
);
},
saveSetting() {
if (this.settingName.trim() === "") {
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("预设名称不能重复");
}
this.$dataStore.set(
`${this.settingName}-print-setting`,
this.printSetting,
this.printSetting
);
this.showPopover = false;
this.printSettingVal = this.printSettingList.length;
......@@ -263,7 +261,7 @@ export default {
u8arr[n] = bstr.charCodeAt(n);
}
return new Blob([u8arr], {
type: mime,
type: mime
});
},
......@@ -286,7 +284,7 @@ export default {
canvas: canvas1,
backgroundColor: null,
useCORS: true,
allowTaint: true,
allowTaint: true
}).then(async function(canvas) {
let dataURL = canvas.toDataURL("image/png");
let pageBlob = that.dataURLtoBlob(dataURL);
......@@ -296,13 +294,13 @@ export default {
let { data } = await that.$api.post("/uploadImage", params, {
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 h_mm = Number((canvas1.height * 0.84183).toFixed(1));
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);
//canvas转换成url,然后利用a标签的download属性,直接下载,绕过上传服务器再下载
......@@ -348,7 +346,7 @@ export default {
y: y_mm,
w: w_mm,
h: h_mm,
r,
r
};
// 返回计算结果
......@@ -417,22 +415,27 @@ export default {
await this.sendCmd(imgFileName, size, position, r);
},
async sendCmd(imgFileName, size, position, r) {
// console.log(402, getVersion());
const printCmd =
getVersion() === "print600" ? "GTX6CMD.exe" : "GTXproCMD.exe";
console.log(402, getVersion());
const printMap = {
print600: "GTX6CMD.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; // 白色打印
let cmd = `${printCmd} print -X "${`Profile\\${imgFileName.replace(
".png",
"",
""
)}.xml`}" -I "${"Input\\" +
imgFileName}" -A "Output\\${imgFileName.replace(
".png",
"",
""
)}.arxp" -S ${size} -L ${position} -D ${r} -W ${whitePrint}`;
let print_cmd = `${printCmd} send -A "Output\\${imgFileName.replace(
".png",
"",
""
)}.arxp" -P "${this.printer}`;
let data = {
...this.printSetting,
......@@ -440,8 +443,8 @@ export default {
byPlatenSize: this.byPlatenSize,
cmd,
fileName: imgFileName,
print_cmd,
},
print_cmd
}
};
await this.toWritePrintLog(data);
......@@ -468,7 +471,7 @@ export default {
position_unit,
position_after_px,
position_before_px,
send_api_data,
send_api_data
};
await this.$api.post("/writePrintLog", data);
},
......@@ -485,8 +488,8 @@ export default {
setDetailShow() {
this.detailShow = !this.detailShow;
},
},
}
}
};
</script>
......
......@@ -10,7 +10,7 @@ module.exports = {
/** vue3.0内置了webpack所有东西,
* webpack配置,see https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md
**/
chainWebpack: (config) => {
chainWebpack: config => {
const svgRule = config.module.rule("svg");
svgRule.uses.clear();
svgRule
......@@ -18,7 +18,7 @@ module.exports = {
.loader("svg-sprite-loader")
.options({
symbolId: "icon-[name]",
include: ["./src/icons"],
include: ["./src/icons"]
});
config.module
......@@ -28,15 +28,15 @@ module.exports = {
.loader("pug-html-loader")
.end();
},
configureWebpack: (config) => {
configureWebpack: config => {
config.resolve = {
// 配置解析别名
extensions: [".js", ".json", ".vue"], // 自动添加文件名后缀
alias: {
vue: "vue/dist/vue.js",
"@": path.resolve(__dirname, "./src"),
"@c": path.resolve(__dirname, "./src/components"),
},
"@c": path.resolve(__dirname, "./src/components")
}
};
},
// 生产环境是否生成 sourceMap 文件
......@@ -50,11 +50,11 @@ module.exports = {
// css预设器配置项
loaderOptions: {
sass: {
prependData: `@import "./src/styles/main.css";`,
},
prependData: `@import "./src/styles/main.css";`
}
},
// 启用 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
// enabled by default if the machine has more than 1 cores
......@@ -80,15 +80,15 @@ module.exports = {
ws: true,
changOrigin: true,
pathRewrite: {
"^/devApi": "",
},
},
"^/devApi": ""
}
}
},
overlay: {
// 全屏模式下是否显示脚本错误
warnings: true,
errors: true,
},
errors: true
}
},
/**
* 第三方插件配置
......@@ -100,41 +100,45 @@ module.exports = {
extraResources: [
{
from: "./print/",
to: "../print",
to: "../print"
},
{
from: "./print4.0/",
to: "../print4.0",
to: "../print4.0"
},
{
from: "./print600/",
to: "../print600",
to: "../print600"
},
{
from: "./print600SC/",
to: "../print600SC"
},
{
from: "./logs/",
to: "../logs",
to: "../logs"
},
{
from: "./config/",
to: "../config",
to: "../config"
},
{
from: "./dialogstatic/",
to: "../dialogstatic",
to: "../dialogstatic"
},
{
from: "./html/",
to: "../html",
to: "../html"
},
{
from: "./huiLiCaiImg/",
to: "../huiLiCaiImg",
to: "../huiLiCaiImg"
},
{
from: "scripts", // 本地脚本目录
to: "scripts", // 输出到 resources/scripts
filter: ["**/*"], // 包含所有文件
},
filter: ["**/*"] // 包含所有文件
}
],
win: {
......@@ -142,16 +146,16 @@ module.exports = {
target: [
{
target: "nsis",
arch: ["x64", "ia32"], // 支持64位和32位系统
},
],
arch: ["x64", "ia32"] // 支持64位和32位系统
}
]
},
nsis: {
oneClick: false, // 禁用一键安装
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