Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
company_app
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
毛细亚
company_app
Commits
321919d1
提交
321919d1
authored
12月 05, 2025
作者:
施汉文
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
🦄
refactor: name单独搜索
上级
8e81fc35
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
20 行增加
和
10 行删除
+20
-10
index.vue
src/views/components/InstructionalVideo/index.vue
+20
-10
没有找到文件。
src/views/components/InstructionalVideo/index.vue
浏览文件 @
321919d1
...
...
@@ -4,18 +4,23 @@
placeholder=
"请输入内容"
prefix-icon=
"el-icon-search"
v-model
.
trim=
"searchText"
@
input=
"debouncedGetVideoList"
>
</el-input>
<el-cascader
class=
"w-full mt-[8px]"
v-model=
"categoryValue"
:props=
"
{ emitPath: false, expandTrigger: 'click' }"
:options="categoryList"
@change="
g
etVideoList"
@change="
debouncedG
etVideoList"
>
</el-cascader>
<div
class=
"mt-[16px] space-y-[8px] flex-1 overflow-auto pb-[10px]"
>
<div
v-for=
"item in list"
class=
"mt-[16px] space-y-[8px] flex-1 overflow-auto pb-[10px]"
v-loading=
"loading"
>
<div
v-for=
"item in videoList"
:key=
"item.id"
class=
"flex justify-between items-center py-[3px] px-[8px] bottom-[1px] border border-[#E5E7EB] rounded-[4px]"
>
...
...
@@ -66,24 +71,27 @@ export default {
categoryValue
:
{},
categoryList
:
[],
videoList
:
[],
debouncedGetVideoList
:
null
,
loading
:
false
,
};
},
mounted
()
{
this
.
getCategoryList
();
// 初始化防抖函数,延迟300ms执行
this
.
debouncedGetVideoList
=
debounce
(()
=>
{
this
.
loading
=
true
;
this
.
getVideoList
().
finally
(()
=>
{
this
.
loading
=
false
;
});
},
300
);
},
computed
:
{
...
mapState
(
"user"
,
[
"userInfo"
,
"weixin_blongs_id"
]),
list
()
{
return
this
.
videoList
.
filter
((
item
)
=>
item
.
video_name
.
includes
(
this
.
searchText
)
);
},
},
methods
:
{
...
mapMutations
(
"common"
,
[
"set_sendSkillMessage"
]),
// 视频分类
async
getCategoryList
()
{
console
.
log
(
this
.
userInfo
);
// return;
const
{
data
}
=
await
teachingVideoCategoryListApi
({
weixin_blongs_id
:
this
.
weixin_blongs_id
,
...
...
@@ -108,9 +116,11 @@ export default {
return
;
}
const
{
data
}
=
await
teachingVideoVideoListApi
({
weixin_blongs_id
:
this
.
categoryValue
.
weixin_blongs_id
,
weixin_blongs_id
:
this
.
categoryValue
.
weixin_blongs_id
||
this
.
weixin_blongs_id
,
main_game_id
:
this
.
categoryValue
.
main_game_id
,
video_type
:
this
.
categoryValue
.
id
,
video_name
:
this
.
searchText
,
page
:
1
,
page_size
:
200
,
});
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论