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
0a000e69
Commit
0a000e69
authored
Jan 06, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
fabee4a5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
101 additions
and
9 deletions
+101
-9
questionconfig.js
src/api/question/questionconfig.js
+5
-5
question-form.vue
src/components/question/question-form.vue
+9
-4
entry-problem.vue
src/components/questiontype/entry-problem.vue
+87
-0
No files found.
src/api/question/questionconfig.js
View file @
0a000e69
...
@@ -62,11 +62,11 @@ export function CreateQuestion(questionKey) {
...
@@ -62,11 +62,11 @@ export function CreateQuestion(questionKey) {
IsAnswer
:
false
IsAnswer
:
false
})
})
break
;
break
;
//
简答
题
//
分录
题
case
"
short-answer
"
:
case
"
entry-problem
"
:
//
AnswerList.push({
AnswerList
.
push
({
//
Content: ""
Content
:
""
//
})
})
break
;
break
;
}
}
return
AnswerList
;
return
AnswerList
;
...
...
src/components/question/question-form.vue
View file @
0a000e69
...
@@ -41,10 +41,13 @@
...
@@ -41,10 +41,13 @@
:setOption=
"objOption"
></fill-in>
:setOption=
"objOption"
></fill-in>
<!--判断题-->
<!--判断题-->
<judge
v-if=
"questionObj.Key=='judge'"
:questionData=
"AnswerList"
@
getChild=
"getChildData"
></judge>
<judge
v-if=
"questionObj.Key=='judge'"
:questionData=
"AnswerList"
@
getChild=
"getChildData"
></judge>
<!--简答题、名词解释、论述题-->
<!--简答题、名词解释、论述题、计算题-->
<short-answer
<short-answer
v-if=
"questionObj.Key=='short-answer'||questionObj.Key=='noun-explanation'||questionObj.Key=='essay-question'
v-if=
"questionObj.Key=='short-answer'||questionObj.Key=='noun-explanation'||questionObj.Key=='essay-question'"
||questionObj.Key=='calculation'
:setOption=
"objOption"
>
</short-answer>
"
:setOption=
"objOption"
>
</short-answer>
<!--分录题-->
<entry-problem
v-if=
"questionObj.Key=='entry-problem'"
:questionData=
"AnswerList"
@
getChild=
"getChildData"
>
</entry-problem>
<br
/>
<br
/>
<div
class=
"col-12"
>
<div
class=
"col-12"
>
答案解析
<UeEditor
v-model=
"objOption.AnswerParse"
:config=
"config"
ref=
"AnswerParse"
></UeEditor>
答案解析
<UeEditor
v-model=
"objOption.AnswerParse"
:config=
"config"
ref=
"AnswerParse"
></UeEditor>
...
@@ -99,6 +102,7 @@
...
@@ -99,6 +102,7 @@
import
fillIn
from
'../questiontype/fill-in'
import
fillIn
from
'../questiontype/fill-in'
import
judge
from
'../questiontype/judge'
import
judge
from
'../questiontype/judge'
import
shortAnswer
from
'../questiontype/short-answer'
import
shortAnswer
from
'../questiontype/short-answer'
import
entryProblem
from
'../questiontype/entry-problem'
export
default
{
export
default
{
components
:
{
components
:
{
UeEditor
,
UeEditor
,
...
@@ -108,6 +112,7 @@
...
@@ -108,6 +112,7 @@
fillIn
,
//填空题
fillIn
,
//填空题
judge
,
//判断题
judge
,
//判断题
shortAnswer
,
//简答题
shortAnswer
,
//简答题
entryProblem
,
//分录题
},
},
props
:
{
props
:
{
setingObj
:
{
setingObj
:
{
...
...
src/components/questiontype/entry-problem.vue
0 → 100644
View file @
0a000e69
<!--分录题-->
<
style
>
</
style
>
<
template
>
<div
class=
"entryProblemQuestion"
>
<table
v-if=
"data&&data.length>0"
>
<tr
v-for=
"(item,index) in data"
>
<td>
第
{{
index
+
1
}}
空
</el-checkbox>
</td>
<td>
<UeEditor
v-model=
"item.Content"
:config=
"config"
></UeEditor>
</td>
<td>
<a
style=
"cursor:pointer;"
@
click=
"deleteOpion(index)"
>
删除
</a>
</td>
</tr>
<tfoot>
<tr>
<td
colspan=
"3"
>
<a
style=
"cursor:pointer;"
@
click=
"addOption()"
>
添加选项
</a>
</td>
</tr>
<tr>
<td
colspan=
"3"
>
1. 一个空有多种答案时请用";"隔开。如:水;H2O
<br
/>
2. 若试题答案是数字,可设置范围,两个数字之间用"-"。如:1-9,学生填写1到9之间的数字都算正确(包括1和9)
</td>
</tr>
</tfoot>
</table>
</div>
</
template
>
<
script
>
import
UeEditor
from
'../editor/UeEditor'
export
default
{
props
:
{
questionData
:
{
type
:
Array
,
},
},
components
:
{
UeEditor
},
data
()
{
return
{
data
:
this
.
questionData
,
config
:
{
initialFrameWidth
:
null
,
initialFrameHeight
:
80
,
},
};
},
created
()
{},
methods
:
{
//删除选项
deleteOpion
(
index
)
{
this
.
data
.
splice
(
index
,
1
);
this
.
calcOptionTitle
();
},
//新增选项
addOption
()
{
this
.
data
.
push
({
Content
:
""
,
});
},
//返回数据到父组件
returnDataToParent
()
{
this
.
$emit
(
'getChild'
,
this
.
data
);
},
},
mounted
()
{
},
watch
:
{
data
:
{
handler
(
newValue
)
{
this
.
returnDataToParent
();
},
deep
:
true
},
}
};
</
script
>
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