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
0bc2b635
Commit
0bc2b635
authored
Apr 28, 2025
by
linjinhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整素材信息展示结构
parent
ee10b4cf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
47 deletions
+74
-47
src/server/entity/function.js
+2
-3
src/views/design/head/index.vue
+3
-1
src/views/design/main/index.vue
+69
-43
No files found.
src/server/entity/function.js
View file @
0bc2b635
...
...
@@ -68,7 +68,6 @@ export default {
}
},
downloadBySubOrderNumber
:
async
(
req
,
res
)
=>
{
console
.
log
(
66
,
req
.
body
);
const
params
=
[...
req
.
body
];
params
.
pop
();
const
token
=
req
.
headers
[
"jwt-token"
];
...
...
@@ -81,13 +80,13 @@ export default {
{
headers
:
{
"jwt-token"
:
token
}
}
);
let
files
=
[];
if
(
data
.
code
===
200
)
{
files
=
data
.
data
;
files
=
files
.
map
((
el
)
=>
{
return
{
url
:
`
${
fileEnv
}${
el
}
`
};
});
// res.json({ code: 200, data: "" });
// return;
if
(
req
.
body
[
1
]
===
1
)
{
downloadImage
(
files
)
.
then
((
data
)
=>
{
...
...
src/views/design/head/index.vue
View file @
0bc2b635
...
...
@@ -219,7 +219,7 @@ export default {
}
);
this
.
detail
=
findByPodProductionNo
.
data
;
console
.
log
(
219
,
this
.
detail
);
//
console.log(219, this.detail);
this
.
$store
.
commit
(
"setProductDetail"
,
findByPodProductionNo
.
data
);
...
...
@@ -252,6 +252,8 @@ export default {
}
else
{
newImgList
=
res
.
data
;
}
console
.
log
(
"newImgList"
,
newImgList
);
// 延迟后强制激活窗口
if
(
this
.
desktopDevice
!==
1
)
{
if
(
this
.
imgList
.
length
)
{
...
...
src/views/design/main/index.vue
View file @
0bc2b635
...
...
@@ -180,12 +180,12 @@ export default {
watch
:
{
imgList
:
{
handler
(
newValue
)
{
console
.
log
(
169
,
newValue
);
//
console.log(169, newValue);
if
(
this
.
imgList
.
length
>
0
)
{
this
.
$nextTick
(()
=>
{
let
dom
=
document
.
getElementsByClassName
(
"drr"
);
console
.
log
(
"dom"
,
dom
);
//
console.log("dom", dom);
this
.
imgList
.
forEach
((
el
,
i
)
=>
{
let
dom_i
=
document
.
getElementsByClassName
(
"drr"
)[
i
];
...
...
@@ -225,21 +225,28 @@ export default {
productDetail
(
newValue
)
{
this
.
detail
=
{
...
newValue
};
if
(
typeof
this
.
detail
.
imageAry
==
"string"
)
{
this
.
detail
.
imageAry
=
JSON
.
parse
(
this
.
detail
.
imageAry
).
map
((
el
)
=>
{
if
(
!
el
.
title
)
el
.
title
=
1
;
return
el
;
});
const
otherArr
=
this
.
detail
.
imageAry
.
filter
((
el
)
=>
el
.
title
==
1
);
this
.
detail
.
AimageAry
=
[
...
this
.
detail
.
imageAry
.
filter
((
el
)
=>
el
.
title
===
"正"
),
...
otherArr
,
];
this
.
detail
.
BimageAry
=
[
...
this
.
detail
.
imageAry
.
filter
((
el
)
=>
el
.
title
===
"反"
),
...
otherArr
,
];
this
.
detail
.
imageAry
=
JSON
.
parse
(
this
.
detail
.
imageAry
).
filter
(
(
el
)
=>
el
.
title
);
const
groupedData
=
this
.
detail
.
imageAry
.
reduce
((
acc
,
obj
)
=>
{
const
titleKey
=
obj
.
title
;
if
(
!
acc
[
titleKey
])
{
acc
[
titleKey
]
=
{
title
:
titleKey
,
viewImgList
:
[
obj
],
sourceImgList
:
[],
};
}
else
{
acc
[
titleKey
].
viewImgList
.
push
(
obj
);
}
return
acc
;
},
{});
this
.
detail
.
imageAry
=
Object
.
values
(
groupedData
);
console
.
log
(
"imageAry"
,
this
.
detail
.
imageAry
);
}
console
.
log
(
"detail"
,
this
.
detail
);
},
changeCheckFn
(
value
)
{
console
.
log
(
"check"
,
value
);
},
},
methods
:
{
...
...
@@ -858,21 +865,27 @@ export default {
<div
class=
"pic-title"
>
素材图
</div>
</el-col>
<el-row
class=
"border-row"
>
<el-col
:span=
"6"
class=
"text-center"
><div>
A面
</div></el-col>
<el-row
class=
"border-row"
v-for=
"(item, index) in detail.imageAry"
:key=
"index"
>
<el-col
:span=
"6"
class=
"text-center"
><div>
{{
item
.
title
}}
</div></el-col
>
<el-col
:span=
"9"
class=
"border-col text-center"
>
<el-carousel
v-if=
"
detail.AimageAry
?.length"
v-if=
"
item.viewImgList
?.length"
height=
"170px"
:autoplay=
"false"
indicator-position=
"none"
style=
"width: 100%;"
>
<el-carousel-item
v-for=
"(i
tem, index) in detail.AimageAry
"
:key=
"i
ndex
"
v-for=
"(i
mg, i) in item.viewImgList
"
:key=
"i"
>
<img
class=
"full-width"
:src=
"i
tem
.url"
alt=
""
/>
<img
class=
"full-width"
:src=
"i
mg
.url"
alt=
""
/>
</el-carousel-item>
</el-carousel>
<div
v-else
>
</div>
...
...
@@ -881,32 +894,45 @@ export default {
:span=
"9"
style=
"overflow: hidden;align-items: stretch;flex-grow: 1"
>
<el-checkbox-group
v-if=
"
selectImgList
.length"
<
!--
<
el-checkbox-group
v-if=
"
item.sourceImgList?
.length"
v-model=
"checkList"
>
<el-checkbox
:label=
"selectImgList[0]"
:class=
"
{
imgchecked: checkList.includes(selectImgList[0]),
}"
<el-checkbox
v-for=
"(img, i) in item.sourceImgList"
:key=
"i"
:label=
"img"
:class=
"
{
imgchecked: checkList.includes(img),
}"
>
<div
class=
"img-item"
@
click
.
stop
.
prevent=
"selectImg(img, 0)"
>
<img
style=
"width: 140px"
:src=
"img.productionFile"
/>
<span>
{{
img
.
designId
}}
</span>
</div>
</el-checkbox>
</el-checkbox-group>
-->
<el-carousel
v-if=
"item.sourceImgList?.length"
height=
"170px"
:autoplay=
"false"
indicator-position=
"none"
style=
"width: 100%;"
>
<el-carousel-item
v-for=
"(img, i) in item.sourceImgList"
:key=
"i"
>
<div
class=
"img-item"
@
click
.
stop
.
prevent=
"selectImg(selectImgList[0], 0)"
>
<img
style=
"width: 140px"
:src=
"selectImgList[0].productionFile"
/>
<span>
{{
selectImgList
[
0
].
designId
}}
</span>
</div>
</el-checkbox>
</el-checkbox-group>
<el-checkbox
@
change=
"changeCheckFn"
>
<img
class=
"full-width"
:src=
"img.url"
alt=
""
/></el-checkbox>
</el-carousel-item>
</el-carousel>
</el-col>
</el-row>
<el-row
class=
"border-row"
>
<
!--
<
el-row
class=
"border-row"
>
<el-col
:span=
"6"
class=
"text-center"
><div>
B面
</div></el-col>
<el-col
:span=
"9"
class=
"border-col text-center"
>
<el-carousel
...
...
@@ -949,7 +975,7 @@ export default {
</el-checkbox>
</el-checkbox-group>
</el-col>
</el-row>
</el-row>
-->
</el-row>
</div>
<div
class=
"product-information"
>
...
...
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