Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
confucius
Commits
123a834e
Commit
123a834e
authored
Jan 28, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
0dd79b19
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
12 deletions
+70
-12
question.js
src/api/question/question.js
+10
-0
question-form.vue
src/components/question/question-form.vue
+27
-5
questionlist-form.vue
src/components/question/questionlist-form.vue
+33
-7
No files found.
src/api/question/question.js
View file @
123a834e
...
...
@@ -145,6 +145,16 @@ export function queryQuestionCategory() {
})
}
/**
* 获取问题考级程度
*/
export
function
queryQuestionLevelType
()
{
return
request
({
url
:
'/Question/GetQuestionLevelType'
,
method
:
'post'
,
})
}
/**
* 题目上移下移
*/
...
...
src/components/question/question-form.vue
View file @
123a834e
...
...
@@ -199,6 +199,16 @@
</
template
>
</select>
</div>
<div
class=
"col-12"
>
<br
/>
<span
class=
"difficulty_Degree"
>
考级程度
</span>
<select
v-model=
"objOption.LevelType"
class=
"selectBox blue-border"
>
<
template
v-for=
"(cItem,cIndex) in questionLevalTypeList"
>
<option
:key=
"cIndex"
:label=
"cItem.Name"
:value=
"cItem.Id"
>
</option>
</
template
>
</select>
</div>
<div
class=
"col-12"
style=
"margin-top:16px;"
>
<span
class=
"difficulty_Degree"
>
知识点:
</span>
<a
class=
"addKnowledge"
@
click=
"isShowPoint=true"
>
...
...
@@ -231,7 +241,8 @@
queryDifficultyType
,
saveQuestion
,
queryQuestionInfo
,
queryQuestionCategory
queryQuestionCategory
,
queryQuestionLevelType
}
from
'../../api/question/question'
import
{
CreateQuestion
,
//生成问题
...
...
@@ -273,11 +284,11 @@
default
:
null
},
CourseId
:
{
type
:
String
,
//课程编号
type
:
String
,
//课程编号
default
:
"0"
,
},
BankId
:
{
type
:
String
,
//题库编号
type
:
String
,
//题库编号
default
:
"0"
,
}
},
...
...
@@ -291,7 +302,7 @@
objOption
:
{
QuestionId
:
0
,
//问题编号
CourseId
:
0
,
//课程编号
BankId
:
0
,
//题库编号
BankId
:
0
,
//题库编号
Title
:
""
,
//问题名称
DifficultyType
:
1
,
//难易程度
AnswerParse
:
""
,
//答案解析JSON
...
...
@@ -303,6 +314,7 @@
Answer
:
""
,
//问题JSON
IsMutex
:
0
,
//填空题(答案顺序打乱也判正确)
Category
:
0
,
//大类
LevelType
:
0
,
//考级程度
},
AnswerList
:
[],
optionTitle
:
""
,
...
...
@@ -314,6 +326,7 @@
isShowPoint
:
false
,
//是否显示知识点弹窗
choosePointArray
:
[],
//知识点列表
questionCategoryList
:
[],
//问题大类
questionLevalTypeList
:
[],
}
},
computed
:
{
...
...
@@ -337,6 +350,7 @@
this
.
getQuestionType
();
this
.
getDifficultyType
();
this
.
getQuestionCategory
();
this
.
getQuestionLevelType
();
},
mounted
()
{
this
.
initObj
()
...
...
@@ -348,6 +362,12 @@
this
.
questionCategoryList
=
res
.
Data
;
})
},
//获取问题考级程度
getQuestionLevelType
()
{
queryQuestionLevelType
().
then
(
res
=>
{
this
.
questionLevalTypeList
=
res
.
Data
;
})
},
//移除知识点
removePointTag
(
index
)
{
this
.
choosePointArray
.
splice
(
index
,
1
);
...
...
@@ -407,7 +427,7 @@
//初始化表单
initObj
()
{
this
.
objOption
.
CourseId
=
this
.
CourseId
;
this
.
objOption
.
BankId
=
this
.
BankId
;
this
.
objOption
.
BankId
=
this
.
BankId
;
if
(
this
.
setingObj
&&
this
.
setingObj
.
QuestionId
>
0
)
{
queryQuestionInfo
({
QuestionId
:
this
.
setingObj
.
QuestionId
...
...
@@ -426,6 +446,7 @@
this
.
questionObj
.
Key
=
res
.
Data
.
QuestionTypeKey
;
this
.
questionObj
.
QId
=
res
.
Data
.
QuestionTypeId
;
this
.
objOption
.
Category
=
res
.
Data
.
Category
;
this
.
objOption
.
LevelType
=
res
.
Data
.
LevelType
;
if
(
res
.
Data
.
QuestionContentObj
)
{
this
.
AnswerList
=
res
.
Data
.
QuestionContentObj
;
this
.
objOption
.
QuestionContent
=
JSON
.
stringify
(
res
.
Data
.
QuestionContentObj
);
...
...
@@ -451,6 +472,7 @@
this
.
objOption
.
Answer
=
''
;
this
.
objOption
.
IsMutex
=
0
;
this
.
objOption
.
Category
=
0
;
this
.
objOption
.
LevelType
=
0
;
}
},
//关闭弹窗
...
...
src/components/question/questionlist-form.vue
View file @
123a834e
...
...
@@ -10,7 +10,8 @@
white-space
:
nowrap
;
width
:
400px
;
}
.QuestionisVisible
{
.QuestionisVisible
{
visibility
:
hidden
;
}
...
...
@@ -46,12 +47,14 @@
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
separator=
"none"
:data=
"data"
:columns=
"columns"
row-key=
"QuestionId"
selection=
"multiple"
:selected
.
sync=
"selectedQuestion"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
问题列表
</div>
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增题目"
@
click=
"EditQuestion(null)"
/>
<!--
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"批量设置考级程度"
@
click=
"SetBatchLevelType"
/>
-->
<q-btn-dropdown
color=
"accent"
label=
"批量导入"
size=
"sm"
class=
"q-mr-md"
style=
"margin-left:5px;"
>
<q-list>
<q-item
clickable
v-close-popup
>
...
...
@@ -84,10 +87,10 @@
@
click=
"EditQuestion(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"negative"
style=
"font-weight:400"
label=
"删除"
@
click=
"setQuestionStatus(props.row)"
></q-btn>
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-shangyi2"
:class=
"
{'QuestionisVisible':!props.row.isShowFirst}"
color="accent" title="上移"
style="font-weight:400;" label="" @click="getUpStatus(props.row,1)">
</q-btn>
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-xiayi"
:class=
"
{'QuestionisVisible':!props.row.isShowLast}"
color="accent" title="下移"
style="font-weight:400;" label="" @click="getUpStatus(props.row,2)">
</q-btn>
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-shangyi2"
:class=
"
{'QuestionisVisible':!props.row.isShowFirst}"
color="accent" title="上移"
style="font-weight:400;" label="" @click="getUpStatus(props.row,1)">
</q-btn>
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-xiayi"
:class=
"
{'QuestionisVisible':!props.row.isShowLast}"
color="accent" title="下移"
style="font-weight:400;" label="" @click="getUpStatus(props.row,2)">
</q-btn>
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-fuzhi"
color=
"accent"
style=
"font-weight:400;"
label=
""
@
click=
"getCopyItem(props.row)"
></q-btn>
</q-td>
...
...
@@ -159,6 +162,12 @@
field
:
'DifficultyTypeName'
,
align
:
'left'
},
{
name
:
'LevelTypeName'
,
label
:
'考级程度'
,
field
:
'LevelTypeName'
,
align
:
'left'
},
{
name
:
'CreateByName'
,
label
:
'创建者'
,
...
...
@@ -174,7 +183,8 @@
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'QuestionId'
field
:
'QuestionId'
,
align
:
'center'
}
],
data
:
[],
...
...
@@ -199,6 +209,7 @@
importType
:
0
,
//导入类型(1-模板导入;2-智能导入)
isShowImportUpload
:
false
,
//是否显示导入模板
questionCategoryList
:
[],
//问题分类
selectedQuestion
:
[],
//选中的数组
}
},
created
()
{
...
...
@@ -248,6 +259,21 @@
}
});
},
//批量设置考级程度
SetBatchLevelType
()
{
console
.
log
(
"selectedQuestion"
,
this
.
selectedQuestion
);
if
(
this
.
selectedQuestion
&&
this
.
selectedQuestion
.
length
>
0
)
{
}
else
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
"请选择问题"
,
position
:
'top'
})
}
},
//删除问题
setQuestionStatus
(
item
)
{
this
.
$q
.
dialog
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment