Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄媛媛
ElectricitySheep
Commits
c86a7940
Commit
c86a7940
authored
May 15, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
94769a57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
29 deletions
+71
-29
videoManage.vue
src/components/StoreDesign/videoManage.vue
+71
-29
No files found.
src/components/StoreDesign/videoManage.vue
View file @
c86a7940
...
...
@@ -3,16 +3,15 @@
<template
v-if=
"videoIsShowAdd"
>
<div
class=
"head-title"
>
视频
<el-button
@
click=
"videoIsShowAdd=false"
style=
"float:right;margin-top: -5px;"
size=
"small"
type=
"primary"
>
<el-button
@
click=
"videoIsShowAdd=false"
style=
"float:right;margin-top: -5px;"
size=
"small"
type=
"primary"
>
添加视频
</el-button>
</div>
<div
class=
"content"
>
<div>
<div
class=
"searchInput"
>
<el-input
style=
"display:inline-block;width:225px;height:30px"
placeholder=
"请输入搜索内容"
v-model=
"msg.TopicName"
size=
"small"
clearable
@
keyup
.
enter
.
native=
"msg.pageIndex=1,getList()"
>
<el-input
style=
"display:inline-block;width:225px;height:30px"
placeholder=
"请输入搜索内容"
v-model=
"msg.Title"
size=
"small"
clearable
@
keyup
.
enter
.
native=
"msg.pageIndex=1,getList()"
>
</el-input>
<span
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
@
click=
"msg.pageIndex=1,getList()"
>
</span>
...
...
@@ -21,15 +20,13 @@
<el-table
:data=
"dataList"
v-loading=
"loading"
border
style=
"width: 100%;margin:20px 0"
>
<el-table-column
prop=
"Id"
label=
"ID"
width=
"150"
>
</el-table-column>
<el-table-column
prop=
"T
opicName"
label=
"分类名称"
width=
"829
"
>
<el-table-column
prop=
"T
itle"
label=
"标题"
width=
"200
"
>
</el-table-column>
<el-table-column
prop=
"SortNum"
label=
"排序"
width=
"250"
>
</el-table-column>
<el-table-column
prop=
"
IsDisable"
label=
"状态
"
width=
"150"
>
<el-table-column
prop=
"
VedioUrl"
label=
"封面
"
width=
"150"
>
<template
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.row.IsDisable"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
@
change=
"updateIsDisable(scope.row)"
>
</el-switch>
<img
v-if=
"scope.row.VedioCoverImg"
:src=
"scope.row.VedioCoverImg"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
>
...
...
@@ -64,22 +61,22 @@
</el-radio-group>
</el-form-item>
<el-form-item
label=
"视频链接"
>
<el-input
placeholder=
"请输入链接"
v-model=
"addMsg.VedioUrl"
size=
"small"
>
<el-button
slot=
"append"
>
选择文件
</el-button>
</el-input>
<el-link
class=
"box-grow-0"
type=
"primary"
style=
"font-size:12px"
v-if=
'addMsg.VedioUrl'
:underline=
"false"
target=
"_blank"
:href=
"data.video_u
rl"
>
视频预览
</el-link>
<el-input
placeholder=
"请输入链接"
v-model=
"addMsg.VedioUrl"
size=
"small"
>
<el-button
slot=
"append"
>
选择文件
</el-button>
</el-input>
<el-link
class=
"box-grow-0"
type=
"primary"
style=
"font-size:12px"
v-if=
'addMsg.VedioUrl'
:underline=
"false"
target=
"_blank"
:href=
"addMsg.VedioU
rl"
>
视频预览
</el-link>
</el-form-item>
<el-form-item
label=
"封面图"
prop=
"VedioCoverImg"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"建议尺寸:750 * 400"
placement=
"top"
>
<el-button
size=
"mini"
@
click=
"choicImg=true"
>
选择图片
</el-button>
<el-button
size=
"mini"
@
click=
"choicImg=true"
>
选择图片
</el-button>
</el-tooltip>
<div
class=
"customize-share-title"
>
<div
class=
"zk_pic_box"
flex=
"main:center cross:center"
:style=
"
{backgroundImage:'url(' + getIconLink(addMsg.VedioCoverImg) + ')'}">
<i
v-if=
"addMsg.VedioCoverImg==''"
class=
"el-icon-picture-outline"
></i>
</div>
<div
class=
"zk_pic_box"
flex=
"main:center cross:center"
:style=
"
{backgroundImage:'url(' + getIconLink(addMsg.VedioCoverImg) + ')'}">
<i
v-if=
"addMsg.VedioCoverImg==''"
class=
"el-icon-picture-outline"
></i>
</div>
</div>
</el-form-item>
<el-form-item
label=
"排序"
>
...
...
@@ -114,19 +111,19 @@
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
T
opicNam
e
:
""
T
itl
e
:
""
},
total
:
0
,
videoIsShowAdd
:
true
,
choicImg
:
false
,
choicImg
:
false
,
addMsg
:
{
Id
:
0
,
//视频编号
Title
:
''
,
//视频标题
SourceType
:
1
,
//视频来源(1-源地址,2-腾讯)
VedioUrl
:
''
,
//视频链接
VedioCoverImg
:
''
,
//封面图
SortNum
:
''
,
//排序
VedioIntro
:
''
//视频详情介绍
VedioUrl
:
''
,
//视频链接
VedioCoverImg
:
''
,
//封面图
SortNum
:
''
,
//排序
VedioIntro
:
''
//视频详情介绍
},
rules
:
{
Title
:
[{
...
...
@@ -134,7 +131,7 @@
message
:
'标题不能为空'
,
trigger
:
'change'
}],
VedioCoverImg
:[{
VedioCoverImg
:
[{
required
:
true
,
message
:
'封面图'
,
trigger
:
'change'
...
...
@@ -152,7 +149,7 @@
this
.
getList
();
},
getList
()
{
this
.
apipost
(
"/api/MContent/Get
TopicType
PageList"
,
this
.
msg
,
res
=>
{
this
.
apipost
(
"/api/MContent/Get
Video
PageList"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
.
pageData
;
this
.
total
=
res
.
data
.
data
.
count
;
...
...
@@ -171,12 +168,22 @@
}
});
},
clearMsg
()
{
this
.
addMsg
.
Id
=
0
;
this
.
addMsg
.
Title
=
''
;
this
.
addMsg
.
SourceType
=
1
;
this
.
addMsg
.
VedioUrl
=
''
;
this
.
addMsg
.
VedioCoverImg
=
''
;
this
.
addMsg
.
SortNum
=
0
;
this
.
addMsg
.
VedioIntro
=
''
;
},
//保存
saveMsg
()
{
this
.
apipost
(
"/api/MContent/Set
TopicType
"
,
this
.
addMsg
,
res
=>
{
this
.
apipost
(
"/api/MContent/Set
Video
"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
videoIsShowAdd
=
true
;
this
.
getList
();
this
.
clearMsg
();
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Info
(
res
.
data
.
message
);
...
...
@@ -188,6 +195,41 @@
this
.
addMsg
.
VedioCoverImg
=
msg
.
url
;
this
.
choicImg
=
false
;
},
//修改
EditprojectClass
(
item
)
{
this
.
apipost
(
"/api/MContent/GetVideo"
,
{
Id
:
item
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
projectClassIsShowAdd
=
false
;
var
jsonData
=
res
.
data
.
data
;
this
.
addMsg
.
Id
=
jsonData
.
Id
;
this
.
addMsg
.
Title
=
jsonData
.
Title
;
this
.
addMsg
.
SourceType
=
jsonData
.
SourceType
;
this
.
addMsg
.
VedioUrl
=
jsonData
.
VedioUrl
;
this
.
addMsg
.
VedioCoverImg
=
jsonData
.
VedioCoverImg
;
this
.
addMsg
.
SortNum
=
jsonData
.
SortNum
;
this
.
addMsg
.
VedioIntro
=
jsonData
.
VedioIntro
;
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
//删除
RemoveprojectClass
(
item
)
{
var
that
=
this
;
that
.
Confirm
(
"是否要删除?"
,
function
()
{
that
.
apipost
(
"/api/MContent/RemoveVideo"
,
{
Id
:
item
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
getList
();
}
else
{
that
.
Info
(
res
.
data
.
message
);
}
})
})
},
},
mounted
()
{
this
.
getList
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment