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
a569b330
Commit
a569b330
authored
Aug 23, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
cac9f151
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
32 deletions
+45
-32
paperCreate.vue
src/pages/exam/paperCreate.vue
+39
-28
paperEdit.vue
src/pages/exam/paperEdit.vue
+6
-4
No files found.
src/pages/exam/paperCreate.vue
View file @
a569b330
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
color
:
red
;
color
:
red
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.setpaperCreat
{
.setpaperCreat
{
border
:
1px
dashed
#E1E1E5
;
border
:
1px
dashed
#E1E1E5
;
padding-top
:
12px
;
padding-top
:
12px
;
...
@@ -25,6 +26,7 @@
...
@@ -25,6 +26,7 @@
padding
:
12px
4px
0
4px
;
padding
:
12px
4px
0
4px
;
margin
:
20px
0
10px
68px
;
margin
:
20px
0
10px
68px
;
}
}
.setpaperCreat
span
{
.setpaperCreat
span
{
display
:
inline-block
;
display
:
inline-block
;
background
:
#F2F5FA
;
background
:
#F2F5FA
;
...
@@ -48,17 +50,19 @@
...
@@ -48,17 +50,19 @@
<div
class=
"setpaperCreat"
v-if=
"QuestionArray.length>0"
>
<div
class=
"setpaperCreat"
v-if=
"QuestionArray.length>0"
>
<span
v-for=
"(item,index) in QuestionArray"
:key=
"index"
>
{{
item
.
BankName
}}
</span>
<span
v-for=
"(item,index) in QuestionArray"
:key=
"index"
>
{{
item
.
BankName
}}
</span>
</div>
</div>
<q-btn
color=
"accent"
size=
"sm"
style=
"margin-top:20px;"
@
click=
"showExamTemplate"
class=
"q-mr-md"
label=
"选择模板"
/><br
/>
<q-btn
color=
"accent"
size=
"sm"
style=
"margin-top:20px;"
@
click=
"showExamTemplate"
class=
"q-mr-md"
label=
"选择模板"
/><br
/>
<br
/>
<br
/>
<div
class=
"row"
>
<div
class=
"row"
>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"templateMsg.TemplateName"
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"templateMsg.TemplateName"
class=
"col-6 q-pb-lg q-pr-lg"
label=
"试卷标题"
/>
class=
"col-6 q-pb-lg q-pr-lg"
label=
"试卷标题"
/>
<q-input
filled
stack-label
maxlength=
"5"
@
keyup
.
native=
"checkInteger(templateMsg,'TemplateScore')"
:dense=
"false"
v-model=
"templateMsg.TemplateScore"
class=
"col-6 q-pb-lg"
<q-input
filled
stack-label
maxlength=
"5"
@
keyup
.
native=
"checkInteger(templateMsg,'TemplateScore')"
:dense=
"false"
label=
"满分"
/>
v-model=
"templateMsg.TemplateScore"
class=
"col-6 q-pb-lg"
label=
"满分"
/>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
ref=
"TemplateNum"
v-model=
"templateMsg.TemplateNum"
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
ref=
"TemplateNum"
v-model=
"templateMsg.TemplateNum"
class=
"col-6 q-pb-lg q-pr-lg"
label=
"随机组卷数量"
@
keyup
.
native=
"checkInteger(templateMsg,'TemplateNum')"
:rules=
"[val => !!val || '请填写随机组卷数量']"
/>
class=
"col-6 q-pb-lg q-pr-lg"
label=
"随机组卷数量"
@
keyup
.
native=
"checkInteger(templateMsg,'TemplateNum')"
:rules=
"[val => !!val || '请填写随机组卷数量']"
/>
<q-select
filled
option-value=
"Id"
option-label=
"Name"
:options=
"questionDifficultyTypeList"
emit-value
<q-select
filled
option-value=
"Id"
option-label=
"Name"
:options=
"questionDifficultyTypeList"
emit-value
map-options
label=
"难易程度"
class=
"col-6"
use-input
clearable
v-model=
"templateMsg.TemplateDifficultyType"
/>
map-options
label=
"难易程度"
class=
"col-6"
use-input
clearable
v-model=
"templateMsg.TemplateDifficultyType"
/>
</div>
</div>
...
@@ -66,7 +70,8 @@
...
@@ -66,7 +70,8 @@
<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"
class=
"examTi_List"
>
<div
v-for=
"(item,index) in templateMsg.TemplateData"
:key=
"index"
class=
"examTi_List"
>
<div
class=
"examCreat_Top"
>
<div
class=
"examCreat_Top"
>
<span>
{{
item
.
QuestionTypeName
}}
</span>
<i
@
click=
"delQuestion(templateMsg.TemplateData,index)"
class=
"iconfont icon-img_delete_small"
></i>
<span>
{{
item
.
QuestionTypeName
}}
</span>
<i
@
click=
"delQuestion(templateMsg.TemplateData,index)"
class=
"iconfont icon-img_delete_small"
></i>
</div>
</div>
<div
style=
"padding:0 20px 10px 20px;"
>
<div
style=
"padding:0 20px 10px 20px;"
>
<div
class=
"row"
>
<div
class=
"row"
>
...
@@ -79,7 +84,9 @@
...
@@ -79,7 +84,9 @@
<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
style=
"position:relative;top:2px;"
>
共
{{
item
.
QuestionTypeNum
}}
道 抽
<span
style=
"position:relative;top:2px;"
>
共
{{
item
.
QuestionTypeNum
}}
道 抽
<el-input
style=
"width:100px;"
size=
"small"
:disabled=
"item.QuestionTypeNum
<
=
0
"
@
input=
"getMaxInput(item)"
v-model=
"item.ChooseNum"
@
keyup
.
native=
"checkInteger(item,'ChooseNum')"
maxlength=
"5"
></el-input>
<el-input
style=
"width:100px;"
size=
"small"
:disabled=
"item.QuestionTypeNum
<
=
0
"
@
input=
"getMaxInput(item)"
v-model=
"item.ChooseNum"
@
keyup
.
native=
"checkInteger(item,'ChooseNum')"
maxlength=
"5"
></el-input>
道
</span>
道
</span>
</
template
>
</
template
>
</span>
</span>
...
@@ -90,7 +97,9 @@
...
@@ -90,7 +97,9 @@
<div
style=
"margin:0 0 20px 40px;"
v-for=
"(subItem,subIndex) in item.ChooseList"
:key=
"subIndex"
>
<div
style=
"margin:0 0 20px 40px;"
v-for=
"(subItem,subIndex) in item.ChooseList"
:key=
"subIndex"
>
{{
subItem
.
DifficultyTypeName
}}
(共
{{
subItem
.
DifficultyTypeName
}}
(共
{{
subItem
.
DifficultyTypeCount
}}
道) 抽
{{
subItem
.
DifficultyTypeCount
}}
道) 抽
<el-input
style=
"width:100px;"
size=
"small"
:disabled=
"subItem.DifficultyTypeCount
<
=
0
"
@
input=
"getMaxMiniInput(subItem)"
@
keyup
.
native=
"checkInteger(subItem,'ChooseNum')"
v-model=
"subItem.ChooseNum"
maxlength=
"5"
></el-input>
<el-input
style=
"width:100px;"
size=
"small"
:disabled=
"subItem.DifficultyTypeCount
<
=
0
"
@
input=
"getMaxMiniInput(subItem)"
@
keyup
.
native=
"checkInteger(subItem,'ChooseNum')"
v-model=
"subItem.ChooseNum"
maxlength=
"5"
></el-input>
道
道
</div>
</div>
</
template
>
</
template
>
...
@@ -157,20 +166,22 @@
...
@@ -157,20 +166,22 @@
TemplateData
:
[],
TemplateData
:
[],
TemplateBankIds
:
""
,
TemplateBankIds
:
""
,
IsSaveTemplate
:
false
,
IsSaveTemplate
:
false
,
ParentId
:
0
,
ParentId
:
0
,
IsOpen
:
1
//(1-私有,2-开放)
IsOpen
:
1
//(1-私有,2-开放)
},
},
ShowBankName
:
""
,
//显示题库名称
ShowBankName
:
""
,
//显示题库名称
BankList
:
[],
BankList
:
[],
MoreQuestionTypeId
:
""
,
//更多题型
MoreQuestionTypeId
:
""
,
//更多题型
questionTypeList
:
[],
//问题列表
questionTypeList
:
[],
//问题列表
saveLoading
:
false
,
saveLoading
:
false
,
QuestionArray
:[]
QuestionArray
:
[]
}
}
},
},
created
()
{
created
()
{
if
(
this
.
$route
.
query
.
ToParentId
){
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
ToParentId
)
{
this
.
templateMsg
.
ParentId
=
parseInt
(
this
.
$route
.
query
.
ToParentId
);
if
(
parseInt
(
this
.
$route
.
query
.
ToParentId
)
>
0
)
{
this
.
templateMsg
.
ParentId
=
parseInt
(
this
.
$route
.
query
.
ToParentId
);
}
}
}
this
.
getQuestionType
();
this
.
getQuestionType
();
this
.
getDifficultyType
();
this
.
getDifficultyType
();
...
@@ -180,14 +191,14 @@
...
@@ -180,14 +191,14 @@
},
},
methods
:
{
methods
:
{
//设置最大值
//设置最大值
getMaxInput
(
item
){
getMaxInput
(
item
)
{
if
(
item
.
ChooseNum
>
item
.
QuestionTypeNum
)
{
if
(
item
.
ChooseNum
>
item
.
QuestionTypeNum
)
{
item
.
ChooseNum
=
''
;
item
.
ChooseNum
=
''
;
}
}
},
},
getMaxMiniInput
(
item
){
getMaxMiniInput
(
item
)
{
if
(
item
.
ChooseNum
>
item
.
DifficultyTypeCount
)
{
if
(
item
.
ChooseNum
>
item
.
DifficultyTypeCount
)
{
item
.
ChooseNum
=
''
;
item
.
ChooseNum
=
''
;
}
}
},
},
//获取题型列表
//获取题型列表
...
@@ -253,13 +264,13 @@
...
@@ -253,13 +264,13 @@
{
{
DifficultyType
:
2
,
DifficultyType
:
2
,
DifficultyTypeName
:
"中"
,
DifficultyTypeName
:
"中"
,
DifficultyTypeCount
:
35
,
DifficultyTypeCount
:
0
,
ChooseNum
:
0
ChooseNum
:
0
},
},
{
{
DifficultyType
:
3
,
DifficultyType
:
3
,
DifficultyTypeName
:
"难"
,
DifficultyTypeName
:
"难"
,
DifficultyTypeCount
:
36
,
DifficultyTypeCount
:
0
,
ChooseNum
:
0
ChooseNum
:
0
}
}
]
]
...
@@ -393,8 +404,8 @@
...
@@ -393,8 +404,8 @@
this
.
$refs
.
TemplateNum
.
validate
()
this
.
$refs
.
TemplateNum
.
validate
()
if
(
!
this
.
$refs
.
TemplateNum
.
hasError
)
{
if
(
!
this
.
$refs
.
TemplateNum
.
hasError
)
{
let
TotalNum
=
0
;
let
TotalNum
=
0
;
for
(
let
i
=
0
;
i
<
this
.
templateMsg
.
TemplateData
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
templateMsg
.
TemplateData
.
length
;
i
++
)
{
if
(
this
.
templateMsg
.
TemplateData
[
i
].
ChooseType
==
1
&&
this
.
templateMsg
.
TemplateData
[
i
].
ChooseNum
===
''
)
{
if
(
this
.
templateMsg
.
TemplateData
[
i
].
ChooseType
==
1
&&
this
.
templateMsg
.
TemplateData
[
i
].
ChooseNum
===
''
)
{
this
.
$q
.
notify
({
this
.
$q
.
notify
({
type
:
'negative'
,
type
:
'negative'
,
position
:
"top"
,
position
:
"top"
,
...
@@ -404,7 +415,7 @@
...
@@ -404,7 +415,7 @@
}
}
TotalNum
+=
parseInt
(
this
.
templateMsg
.
TemplateData
[
i
].
QuestionScore
);
TotalNum
+=
parseInt
(
this
.
templateMsg
.
TemplateData
[
i
].
QuestionScore
);
}
}
if
(
TotalNum
>
this
.
templateMsg
.
TemplateScore
)
{
if
(
TotalNum
>
this
.
templateMsg
.
TemplateScore
)
{
this
.
$q
.
notify
({
this
.
$q
.
notify
({
type
:
'negative'
,
type
:
'negative'
,
position
:
"top"
,
position
:
"top"
,
...
@@ -412,9 +423,9 @@
...
@@ -412,9 +423,9 @@
})
})
return
return
}
}
this
.
saveLoading
=
true
;
this
.
saveLoading
=
true
;
savePaperTemplate
(
this
.
templateMsg
).
then
(
res
=>
{
savePaperTemplate
(
this
.
templateMsg
).
then
(
res
=>
{
this
.
saveLoading
=
false
;
this
.
saveLoading
=
false
;
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
icon
:
'iconfont icon-chenggong'
,
...
@@ -438,7 +449,7 @@
...
@@ -438,7 +449,7 @@
}
}
},
},
//删除
//删除
delQuestion
(
item
,
index
)
{
delQuestion
(
item
,
index
)
{
this
.
$q
.
dialog
({
this
.
$q
.
dialog
({
title
:
'提示信息'
,
title
:
'提示信息'
,
message
:
"是否确定删除?"
,
message
:
"是否确定删除?"
,
...
@@ -447,7 +458,7 @@
...
@@ -447,7 +458,7 @@
ok
:
"确定"
,
ok
:
"确定"
,
cancel
:
"取消"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
}).
onOk
(()
=>
{
item
.
splice
(
index
,
1
);
item
.
splice
(
index
,
1
);
}).
onCancel
(()
=>
{});
}).
onCancel
(()
=>
{});
}
}
}
}
...
...
src/pages/exam/paperEdit.vue
View file @
a569b330
...
@@ -507,7 +507,7 @@
...
@@ -507,7 +507,7 @@
PaperType
:
2
,
//试卷类型(1-文件夹,2-试卷)
PaperType
:
2
,
//试卷类型(1-文件夹,2-试卷)
ParentId
:
0
,
//父节点编号,
ParentId
:
0
,
//父节点编号,
GroupList
:
[],
//试卷答题分类
GroupList
:
[],
//试卷答题分类
IsOpen
:
1
//(1-私有,2-开放)
IsOpen
:
1
//(1-私有,2-开放)
},
},
//点击问题对象
//点击问题对象
ChooseItem
:
null
,
ChooseItem
:
null
,
...
@@ -532,8 +532,10 @@
...
@@ -532,8 +532,10 @@
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
Id
)
{
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
Id
)
{
this
.
msg
.
PaperId
=
decodeURI
(
this
.
$route
.
query
.
Id
);
this
.
msg
.
PaperId
=
decodeURI
(
this
.
$route
.
query
.
Id
);
}
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
ToParentId
){
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
ToParentId
)
{
this
.
DataObj
.
ParentId
=
parseInt
(
this
.
$route
.
query
.
ToParentId
);
if
(
parseInt
(
this
.
$route
.
query
.
ToParentId
)
>
0
)
{
this
.
DataObj
.
ParentId
=
parseInt
(
this
.
$route
.
query
.
ToParentId
);
}
}
}
this
.
getQuestionType
();
this
.
getQuestionType
();
this
.
getDifficultyType
();
this
.
getDifficultyType
();
...
@@ -581,7 +583,7 @@
...
@@ -581,7 +583,7 @@
sItem
.
Score
=
avgScore
;
sItem
.
Score
=
avgScore
;
})
})
}
}
// this.calcPaper();
// this.calcPaper();
},
},
//上移下移(IsUp:0上移,1下移)
//上移下移(IsUp:0上移,1下移)
MoveFatherItem
(
subIndex
,
IsUp
)
{
MoveFatherItem
(
subIndex
,
IsUp
)
{
...
...
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