| | |
| | | machineNo: '',//机台编码 |
| | | workOrderNo: '',//工单号 |
| | | pageIndex: 1, |
| | | pageSize: 20, |
| | | pageSize: 18, |
| | | total: 0, |
| | | toolList: [], |
| | | selectedToolNo: '', |
| | |
| | | }); |
| | | |
| | | 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('获取数据失败,请检查网络连接'); |