快乐的昕的电脑
2025-10-14 698f5aab0ece28d3c382a8376e90e6482856c208
修改刀具翻页逻辑
已修改1个文件
9 ■■■■■ 文件已修改
components/mold.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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('获取数据失败,请检查网络连接');