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 16e15799
authored
Nov 10, 2020
by
sunxiwang
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
2 parents
3bde47c3
a985e373
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
86 additions
and
87 deletions
README.md
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
README.md
View file @
16e1579
...
@@ -15,7 +15,6 @@ LinkWeChat,是一款基于企业微信的开源SCRM系统,为企业构建私
...
@@ -15,7 +15,6 @@ LinkWeChat,是一款基于企业微信的开源SCRM系统,为企业构建私
### 环境部署
### 环境部署
#### 准备工作
#### 准备工作
...
@@ -187,10 +186,8 @@ com.linkwechat
...
@@ -187,10 +186,8 @@ com.linkwechat


### 联系作者加入交流群
### 联系作者加入群


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