|
@@ -19,7 +19,16 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
- <question-item v-for="(item,index) in list" :arrayKey="arrayKey" :index="index" :key="index" :item="item"></question-item>
|
|
|
|
|
|
|
+ <block v-if="list.length">
|
|
|
|
|
+ <question-item v-for="(item,index) in list" :arrayKey="arrayKey" :index="index" :key="index" :item="item"></question-item>
|
|
|
|
|
+ </block>
|
|
|
|
|
+ <block v-else>
|
|
|
|
|
+ <div class="loading-container adfacjc">
|
|
|
|
|
+ <div class="adfac">
|
|
|
|
|
+ <text style="margin-left: 10rpx; font-size: 34rpx; color: #666666">该问卷暂无选项</text>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </block>
|
|
|
</template>
|
|
</template>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="bottom adfacjb">
|
|
<view class="bottom adfacjb">
|
|
@@ -63,8 +72,10 @@
|
|
|
this.$api.get(`/core/questionnaire/${id}`).then(({data:res})=>{
|
|
this.$api.get(`/core/questionnaire/${id}`).then(({data:res})=>{
|
|
|
if(res.code!==0) return this.$showToast(res.msg)
|
|
if(res.code!==0) return this.$showToast(res.msg)
|
|
|
this.arrayKey = 'questionOption';
|
|
this.arrayKey = 'questionOption';
|
|
|
- this.list = res.data.detailList;
|
|
|
|
|
- this.total = res.data.detailList.length;
|
|
|
|
|
|
|
+ if(res.data){
|
|
|
|
|
+ this.list = res.data.detailList||[];
|
|
|
|
|
+ this.total = res.data.detailList.length;
|
|
|
|
|
+ }else
|
|
|
this.isLoading = false;
|
|
this.isLoading = false;
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|