基础管理-线路工程管理

This commit is contained in:
lSun 2025-04-29 15:01:29 +08:00
parent 541791b48b
commit 153e07d522
3 changed files with 22 additions and 1 deletions

View File

@ -3,6 +3,17 @@ let arr = ['background', 'web', 'mobile', 'wx'];
let background, web, mobile, wx;
let selectedFile = null; // 用于存储选中的文件
// 重置文件选择状态
function resetFileSelection() {
selectedFile = null;
// 重置WGS-84
$('#wgs84FileName').text('');
$('#wgs84FileBox').hide();
// 重置2000
$('#2000FileName').text('');
$('#2000FileBox').hide();
}
function setParams(params) {
console.log(params)
idParam = JSON.parse(params).id;
@ -28,6 +39,9 @@ function setParams(params) {
});
document.getElementById(system + '-template').classList.add('active');
document.getElementById(system + '-upload').classList.add('active');
// 重置文件选择状态
resetFileSelection();
});
});
@ -134,14 +148,21 @@ function setParams(params) {
layer.close(loadingMsg);
if (res.code === 200) {
layer.msg(res.data, {icon: 1});
closePage(1); // 关闭页面并刷新父页面
setTimeout(function() {
closePage(1);
},3000)
// 关闭页面并刷新父页面
} else {
layer.msg(res.data || '上传失败', {icon: 2});
// 上传失败时重置
resetFileSelection();
}
},
error: function() {
layer.close(loadingMsg);
layer.msg('上传出错', {icon: 2});
// 上传错误时重置
resetFileSelection();
}
});
});