Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-qa
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-qa
Commits
8fb4b40f
提交
8fb4b40f
authored
3月 03, 2022
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改接口项目传参
上级
4b45049b
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
15 行增加
和
6 行删除
+15
-6
api.js
src/modules/question/api.js
+2
-2
Detail.vue
src/modules/question/components/Detail.vue
+1
-1
importQuestion.vue
src/modules/question/components/importQuestion.vue
+6
-1
Classify.vue
src/modules/question/views/Classify.vue
+6
-2
没有找到文件。
src/modules/question/api.js
浏览文件 @
8fb4b40f
...
@@ -58,9 +58,9 @@ export function questionDetail(id) {
...
@@ -58,9 +58,9 @@ export function questionDetail(id) {
/**
/**
* 导入题
* 导入题
*/
*/
export
function
importQuestion
(
data
)
{
export
function
importQuestion
(
tag
,
data
)
{
return
httpRequest
({
return
httpRequest
({
url
:
'/api/qbs/admin/v1/question/import/x1'
,
url
:
`/api/qbs/admin/v1/question/import/
${
tag
}
`
,
method
:
'post'
,
method
:
'post'
,
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
timeout
:
900000
,
timeout
:
900000
,
...
...
src/modules/question/components/Detail.vue
浏览文件 @
8fb4b40f
...
@@ -100,7 +100,7 @@ export default {
...
@@ -100,7 +100,7 @@ export default {
pointOptions
:
[],
pointOptions
:
[],
ruleForm
:
{
ruleForm
:
{
permission
:
'1'
,
permission
:
'1'
,
project_prefix
:
'
x1
'
,
project_prefix
:
''
,
question_type
:
1
,
question_type
:
1
,
question_difficulty
:
''
,
question_difficulty
:
''
,
question_title
:
''
,
question_title
:
''
,
...
...
src/modules/question/components/importQuestion.vue
浏览文件 @
8fb4b40f
...
@@ -48,6 +48,11 @@ export default {
...
@@ -48,6 +48,11 @@ export default {
fileList
:
[]
fileList
:
[]
}
}
},
},
computed
:
{
activeProject
()
{
return
this
.
$store
.
state
.
activeProject
||
{}
}
},
methods
:
{
methods
:
{
beforeUpload
(
file
)
{
beforeUpload
(
file
)
{
const
suffix
=
splitStrLast
(
file
.
name
,
'.'
)
const
suffix
=
splitStrLast
(
file
.
name
,
'.'
)
...
@@ -59,7 +64,7 @@ export default {
...
@@ -59,7 +64,7 @@ export default {
}
}
},
},
fetchFileUpload
(
data
)
{
fetchFileUpload
(
data
)
{
importQuestion
({
file
:
data
.
file
,
exam_id
:
this
.
id
}).
then
(
res
=>
{
importQuestion
(
this
.
activeProject
.
tag
,
{
file
:
data
.
file
,
exam_id
:
this
.
id
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
'导入数据成功'
)
this
.
$message
.
success
(
'导入数据成功'
)
history
.
go
(
0
)
history
.
go
(
0
)
...
...
src/modules/question/views/Classify.vue
浏览文件 @
8fb4b40f
...
@@ -39,13 +39,18 @@ export default {
...
@@ -39,13 +39,18 @@ export default {
}
}
}
}
},
},
computed
:
{
activeProject
()
{
return
this
.
$store
.
state
.
activeProject
||
{}
}
},
mounted
()
{
mounted
()
{
this
.
getTreeList
()
this
.
getTreeList
()
},
},
methods
:
{
methods
:
{
// 获取tree列表
// 获取tree列表
getTreeList
()
{
getTreeList
()
{
getQuestionCategory
(
'x1'
).
then
(
res
=>
{
getQuestionCategory
(
this
.
activeProject
.
tag
).
then
(
res
=>
{
if
(
Array
.
isArray
(
res
.
data
))
{
if
(
Array
.
isArray
(
res
.
data
))
{
this
.
initTree
(
res
.
data
)
this
.
initTree
(
res
.
data
)
}
}
...
@@ -54,7 +59,6 @@ export default {
...
@@ -54,7 +59,6 @@ export default {
// 发送请求添加 || 编辑tree
// 发送请求添加 || 编辑tree
addTree
()
{
addTree
()
{
const
data
=
{
const
data
=
{
project_prefix
:
'x1'
,
pid
:
this
.
treeParams
.
id
||
0
,
pid
:
this
.
treeParams
.
id
||
0
,
category_name
:
this
.
treeParams
.
name
||
'node'
category_name
:
this
.
treeParams
.
name
||
'node'
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论