chengjie 5 months ago
parent
commit
ffc9ae99a4
1 changed files with 5 additions and 13 deletions
  1. 5 13
      public/mg/kylx365_db_admin.html

+ 5 - 13
public/mg/kylx365_db_admin.html

@@ -1297,21 +1297,13 @@
1297 1297
                         console.log('计算的起始索引:', startIndex);
1298 1298
                         console.log('计算的结束索引:', endIndex);
1299 1299
 
1300
-                        // 确保数据是普通对象数组
1301
-                        const slicedData = this.allResults.slice(startIndex, endIndex);
1302
-                        this.queryResults = slicedData.map(item => {
1303
-                            // 确保每个属性都是基本类型
1304
-                            const plainItem = {};
1305
-                            Object.keys(item).forEach(key => {
1306
-                                plainItem[key] = item[key] !== null && item[key] !== undefined 
1307
-                                    ? String(item[key]) 
1308
-                                    : '';
1309
-                            });
1310
-                            return plainItem;
1311
-                        });
1300
+                        // 直接使用原始数据,不进行转换
1301
+                        this.queryResults = this.allResults.slice(startIndex, endIndex);
1312 1302
                         
1313 1303
                         console.log('当前页数据数量:', this.queryResults.length);
1314
-                        console.log('第一条记录:', JSON.stringify(this.queryResults[0]));
1304
+                        if (this.queryResults.length > 0) {
1305
+                            console.log('第一条记录:', JSON.stringify(this.queryResults[0]));
1306
+                        }
1315 1307
                         
1316 1308
                         // 强制Vue更新视图
1317 1309
                         this.$forceUpdate();