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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
17 deletions
src/views/material/addMaterial.vue
src/views/material/index.vue
src/views/material/addMaterial.vue
View file @
4d8ddb5
...
...
@@ -6,7 +6,7 @@
<h4>
{{
title
}}
</h4>
<el-divider></el-divider>
<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-option
v-for=
"item in groupCounter"
:key=
"item.id"
:label=
"item.materialGroupName"
:value=
"item.id"
></el-option>
...
...
@@ -20,11 +20,11 @@
</el-form-item>
<el-form-item
label=
"素材名称:"
prop=
"materialName"
>
<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
label=
"素材类型:"
prop=
"materialType"
>
<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=
"2"
>
自定义链接
</el-radio>
-->
<el-radio
:label=
"3"
>
图文
</el-radio>
...
...
@@ -87,7 +87,7 @@
</el-form-item>
<el-form-item
label=
"视频:"
class=
"photoWrap"
>
<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
>
<source
:src=
"materialAddForm.videoUrl"
type=
"video/mp4"
/>
</video>
...
...
@@ -95,7 +95,7 @@
<h3>
<img
slot=
"reference"
src=
"@/assets/material/view.png"
alt=
""
@
click=
"viewVideo"
/>
<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>
</div>
</div>
...
...
@@ -103,9 +103,9 @@
<i
class=
"el-icon-plus avatar-uploader-desc-icon"
></i>
<div
class=
"avatar-uploader-desc-word"
>
上传视频
</div>
<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/*"
@change="e =>handleVideoChange(e,'
media
Url')"/>
@change="e =>handleVideoChange(e,'
video
Url')"/>
</div>
<!--
<div
@
click=
"phoneVisible = !phoneVisible"
class=
"view-phone"
>
查看效果>
</div>
-->
</div>
...
...
@@ -351,7 +351,11 @@ export default {
this
.
routeInfo
.
addOrEdit
!=
1
?
this
.
getMaterialInfo
()
:
''
this
.
routeInfo
.
addOrEdit
!=
1
?
(
this
.
routeInfo
.
status
!=
1
?
this
.
forbidEdit
()
:
''
)
:
''
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
.
getMaterialList
()
// this.findAllDictData('business_type')
...
...
@@ -360,7 +364,7 @@ export default {
methods
:
{
viewVideo
()
{
this
.
dialogVisibleImg
=
true
this
.
dialogSrc
=
this
.
materialAddForm
.
media
Url
this
.
dialogSrc
=
this
.
materialAddForm
.
video
Url
},
handleVideoChange
(
e
)
{
let
file
=
e
.
srcElement
.
files
[
0
]
...
...
@@ -369,7 +373,7 @@ export default {
const
limitSize
=
20
const
isLt
=
file
.
size
/
1024
/
1024
<
limitSize
if
(
!
isLt
)
{
this
.
$message
.
error
(
'上传
图片
大小不能超过'
+
limitSize
+
'MB!'
)
this
.
$message
.
error
(
'上传
视频
大小不能超过'
+
limitSize
+
'MB!'
)
return
true
}
reader
.
readAsDataURL
(
file
)
...
...
@@ -378,7 +382,7 @@ export default {
const
base64
=
file
.
name
.
split
(
'.'
)[
file
.
name
.
split
(
'.'
).
length
-
1
]
+
'@'
+
imgFile
.
split
(
','
)[
1
]
this
.
$apis
.
common
.
uploadVideoApi
({
file
:
base64
}).
then
(
res
=>
{
if
(
res
)
{
this
.
materialAddForm
.
media
Url
=
res
this
.
materialAddForm
.
video
Url
=
res
}
})
}
...
...
@@ -432,13 +436,12 @@ export default {
},
// 获取素材详情
getMaterialInfo
()
{
var
params
=
{}
let
params
=
{}
params
.
id
=
this
.
routeInfo
.
id
console
.
log
(
this
.
routeInfo
.
status
)
if
(
this
.
routeInfo
.
status
==
-
1
)
{
params
.
flag
=
0
}
console
.
log
(
this
.
routeInfo
.
id
)
params
.
flag
=
0
// if (this.routeInfo.status == -1) {
// params.flag = 0
// }
this
.
$apis
.
material
.
materialDetail
(
params
).
then
(
res
=>
{
this
.
materialAddForm
=
res
if
(
res
&&
res
.
businessType
)
{
...
...
@@ -637,6 +640,7 @@ export default {
}
// status 状态 0 启用 -1 禁用 1 存草稿
params
.
status
=
0
params
.
createdType
=
2
let
material
if
(
params
.
id
)
{
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