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