mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-06 09:26:46 +08:00
feat:优化开始考试页面
This commit is contained in:
@@ -24,17 +24,17 @@
|
||||
<div class="questiontitle" >
|
||||
{{q.text}}
|
||||
</div>
|
||||
<div class="btnswitch" v-for="(j,index) in q.options"
|
||||
<div class="btnswitch" v-for="(o,index) in q.options"
|
||||
:key="index"
|
||||
@click="selectBtn(j)"
|
||||
@click="selectBtn(o)"
|
||||
>
|
||||
<div class="checkoutbtn"
|
||||
:style="{
|
||||
backgroundImage:
|
||||
'url('+( j.selected === true? Images.checkboxImg : Images.checkbox2Img )+')'
|
||||
'url('+( o.select === true? Images.checkboxImg : Images.checkbox2Img )+')'
|
||||
}"
|
||||
></div>
|
||||
<div class="select">{{j.text}}</div>
|
||||
<div class="select">{{o.text}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -154,13 +154,16 @@ export default {
|
||||
questions: [
|
||||
{
|
||||
id: 1,
|
||||
type: "judge",
|
||||
text: "1、控制计划是由工艺部门完成 (4分)",
|
||||
options: [
|
||||
{
|
||||
{
|
||||
id:1,
|
||||
text: "正确",
|
||||
select:"flase",
|
||||
},
|
||||
{
|
||||
id:2,
|
||||
text: "错误",
|
||||
select:"flase",
|
||||
},
|
||||
@@ -168,13 +171,16 @@ export default {
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
type: "judge",
|
||||
text: "2、.PFMEA假定所设计的产品能满足设计要求",
|
||||
options: [
|
||||
{
|
||||
{
|
||||
id:1,
|
||||
text: "正确",
|
||||
select:"flase",
|
||||
},
|
||||
{
|
||||
id:2,
|
||||
text: "错误",
|
||||
select:"flase",
|
||||
},
|
||||
@@ -182,33 +188,23 @@ export default {
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
text: "3、控制计划是由工艺部门完成 (4分)",
|
||||
options: [
|
||||
{
|
||||
text: "正确",
|
||||
select:"flase",
|
||||
},
|
||||
{
|
||||
text: "错误",
|
||||
select:"flase",
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
text: "4、.PFMEA假定所设计的产品能满足设计要求",
|
||||
type: "judge",
|
||||
text: "3、PFMEA假定所设计的产品能满足设计要求 (4分)",
|
||||
options: [
|
||||
{
|
||||
id:1,
|
||||
text: "正确",
|
||||
select:"flase",
|
||||
},
|
||||
{
|
||||
id:2,
|
||||
text: "错误",
|
||||
select:"flase",
|
||||
},
|
||||
]
|
||||
},
|
||||
],
|
||||
//判断题问题和选项(暂时被questions替代)
|
||||
// j_questions: [
|
||||
// {
|
||||
// type: "judge",
|
||||
@@ -226,13 +222,6 @@ export default {
|
||||
// text: "3、PFMEA假定所设计的产品能满足设计要求 (4分)",
|
||||
// },
|
||||
// ],
|
||||
s_questions: [
|
||||
{
|
||||
type: "choice",
|
||||
id: 1,
|
||||
text: "4、.FMEA 是一种( )工具(4分)",
|
||||
},
|
||||
],
|
||||
// j_options: [
|
||||
// {
|
||||
// id: 1,
|
||||
@@ -245,6 +234,14 @@ export default {
|
||||
// selected: false,
|
||||
// },
|
||||
// ],
|
||||
|
||||
s_questions: [
|
||||
{
|
||||
type: "choice",
|
||||
id: 1,
|
||||
text: "4、.FMEA 是一种( )工具(4分)",
|
||||
},
|
||||
],
|
||||
s_options: [
|
||||
{
|
||||
id: 1,
|
||||
@@ -269,19 +266,7 @@ export default {
|
||||
]
|
||||
});
|
||||
const selectBtn = (value) => {
|
||||
// let arr = state.questions;
|
||||
const arry = []
|
||||
state.questions.map((item) => {
|
||||
arry.push(item.options)
|
||||
})
|
||||
console.log(arry)
|
||||
console.log(value)
|
||||
// arry.map((i) => {
|
||||
// if (i.id === value.id) {
|
||||
// i.selected = !i.selected;
|
||||
// }
|
||||
// });
|
||||
// state.questions = arry;
|
||||
value.select = !value.select
|
||||
};
|
||||
const selectBtn2 = (value) => {
|
||||
let arr = state.s_options;
|
||||
|
||||
Reference in New Issue
Block a user