Browse Source

异常数据时增加空状态

Administrator 7 years ago
parent
commit
a31e32441f
1 changed files with 21 additions and 1 deletions
  1. 21 1
      components/supplier/resource.vue

+ 21 - 1
components/supplier/resource.vue

@@ -15,7 +15,7 @@
     <div class="user_info">
       <div class="user_title">
         <div class="user_name">
-          <span>{{enUser.enName}}&nbsp;&nbsp;<i class="fa fa-angle-down"></i></span>
+          <span>{{enUser.enName ? enUser.enName : '企业名称'}}&nbsp;&nbsp;<i class="fa fa-angle-down"></i></span>
           <a :href="/store/+ storeInfo.uuid" target="_blank" v-if="storeInfo.uuid">进入店铺</a>
         </div>
         <div class="user_mes">
@@ -91,6 +91,13 @@
           </tr>
         </tbody>
       </table>
+      <div class="empty" v-if="!list.content || list.content.length === 0">
+        <img src="/images/supplier/icon/empty.png">
+        <div class="info">
+          <p>暂无物料信息</p>
+          <a href="javascript:history.go(-1)"><i class="fa fa-reply" style="margin-right:5px;"></i>返回上一页</a>
+        </div>
+      </div>
       <div style="float: right;background: #ecf1f1;">
         <page :total="list.totalElements" :page-size="pageParams.count"
               :current="pageParams.page" v-on:childEvent="handleCurrentChange">
@@ -621,6 +628,19 @@
   }
   .info_list{
     padding-bottom:200px;
+    .empty{
+      background: #ffffff;
+      text-align: center;
+      padding: 80px 0;
+      img{
+        vertical-align: top;
+        margin-right:15px;
+      }
+      .info{
+        display: inline-block;
+        padding-top:10px;
+      }
+    }
     table {
       table-layout: fixed;
       thead{