GuoYuFu123 5 years ago
parent
commit
2bf10bc063

+ 10 - 2
src/components/ledger/handsontables/assets.vue

@@ -75,10 +75,14 @@
       @change="changePics"
     ></pic-dialog>
     <div
-      v-show="!main || !main.length"
+      v-show="!mess.deviceId && (!main || !main.length)"
       style="width:100%;text-align:center;font-size:30px;color:gray;"
     >请选择设备族</div>
-    <div v-show="main && main.length" v-loading="loading" id="handsontable" ref="handsontable"></div>
+    <div class="center" v-show="mess.deviceId && (!main || !main.length)">
+        <i class="iconwushuju iconfont"></i>
+        暂无数据
+    </div>
+    <div v-show="mess.deviceId && main && main.length" v-loading="loading" id="handsontable" ref="handsontable"></div>
     <div class='right'>
         <my-pagination v-show="main && main.length" @change="getMain" :page="page"></my-pagination>
     </div>
@@ -306,6 +310,7 @@ export default {
             _this.updateScrapDate(list)
           }
           _this.main = res.Content
+          console.log(_this.main,'guoguo')
           _this.copyMain = tools.deepCopy(res.Content)
           _this.page.total = res.Count
           if (!!_this.hot) {
@@ -315,6 +320,9 @@ export default {
           if (!!res.Content && res.Content.length) {
             _this.initHot();
           }
+        }else{
+            _this.main = res.Content
+            _this.page.total = res.Count
         }
         this.loading = false
       })

+ 12 - 4
src/components/ledger/handsontables/device.vue

@@ -79,12 +79,20 @@
       @change="changePics"
     ></pic-dialog>
     <system-type :infos="systemId" :graphyId="graphyId" :dialog="dialog"></system-type>
-    <div
+    <!-- <div
       v-show="!main || !main.length"
       style="width:100%;text-align:center;font-size:30px;color:gray;"
-    >{{ mess.deviceId ? '请选择设备族' : '无设备'}}</div>
-    <div v-show="main && main.length" v-loading="loading" id="handsontable" ref="handsontable"></div>
-    <div  v-show="main && main.length" class="right">
+    >{{ mess.deviceId ? '请选择设备族' : '无设备'}}</div> -->
+        <div
+      v-show="!mess.deviceId && (!main || !main.length)"
+      style="width:100%;text-align:center;font-size:30px;color:gray;"
+    >请选择设备族</div>
+    <div class="center" v-show="mess.deviceId && (!main || !main.length)">
+        <i class="iconwushuju iconfont"></i>
+        暂无数据
+    </div>
+    <div v-show="mess.deviceId && main && main.length" v-loading="loading" id="handsontable" ref="handsontable"></div>
+    <div  v-show="mess.deviceId && main && main.length" class="right">
         <my-pagination @change="getMain" :page="page"></my-pagination>
     </div>
     <dialog-assets

+ 11 - 3
src/components/ledger/handsontables/system.vue

@@ -50,13 +50,21 @@
     <maintainer-dialog @changeMaintainer="changeMaintainer" ref="maintainer" :dialog="dialog"></maintainer-dialog>
     <insurer-dialog @changeInsurer="changeInsurer" ref="insurer" :dialog="dialog"></insurer-dialog>
     <pic-dialog :dialog="dialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
-    <div
+    <!-- <div
       v-show="!main || !main.length"
       style="width:100%;text-align:center;font-size:30px;color:gray;"
+    >请选择系统类型</div> -->
+            <div
+      v-show="!mess.deviceId && (!main || !main.length)"
+      style="width:100%;text-align:center;font-size:30px;color:gray;"
     >请选择系统类型</div>
-    <div v-show="main && main.length" v-loading="loading" id="handsontable" ref="handsontable"></div>
+    <div class="center" v-show="mess.deviceId && (!main || !main.length)">
+        <i class="iconwushuju iconfont"></i>
+        暂无数据
+    </div>
+    <div v-show="mess.deviceId && main && main.length" v-loading="loading" id="handsontable" ref="handsontable"></div>
     <div class="right">
-        <my-pagination v-show="main && main.length" @change="getMain" :page="page"></my-pagination>
+        <my-pagination v-show="mess.deviceId && main && main.length" @change="getMain" :page="page"></my-pagination>
     </div>
     <dialog-assets
       :assetType="[this.mess.deviceId]"