diff --git a/src/main/resources/static/js/basic/lineManagement/child/importTower.js b/src/main/resources/static/js/basic/lineManagement/child/importTower.js index c0fc875..c99d01e 100644 --- a/src/main/resources/static/js/basic/lineManagement/child/importTower.js +++ b/src/main/resources/static/js/basic/lineManagement/child/importTower.js @@ -2,6 +2,7 @@ let form, layer, util,laydate, idParam, phoneParam,proId; let arr = ['background', 'web', 'mobile', 'wx']; let background, web, mobile, wx; let selectedFile = null; // 用于存储选中的文件 +let uploadInst84, uploadInst2000; // 存储上传实例 // 重置文件选择状态 function resetFileSelection() { @@ -12,6 +13,10 @@ function resetFileSelection() { // 重置2000 $('#2000FileName').text(''); $('#2000FileBox').hide(); + + // 重新渲染上传组件 + uploadInst84.reload(); + uploadInst2000.reload(); } function setParams(params) { @@ -60,7 +65,7 @@ function setParams(params) { }) // WGS-84坐标系文件上传 - upload.render({ + uploadInst84 = upload.render({ elem: '#uploadFileWGS84', auto: false, accept: 'file', @@ -85,7 +90,7 @@ function setParams(params) { }); // 2000国家大地坐标系文件上传 - upload.render({ + uploadInst2000 = upload.render({ elem: '#uploadFile2000', auto: false, accept: 'file', @@ -154,15 +159,13 @@ function setParams(params) { // 关闭页面并刷新父页面 } else { layer.msg(res.msg || '上传失败', {icon: 2}); - // 上传失败时重置 - resetFileSelection(); + resetFileSelection(); // 重置文件选择状态 } }, error: function() { layer.close(loadingMsg); layer.msg('上传出错', {icon: 2}); - // 上传错误时重置 - resetFileSelection(); + resetFileSelection(); // 重置文件选择状态 } }); });