From bd68e186226e2e0e971ecac557b6aa25fa536aee Mon Sep 17 00:00:00 2001
From: wk
Date: 星期二, 10 九月 2024 10:12:43 +0800
Subject: [PATCH] feat:门卫

---
 pages/quality-inspection-page/toc-sampling/toc-sampling.vue |   65 +++++++++++++++++++++++++++++++-
 1 files changed, 62 insertions(+), 3 deletions(-)

diff --git a/pages/quality-inspection-page/toc-sampling/toc-sampling.vue b/pages/quality-inspection-page/toc-sampling/toc-sampling.vue
index 71c1dbc..5737b28 100644
--- a/pages/quality-inspection-page/toc-sampling/toc-sampling.vue
+++ b/pages/quality-inspection-page/toc-sampling/toc-sampling.vue
@@ -7,11 +7,27 @@
           <h1>娣诲姞鍘熺洂TOC鍙栨牱</h1>
         </view>
       </view>
+      <u-empty
+          class="empty-box"
+          mode="data"
+          icon="http://cdn.uviewui.com/uview/empty/data.png"
+          textSize="30"
+          width="300"
+          height="300"
+          text="鏆傛棤鏁版嵁"
+          v-if="emptyShow">
+      </u-empty>
       <div class="edc-sampling-main-inside">
         <view class="edc-sampling-card" v-for="item in edcList" :key="item.id">
           <view class="edc-sampling-line">
             <h1>渚涘簲鍟嗭細{{item.customerName}}</h1>
+            <!--    #ifdef H5        -->
+            <view class="status" :class="statusClassComputed(item.status)" v-if="item.status">{{statusComputed(item.status)}}</view>
+            <!--    #endif   -->
+
+            <!--    #ifdef MP-WEIXIN -->
             <view class="status" v-if="item.status">{{statusComputed(item.status)}}</view>
+            <!--    #endif     -->
           </view>
           <view class="edc-sampling-line">
             <h2>閲囨牱鍦扮偣锛歿{item.bunkerName}}</h2>
@@ -56,11 +72,12 @@
   data() {
     return {
       edcList:[],
+      emptyShow:false, //绌洪〉闈㈡槸鍚︽樉绀�
       size:10,
       current:1,
       total:0,
       flag:false,
-      type:7,  //1 EDC銆�2 PVC銆�3 纭吀銆�4 姘㈡哀鍖栭挔 5 娑叉隘 6銆佸師鐩愰挋闀� 7銆佸師鐩怲OC 8銆佸師鐩愬叏妫�
+      type:7,  //1 EDC銆�2 鑱氭隘涔欑儻鏍戣剛銆�3 纭吀銆�4 姘㈡哀鍖栭挔 5 娑叉隘 6銆佸師鐩愰挋闀� 7銆佸師鐩怲OC 8銆佸師鐩愬叏妫�
     }
   },
   onShow() {
@@ -88,6 +105,27 @@
         return ''
       }
     },
+    /* #ifdef H5 */
+    statusClassComputed(status) {
+      if(status == 1) {
+        return 'blue'
+      }else if(status == 2) {
+        return 'red'
+      }else if(status == 3) {
+        return 'red'
+      }else if(status == 4) {
+        return 'red'
+      }else if(status == 5) {
+        return 'red'
+      }else if(status == 6) {
+        return 'red'
+      }else if(status == 7) {
+        return 'black'
+      }else {
+        return ''
+      }
+    },
+    /* #endif */
     async getPageList(callBack) {
       uni.showLoading({
         title: "鍔犺浇涓�"
@@ -105,6 +143,11 @@
         const res = await this.$reqGet('pageList',{current:this.current,size:this.size,type:this.type})
         uni.hideLoading()
         this.edcList = [...this.edcList,...res.data.records]
+        if(this.edcList == 0) {
+          this.emptyShow = true
+        }else {
+          this.emptyShow = false
+        }
         this.total = res.data.total
         callBack && callBack()
       }catch (err) {
@@ -236,13 +279,21 @@
           display: flex;
           align-self: baseline;
         }
+        .blue{
+          color: #184edd;
+          border: 1px solid #184edd;
+        }
         .red{
           color: #f56c6c;
           border: 1px solid #f56c6c;
         }
+        .black{
+          color: black;
+          border: 1px solid black;
+        }
         .yellow{
-          color: #f9ae3d;
-          border: 1px solid #f9ae3d;
+          color: #fcbd20;
+          border: 1px solid #fcbd20;
         }
       }
       .edc-sampling-btn-box{
@@ -270,6 +321,14 @@
       font-size: 30rpx;
       color: #999999;
     }
+    .empty-box{
+      margin: auto;
+      position: absolute;
+      top: 24%;
+      left: 50%;
+      transition: (50%, -50%);
+      transform: translate(-50%, -24%);
+    }
   }
 }
 </style>

--
Gitblit v1.9.1