فهرست منبع

无数据提示

lilei 4 سال پیش
والد
کامیت
1d8fcb06d4
2فایلهای تغییر یافته به همراه30 افزوده شده و 21 حذف شده
  1. 27 21
      pages/shopTourDetails/shopTourDetails.vue
  2. 3 0
      pages/spotCheckDetails/spotCheckDetails.vue

+ 27 - 21
pages/shopTourDetails/shopTourDetails.vue

@@ -1,25 +1,29 @@
 <template>
 <template>
-	<view class="shopTourDetails-wrap">
-		<scroll-view scroll-y class="scroll-con-l">
-			<view class="item-con" v-for="(item, index) in itemList" :key="index">
-				<view :class="['item-tit', nowInd==index ? 'active' : '']" @click="changeType(index)">{{item.assessItemName}}</view>
-			</view>
-		</scroll-view>
-		<scroll-view scroll-y class="scroll-con-r">
-			<view class="item-con" v-for="(item, index) in evaluationItemsList" :key="index">
-				<view class="item-tit">{{item.assessTargetName}}</view>
-				<view class="item-main">
-					<view class="item-state">状态:
-						<text :class="item.result == 'PASS' ? 'green' : item.result == 'NOT_PASS' ? 'red' : item.result == 'NOT_WORK' ? 'yellow' : ''">{{item.resultDictValue}}</text>
+	<view class="shopTourDetails">
+		<view class="shopTourDetails-wrap">
+			<scroll-view scroll-y class="scroll-con-l">
+				<view class="item-con" v-for="(item, index) in itemList" :key="index">
+					<view :class="['item-tit', nowInd==index ? 'active' : '']" @click="changeType(index)">{{item.assessItemName}}</view>
+				</view>
+			</scroll-view>
+			<scroll-view scroll-y class="scroll-con-r">
+				<view class="item-con" v-for="(item, index) in evaluationItemsList" :key="index">
+					<view class="item-tit">{{item.assessTargetName}}</view>
+					<view class="item-main">
+						<view class="item-state">状态:
+							<text :class="item.result == 'PASS' ? 'green' : item.result == 'NOT_PASS' ? 'red' : item.result == 'NOT_WORK' ? 'yellow' : ''">{{item.resultDictValue}}</text>
+						</view>
+						<text v-if="item.comments || item.taskTargetPhotoList" class="item-btn" @click="getComments(item)">查看评论</text>
 					</view>
 					</view>
-					<text v-if="item.comments || item.taskTargetPhotoList" class="item-btn" @click="getComments(item)">查看评论</text>
+					<!-- <view class="item-footer">
+						考核时间:2020-09-09 14:29
+					</view> -->
 				</view>
 				</view>
-				<!-- <view class="item-footer">
-					考核时间:2020-09-09 14:29
-				</view> -->
-			</view>
-			<u-empty text="暂无数据" img-width="120" v-if="evaluationItemsList.length == 0" mode="list"></u-empty>
-		</scroll-view>
+			</scroll-view>
+		</view>
+		<view style="width: 100%;padding-top: 10vh;">
+			<u-empty text="暂无数据" img-width="120" v-if="itemList.length == 0" mode="list"></u-empty>
+		</view>
 		<!-- 查看评论 -->
 		<!-- 查看评论 -->
 		<comment-popup :openPopup="openPopup" :comments="comments" :taskTargetPhotoList="taskTargetPhotoList" @close="closePopup" />
 		<comment-popup :openPopup="openPopup" :comments="comments" :taskTargetPhotoList="taskTargetPhotoList" @close="closePopup" />
 	</view>
 	</view>
@@ -50,10 +54,12 @@
 			//  获取详情
 			//  获取详情
 			getTaskItem(){
 			getTaskItem(){
 				getTaskItem({ id: this.taskId }).then(res => {
 				getTaskItem({ id: this.taskId }).then(res => {
-					if(res.status == 200){
+					if(res.status == 200&&res.data){
 						this.itemList = res.data
 						this.itemList = res.data
 						this.nowInd = 0
 						this.nowInd = 0
-						this.evaluationItemsList = this.itemList[this.nowInd].taskTargetVOList ? this.itemList[this.nowInd].taskTargetVOList : []
+						if(this.itemList.length){
+							this.evaluationItemsList = this.itemList[this.nowInd].taskTargetVOList ? this.itemList[this.nowInd].taskTargetVOList : []
+						}
 					}
 					}
 				})
 				})
 			},
 			},

+ 3 - 0
pages/spotCheckDetails/spotCheckDetails.vue

@@ -19,6 +19,9 @@
 				<view class="comment-main" v-else>评论:--</view>
 				<view class="comment-main" v-else>评论:--</view>
 			</view>
 			</view>
 		</view>
 		</view>
+		<view style="width: 100%;padding-top: 10vh;">
+			<u-empty text="暂无数据" img-width="120" v-if="list.length == 0" mode="list"></u-empty>
+		</view>
 	</view>
 	</view>
 </template>
 </template>