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
9df1b847
Commit
9df1b847
authored
Sep 13, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
f6ef294d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
3 deletions
+26
-3
paperCreate.vue
src/pages/exam/paperCreate.vue
+26
-3
No files found.
src/pages/exam/paperCreate.vue
View file @
9df1b847
...
...
@@ -138,6 +138,20 @@
</div>
</
template
>
</span>
<br
/>
<span>
<q-radio
v-model=
"item.ChooseType"
:val=
"3"
label=
"从题库按照分类选题"
/>
<
template
v-if=
"item.ChooseType==3"
>
<div
style=
"margin:0 0 20px 40px;"
v-for=
"(subItem,subIndex) in item.CategoryList"
:key=
"subIndex"
>
{{
subItem
.
CategoryName
}}
(共
{{
subItem
.
QuestionTypeNum
}}
道) 抽
<el-input
style=
"width:100px;"
size=
"small"
@
input=
"getMaxMiniCategoryInput(subItem)"
@
keyup
.
native=
"checkInteger(subItem,'ChooseNum')"
v-model=
"subItem.ChooseNum"
maxlength=
"5"
>
</el-input>
道
</div>
</
template
>
</span>
</div>
</div>
</template>
...
...
@@ -240,17 +254,24 @@
this
.
templateMsg
.
TemplateName
=
timeStr
+
"新建试卷"
;
},
methods
:
{
//设置最大值
//设置
题库
最大值
getMaxInput
(
item
)
{
if
(
item
.
ChooseNum
>
item
.
QuestionTypeNum
)
{
item
.
ChooseNum
=
item
.
QuestionTypeNum
;
}
},
//难易程度
getMaxMiniInput
(
item
)
{
if
(
item
.
ChooseNum
>
item
.
DifficultyTypeCount
)
{
item
.
ChooseNum
=
item
.
DifficultyTypeCount
;
}
},
//分类
getMaxMiniCategoryInput
(
item
)
{
if
(
item
.
ChooseNum
>
item
.
QuestionTypeNum
)
{
item
.
ChooseNum
=
item
.
QuestionTypeNum
;
}
},
//获取题型列表
getQuestionType
()
{
queryQuestionTypeList
({}).
then
(
res
=>
{
...
...
@@ -280,6 +301,7 @@
if
(
chooseQuestion
)
{
newObj
.
QuestionTypeNum
=
chooseQuestion
.
QuestionTypeNum
;
newObj
.
ChooseList
=
chooseQuestion
.
ChooseList
;
newObj
.
CategoryList
=
chooseQuestion
.
CategoryList
;
}
if
(
newObj
&&
newObj
.
QuestionTypeId
>
0
)
{
if
(
!
this
.
checkExists
(
newObj
.
QuestionTypeId
))
{
...
...
@@ -319,7 +341,7 @@
createdTempObj
()
{
var
newObj
=
{
ChooseNum
:
0
,
ChooseType
:
1
,
ChooseType
:
1
,
//1-题库选题,2-题库难易程度选题,3-分类选题,4-分类难易程度选题
QuestionDesc
:
""
,
QuestionScore
:
0
,
QuestionTypeId
:
0
,
...
...
@@ -344,7 +366,8 @@
DifficultyTypeCount
:
0
,
ChooseNum
:
0
}
]
],
CategoryList
:
[]
}
return
newObj
;
},
...
...
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