htc 21 часов назад
Родитель
Сommit
17e638e372
2 измененных файлов с 19 добавлено и 4 удалено
  1. 5 1
      components/CusTeamUser/index.vue
  2. 14 3
      pagesPublish/questionnairePreview.vue

+ 5 - 1
components/CusTeamUser/index.vue

@@ -9,6 +9,8 @@
 					<view class="dialog-box-list-item-status" :class="{'wzd':item.status===0,'yzd':item.status===1}">{{statusCfg[item.status]}}</view>
 					<view class="dialog-box-list-item-name adfac">
 						<text>{{item.realName||''}}</text>
+					</view>
+					<view class="dialog-box-list-item-name">
 						<view class="type">{{item.categoryName||''}}</view>
 					</view>
 					<!-- <view class="dialog-box-list-item-email">{{item.emailTM||''}}</view> -->
@@ -154,9 +156,9 @@
 							font-size: 30rpx;
 							color: #002846;
 							line-height: 32rpx;
+							padding-left: 16rpx;
 						}
 						.type{
-							margin-left: 20rpx;
 							background: #FFF7DC;
 							border-radius: 20rpx;
 							padding: 5rpx 16rpx;
@@ -165,6 +167,8 @@
 							font-size: 22rpx;
 							color: #BA9B31;
 							line-height: 30rpx;
+							display: inline-block;
+							margin-top: 20rpx;
 						}
 					}
 					&-email{

+ 14 - 3
pagesPublish/questionnairePreview.vue

@@ -19,7 +19,16 @@
 				</div>
 			</div>
 			<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>
 		</view>
 		<view class="bottom adfacjb">
@@ -63,8 +72,10 @@
 				this.$api.get(`/core/questionnaire/${id}`).then(({data:res})=>{
 					if(res.code!==0) return this.$showToast(res.msg)
 					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;
 				})
 			},