Commit df3a587f by 朱哲铨

代碼更新

parent b28530b1
......@@ -1313,6 +1313,15 @@
"ajv-keywords": "^3.1.0"
}
},
"@eggjs/yauzl": {
"version": "2.11.0",
"resolved": "https://registry.npmmirror.com/@eggjs/yauzl/-/yauzl-2.11.0.tgz",
"integrity": "sha512-Jq+k2fCZJ3i3HShb0nxLUiAgq5pwo8JTT1TrH22JoehZQ0Nm2dvByGIja1NYfNyuE4Tx5/Dns5nVsBN/mlC8yg==",
"requires": {
"buffer-crc32": "~0.2.3",
"fd-slicer2": "^1.2.0"
}
},
"@egjs/agent": {
"version": "2.4.3",
"resolved": "https://registry.npmmirror.com/@egjs/agent/-/agent-2.4.3.tgz",
......@@ -3361,7 +3370,6 @@
"version": "1.2.3",
"resolved": "https://registry.npmmirror.com/bl/-/bl-1.2.3.tgz",
"integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==",
"dev": true,
"requires": {
"readable-stream": "^2.3.5",
"safe-buffer": "^5.1.1"
......@@ -3664,7 +3672,6 @@
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
"integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
"dev": true,
"requires": {
"buffer-alloc-unsafe": "^1.1.0",
"buffer-fill": "^1.0.0"
......@@ -3673,20 +3680,17 @@
"buffer-alloc-unsafe": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
"integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==",
"dev": true
"integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg=="
},
"buffer-crc32": {
"version": "0.2.13",
"resolved": "https://registry.npmmirror.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
"integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
"dev": true
"integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ=="
},
"buffer-fill": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/buffer-fill/-/buffer-fill-1.0.0.tgz",
"integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==",
"dev": true
"integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ=="
},
"buffer-from": {
"version": "1.1.2",
......@@ -4464,6 +4468,32 @@
"mime-db": ">= 1.43.0 < 2"
}
},
"compressing": {
"version": "1.10.1",
"resolved": "https://registry.npmmirror.com/compressing/-/compressing-1.10.1.tgz",
"integrity": "sha512-XXwUffcVjqv8NGSQu1ttp6eMmuZ3zZEAec28Rt30o/vkXE20jXhowRQ9LXLY4uOgFkxXrNzApLobpam53Dc1AA==",
"requires": {
"@eggjs/yauzl": "^2.11.0",
"flushwritable": "^1.0.0",
"get-ready": "^1.0.0",
"iconv-lite": "^0.5.0",
"mkdirp": "^0.5.1",
"pump": "^3.0.0",
"streamifier": "^0.1.1",
"tar-stream": "^1.5.2",
"yazl": "^2.4.2"
},
"dependencies": {
"iconv-lite": {
"version": "0.5.2",
"resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.5.2.tgz",
"integrity": "sha512-kERHXvpSaB4aU3eANwidg79K8FlrN77m8G9V+0vOR3HYaRifrlwMEpT7ZBJqLSEIHnEgJTHcWK82wwLwwKwtag==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
}
}
},
"compression": {
"version": "1.7.4",
"resolved": "https://registry.npmmirror.com/compression/-/compression-1.7.4.tgz",
......@@ -6396,7 +6426,6 @@
"version": "1.4.4",
"resolved": "https://registry.npmmirror.com/end-of-stream/-/end-of-stream-1.4.4.tgz",
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"dev": true,
"requires": {
"once": "^1.4.0"
}
......@@ -7210,6 +7239,14 @@
"pend": "~1.2.0"
}
},
"fd-slicer2": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/fd-slicer2/-/fd-slicer2-1.2.0.tgz",
"integrity": "sha512-3lBUNUckhMZduCc4g+Pw4Ve16LD9vpX9b8qUkkKq2mgDRLYWzblszZH2luADnJqjJe+cypngjCuKRm/IW12rRw==",
"requires": {
"pend": "^1.2.0"
}
},
"figgy-pudding": {
"version": "3.5.2",
"resolved": "https://registry.npmmirror.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz",
......@@ -7378,6 +7415,11 @@
"readable-stream": "^2.3.6"
}
},
"flushwritable": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/flushwritable/-/flushwritable-1.0.0.tgz",
"integrity": "sha512-3VELfuWCLVzt5d2Gblk8qcqFro6nuwvxwMzHaENVDHI7rxcBRtMCwTk/E9FXcgh+82DSpavPNDueA9+RxXJoFg=="
},
"follow-redirects": {
"version": "1.5.10",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.5.10.tgz",
......@@ -7539,8 +7581,7 @@
"fs-constants": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/fs-constants/-/fs-constants-1.0.0.tgz",
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
"dev": true
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
},
"fs-extra": {
"version": "7.0.1",
......@@ -7714,6 +7755,11 @@
"hasown": "^2.0.0"
}
},
"get-ready": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/get-ready/-/get-ready-1.0.0.tgz",
"integrity": "sha512-mFXCZPJIlcYcth+N8267+mghfYN9h3EhsDa6JSnbA3Wrhh/XFpuowviFcsDeYZtKspQyWyJqfs4O6P8CHeTwzw=="
},
"get-stdin": {
"version": "6.0.0",
"resolved": "https://registry.npmmirror.com/get-stdin/-/get-stdin-6.0.0.tgz",
......@@ -10997,8 +11043,7 @@
"pend": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/pend/-/pend-1.2.0.tgz",
"integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==",
"dev": true
"integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg=="
},
"performance-now": {
"version": "2.1.0",
......@@ -12703,7 +12748,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/pump/-/pump-3.0.0.tgz",
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"dev": true,
"requires": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
......@@ -14318,6 +14362,11 @@
"integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==",
"dev": true
},
"streamifier": {
"version": "0.1.1",
"resolved": "https://registry.npmmirror.com/streamifier/-/streamifier-0.1.1.tgz",
"integrity": "sha512-zDgl+muIlWzXNsXeyUfOk9dChMjlpkq0DRsxujtYPgyJ676yQ8jEm6zzaaWHFDg5BNcLuif0eD2MTyJdZqXpdg=="
},
"strict-uri-encode": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
......@@ -14602,7 +14651,6 @@
"version": "1.6.2",
"resolved": "https://registry.npmmirror.com/tar-stream/-/tar-stream-1.6.2.tgz",
"integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==",
"dev": true,
"requires": {
"bl": "^1.0.0",
"buffer-alloc": "^1.2.0",
......@@ -14971,8 +15019,7 @@
"to-buffer": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/to-buffer/-/to-buffer-1.1.1.tgz",
"integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==",
"dev": true
"integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg=="
},
"to-fast-properties": {
"version": "2.0.0",
......@@ -17196,8 +17243,7 @@
"xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmmirror.com/xtend/-/xtend-4.0.2.tgz",
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
"dev": true
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
},
"y18n": {
"version": "4.0.3",
......@@ -17266,6 +17312,14 @@
"fd-slicer": "~1.1.0"
}
},
"yazl": {
"version": "2.5.1",
"resolved": "https://registry.npmmirror.com/yazl/-/yazl-2.5.1.tgz",
"integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==",
"requires": {
"buffer-crc32": "~0.2.3"
}
},
"yorkie": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/yorkie/-/yorkie-2.0.0.tgz",
......
......@@ -18,10 +18,12 @@
"@gausszhou/vue-drag-resize-rotate": "^2.0.15",
"@vue/composition-api": "^0.3.4",
"axios": "^0.19.2",
"compressing": "^1.10.1",
"core-js": "^3.6.4",
"electron-store": "^4.0.0",
"element-ui": "^2.13.0",
"express": "^4.17.1",
"lodash": "^4.17.21",
"lodash-id": "^0.14.0",
"lowdb": "^1.0.0",
"morgan": "^1.10.0",
......
GTXproCMD.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
GTXproCMD.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>
<bEcoMode>false</bEcoMode>
<byInk>2</byInk>
<bMaterialBlack>false</bMaterialBlack>
<bMultiple>false</bMultiple>
<byHighlight>1</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>1</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>1</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>1</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>1</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>1</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>1</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>1</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>1</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>1</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>1</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>1</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>1</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>1</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>1</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>1</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>1</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>1</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>1</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>3</byMask>
<bDivide>false</bDivide>
<bTransColor>false</bTransColor>
<bySaturation>5</bySaturation>
<byBrightness>5</byBrightness>
<byContrast>5</byContrast>
<bUniPrint>false</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>1</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>1</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>1</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
import {downloadImage, toSend, writeProfileXml} from "@/backend/webserver/utils";
const compressing = require('compressing');
var uuid = require("uuid");
const path = require('path');
const fs = require('fs');
......@@ -70,7 +71,7 @@ fn.completeDelivery = async (req, res) => {
const company = req.headers["company"]
const q = req.body
try {
let {data} = await axios.post(`https://${company}/api/pod/podProductionInfo/completeDelivery`, q,{
let {data} = await axios.post(`https://${company}/api/pod/podProductionInfo/completeDelivery`, q, {
headers: {'jwt-token': token}
})
res.json(data)
......@@ -80,34 +81,40 @@ fn.completeDelivery = async (req, res) => {
}
fn.downloadByDesignId = async (req, res) => {
const token = req.headers["jwt-token"]
const company = req.headers["company"]
let q = req.body
try {
let downloadByDesignId = await axios.post(`https://${company}/api/podDesignCenter/downloadByDesignId`, req.body, {
headers: {'jwt-token': token, responseType: 'blob',}
})
console.log(downloadByDesignId.headers)
const dispositionStr = downloadByDesignId.headers['content-disposition']
if (dispositionStr == null || dispositionStr === '') {
return res.json({code: 500, msg: '下载失败'})
let dir = path.join(os.homedir(), '/Desktop/' + q.productionNo+'.zip')
const zipStream = new compressing.zip.Stream();
for(let k in q.imgList){
const p = path.join(process.cwd(),'./print/Input/'+q.imgList[k].fileName)
zipStream.addEntry(p);
}
let dispositionArr = dispositionStr.split(';')[1].split('filename=')[1]
let fileName = decodeURIComponent(dispositionArr)
let dir = path.join(os.homedir(), '/Desktop/' + fileName)
console.log(dir,'dir')
let ws=fs.createWriteStream(dir );
ws.write(downloadByDesignId.data);
ws.on('drain',function () {
console.log("内存干了");
});
ws.on('error',function (err) {
res.json({code: 500, msg: '文件下载失败'})
});
ws.on('close',function (err) {
});
ws.end()
res.json({code: 200, msg: fileName + '已下载到桌面'})
const destStream = fs.createWriteStream(dir);
zipStream.pipe(destStream)
.on('finish', () => {
console.log('success');
res.json({code: 200, msg: q.productionNo+'.zip' + '已下载到桌面'})
})
.on('error', () => {
res.json({code: 500, msg: '文件下载失败'})
});
// let ws=fs.createWriteStream(dir );
// console.log(downloadByDesignId)
//
// ws.write(downloadByDesignId.data);
// ws.on('drain',function () {
// console.log("内存干了");
// });
// ws.on('error',function (err) {
// res.json({code: 500, msg: '文件下载失败'})
// });
// ws.on('close',function (err) {
//
// });
// ws.end()
} catch (err) {
console.log(err)
res.json({code: 500, msg: err})
......
import {exec} from "child_process";
import {exec, execSync} from "child_process";
var fs = require("fs");
var path = require("path");
......@@ -61,23 +61,21 @@ export const toSend = (body) => {
body.print_cmd,
{cwd: path.join(process.cwd(), 'print'), shell: true},
(err2, stdout2, stderr2) => {
console.log(stdout2, 1)
console.log(stderr2, 2)
console.log(err2, 4)
console.log(err2)
if (!err2) {
// 成功后删除 素材图,xml,output文件
fs.unlinkSync(path.join(process.cwd(), 'print/Input/' + body.fileName))
fs.unlinkSync(path.join(process.cwd(), 'print/Profile/' + body.fileName.replace('.png', '') + '.xml'))
fs.unlinkSync(path.join(process.cwd(), 'print/Output/' + body.fileName.replace('.png', '') + '.arxp'))
// fs.unlinkSync(path.join(process.cwd(), 'print/Input/' + body.fileName))
// fs.unlinkSync(path.join(process.cwd(), 'print/Profile/' + body.fileName.replace('.png', '') + '.xml'))
// fs.unlinkSync(path.join(process.cwd(), 'print/Output/' + body.fileName.replace('.png', '') + '.arxp'))
resolve('操作成功')
} else {
reject('操作出现问题')
reject('打印机参数错误')
}
})
} else {
reject('操作出现问题')
reject('生成arxp文件失败')
}
})
......
......@@ -37,25 +37,19 @@ const router = new VueRouter({
base: process.env.BASE_URL,
routes
});
// router.beforeEach((to, from, next) => {
// let user = Vue.prototype.$dataStore.get('user')
// if (to.name === 'login') {
// if (user) {
// console.log(1)
// return next({path:'/design'})
// } else {
// console.log(2)
// return next( )
// }
//
// } else {
// if (user) {
// if(!to.name) return next({path:'/design'})
// return next()
// } else {
// return next('/login')
// }
// }
//
// })
router.beforeEach((to, from, next) => {
let user = Vue.prototype.$dataStore.get('user')
if (to.name === 'login') {
if (user) {
console.log(1)
return next({path:'/design'})
} else {
return next( )
}
} else {
return next()
}
})
export default router;
......@@ -26,6 +26,7 @@ export default {
showPrintDialog: false,
productionNo: '',
setting: {},
imgList: [],
detail: null,
selectBgColor: '#ececec',
predefineColors: [
......@@ -143,7 +144,7 @@ export default {
},
async sureData() {
if (!this.detail || Object.keys(this.detail).length <= 1) {
return this.$message.warning('请扫生产单号')
return this.$message.warning('请扫生产单号')
}
this.$confirm(
`确定生产完成?`,
......@@ -158,9 +159,10 @@ export default {
})
},
async downloadImage() {
if (!this.detail || Object.keys(this.detail).length === 0) return this.$message.warning('请输入生产单号')
if (!this.detail || Object.keys(this.detail).length === 0) return this.$message.warning('请扫描生产单号')
let params = {
productionNo: this.detail.podProductionNo
productionNo: this.detail.podProductionNo,
imgList: this.imgList
}
let res = await this.$api.post('/downloadByDesignId', params)
......@@ -189,7 +191,7 @@ export default {
res.data[i].file = new File([r], res.data[i].fileName, {type: 'image/png'})
if (i === res.data.length - 1) {
this.imgList = res.data
bus.$emit('busEmit', {type: 'sendFile', value: res.data})
}
})
......@@ -267,7 +269,7 @@ export default {
<!-- </el-tooltip>-->
<el-dropdown trigger="click" @command="command" :hide-on-click="false">
<el-button style="height: 100%;margin-right: 8px" size="small">{{ grid[selectGridIndex].label }}</el-button>
<el-button style="height: 100%;margin-right: 0px" size="small">{{ grid[selectGridIndex].label }}</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="i" v-for="(it,i) in grid" :key="i">
{{ it.label }}
......@@ -282,7 +284,7 @@ export default {
<el-tooltip content="图片">
<el-upload accept=".png" action="" :show-file-list="false" :before-upload="uploadImage">
<el-button style="height: 100%;margin:0 8px" size="small">
<img style="width: 14px;height: 14px" src="@/static/icon/tupian.png" alt="">
<i class="el-icon-picture" style="font-size: 15px;"></i>
</el-button>
</el-upload>
</el-tooltip>
......@@ -302,6 +304,7 @@ export default {
<!-- </el-tooltip>-->
<el-tooltip content="背景色">
<el-color-picker
style="margin-right: 3px"
v-model="selectBgColor"
@change="setBg"
color-format="hex"
......@@ -361,7 +364,7 @@ export default {
<!-- </el-tooltip>-->
</div>
<div class="center-input">
<el-input @keyup.enter.native="getDataInfo" style="width: 40%;" size="medium" placeholder="请输入生产单号"
<el-input @keyup.enter.native="getDataInfo" style="width: 40%;" size="medium" placeholder="请扫描生产单号"
ref="searchRef" v-model="productionNo"></el-input>
<el-button @click="getDataInfo" size="medium" style="margin-left: 10px" type="primary">查询</el-button>
<div class="sure-btn">
......@@ -446,7 +449,7 @@ export default {
.center-input {
display: flex;
align-items: center;
justify-content: flex-start;
justify-content: center;
flex: 1;
flex-shrink: 0;
overflow: hidden;
......
......@@ -6,6 +6,8 @@ export default {
form: {
x: 0,
sx: 0,
sh: 0,
sw: 0,
sy: 0,
y: 0,
w: 0,
......@@ -36,15 +38,19 @@ export default {
item: {
handler() {
if (this.item) {
let x_mm = Number((this.item.x * 0.84).toFixed(2).replace('.00', ''))
let w_mm = Number((this.item.w * 0.84).toFixed(2).replace('.00', ''))
let h_mm = Number((this.item.h * 0.84).toFixed(2).replace('.00', ''))
let y_mm = Number((this.item.y * 0.84).toFixed(2).replace('.00', ''))
// let x_mm = Number((this.item.x * 0.84).toFixed(2).replace('.00', ''))
// let w_mm = Number((this.item.w * 0.84).toFixed(2).replace('.00', ''))
// let h_mm = Number((this.item.h * 0.84).toFixed(2).replace('.00', ''))
// let y_mm = Number((this.item.y * 0.84).toFixed(2).replace('.00', ''))
// return
this.form.x = x_mm
this.form.y = y_mm
this.form.h = h_mm
this.form.w = w_mm
this.form.x = this.item.x
this.form.y = this.item.y
this.form.w = this.item.w
this.form.h = this.item.h
// this.form.sx = x_mm
// this.form.sy = y_mm
// this.form.sh = h_mm
// this.form.sw = w_mm
this.form.r = this.item.r
}
},
......@@ -53,32 +59,17 @@ export default {
}
},
methods: {
conversion_getDPI() {
var arrDPI = new Array;
if (window.screen.deviceXDPI) {
arrDPI[0] = window.screen.deviceXDPI;
arrDPI[1] = window.screen.deviceYDPI;
} else {
var tmpNode = document.createElement("DIV");
tmpNode.style.cssText = "width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden";
document.body.appendChild(tmpNode);
arrDPI[0] = parseInt(tmpNode.offsetWidth);
arrDPI[1] = parseInt(tmpNode.offsetHeight);
tmpNode.parentNode.removeChild(tmpNode);
}
return arrDPI;
},
formChange() {
this.$emit('change', this.form)
},
addValue(f) {
if (!this.form[f]) this.$set(this.form, f, 0)
let nw = Number(this.form[f]) + 1
this.$set(this.form, f, nw)
this.formChange()
},
reduceValue(f) {
if (!this.form[f]) this.$set(this.form, f, 0)
let nw = Number(this.form[f]) - 1
this.$set(this.form, f, nw)
this.formChange()
......@@ -88,7 +79,7 @@ export default {
</script>
<template>
<div class="drawer" :style="{animation:visible?`ltr-drawer-in .3s 1ms`:`ltr-drawer-out .3s 1ms`}" v-show="visible">
<div class="drawer" :style="{animation:`ltr-drawer-in .3s 1ms`}" v-show="visible">
<div class="title">
图片编辑
</div>
......@@ -96,7 +87,7 @@ export default {
<el-form size="small" style="" :model="form" label-position="left" label-width="30px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="x:" prop="sx">
<el-form-item label="x:" prop="x">
<div class="form-content">
<el-input @blur="formChange" v-model="form.x"></el-input>
<div class="set-value">
......
......@@ -3,6 +3,7 @@ import VueDragResizeRotate from "@gausszhou/vue-drag-resize-rotate";
import ImgSetting from './imgSetting.vue'
import bus from '@/bus'
import PrintDialog from "@/views/design/head/printDialog.vue";
import {debounce} from 'lodash'
const img = require('../../../assets/bg_tshirt_shadow.png')
export default {
......@@ -24,6 +25,7 @@ export default {
const num = getter.gridSpacing.slice(0, 2)
return 10 + 'px'
},
returnItem() {
return this.imgList[this.selectIndex]
}
......@@ -50,6 +52,7 @@ export default {
}
},
watch: {
imgList: {
handler() {
this.$store.commit('changeImgList', this.imgList)
......@@ -68,6 +71,7 @@ export default {
}
},
methods: {
debounce,
indexChange(v) {
console.log(v)
if (this.imgList.length === 0) return;
......@@ -104,6 +108,7 @@ export default {
this.getBackFile([it])
},
ev(type) {
if(this.selectIndex===-1) this.selectIndex = 0
if (!this.imgList[this.selectIndex]) return
let w = document.getElementById('line').clientWidth / 2
......@@ -131,12 +136,13 @@ export default {
}
},
formChange(form) {
if(this.selectIndex===-1) this.selectIndex = 0
if (!this.imgList[this.selectIndex]) return
let f = JSON.parse(JSON.stringify(form))
let x_mm = f.x / 0.84
let w_mm = f.w / 0.84
let h_mm = f.h / 0.84
let y_mm = f.y / 0.84
let x_mm = f.x
let w_mm = f.w
let h_mm = f.h
let y_mm = f.y
this.$set(this.imgList[this.selectIndex], 'x', x_mm)
this.$set(this.imgList[this.selectIndex], 'y', y_mm)
this.$set(this.imgList[this.selectIndex], 'w', w_mm)
......@@ -146,14 +152,20 @@ export default {
close() {
this.showImgSetting = false
},
onDrag(left, top) {
if (!this.imgList[this.selectIndex]) return
this.$set(this.imgList[this.selectIndex], 'x', left)
this.$set(this.imgList[this.selectIndex], 'y', top)
onDragDebounce(left, top) {
// console.log(left,top,'2')
// if (!this.imgList[this.selectIndex]) return
// this.imgList[this.selectIndex].x = left
// this.imgList[this.selectIndex].y = top
// this.$set(this.imgList[this.selectIndex], 'x', left)
// this.$set(this.imgList[this.selectIndex], 'y', top)
},
dragStop(left, top) {
if(this.selectIndex===-1) this.selectIndex = 0
if (!this.imgList[this.selectIndex]) return
this.$set(this.imgList[this.selectIndex], 'x', left)
this.$set(this.imgList[this.selectIndex], 'y', top)
this.actionList.unshift({
t: 'drag',
x: left,
......@@ -162,7 +174,14 @@ export default {
this.$store.commit('changeActionList', this.actionList)
},
resizeStop(x, y, w, h) {
if(this.selectIndex===-1) this.selectIndex = 0
if (!this.imgList[this.selectIndex]) return
this.$set(this.imgList[this.selectIndex], 'w', w)
this.$set(this.imgList[this.selectIndex], 'h', h)
this.$set(this.imgList[this.selectIndex], 'x', x)
this.$set(this.imgList[this.selectIndex], 'y', y)
this.actionList.unshift({
t: 'resize',
x,
......@@ -173,14 +192,10 @@ export default {
this.$store.commit('changeActionList', this.actionList)
},
resizing(x, y, w, h) {
if (!this.imgList[this.selectIndex]) return
this.$set(this.imgList[this.selectIndex], 'x', x)
this.$set(this.imgList[this.selectIndex], 'y', y)
this.$set(this.imgList[this.selectIndex], 'w', w)
this.$set(this.imgList[this.selectIndex], 'h', h)
},
rotating(angle) {
if(this.selectIndex===-1) this.selectIndex = 0
if (!this.imgList[this.selectIndex]) return
this.$set(this.imgList[this.selectIndex], 'r', angle)
},
......@@ -362,7 +377,8 @@ export default {
};
return img;
}
},
}
,
mounted() {
this.imgHeight = window.screen.height + 'px'
......@@ -452,7 +468,7 @@ export default {
:draggable="true"
:resizable="true"
:rotatable="true"
@dragging="onDrag"
@dragging="onDragDebounce"
@dragstop="dragStop"
@resizing="resizing"
@resizestop="resizeStop"
......
......@@ -20,14 +20,14 @@ export default {
}
},
created() {
let user = this.$dataStore.get('user')
this.company = this.$dataStore.get('company')
if (this.company) {
this.form.company = this.company.domain
}
if (user) {
return this.$router.push('/design')
}
// if (user) {
// return this.$router.push('/design')
// }
this.getCompanyList()
},
mounted() {
......
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