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
1fa9964a
Commit
1fa9964a
authored
Apr 01, 2026
by
linjinhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修改强制生产多面情况
parent
2d7e7247
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
8 deletions
+24
-8
src/server/entity/function.js
+8
-2
src/server/utils/index.js
+12
-2
src/views/design/main/index.vue
+4
-4
No files found.
src/server/entity/function.js
View file @
1fa9964a
...
@@ -175,10 +175,12 @@ export default {
...
@@ -175,10 +175,12 @@ export default {
return
res
.
json
(
data
);
return
res
.
json
(
data
);
}
}
console
.
log
(
"data"
,
data
);
console
.
log
(
"data"
,
data
);
let
path
,
processDesign
;
let
path
,
processDesign
,
processDesignA
,
processDesignB
;
if
(
data
.
data
)
{
if
(
data
.
data
)
{
path
=
data
.
data
.
path
;
path
=
data
.
data
.
path
;
processDesign
=
data
.
data
.
processDesign
;
processDesign
=
data
.
data
.
processDesign
;
processDesignA
=
data
.
data
.
processDesignA
;
processDesignB
=
data
.
data
.
processDesignB
;
}
else
{
}
else
{
path
=
data
.
message
;
path
=
data
.
message
;
}
}
...
@@ -194,7 +196,11 @@ export default {
...
@@ -194,7 +196,11 @@ export default {
const
downloadFunc
=
const
downloadFunc
=
params
.
device
===
2
?
downloadOtherImage
:
downloadImage
;
params
.
device
===
2
?
downloadOtherImage
:
downloadImage
;
const
result
=
await
downloadFunc
(
files
,
processDesign
);
const
result
=
await
downloadFunc
(
files
,
{
processDesign
,
processDesignA
,
processDesignB
,
});
console
.
log
(
"result200"
,
result
);
console
.
log
(
"result200"
,
result
);
res
.
json
({
code
:
200
,
data
:
result
});
res
.
json
({
code
:
200
,
data
:
result
});
...
...
src/server/utils/index.js
View file @
1fa9964a
...
@@ -141,17 +141,27 @@ export const downloadImage = (list, isForcedProduction) => {
...
@@ -141,17 +141,27 @@ export const downloadImage = (list, isForcedProduction) => {
if
(
isArchive
)
{
if
(
isArchive
)
{
// 处理压缩文件
// 处理压缩文件
item
.
list
=
await
zip
(
filePath
,
dirPath
);
item
.
list
=
await
zip
(
filePath
,
dirPath
);
if
(
Object
.
keys
(
isForcedProduction
).
length
>
0
)
{
item
.
list
=
item
.
list
.
map
((
el
)
=>
{
if
(
el
.
designId
.
includes
(
"A"
))
{
el
.
isForcedProduction
=
isForcedProduction
.
processDesignA
;
}
else
if
(
el
.
designId
.
includes
(
"B"
))
{
el
.
isForcedProduction
=
isForcedProduction
.
processDesignB
;
}
return
{
...
el
};
});
}
console
.
log
(
"list"
,
item
.
list
);
console
.
log
(
"list"
,
item
.
list
);
}
else
{
}
else
{
// 处理普通图片文件
// 处理普通图片文件
if
(
!
item
.
list
)
item
.
list
=
[];
if
(
!
item
.
list
)
item
.
list
=
[];
const
originalName
=
item
.
url
.
split
(
"/"
).
pop
();
const
originalName
=
item
.
url
.
split
(
"/"
).
pop
();
if
(
isForcedProduction
)
{
if
(
isForcedProduction
.
processDesign
)
{
item
.
list
.
push
({
item
.
list
.
push
({
fileName
,
fileName
,
productionFile
:
filePath
,
productionFile
:
filePath
,
designId
:
originalName
.
split
(
"_GCPS"
)[
0
],
designId
:
originalName
.
split
(
"_GCPS"
)[
0
],
isForcedProduction
:
isForcedProduction
,
isForcedProduction
:
isForcedProduction
.
processDesign
,
});
});
}
else
{
}
else
{
item
.
list
.
push
({
item
.
list
.
push
({
...
...
src/views/design/main/index.vue
View file @
1fa9964a
...
@@ -1829,16 +1829,16 @@ export default {
...
@@ -1829,16 +1829,16 @@ export default {
<b
<b
style=
"color:#f2e403"
style=
"color:#f2e403"
v-if=
"
v-if=
"
selectImgList.
some((el) => el.isForcedProduction)
&&
selectImgList.
length
&&
selectImgList
.length
selectImgList
[selectImgIndex].isForcedProduction
"
"
>
该生产单素材已经被强制调整适配台版大小,请关注
</b
>
该生产单素材已经被强制调整适配台版大小,请关注
</b
>
>
<b
<b
style=
"color:green"
style=
"color:green"
v-if=
"
v-if=
"
!selectImgList.some((el) => el.isForcedProduction)
&&
selectImgList.length
&&
selectImgList.length
!selectImgList[selectImgIndex].isForcedProduction
"
"
>
该单无需拖动设计,直接打印
</b
>
该单无需拖动设计,直接打印
</b
>
>
...
...
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