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
c57cdded
Commit
c57cdded
authored
Jan 12, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
495da70e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
21 deletions
+28
-21
questionconfig.js
src/api/question/questionconfig.js
+2
-2
matching.vue
src/components/questiontype/matching.vue
+26
-19
No files found.
src/api/question/questionconfig.js
View file @
c57cdded
...
@@ -84,13 +84,13 @@ export function CreateQuestion(questionKey) {
...
@@ -84,13 +84,13 @@ export function CreateQuestion(questionKey) {
Name
:
"A"
,
Name
:
"A"
,
Content
:
""
Content
:
""
}];
}];
var
array
2
=
[{
var
array
3
=
[{
Name
:
"1"
,
Name
:
"1"
,
Content
:
"A"
Content
:
"A"
}];
}];
AnswerList
.
push
(
array1
);
AnswerList
.
push
(
array1
);
AnswerList
.
push
(
array2
);
AnswerList
.
push
(
array2
);
AnswerList
.
push
(
array
2
);
AnswerList
.
push
(
array
3
);
break
;
break
;
//排序题
//排序题
case
"sorting-problem"
:
case
"sorting-problem"
:
...
...
src/components/questiontype/matching.vue
View file @
c57cdded
<!--连线题-->
<!--连线题-->
<
style
>
<
style
>
.matchingQuestion
{
.matchingQuestion
{
width
:
100%
;
width
:
100%
;
}
}
.team_tit
{
.team_tit
{
display
:
inline-block
;
display
:
inline-block
;
font-size
:
14px
;
font-size
:
14px
;
color
:
#A8A8B3
;
color
:
#A8A8B3
;
padding-bottom
:
20px
;
padding-bottom
:
20px
;
margin-left
:
13px
;
margin-left
:
13px
;
}
}
.line_center
{
.line_center
{
display
:
inline-block
;
display
:
inline-block
;
width
:
28px
;
width
:
28px
;
height
:
10px
;
height
:
10px
;
border-top
:
1px
solid
#E1E1E5
;
border-top
:
1px
solid
#E1E1E5
;
margin
:
13px
12px
0
0
;
margin
:
13px
12px
0
0
;
}
}
.selectBox2
{
.selectBox2
{
display
:
inline-block
;
display
:
inline-block
;
vertical-align
:
top
;
vertical-align
:
top
;
...
@@ -33,6 +36,7 @@
...
@@ -33,6 +36,7 @@
color
:
#181E33
;
color
:
#181E33
;
outline
:
none
;
outline
:
none
;
}
}
</
style
>
</
style
>
<
template
>
<
template
>
<div
class=
"matchingQuestion"
>
<div
class=
"matchingQuestion"
>
...
@@ -48,7 +52,6 @@
...
@@ -48,7 +52,6 @@
</td>
</td>
<td
style=
"width:40px;text-align:center;"
>
<td
style=
"width:40px;text-align:center;"
>
<i
class=
"iconfont icon-guanbi Tiku_DelIcon"
@
click=
"deleteOpion(0,index)"
></i>
<i
class=
"iconfont icon-guanbi Tiku_DelIcon"
@
click=
"deleteOpion(0,index)"
></i>
<!--
<a
style=
"cursor:pointer;"
@
click=
"deleteOpion(0,index)"
>
删除
</a>
-->
</td>
</td>
</tr>
</tr>
<tfoot>
<tfoot>
...
@@ -78,7 +81,7 @@
...
@@ -78,7 +81,7 @@
<tfoot>
<tfoot>
<tr>
<tr>
<td
colspan=
"3"
>
<td
colspan=
"3"
>
<a
class=
"addTiMuList"
style=
"margin-left:13px;"
@
click=
"addOption(
0
)"
>
<a
class=
"addTiMuList"
style=
"margin-left:13px;"
@
click=
"addOption(
1
)"
>
<i
class=
"iconfont icon-add"
></i>
添加更多
<i
class=
"iconfont icon-add"
></i>
添加更多
</a>
</a>
</td>
</td>
...
@@ -87,7 +90,7 @@
...
@@ -87,7 +90,7 @@
</table>
</table>
<span
class=
"team_tit"
>
答案
</span>
<span
class=
"team_tit"
>
答案
</span>
<table
v-if=
"data&&data.length>2"
style=
"padding-left:13px;"
>
<table
v-if=
"data&&data.length>2"
style=
"padding-left:13px;"
>
<tr
v-for=
"(item,index) in data[
2
]"
>
<tr
v-for=
"(item,index) in data[
0
]"
>
<td
style=
"width:30px;"
>
<td
style=
"width:30px;"
>
{{
item
.
Name
}}
{{
item
.
Name
}}
</td>
</td>
...
@@ -95,7 +98,7 @@
...
@@ -95,7 +98,7 @@
<span
class=
"line_center"
></span>
<span
class=
"line_center"
></span>
</td>
</td>
<td>
<td>
<select
v-model=
"
item
.Content"
class=
"selectBox2"
>
<select
v-model=
"
data[2][index]
.Content"
class=
"selectBox2"
>
<template
v-for=
"(cItem,cIndex) in data[1]"
>
<template
v-for=
"(cItem,cIndex) in data[1]"
>
<option
:key=
"cIndex"
:label=
"cItem.Name"
:value=
"cItem.Name"
>
<option
:key=
"cIndex"
:label=
"cItem.Name"
:value=
"cItem.Name"
>
</option>
</option>
...
@@ -128,8 +131,8 @@
...
@@ -128,8 +131,8 @@
initialFrameHeight
:
80
,
initialFrameHeight
:
80
,
},
},
optionTitleList
:
[],
optionTitleList
:
[],
commonIndex
:
-
1
,
commonIndex
:
-
1
,
commonIndex2
:
-
1
commonIndex2
:
-
1
};
};
},
},
computed
:
{
computed
:
{
...
@@ -144,6 +147,10 @@
...
@@ -144,6 +147,10 @@
},
},
//删除选项
//删除选项
deleteOpion
(
index
,
subIndex
)
{
deleteOpion
(
index
,
subIndex
)
{
//删除第一组是,也删除答案里面的
if
(
index
==
0
)
{
this
.
data
[
2
].
splice
(
subIndex
,
1
);
}
this
.
data
[
index
].
splice
(
subIndex
,
1
);
this
.
data
[
index
].
splice
(
subIndex
,
1
);
this
.
calcOptionTitle
();
this
.
calcOptionTitle
();
},
},
...
@@ -180,18 +187,18 @@
...
@@ -180,18 +187,18 @@
this
.
$emit
(
'getChild'
,
this
.
data
);
this
.
$emit
(
'getChild'
,
this
.
data
);
},
},
//点击切换输入
//点击切换输入
changeEdit
(
index
){
changeEdit
(
index
)
{
this
.
commonIndex
=
index
;
this
.
commonIndex
=
index
;
this
.
commonIndex2
=
-
1
;
this
.
commonIndex2
=
-
1
;
},
},
changeEdit2
(
index
){
changeEdit2
(
index
)
{
this
.
commonIndex2
=
index
;
this
.
commonIndex2
=
index
;
this
.
commonIndex
=
-
1
;
this
.
commonIndex
=
-
1
;
}
}
},
},
mounted
()
{
mounted
()
{
console
.
log
(
this
.
data
,
'data'
);
console
.
log
(
this
.
data
,
'data'
);
},
},
watch
:
{
watch
:
{
data
:
{
data
:
{
handler
(
newValue
)
{
handler
(
newValue
)
{
...
...
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