Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-resource
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-resource
Commits
75f84279
提交
75f84279
authored
6月 13, 2022
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更改文件目录
上级
bab50a3f
显示空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
70 行增加
和
48 行删除
+70
-48
useCategory.ts
src/composables/useCategory.ts
+13
-0
BottomInfo.vue
src/modules/resource/courseware/components/BottomInfo.vue
+0
-0
CenterInfo.vue
src/modules/resource/courseware/components/CenterInfo.vue
+0
-0
Operation.vue
src/modules/resource/courseware/components/Operation.vue
+0
-0
TopInfo.vue
src/modules/resource/courseware/components/TopInfo.vue
+0
-0
View.vue
src/modules/resource/courseware/views/View.vue
+3
-3
api.ts
src/modules/resource/lessonplan/api.ts
+19
-13
BottomInfo.vue
src/modules/resource/lessonplan/components/BottomInfo.vue
+0
-0
CenterInfo.vue
src/modules/resource/lessonplan/components/CenterInfo.vue
+0
-0
TopInfo.vue
src/modules/resource/lessonplan/components/TopInfo.vue
+0
-0
Update.vue
src/modules/resource/lessonplan/views/Update.vue
+17
-10
View.vue
src/modules/resource/lessonplan/views/View.vue
+8
-13
List.vue
src/modules/resource/video/views/List.vue
+10
-9
没有找到文件。
src/composables/useCategory.ts
0 → 100644
浏览文件 @
75f84279
import
{
getCategoryList
}
from
'@/api/base'
export
function
useCategory
()
{
let
list
=
$ref
([])
onMounted
(()
=>
{
getCategoryList
({
type
:
'tree'
}).
then
((
res
:
any
)
=>
{
list
=
res
.
data
console
.
log
(
list
)
})
})
return
{
list
}
}
\ No newline at end of file
src/modules/resource/courseware/components/
view/
BottomInfo.vue
→
src/modules/resource/courseware/components/BottomInfo.vue
浏览文件 @
75f84279
File moved
src/modules/resource/courseware/components/
view/
CenterInfo.vue
→
src/modules/resource/courseware/components/CenterInfo.vue
浏览文件 @
75f84279
File moved
src/modules/resource/courseware/components/
view/
Operation.vue
→
src/modules/resource/courseware/components/Operation.vue
浏览文件 @
75f84279
File moved
src/modules/resource/courseware/components/
view/
TopInfo.vue
→
src/modules/resource/courseware/components/TopInfo.vue
浏览文件 @
75f84279
File moved
src/modules/resource/courseware/views/View.vue
浏览文件 @
75f84279
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
TopInfo
from
'../components/
view/
TopInfo.vue'
import
TopInfo
from
'../components/TopInfo.vue'
import
CenterInfo
from
'../components/
view/
CenterInfo.vue'
import
CenterInfo
from
'../components/CenterInfo.vue'
import
BottomInfo
from
'../components/
view/
BottomInfo.vue'
import
BottomInfo
from
'../components/BottomInfo.vue'
import
{
getCourseDetails
}
from
'../api'
import
{
getCourseDetails
}
from
'../api'
const
router
=
useRouter
()
const
router
=
useRouter
()
...
...
src/modules/resource/lessonplan/api.ts
浏览文件 @
75f84279
import
httpRequest
from
'@/utils/axios'
import
httpRequest
from
'@/utils/axios'
// 获取视频列表
// 获取教案列表
export
function
getVideoList
(
params
?:
{
type
?:
string
;
page
?:
number
;
page_size
?:
number
})
{
export
function
getLessonList
(
params
?:
{
return
httpRequest
.
get
(
'/api/psp/backend/video/index'
,
{
params
})
tab
:
string
status
?:
string
authorized
?:
string
classification
?:
string
page
?:
number
[
'per-page'
]?:
number
})
{
return
httpRequest
.
get
(
'/api/resource/v1/resource/lesson-plan/list'
,
{
params
})
}
}
//
创建视频
//
获取项目列表
export
function
createVideo
(
data
:
{
course_name
:
string
;
cover_page
:
string
;
type
:
string
;
weight
?
:
string
})
{
export
function
getProjectList
(
params
:
{
organization_id
:
string
})
{
return
httpRequest
.
post
(
'/api/psp/backend/video/create'
,
data
)
return
httpRequest
.
get
(
'/api/resource/v1/util/members'
,
{
params
}
)
}
}
// 获取分类列表
// 更新视频
export
function
getCategoryList
(
params
:
{
type
:
string
;
category_name
?:
string
})
{
export
function
updateVideo
(
data
:
{
id
:
string
;
course_name
:
string
;
cover_page
:
string
;
type
:
string
;
weight
?:
string
})
{
return
httpRequest
.
get
(
'/api/resource/v1/backend/category/list'
,
{
params
})
return
httpRequest
.
post
(
'/api/psp/backend/video/update'
,
data
)
}
}
//
获取视频详情
//
创建教案
export
function
getVideo
(
params
:
{
id
:
string
})
{
export
function
createLessonPlan
(
data
:
{
name
:
string
;
source
:
string
;
classification
:
string
;
knowledge_points
:
string
;
url
:
string
;
type
:
string
;
size
:
string
})
{
return
httpRequest
.
get
(
'/api/psp/backend/video/view'
,
{
params
}
)
return
httpRequest
.
post
(
'/api/resource/v1/resource/lesson-plan/create'
,
data
)
}
}
src/modules/resource/lessonplan/components/
view/
BottomInfo.vue
→
src/modules/resource/lessonplan/components/BottomInfo.vue
浏览文件 @
75f84279
File moved
src/modules/resource/lessonplan/components/
view/
CenterInfo.vue
→
src/modules/resource/lessonplan/components/CenterInfo.vue
浏览文件 @
75f84279
File moved
src/modules/resource/lessonplan/components/
view/
TopInfo.vue
→
src/modules/resource/lessonplan/components/TopInfo.vue
浏览文件 @
75f84279
File moved
src/modules/resource/lessonplan/views/Update.vue
浏览文件 @
75f84279
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
import
{
getCategoryList
}
from
'@/api/base'
import
{
getCategoryList
}
from
'@/api/base'
import
type
{
FormInstance
}
from
'element-plus'
import
type
{
FormInstance
}
from
'element-plus'
import
{
ElMessage
}
from
'element-plus'
import
{
ElMessage
}
from
'element-plus'
import
{
createLessonPlan
}
from
'../api'
// 路由
// 路由
const
router
=
useRouter
()
const
router
=
useRouter
()
...
@@ -38,6 +39,12 @@
...
@@ -38,6 +39,12 @@
return
return
}
}
const
id
=
router
.
currentRoute
.
value
.
query
.
id
as
string
const
id
=
router
.
currentRoute
.
value
.
query
.
id
as
string
const
formFile
=
form
.
file
[
0
]
form
.
url
=
formFile
.
url
form
.
type
=
formFile
.
type
form
.
size
=
formFile
.
size
const
params
=
Object
.
assign
({},
form
)
delete
params
.
file
if
(
id
!==
''
&&
id
)
{
if
(
id
!==
''
&&
id
)
{
// const params = Object.assign({ id: id }, form)
// const params = Object.assign({ id: id }, form)
// updateVideo(params).then((res: any) => {
// updateVideo(params).then((res: any) => {
...
@@ -51,16 +58,16 @@
...
@@ -51,16 +58,16 @@
// }
// }
// })
// })
}
else
{
}
else
{
// createVideo(form
).then((res:any) => {
createLessonPlan
(
params
).
then
((
res
:
any
)
=>
{
//
if (res.code === 0) {
if
(
res
.
code
===
0
)
{
//
ElMessage({ message: '创建成功', type: 'success' })
ElMessage
({
message
:
'创建成功'
,
type
:
'success'
})
//
setTimeout(() => {
setTimeout
(()
=>
{
//
router.push({
router
.
push
({
// path: '/resource/video
'
path
:
'/resource/lessonplan
'
//
})
})
//
}, 1000)
},
1000
)
//
}
}
//
})
})
}
}
}
else
{
}
else
{
...
...
src/modules/resource/lessonplan/views/View.vue
浏览文件 @
75f84279
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
TopInfo
from
'../components/
view/
TopInfo.vue'
import
TopInfo
from
'../components/TopInfo.vue'
import
CenterInfo
from
'../components/
view/
CenterInfo.vue'
import
CenterInfo
from
'../components/CenterInfo.vue'
import
BottomInfo
from
'../components/
view/
BottomInfo.vue'
import
BottomInfo
from
'../components/BottomInfo.vue'
const
listOptions
=
{
const
listOptions
=
{
columns
:
[
columns
:
[
{
label
:
'课程图片'
,
prop
:
'img'
,
align
:
'center'
},
{
label
:
'课程图片'
,
prop
:
'img'
,
align
:
'center'
},
...
@@ -39,12 +39,7 @@ const listOptions = {
...
@@ -39,12 +39,7 @@ const listOptions = {
<template
#
table-operate=
"
{ row }">
<template
#
table-operate=
"
{ row }">
<el-space>
<el-space>
<router-link
:to=
"`/video/update/$
{row.id}`">
<router-link
:to=
"`/video/update/$
{row.id}`">
<el-button
<el-button
style=
"color: #399ee8"
type=
"primary"
link
>
查看
</el-button>
style=
"color: #399EE8;"
type=
"primary"
link
>
查看
</el-button
>
</router-link>
</router-link>
</el-space>
</el-space>
</
template
>
</
template
>
...
@@ -52,17 +47,17 @@ const listOptions = {
...
@@ -52,17 +47,17 @@ const listOptions = {
</AppCard>
</AppCard>
</template>
</template>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.btn-box
{
.btn-box
{
display
:
flex
;
display
:
flex
;
justify-content
:
right
;
justify-content
:
right
;
.btn-item
{
.btn-item
{
width
:
127px
;
width
:
127px
;
line-height
:
36px
;
line-height
:
36px
;
background
:
#
AA
1941
;
background
:
#
aa
1941
;
border-radius
:
20px
;
border-radius
:
20px
;
margin-right
:
10px
;
margin-right
:
10px
;
font-size
:
14px
;
font-size
:
14px
;
color
:
#
FFFFFF
;
color
:
#
ffffff
;
text-align
:
center
;
text-align
:
center
;
}
}
}
}
...
...
src/modules/resource/video/views/List.vue
浏览文件 @
75f84279
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
getVideoList
,
getProjectList
}
from
'../api'
import
{
getVideoList
,
getProjectList
}
from
'../api'
import
{
getCategoryList
}
from
'@/api/base'
//
import { getCategoryList } from '@/api/base'
import
CardListItem
from
'../components/CardListItem.vue'
import
CardListItem
from
'../components/CardListItem.vue'
import
{
Expand
,
Search
}
from
'@element-plus/icons-vue'
import
{
Expand
,
Search
}
from
'@element-plus/icons-vue'
import
{
useCategory
}
from
'@/composables/useCategory'
// 筛选项目列表
// 筛选项目列表
let
projectList
:
any
=
$ref
([])
let
projectList
:
any
=
$ref
([])
...
@@ -17,7 +18,6 @@ const tabChange = () => {
...
@@ -17,7 +18,6 @@ const tabChange = () => {
appList
.
value
.
refetch
()
appList
.
value
.
refetch
()
}
}
// 列表切换
// 列表切换
const
isCard
=
ref
(
false
)
const
isCard
=
ref
(
false
)
...
@@ -62,10 +62,11 @@ const listOptions = $computed(() => {
...
@@ -62,10 +62,11 @@ const listOptions = $computed(() => {
})
})
// 下拉选择tree 视频分类
// 下拉选择tree 视频分类
let
selectTree
=
$ref
([])
let
{
list
:
selectTree
}
=
useCategory
()
getCategoryList
({
type
:
'tree'
}).
then
((
res
:
any
)
=>
{
console
.
log
(
selectTree
)
selectTree
=
res
.
data
// getCategoryList({ type: 'tree' }).then((res: any) => {
})
// selectTree = res.data
// })
const
defaultProps
=
{
const
defaultProps
=
{
children
:
'children'
,
children
:
'children'
,
label
:
'category_name'
,
label
:
'category_name'
,
...
@@ -91,7 +92,7 @@ const defaultProps = {
...
@@ -91,7 +92,7 @@ const defaultProps = {
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<template
#
header-aside
></
template
>
<template
#
header-aside
></
template
>
<
template
#
table-cover=
"{ row }"
>
<
template
#
table-cover=
"{ row }"
>
<img
:src=
"row.cover"
style=
"width:
150px;display: block;"
>
<img
:src=
"row.cover"
style=
"width:
150px; display: block"
/
>
</
template
>
</
template
>
<
template
#
filter-type=
"{ params }"
>
<
template
#
filter-type=
"{ params }"
>
<el-tree-select
:props=
"defaultProps"
v-model=
"params.classification"
:data=
"selectTree"
/>
<el-tree-select
:props=
"defaultProps"
v-model=
"params.classification"
:data=
"selectTree"
/>
...
@@ -121,8 +122,8 @@ const defaultProps = {
...
@@ -121,8 +122,8 @@ const defaultProps = {
</AppCard>
</AppCard>
</template>
</template>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.card-list
{
.card-list
{
background
:
#
FAFAFA
;
background
:
#
fafafa
;
padding
:
20px
;
padding
:
20px
;
display
:
flex
;
display
:
flex
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论