|
@@ -30,23 +30,24 @@
|
|
|
</view>
|
|
|
<view class="title-list" v-if="current == 1">
|
|
|
<view class="content">
|
|
|
- <view class="list" v-for="(item1,index1) in bankList">
|
|
|
- <template v-if="item1.type==3">
|
|
|
- <view class="module" @click="clickModule" :data-id="item1.id" :data-index="index1">
|
|
|
+ <view class="list" v-for="(item1,index1) in bankList" :key="'index1'+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" @click="changeItem" :data-index1="index1" :data-index2="index2" :data-id="item2.id" :data-type="item1.type">
|
|
|
+ <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,index1) in item2.list">
|
|
|
+ <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.id">
|
|
|
- <view v-if="index1 == 0" class="btn">试做</view>
|
|
|
+ <navigator :url="'/pages2/bank/questionBankTest?id='+article.majorId">
|
|
|
+ <view v-if="index3 == 0" class="btn">试做</view>
|
|
|
</navigator>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -56,15 +57,15 @@
|
|
|
</template>
|
|
|
|
|
|
<template v-if="item1.type ==2">
|
|
|
- <view class="section" :data-index1="index1" @click="changeItem" :data-type="item1.type">
|
|
|
+ <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>
|
|
|
- 2Z106010 施工承发包的模式-2Z106020 施工合同...
|
|
|
+ {{item1.name}}
|
|
|
</view>
|
|
|
<view v-if="item1.showList" >
|
|
|
- <view class="article" :class="{active:index1 == 0}" v-for="(article,index1) in item1.list">
|
|
|
- 施工承发包模式-施工合同与物资采购合同二
|
|
|
- <navigator :url="'/pages2/bank/questionBankTest'+article.id">
|
|
|
+ <view class="article" :class="{active:index2 == 0}" :key="'parentIndex2'+index3" v-for="(article,index2) in item1.list">
|
|
|
+ {{item1.name}}
|
|
|
+ <navigator :url="'/pages2/bank/questionBankTest?id='+article.majorId">
|
|
|
<view v-if="index1 == 0" class="btn">试做</view>
|
|
|
</navigator>
|
|
|
|
|
@@ -72,11 +73,11 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
- <template v-if="item1.type ==1">
|
|
|
+ <template v-if="item1.type ==3">
|
|
|
<view class="article active" >
|
|
|
{{item1.name}}
|
|
|
|
|
|
- <navigator :url="'/pages2/bank/questionBankTest?id='+item1.id">
|
|
|
+ <navigator :url="'/pages2/bank/questionBankTest?id='+item1.majorId">
|
|
|
<view class="btn">试做</view>
|
|
|
</navigator>
|
|
|
|
|
@@ -150,25 +151,13 @@ export default {
|
|
|
}).then(res => {
|
|
|
console.log(res)
|
|
|
this.bankList = res.data.data;
|
|
|
- res.data.data.forEach(bank => {
|
|
|
- // if(bank.type == 3) {
|
|
|
- // this.goodsChapterList(bank,bank.id)
|
|
|
- // }
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
-
|
|
|
})
|
|
|
},
|
|
|
goodsChapterList(bank,id) {
|
|
|
this.$api.goodsChapterList({
|
|
|
moduleExamId:id
|
|
|
}).then(res => {
|
|
|
- this.$set(bank,'list',[{
|
|
|
- name:'章卷',
|
|
|
- showList:false,
|
|
|
- id:1
|
|
|
- }])
|
|
|
+ this.$set(bank,'list',res.data.data)
|
|
|
|
|
|
})
|
|
|
},
|
|
@@ -177,7 +166,6 @@ export default {
|
|
|
let index = e.currentTarget.dataset.index;
|
|
|
let id = e.currentTarget.dataset.id;
|
|
|
|
|
|
- console.log(this.bankList)
|
|
|
|
|
|
if(this.bankList[index].list) {
|
|
|
this.$set(this.bankList[index],'showList',!this.bankList[index].showList)
|
|
@@ -187,12 +175,11 @@ 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',[{
|
|
|
- name:'章卷',
|
|
|
- showList:false,
|
|
|
- id:1
|
|
|
- }])
|
|
|
+ this.$set(this.bankList[index],'list',res.data.data)
|
|
|
|
|
|
})
|
|
|
},
|
|
@@ -234,13 +221,13 @@ export default {
|
|
|
let id = e.currentTarget.dataset.id
|
|
|
let type = e.currentTarget.dataset.type
|
|
|
|
|
|
- if(type == 3) {
|
|
|
- if(this.bankList[index1].list[index2].list) {
|
|
|
+ if(type == 1) {
|
|
|
+ if(this.bankList[index1].list[index2].list.length) {
|
|
|
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,
|
|
|
- }])
|
|
|
+ // this.$set(this.bankList[index1].list[index2],'list',[{
|
|
|
+ // name:'试卷',
|
|
|
+ // id:2,
|
|
|
+ // }])
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -254,16 +241,13 @@ export default {
|
|
|
// this.bankList = res.data.data;
|
|
|
|
|
|
this.$set(this.bankList[index1].list[index2],'showList',true)
|
|
|
- this.$set(this.bankList[index1].list[index2],'list',[{
|
|
|
- name:'试卷',
|
|
|
- id:2,
|
|
|
- }])
|
|
|
+ this.$set(this.bankList[index1].list[index2],'list',res.data.data)
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
} else if(type == 2) {
|
|
|
- if(this.bankList[index1].list) {
|
|
|
+ if(this.bankList[index1].list.length) {
|
|
|
this.$set(this.bankList[index1],'showList',!this.bankList[index1].showList)
|
|
|
return;
|
|
|
}
|
|
@@ -278,10 +262,7 @@ export default {
|
|
|
// this.bankList = res.data.data;
|
|
|
|
|
|
this.$set(this.bankList[index1],'showList',true)
|
|
|
- this.$set(this.bankList[index1],'list',[{
|
|
|
- name:'试卷',
|
|
|
- id:2,
|
|
|
- }])
|
|
|
+ this.$set(this.bankList[index1],'list',res.data.data)
|
|
|
|
|
|
|
|
|
})
|