Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-qa
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-qa
Commits
c3c52e1e
提交
c3c52e1e
authored
2月 23, 2022
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
dea23161
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
84 行增加
和
22 行删除
+84
-22
base.js
src/api/base.js
+1
-1
api.js
src/modules/question/api.js
+10
-4
Detail.vue
src/modules/question/components/Detail.vue
+1
-1
List.vue
src/modules/question/views/List.vue
+68
-12
vite.config.js
vite.config.js
+4
-4
没有找到文件。
src/api/base.js
浏览文件 @
c3c52e1e
...
@@ -29,5 +29,5 @@ export function uploadFile(data) {
...
@@ -29,5 +29,5 @@ export function uploadFile(data) {
}
}
// 获取可访问的所有项目
// 获取可访问的所有项目
export
function
getPermissionProject
()
{
export
function
getPermissionProject
()
{
return
httpRequest
.
get
(
'/qbs/admin/v1/projects'
)
return
httpRequest
.
get
(
'/
api/
qbs/admin/v1/projects'
)
}
}
src/modules/question/api.js
浏览文件 @
c3c52e1e
...
@@ -4,25 +4,31 @@ import httpRequest from '@/utils/axios'
...
@@ -4,25 +4,31 @@ import httpRequest from '@/utils/axios'
* 获取应用列表
* 获取应用列表
*/
*/
export
function
getAppList
(
params
)
{
export
function
getAppList
(
params
)
{
return
httpRequest
.
get
(
'/qbs/admin/v1/questions'
,
{
params
})
return
httpRequest
.
get
(
'/
api/
qbs/admin/v1/questions'
,
{
params
})
}
}
/**
/**
* 获取题目分类树形结构
* 获取题目分类树形结构
*/
*/
export
function
getQuestionCategory
(
params
)
{
export
function
getQuestionCategory
(
params
)
{
return
httpRequest
.
get
(
`/qbs/admin/v1/question-category/tree/
${
params
}
`
)
return
httpRequest
.
get
(
`/
api/
qbs/admin/v1/question-category/tree/
${
params
}
`
)
}
}
/**
/**
* 添加试题分类
* 添加试题分类
*/
*/
export
function
addQuestionCategory
(
data
)
{
export
function
addQuestionCategory
(
data
)
{
return
httpRequest
.
post
(
'/qbs/admin/v1/question-category'
,
data
)
return
httpRequest
.
post
(
'/
api/
qbs/admin/v1/question-category'
,
data
)
}
}
/**
/**
* 更新应用
* 更新应用
*/
*/
export
function
updateQuestionCategory
(
id
,
data
)
{
export
function
updateQuestionCategory
(
id
,
data
)
{
return
httpRequest
.
put
(
`/qbs/admin/v1/question-category/
${
id
}
`
,
data
)
return
httpRequest
.
put
(
`/api/qbs/admin/v1/question-category/
${
id
}
`
,
data
)
}
/**
* 获取应用列表
*/
export
function
searchTag
(
params
)
{
return
httpRequest
.
get
(
'/api/qbs/admin/v1/knowledge-point/search/x1'
,
{
params
})
}
}
/**
/**
...
...
src/modules/question/components/Detail.vue
浏览文件 @
c3c52e1e
...
@@ -111,5 +111,5 @@ export default {
...
@@ -111,5 +111,5 @@ export default {
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
>
</
style
>
</
style
>
src/modules/question/views/List.vue
浏览文件 @
c3c52e1e
<
template
>
<
template
>
<app-card>
<app-card>
<app-list
v-bind=
"tableOptions"
ref=
"list"
>
<app-list
v-bind=
"tableOptions"
ref=
"list"
>
<!--
<template
#
header-aside
>
<template
v-slot:radio-filter
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"visible = true"
>
新建试题
</el-button>
<el-radio
v-model=
"radio"
label=
"1"
>
我的题库
</el-radio>
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"visible = true"
>
批量导入试题
</el-button>
<el-radio
v-model=
"radio"
label=
"2"
>
公共题库
</el-radio>
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"visible = true"
>
批量删除
</el-button>
</
template
>
</
template
>
-->
<
template
v-slot:input-filter
>
<div
class=
"filter-input"
>
<el-input
v-model=
"filterInput"
placeholder=
"请选择"
></el-input>
<div
class=
"pop"
></div>
</div>
</
template
>
<div
class=
"operate-btn"
>
<div
class=
"operate-btn"
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"$router.push({ path: '/question/create' })"
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"$router.push({ path: '/question/create' })"
>
新建试题
</el-button
>
新建试题
</el-button
...
@@ -28,39 +33,73 @@ import { getAppList, getQuestionCategory } from '../api'
...
@@ -28,39 +33,73 @@ import { getAppList, getQuestionCategory } from '../api'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
visible
:
false
visible
:
false
,
radio
:
'1'
,
filterInput
:
''
}
}
},
},
computed
:
{
computed
:
{
tableOptions
()
{
tableOptions
()
{
return
{
return
{
filters
:
[
filters
:
[
{
slots
:
'radio-filter'
,
prop
:
'permission'
,
label
:
'题库范围:'
},
{
{
type
:
'select'
,
type
:
'select'
,
label
:
'题目类型:'
label
:
'题目类型:'
,
prop
:
'question_type'
,
options
:
[
{
label
:
'单选题'
,
value
:
1
},
{
label
:
'多选题'
,
value
:
2
},
{
label
:
'简答题'
,
value
:
3
},
{
label
:
'案例题'
,
value
:
5
},
{
label
:
'判断题'
,
value
:
6
},
{
label
:
'实操题'
,
value
:
7
},
{
label
:
'情景题'
,
value
:
8
}
]
},
},
{
{
prop
:
'question_title'
,
type
:
'input'
,
type
:
'input'
,
label
:
'题目标题:'
label
:
'题目标题:'
},
},
{
{
prop
:
'question_content'
,
type
:
'input'
,
type
:
'input'
,
label
:
'题
目
内容:'
label
:
'题
干
内容:'
},
},
{
{
prop
:
'question_difficulty'
,
type
:
'select'
,
type
:
'select'
,
label
:
'难度等级:'
label
:
'难度等级:'
,
options
:
[
{
label
:
'易'
,
value
:
'1'
},
{
label
:
'中'
,
value
:
'2'
},
{
label
:
'难'
,
value
:
'3'
}
]
},
},
{
{
type
:
'select'
,
slots
:
'input-filter'
,
prop
:
'question_category'
,
type
:
'input'
,
label
:
'试题分类:'
label
:
'试题分类:'
},
},
{
{
type
:
'input'
,
type
:
'input'
,
label
:
'知识点标签:'
prop
:
'question_tag'
,
label
:
'知识点/标签:'
}
}
],
],
remote
:
{
httpRequest
:
getAppList
},
remote
:
{
httpRequest
:
getAppList
,
params
:
{
permission
:
this
.
radio
,
project_prefix
:
'x1'
}
},
columns
:
[
columns
:
[
{
label
:
'序号'
,
prop
:
'order'
},
{
label
:
'序号'
,
prop
:
'order'
},
{
label
:
'题目类型'
,
prop
:
'type'
},
{
label
:
'题目类型'
,
prop
:
'type'
},
...
@@ -91,6 +130,13 @@ export default {
...
@@ -91,6 +130,13 @@ export default {
// tan ~~~~~
// tan ~~~~~
this
.
$router
.
push
({
path
:
'/settings/users'
,
query
:
{
appid
:
row
.
id
}
})
this
.
$router
.
push
({
path
:
'/settings/users'
,
query
:
{
appid
:
row
.
id
}
})
}
}
},
watch
:
{
radio
:
{
handler
()
{
this
.
$refs
.
list
.
refetch
()
}
}
}
}
}
}
</
script
>
</
script
>
...
@@ -100,4 +146,14 @@ export default {
...
@@ -100,4 +146,14 @@ export default {
display
:
flex
;
display
:
flex
;
padding-bottom
:
10px
;
padding-bottom
:
10px
;
}
}
.filter-input
{
position
:
relative
;
.pop
{
position
:
absolute
;
top
:
0
;
right
:
0
;
width
:
200px
;
height
:
100%
;
}
}
</
style
>
</
style
>
vite.config.js
浏览文件 @
c3c52e1e
...
@@ -24,12 +24,12 @@ export default defineConfig({
...
@@ -24,12 +24,12 @@ export default defineConfig({
// '/api': 'https://app.ezijing.com'
// '/api': 'https://app.ezijing.com'
// }
// }
proxy
:
{
proxy
:
{
'/api'
:
'https://app.ezijing.com'
,
'/api/qbs'
:
{
'/qbs'
:
{
target
:
'https://question-api.ezijing.com'
,
target
:
'https://question-api.ezijing.com'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
rewrite
:
path
=>
path
.
replace
(
/^
\/
qbs/
,
''
)
rewrite
:
path
=>
path
.
replace
(
/^
\/
api
\/
qbs/
,
''
)
}
},
'/api'
:
'https://app.ezijing.com'
}
}
},
},
resolve
:
{
resolve
:
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论