Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 37ba571b
authored
Dec 28, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
b8fe16c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
14 deletions
src/views/material/addMaterial.vue
src/views/material/components/materialGroup.vue
src/views/material/addMaterial.vue
View file @
37ba571
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"素材类型:"
prop=
"materialType"
>
<el-form-item
label=
"素材类型:"
prop=
"materialType"
>
<el-radio-group
v-model=
"materialAddForm.materialType"
@
change=
"radioChange"
<el-radio-group
v-model=
"materialAddForm.materialType"
@
change=
"radioChange"
:disabled=
"
notDisplayProperties
"
>
:disabled=
"
routeInfo.addOrEdit != 1
"
>
<el-radio
:label=
"1"
>
PDF文件
</el-radio>
<el-radio
:label=
"1"
>
PDF文件
</el-radio>
<!--
<el-radio
:label=
"2"
>
自定义链接
</el-radio>
-->
<!--
<el-radio
:label=
"2"
>
自定义链接
</el-radio>
-->
<el-radio
:label=
"3"
>
图文
</el-radio>
<el-radio
:label=
"3"
>
图文
</el-radio>
...
@@ -88,8 +88,8 @@
...
@@ -88,8 +88,8 @@
<el-form-item
label=
"视频:"
class=
"photoWrap"
>
<el-form-item
label=
"视频:"
class=
"photoWrap"
>
<div
class=
"img-div"
>
<div
class=
"img-div"
>
<div
class=
"put-img"
v-if=
"materialAddForm.videoUrl"
>
<div
class=
"put-img"
v-if=
"materialAddForm.videoUrl"
>
<video
id=
"video"
width=
"100%"
height=
"100%"
preload
loop
muted
>
<video
:src=
"materialAddForm.videoUrl"
id=
"video"
width=
"100%"
height=
"100%"
preload
loop
muted
>
<source
:src=
"materialAddForm.videoUrl"
type=
"video/mp4"
/
>
<!--
<source
:src=
"materialAddForm.videoUrl"
type=
"video/mp4"
/>
--
>
</video>
</video>
<div
class=
"mask"
>
<div
class=
"mask"
>
<h3>
<h3>
...
@@ -264,7 +264,7 @@
...
@@ -264,7 +264,7 @@
<GLFooter
class=
"gl-footer"
>
<GLFooter
class=
"gl-footer"
>
<el-button
@
click=
"onSave"
v-if=
"this.routeInfo.addOrEdit == 1"
>
存草稿
</el-button>
<el-button
@
click=
"onSave"
v-if=
"this.routeInfo.addOrEdit == 1"
>
存草稿
</el-button>
<el-button
@
click=
"handleCancel"
class=
"btn-cancle"
>
取消
</el-button>
<el-button
@
click=
"handleCancel"
class=
"btn-cancle"
>
取消
</el-button>
<el-button
@
click=
"handleSubmit"
type=
"primary"
>
确定
</el-button>
<el-button
@
click=
"handleSubmit"
v-if=
"this.routeInfo.addOrEdit !== 3"
type=
"primary"
>
确定
</el-button>
</GLFooter>
</GLFooter>
<el-dialog
class=
"image-dialog"
:visible
.
sync=
"dialogVisibleImg"
width=
"30%"
>
<el-dialog
class=
"image-dialog"
:visible
.
sync=
"dialogVisibleImg"
width=
"30%"
>
<big-view
ref=
"viewForm"
v-if=
"dialogVisibleImg"
:dialogSrc=
"dialogSrc"
:dialogType=
"dialogType"
></big-view>
<big-view
ref=
"viewForm"
v-if=
"dialogVisibleImg"
:dialogSrc=
"dialogSrc"
:dialogType=
"dialogType"
></big-view>
...
@@ -429,6 +429,8 @@ export default {
...
@@ -429,6 +429,8 @@ export default {
if
(
videoHtml
&&
videoHtml
.
length
&&
!
imgHtml
&&
!
html
.
length
)
params
.
materialType
=
4
if
(
videoHtml
&&
videoHtml
.
length
&&
!
imgHtml
&&
!
html
.
length
)
params
.
materialType
=
4
if
(
!
imgHtml
&&
!
videoHtml
)
params
.
materialType
=
5
if
(
!
imgHtml
&&
!
videoHtml
)
params
.
materialType
=
5
if
(
imgHtml
&&
imgHtml
.
length
&&
!
videoHtml
&&
!
html
.
length
)
params
.
materialType
=
6
if
(
imgHtml
&&
imgHtml
.
length
&&
!
videoHtml
&&
!
html
.
length
)
params
.
materialType
=
6
if
(
this
.
materialAddForm
.
vedioUrl
&&
!
this
.
materialAddForm
.
imageUrlList
.
length
)
params
.
materialType
=
4
if
(
this
.
materialAddForm
.
imageUrlList
.
length
)
params
.
materialType
=
3
this
.
textBoxContent
=
encodeURIComponent
(
this
.
textBoxContent
)
this
.
textBoxContent
=
encodeURIComponent
(
this
.
textBoxContent
)
params
.
materialUrl
=
this
.
textBoxContent
params
.
materialUrl
=
this
.
textBoxContent
}
}
...
...
src/views/material/components/materialGroup.vue
View file @
37ba571
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<el-button
class=
"add_btn"
icon=
"el-icon-plus"
:size=
"size"
@
click=
"handleAddGroup(1)"
>
素材组
</el-button>
<el-button
class=
"add_btn"
icon=
"el-icon-plus"
:size=
"size"
@
click=
"handleAddGroup(1)"
>
素材组
</el-button>
<div
class=
"all-group"
>
<div
class=
"all-group"
>
<div
@
click=
"getList"
>
<div
@
click=
"getList"
>
<img
src=
"@/assets/material/groupIcon.png"
alt=
""
/>
<img
src=
"@/assets/material/groupIcon.png"
alt=
""
/>
全部素材组 (
{{
groupCounter
.
length
}}
)
全部素材组 (
{{
groupCounter
.
length
}}
)
</div>
</div>
<div
@
click=
"groupVisible = !groupVisible"
>
<div
@
click=
"groupVisible = !groupVisible"
>
...
@@ -12,9 +12,10 @@
...
@@ -12,9 +12,10 @@
</div>
</div>
</div>
</div>
<ul
v-show=
"groupVisible"
:style=
"
{ height: groupHeight - 110 + 'px' }">
<ul
v-show=
"groupVisible"
:style=
"
{ height: groupHeight - 110 + 'px' }">
<li
class=
"group-list"
v-for=
"(item, index) in groupCounter"
:class=
"index === currentIndex ? 'active' : ''"
:key=
"index"
@
click=
"handleGroup(item, index)"
>
<li
class=
"group-list"
v-for=
"(item, index) in groupCounter"
:class=
"index === currentIndex ? 'active' : ''"
:key=
"index"
@
click=
"handleGroup(item, index)"
>
<div>
<div>
<img
src=
"@/assets/material/file.png"
alt=
""
style=
"vertical-align: middle;height:24px;width:24px"
/>
<img
src=
"@/assets/material/file.png"
alt=
""
style=
"vertical-align: middle;height:24px;width:24px"
/>
<div
class=
"group-name"
>
{{
item
.
materialGroupName
}}
</div>
<div
class=
"group-name"
>
{{
item
.
materialGroupName
}}
</div>
</div>
</div>
<div>
<div>
...
@@ -23,12 +24,17 @@
...
@@ -23,12 +24,17 @@
<!--
<GLButton
class=
"group-btn"
:size=
"size"
type=
"text"
fn=
"置顶"
@
click=
"handleStick(item)"
>
{{
item
.
orderTime
?
'取消置顶'
:
'置顶'
}}
</GLButton>
<!--
<GLButton
class=
"group-btn"
:size=
"size"
type=
"text"
fn=
"置顶"
@
click=
"handleStick(item)"
>
{{
item
.
orderTime
?
'取消置顶'
:
'置顶'
}}
</GLButton>
<GLButton
class=
"group-btn"
:size=
"size"
type=
"text"
fn=
"修改"
@
click=
"handleAddGroup(2, item)"
>
修改
</GLButton>
<GLButton
class=
"group-btn"
:size=
"size"
type=
"text"
fn=
"修改"
@
click=
"handleAddGroup(2, item)"
>
修改
</GLButton>
<GLButton
class=
"group-btn"
:size=
"size"
type=
"text"
fn=
"删除"
v-if=
"item.isDefault == -1"
@
click=
"handleDeleteGroup(item.id)"
>
删除
</GLButton>
-->
<GLButton
class=
"group-btn"
:size=
"size"
type=
"text"
fn=
"删除"
v-if=
"item.isDefault == -1"
@
click=
"handleDeleteGroup(item.id)"
>
删除
</GLButton>
-->
<el-button
class=
"group-btn"
:size=
"size"
type=
"text"
fn=
"置顶"
@
click=
"handleStick(item)"
>
{{
item
.
orderTime
?
'取消置顶'
:
'置顶'
}}
</el-button>
<el-button
class=
"group-btn"
:size=
"size"
type=
"text"
fn=
"置顶"
@
click=
"handleStick(item)"
>
<el-button
class=
"group-btn"
:size=
"size"
type=
"text"
fn=
"修改"
@
click=
"handleAddGroup(2, item)"
>
修改
</el-button>
{{
item
.
orderTime
?
'取消置顶'
:
'置顶'
}}
<el-button
class=
"group-btn"
:size=
"size"
type=
"text"
fn=
"删除"
v-if=
"item.isDefault == -1"
@
click=
"handleDeleteGroup(item.id)"
>
删除
</el-button>
</el-button>
<el-button
class=
"group-btn"
:size=
"size"
type=
"text"
fn=
"修改"
@
click=
"handleAddGroup(2, item)"
>
修改
</el-button>
<el-button
class=
"group-btn"
:size=
"size"
type=
"text"
fn=
"删除"
v-if=
"item.isDefault == -1"
@
click=
"handleDeleteGroup(item.id)"
>
删除
</el-button>
</div>
</div>
<div
slot=
"reference"
>
<div
slot=
"reference"
>
<img
class=
"more-icon"
src=
"@/assets/material/more.png"
alt=
""
/>
<img
class=
"more-icon"
src=
"@/assets/material/more.png"
alt=
""
/>
</div>
</div>
</el-popover>
</el-popover>
</div>
</div>
...
@@ -39,9 +45,10 @@
...
@@ -39,9 +45,10 @@
<
script
>
<
script
>
import
*
as
dayjs
from
'dayjs'
import
*
as
dayjs
from
'dayjs'
export
default
{
export
default
{
name
:
'materialGroup'
,
name
:
'materialGroup'
,
props
:
{
eventBus
:
Object
,
groupHeight
:
Number
},
props
:
{
eventBus
:
Object
,
groupHeight
:
Number
},
data
()
{
data
()
{
return
{
return
{
// 素材组数量
// 素材组数量
...
@@ -102,6 +109,7 @@ export default {
...
@@ -102,6 +109,7 @@ export default {
params
.
groupId
=
item
.
id
params
.
groupId
=
item
.
id
params
.
pageNum
=
1
params
.
pageNum
=
1
params
.
pageSize
=
1000
params
.
pageSize
=
1000
params
.
createdType
=
2
this
.
$emit
(
'getList'
,
params
,
item
)
this
.
$emit
(
'getList'
,
params
,
item
)
},
},
// 打开1-新增, 2-编辑 素材组弹框
// 打开1-新增, 2-编辑 素材组弹框
...
@@ -133,7 +141,7 @@ export default {
...
@@ -133,7 +141,7 @@ export default {
cancelButtonText
:
'否'
,
cancelButtonText
:
'否'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
$apis
.
material
.
deleteMaterialList
({
id
:
rowId
}).
then
(
res
=>
{
this
.
$apis
.
material
.
deleteMaterialList
({
id
:
rowId
}).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
'操作失败'
,
message
:
res
.
code
==
'0'
?
'操作成功'
:
'操作失败'
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
type
:
res
.
code
==
'0'
?
'success'
:
'error'
...
@@ -181,13 +189,16 @@ export default {
...
@@ -181,13 +189,16 @@ export default {
.status-words
{
.status-words
{
margin-left
:
5px
;
margin-left
:
5px
;
}
}
.material-group
{
.material-group
{
/deep/.el-popover
{
/deep/
.el-popover
{
min-width
:
50px
;
min-width
:
50px
;
&:hover
{
&:hover
{
cursor
:
pointer
;
cursor
:
pointer
;
}
}
}
}
.all-group
{
.all-group
{
font-size
:
16px
;
font-size
:
16px
;
height
:
44px
;
height
:
44px
;
...
@@ -196,17 +207,21 @@ export default {
...
@@ -196,17 +207,21 @@ export default {
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
cursor
:
pointer
;
cursor
:
pointer
;
img
{
img
{
width
:
24px
;
width
:
24px
;
height
:
24px
;
height
:
24px
;
vertical-align
:
middle
;
vertical-align
:
middle
;
}
}
i
{
i
{
color
:
#999999
;
color
:
#999999
;
}
}
}
}
ul
{
ul
{
overflow
:
auto
;
overflow
:
auto
;
.group-list
{
.group-list
{
cursor
:
pointer
;
cursor
:
pointer
;
text-align
:
left
;
text-align
:
left
;
...
@@ -214,38 +229,46 @@ export default {
...
@@ -214,38 +229,46 @@ export default {
margin
:
0
10px
;
margin
:
0
10px
;
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
&.active
{
&.active
{
background-color
:
#ebeaff
;
background-color
:
#ebeaff
;
}
}
.more-icon
{
.more-icon
{
vertical-align
:
middle
;
vertical-align
:
middle
;
padding-top
:
3px
;
padding-top
:
3px
;
}
}
&
:hover
{
&
:hover
{
background-color
:
#ebeaff
;
background-color
:
#ebeaff
;
}
}
}
}
}
}
}
}
.add_btn
{
.add_btn
{
color
:
#5850ff
;
color
:
#5850ff
;
border-color
:
#5850ff
;
border-color
:
#5850ff
;
margin
:
20px
0
12px
16px
;
margin
:
20px
0
12px
16px
;
}
}
.group-name
{
.group-name
{
display
:
inline-flex
;
display
:
inline-flex
;
margin-left
:
8px
;
margin-left
:
8px
;
}
}
.group-btn
{
.group-btn
{
color
:
#333333
;
color
:
#333333
;
display
:
block
;
display
:
block
;
padding
:
8px
0px
;
padding
:
8px
0px
;
text-align
:
left
;
text-align
:
left
;
width
:
100%
;
width
:
100%
;
&:hover
{
&:hover
{
background-color
:
#ebeaff
;
background-color
:
#ebeaff
;
}
}
}
}
.el-button
+
.el-button
{
.el-button
+
.el-button
{
margin-left
:
0
;
margin-left
:
0
;
}
}
...
...
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