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
507a9a96
Commit
507a9a96
authored
Aug 25, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
e4418ff3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
5 deletions
+29
-5
v-single.vue
src/components/questiontype/v-single.vue
+27
-4
examtest.vue
src/pages/exam/examtest.vue
+2
-1
No files found.
src/components/questiontype/v-single.vue
View file @
507a9a96
...
@@ -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:40px;text-align:center;"
>
<td
style=
"width:40px;text-align:center;"
>
<div
class=
"Answer_List2"
>
<template
v-if=
"isOperate"
>
{{
item
.
Name
}}
<div
class=
"Answer_List2"
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>
<td>
<div
class=
"InpDIV"
style=
"border:0;"
v-html=
"item.Content"
></div>
<div
class=
"InpDIV"
style=
"border:0;"
v-html=
"item.Content"
></div>
...
@@ -41,7 +49,12 @@
...
@@ -41,7 +49,12 @@
isShowAnswer
:
{
isShowAnswer
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
,
}
},
//是否可操作(PC端考试使用)
isOperate
:
{
type
:
Boolean
,
default
:
false
,
},
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -51,7 +64,17 @@
...
@@ -51,7 +64,17 @@
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
ChangeItem
(
item
)
{
if
(
this
.
data
.
QuestionContentObj
&&
this
.
data
.
QuestionContentObj
.
length
>
0
)
{
this
.
data
.
QuestionContentObj
.
forEach
(
item
=>
{
item
.
IsAnswer
=
false
;
})
}
item
.
IsAnswer
=
true
;
this
.
data
.
Answer
=
item
.
Name
;
console
.
log
(
"this.data"
,
this
.
data
);
},
},
},
watch
:
{
watch
:
{
isShowAnswer
:
{
isShowAnswer
:
{
...
...
src/pages/exam/examtest.vue
View file @
507a9a96
...
@@ -270,7 +270,7 @@
...
@@ -270,7 +270,7 @@
</span>
</span>
<!--单选题-->
<!--单选题-->
<v-single
v-if=
"dItem.QuestionTypeKey=='single'||dItem.QuestionTypeKey=='single-number'"
<v-single
v-if=
"dItem.QuestionTypeKey=='single'||dItem.QuestionTypeKey=='single-number'"
:questionObj=
"dItem"
:isShowAnswer=
"isShowAnswer"
>
: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"
>
...
@@ -365,6 +365,7 @@
...
@@ -365,6 +365,7 @@
},
},
PaperConfig
:
{},
//试卷配置
PaperConfig
:
{},
//试卷配置
isShowAnswer
:
false
,
//是否显示答案
isShowAnswer
:
false
,
//是否显示答案
isOperate
:
true
,
//是否可操作
examScore
:
0
,
//总分,
examScore
:
0
,
//总分,
examNum
:
0
,
//总题量
examNum
:
0
,
//总题量
}
}
...
...
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