Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 4ebeaf59
authored
Nov 10, 2020
by
xinlaa
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
素材问题修改,布局完善,按钮权限等
1 parent
33aeed84
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
84 additions
and
82 deletions
linkwe-ui/src/components/Upload.vue
linkwe-ui/src/styles/element-ui.scss
linkwe-ui/src/views/material/audio.vue
linkwe-ui/src/views/material/components/MaPage.vue
linkwe-ui/src/views/material/file.vue
linkwe-ui/src/views/material/image.vue
linkwe-ui/src/views/material/text.vue
linkwe-ui/src/views/material/video.vue
linkwe-ui/src/components/Upload.vue
View file @
4ebeaf5
...
...
@@ -37,7 +37,7 @@ export default {
watch
:
{},
computed
:
{
accept
()
{
return
[
'image/*'
,
'*'
,
'video/*'
,
'*'
][
this
.
type
]
return
[
'image/*'
,
'
amr/
*'
,
'video/*'
,
'*'
][
this
.
type
]
},
},
created
()
{},
...
...
@@ -49,7 +49,7 @@ export default {
isSize
=
true
if
(
this
.
type
===
'0'
)
{
// 图片
isFormat
=
file
.
type
===
'image/jpeg'
isFormat
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/png'
isSize
=
file
.
size
/
1024
/
1024
<
2
if
(
!
isFormat
)
{
...
...
@@ -113,6 +113,7 @@ export default {
<div>
<el-upload
v-loading=
"loading"
element-loading-text=
"正在上传..."
class=
"uploader"
:accept=
"accept"
:action=
"action"
...
...
@@ -133,7 +134,7 @@ export default {
controls
webkit-playsinline=
"true"
playsinline=
"true"
autoplay=
"
non
e"
autoplay=
"
fals
e"
preload=
"auto"
>
<source
:src=
"fileUrl"
type=
"video/mp4"
/>
...
...
@@ -150,15 +151,19 @@ export default {
</template>
<
style
lang=
"scss"
scoped
>
/
deep
/
.uploader
.el-upload
{
border-radius
:
6px
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
}
/
deep
/
.uploader
.el-upload
:hover
{
border-color
:
#409eff
;
/
deep
/
.uploader
{
display
:
inline-block
;
.el-upload
{
border-radius
:
6px
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
&:hover
{
border-color
:
#409eff
;
}
}
}
.uploader-icon
{
font-size
:
28px
;
color
:
#8c939d
;
...
...
linkwe-ui/src/styles/element-ui.scss
View file @
4ebeaf5
...
...
@@ -6,8 +6,8 @@
}
}
.el-input--small
{
height
:
32
px
;
.el-input
.el-input
--small
{
line-height
:
30
px
;
}
.top-search
{
...
...
linkwe-ui/src/views/material/audio.vue
View file @
4ebeaf5
...
...
@@ -44,28 +44,21 @@ export default {
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-key"
@
click=
"$refs.page.download(scope.row)"
v-hasPermi=
"['
system:user:resetPw
d']"
v-hasPermi=
"['
material:downloa
d']"
>
下载
</el-button
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"$refs.page.edit(scope.row)"
v-hasPermi=
"['
system:user
:edit']"
v-hasPermi=
"['
material
:edit']"
>
修改
</el-button
>
<el-button
v-if=
"scope.row.userId !== 1"
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"$refs.page.remove(scope.row)"
v-hasPermi=
"['system:user:remove']"
@
click=
"$refs.page.remove(scope.row.id)"
v-hasPermi=
"['material:remove']"
>
删除
</el-button
>
</
template
>
...
...
linkwe-ui/src/views/material/components/MaPage.vue
View file @
4ebeaf5
...
...
@@ -159,9 +159,12 @@ export default {
edit
(
data
,
type
)
{
this
.
form
=
Object
.
assign
(
{},
data
||
{
categoryId
:
this
.
query
.
categoryId
,
_new
:
true
}
data
||
{
categoryId
:
this
.
query
.
categoryId
}
)
this
.
dialogVisible
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'form'
].
clearValidate
()
})
// type || !data ? (this.disabled = false) : (this.disabled = true)
},
// 素材提交
...
...
@@ -175,6 +178,7 @@ export default {
this
.
msgSuccess
(
'操作成功'
)
this
.
dialogVisible
=
false
this
.
getList
()
this
.
$refs
[
'form'
].
resetFields
()
})
.
catch
(()
=>
{
this
.
dialogVisible
=
false
...
...
@@ -281,7 +285,7 @@ export default {
<el-button
class=
"ml10"
@
click=
"getList(1)"
>
搜索
</el-button>
<el-button
v-hasPermi=
"['material:remove']"
@
click=
"remove"
@
click=
"remove
()
"
:disabled=
"selected.length === 0"
>
删除
</el-button
>
...
...
linkwe-ui/src/views/material/file.vue
View file @
4ebeaf5
...
...
@@ -44,28 +44,21 @@ export default {
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-key"
@
click=
"$refs.page.download(scope.row)"
v-hasPermi=
"['
system:user:resetPw
d']"
v-hasPermi=
"['
material:downloa
d']"
>
下载
</el-button
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"$refs.page.edit(scope.row)"
v-hasPermi=
"['
system:user
:edit']"
v-hasPermi=
"['
material
:edit']"
>
修改
</el-button
>
<el-button
v-if=
"scope.row.userId !== 1"
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"$refs.page.remove(scope.row)"
v-hasPermi=
"['system:user:remove']"
@
click=
"$refs.page.remove(scope.row.id)"
v-hasPermi=
"['material:remove']"
>
删除
</el-button
>
</
template
>
...
...
linkwe-ui/src/views/material/image.vue
View file @
4ebeaf5
...
...
@@ -5,10 +5,7 @@ export default {
components
:
{
MaPage
},
data
()
{
return
{
srcList
:
[
'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg'
,
'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg'
,
],
srcList
:
[],
list
:
[],
// 列表
ids
:
[],
// 选中数组
}
...
...
@@ -18,6 +15,7 @@ export default {
methods
:
{
listChange
(
data
)
{
this
.
list
=
data
this
.
srcList
=
data
.
map
((
item
)
=>
item
.
materialUrl
)
},
},
}
...
...
@@ -28,29 +26,28 @@ export default {
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
style=
"margin-bottom: 24px;"
style=
"margin-bottom: 24px;
min-width: 220px;
"
v-for=
"(item, index) in list"
:key=
"index"
>
<el-card
shadow=
"hover"
body-style=
"padding: 0px;"
>
<div
class=
"img-wrap"
>
<el-image
:src=
"
require('@/assets/image/profile.jpg')
"
:src=
"
item.materialUrl
"
:preview-src-list=
"srcList"
fit=
"contain"
></el-image>
<div
class=
"el-upload-list__item-actions"
>
<span
class=
"el-upload-list__item-preview"
<div
class=
"actions"
>
<i
v-hasPermi=
"['material:edit']"
class=
"el-icon-edit cp"
@
click=
"$refs.page.edit(item)"
>
<i
class=
"el-icon-edit"
></i>
</span>
<span
class=
"el-upload-list__item-"
@
click=
"$refs.page.remove(item)"
>
<i
class=
"el-icon-delete"
></i>
</span>
></i>
<i
v-hasPermi=
"['material:remove']"
class=
"el-icon-delete cp"
@
click=
"$refs.page.remove(item.id)"
></i>
</div>
</div>
<div
style=
"padding: 14px;"
>
...
...
@@ -67,22 +64,33 @@ export default {
<
style
lang=
"scss"
scoped
>
.img-wrap
{
position
:
relative
;
&:hover
.el-upload-list__item-actions
{
height
:
0
;
padding
:
70%
0
0
0
;
border-bottom
:
1px
solid
#e6ebf5
;
&:hover
.actions
{
opacity
:
1
;
}
}
.
el-upload-list__item-
actions
{
.actions
{
position
:
absolute
;
width
:
100%
;
height
:
50px
;
left
:
0
;
top
:
0
;
cursor
:
default
;
text-align
:
center
;
color
:
#fff
;
opacity
:
0
;
font-size
:
20px
;
background-color
:
rgba
(
0
,
0
,
0
,
0.5
);
transition
:
opacity
0.3s
;
.el-icon-edit
{
margin-right
:
20px
;
}
}
.el-image
{
position
:
absolute
;
width
:
100%
;
height
:
100%
;
top
:
0
;
}
</
style
>
linkwe-ui/src/views/material/text.vue
View file @
4ebeaf5
...
...
@@ -49,13 +49,13 @@ export default {
<el-button
type=
"text"
@
click=
"$refs.page.edit(scope.row)"
v-hasPermi=
"['
system:user
:edit']"
v-hasPermi=
"['
material
:edit']"
>
修改
</el-button
>
<el-button
type=
"text"
@
click=
"$refs.page.remove(scope.row.id)"
v-hasPermi=
"['
system:user
:remove']"
v-hasPermi=
"['
material
:remove']"
>
删除
</el-button
>
</
template
>
...
...
linkwe-ui/src/views/material/video.vue
View file @
4ebeaf5
...
...
@@ -35,36 +35,32 @@ export default {
<div
class=
"img-wrap"
>
<video
id=
"video"
class=
"video-js vjs-default-skin
vjs-big-play-centered"
class=
"video-js vjs-default-skin vjs-big-play-centered"
controls
webkit-playsinline=
"true"
playsinline=
"true"
autoplay=
"
non
e"
autoplay=
"
fals
e"
preload=
"auto"
:poster=
"item.coverUrl"
>
<source
:src=
"item.materialUrl"
type=
"video/mp4"
/>
</video>
<div
class=
"el-upload-list__item-actions"
>
<span
class=
"el-upload-list__item-preview"
<div
class=
"actions"
>
<i
v-hasPermi=
"['material:download']"
class=
"el-icon-download"
@
click=
"$refs.page.download(item)"
>
<i
class=
"el-icon-download"
></i>
</span>
<span
class=
"el-upload-list__item-preview"
></i>
<i
v-hasPermi=
"['material:edit']"
class=
"el-icon-edit cp"
@
click=
"$refs.page.edit(item)"
>
<i
class=
"el-icon-edit"
></i>
</span>
<span
class=
"el-upload-list__item-"
@
click=
"$refs.page.remove(item)"
>
<i
class=
"el-icon-delete"
></i>
</span>
></i>
<i
v-hasPermi=
"['material:remove']"
class=
"el-icon-delete cp"
@
click=
"$refs.page.remove(item.id)"
></i>
</div>
</div>
<div
style=
"padding: 14px;"
>
...
...
@@ -83,11 +79,11 @@ export default {
<
style
lang=
"scss"
scoped
>
.img-wrap
{
position
:
relative
;
&:hover
.
el-upload-list__item-
actions
{
&:hover
.actions
{
opacity
:
1
;
}
}
.
el-upload-list__item-
actions
{
.actions
{
position
:
absolute
;
width
:
100%
;
height
:
40px
;
...
...
@@ -100,6 +96,9 @@ export default {
font-size
:
20px
;
background-color
:
rgba
(
0
,
0
,
0
,
0.5
);
transition
:
opacity
0.3s
;
.el-icon-edit
{
margin
:
0
20px
;
}
}
#video
{
width
:
100%
;
...
...
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