|
@@ -30,25 +30,26 @@
|
|
|
</view>
|
|
|
<view class="title-list" v-if="current == 1">
|
|
|
<view class="content">
|
|
|
- <view class="list" v-for="(item1,index1) in bankList" :key="'index1'+index1">
|
|
|
+ <view class="list" v-for="(item1,index1) in bankList" :key="index1">
|
|
|
<template v-if="item1.type==1">
|
|
|
<view class="module" @click="clickModule" :data-id="item1.majorId" :data-index="index1">
|
|
|
{{item1.name}} {{item1.subjectName}}
|
|
|
</view>
|
|
|
|
|
|
<template v-if="item1.showList">
|
|
|
- <view class="section" v-for="(item2,index2) in item1.list" :key="'childIndex2'+index2" @click="changeItem" :data-index1="index1" :data-index2="index2" :data-id="item2.chapterExamId" :data-type="item1.type">
|
|
|
- <u-icon name="arrow-down" v-if="item2.showList"></u-icon>
|
|
|
- <u-icon name="arrow-up" v-if="!item2.showList"></u-icon>
|
|
|
- {{item2.name}}
|
|
|
- {{item2.list}}
|
|
|
- </view>
|
|
|
- <view v-if="item2.showList" >
|
|
|
- <view class="article" v-for="(article,index3) in item2.list" :key="'index3'+index3">
|
|
|
- <view class="flex">{{article.name}}</view>
|
|
|
- <navigator :url="'/pages2/bank/questionBankTest?id='+article.majorId">
|
|
|
- <view v-if="index3 == 0" class="btn">试做</view>
|
|
|
- </navigator>
|
|
|
+ <view v-for="(item2,index2) in item1.list" :key="index2" >
|
|
|
+ <view class="section" @click="changeItem" :data-index1="index1" :data-index2="index2" :data-id="item2.chapterExamId" :data-type="item1.type">
|
|
|
+ <u-icon name="arrow-down" class="icon" v-if="item2.showList"></u-icon>
|
|
|
+ <u-icon name="arrow-up" class="icon" v-if="!item2.showList"></u-icon>
|
|
|
+ {{item2.name}}
|
|
|
+ </view>
|
|
|
+ <view v-if="item2.showList">
|
|
|
+ <view class="article" :class="{active:index3 == 0}" v-for="(article,index3) in item2.list" :key="index3">
|
|
|
+ <view class="flex_auto">{{article.examName}}</view>
|
|
|
+ <navigator :url="'/pages2/bank/questionBankTest?id='+article.majorId">
|
|
|
+ <view class="btn">试做</view>
|
|
|
+ </navigator>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -58,15 +59,15 @@
|
|
|
|
|
|
<template v-if="item1.type ==2">
|
|
|
<view class="section" :data-index1="index1" :data-id="item1.majorId" @click="changeItem" :data-type="item1.type">
|
|
|
- <u-icon name="arrow-down" v-if="item1.showList"></u-icon>
|
|
|
- <u-icon name="arrow-up" v-if="!item1.showList"></u-icon>
|
|
|
+ <u-icon name="arrow-down" class="icon" v-if="item1.showList"></u-icon>
|
|
|
+ <u-icon name="arrow-up" class="icon" v-if="!item1.showList"></u-icon>
|
|
|
{{item1.name}}
|
|
|
</view>
|
|
|
<view v-if="item1.showList" >
|
|
|
- <view class="article" :class="{active:index2 == 0}" :key="'parentIndex2'+index3" v-for="(article,index2) in item1.list">
|
|
|
- {{item1.name}}
|
|
|
+ <view class="article" :class="{active:index2 == 0}" :key="index3" v-for="(article,index2) in item1.list">
|
|
|
+ <view class="flex_auto">{{item1.name}}</view>
|
|
|
<navigator :url="'/pages2/bank/questionBankTest?id='+article.majorId">
|
|
|
- <view v-if="index1 == 0" class="btn">试做</view>
|
|
|
+ <view class="btn">试做</view>
|
|
|
</navigator>
|
|
|
|
|
|
</view>
|
|
@@ -75,8 +76,7 @@
|
|
|
|
|
|
<template v-if="item1.type ==3">
|
|
|
<view class="article active" >
|
|
|
- {{item1.name}}
|
|
|
-
|
|
|
+ <view class="flex_auto">{{item1.name}}</view>
|
|
|
<navigator :url="'/pages2/bank/questionBankTest?id='+item1.majorId">
|
|
|
<view class="btn">试做</view>
|
|
|
</navigator>
|
|
@@ -175,9 +175,6 @@ export default {
|
|
|
this.$api.goodsChapterList({
|
|
|
moduleExamId:id
|
|
|
}).then(res => {
|
|
|
- res.data.data.forEach(item => {
|
|
|
- item.list = [];
|
|
|
- })
|
|
|
this.$set(this.bankList[index],'showList',true)
|
|
|
this.$set(this.bankList[index],'list',res.data.data)
|
|
|
|
|
@@ -222,12 +219,8 @@ export default {
|
|
|
let type = e.currentTarget.dataset.type
|
|
|
|
|
|
if(type == 1) {
|
|
|
- if(this.bankList[index1].list[index2].list.length) {
|
|
|
+ if(this.bankList[index1].list[index2].list) {
|
|
|
this.$set(this.bankList[index1].list[index2],'showList',!this.bankList[index1].list[index2].showList)
|
|
|
- // this.$set(this.bankList[index1].list[index2],'list',[{
|
|
|
- // name:'试卷',
|
|
|
- // id:2,
|
|
|
- // }])
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -235,11 +228,6 @@ export default {
|
|
|
chapterExamId:id
|
|
|
}).then(res => {
|
|
|
|
|
|
- // res.data.data.forEach(item => {
|
|
|
- // item.showList = false;
|
|
|
- // })
|
|
|
- // this.bankList = res.data.data;
|
|
|
-
|
|
|
this.$set(this.bankList[index1].list[index2],'showList',true)
|
|
|
this.$set(this.bankList[index1].list[index2],'list',res.data.data)
|
|
|
|
|
@@ -247,7 +235,7 @@ export default {
|
|
|
})
|
|
|
|
|
|
} else if(type == 2) {
|
|
|
- if(this.bankList[index1].list.length) {
|
|
|
+ if(this.bankList[index1].list) {
|
|
|
this.$set(this.bankList[index1],'showList',!this.bankList[index1].showList)
|
|
|
return;
|
|
|
}
|
|
@@ -256,11 +244,6 @@ export default {
|
|
|
chapterExamId:id
|
|
|
}).then(res => {
|
|
|
|
|
|
- // res.data.data.forEach(item => {
|
|
|
- // item.showList = false;
|
|
|
- // })
|
|
|
- // this.bankList = res.data.data;
|
|
|
-
|
|
|
this.$set(this.bankList[index1],'showList',true)
|
|
|
this.$set(this.bankList[index1],'list',res.data.data)
|
|
|
|
|
@@ -320,17 +303,21 @@ export default {
|
|
|
|
|
|
.section {
|
|
|
padding:30rpx 0;
|
|
|
+ padding-left:17rpx;
|
|
|
border-bottom: 1rpx solid #EEEEEE;
|
|
|
font-size: 24rpx;
|
|
|
color: #666666;
|
|
|
|
|
|
+ .icon {
|
|
|
+ margin-right:30rpx;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.article {
|
|
|
height:80rpx;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- margin-left:88rpx;
|
|
|
+ margin-left:72rpx;
|
|
|
font-size: 24rpx;
|
|
|
color: #666666;
|
|
|
border-bottom: 1rpx solid #EEEEEE;
|