Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-resource
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-resource
Commits
5154ef9f
提交
5154ef9f
authored
7月 01, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updates
上级
0c160cc9
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
44 行增加
和
13 行删除
+44
-13
base.ts
src/api/base.ts
+5
-1
useQuestionList.ts
src/composables/useQuestionList.ts
+21
-0
api.ts
src/modules/course/create/api.ts
+2
-1
AddExamDialog.vue
...rse/create/components/stepTwoComponents/AddExamDialog.vue
+9
-7
AddVideoDialog.vue
...se/create/components/stepTwoComponents/AddVideoDialog.vue
+7
-4
没有找到文件。
src/api/base.ts
浏览文件 @
5154ef9f
...
...
@@ -55,6 +55,10 @@ export function getCategoryList(params: { type: string; category_name?: string }
}
// 获取项目列表
export
function
getProjectList
(
params
:
{
organization_id
?:
string
,
project_id
?:
string
})
{
export
function
getProjectList
(
params
:
{
organization_id
?:
string
;
project_id
?:
string
})
{
return
httpRequest
.
get
(
'/api/resource/v1/util/members'
,
{
params
})
}
// 获取试题分类
export
function
getQuestionCategory
(
params
:
{
project_tag
:
string
})
{
return
httpRequest
.
get
(
`/api/qbs/admin/v2/question-category/tree/
${
params
.
project_tag
}
`
,
{
params
})
}
src/composables/useQuestionList.ts
0 → 100644
浏览文件 @
5154ef9f
import
{
getQuestionCategory
}
from
'@/api/base'
export
function
useQuestionList
()
{
const
list
=
ref
([])
const
params
=
{
project_tag
:
'resourse_ci'
}
getQuestionCategory
(
params
).
then
((
res
:
any
)
=>
{
list
.
value
=
res
.
data
.
filter
((
item
:
any
)
=>
{
item
.
children
=
detailChild
(
item
.
children
)
return
parseInt
(
item
.
status
)
})
})
const
detailChild
=
(
child
:
any
)
=>
{
if
(
!
child
)
return
[]
return
child
.
filter
((
item
:
any
)
=>
{
item
.
children
=
detailChild
(
item
.
children
)
return
parseInt
(
item
.
status
)
})
}
return
{
list
}
}
src/modules/course/create/api.ts
浏览文件 @
5154ef9f
...
...
@@ -23,7 +23,7 @@ export function searchExam(params: {
page
?:
string
limit
?:
string
})
{
return
httpRequest
.
get
(
'/api/qbs/admin/v2/question-papers/{project_tag}'
,
{
params
})
return
httpRequest
.
get
(
`/api/qbs/admin/v2/question-papers/
${
params
.
project_tag
}
`
,
{
params
})
}
// 新建课件
...
...
@@ -204,3 +204,4 @@ export function delCharacter(data: { id: string; course_id: string }) {
export
function
getLiveList
(
params
:
{
name
:
string
;
page
?:
number
;
[
'page_size'
]?:
number
})
{
return
httpRequest
.
get
(
'/api/resource/v1/course/course/search-live'
,
{
params
})
}
src/modules/course/create/components/stepTwoComponents/AddExamDialog.vue
浏览文件 @
5154ef9f
<
script
setup
lang=
"ts"
>
import
{
searchExam
,
createCharacter
}
from
'../../api'
import
{
use
GetCategoryList
}
from
'@/composables/useGetCategory
List'
import
{
use
QuestionList
}
from
'@/composables/useQuestion
List'
const
appList
=
ref
()
let
{
list
:
selectTree
}
=
use
GetCategory
List
()
let
{
list
:
selectTree
}
=
use
Question
List
()
const
tabValue
=
ref
(
'1'
)
const
multipleSelection
:
any
=
ref
([])
...
...
@@ -16,7 +16,6 @@ const props = defineProps({
type
:
String
,
required
:
true
},
chapterName
:
{
type
:
String
,
required
:
true
...
...
@@ -119,13 +118,16 @@ const typeFilter = () => {
const
handleSelectionChange
=
(
val
:
any
)
=>
{
multipleSelection
.
value
=
val
}
const
title
=
computed
(()
=>
{
return
`添加
${
props
.
btnInfo
.
btn_name
}
`
})
</
script
>
<
template
>
<el-drawer
:model-value=
"isShowExamDialog"
draggable
:before-close=
"handleCancel"
size=
"60%"
:title=
"title"
>
<el-drawer
:model-value=
"isShowExamDialog"
draggable
:before-close=
"handleCancel"
size=
"60%"
:title=
"`添加$
{props.btnInfo.btn_name}`"
>
<div
class=
"video-head"
>
<el-tabs
@
tab-change=
"tabChange"
v-model=
"tabValue"
>
<el-tab-pane
label=
"我的资源"
name=
"1"
></el-tab-pane>
...
...
src/modules/course/create/components/stepTwoComponents/AddVideoDialog.vue
浏览文件 @
5154ef9f
...
...
@@ -49,9 +49,6 @@ const defaultProps = {
const
typeFilter
=
()
=>
{
appList
.
value
.
refetch
()
}
const
title
=
computed
(()
=>
{
return
`添加
${
props
.
btnInfo
.
btn_name
}
`
})
const
listOptions
=
computed
(()
=>
{
console
.
log
(
props
.
btnInfo
.
resource_type
)
...
...
@@ -110,7 +107,13 @@ const handleSave = () => {
</
script
>
<
template
>
<el-drawer
:model-value=
"isShowAddDialog"
draggable
:before-close=
"handleCancel"
size=
"60%"
:title=
"title"
>
<el-drawer
:model-value=
"isShowAddDialog"
draggable
:before-close=
"handleCancel"
size=
"60%"
:title=
"`添加$
{props.btnInfo.btn_name}`"
>
<div
class=
"video-head"
>
<el-tabs
@
tab-change=
"tabChange"
v-model=
"tabValue"
>
<el-tab-pane
label=
"我的资源"
name=
"1"
></el-tab-pane>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论