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
fbbbeb65
Commit
fbbbeb65
authored
Jan 19, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
2d2f1725
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
35 deletions
+48
-35
fill-in.vue
src/components/questiontype/fill-in.vue
+20
-7
multiple.vue
src/components/questiontype/multiple.vue
+11
-18
single.vue
src/components/questiontype/single.vue
+17
-10
No files found.
src/components/questiontype/fill-in.vue
View file @
fbbbeb65
<!--填空题-->
<!--填空题-->
<
style
>
<
style
>
.fillInQuestion
{
.fillInQuestion
{
width
:
100%
;
width
:
100%
;
}
}
.tk_info
{
.tk_info
{
color
:
#A8A8B3
;
color
:
#A8A8B3
;
font-size
:
12px
;
font-size
:
12px
;
line-height
:
24px
;
line-height
:
24px
;
cursor
:
default
;
cursor
:
default
;
margin-top
:
20px
;
margin-top
:
20px
;
}
}
</
style
>
</
style
>
<
template
>
<
template
>
<div
class=
"fillInQuestion"
>
<div
class=
"fillInQuestion"
>
...
@@ -36,7 +38,8 @@
...
@@ -36,7 +38,8 @@
</tr>
</tr>
<tr>
<tr>
<td
colspan=
"3"
>
<td
colspan=
"3"
>
<el-checkbox
v-model=
"setOption.IsMutex"
:true-label=
"1"
:false-label=
"0"
><span
style=
"font-size:12px;"
>
答案顺序打乱也判正确
</span></el-checkbox>
<el-checkbox
v-model=
"setOption.IsMutex"
:true-label=
"1"
:false-label=
"0"
><span
style=
"font-size:12px;"
>
答案顺序打乱也判正确
</span></el-checkbox>
<div
class=
"tk_info"
>
<div
class=
"tk_info"
>
1. 一个空有多种答案时请用";"隔开。如:水;H2O
1. 一个空有多种答案时请用";"隔开。如:水;H2O
</br>
</br>
...
@@ -69,7 +72,7 @@
...
@@ -69,7 +72,7 @@
initialFrameWidth
:
null
,
initialFrameWidth
:
null
,
initialFrameHeight
:
80
,
initialFrameHeight
:
80
,
},
},
commonIndex
:
-
1
,
commonIndex
:
-
1
,
};
};
},
},
created
()
{},
created
()
{},
...
@@ -97,11 +100,21 @@
...
@@ -97,11 +100,21 @@
},
},
//返回数据到父组件
//返回数据到父组件
returnDataToParent
()
{
returnDataToParent
()
{
if
(
this
.
data
&&
this
.
data
.
length
>
0
)
{
var
answer
=
""
;
this
.
data
.
forEach
(
item
=>
{
answer
+=
"★"
+
item
.
Content
;
})
if
(
answer
!=
""
)
{
answer
=
answer
.
substring
(
1
);
}
this
.
setOption
.
Answer
=
answer
;
}
this
.
$emit
(
'getChild'
,
this
.
data
);
this
.
$emit
(
'getChild'
,
this
.
data
);
},
},
//点击切换输入
//点击切换输入
changeEdit
(
index
){
changeEdit
(
index
)
{
this
.
commonIndex
=
index
;
this
.
commonIndex
=
index
;
}
}
},
},
mounted
()
{
mounted
()
{
...
...
src/components/questiontype/multiple.vue
View file @
fbbbeb65
<!--多选题-->
<!--多选题-->
<
style
>
<
style
>
.multipleQuestion
{
.multipleQuestion
{
width
:
100%
;
width
:
100%
;
}
}
</
style
>
</
style
>
<
template
>
<
template
>
<div
class=
"multipleQuestion"
>
<div
class=
"multipleQuestion"
>
...
@@ -12,7 +13,6 @@
...
@@ -12,7 +13,6 @@
<div
class=
"num_option_dx"
@
click=
"ChangeItem(item)"
:class=
"
{'Is_Answer':item.IsAnswer}">
<div
class=
"num_option_dx"
@
click=
"ChangeItem(item)"
:class=
"
{'Is_Answer':item.IsAnswer}">
{{
item
.
Name
}}
{{
item
.
Name
}}
</div>
</div>
<!--
<el-checkbox
v-model=
"item.IsAnswer"
>
{{
item
.
Name
}}
</el-checkbox>
-->
</td>
</td>
<td>
<td>
<div
class=
"InpDIV"
v-html=
"item.Content"
v-if=
"commonIndex!=index"
@
click=
"changeEdit(index)"
></div>
<div
class=
"InpDIV"
v-html=
"item.Content"
v-if=
"commonIndex!=index"
@
click=
"changeEdit(index)"
></div>
...
@@ -20,19 +20,12 @@
...
@@ -20,19 +20,12 @@
</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(index)"
></i>
<i
class=
"iconfont icon-guanbi Tiku_DelIcon"
@
click=
"deleteOpion(index)"
></i>
<!--
<a
style=
"cursor:pointer;"
@
click=
"deleteOpion(index)"
>
删除
</a>
-->
</td>
</td>
</tr>
</tr>
<tfoot>
<tr>
<td
colspan=
"3"
>
<a
class=
"addTiMuList"
@
click=
"addOption()"
>
<i
class=
"iconfont icon-add"
></i>
添加选项
</a>
</td>
</tr>
</tfoot>
</table>
</table>
<a
class=
"addTiMuList"
@
click=
"addOption()"
>
<i
class=
"iconfont icon-add"
></i>
添加选项
</a>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -60,7 +53,7 @@
...
@@ -60,7 +53,7 @@
initialFrameHeight
:
80
,
initialFrameHeight
:
80
,
},
},
optionTitleList
:
[],
optionTitleList
:
[],
commonIndex
:
-
1
,
commonIndex
:
-
1
,
};
};
},
},
created
()
{
created
()
{
...
@@ -81,7 +74,7 @@
...
@@ -81,7 +74,7 @@
cancel
:
"取消"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
}).
onOk
(()
=>
{
this
.
data
.
splice
(
index
,
1
);
this
.
data
.
splice
(
index
,
1
);
this
.
commonIndex
=
-
1
;
this
.
commonIndex
=
-
1
;
this
.
calcOptionTitle
();
this
.
calcOptionTitle
();
}).
onCancel
(()
=>
{
}).
onCancel
(()
=>
{
...
@@ -131,12 +124,12 @@
...
@@ -131,12 +124,12 @@
this
.
$emit
(
'getChild'
,
this
.
data
);
this
.
$emit
(
'getChild'
,
this
.
data
);
},
},
//点击设为答案
//点击设为答案
ChangeItem
(
item
){
ChangeItem
(
item
)
{
item
.
IsAnswer
=
!
item
.
IsAnswer
;
item
.
IsAnswer
=
!
item
.
IsAnswer
;
},
},
//点击切换输入
//点击切换输入
changeEdit
(
index
){
changeEdit
(
index
)
{
this
.
commonIndex
=
index
;
this
.
commonIndex
=
index
;
}
}
},
},
mounted
()
{
mounted
()
{
...
...
src/components/questiontype/single.vue
View file @
fbbbeb65
...
@@ -22,16 +22,10 @@
...
@@ -22,16 +22,10 @@
<i
class=
"iconfont icon-guanbi Tiku_DelIcon"
@
click=
"deleteOpion(index)"
></i>
<i
class=
"iconfont icon-guanbi Tiku_DelIcon"
@
click=
"deleteOpion(index)"
></i>
</td>
</td>
</tr>
</tr>
<tfoot>
<tr>
<td
colspan=
"3"
>
<a
class=
"addTiMuList"
@
click=
"addOption()"
>
<i
class=
"iconfont icon-add"
></i>
添加选项
</a>
</td>
</tr>
</tfoot>
</table>
</table>
<a
class=
"addTiMuList"
@
click=
"addOption()"
>
<i
class=
"iconfont icon-add"
></i>
添加选项
</a>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -83,6 +77,7 @@
...
@@ -83,6 +77,7 @@
this
.
data
.
splice
(
index
,
1
);
this
.
data
.
splice
(
index
,
1
);
this
.
commonIndex
=
-
1
;
this
.
commonIndex
=
-
1
;
this
.
calcOptionTitle
();
this
.
calcOptionTitle
();
this
.
getAnswer
();
}).
onCancel
(()
=>
{
}).
onCancel
(()
=>
{
});
});
...
@@ -96,6 +91,7 @@
...
@@ -96,6 +91,7 @@
IsAnswer
:
false
IsAnswer
:
false
});
});
this
.
calcOptionTitle
()
this
.
calcOptionTitle
()
this
.
getAnswer
();
}
else
{
}
else
{
this
.
$q
.
notify
({
this
.
$q
.
notify
({
type
:
'warning'
,
type
:
'warning'
,
...
@@ -129,7 +125,18 @@
...
@@ -129,7 +125,18 @@
})
})
}
}
item
.
IsAnswer
=
true
;
item
.
IsAnswer
=
true
;
this
.
setOption
.
Answer
=
item
.
Name
;
this
.
getAnswer
();
},
//获取正确答案
getAnswer
()
{
this
.
setOption
.
Answer
=
""
;
if
(
this
.
data
&&
this
.
data
.
length
>
0
)
{
this
.
data
.
forEach
(
item
=>
{
if
(
item
.
IsAnswer
)
{
this
.
setOption
.
Answer
=
item
.
Name
;
}
})
}
},
},
//点击切换输入
//点击切换输入
changeEdit
(
index
)
{
changeEdit
(
index
)
{
...
...
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