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 4d8ddb58
authored
Dec 19, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
更新3.3.0联调后代码
1 parent
412e9cf2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
16 deletions
src/views/material/addMaterial.vue
src/views/material/index.vue
src/views/material/addMaterial.vue
View file @
4d8ddb5
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<h4>
{{
title
}}
</h4>
<h4>
{{
title
}}
</h4>
<el-divider></el-divider>
<el-divider></el-divider>
<div
class=
"m-l-20"
>
<div
class=
"m-l-20"
>
<el-form-item
v-if=
"
routeInfo.addOrEdit == 1
"
label=
"选择素材组:"
prop=
"groupId"
>
<el-form-item
v-if=
"
!notDisplayProperties
"
label=
"选择素材组:"
prop=
"groupId"
>
<el-select
v-model=
"materialAddForm.groupId"
placeholder=
"全部"
:size=
"size"
>
<el-select
v-model=
"materialAddForm.groupId"
placeholder=
"全部"
:size=
"size"
>
<el-option
v-for=
"item in groupCounter"
:key=
"item.id"
:label=
"item.materialGroupName"
<el-option
v-for=
"item in groupCounter"
:key=
"item.id"
:label=
"item.materialGroupName"
:value=
"item.id"
></el-option>
:value=
"item.id"
></el-option>
...
@@ -20,11 +20,11 @@
...
@@ -20,11 +20,11 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"素材名称:"
prop=
"materialName"
>
<el-form-item
label=
"素材名称:"
prop=
"materialName"
>
<el-input
v-model=
"materialAddForm.materialName"
:size=
"size"
placeholder=
"请输入素材名称"
<el-input
v-model=
"materialAddForm.materialName"
:size=
"size"
placeholder=
"请输入素材名称"
maxlength=
"30"
:disabled=
"
routeInfo.addOrEdit == 2 && routeInfo.status != 1
"
></el-input>
maxlength=
"30"
:disabled=
"
notDisplayProperties
"
></el-input>
</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=
"
routeInfo.addOrEdit == 2 && routeInfo.status != 1
"
>
:disabled=
"
notDisplayProperties
"
>
<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>
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
</el-form-item>
</el-form-item>
<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.
media
Url"
>
<div
class=
"put-img"
v-if=
"materialAddForm.
video
Url"
>
<video
id=
"video"
width=
"100%"
height=
"100%"
preload
loop
muted
>
<video
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>
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
<h3>
<h3>
<img
slot=
"reference"
src=
"@/assets/material/view.png"
alt=
""
@
click=
"viewVideo"
/>
<img
slot=
"reference"
src=
"@/assets/material/view.png"
alt=
""
@
click=
"viewVideo"
/>
<img
v-if=
"!notDisplayProperties"
class=
"del-img"
<img
v-if=
"!notDisplayProperties"
class=
"del-img"
src=
"@/assets/material/dele.png"
alt=
""
@
click=
"deleteImg('
media
Url')"
/>
src=
"@/assets/material/dele.png"
alt=
""
@
click=
"deleteImg('
video
Url')"
/>
</h3>
</h3>
</div>
</div>
</div>
</div>
...
@@ -103,9 +103,9 @@
...
@@ -103,9 +103,9 @@
<i
class=
"el-icon-plus avatar-uploader-desc-icon"
></i>
<i
class=
"el-icon-plus avatar-uploader-desc-icon"
></i>
<div
class=
"avatar-uploader-desc-word"
>
上传视频
</div>
<div
class=
"avatar-uploader-desc-word"
>
上传视频
</div>
<input
:class=
"
{disableUpload:notDisplayProperties}"
<input
:class=
"
{disableUpload:notDisplayProperties}"
:disabled="
routeInfo.addOrEdit == 2
&&
routeInfo.status != 1
" type="file" style="opacity: 0"
:disabled="
notDisplayProperties
" type="file" style="opacity: 0"
accept="video/*"
accept="video/*"
@change="e =>handleVideoChange(e,'
media
Url')"/>
@change="e =>handleVideoChange(e,'
video
Url')"/>
</div>
</div>
<!--
<div
@
click=
"phoneVisible = !phoneVisible"
class=
"view-phone"
>
查看效果>
</div>
-->
<!--
<div
@
click=
"phoneVisible = !phoneVisible"
class=
"view-phone"
>
查看效果>
</div>
-->
</div>
</div>
...
@@ -351,7 +351,11 @@ export default {
...
@@ -351,7 +351,11 @@ export default {
this
.
routeInfo
.
addOrEdit
!=
1
?
this
.
getMaterialInfo
()
:
''
this
.
routeInfo
.
addOrEdit
!=
1
?
this
.
getMaterialInfo
()
:
''
this
.
routeInfo
.
addOrEdit
!=
1
?
(
this
.
routeInfo
.
status
!=
1
?
this
.
forbidEdit
()
:
''
)
:
''
this
.
routeInfo
.
addOrEdit
!=
1
?
(
this
.
routeInfo
.
status
!=
1
?
this
.
forbidEdit
()
:
''
)
:
''
this
.
title
=
this
.
titleObj
[
this
.
routeInfo
.
addOrEdit
]
this
.
title
=
this
.
titleObj
[
this
.
routeInfo
.
addOrEdit
]
this
.
notDisplayProperties
=
this
.
routeInfo
.
addOrEdit
==
2
&&
this
.
routeInfo
.
status
!=
1
// this.notDisplayProperties = this.routeInfo.addOrEdit == 3 && this.routeInfo.status != 1
this
.
notDisplayProperties
=
this
.
routeInfo
.
addOrEdit
==
3
console
.
log
(
this
.
routeInfo
.
status
)
console
.
log
(
this
.
routeInfo
.
addOrEdit
)
console
.
log
(
this
.
notDisplayProperties
)
this
.
materialInsert
()
this
.
materialInsert
()
this
.
getMaterialList
()
this
.
getMaterialList
()
// this.findAllDictData('business_type')
// this.findAllDictData('business_type')
...
@@ -360,7 +364,7 @@ export default {
...
@@ -360,7 +364,7 @@ export default {
methods
:
{
methods
:
{
viewVideo
()
{
viewVideo
()
{
this
.
dialogVisibleImg
=
true
this
.
dialogVisibleImg
=
true
this
.
dialogSrc
=
this
.
materialAddForm
.
media
Url
this
.
dialogSrc
=
this
.
materialAddForm
.
video
Url
},
},
handleVideoChange
(
e
)
{
handleVideoChange
(
e
)
{
let
file
=
e
.
srcElement
.
files
[
0
]
let
file
=
e
.
srcElement
.
files
[
0
]
...
@@ -369,7 +373,7 @@ export default {
...
@@ -369,7 +373,7 @@ export default {
const
limitSize
=
20
const
limitSize
=
20
const
isLt
=
file
.
size
/
1024
/
1024
<
limitSize
const
isLt
=
file
.
size
/
1024
/
1024
<
limitSize
if
(
!
isLt
)
{
if
(
!
isLt
)
{
this
.
$message
.
error
(
'上传
图片
大小不能超过'
+
limitSize
+
'MB!'
)
this
.
$message
.
error
(
'上传
视频
大小不能超过'
+
limitSize
+
'MB!'
)
return
true
return
true
}
}
reader
.
readAsDataURL
(
file
)
reader
.
readAsDataURL
(
file
)
...
@@ -378,7 +382,7 @@ export default {
...
@@ -378,7 +382,7 @@ export default {
const
base64
=
file
.
name
.
split
(
'.'
)[
file
.
name
.
split
(
'.'
).
length
-
1
]
+
'@'
+
imgFile
.
split
(
','
)[
1
]
const
base64
=
file
.
name
.
split
(
'.'
)[
file
.
name
.
split
(
'.'
).
length
-
1
]
+
'@'
+
imgFile
.
split
(
','
)[
1
]
this
.
$apis
.
common
.
uploadVideoApi
({
file
:
base64
}).
then
(
res
=>
{
this
.
$apis
.
common
.
uploadVideoApi
({
file
:
base64
}).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
this
.
materialAddForm
.
media
Url
=
res
this
.
materialAddForm
.
video
Url
=
res
}
}
})
})
}
}
...
@@ -432,13 +436,12 @@ export default {
...
@@ -432,13 +436,12 @@ export default {
},
},
// 获取素材详情
// 获取素材详情
getMaterialInfo
()
{
getMaterialInfo
()
{
var
params
=
{}
let
params
=
{}
params
.
id
=
this
.
routeInfo
.
id
params
.
id
=
this
.
routeInfo
.
id
console
.
log
(
this
.
routeInfo
.
status
)
if
(
this
.
routeInfo
.
status
==
-
1
)
{
params
.
flag
=
0
params
.
flag
=
0
}
// if (this.routeInfo.status == -1) {
console
.
log
(
this
.
routeInfo
.
id
)
// params.flag = 0
// }
this
.
$apis
.
material
.
materialDetail
(
params
).
then
(
res
=>
{
this
.
$apis
.
material
.
materialDetail
(
params
).
then
(
res
=>
{
this
.
materialAddForm
=
res
this
.
materialAddForm
=
res
if
(
res
&&
res
.
businessType
)
{
if
(
res
&&
res
.
businessType
)
{
...
@@ -637,6 +640,7 @@ export default {
...
@@ -637,6 +640,7 @@ export default {
}
}
// status 状态 0 启用 -1 禁用 1 存草稿
// status 状态 0 启用 -1 禁用 1 存草稿
params
.
status
=
0
params
.
status
=
0
params
.
createdType
=
2
let
material
let
material
if
(
params
.
id
)
{
if
(
params
.
id
)
{
material
=
'materialEdit'
material
=
'materialEdit'
...
...
src/views/material/index.vue
View file @
4d8ddb5
This diff is collapsed.
Click to expand it.
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