From 698f5aab0ece28d3c382a8376e90e6482856c208 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期二, 14 十月 2025 16:15:42 +0800
Subject: [PATCH] 修改刀具翻页逻辑
---
components/mold.vue | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/components/mold.vue b/components/mold.vue
index 170dff5..38e917b 100644
--- a/components/mold.vue
+++ b/components/mold.vue
@@ -114,7 +114,7 @@
machineNo: '',//鏈哄彴缂栫爜
workOrderNo: '',//宸ュ崟鍙�
pageIndex: 1,
- pageSize: 20,
+ pageSize: 18,
total: 0,
toolList: [],
selectedToolNo: '',
@@ -397,8 +397,11 @@
});
this.toolRecords = mapped;
- const totalFromRes = Number(res.totalCount ?? res.data?.total ?? res.data?.totalCount ?? this.toolRecords.length);
- this.total = Number.isFinite(totalFromRes) ? totalFromRes : this.toolRecords.length;
+ // 淇敼 fetchTools 鏂规硶涓� total 鐨勮祴鍊奸�昏緫
+ const totalFromRes = Number(
+ res.data?.total ?? res.data?.totalCount ?? res.totalCount ?? mapped.length
+ );
+ this.total = Number.isFinite(totalFromRes) ? totalFromRes : mapped.length;
} catch (error) {
console.error('鑾峰彇琛ㄥ崟鏁版嵁閿欒:', error);
this.$showMessage('鑾峰彇鏁版嵁澶辫触锛岃妫�鏌ョ綉缁滆繛鎺�');
--
Gitblit v1.9.3