Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
huaxin-rq
Project
Project
Details
Activity
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
耿迪迪
huaxin-rq
Commits
409ca0e0
Commit
409ca0e0
authored
Jun 06, 2026
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频分类添加
parent
59c84b03
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
108 additions
and
13 deletions
+108
-13
TVideoManage.java
.../src/main/java/com/zehong/system/domain/TVideoManage.java
+21
-0
TVideoManageMapper.xml
...m/src/main/resources/mapper/system/TVideoManageMapper.xml
+10
-1
index.vue
huaxin-web/src/views/video/manage/index.vue
+38
-3
Left.vue
huaxin-web/src/views/video/monitor/leftList/Left.vue
+39
-9
No files found.
huaxin-system/src/main/java/com/zehong/system/domain/TVideoManage.java
View file @
409ca0e0
...
@@ -29,6 +29,11 @@ public class TVideoManage extends BaseEntity
...
@@ -29,6 +29,11 @@ public class TVideoManage extends BaseEntity
@Excel
(
name
=
"类型"
,
readConverterExp
=
"1=华鑫,2=鸿海"
)
@Excel
(
name
=
"类型"
,
readConverterExp
=
"1=华鑫,2=鸿海"
)
private
String
videoType
;
private
String
videoType
;
@Excel
(
name
=
"分类"
,
dictType
=
"t_video_kind"
)
private
String
kind
;
private
String
sort
;
/** 是否删除(0正常,1删除) */
/** 是否删除(0正常,1删除) */
private
String
isDel
;
private
String
isDel
;
...
@@ -90,6 +95,22 @@ public class TVideoManage extends BaseEntity
...
@@ -90,6 +95,22 @@ public class TVideoManage extends BaseEntity
this
.
videoType
=
videoType
;
this
.
videoType
=
videoType
;
}
}
public
String
getKind
()
{
return
kind
;
}
public
void
setKind
(
String
kind
)
{
this
.
kind
=
kind
;
}
public
String
getSort
()
{
return
sort
;
}
public
void
setSort
(
String
sort
)
{
this
.
sort
=
sort
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
huaxin-system/src/main/resources/mapper/system/TVideoManageMapper.xml
View file @
409ca0e0
...
@@ -13,10 +13,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -13,10 +13,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"remarks"
column=
"remarks"
/>
<result
property=
"remarks"
column=
"remarks"
/>
<result
property=
"videoType"
column=
"video_type"
/>
<result
property=
"videoType"
column=
"video_type"
/>
<result
property=
"kind"
column=
"kind"
/>
<result
property=
"sort"
column=
"sort"
/>
</resultMap>
</resultMap>
<sql
id=
"selectTVideoManageVo"
>
<sql
id=
"selectTVideoManageVo"
>
select video_id, video_name, video_resource, create_by, create_time, is_del, remarks, video_type from t_video_manage
select video_id, video_name, video_resource, create_by, create_time, is_del, remarks, video_type
, kind, sort
from t_video_manage
</sql>
</sql>
<select
id=
"selectTVideoManageList"
parameterType=
"TVideoManage"
resultMap=
"TVideoManageResult"
>
<select
id=
"selectTVideoManageList"
parameterType=
"TVideoManage"
resultMap=
"TVideoManageResult"
>
...
@@ -27,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -27,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"isDel != null and isDel != ''"
>
and is_del = #{isDel}
</if>
<if
test=
"isDel != null and isDel != ''"
>
and is_del = #{isDel}
</if>
<if
test=
"remarks != null and remarks != ''"
>
and remarks = #{remarks}
</if>
<if
test=
"remarks != null and remarks != ''"
>
and remarks = #{remarks}
</if>
<if
test=
"videoType != null and videoType != ''"
>
and video_type = #{videoType}
</if>
<if
test=
"videoType != null and videoType != ''"
>
and video_type = #{videoType}
</if>
<if
test=
"kind != null and kind != ''"
>
and kind = #{kind}
</if>
</where>
</where>
</select>
</select>
...
@@ -45,6 +48,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -45,6 +48,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"remarks != null"
>
remarks,
</if>
<if
test=
"remarks != null"
>
remarks,
</if>
<if
test=
"videoType != null"
>
video_type,
</if>
<if
test=
"videoType != null"
>
video_type,
</if>
<if
test=
"kind != null"
>
kind,
</if>
<if
test=
"sort != null"
>
sort,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"videoName != null"
>
#{videoName},
</if>
<if
test=
"videoName != null"
>
#{videoName},
</if>
...
@@ -54,6 +59,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -54,6 +59,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"remarks != null"
>
#{remarks},
</if>
<if
test=
"remarks != null"
>
#{remarks},
</if>
<if
test=
"videoType != null"
>
#{videoType},
</if>
<if
test=
"videoType != null"
>
#{videoType},
</if>
<if
test=
"kind != null"
>
#{kind},
</if>
<if
test=
"sort != null"
>
#{sort},
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -66,6 +73,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -66,6 +73,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"videoType != null"
>
video_type = #{videoType},
</if>
<if
test=
"videoType != null"
>
video_type = #{videoType},
</if>
<if
test=
"kind != null"
>
kind = #{kind},
</if>
<if
test=
"sort != null"
>
sort = #{sort},
</if>
</trim>
</trim>
where video_id = #{videoId}
where video_id = #{videoId}
</update>
</update>
...
...
huaxin-web/src/views/video/manage/index.vue
View file @
409ca0e0
...
@@ -94,6 +94,8 @@
...
@@ -94,6 +94,8 @@
<span
v-else
>
-
</span>
<span
v-else
>
-
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"视频分类"
align=
"center"
prop=
"kind"
:formatter=
"kindFormat"
/>
<el-table-column
label=
"视频排序"
align=
"center"
prop=
"sort"
/>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remarks"
>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remarks"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.remarks"
>
{{
scope
.
row
.
remarks
}}
</span>
<span
v-if=
"scope.row.remarks"
>
{{
scope
.
row
.
remarks
}}
</span>
...
@@ -138,11 +140,29 @@
...
@@ -138,11 +140,29 @@
<el-input
v-model=
"form.videoResource"
placeholder=
"请输入视频资源号"
/>
<el-input
v-model=
"form.videoResource"
placeholder=
"请输入视频资源号"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"视频资类型"
prop=
"videoType"
>
<el-form-item
label=
"视频资类型"
prop=
"videoType"
>
<el-select
v-model=
"form.videoType"
placeholder=
"请选择视频资类型"
style=
"width: 100%"
>
<el-select
v-model=
"form.videoType"
placeholder=
"请选择视频资类型"
style=
"width: 100%"
@
change=
"form.kind = null"
>
<el-option
label=
"华鑫"
value=
"1"
/>
<el-option
label=
"华鑫"
value=
"1"
/>
<el-option
label=
"鸿海"
value=
"2"
/>
<el-option
label=
"鸿海"
value=
"2"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"视频分类"
prop=
"kind"
>
<el-select
v-model=
"form.kind"
placeholder=
"请选择视频分类"
style=
"width: 100%"
>
<el-option
v-for=
"dict in form.videoType == '1' ? huaxinKindOptions : honghaiKindOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"视频排序"
prop=
"sort"
>
<el-input
v-model=
"form.sort"
placeholder=
"请输入视频排序"
/>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
type=
"textarea"
v-model=
"form.remarks"
placeholder=
"请输入备注"
/>
<el-input
type=
"textarea"
v-model=
"form.remarks"
placeholder=
"请输入备注"
/>
</el-form-item>
</el-form-item>
...
@@ -208,10 +228,18 @@ export default {
...
@@ -208,10 +228,18 @@ export default {
videoType
:
[
videoType
:
[
{
required
:
true
,
message
:
"请选择视频类型"
,
trigger
:
"change"
}
{
required
:
true
,
message
:
"请选择视频类型"
,
trigger
:
"change"
}
]
]
}
},
huaxinKindOptions
:
[],
honghaiKindOptions
:
[],
};
};
},
},
created
()
{
created
()
{
this
.
getDicts
(
"t_huaxin_video_kind"
).
then
(
response
=>
{
this
.
huaxinKindOptions
=
response
.
data
;
});
this
.
getDicts
(
"t_honghai_video_kind"
).
then
(
response
=>
{
this
.
honghaiKindOptions
=
response
.
data
;
});
this
.
getList
();
this
.
getList
();
},
},
methods
:
{
methods
:
{
...
@@ -224,6 +252,13 @@ export default {
...
@@ -224,6 +252,13 @@ export default {
this
.
loading
=
false
;
this
.
loading
=
false
;
});
});
},
},
// 视频分类字典翻译
kindFormat
(
row
,
column
)
{
if
(
row
.
videoType
==
'2'
){
return
this
.
selectDictLabel
(
this
.
honghaiKindOptions
,
row
.
kind
);
}
return
this
.
selectDictLabel
(
this
.
huaxinKindOptions
,
row
.
kind
);
},
// 取消按钮
// 取消按钮
cancel
()
{
cancel
()
{
this
.
open
=
false
;
this
.
open
=
false
;
...
@@ -239,7 +274,7 @@ export default {
...
@@ -239,7 +274,7 @@ export default {
createTime
:
null
,
createTime
:
null
,
isDel
:
null
,
isDel
:
null
,
remarks
:
null
,
remarks
:
null
,
videoType
:
null
videoType
:
'1'
};
};
this
.
resetForm
(
"form"
);
this
.
resetForm
(
"form"
);
},
},
...
...
huaxin-web/src/views/video/monitor/leftList/Left.vue
View file @
409ca0e0
...
@@ -16,9 +16,9 @@
...
@@ -16,9 +16,9 @@
<el-tree
class=
"leftTree"
:data=
"data"
>
<el-tree
class=
"leftTree"
:data=
"data"
>
<div
slot-scope=
"
{ node, data }" @dblclick="handleNodeClick(data)" style="width:100%">
<div
slot-scope=
"
{ node, data }" @dblclick="handleNodeClick(data)" style="width:100%">
<div
style=
"width:100%"
>
<div
style=
"width:100%"
>
<span
class=
"tree_span "
>
<span
class=
"tree_span "
>
<i
class=
" el-icon-video-camera"
/>
{{
data
.
videoName
}}
<i
class=
" el-icon-video-camera"
/>
{{
data
.
videoName
}}
</span>
</span>
</div>
</div>
</div>
</div>
</el-tree>
</el-tree>
...
@@ -27,9 +27,9 @@
...
@@ -27,9 +27,9 @@
<el-tree
class=
"leftTree"
:data=
"data"
>
<el-tree
class=
"leftTree"
:data=
"data"
>
<div
slot-scope=
"
{ node, data }" @dblclick="handleNodeClick(data)" style="width:100%">
<div
slot-scope=
"
{ node, data }" @dblclick="handleNodeClick(data)" style="width:100%">
<div
style=
"width:100%"
>
<div
style=
"width:100%"
>
<span
class=
"tree_span "
>
<span
class=
"tree_span "
>
<i
class=
" el-icon-video-camera"
/>
{{
data
.
videoName
}}
<i
class=
" el-icon-video-camera"
/>
{{
data
.
videoName
}}
</span>
</span>
</div>
</div>
</div>
</div>
</el-tree>
</el-tree>
...
@@ -51,7 +51,8 @@ export default {
...
@@ -51,7 +51,8 @@ export default {
videoType
:
"1"
,
videoType
:
"1"
,
isDel
:
"0"
isDel
:
"0"
},
},
activeName
:
"1"
activeName
:
"1"
,
kindOptions
:
[]
};
};
},
},
created
(){
created
(){
...
@@ -59,15 +60,31 @@ export default {
...
@@ -59,15 +60,31 @@ export default {
},
},
methods
:
{
methods
:
{
handleNodeClick
(
data
)
{
handleNodeClick
(
data
)
{
this
.
$emit
(
'playVideo'
,
data
);
if
(
data
.
videoResource
){
this
.
$emit
(
'playVideo'
,
data
);
}
},
},
getVideoInfo
(){
getVideoInfo
(){
videoInfoList
(
this
.
params
).
then
(
res
=>
{
videoInfoList
(
this
.
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
&&
res
.
data
){
if
(
res
.
code
==
200
&&
res
.
data
){
this
.
data
=
res
.
data
;
//this.data = res.data;
this
.
getKindByType
(
res
.
data
);
}
}
})
})
},
},
// 获取树数据
getTreeData
(
data
){
let
treeData
=
[];
this
.
kindOptions
.
forEach
(
item
=>
{
let
kindData
=
{
videoName
:
item
.
dictLabel
,
children
:
[]};
let
videoInfo
=
data
.
filter
(
video
=>
video
.
kind
==
item
.
dictValue
).
sort
((
a
,
b
)
=>
Number
(
a
.
sort
)
-
Number
(
b
.
sort
));
if
(
videoInfo
){
kindData
.
children
=
videoInfo
}
treeData
.
push
(
kindData
);
})
this
.
data
=
treeData
;
},
search
(){
search
(){
this
.
params
.
videoName
=
this
.
videoName
;
this
.
params
.
videoName
=
this
.
videoName
;
this
.
getVideoInfo
();
this
.
getVideoInfo
();
...
@@ -75,6 +92,19 @@ export default {
...
@@ -75,6 +92,19 @@ export default {
handleClick
(
tab
,
event
)
{
handleClick
(
tab
,
event
)
{
this
.
params
.
videoType
=
tab
.
name
;
this
.
params
.
videoType
=
tab
.
name
;
this
.
getVideoInfo
();
this
.
getVideoInfo
();
},
getKindByType
(
data
){
if
(
this
.
activeName
==
'1'
){
this
.
getDicts
(
"t_huaxin_video_kind"
).
then
(
response
=>
{
this
.
kindOptions
=
response
.
data
;
this
.
getTreeData
(
data
);
});
}
else
{
this
.
getDicts
(
"t_honghai_video_kind"
).
then
(
response
=>
{
this
.
kindOptions
=
response
.
data
;
this
.
getTreeData
(
data
);
});
}
}
}
}
}
}
}
...
...
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