Browse Source

【3242】【系统DVP】基本信息-日志管理,没有数据时,分页显示有1条记录

zhoushiyue 10 months ago
parent
commit
5b9dd34c57

+ 7 - 2
src/views/fullVehicle/baseInfo/logManagent/index.vue

@@ -105,8 +105,13 @@ export default {
           if (!res.flag) {
             this.$notification.error({ message: res.message });
           }
-          _this.logManagementData = res.data.data || [];
-          _this.pagination.total = res.data.total || 0;
+          if (res.data && res.data.data) {
+            _this.logManagementData = res.data.data;
+            _this.pagination.total = res.data.total;
+          }else {
+            _this.logManagementData = [];
+            _this.pagination.total = 0
+          }
           _this.each(_this.logManagementData);
         }).finally(() => {
           _this.loading = false;

+ 7 - 2
src/views/systemDVP/baseInfo/logManagent/index.vue

@@ -124,8 +124,13 @@ export default {
           if (!res.flag) {
             this.$notification.error({ message: res.message });
           } else {
-            _this.loginManagentData = res.data.data || [];
-            _this.pagination.total = res.data.total !== null && res.data.total !== undefined ? res.data.total : 0;
+            if (res.data && res.data.data) {
+              _this.loginManagentData = res.data.data
+              _this.pagination.total = res.data.total;
+            }else {
+              _this.loginManagentData = [];
+              _this.pagination.total = 0
+            }
             _this.each(_this.loginManagentData);
           }
         })