Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
electron-printer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhuzhequan
electron-printer
Commits
67ac7f96
Commit
67ac7f96
authored
Apr 29, 2025
by
zhuzhequan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加自动打印逻辑
parent
7daef452
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
17 deletions
+15
-17
config/env.json
+2
-2
src/views/design/head/index.vue
+3
-4
src/views/design/main/index.vue
+10
-11
No files found.
config/env.json
View file @
67ac7f96
{
{
"apiApiHost"
:
"http://10.168.31.
142
:8060/api"
,
"apiApiHost"
:
"http://10.168.31.
230
:8060/api"
,
"fileApiUrl"
:
"http://10.168.31.
142
:80/upload/factory"
,
"fileApiUrl"
:
"http://10.168.31.
230
:80/upload/factory"
,
"visionUrl"
:
"https://console.jomalls.com"
"visionUrl"
:
"https://console.jomalls.com"
}
}
src/views/design/head/index.vue
View file @
67ac7f96
...
@@ -296,11 +296,11 @@ export default {
...
@@ -296,11 +296,11 @@ export default {
);
);
this
.
detail
=
findByPodProductionNo
.
data
;
this
.
detail
=
findByPodProductionNo
.
data
;
let
imageResList
=
[];
let
imageResList
=
[];
let
designImagesCanvasJsonList
=
null
;
let
designImagesCanvasJsonList
=
this
.
detail
.
drParam
;
//
'[{"options":{"rect_info":{"rectWidth":278,"rectHeight":311,"leftDistance":164,"topDistance":134},"title":"正","json":{"version":"5.4.0","objects":[{"type":"rect","version":"5.4.0","originX":"left","originY":"top","left":239.6414188934889,"top":100.125,"width":536.7171622130222,"height":603.75,"fill":"rgba(255,255,255,0)","stroke":null,"strokeWidth":1,"strokeDashArray":null,"strokeLineCap":"butt","strokeDashOffset":0,"strokeLineJoin":"miter","strokeUniform":false,"strokeMiterLimit":4,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"backgroundColor":"","fillRule":"nonzero","paintFirst":"fill","globalCompositeOperation":"source-over","skewX":0,"skewY":0,"rx":0,"ry":0,"mediaType":"bg","objectCaching":true},{"type":"image","version":"5.4.0","originX":"left","originY":"top","left":386.625,"top":236.62500000000006,"width":319,"height":345,"fill":"rgb(0,0,0)","stroke":null,"strokeWidth":0,"strokeDashArray":null,"strokeLineCap":"butt","strokeDashOffset":0,"strokeLineJoin":"miter","strokeUniform":false,"strokeMiterLimit":4,"scaleX":0.464984939759036,"scaleY":0.464984939759036,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"backgroundColor":"","fillRule":"nonzero","paintFirst":"fill","globalCompositeOperation":"source-over","skewX":0,"skewY":0,"cropX":0,"cropY":0,"origWidth":319,"origHeight":345,"originImgUrl":"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/17/wdtq66-hzu9vgr-m9kyp1uk.png","mediaType":"material","filters":[],"src":"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/17/wdtq66-hzu9vgr-m9kyp1uk.png","objectCaching":true,"crossOrigin":"anonymous"},{"type":"image","version":"5.4.0","originX":"left","originY":"top","left":368.9238341968912,"top":378.725,"width":2584,"height":1544,"fill":"rgb(0,0,0)","stroke":null,"strokeWidth":0,"strokeDashArray":null,"strokeLineCap":"butt","strokeDashOffset":0,"strokeLineJoin":"miter","strokeUniform":false,"strokeMiterLimit":4,"scaleX":0.1080310880829015,"scaleY":0.1080310880829015,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"backgroundColor":"","fillRule":"nonzero","paintFirst":"fill","globalCompositeOperation":"source-over","skewX":0,"skewY":0,"cropX":0,"cropY":0,"origWidth":2584,"origHeight":1544,"originImgUrl":"https://jomalls-test.oss-cn-hangzhou.aliyuncs.com/local/design/2503/06/v3b1yw-m4y92pr-m7wt14fi.png","mediaType":"material","filters":[],"src":"https://jomalls-test.oss-cn-hangzhou.aliyuncs.com/local/design/2503/06/v3b1yw-m4y92pr-m7wt14fi.png","objectCaching":true,"crossOrigin":"anonymous"}],"id":"canvas_6378","width":1017,"height":805,"oldCutWidth":536.7171622130222,"oldCutHeight":603.75,"origWidth":2362,"origHeight":2657,"objectCaching":false},"objects":[{"type":"rect","version":"5.4.0","originX":"left","originY":"top","left":239.6414188934889,"top":100.125,"width":536.7171622130222,"height":603.75,"fill":"rgba(255,255,255,0)","stroke":null,"strokeWidth":1,"strokeDashArray":null,"strokeLineCap":"butt","strokeDashOffset":0,"strokeLineJoin":"miter","strokeUniform":false,"strokeMiterLimit":4,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"backgroundColor":"","fillRule":"nonzero","paintFirst":"fill","globalCompositeOperation":"source-over","skewX":0,"skewY":0,"rx":0,"ry":0,"mediaType":"bg","objectCaching":true},{"type":"image","version":"5.4.0","originX":"left","originY":"top","left":386.625,"top":236.62500000000006,"width":319,"height":345,"fill":"rgb(0,0,0)","stroke":null,"strokeWidth":0,"strokeDashArray":null,"strokeLineCap":"butt","strokeDashOffset":0,"strokeLineJoin":"miter","strokeUniform":false,"strokeMiterLimit":4,"scaleX":0.464984939759036,"scaleY":0.464984939759036,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"backgroundColor":"","fillRule":"nonzero","paintFirst":"fill","globalCompositeOperation":"source-over","skewX":0,"skewY":0,"cropX":0,"cropY":0,"origWidth":319,"origHeight":345,"originImgUrl":"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/17/wdtq66-hzu9vgr-m9kyp1uk.png","mediaType":"material","filters":[],"src":"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/17/wdtq66-hzu9vgr-m9kyp1uk.png","objectCaching":true,"crossOrigin":"anonymous"},{"type":"image","version":"5.4.0","originX":"left","originY":"top","left":368.9238341968912,"top":378.725,"width":2584,"height":1544,"fill":"rgb(0,0,0)","stroke":null,"strokeWidth":0,"strokeDashArray":null,"strokeLineCap":"butt","strokeDashOffset":0,"strokeLineJoin":"miter","strokeUniform":false,"strokeMiterLimit":4,"scaleX":0.1080310880829015,"scaleY":0.1080310880829015,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"backgroundColor":"","fillRule":"nonzero","paintFirst":"fill","globalCompositeOperation":"source-over","skewX":0,"skewY":0,"cropX":0,"cropY":0,"origWidth":2584,"origHeight":1544,"originImgUrl":"https://jomalls-test.oss-cn-hangzhou.aliyuncs.com/local/design/2503/06/v3b1yw-m4y92pr-m7wt14fi.png","mediaType":"material","filters":[],"src":"https://jomalls-test.oss-cn-hangzhou.aliyuncs.com/local/design/2503/06/v3b1yw-m4y92pr-m7wt14fi.png","objectCaching":true,"crossOrigin":"anonymous"}]},"canvasWidth":536.7171622130222,"canvasHeight":603.75,"list":[{"rate":1.930637274147562,"drawImage":[30.88054319999026,3.8612745482952335,286.371804860521,309.71245353253846],"y":2.000000000000057,"x":15.995000000000005,"src":"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/17/wdtq66-hzu9vgr-m9kyp1uk.png","img_width":148.33019578313247,"img_height":160.41980421686742},{"rate":1.930637274147562,"drawImage":[-3.2939872953577103,278.2048312046637,538.941896564164,322.0302973278132],"y":144.10000000000002,"x":-1.7061658031087745,"src":"https://jomalls-test.oss-cn-hangzhou.aliyuncs.com/local/design/2503/06/v3b1yw-m4y92pr-m7wt14fi.png","img_width":279.1523316062175,"img_height":166.79999999999993}]},{"options":{"rect_info":{"rectWidth":278,"rectHeight":311,"leftDistance":164,"topDistance":134},"title":"反","json":{"version":"5.4.0","objects":[{"type":"rect","version":"5.4.0","originX":"left","originY":"top","left":239.6414188934889,"top":100.125,"width":536.7171622130222,"height":603.75,"fill":"rgba(255,255,255,0)","stroke":null,"strokeWidth":1,"strokeDashArray":null,"strokeLineCap":"butt","strokeDashOffset":0,"strokeLineJoin":"miter","strokeUniform":false,"strokeMiterLimit":4,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"backgroundColor":"","fillRule":"nonzero","paintFirst":"fill","globalCompositeOperation":"source-over","skewX":0,"skewY":0,"rx":0,"ry":0,"mediaType":"bg","objectCaching":true},{"type":"image","version":"5.4.0","originX":"left","originY":"top","left":370.625,"top":292.82500000000005,"width":612,"height":408,"fill":"rgb(0,0,0)","stroke":null,"strokeWidth":0,"strokeDashArray":null,"strokeLineCap":"butt","strokeDashOffset":0,"strokeLineJoin":"miter","strokeUniform":false,"strokeMiterLimit":4,"scaleX":0.4466176470588235,"scaleY":0.4466176470588235,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"backgroundColor":"","fillRule":"nonzero","paintFirst":"fill","globalCompositeOperation":"source-over","skewX":0,"skewY":0,"cropX":0,"cropY":0,"origWidth":612,"origHeight":408,"originImgUrl":"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/18/1x7lat8-3xppur-m9mk4w2u.jpg","mediaType":"material","filters":[],"src":"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/18/1x7lat8-3xppur-m9mk4w2u.jpg","objectCaching":true,"crossOrigin":"anonymous"}],"id":"canvas_6379","width":1017,"height":805,"oldCutWidth":536.7171622130222,"oldCutHeight":603.75,"origWidth":2362,"origHeight":2657,"objectCaching":false},"objects":[{"type":"rect","version":"5.4.0","originX":"left","originY":"top","left":239.6414188934889,"top":100.125,"width":536.7171622130222,"height":603.75,"fill":"rgba(255,255,255,0)","stroke":null,"strokeWidth":1,"strokeDashArray":null,"strokeLineCap":"butt","strokeDashOffset":0,"strokeLineJoin":"miter","strokeUniform":false,"strokeMiterLimit":4,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"backgroundColor":"","fillRule":"nonzero","paintFirst":"fill","globalCompositeOperation":"source-over","skewX":0,"skewY":0,"rx":0,"ry":0,"mediaType":"bg","objectCaching":true},{"type":"image","version":"5.4.0","originX":"left","originY":"top","left":370.625,"top":292.82500000000005,"width":612,"height":408,"fill":"rgb(0,0,0)","stroke":null,"strokeWidth":0,"strokeDashArray":null,"strokeLineCap":"butt","strokeDashOffset":0,"strokeLineJoin":"miter","strokeUniform":false,"strokeMiterLimit":4,"scaleX":0.4466176470588235,"scaleY":0.4466176470588235,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"backgroundColor":"","fillRule":"nonzero","paintFirst":"fill","globalCompositeOperation":"source-over","skewX":0,"skewY":0,"cropX":0,"cropY":0,"origWidth":612,"origHeight":408,"originImgUrl":"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/18/1x7lat8-3xppur-m9mk4w2u.jpg","mediaType":"material","filters":[],"src":"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/18/1x7lat8-3xppur-m9mk4w2u.jpg","objectCaching":true,"crossOrigin":"anonymous"}]},"canvasWidth":536.7171622130222,"canvasHeight":603.75,"list":[{"rate":1.930637274147562,"drawImage":[-0.00965318637072903,112.3630893553882,527.7010861427531,351.80072409516873],"y":58.200000000000045,"x":-0.0049999999999954525,"src":"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/18/1x7lat8-3xppur-m9mk4w2u.jpg","img_width":273.33,"img_height":182.22}]}]';
//
"[{\"options\":{\"rect_info\":{\"rectWidth\":278,\"rectHeight\":311,\"leftDistance\":164,\"topDistance\":134},\"title\":\"正\",\"json\":{\"version\":\"5.4.0\",\"objects\":[{\"type\":\"rect\",\"version\":\"5.4.0\",\"originX\":\"left\",\"originY\":\"top\",\"left\":239.6414188934889,\"top\":100.125,\"width\":536.7171622130222,\"height\":603.75,\"fill\":\"rgba(255,255,255,0)\",\"stroke\":null,\"strokeWidth\":1,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":1,\"scaleY\":1,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"rx\":0,\"ry\":0,\"mediaType\":\"bg\",\"objectCaching\":true},{\"type\":\"image\",\"version\":\"5.4.0\",\"originX\":\"left\",\"originY\":\"top\",\"left\":386.625,\"top\":236.62500000000006,\"width\":319,\"height\":345,\"fill\":\"rgb(0,0,0)\",\"stroke\":null,\"strokeWidth\":0,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":0.464984939759036,\"scaleY\":0.464984939759036,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"cropX\":0,\"cropY\":0,\"origWidth\":319,\"origHeight\":345,\"originImgUrl\":\"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/17/wdtq66-hzu9vgr-m9kyp1uk.png\",\"mediaType\":\"material\",\"filters\":[],\"src\":\"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/17/wdtq66-hzu9vgr-m9kyp1uk.png\",\"objectCaching\":true,\"crossOrigin\":\"anonymous\"},{\"type\":\"image\",\"version\":\"5.4.0\",\"originX\":\"left\",\"originY\":\"top\",\"left\":368.9238341968912,\"top\":378.725,\"width\":2584,\"height\":1544,\"fill\":\"rgb(0,0,0)\",\"stroke\":null,\"strokeWidth\":0,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":0.1080310880829015,\"scaleY\":0.1080310880829015,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"cropX\":0,\"cropY\":0,\"origWidth\":2584,\"origHeight\":1544,\"originImgUrl\":\"https://jomalls-test.oss-cn-hangzhou.aliyuncs.com/local/design/2503/06/v3b1yw-m4y92pr-m7wt14fi.png\",\"mediaType\":\"material\",\"filters\":[],\"src\":\"https://jomalls-test.oss-cn-hangzhou.aliyuncs.com/local/design/2503/06/v3b1yw-m4y92pr-m7wt14fi.png\",\"objectCaching\":true,\"crossOrigin\":\"anonymous\"}],\"id\":\"canvas_6378\",\"width\":1017,\"height\":805,\"oldCutWidth\":536.7171622130222,\"oldCutHeight\":603.75,\"origWidth\":2362,\"origHeight\":2657,\"objectCaching\":false},\"objects\":[{\"type\":\"rect\",\"version\":\"5.4.0\",\"originX\":\"left\",\"originY\":\"top\",\"left\":239.6414188934889,\"top\":100.125,\"width\":536.7171622130222,\"height\":603.75,\"fill\":\"rgba(255,255,255,0)\",\"stroke\":null,\"strokeWidth\":1,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":1,\"scaleY\":1,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"rx\":0,\"ry\":0,\"mediaType\":\"bg\",\"objectCaching\":true},{\"type\":\"image\",\"version\":\"5.4.0\",\"originX\":\"left\",\"originY\":\"top\",\"left\":386.625,\"top\":236.62500000000006,\"width\":319,\"height\":345,\"fill\":\"rgb(0,0,0)\",\"stroke\":null,\"strokeWidth\":0,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":0.464984939759036,\"scaleY\":0.464984939759036,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"cropX\":0,\"cropY\":0,\"origWidth\":319,\"origHeight\":345,\"originImgUrl\":\"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/17/wdtq66-hzu9vgr-m9kyp1uk.png\",\"mediaType\":\"material\",\"filters\":[],\"src\":\"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/17/wdtq66-hzu9vgr-m9kyp1uk.png\",\"objectCaching\":true,\"crossOrigin\":\"anonymous\"},{\"type\":\"image\",\"version\":\"5.4.0\",\"originX\":\"left\",\"originY\":\"top\",\"left\":368.9238341968912,\"top\":378.725,\"width\":2584,\"height\":1544,\"fill\":\"rgb(0,0,0)\",\"stroke\":null,\"strokeWidth\":0,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":0.1080310880829015,\"scaleY\":0.1080310880829015,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"cropX\":0,\"cropY\":0,\"origWidth\":2584,\"origHeight\":1544,\"originImgUrl\":\"https://jomalls-test.oss-cn-hangzhou.aliyuncs.com/local/design/2503/06/v3b1yw-m4y92pr-m7wt14fi.png\",\"mediaType\":\"material\",\"filters\":[],\"src\":\"https://jomalls-test.oss-cn-hangzhou.aliyuncs.com/local/design/2503/06/v3b1yw-m4y92pr-m7wt14fi.png\",\"objectCaching\":true,\"crossOrigin\":\"anonymous\"}]},\"canvasWidth\":536.7171622130222,\"canvasHeight\":603.75,\"list\":[{\"rate\":1.930637274147562,\"drawImage\":[30.88054319999026,3.8612745482952335,286.371804860521,309.71245353253846],\"y\":2.000000000000057,\"x\":15.995000000000005,\"src\":\"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/17/wdtq66-hzu9vgr-m9kyp1uk.png\",\"img_width\":148.33019578313247,\"img_height\":160.41980421686742},{\"rate\":1.930637274147562,\"drawImage\":[-3.2939872953577103,278.2048312046637,538.941896564164,322.0302973278132],\"y\":144.10000000000002,\"x\":-1.7061658031087745,\"src\":\"https://jomalls-test.oss-cn-hangzhou.aliyuncs.com/local/design/2503/06/v3b1yw-m4y92pr-m7wt14fi.png\",\"img_width\":279.1523316062175,\"img_height\":166.79999999999993}]},{\"options\":{\"rect_info\":{\"rectWidth\":278,\"rectHeight\":311,\"leftDistance\":164,\"topDistance\":134},\"title\":\"反\",\"json\":{\"version\":\"5.4.0\",\"objects\":[{\"type\":\"rect\",\"version\":\"5.4.0\",\"originX\":\"left\",\"originY\":\"top\",\"left\":239.6414188934889,\"top\":100.125,\"width\":536.7171622130222,\"height\":603.75,\"fill\":\"rgba(255,255,255,0)\",\"stroke\":null,\"strokeWidth\":1,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":1,\"scaleY\":1,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"rx\":0,\"ry\":0,\"mediaType\":\"bg\",\"objectCaching\":true},{\"type\":\"image\",\"version\":\"5.4.0\",\"originX\":\"left\",\"originY\":\"top\",\"left\":370.625,\"top\":292.82500000000005,\"width\":612,\"height\":408,\"fill\":\"rgb(0,0,0)\",\"stroke\":null,\"strokeWidth\":0,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":0.4466176470588235,\"scaleY\":0.4466176470588235,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"cropX\":0,\"cropY\":0,\"origWidth\":612,\"origHeight\":408,\"originImgUrl\":\"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/18/1x7lat8-3xppur-m9mk4w2u.jpg\",\"mediaType\":\"material\",\"filters\":[],\"src\":\"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/18/1x7lat8-3xppur-m9mk4w2u.jpg\",\"objectCaching\":true,\"crossOrigin\":\"anonymous\"}],\"id\":\"canvas_6379\",\"width\":1017,\"height\":805,\"oldCutWidth\":536.7171622130222,\"oldCutHeight\":603.75,\"origWidth\":2362,\"origHeight\":2657,\"objectCaching\":false},\"objects\":[{\"type\":\"rect\",\"version\":\"5.4.0\",\"originX\":\"left\",\"originY\":\"top\",\"left\":239.6414188934889,\"top\":100.125,\"width\":536.7171622130222,\"height\":603.75,\"fill\":\"rgba(255,255,255,0)\",\"stroke\":null,\"strokeWidth\":1,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":1,\"scaleY\":1,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"rx\":0,\"ry\":0,\"mediaType\":\"bg\",\"objectCaching\":true},{\"type\":\"image\",\"version\":\"5.4.0\",\"originX\":\"left\",\"originY\":\"top\",\"left\":370.625,\"top\":292.82500000000005,\"width\":612,\"height\":408,\"fill\":\"rgb(0,0,0)\",\"stroke\":null,\"strokeWidth\":0,\"strokeDashArray\":null,\"strokeLineCap\":\"butt\",\"strokeDashOffset\":0,\"strokeLineJoin\":\"miter\",\"strokeUniform\":false,\"strokeMiterLimit\":4,\"scaleX\":0.4466176470588235,\"scaleY\":0.4466176470588235,\"angle\":0,\"flipX\":false,\"flipY\":false,\"opacity\":1,\"shadow\":null,\"visible\":true,\"backgroundColor\":\"\",\"fillRule\":\"nonzero\",\"paintFirst\":\"fill\",\"globalCompositeOperation\":\"source-over\",\"skewX\":0,\"skewY\":0,\"cropX\":0,\"cropY\":0,\"origWidth\":612,\"origHeight\":408,\"originImgUrl\":\"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/18/1x7lat8-3xppur-m9mk4w2u.jpg\",\"mediaType\":\"material\",\"filters\":[],\"src\":\"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/18/1x7lat8-3xppur-m9mk4w2u.jpg\",\"objectCaching\":true,\"crossOrigin\":\"anonymous\"}]},\"canvasWidth\":536.7171622130222,\"canvasHeight\":603.75,\"list\":[{\"rate\":1.930637274147562,\"drawImage\":[-0.00965318637072903,112.3630893553882,527.7010861427531,351.80072409516873],\"y\":58.200000000000045,\"x\":-0.0049999999999954525,\"src\":\"https://jomalls.oss-cn-hangzhou.aliyuncs.com/local/design/2504/18/1x7lat8-3xppur-m9mk4w2u.jpg\",\"img_width\":273.33,\"img_height\":182.22}]}]"
if
(
designImagesCanvasJsonList
)
{
if
(
designImagesCanvasJsonList
)
{
designImagesCanvasJsonList
=
JSON
.
parse
(
designImagesCanvasJsonList
);
designImagesCanvasJsonList
=
JSON
.
parse
(
designImagesCanvasJsonList
);
console
.
log
(
designImagesCanvasJsonList
,
"designImagesCanvasJsonList"
);
//
console.log(designImagesCanvasJsonList, "designImagesCanvasJsonList");
let
imageList
=
await
this
.
canvasToImage
(
designImagesCanvasJsonList
);
let
imageList
=
await
this
.
canvasToImage
(
designImagesCanvasJsonList
);
let
fm
=
new
FormData
();
let
fm
=
new
FormData
();
for
(
let
img
of
imageList
)
{
for
(
let
img
of
imageList
)
{
...
@@ -313,7 +313,6 @@ export default {
...
@@ -313,7 +313,6 @@ export default {
item
.
productionFile
=
item
.
url
;
item
.
productionFile
=
item
.
url
;
});
});
imageResList
=
Sres
.
data
;
imageResList
=
Sres
.
data
;
console
.
log
(
imageResList
,
"imageResList"
);
this
.
imgList
=
[];
this
.
imgList
=
[];
}
}
this
.
$store
.
commit
(
"setProductDetail"
,
findByPodProductionNo
.
data
);
this
.
$store
.
commit
(
"setProductDetail"
,
findByPodProductionNo
.
data
);
...
...
src/views/design/main/index.vue
View file @
67ac7f96
...
@@ -519,20 +519,21 @@ export default {
...
@@ -519,20 +519,21 @@ export default {
});
});
},
},
getComputedName
(
title
)
{
getComputedName
(
title
)
{
let
img
=
this
.
selectImgList
.
find
((
it
)
=>
it
.
title
===
title
);
let
img
=
this
.
selectImgList
.
find
((
it
)
=>
it
.
title
===
title
||
it
.
title
.
includes
(
title
)
);
return
img
?.
designId
;
return
img
?.
designId
;
},
},
getComputedTitle
(
title
)
{
getComputedTitle
(
title
)
{
console
.
log
(
this
.
selectImgList
,
"this.selectImgList"
);
console
.
log
(
this
.
selectImgList
,
"this.selectImgList"
);
let
img
=
this
.
selectImgList
.
find
((
it
)
=>
it
.
title
===
title
);
let
img
=
this
.
selectImgList
.
find
((
it
)
=>
it
.
title
===
title
||
it
.
title
.
includes
(
title
)
);
return
img
?.
productionFile
;
return
img
?.
productionFile
;
},
},
getBackFile
({
files
,
size
},
callback
)
{
getBackFile
({
files
,
size
},
callback
)
{
let
that
=
this
;
let
that
=
this
;
let
bw
=
window
.
getComputedStyle
(
let
bw
=
document
.
getElementById
(
"line"
).
clientWidth
;
// let bw = window.getComputedStyle(
document
.
getElementsByClassName
(
"grid"
)[
0
]
document
.
getElementsByClassName
(
"grid"
)[
0
]
).
width
;
).
width
;
bw
=
Number
(
bw
.
replace
(
"px"
,
""
));
//
bw = Number(bw.replace("px", ""));
for
(
let
i
=
0
;
i
<
files
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
files
.
length
;
i
++
)
{
files
[
i
].
url
=
files
[
i
].
productionFile
||
files
[
i
].
url
;
files
[
i
].
url
=
files
[
i
].
productionFile
||
files
[
i
].
url
;
that
.
$nextTick
(
async
()
=>
{
that
.
$nextTick
(
async
()
=>
{
...
@@ -922,20 +923,18 @@ export default {
...
@@ -922,20 +923,18 @@ export default {
style=
"margin: 5px;width: auto;"
style=
"margin: 5px;width: auto;"
border
border
:data=
"detail.imageAry"
:data=
"detail.imageAry"
:header-cell-style=
"
{ 'text-align': 'center' }"
:header-cell-style=
"
{ 'text-align': 'center' }">
>
<el-table-column
align=
"center"
label=
"打印区域"
<el-table-column
label=
"打印区域"
prop=
"title"
prop=
"title"
align=
"center"
align=
"center"
width=
"100px"
width=
"100px"
></el-table-column>
></el-table-column>
<el-table-column
label=
"效果图"
prop=
"title"
>
<el-table-column
align=
"center"
label=
"效果图"
prop=
"title"
>
<template
slot-scope=
"
{
row
}">
<template
slot-scope=
"
{
row
}">
<img
class=
"full-width"
:src=
"row.url"
alt=
""
/>
<img
class=
"full-width"
:src=
"row.url"
alt=
""
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"素材图"
prop=
"title"
>
<el-table-column
align=
"center"
label=
"素材图"
prop=
"title"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<img
<img
style=
"cursor: pointer"
style=
"cursor: pointer"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment