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
913727d8
Commit
913727d8
authored
Aug 25, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
507a9a96
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
84 additions
and
20 deletions
+84
-20
v-fillin.vue
src/components/questiontype/v-fillin.vue
+16
-1
v-judge.vue
src/components/questiontype/v-judge.vue
+26
-6
v-multiple.vue
src/components/questiontype/v-multiple.vue
+37
-5
v-single.vue
src/components/questiontype/v-single.vue
+2
-5
examtest.vue
src/pages/exam/examtest.vue
+3
-3
No files found.
src/components/questiontype/v-fillin.vue
View file @
913727d8
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
.v_fillInQuestion
{
.v_fillInQuestion
{
width
:
100%
;
width
:
100%
;
}
}
</
style
>
</
style
>
<
template
>
<
template
>
<div
class=
"v_fillInQuestion"
>
<div
class=
"v_fillInQuestion"
>
...
@@ -17,6 +18,16 @@
...
@@ -17,6 +18,16 @@
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
<tbody
v-if=
"isOperate"
v-for=
"(item,index) in data.QuestionContentObj"
:key=
"index"
>
<tr>
<td
style=
"width:50px;text-align:center;padding-top:8px;"
>
第
{{
index
+
1
}}
空
</el-checkbox>
</td>
<td>
<el-input
v-model=
"item.Content"
>
</el-input>
</td>
</tr>
</tbody>
<tbody>
<tbody>
<tr>
<tr>
<td
colspan=
"2"
><span
v-if=
"data&&data.IsMutex==1"
style=
"font-size:13px;"
>
答案顺序打乱也判正确
</span></td>
<td
colspan=
"2"
><span
v-if=
"data&&data.IsMutex==1"
style=
"font-size:13px;"
>
答案顺序打乱也判正确
</span></td>
...
@@ -46,7 +57,11 @@
...
@@ -46,7 +57,11 @@
isShowAnswer
:
{
isShowAnswer
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
,
}
},
//是否可操作(PC端考试使用【可以点击选中】)
isOperate
:
{
type
:
Boolean
,
default
:
false
,
},
},
},
data
()
{
data
()
{
return
{
return
{
...
...
src/components/questiontype/v-judge.vue
View file @
913727d8
...
@@ -11,9 +11,17 @@
...
@@ -11,9 +11,17 @@
<tbody
v-for=
"(item,index) in data.QuestionContentObj"
:key=
"index"
>
<tbody
v-for=
"(item,index) in data.QuestionContentObj"
:key=
"index"
>
<tr>
<tr>
<td
style=
"width:50px;text-align:center;"
>
<td
style=
"width:50px;text-align:center;"
>
<div
class=
"Answer_List2"
>
<template
v-if=
"isOperate"
>
{{
item
.
Name
}}
<div
class=
"Answer_List"
style=
"cursor:pointer;"
@
click=
"ChangeItem(item)"
</div>
:class=
"
{'Is_Answer':item.IsAnswer}">
{{
item
.
Name
}}
</div>
</
template
>
<
template
v-else
>
<div
class=
"Answer_List2"
>
{{
item
.
Name
}}
</div>
</
template
>
</td>
</td>
<td
style=
"vertical-align:middle;"
>
<td
style=
"vertical-align:middle;"
>
<span
v-if=
"index==0"
>
对
</span>
<span
v-if=
"index==0"
>
对
</span>
...
@@ -42,9 +50,13 @@
...
@@ -42,9 +50,13 @@
isShowAnswer
:
{
isShowAnswer
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
,
}
},
//是否可操作(PC端考试使用【可以点击选中】)
isOperate
:
{
type
:
Boolean
,
default
:
false
,
},
},
},
data
()
{
data
()
{
return
{
return
{
data
:
this
.
questionObj
,
data
:
this
.
questionObj
,
...
@@ -52,7 +64,15 @@
...
@@ -52,7 +64,15 @@
},
},
created
()
{},
created
()
{},
methods
:
{
methods
:
{
ChangeItem
(
item
)
{
if
(
this
.
data
&&
this
.
data
.
QuestionContentObj
&&
this
.
data
.
QuestionContentObj
.
length
>
0
)
{
this
.
data
.
QuestionContentObj
.
forEach
(
item
=>
{
item
.
IsAnswer
=
false
;
})
}
item
.
IsAnswer
=
true
;
this
.
data
.
Answer
=
item
.
Name
;
},
},
},
mounted
()
{
mounted
()
{
...
...
src/components/questiontype/v-multiple.vue
View file @
913727d8
...
@@ -10,9 +10,17 @@
...
@@ -10,9 +10,17 @@
<tbody
v-for=
"(item,index) in data.QuestionContentObj"
:key=
"index"
>
<tbody
v-for=
"(item,index) in data.QuestionContentObj"
:key=
"index"
>
<tr>
<tr>
<td
style=
"width:40px;text-align:center;"
>
<td
style=
"width:40px;text-align:center;"
>
<div
class=
"num_option_dx2"
>
<template
v-if=
"isOperate"
>
{{
item
.
Name
}}
<div
class=
"num_option_dx"
style=
"cursor:pointer;"
@
click=
"ChangeItem(item)"
</div>
:class=
"
{'Is_Answer':item.IsAnswer}">
{{
item
.
ShowName
}}
</div>
</
template
>
<
template
v-else
>
<div
class=
"num_option_dx2"
>
{{
item
.
Name
}}
</div>
</
template
>
</td>
</td>
<td>
<td>
<div
class=
"InpDIV"
style=
"border:0;"
v-html=
"item.Content"
></div>
<div
class=
"InpDIV"
style=
"border:0;"
v-html=
"item.Content"
></div>
...
@@ -40,7 +48,12 @@
...
@@ -40,7 +48,12 @@
isShowAnswer
:
{
isShowAnswer
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
,
}
},
//是否可操作(PC端考试使用【可以点击选中】)
isOperate
:
{
type
:
Boolean
,
default
:
false
,
},
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -48,7 +61,26 @@
...
@@ -48,7 +61,26 @@
};
};
},
},
methods
:
{
methods
:
{
//获取选项答案
getAnswer
()
{
if
(
this
.
data
&&
this
.
data
.
QuestionContentObj
&&
this
.
data
.
QuestionContentObj
.
length
>
0
)
{
var
answer
=
""
;
this
.
data
.
QuestionContentObj
.
forEach
(
item
=>
{
if
(
item
.
IsAnswer
)
{
answer
+=
","
+
item
.
Name
;
}
})
if
(
answer
!=
""
)
{
answer
=
answer
.
substring
(
1
);
}
this
.
data
.
Answer
=
answer
;
}
},
//点击设为答案
ChangeItem
(
item
)
{
item
.
IsAnswer
=
!
item
.
IsAnswer
;
this
.
getAnswer
();
},
},
},
mounted
()
{
mounted
()
{
...
...
src/components/questiontype/v-single.vue
View file @
913727d8
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<template
v-if=
"isOperate"
>
<template
v-if=
"isOperate"
>
<div
class=
"Answer_List2"
style=
"cursor:pointer;"
@
click=
"ChangeItem(item)"
<div
class=
"Answer_List2"
style=
"cursor:pointer;"
@
click=
"ChangeItem(item)"
:class=
"
{'Is_Answer':item.IsAnswer}">
:class=
"
{'Is_Answer':item.IsAnswer}">
{{
item
.
Name
}}
{{
item
.
Show
Name
}}
</div>
</div>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
,
},
},
//是否可操作(PC端考试使用)
//是否可操作(PC端考试使用
【可以点击选中】
)
isOperate
:
{
isOperate
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
,
...
@@ -61,11 +61,9 @@
...
@@ -61,11 +61,9 @@
data
:
this
.
questionObj
,
data
:
this
.
questionObj
,
};
};
},
},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
ChangeItem
(
item
)
{
ChangeItem
(
item
)
{
if
(
this
.
data
.
QuestionContentObj
&&
this
.
data
.
QuestionContentObj
.
length
>
0
)
{
if
(
this
.
data
.
QuestionContentObj
&&
this
.
data
.
QuestionContentObj
.
length
>
0
)
{
this
.
data
.
QuestionContentObj
.
forEach
(
item
=>
{
this
.
data
.
QuestionContentObj
.
forEach
(
item
=>
{
item
.
IsAnswer
=
false
;
item
.
IsAnswer
=
false
;
...
@@ -73,7 +71,6 @@
...
@@ -73,7 +71,6 @@
}
}
item
.
IsAnswer
=
true
;
item
.
IsAnswer
=
true
;
this
.
data
.
Answer
=
item
.
Name
;
this
.
data
.
Answer
=
item
.
Name
;
console
.
log
(
"this.data"
,
this
.
data
);
},
},
},
},
watch
:
{
watch
:
{
...
...
src/pages/exam/examtest.vue
View file @
913727d8
...
@@ -273,13 +273,13 @@
...
@@ -273,13 +273,13 @@
:questionObj=
"dItem"
:isShowAnswer=
"isShowAnswer"
:isOperate=
"isOperate"
>
:questionObj=
"dItem"
:isShowAnswer=
"isShowAnswer"
:isOperate=
"isOperate"
>
</v-single>
</v-single>
<!--多选题-->
<!--多选题-->
<v-multiple
v-if=
"dItem.QuestionTypeKey=='multiple'"
:questionObj=
"dItem"
:isShowAnswer=
"isShowAnswer"
>
<v-multiple
v-if=
"dItem.QuestionTypeKey=='multiple'"
:questionObj=
"dItem"
:isShowAnswer=
"isShowAnswer"
:isOperate=
"isOperate"
>
</v-multiple>
</v-multiple>
<!--填空题-->
<!--填空题-->
<v-fillin
v-if=
"dItem.QuestionTypeKey=='fill-in'"
:questionObj=
"dItem"
:isShowAnswer=
"isShowAnswer"
>
<v-fillin
v-if=
"dItem.QuestionTypeKey=='fill-in'"
:questionObj=
"dItem"
:isShowAnswer=
"isShowAnswer"
:isOperate=
"isOperate"
>
</v-fillin>
</v-fillin>
<!--判断题-->
<!--判断题-->
<v-judge
v-if=
"dItem.QuestionTypeKey=='judge'"
:questionObj=
"dItem"
:isShowAnswer=
"isShowAnswer"
></v-judge>
<v-judge
v-if=
"dItem.QuestionTypeKey=='judge'"
:questionObj=
"dItem"
:isShowAnswer=
"isShowAnswer"
:isOperate=
"isOperate"
></v-judge>
<!--简答题、名词解释、论述题、计算题、口语题、其它-->
<!--简答题、名词解释、论述题、计算题、口语题、其它-->
<v-shortanswer
v-if=
"dItem.QuestionTypeKey=='short-answer'||dItem.QuestionTypeKey=='noun-explanation'||dItem.QuestionTypeKey=='essay-question'
<v-shortanswer
v-if=
"dItem.QuestionTypeKey=='short-answer'||dItem.QuestionTypeKey=='noun-explanation'||dItem.QuestionTypeKey=='essay-question'
...
...
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