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
70dff8ae
Commit
70dff8ae
authored
Aug 12, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
9736314a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
61 deletions
+81
-61
question-form.vue
src/components/exam/question-form.vue
+6
-2
questionbank-form.vue
src/components/exam/questionbank-form.vue
+5
-1
examCreate.vue
src/pages/exam/examCreate.vue
+70
-58
No files found.
src/components/exam/question-form.vue
View file @
70dff8ae
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
</div>
</div>
<div
class=
"page-content"
>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table sticky-
right-column-table
"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
class=
"sticky-column-table sticky-
header-column-table"
style=
"max-height: 550px
"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"QuestionId"
selection=
"multiple"
:selected
.
sync=
"selectedQuestion"
>
row-key=
"QuestionId"
selection=
"multiple"
:selected
.
sync=
"selectedQuestion"
>
<template
v-slot:top=
"props"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
问题列表
</div>
<div
class=
"col-2 q-table__title"
>
问题列表
</div>
...
@@ -189,5 +189,9 @@
...
@@ -189,5 +189,9 @@
},
},
},
},
}
}
</
script
>
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/components/exam/questionbank-form.vue
View file @
70dff8ae
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
</div>
</div>
<div
class=
"page-content"
>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table sticky-
right-column-table
"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
class=
"sticky-column-table sticky-
header-column-table"
style=
"max-height: 550px
"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"BankId"
selection=
"multiple"
:selected
.
sync=
"selectedQuestionBank"
>
row-key=
"BankId"
selection=
"multiple"
:selected
.
sync=
"selectedQuestionBank"
>
<template
v-slot:top=
"props"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
题库列表
</div>
<div
class=
"col-2 q-table__title"
>
题库列表
</div>
...
@@ -138,3 +138,7 @@
...
@@ -138,3 +138,7 @@
}
}
</
script
>
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/pages/exam/examCreate.vue
View file @
70dff8ae
<!--组卷-->
<!--组卷-->
<
style
>
<
style
>
.examCreate
{
.examCreat_Top
{
margin-left
:
100px
;
width
:
100%
;
height
:
30px
;
line-height
:
30px
;
padding
:
0
10px
;
margin-bottom
:
20px
;
border-bottom
:
1px
solid
#ddd
;
}
.examTi_List
{
border
:
1px
solid
#ddd
;
margin-bottom
:
20px
;
}
.examCreat_Top
i
:hover
{
color
:
red
;
cursor
:
pointer
;
}
}
</
style
>
</
style
>
<
template
>
<
template
>
<div
class=
"examCreate"
>
<div
class=
"page-body"
>
<br
/>
组卷题库(*):
{{
ShowBankName
}}
<br
/>
组卷题库(*):
{{
ShowBankName
}}
<br
/>
<a
style=
"cursor:pointer;color:blue"
@
click=
"showQuestionBank"
>
选择题库
</a>
<br
/>
<a
style=
"cursor:pointer;color:blue
;margin:10px 0;display:inline-block;
"
@
click=
"showQuestionBank"
>
选择题库
</a>
<br
/>
<q-btn
color=
"accent"
size=
"sm"
@
click=
"changeExamGroupType(1)"
class=
"q-mr-md"
label=
"智能组卷"
/>
<q-btn
color=
"accent"
size=
"sm"
@
click=
"changeExamGroupType(1)"
class=
"q-mr-md"
label=
"智能组卷"
/>
<q-btn
color=
"accent"
size=
"sm"
@
click=
"changeExamGroupType(2)"
class=
"q-mr-md"
label=
"手动组卷"
/>
<q-btn
color=
"accent"
size=
"sm"
@
click=
"changeExamGroupType(2)"
class=
"q-mr-md"
label=
"手动组卷"
/>
<br
/>
<br
/>
<br
/>
<br
/>
<template
v-if=
"postMsg.GenerateType==1"
>
<template
v-if=
"postMsg.GenerateType==1"
>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"templateMsg.TemplateName"
<div
class=
"row"
>
class=
"col-6 q-pb-lg"
label=
"试卷标题"
/>
<br
/>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"templateMsg.TemplateName"
class=
"col-6 q-pb-lg q-pr-lg"
label=
"试卷标题"
/>
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
v-model=
"templateMsg.TemplateScore"
class=
"col-6 q-pb-lg"
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
v-model=
"templateMsg.TemplateScore"
label=
"满分"
/>
<br
/>
class=
"col-6 q-pb-lg"
label=
"满分"
/>
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
v-model=
"templateMsg.TemplateNum"
class=
"col-6 q-pb-lg"
</div>
label=
"随机组卷数量"
/>
<br
/>
<div
class=
"row"
>
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
v-model=
"templateMsg.TemplateNum"
<q-select
filled
option-value=
"Id"
option-label=
"Name"
:options=
"questionDifficultyTypeList"
emit-value
class=
"col-6 q-pb-lg q-pr-lg"
label=
"随机组卷数量"
/>
map-options
label=
"难易程度"
use-input
clearable
v-model=
"templateMsg.TemplateDifficultyType"
/>
<br
/>
<q-select
filled
option-value=
"Id"
option-label=
"Name"
:options=
"questionDifficultyTypeList"
emit-value
分割线
<br
/>
map-options
label=
"难易程度"
class=
"col-6"
use-input
clearable
v-model=
"templateMsg.TemplateDifficultyType"
/>
</div>
<!-- 分割线
<br
/>
-->
<template
v-if=
"templateMsg&&templateMsg.TemplateData&&templateMsg.TemplateData.length>0"
>
<template
v-if=
"templateMsg&&templateMsg.TemplateData&&templateMsg.TemplateData.length>0"
>
<div
v-for=
"(item,index) in templateMsg.TemplateData"
:key=
"index"
style=
"border:1px solid grey"
>
<div
v-for=
"(item,index) in templateMsg.TemplateData"
:key=
"index"
class=
"examTi_List"
>
<span>
{{
item
.
QuestionTypeName
}}
</span>
<a
style=
"color:blue;cursor:pointer;"
>
删除
</a>
<br
/>
<div
class=
"examCreat_Top"
>
<span>
<span>
{{
item
.
QuestionTypeName
}}
</span>
<i
class=
"iconfont icon-img_delete_small"
></i>
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
v-model=
"item.QuestionScore"
class=
"col-6 q-pb-lg"
</div>
label=
"总分"
/>
<div
style=
"padding:0 20px 10px 20px;"
>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"item.QuestionDesc"
class=
"col-6 q-pb-lg"
<div
class=
"row"
>
label=
"题型说明"
/>
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
v-model=
"item.QuestionScore"
</span>
<br
/>
class=
"col-6 q-pb-lg q-pr-lg"
label=
"总分"
/>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"item.QuestionDesc"
<span>
class=
"col-6 q-pb-lg"
label=
"题型说明"
/>
<q-radio
v-model=
"item.ChooseType"
:val=
"1"
label=
"从题库选题"
/>
</div>
<template
v-if=
"item.ChooseType==1"
>
<span>
<span>
共
{{
item
.
QuestionTypeNum
}}
道 抽
<q-radio
v-model=
"item.ChooseType"
:val=
"1"
label=
"从题库选题"
/>
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
v-model=
"item.ChooseNum"
class=
"col-1 q-pb-lg"
<template
v-if=
"item.ChooseType==1"
>
label=
""
/>
道
</span>
<span>
共
{{
item
.
QuestionTypeNum
}}
道 抽
</
template
>
<el-input
style=
"width:100px;"
size=
"small"
v-model=
"item.ChooseNum"
maxlength=
"5"
></el-input>
道
</span>
</span>
</
template
>
<br
/>
</span>
<span>
<br
/>
<q-radio
v-model=
"item.ChooseType"
:val=
"2"
label=
"从题库按照难易度选题"
/>
<span>
<
template
v-if=
"item.ChooseType==2"
>
<q-radio
v-model=
"item.ChooseType"
:val=
"2"
label=
"从题库按照难易度选题"
/>
<span
v-for=
"(subItem,subIndex) in item.ChooseList"
>
{{
subItem
.
DifficultyTypeName
}}
共
<
template
v-if=
"item.ChooseType==2"
>
{{
subItem
.
DifficultyTypeCount
}}
道 抽
<div
style=
"margin:0 0 20px 40px;"
v-for=
"(subItem,subIndex) in item.ChooseList"
:key=
"subIndex"
>
{{
subItem
.
DifficultyTypeName
}}
共
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
v-model=
"subItem.ChooseNum"
{{
subItem
.
DifficultyTypeCount
}}
道 抽
class=
"col-1 q-pb-lg"
label=
""
/>
道
<el-input
style=
"width:100px;"
size=
"small"
v-model=
"subItem.ChooseNum"
maxlength=
"5"
></el-input>
道
</span>
</div>
</
template
>
</
template
>
</span>
</span>
</div>
</div>
</div>
</template>
</template>
<
template
v-if=
"BankList&&BankList.length>0"
>
<
template
v-if=
"BankList&&BankList.length>0"
>
<q-select
filled
option-value=
"QuestionTypeId"
option-label=
"QuestionTypeName"
:options=
"BankList"
emit-value
<div
class=
"row"
>
map-options
label=
"更多题型"
use-input
clearable
v-model=
"MoreQuestionTypeId"
@
input=
"changeQuestion"
/>
<q-select
filled
option-value=
"QuestionTypeId"
option-label=
"QuestionTypeName"
:options=
"BankList"
emit-value
map-options
label=
"更多题型"
class=
"col-6 q-pr-lg"
use-input
clearable
v-model=
"MoreQuestionTypeId"
@
input=
"changeQuestion"
/>
</div>
</
template
>
</
template
>
</template>
</template>
<
template
v-if=
"postMsg.GenerateType==2"
>
<
template
v-if=
"postMsg.GenerateType==2"
>
...
@@ -129,16 +143,14 @@
...
@@ -129,16 +143,14 @@
return
item
.
QuestionTypeId
===
this
.
MoreQuestionTypeId
;
return
item
.
QuestionTypeId
===
this
.
MoreQuestionTypeId
;
});
});
if
(
chooseQuestion
&&
chooseQuestion
.
QuestionTypeId
>
0
)
{
if
(
chooseQuestion
&&
chooseQuestion
.
QuestionTypeId
>
0
)
{
if
(
!
this
.
checkExists
(
chooseQuestion
.
QuestionTypeId
))
if
(
!
this
.
checkExists
(
chooseQuestion
.
QuestionTypeId
))
{
{
this
.
templateMsg
.
TemplateData
.
push
(
chooseQuestion
);
this
.
templateMsg
.
TemplateData
.
push
(
chooseQuestion
);
}
else
{
}
else
{
this
.
$q
.
notify
({
this
.
$q
.
notify
({
type
:
'negative'
,
type
:
'negative'
,
position
:
"top"
,
position
:
"top"
,
message
:
`已存在此题型,请勿重复选择!`
message
:
`已存在此题型,请勿重复选择!`
})
})
}
}
}
}
}
}
...
...
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