Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-content
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 738b1c9c
authored
Jun 01, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bug修复
1 parent
b8ef2ee4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
7 deletions
src/views/discoverManager/addProd.vue
src/views/discoverManager/components/ProdCoverDialog/index.vue
src/views/discoverManager/addProd.vue
View file @
738b1c9
...
@@ -32,7 +32,10 @@
...
@@ -32,7 +32,10 @@
</div>
</div>
<div
slot=
"coverDetailSlot"
class=
"cover-Slot"
>
<div
slot=
"coverDetailSlot"
class=
"cover-Slot"
>
<Upload
v-if=
"!formObj.prodImg"
:empty=
"true"
@
clickEvent=
"openCoverDialog"
:default-style=
"
{width: '84px', height: '84px'}" :formObj="formObj" btnName="创建封面" attr="coverDetail">
</Upload>
<Upload
v-if=
"!formObj.prodImg"
:empty=
"true"
@
clickEvent=
"openCoverDialog"
:default-style=
"
{width: '84px', height: '84px'}" :formObj="formObj" btnName="创建封面" attr="coverDetail">
</Upload>
<Upload
v-else
:default-style=
"
{width: '84px', height: '84px'}" :formObj="formObj" btnName="创建封面" attr="prodImg">
</Upload>
<div
v-else
class=
"cover-wrap"
>
<div
class=
"title"
>
{{
formObj
.
proName
}}
</div>
<Upload
@
delImage=
"delCoverDetail"
@
editImage=
"editCoverDetail"
:default-style=
"
{width: '88px', height: '60px'}" :isEdit="true" :formObj="formObj" btnName="创建封面" attr="prodImg">
</Upload>
</div>
</div>
</div>
<div
slot=
"mainImageSlot"
class=
"main-image-Slot"
>
<div
slot=
"mainImageSlot"
class=
"main-image-Slot"
>
<Upload
placement=
"right"
tip=
"图片&视频只能上传一个"
fileType=
"all"
:formObj=
"formObj"
attr=
"imageUrl"
></Upload>
<Upload
placement=
"right"
tip=
"图片&视频只能上传一个"
fileType=
"all"
:formObj=
"formObj"
attr=
"imageUrl"
></Upload>
...
@@ -93,7 +96,7 @@
...
@@ -93,7 +96,7 @@
</div>
</div>
</div>
</div>
</glsx-combi-form>
</glsx-combi-form>
<ProdCoverDialog
@
closeDialog=
"closeDialog"
@
confirmDialog=
"confirmDialog"
v-if=
"coverVisible"
:visible=
"coverVisible"
></ProdCoverDialog>
<ProdCoverDialog
@
closeDialog=
"closeDialog"
@
confirmDialog=
"confirmDialog"
:formObj=
"coverDeatilFormObj"
v-if=
"coverVisible"
:visible=
"coverVisible"
></ProdCoverDialog>
</div>
</div>
<GLFooter
class=
"gl-footer"
>
<GLFooter
class=
"gl-footer"
>
<el-button
class=
"btn-cancle"
@
click=
"goListPage"
>
取消
</el-button>
<el-button
class=
"btn-cancle"
@
click=
"goListPage"
>
取消
</el-button>
...
@@ -128,6 +131,7 @@ export default {
...
@@ -128,6 +131,7 @@ export default {
isEditType
:
false
,
isEditType
:
false
,
coverVisible
:
false
,
coverVisible
:
false
,
routeInfo
:
{},
routeInfo
:
{},
coverDeatilFormObj
:
{},
contentType
:
{
contentType
:
{
1
:
'特色产品'
,
1
:
'特色产品'
,
2
:
'案例视频'
,
2
:
'案例视频'
,
...
@@ -166,8 +170,10 @@ export default {
...
@@ -166,8 +170,10 @@ export default {
{
{
required
:
true
,
required
:
true
,
validator
:
(
rule
,
value
,
callback
)
=>
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
!
this
.
formObj
.
proName
||
!
this
.
formObj
.
prodImg
)
{
if
(
!
this
.
formObj
.
prodImg
){
callback
(
new
Error
(
'封面详情不能为空'
))
callback
(
new
Error
(
'产品封面不能为空'
))
}
else
if
(
!
this
.
formObj
.
proName
)
{
callback
(
new
Error
(
'产品名称不能为空'
))
}
else
{
}
else
{
callback
()
callback
()
}
}
...
@@ -402,6 +408,18 @@ export default {
...
@@ -402,6 +408,18 @@ export default {
showBox
(
e
,
key
){
showBox
(
e
,
key
){
if
(
e
){
this
[
key
]
=
true
}
if
(
e
){
this
[
key
]
=
true
}
},
},
editCoverDetail
(){
this
.
coverDeatilFormObj
=
{
title
:
this
.
formObj
.
proName
,
url
:
this
.
formObj
.
prodImg
}
this
.
coverVisible
=
true
},
delCoverDetail
(){
this
.
formObj
.
proName
=
''
this
.
formObj
.
prodImg
=
''
this
.
coverDeatilFormObj
=
{}
},
confirmDialog
(
e
){
confirmDialog
(
e
){
const
{
title
,
url
}
=
e
const
{
title
,
url
}
=
e
this
.
formObj
.
proName
=
title
this
.
formObj
.
proName
=
title
...
@@ -577,6 +595,34 @@ export default {
...
@@ -577,6 +595,34 @@ export default {
width
:
136px
;
width
:
136px
;
}
}
}
}
.cover-wrap
{
box-shadow
:
0
6px
20px
0
#7a7a7a33
;
position
:
relative
;
width
:
88px
;
height
:
86px
;
border-radius
:
0
0
4px
4px
;
/deep/
.img-item,
/deep/
.operate{
border-radius
:
4px
4px
0
0
;
}
.title
{
padding
:
0
8px
;
box-sizing
:
border-box
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
font-size
:
12px
;
color
:
#323436
;
position
:
absolute
;
z-index
:
5
;
width
:
100%
;
text-align
:
center
;
height
:
26px
;
background-color
:
#fff
;
bottom
:
0
;
line-height
:
26px
;
border-radius
:
0
0
4px
4px
;
}
}
.expansion-detail-slot
{
.expansion-detail-slot
{
.tab-item
{
.tab-item
{
display
:
inline-block
;
display
:
inline-block
;
...
...
src/views/discoverManager/components/ProdCoverDialog/index.vue
View file @
738b1c9
...
@@ -20,6 +20,15 @@ export default {
...
@@ -20,6 +20,15 @@ export default {
visible
:
{
visible
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
},
formObj
:
{
type
:
Object
,
default
:
()
=>
{
return
{
title
:
''
,
url
:
''
}
}
}
}
},
},
data
(){
data
(){
...
@@ -30,24 +39,28 @@ export default {
...
@@ -30,24 +39,28 @@ export default {
},
},
detailFormData
:
[
detailFormData
:
[
{
{
label
:
'
封面标题
'
,
label
:
'
产品名称
'
,
name
:
'title'
,
name
:
'title'
,
type
:
'input'
,
type
:
'input'
,
maxlength
:
12
,
maxlength
:
12
,
showLimit
:
true
showLimit
:
true
},
},
{
{
label
:
'
内容标题
'
,
label
:
'
产品封面
'
,
name
:
'url'
,
name
:
'url'
,
addHtml
:
'coverSlot'
addHtml
:
'coverSlot'
}
}
],
],
detailRules
:
{
detailRules
:
{
title
:
[{
required
:
true
,
message
:
'请输入产品名称'
,
trigger
:
'change'
}],
title
:
[{
required
:
true
,
message
:
'请输入产品名称'
,
trigger
:
'change'
}],
url
:
[{
required
:
true
,
message
:
'请上传封面'
,
trigger
:
'change'
}]
url
:
[{
required
:
true
,
message
:
'请上传
产品
封面'
,
trigger
:
'change'
}]
},
},
}
}
},
},
created
(){
const
{
title
,
url
}
=
this
.
formObj
this
.
detailFormObj
=
{
title
,
url
}
},
methods
:
{
methods
:
{
onCancel
(){
onCancel
(){
this
.
$emit
(
'closeDialog'
)
this
.
$emit
(
'closeDialog'
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment