lilei %!s(int64=4) %!d(string=hai) anos
pai
achega
7c826611cb

+ 12 - 4
pages/evaluatePlan/planDetail.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="kp-details">
 		<!-- 考评项 -->
-		<view class="kp-tabsBox">
+		<view class="kp-tabsBox" v-if="list.length">
 			<view class="kp-tabs">
 				<view 
 				v-for="(item,index) in list" 
@@ -18,8 +18,11 @@
 				</view>
 			</view>
 		</view>
+		<view style="width: 100%;padding-top: 10vh;" v-if="noDateText!=''">
+			<u-empty :text="noDateText" img-width="120"  mode="list"></u-empty>
+		</view>
 		<!-- 选择按钮 -->
-		<view class="kp-ok" @click="kpOk">
+		<view class="kp-ok" v-if="list.length" @click="kpOk">
 			确认选择该考评方案
 		</view>
 	</view>
@@ -32,16 +35,21 @@
 			return {
 				list: [],
 				activeIndx:0,
-				item:''
+				item:'',
+				noDateText:''
 			}
 		},
 		onLoad(opts) {
 			this.item = JSON.parse(opts.item)
+			console.log({schemeId:this.item.id})
 			// 查询方案的项
 			queryItemBySchemeId({schemeId:this.item.id}).then(res=>{
-				console.log(res.data)
+				console.log(res)
 				if(res.status == 200){
 					this.list = res.data
+					this.noDateText = this.list.length?'':'暂无考评项'
+				}else{
+					this.noDateText = res.message
 				}
 			})
 		},

+ 2 - 2
pages/spotCheckDetails/spotCheckDetails.vue

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