Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-qa
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-qa
Commits
013a3654
提交
013a3654
authored
3月 01, 2022
作者:
lihuihui
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://gitlab-pro.ezijing.com/ezijing-web/qbs
上级
0c9619a0
b6624aad
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
111 行增加
和
64 行删除
+111
-64
QuestionTypeTreeselect.vue
src/components/base/QuestionTypeTreeselect.vue
+24
-12
BaseInfo.vue
src/modules/exam/components/BaseInfo.vue
+7
-0
CheckPaper.vue
src/modules/exam/components/CheckPaper.vue
+4
-2
Finished.vue
src/modules/exam/components/Finished.vue
+10
-0
QuestionItem.vue
src/modules/exam/components/QuestionItem.vue
+56
-46
PaperQuestions.vue
src/modules/paper/components/PaperQuestions.vue
+7
-1
QuestionSelect.vue
src/modules/paper/components/QuestionSelect.vue
+3
-3
没有找到文件。
src/components/base/QuestionTypeTreeselect.vue
浏览文件 @
013a3654
...
@@ -8,18 +8,22 @@
...
@@ -8,18 +8,22 @@
@
remove-tag=
"handleRemoveTag"
@
remove-tag=
"handleRemoveTag"
ref=
"select"
ref=
"select"
>
>
<el-tree
<div
style=
"margin: 10px 14px"
>
node-key=
"id"
<el-input
placeholder=
"搜索"
v-model=
"filterText"
clearable
style=
"margin-bottom: 10px"
></el-input>
show-checkbox
<el-tree
:data=
"options"
node-key=
"id"
:defaultExpandedKeys=
"defaultExpandedKeys"
show-checkbox
:props=
"defaultProps"
:data=
"options"
:check-strictly=
"checkStrictly"
:defaultExpandedKeys=
"defaultExpandedKeys"
@
check-change=
"handleChange"
:props=
"defaultProps"
v-bind=
"$attrs"
:check-strictly=
"checkStrictly"
v-on=
"$listeners"
:filter-node-method=
"filterNode"
ref=
"tree"
@
check-change=
"handleChange"
></el-tree>
v-bind=
"$attrs"
v-on=
"$listeners"
ref=
"tree"
></el-tree>
</div>
</el-select>
</el-select>
</
template
>
</
template
>
...
@@ -33,6 +37,7 @@ export default {
...
@@ -33,6 +37,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
filterText
:
''
,
selectValue
:
[],
selectValue
:
[],
options
:
[],
options
:
[],
defaultExpandedKeys
:
[]
defaultExpandedKeys
:
[]
...
@@ -44,6 +49,9 @@ export default {
...
@@ -44,6 +49,9 @@ export default {
handler
()
{
handler
()
{
this
.
setChecked
()
this
.
setChecked
()
}
}
},
filterText
(
val
)
{
this
.
$refs
.
tree
.
filter
(
val
)
}
}
},
},
computed
:
{
computed
:
{
...
@@ -83,6 +91,10 @@ export default {
...
@@ -83,6 +91,10 @@ export default {
}
}
this
.
selectValue
=
this
.
multiple
?
nodes
:
nodes
.
map
(
item
=>
item
.
category_name
)
this
.
selectValue
=
this
.
multiple
?
nodes
:
nodes
.
map
(
item
=>
item
.
category_name
)
},
},
filterNode
(
value
,
data
)
{
if
(
!
value
)
return
true
return
data
.
category_name
.
indexOf
(
value
)
!==
-
1
},
handleChange
(
data
,
checked
)
{
handleChange
(
data
,
checked
)
{
const
RefTree
=
this
.
$refs
.
tree
const
RefTree
=
this
.
$refs
.
tree
if
(
!
this
.
multiple
&&
checked
)
{
if
(
!
this
.
multiple
&&
checked
)
{
...
...
src/modules/exam/components/BaseInfo.vue
浏览文件 @
013a3654
...
@@ -128,6 +128,13 @@ export default {
...
@@ -128,6 +128,13 @@ export default {
this
.
$message
.
warning
(
'请选择考试时间'
)
this
.
$message
.
warning
(
'请选择考试时间'
)
return
return
}
}
const
startTime
=
new
Date
(
params
.
start_time
)
const
endTime
=
new
Date
(
params
.
end_time
)
if
((
endTime
-
startTime
)
/
86400000
>
40
)
{
this
.
$message
.
warning
(
'考试时间不能超过40天'
)
return
}
this
.
$emit
(
'getBaseInfo'
,
params
)
this
.
$emit
(
'getBaseInfo'
,
params
)
this
.
$parent
.
$parent
.
nextStep
()
this
.
$parent
.
$parent
.
nextStep
()
},
},
...
...
src/modules/exam/components/CheckPaper.vue
浏览文件 @
013a3654
...
@@ -72,15 +72,17 @@ export default {
...
@@ -72,15 +72,17 @@ export default {
return
return
}
}
this
.
$parent
.
$parent
.
nextStep
()
this
.
$parent
.
$parent
.
nextStep
()
const
listArray
=
[]
for
(
let
i
=
0
;
i
<
this
.
q
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
q
.
length
;
i
++
)
{
const
listArray
=
[]
for
(
let
j
=
0
;
j
<
this
.
ExamParerList
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
this
.
ExamParerList
.
length
;
j
++
)
{
if
(
this
.
q
[
i
]
===
this
.
ExamParerList
[
j
].
key
)
{
if
(
this
.
q
[
i
]
===
this
.
ExamParerList
[
j
].
key
)
{
listArray
.
push
(
this
.
ExamParerList
[
j
])
listArray
.
push
(
this
.
ExamParerList
[
j
])
}
}
}
}
this
.
checkedArrs
=
listArray
}
}
this
.
checkedArrs
=
listArray
console
.
log
(
this
.
checkedArrs
)
const
qs
=
this
.
q
.
toString
()
const
qs
=
this
.
q
.
toString
()
this
.
$emit
(
'getCheckPaper'
,
qs
)
this
.
$emit
(
'getCheckPaper'
,
qs
)
this
.
$emit
(
'getCheckPaperList'
,
this
.
checkedArrs
)
this
.
$emit
(
'getCheckPaperList'
,
this
.
checkedArrs
)
...
...
src/modules/exam/components/Finished.vue
浏览文件 @
013a3654
...
@@ -8,6 +8,16 @@
...
@@ -8,6 +8,16 @@
<el-button
type=
"primary"
v-show=
"configs.enabled_promise === true"
>
考试承诺书
</el-button>
<el-button
type=
"primary"
v-show=
"configs.enabled_promise === true"
>
考试承诺书
</el-button>
<el-button
type=
"success"
v-show=
"configs.enabled_lock === true"
>
锁定考试
</el-button>
<el-button
type=
"success"
v-show=
"configs.enabled_lock === true"
>
锁定考试
</el-button>
<el-button
type=
"info"
v-show=
"configs.enabled_watermark === true"
>
答题水印
</el-button>
<el-button
type=
"info"
v-show=
"configs.enabled_watermark === true"
>
答题水印
</el-button>
<span
v-if=
"
configs.enabled_ip_limit === false &&
configs.enabled_promise === false &&
configs.enabled_lock === false &&
configs.enabled_watermark === false
"
>
暂无
</span>
</div>
</div>
<el-row
class=
"btn_next"
>
<el-row
class=
"btn_next"
>
<el-button
type=
"primary"
@
click=
"lastStep"
>
上一步
</el-button>
<el-button
type=
"primary"
@
click=
"lastStep"
>
上一步
</el-button>
...
...
src/modules/exam/components/QuestionItem.vue
浏览文件 @
013a3654
...
@@ -2,38 +2,53 @@
...
@@ -2,38 +2,53 @@
<div
class=
"question-item"
>
<div
class=
"question-item"
>
<div
class=
"question-item-title"
v-html=
"questionData.content"
></div>
<div
class=
"question-item-title"
v-html=
"questionData.content"
></div>
<template
v-if=
"questionType === 1 || questionType === 6"
>
<template
v-if=
"questionType === 1 || questionType === 6"
>
<el-radio-group
v-model=
"questionData.answer[0]"
:disabled=
"true"
class=
"question-item-content"
>
<el-radio-group
v-model=
"questionData.answer[0]"
:disabled=
"true"
class=
"question-item-content"
>
<div
class=
"question-item-option"
v-for=
"subItem in questionData.options"
:key=
"subItem.id"
>
<div
class=
"question-item-option"
v-for=
"subItem in questionData.options"
:key=
"subItem.id"
>
<el-radio
:label=
"subItem.id"
>
{{
subItem
.
option
}}
</el-radio>
<el-radio
:label=
"subItem.id"
>
{{
subItem
.
option
}}
</el-radio>
</div>
</div>
</el-radio-group>
</el-radio-group>
</
template
>
</
template
>
<
template
v-if=
"questionType === 2"
>
<
template
v-if=
"questionType === 2"
>
<el-checkbox-group
v-model=
"questionData.answer"
:disabled=
"true"
class=
"question-item-content"
>
<el-checkbox-group
v-model=
"questionData.answer"
:disabled=
"true"
class=
"question-item-content"
>
<div
class=
"question-item-option"
v-for=
"subItem in questionData.options"
:key=
"subItem.id"
>
<div
class=
"question-item-option"
v-for=
"subItem in questionData.options"
:key=
"subItem.id"
>
<el-checkbox
:label=
"subItem.id"
>
{{
subItem
.
option
}}
</el-checkbox>
<el-checkbox
:label=
"subItem.id"
>
{{
subItem
.
option
}}
</el-checkbox>
</div>
</div>
</el-checkbox-group>
</el-checkbox-group>
</
template
>
</
template
>
<
template
v-if=
"questionType === 3"
>
<
template
v-if=
"questionType === 3"
>
<div
class=
"SAQ"
>
{{
questionData
.
answer
||
''
}}
</div>
<div
class=
"SAQ"
>
{{
questionData
.
answer
||
''
}}
</div>
<div
style=
"text-align:
right;
"
>
<div
style=
"text-align:
right
"
>
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"showComment = !showComment"
>
点击评分
</el-button>
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"showComment = !showComment"
>
点击评分
</el-button>
</div>
</div>
<div
class=
"comment"
v-show=
"showComment"
>
<div
class=
"comment"
v-show=
"showComment"
>
<div
class=
"comment-top"
>
<div
class=
"comment-top"
>
<p>
本题
{{
questionData
.
score
}}
分
</p>
<p>
本题
{{
questionData
.
score
}}
分
</p>
<div
class=
"get-score"
>
<div
class=
"get-score"
>
学生得分:
<el-input-number
:disabled=
"questionData.checked_flag"
v-model=
"questionData.get_score"
controls-position=
"right"
:min=
"0"
:max=
"questionData.score"
size=
"mini"
></el-input-number>
学生得分:
<el-input-number
:disabled=
"questionData.checked_flag"
v-model=
"questionData.get_score"
controls-position=
"right"
:min=
"0"
:max=
"questionData.score"
size=
"mini"
></el-input-number>
</div>
</div>
</div>
</div>
<el-input
type=
"textarea"
placeholder=
"请输入评语"
v-model=
"questionData.comment"
rows=
"3"
:disabled=
"questionData.checked_flag"
/>
<el-input
<div
style=
"text-align:center;padding-top:10px;"
>
type=
"textarea"
<el-button
type=
"primary"
size=
"mini"
@
click=
"fetchComment"
:disabled=
"questionData.checked_flag"
>
提交点评
</el-button>
placeholder=
"请输入评语"
v-model=
"questionData.comment"
rows=
"3"
:disabled=
"questionData.checked_flag"
/>
<div
style=
"text-align: center; padding-top: 10px"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"fetchComment"
:disabled=
"questionData.checked_flag"
>
提交点评
</el-button
>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<div
class=
"question-item-score"
>
得分:{{
questionData.get_score
}}分
</div>
<div
class=
"question-item-score"
>
得分:{{
questionData.get_score
}}分
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
@@ -77,11 +92,6 @@ export default {
...
@@ -77,11 +92,6 @@ export default {
// if (this.questionType === 3) console.log(this.questionData)
// if (this.questionType === 3) console.log(this.questionData)
},
},
methods
:
{
methods
:
{
handleComment
()
{
// console.log(this.question_item_id)
// console.log(this.questionData)
this
.
fetchComment
()
},
fetchComment
()
{
fetchComment
()
{
const
params
=
{
const
params
=
{
sheet_id
:
this
.
sheet_id
,
sheet_id
:
this
.
sheet_id
,
...
@@ -102,44 +112,44 @@ export default {
...
@@ -102,44 +112,44 @@ export default {
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.question-item
{
.question-item
{
font-size
:
14px
;
font-size
:
14px
;
color
:
#454545
;
color
:
#454545
;
border-bottom
:
1px
solid
#f3f3f3
;
border-bottom
:
1px
solid
#f3f3f3
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
.question-item-content
{
.question-item-content
{
padding-left
:
10px
;
padding-left
:
10px
;
.question-item-option
{
.question-item-option
{
padding-top
:
10px
;
padding-top
:
10px
;
}
}
}
}
.SAQ
{
.SAQ
{
min-height
:
60px
;
min-height
:
60px
;
font-size
:
14px
;
font-size
:
14px
;
line-height
:
24px
;
line-height
:
24px
;
color
:
#888
;
color
:
#888
;
border
:
1px
solid
#eee
;
border
:
1px
solid
#eee
;
background
:
#f3f3f3
;
background
:
#f3f3f3
;
margin
:
10px
0
;
margin
:
10px
0
;
border-radius
:
6px
;
border-radius
:
6px
;
}
}
.comment
{
.comment
{
border
:
1px
solid
rgba
(
192
,
28
,
64
,
.3
);
border
:
1px
solid
rgba
(
192
,
28
,
64
,
0
.3
);
border-radius
:
4px
;
border-radius
:
4px
;
padding
:
10px
;
padding
:
10px
;
margin-top
:
15px
;
margin-top
:
15px
;
background
:
#f9f9f9
;
background
:
#f9f9f9
;
.comment-top
{
.comment-top
{
display
:
flex
;
display
:
flex
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
p
{
p
{
flex
:
1
;
flex
:
1
;
}
}
}
}
}
}
.question-item-score
{
.question-item-score
{
color
:
#777
;
color
:
#777
;
padding
:
10px
0
;
padding
:
10px
0
;
}
}
}
}
</
style
>
</
style
>
src/modules/paper/components/PaperQuestions.vue
浏览文件 @
013a3654
...
@@ -15,11 +15,17 @@
...
@@ -15,11 +15,17 @@
<el-button
type=
"primary"
@
click=
"showSelectQuestion"
>
自动组卷
</el-button>
<el-button
type=
"primary"
@
click=
"showSelectQuestion"
>
自动组卷
</el-button>
</
template
>
</
template
>
</template>
</template>
<question-list
:list=
"questions"
:disableScore=
"data.paper_type === 2"
style=
"margin-top: 20px"
>
<question-list
:list=
"questions"
:disableScore=
"data.paper_type === 2"
style=
"margin-top: 20px"
v-if=
"questions.length"
>
<
template
v-slot:selection=
"item"
v-if=
"data.paper_type === 1"
>
<
template
v-slot:selection=
"item"
v-if=
"data.paper_type === 1"
>
<el-checkbox
@
change=
"handleSelectionChange(arguments[0], item)"
></el-checkbox>
<el-checkbox
@
change=
"handleSelectionChange(arguments[0], item)"
></el-checkbox>
</
template
>
</
template
>
</question-list>
</question-list>
<el-empty
description=
"该试卷无试题,去添加试题吧"
v-else
></el-empty>
</app-card>
</app-card>
</el-col>
</el-col>
<!-- 试题序号 -->
<!-- 试题序号 -->
...
...
src/modules/paper/components/QuestionSelect.vue
浏览文件 @
013a3654
...
@@ -7,18 +7,18 @@
...
@@ -7,18 +7,18 @@
</el-radio-group>
</el-radio-group>
</
template
>
</
template
>
<
template
v-slot:filter-category=
"{ params }"
>
<
template
v-slot:filter-category=
"{ params }"
>
<question-type-
cascader
v-model=
"params.question_category"
@
change=
"refetchList"
></question-type-cascader
>
<question-type-
treeselect
v-model=
"params.question_category"
@
change=
"refetchList"
></question-type-treeselect
>
</
template
>
</
template
>
</app-list>
</app-list>
</template>
</template>
<
script
>
<
script
>
import
{
getQuestionList
}
from
'../api.js'
import
{
getQuestionList
}
from
'../api.js'
import
QuestionType
Cascader
from
'@/components/base/QuestionTypeCascader
.vue'
import
QuestionType
Treeselect
from
'@/components/base/QuestionTypeTreeselect
.vue'
export
default
{
export
default
{
props
:
{
data
:
{
type
:
Object
,
default
:
()
=>
({})
}
},
props
:
{
data
:
{
type
:
Object
,
default
:
()
=>
({})
}
},
components
:
{
QuestionType
Cascader
},
components
:
{
QuestionType
Treeselect
},
data
()
{
data
()
{
return
{}
return
{}
},
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论