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
26770c04
Commit
26770c04
authored
Jan 12, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
36325f89
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
134 additions
and
39 deletions
+134
-39
judge.vue
src/components/questiontype/judge.vue
+12
-6
matching.vue
src/components/questiontype/matching.vue
+72
-22
short-answer.vue
src/components/questiontype/short-answer.vue
+4
-1
sorting-problem.vue
src/components/questiontype/sorting-problem.vue
+46
-10
No files found.
src/components/questiontype/judge.vue
View file @
26770c04
<!--判断题-->
<
style
>
.judgeQuestion
{
width
:
100%
;
}
</
style
>
<
template
>
<div
class=
"judgeQuestion"
>
<table
v-if=
"data&&data.length>0"
>
<table
v-if=
"data&&data.length>0"
class=
"common_TiTable"
>
<tr
v-for=
"(item,index) in data"
>
<td>
<el-checkbox
v-model=
"item.IsAnswer"
@
change=
"ChangeItem(item)"
>
{{
item
.
Name
}}
</el-checkbox>
<td
style=
"width:50px;text-align:center;"
>
<div
class=
"Answer_List"
@
click=
"ChangeItem(item)"
:class=
"
{'Is_Answer':item.IsAnswer}">
{{
item
.
Name
}}
</div>
</td>
<td>
<UeEditor
v-model=
"item.Content"
:config=
"config"
></UeEditor>
<td
style=
"vertical-align:middle;"
>
<span
v-if=
"index==0"
>
对
</span>
<span
v-if=
"index==1"
>
错
</span>
<!--
<UeEditor
v-model=
"item.Content"
:config=
"config"
></UeEditor>
-->
</td>
</tr>
</table>
...
...
src/components/questiontype/matching.vue
View file @
26770c04
<!--连线题-->
<
style
>
.matchingQuestion
{
width
:
100%
;
}
.team_tit
{
display
:
inline-block
;
font-size
:
14px
;
color
:
#A8A8B3
;
padding-bottom
:
20px
;
margin-left
:
13px
;
}
.line_center
{
display
:
inline-block
;
width
:
28px
;
height
:
10px
;
border-top
:
1px
solid
#E1E1E5
;
margin
:
13px
12px
0
0
;
}
.selectBox2
{
display
:
inline-block
;
vertical-align
:
top
;
text-align
:
left
;
position
:
relative
;
cursor
:
pointer
;
width
:
58px
;
line-height
:
24px
;
height
:
24px
;
background
:
#FFFFFF
;
border
:
1px
solid
#E1E1E5
;
border-radius
:
4px
;
font-size
:
12px
;
color
:
#181E33
;
outline
:
none
;
}
</
style
>
<
template
>
<div
class=
"matchingQuestion"
>
<span
>
第一组
</span>
<table
v-if=
"data&&data.length>0"
>
<span
class=
"team_tit"
style=
"margin-top:20px;padding-bottom:0;"
>
第1组:
</span>
<table
v-if=
"data&&data.length>0"
class=
"common_TiTable"
>
<tr
v-for=
"(item,index) in data[0]"
>
<td>
<td
style=
"width:40px;text-align:center;padding-top:10px;"
>
{{
item
.
Name
}}
</td>
<td>
<UeEditor
v-model=
"item.Content"
:config=
"config"
></UeEditor>
<div
class=
"InpDIV"
v-html=
"item.Content"
v-if=
"commonIndex!=index"
@
click=
"changeEdit(index)"
></div>
<UeEditor
v-model=
"item.Content"
:config=
"config"
v-else
></UeEditor>
</td>
<td>
<a
style=
"cursor:pointer;"
@
click=
"deleteOpion(0,index)"
>
删除
</a>
<td
style=
"width:40px;text-align:center;"
>
<i
class=
"iconfont icon-guanbi Tiku_DelIcon"
@
click=
"deleteOpion(0,index)"
></i>
<!--
<a
style=
"cursor:pointer;"
@
click=
"deleteOpion(0,index)"
>
删除
</a>
-->
</td>
</tr>
<tfoot>
<tr>
<td
colspan=
"3"
>
<a
style=
"cursor:pointer;"
@
click=
"addOption(0)"
>
添加选项
</a>
<a
class=
"addTiMuList"
style=
"margin-left:13px;"
@
click=
"addOption(0)"
>
<i
class=
"iconfont icon-add"
></i>
添加更多
</a>
</td>
</tr>
</tfoot>
</table>
<span
>
第二组
</span>
<table
v-if=
"data&&data.length>1"
>
<span
class=
"team_tit"
>
第2组:
</span>
<table
v-if=
"data&&data.length>1"
class=
"common_TiTable"
>
<tr
v-for=
"(item,index) in data[1]"
>
<td>
<td
style=
"width:40px;text-align:center;padding-top:10px;"
>
{{
item
.
Name
}}
</td>
<td>
<UeEditor
v-model=
"item.Content"
:config=
"config"
></UeEditor>
<div
class=
"InpDIV"
v-html=
"item.Content"
v-if=
"commonIndex2!=index"
@
click=
"changeEdit2(index)"
></div>
<UeEditor
v-model=
"item.Content"
:config=
"config"
v-else
></UeEditor>
</td>
<td>
<
a
style=
"cursor:pointer;"
@
click=
"deleteOpion(0,index)"
>
删除
</a
>
<td
style=
"width:40px;text-align:center;"
>
<
i
class=
"iconfont icon-guanbi Tiku_DelIcon"
@
click=
"deleteOpion(1,index)"
></i
>
</td>
</tr>
<tfoot>
<tr>
<td
colspan=
"3"
>
<a
style=
"cursor:pointer;"
@
click=
"addOption(1)"
>
添加选项
</a>
<a
class=
"addTiMuList"
style=
"margin-left:13px;"
@
click=
"addOption(0)"
>
<i
class=
"iconfont icon-add"
></i>
添加更多
</a>
</td>
</tr>
</tfoot>
</table>
<span>
答案
</span>
<table
v-if=
"data&&data.length>2"
>
<span
class=
"team_tit"
>
答案
</span>
<table
v-if=
"data&&data.length>2"
style=
"padding-left:13px;"
>
<tr
v-for=
"(item,index) in data[2]"
>
<td>
<td
style=
"width:30px;"
>
{{
item
.
Name
}}
</td>
<td>
-----
<span
class=
"line_center"
></span>
</td>
<td>
<select
v-model=
"item.Content"
>
<select
v-model=
"item.Content"
class=
"selectBox2"
>
<template
v-for=
"(cItem,cIndex) in data[1]"
>
<option
:key=
"cIndex"
:label=
"cItem.Name"
:value=
"cItem.Name"
>
</option>
...
...
@@ -89,6 +128,8 @@
initialFrameHeight
:
80
,
},
optionTitleList
:
[],
commonIndex
:
-
1
,
commonIndex2
:
-
1
};
},
computed
:
{
...
...
@@ -138,10 +179,19 @@
returnDataToParent
()
{
this
.
$emit
(
'getChild'
,
this
.
data
);
},
//点击切换输入
changeEdit
(
index
){
this
.
commonIndex
=
index
;
this
.
commonIndex2
=-
1
;
},
changeEdit2
(
index
){
this
.
commonIndex2
=
index
;
this
.
commonIndex
=-
1
;
}
},
mounted
()
{
},
console
.
log
(
this
.
data
,
'data'
);
},
watch
:
{
data
:
{
handler
(
newValue
)
{
...
...
src/components/questiontype/short-answer.vue
View file @
26770c04
<!--简答题-->
<
style
>
.shortAnswerQuestion
{
width
:
100%
;
margin-bottom
:
20px
;
}
</
style
>
<
template
>
<div
class=
"shortAnswerQuestion"
>
...
...
src/components/questiontype/sorting-problem.vue
View file @
26770c04
<!--排序题-->
<
style
>
.sortingProblemQuestion
{
width
:
100%
}
.team_tit
{
font-size
:
14px
;
color
:
#A8A8B3
;
padding-bottom
:
20px
;
}
.selectBox
{
display
:
inline-block
;
vertical-align
:
top
;
text-align
:
left
;
position
:
relative
;
cursor
:
pointer
;
width
:
58px
;
line-height
:
24px
;
height
:
24px
;
background
:
#FFFFFF
;
border
:
1px
solid
#E1E1E5
;
border-radius
:
4px
;
font-size
:
12px
;
color
:
#181E33
;
margin
:
0
20px
14px
0
;
}
.blue-border
{
border
:
1px
solid
#FFFFFF
;
box-shadow
:
0
0
7px
1px
#75BAFF
;
}
</
style
>
<
template
>
<div
class=
"sortingProblemQuestion"
>
<table
v-if=
"data&&data.length>0"
>
<table
v-if=
"data&&data.length>0"
class=
"common_TiTable"
>
<tr
v-for=
"(item,index) in data[0]"
>
<td>
<td
style=
"width:40px;text-align:center;"
>
{{
item
.
Name
}}
</td>
<td>
<UeEditor
v-model=
"item.Content"
:config=
"config"
></UeEditor>
<div
class=
"InpDIV"
v-html=
"item.Content"
v-if=
"commonIndex!=index"
@
click=
"changeEdit(index)"
></div>
<UeEditor
v-model=
"item.Content"
:config=
"config"
v-else
></UeEditor>
</td>
<td>
<
a
style=
"cursor:pointer;"
@
click=
"deleteOpion(index)"
>
删除
</a
>
<td
style=
"width:40px;text-align:center;"
>
<
i
class=
"iconfont icon-guanbi Tiku_DelIcon"
@
click=
"deleteOpion(index)"
></i
>
</td>
</tr>
<tfoot>
<tr>
<td
colspan=
"3"
>
<a
style=
"cursor:pointer;"
@
click=
"addOption()"
>
添加选项
</a>
<a
class=
"addTiMuList"
@
click=
"addOption()"
>
<i
class=
"iconfont icon-add"
></i>
添加选项
</a>
</td>
</tr>
</tfoot>
</table>
答案:请在下方下拉框中对选项进行排序(顺序从左到右)
<br
/>
<div
class=
"team_tit"
>
答案:请在下方下拉框中对选项进行排序(顺序从左到右)
</div>
<table
v-if=
"data&&data.length>0"
>
<tr>
<td>
<template
v-for=
"(item,index) in data[1]"
>
<select
v-model=
"item.Name"
>
<select
v-model=
"item.Name"
class=
"selectBox"
:class=
"
{'blue-border':index==clickIndex}" @click="clickIndex=index"
>
<template
v-for=
"(cItem,cIndex) in data[0]"
>
<option
:key=
"cIndex"
:label=
"cItem.Name"
:value=
"cItem.Name"
>
</option>
...
...
@@ -64,6 +93,8 @@
initialFrameHeight
:
80
,
},
optionTitleList
:
[],
commonIndex
:
-
1
,
clickIndex
:
-
1
,
};
},
created
()
{
...
...
@@ -76,6 +107,7 @@
//删除选项
deleteOpion
(
index
)
{
this
.
data
[
0
].
splice
(
index
,
1
);
this
.
data
[
1
].
splice
(
index
,
1
);
this
.
calcOptionTitle
();
},
//新增选项
...
...
@@ -112,6 +144,10 @@
returnDataToParent
()
{
this
.
$emit
(
'getChild'
,
this
.
data
);
},
//点击切换输入
changeEdit
(
index
){
this
.
commonIndex
=
index
;
},
},
mounted
()
{
...
...
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