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
659b0687
Commit
659b0687
authored
Sep 07, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
b3d37ab9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
97 additions
and
21 deletions
+97
-21
questionconfig.js
src/api/question/questionconfig.js
+12
-6
cloze.vue
src/components/questiontype/cloze.vue
+24
-5
reading-comprehensio.vue
src/components/questiontype/reading-comprehensio.vue
+16
-3
examineeManager.vue
src/pages/exam/examineeManager.vue
+15
-3
paperEdit.vue
src/pages/exam/paperEdit.vue
+25
-4
routes.js
src/router/routes.js
+5
-0
No files found.
src/api/question/questionconfig.js
View file @
659b0687
...
...
@@ -131,10 +131,14 @@ export function CreateQuestion(questionKey) {
AnswerList
.
push
(
tempArray
);
AnswerList
.
push
(
array2
);
break
;
//完型
天
空
//完型
填
空
case
"cloze"
:
var
tempArray
=
optionListConfig
();
AnswerList
.
push
(
tempArray
);
var
clozeObj
=
{
SubScore
:
0
,
OptionList
:
tempArray
,
};
AnswerList
.
push
(
clozeObj
);
break
;
//阅读理解
case
"reading-comprehensio"
:
...
...
@@ -143,6 +147,7 @@ export function CreateQuestion(questionKey) {
QuestionKey
:
"single"
,
QuestionName
:
"单选题"
,
SubTitle
:
""
,
//题目内容
SubScore
:
0
,
SubAnwser
:
optionListConfig
()
});
break
;
...
...
@@ -325,6 +330,7 @@ export function sortingproblemValidate(gName, detailsList) {
*【完型填空】验证
*/
export
function
clozeValidate
(
gName
,
detailsList
)
{
console
.
log
(
"detailsList"
,
detailsList
);
var
message
=
""
;
if
(
detailsList
&&
detailsList
.
length
>
0
)
{
for
(
let
i
=
0
;
i
<
detailsList
.
length
;
i
++
)
{
...
...
@@ -334,13 +340,13 @@ export function clozeValidate(gName, detailsList) {
}
for
(
let
j
=
0
;
j
<
detailsList
[
i
].
QuestionContentObj
.
length
;
j
++
)
{
var
Num
=
0
;
for
(
var
k
=
0
;
k
<
detailsList
[
i
].
QuestionContentObj
[
j
].
length
;
k
++
)
{
if
(
detailsList
[
i
].
QuestionContentObj
[
j
][
k
].
Content
==
''
)
{
for
(
var
k
=
0
;
k
<
detailsList
[
i
].
QuestionContentObj
[
j
].
OptionList
.
length
;
k
++
)
{
if
(
detailsList
[
i
].
QuestionContentObj
[
j
]
.
OptionList
[
k
].
Content
==
''
)
{
message
=
`请填写【
${
gName
}
】第
${
i
+
1
}
题,第
${
j
+
1
}
小题 选项
${
detailsList
[
i
].
QuestionContentObj
[
j
][
k
].
Name
}
内容!`
;
`请填写【
${
gName
}
】第
${
i
+
1
}
题,第
${
j
+
1
}
小题 选项
${
detailsList
[
i
].
QuestionContentObj
[
j
]
.
OptionList
[
k
].
Name
}
内容!`
;
return
message
;
}
if
(
detailsList
[
i
].
QuestionContentObj
[
j
][
k
].
IsAnswer
)
{
if
(
detailsList
[
i
].
QuestionContentObj
[
j
]
.
OptionList
[
k
].
IsAnswer
)
{
Num
++
}
}
...
...
src/components/questiontype/cloze.vue
View file @
659b0687
...
...
@@ -61,6 +61,10 @@
<i
class=
"iconfont icon-arrowright"
v-else
></i>
第
{{
index
+
1
}}
小题
</div>
<div
v-if=
"isShowScore"
>
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
@
keyup
.
native=
"checkPrice(item,'SubScore')"
v-model=
"item.SubScore"
class=
"col-12 q-pb-lg"
label=
"分数"
@
input=
"getQuestionScore"
/>
</div>
<div>
<i
class=
"iconfont icon-img_delete_small"
@
click
.
stop=
"deleteQuestion(index)"
></i>
</div>
...
...
@@ -69,7 +73,7 @@
</tr>
</thead>
<tbody
class=
"contant"
v-if=
"(commonIndex==index)&&!isShow"
>
<tr
v-for=
"(subItem,subIndex) in item"
>
<tr
v-for=
"(subItem,subIndex) in item
.OptionList"
:key=
"subIndex
"
>
<td
style=
"width:40px;text-align:center;"
>
<div
class=
"Answer_List"
@
click=
"ChangeItem(item,subItem)"
:class=
"
{'Is_Answer':subItem.IsAnswer}">
{{
subItem
.
Name
}}
...
...
@@ -114,6 +118,11 @@
},
setOption
:
{
type
:
Object
,
},
//是否显示小题分数
isShowScore
:
{
type
:
Boolean
,
default
:
false
,
}
},
components
:
{
...
...
@@ -138,6 +147,11 @@
this
.
initConfig
();
},
methods
:
{
//计算分数
getQuestionScore
()
{
this
.
$emit
(
'getScore'
);
},
initConfig
()
{
this
.
optionTitleList
=
getOptionList
();
},
...
...
@@ -202,13 +216,18 @@
},
//添加小题
addQuestion
()
{
this
.
data
.
push
(
optionListConfig
());
var
tempArray
=
optionListConfig
();
var
clozeObj
=
{
SubScore
:
0
,
OptionList
:
tempArray
,
};
this
.
data
.
push
(
clozeObj
);
},
//重新计算选择Title[A,B,C,D....]
calcOptionTitle
()
{
if
(
this
.
data
&&
this
.
data
.
length
>
0
)
{
this
.
data
.
forEach
((
item
,
index
)
=>
{
item
.
forEach
((
subItem
,
subIndex
)
=>
{
item
.
OptionList
.
forEach
((
subItem
,
subIndex
)
=>
{
subItem
.
Name
=
this
.
optionTitleList
[
subIndex
];
})
})
...
...
@@ -225,7 +244,7 @@
if
(
this
.
data
&&
this
.
data
.
length
>
0
)
{
var
answer
=
""
;
this
.
data
.
forEach
((
item
)
=>
{
item
.
forEach
((
subItem
)
=>
{
item
.
OptionList
.
forEach
((
subItem
)
=>
{
if
(
subItem
.
IsAnswer
)
{
answer
+=
","
+
subItem
.
Name
;
}
...
...
@@ -239,7 +258,7 @@
},
ChangeItem
(
item
,
subItem
)
{
if
(
item
&&
item
.
length
>
0
)
{
item
.
forEach
(
childItem
=>
{
item
.
OptionList
.
forEach
(
childItem
=>
{
childItem
.
IsAnswer
=
false
;
})
}
...
...
src/components/questiontype/reading-comprehensio.vue
View file @
659b0687
...
...
@@ -29,8 +29,8 @@
</
style
>
<
template
>
<div
class=
"readingComprehensioQuestion"
>
<template
v-if=
"data&&data.length>0"
v-for=
"(item,index) in data"
>
<table
class=
"common_TiTable"
>
<template
v-if=
"data&&data.length>0"
>
<table
class=
"common_TiTable"
v-for=
"(item,index) in data"
:key=
"index"
>
<thead>
<tr>
<th
colspan=
"3"
style=
"text-align:left;"
>
...
...
@@ -40,6 +40,10 @@
<i
class=
"iconfont icon-arrowright"
v-else
></i>
第
{{
index
+
1
}}
小题
<span
style=
"color:#A8A8B3;"
>
(
{{
item
.
QuestionName
}}
)
</span>
</div>
<div
v-if=
"isShowScore"
>
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
@
keyup
.
native=
"checkPrice(item,'SubScore')"
v-model=
"item.SubScore"
class=
"col-12 q-pb-lg"
label=
"分数"
@
input=
"getQuestionScore"
/>
</div>
<div>
<i
class=
"iconfont icon-img_delete_small"
@
click
.
stop=
"deleteQuestion(index)"
></i>
</div>
...
...
@@ -56,7 +60,7 @@
<!--选择题-->
<template
v-if=
"item.QuestionKey=='single' ||item.QuestionKey=='multiple'|| item.QuestionKey=='single-number'"
>
<tr
v-for=
"(subItem,subIndex) in item.SubAnwser"
>
<tr
v-for=
"(subItem,subIndex) in item.SubAnwser"
:key=
"subIndex"
>
<td
style=
"width:40px;text-align:center;"
>
<template
v-if=
"item.QuestionKey=='single'||item.QuestionKey=='single-number'"
>
<div
class=
"Answer_List"
@
click=
"ChangeItem(item,subItem)"
:class=
"
{'Is_Answer':subItem.IsAnswer}">
...
...
@@ -166,6 +170,11 @@
props
:
{
questionData
:
{
type
:
Array
,
},
//是否显示小题分数
isShowScore
:
{
type
:
Boolean
,
default
:
false
,
}
},
components
:
{
...
...
@@ -191,6 +200,10 @@
this
.
getQuestionType
();
},
methods
:
{
//计算分数
getQuestionScore
()
{
this
.
$emit
(
'getScore'
);
},
//获取题型列表
getQuestionType
()
{
queryQuestionTypeList
({}).
then
(
res
=>
{
...
...
src/pages/exam/examineeManager.vue
View file @
659b0687
...
...
@@ -54,6 +54,9 @@
<q-btn
flat
color=
"primary"
size=
"xs"
style=
"font-weight:400;"
class=
"q-mr-md"
label=
"阅卷"
@
click=
"gotoExamTestReview(props.row)"
/>
<q-btn
flat
color=
"primary"
size=
"xs"
style=
"font-weight:400;"
class=
"q-mr-md"
label=
"详情"
@
click=
"gotoExamTestInfo(props.row)"
/>
</q-td>
</
template
>
</q-table>
...
...
@@ -142,7 +145,7 @@
var
qMsg
=
{
GuestId
:
item
.
GuestId
,
PaperId
:
item
.
PaperId
,
PublishId
:
item
.
PublishId
,
PublishId
:
item
.
PublishId
,
};
this
.
OpenNewUrl
(
'/exam/examtest'
,
qMsg
);
},
...
...
@@ -150,10 +153,19 @@
var
qMsg
=
{
GuestId
:
item
.
GuestId
,
PaperId
:
item
.
PaperId
,
PublishId
:
item
.
PublishId
,
PublishId
:
item
.
PublishId
,
};
this
.
OpenNewUrl
(
'/exam/examtestreview'
,
qMsg
);
}
},
//考生试卷详情
gotoExamTestInfo
(
item
)
{
var
qMsg
=
{
GuestId
:
item
.
GuestId
,
PaperId
:
item
.
PaperId
,
PublishId
:
item
.
PublishId
,
};
this
.
OpenNewUrl
(
'/exam/examtestinfo'
,
qMsg
);
},
},
};
...
...
src/pages/exam/paperEdit.vue
View file @
659b0687
...
...
@@ -372,7 +372,8 @@
<div
class=
"row wrap"
v-if=
"ChooseItem"
style=
"padding:20px;"
>
<div
class=
"edit_stem"
>
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
@
keyup
.
native=
"checkPrice(ChooseItem,'Score')"
v-model=
"ChooseItem.Score"
class=
"col-12 q-pb-lg"
label=
"分数"
/>
v-model=
"ChooseItem.Score"
class=
"col-12 q-pb-lg"
label=
"分数"
:disable=
"ChooseItem.QuestionTypeKey=='cloze'||ChooseItem.QuestionTypeKey=='listening'||ChooseItem.QuestionTypeKey=='reading-comprehensio'"
/>
</div>
<div
class=
"col-12"
>
<
template
v-if=
"ChooseItem.QuestionTypeKey=='cloze'"
>
...
...
@@ -412,15 +413,17 @@
</sorting-problem>
<!--完型填空-->
<cloze
v-if=
"ChooseItem.QuestionTypeKey=='cloze'"
:questionData=
"ChooseItem.QuestionContentObj"
:setOption=
"ChooseItem"
@
getChild=
"getChildData"
></cloze>
:setOption=
"ChooseItem"
@
getChild=
"getChildData"
:isShowScore=
"true"
@
getScore=
"calcPaper"
></cloze>
<!--阅读理解、听力题-->
<reading-comprehensio
v-if=
"ChooseItem.QuestionTypeKey=='reading-comprehensio'||ChooseItem.QuestionTypeKey=='listening'"
:questionData=
"ChooseItem.QuestionContentObj"
:setOption=
"ChooseItem"
@
getChild=
"getChildData"
>
:questionData=
"ChooseItem.QuestionContentObj"
:setOption=
"ChooseItem"
@
getChild=
"getChildData"
:isShowScore=
"true"
@
getScore=
"calcPaper"
>
</reading-comprehensio>
<!--共用选择题-->
<sharing-choose
v-if=
"ChooseItem.QuestionTypeKey=='sharing-choose'"
:questionData=
"ChooseItem.QuestionContentObj"
@
getChild=
"getChildData"
:setOption=
"ChooseItem"
>
:questionData=
"ChooseItem.QuestionContentObj"
@
getChild=
"getChildData"
:setOption=
"ChooseItem"
:isShowScore=
"true"
@
getScore=
"calcPaper"
>
</sharing-choose>
<br
/>
<div
class=
"col-12"
>
...
...
@@ -923,6 +926,24 @@
if
(
x
.
DetailsList
&&
x
.
DetailsList
.
length
>
0
)
{
this
.
examNum
+=
x
.
DetailsList
.
length
;
x
.
DetailsList
.
forEach
(
y
=>
{
if
(
y
.
QuestionTypeKey
==
"cloze"
)
{
var
clozeScore
=
0
;
if
(
y
.
QuestionContentObj
&&
y
.
QuestionContentObj
.
length
>
0
)
{
y
.
QuestionContentObj
.
forEach
(
qItem
=>
{
clozeScore
+=
Number
(
qItem
.
SubScore
);
})
}
y
.
Score
=
clozeScore
;
}
if
(
y
.
QuestionTypeKey
==
"reading-comprehensio"
||
y
.
QuestionTypeKey
==
"listening"
)
{
var
readScore
=
0
;
if
(
y
.
QuestionContentObj
&&
y
.
QuestionContentObj
.
length
>
0
)
{
y
.
QuestionContentObj
.
forEach
(
qItem
=>
{
readScore
+=
Number
(
qItem
.
SubScore
);
})
}
y
.
Score
=
readScore
;
}
if
(
y
.
Score
)
{
tempGScore
+=
Number
(
y
.
Score
);
this
.
examScore
+=
Number
(
y
.
Score
);
...
...
src/router/routes.js
View file @
659b0687
...
...
@@ -1082,6 +1082,11 @@ const routes = [{
component
:
()
=>
import
(
"pages/exam/examtestreview"
)
},
{
path
:
"/exam/examtestinfo"
,
//考生试卷详情
component
:
()
=>
import
(
"pages/exam/examtestinfo"
)
},
{
path
:
"/exam/paperCreate"
,
//试卷组卷
component
:
()
=>
...
...
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