| | |
| | | $that._listAssetImportLogDetails(_currentPage, DEFAULT_ROWS); |
| | | }); |
| | | }, |
| | | _destroyedMethod: function() { |
| | | console.log('导入日志详情页面已销毁,清理资源'); |
| | | // 重置状态,避免组件销毁后仍有代码访问组件数据 |
| | | $that = null; |
| | | }, |
| | | methods: { |
| | | _openDelRoomModel: function(content) { |
| | | // 解析 JSON 字符串 |
| | |
| | | vc.http.apiGet('/assetImportLogDetail/queryAssetImportLogDetail', |
| | | params, |
| | | function(json, res) { |
| | | // 检查组件是否已销毁 |
| | | if (!$that) { |
| | | console.log('组件已销毁,跳过日志详情处理'); |
| | | return; |
| | | } |
| | | |
| | | console.log('查询日志详情响应:', json); |
| | | try { |
| | | // 检查响应是否为空 |
| | |
| | | } |
| | | }, |
| | | function(errInfo, error) { |
| | | // 检查组件是否已销毁 |
| | | if (!$that) { |
| | | console.log('组件已销毁,跳过日志详情错误处理'); |
| | | return; |
| | | } |
| | | |
| | | console.log('请求日志详情失败:', errInfo, error); |
| | | |
| | | // 如果是网络错误或超时,且重试次数未达上限,则重试 |