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
01db8f6f
Commit
01db8f6f
authored
Aug 12, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
37d79061
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
10 deletions
+47
-10
index.js
src/api/teacher/index.js
+14
-1
examCreate.vue
src/pages/exam/examCreate.vue
+33
-9
No files found.
src/api/teacher/index.js
View file @
01db8f6f
...
@@ -165,4 +165,17 @@ export function savePaperFolderInfo(data) {
...
@@ -165,4 +165,17 @@ export function savePaperFolderInfo(data) {
method
:
'post'
,
method
:
'post'
,
data
data
})
})
}
}
\ No newline at end of file
/**
* 智能组卷根据模板生成试卷
* @param {JSON参数} data
*/
export
function
savePaperTemplate
(
data
)
{
return
request
({
url
:
'/Exam/SetPaperTemplate'
,
method
:
'post'
,
data
})
}
src/pages/exam/examCreate.vue
View file @
01db8f6f
...
@@ -8,14 +8,17 @@
...
@@ -8,14 +8,17 @@
margin-bottom
:
20px
;
margin-bottom
:
20px
;
border-bottom
:
1px
solid
#ddd
;
border-bottom
:
1px
solid
#ddd
;
}
}
.examTi_List
{
border
:
1px
solid
#ddd
;
.examTi_List
{
margin-bottom
:
20px
;
border
:
1px
solid
#ddd
;
margin-bottom
:
20px
;
}
}
.examCreat_Top
i
:hover
{
.examCreat_Top
i
:hover
{
color
:
red
;
color
:
red
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
</
style
>
</
style
>
<
template
>
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-body"
>
...
@@ -54,16 +57,19 @@
...
@@ -54,16 +57,19 @@
<q-radio
v-model=
"item.ChooseType"
:val=
"1"
label=
"从题库选题"
/>
<q-radio
v-model=
"item.ChooseType"
:val=
"1"
label=
"从题库选题"
/>
<template
v-if=
"item.ChooseType==1"
>
<template
v-if=
"item.ChooseType==1"
>
<span>
共
{{
item
.
QuestionTypeNum
}}
道 抽
<span>
共
{{
item
.
QuestionTypeNum
}}
道 抽
<el-input
style=
"width:100px;"
size=
"small"
v-model=
"item.ChooseNum"
maxlength=
"5"
></el-input>
道
</span>
<el-input
style=
"width:100px;"
size=
"small"
v-model=
"item.ChooseNum"
maxlength=
"5"
></el-input>
道
</span>
</
template
>
</
template
>
</span>
</span>
<br
/>
<br
/>
<span>
<span>
<q-radio
v-model=
"item.ChooseType"
:val=
"2"
label=
"从题库按照难易度选题"
/>
<q-radio
v-model=
"item.ChooseType"
:val=
"2"
label=
"从题库按照难易度选题"
/>
<
template
v-if=
"item.ChooseType==2"
>
<
template
v-if=
"item.ChooseType==2"
>
<div
style=
"margin:0 0 20px 40px;"
v-for=
"(subItem,subIndex) in item.ChooseList"
:key=
"subIndex"
>
{{
subItem
.
DifficultyTypeName
}}
共
<div
style=
"margin:0 0 20px 40px;"
v-for=
"(subItem,subIndex) in item.ChooseList"
:key=
"subIndex"
>
{{
subItem
.
DifficultyTypeCount
}}
道 抽
{{
subItem
.
DifficultyTypeName
}}
(共
<el-input
style=
"width:100px;"
size=
"small"
v-model=
"subItem.ChooseNum"
maxlength=
"5"
></el-input>
道
{{
subItem
.
DifficultyTypeCount
}}
道) 抽
<el-input
style=
"width:100px;"
size=
"small"
v-model=
"subItem.ChooseNum"
maxlength=
"5"
></el-input>
道
</div>
</div>
</
template
>
</
template
>
</span>
</span>
...
@@ -73,9 +79,15 @@
...
@@ -73,9 +79,15 @@
<
template
v-if=
"BankList&&BankList.length>0"
>
<
template
v-if=
"BankList&&BankList.length>0"
>
<div
class=
"row"
>
<div
class=
"row"
>
<q-select
filled
option-value=
"QuestionTypeId"
option-label=
"QuestionTypeName"
:options=
"BankList"
emit-value
<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"
/>
map-options
label=
"更多题型"
class=
"col-6 q-pr-lg"
use-input
clearable
v-model=
"MoreQuestionTypeId"
@
input=
"changeQuestion"
/>
<q-checkbox
v-model=
"templateMsg.IsSaveTemplate"
label=
"同时保存为组卷模板"
/>
</div>
</div>
</
template
>
</
template
>
<br/>
<div
class=
"row"
>
<q-btn
color=
"accent"
size=
"sm"
@
click=
"setPaperTemplate"
class=
"q-mr-md"
label=
"保存"
/>
</div>
</template>
</template>
<
template
v-if=
"postMsg.GenerateType==2"
>
<
template
v-if=
"postMsg.GenerateType==2"
>
手动组卷
手动组卷
...
@@ -96,6 +108,7 @@
...
@@ -96,6 +108,7 @@
}
from
'../../api/question/question'
}
from
'../../api/question/question'
import
{
import
{
savePaperInfo
,
savePaperInfo
,
savePaperTemplate
}
from
'../../api/teacher/index'
;
}
from
'../../api/teacher/index'
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -123,6 +136,8 @@
...
@@ -123,6 +136,8 @@
TemplateNum
:
0
,
//随机组卷数量
TemplateNum
:
0
,
//随机组卷数量
TemplateDifficultyType
:
0
,
//难易程度
TemplateDifficultyType
:
0
,
//难易程度
TemplateData
:
[],
TemplateData
:
[],
TemplateBankIds
:
""
,
IsSaveTemplate
:
false
,
},
},
ShowBankName
:
""
,
//显示题库名称
ShowBankName
:
""
,
//显示题库名称
BankList
:
[],
BankList
:
[],
...
@@ -155,6 +170,7 @@
...
@@ -155,6 +170,7 @@
}
}
}
}
},
},
//判断是否存在此题型
checkExists
(
QuestionTypeId
)
{
checkExists
(
QuestionTypeId
)
{
var
isExists
=
false
;
var
isExists
=
false
;
if
(
this
.
templateMsg
&&
this
.
templateMsg
.
TemplateData
&&
this
.
templateMsg
.
TemplateData
.
length
>
0
)
{
if
(
this
.
templateMsg
&&
this
.
templateMsg
.
TemplateData
&&
this
.
templateMsg
.
TemplateData
.
length
>
0
)
{
...
@@ -228,6 +244,7 @@
...
@@ -228,6 +244,7 @@
sBankName
=
sBankName
.
substr
(
1
);
sBankName
=
sBankName
.
substr
(
1
);
}
}
this
.
postMsg
.
QuestionBandIds
=
qBankIds
;
this
.
postMsg
.
QuestionBandIds
=
qBankIds
;
this
.
templateMsg
.
TemplateBankIds
=
qBankIds
;
this
.
ShowBankName
=
sBankName
;
this
.
ShowBankName
=
sBankName
;
this
.
getQuestionCategoryList
();
this
.
getQuestionCategoryList
();
},
},
...
@@ -236,6 +253,13 @@
...
@@ -236,6 +253,13 @@
savePaperInfo
(
this
.
postMsg
).
then
(
res
=>
{
savePaperInfo
(
this
.
postMsg
).
then
(
res
=>
{
});
});
},
//根据模板生成试卷
setPaperTemplate
()
{
savePaperTemplate
(
this
.
templateMsg
).
then
(
res
=>
{
console
.
log
(
"res=>"
,
res
);
});
}
}
}
}
}
}
...
...
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