Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-qa
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-qa
Commits
3da96aa4
提交
3da96aa4
authored
3月 07, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
9bddb8e8
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
33 行增加
和
14 行删除
+33
-14
AppList.vue
src/components/base/AppList.vue
+1
-1
QuestionTypeTreeselect.vue
src/components/base/QuestionTypeTreeselect.vue
+15
-9
AutomaticPaper.vue
src/modules/paper/components/AutomaticPaper.vue
+1
-0
Detail.vue
src/modules/paper/views/Detail.vue
+3
-1
List.vue
src/modules/paper/views/List.vue
+1
-1
index.js
src/store/index.js
+12
-2
没有找到文件。
src/components/base/AppList.vue
浏览文件 @
3da96aa4
...
...
@@ -101,7 +101,7 @@ export default {
// 是否含有翻页
hasPagination
:
{
type
:
Boolean
,
default
:
true
},
// 每页多少条数据
limit
:
{
type
:
Number
,
default
:
2
0
},
limit
:
{
type
:
Number
,
default
:
1
0
},
pagationLayout
:
{
type
:
String
,
default
:
'total, prev, pager, next, sizes, jumper'
}
},
data
()
{
...
...
src/components/base/QuestionTypeTreeselect.vue
浏览文件 @
3da96aa4
...
...
@@ -29,12 +29,13 @@
</
template
>
<
script
>
import
{
getQuestionCategory
}
from
'@/api/base.js
'
import
{
isEqual
}
from
'lodash
'
export
default
{
props
:
{
value
:
[
String
,
Array
],
multiple
:
{
type
:
Boolean
,
default
:
false
},
checkStrictly
:
{
type
:
Boolean
,
default
:
true
}
checkStrictly
:
{
type
:
Boolean
,
default
:
true
},
isRequestRemote
:
{
type
:
Boolean
,
default
:
true
}
// 是否请求远程数据,
},
data
()
{
return
{
...
...
@@ -63,16 +64,18 @@ export default {
return
{
label
:
'category_name'
,
value
:
'id'
}
}
},
beforeMount
()
{
mounted
()
{
this
.
getQuestionCategory
()
},
methods
:
{
getQuestionCategory
()
{
getQuestionCategory
({
project_prefix
:
this
.
activeProject
.
tag
}).
then
(
res
=>
{
this
.
$refs
.
select
.
options
=
res
.
data
this
.
options
=
res
.
data
this
.
$nextTick
(
this
.
setChecked
)
})
async
getQuestionCategory
()
{
let
list
=
this
.
$store
.
state
.
questionCategory
||
[]
if
(
this
.
isRequestRemote
||
!
list
.
length
)
{
list
=
await
this
.
$store
.
dispatch
(
'getQuestionCategory'
,
{
project_prefix
:
this
.
activeProject
.
tag
})
}
this
.
$refs
.
select
.
options
=
list
this
.
options
=
list
this
.
$nextTick
(
this
.
setChecked
)
},
setChecked
()
{
const
RefTree
=
this
.
$refs
.
tree
...
...
@@ -114,6 +117,9 @@ export default {
this
.
handleUpdate
(
value
)
},
handleUpdate
(
value
)
{
if
(
isEqual
(
value
,
this
.
value
))
{
return
}
this
.
$emit
(
'input'
,
value
)
this
.
$emit
(
'change'
,
value
)
}
...
...
src/modules/paper/components/AutomaticPaper.vue
浏览文件 @
3da96aa4
...
...
@@ -42,6 +42,7 @@
<
template
slot-scope=
"{ row, $index }"
>
<question-type-treeselect
multiple
:isRequestRemote=
"false"
v-model=
"row.question_categories"
@
change=
"getQuestionMaxCount($index, row)"
style=
"width: 100%"
...
...
src/modules/paper/views/Detail.vue
浏览文件 @
3da96aa4
...
...
@@ -8,7 +8,7 @@
<el-descriptions
:column=
"2"
class=
"descriptionsCon"
>
<el-descriptions-item
label=
"试卷名称"
>
{{ detail.paper_title }}
</el-descriptions-item>
<el-descriptions-item
label=
"标签"
>
{{ detail.paper_labels }}
</el-descriptions-item>
<el-descriptions-item
label=
"试卷分类"
>
{{ detail.paper_category.
category_
name }}
</el-descriptions-item>
<el-descriptions-item
label=
"试卷分类"
>
{{ detail.paper_category.name }}
</el-descriptions-item>
<el-descriptions-item
label=
"组卷模式"
>
{{ detail.paper_type_name }}
</el-descriptions-item>
<el-descriptions-item
label=
"试卷总分"
>
{{ detail.paper_total_score }}
</el-descriptions-item>
<el-descriptions-item
label=
"及格分数"
>
{{ detail.pass_score }}
</el-descriptions-item>
...
...
@@ -42,6 +42,8 @@ export default {
},
beforeMount
()
{
this
.
getDetail
()
// 获取试题分类,组卷的时候用,只请求一次
this
.
$store
.
dispatch
(
'getQuestionCategory'
,
{
project_prefix
:
this
.
$store
.
state
.
activeProject
.
tag
})
},
methods
:
{
// 获取试卷详情
...
...
src/modules/paper/views/List.vue
浏览文件 @
3da96aa4
...
...
@@ -99,7 +99,7 @@ export default {
return
map
[
row
.
paper_type
]
||
row
.
paper_type
}
},
{
label
:
'试卷分类'
,
prop
:
'paper_category.
category_
name'
,
minWidth
:
200
},
{
label
:
'试卷分类'
,
prop
:
'paper_category.name'
,
minWidth
:
200
},
{
label
:
'试卷名称'
,
prop
:
'paper_title'
,
minWidth
:
200
},
{
label
:
'总分'
,
prop
:
'paper_total_score'
},
{
label
:
'及格分数'
,
prop
:
'pass_score'
},
...
...
src/store/index.js
浏览文件 @
3da96aa4
import
Vue
from
'vue'
import
Vuex
from
'vuex'
import
{
getUser
,
logout
,
getAllProjects
}
from
'@/api/base'
import
{
getUser
,
logout
,
getAllProjects
,
getQuestionCategory
}
from
'@/api/base'
Vue
.
use
(
Vuex
)
...
...
@@ -8,7 +8,8 @@ const store = new Vuex.Store({
state
:
{
user
:
{},
projects
:
[],
// 项目列表
activeProject
:
{}
// 当前激活的项目
activeProject
:
{},
// 当前激活的项目
questionCategory
:
[]
// 试题分类
},
mutations
:
{
setUser
(
state
,
user
)
{
...
...
@@ -23,6 +24,9 @@ const store = new Vuex.Store({
setActiveProjedct
(
state
,
project
=
{})
{
state
.
activeProject
=
project
localStorage
.
setItem
(
'project_tag'
,
project
.
tag
||
''
)
},
setQuestionCategory
(
state
,
questionCategory
)
{
state
.
questionCategory
=
questionCategory
}
},
actions
:
{
...
...
@@ -69,6 +73,12 @@ const store = new Vuex.Store({
return
false
})
return
isLogin
},
getQuestionCategory
({
commit
},
params
)
{
return
getQuestionCategory
(
params
).
then
(
res
=>
{
commit
(
'setQuestionCategory'
,
res
.
data
)
return
res
.
data
})
}
}
})
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论