|
|
|
@ -13,7 +13,9 @@ |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<ul class="tab"> |
|
|
|
|
<li v-for="(item,index) in tabs" :key="index" :class="{active: active == item.id}" @click="tabChange(item.id)">{{item.name}}</li> |
|
|
|
|
<template v-for="(item,index) in tabs"> |
|
|
|
|
<li v-if="item.show" :key="index" :class="{active: active == item.id}" @click="tabChange(item.id)">{{item.name}}</li> |
|
|
|
|
</template> |
|
|
|
|
</ul> |
|
|
|
|
|
|
|
|
|
<div class="wrap"> |
|
|
|
@ -69,19 +71,24 @@ export default { |
|
|
|
|
tabs: [ |
|
|
|
|
{ |
|
|
|
|
id: 1, |
|
|
|
|
name: '单选题' |
|
|
|
|
name: '单选题', |
|
|
|
|
show: true |
|
|
|
|
},{ |
|
|
|
|
id: 2, |
|
|
|
|
name: '多选题' |
|
|
|
|
name: '多选题', |
|
|
|
|
show: true |
|
|
|
|
},{ |
|
|
|
|
id: 3, |
|
|
|
|
name: '判断题' |
|
|
|
|
name: '判断题', |
|
|
|
|
show: true |
|
|
|
|
},{ |
|
|
|
|
id: 4, |
|
|
|
|
name: '简答题' |
|
|
|
|
name: '简答题', |
|
|
|
|
show: true |
|
|
|
|
},{ |
|
|
|
|
id: 5, |
|
|
|
|
name: '填空题' |
|
|
|
|
name: '填空题', |
|
|
|
|
show: true |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
typeNameList: ['单项选择','多项选择','判断题','简答题','填空题'], |
|
|
|
@ -119,6 +126,12 @@ export default { |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.list = data.list |
|
|
|
|
let tabs = this.tabs |
|
|
|
|
data.list.find(n => n.typeName == '单项选择') || (tabs[0].show = false) |
|
|
|
|
data.list.find(n => n.typeName == '多项选择') || (tabs[1].show = false) |
|
|
|
|
data.list.find(n => n.typeName == '判断题') || (tabs[2].show = false) |
|
|
|
|
data.list.find(n => n.typeName == '简答题') || (tabs[3].show = false) |
|
|
|
|
data.list.find(n => n.typeName == '填空题') || (tabs[4].show = false) |
|
|
|
|
this.handleOptions() |
|
|
|
|
this.paperName = data.paperName |
|
|
|
|
this.userName = data.stuName |
|
|
|
|