基础管理-线路工程管理
This commit is contained in:
parent
320c89fffd
commit
5f52b0d8b3
|
|
@ -2,6 +2,7 @@ let form, layer, util,laydate, idParam, phoneParam,proId;
|
||||||
let arr = ['background', 'web', 'mobile', 'wx'];
|
let arr = ['background', 'web', 'mobile', 'wx'];
|
||||||
let background, web, mobile, wx;
|
let background, web, mobile, wx;
|
||||||
let selectedFile = null; // 用于存储选中的文件
|
let selectedFile = null; // 用于存储选中的文件
|
||||||
|
let uploadInst84, uploadInst2000; // 存储上传实例
|
||||||
|
|
||||||
// 重置文件选择状态
|
// 重置文件选择状态
|
||||||
function resetFileSelection() {
|
function resetFileSelection() {
|
||||||
|
|
@ -12,6 +13,10 @@ function resetFileSelection() {
|
||||||
// 重置2000
|
// 重置2000
|
||||||
$('#2000FileName').text('');
|
$('#2000FileName').text('');
|
||||||
$('#2000FileBox').hide();
|
$('#2000FileBox').hide();
|
||||||
|
|
||||||
|
// 重新渲染上传组件
|
||||||
|
uploadInst84.reload();
|
||||||
|
uploadInst2000.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
function setParams(params) {
|
function setParams(params) {
|
||||||
|
|
@ -60,7 +65,7 @@ function setParams(params) {
|
||||||
})
|
})
|
||||||
|
|
||||||
// WGS-84坐标系文件上传
|
// WGS-84坐标系文件上传
|
||||||
upload.render({
|
uploadInst84 = upload.render({
|
||||||
elem: '#uploadFileWGS84',
|
elem: '#uploadFileWGS84',
|
||||||
auto: false,
|
auto: false,
|
||||||
accept: 'file',
|
accept: 'file',
|
||||||
|
|
@ -85,7 +90,7 @@ function setParams(params) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// 2000国家大地坐标系文件上传
|
// 2000国家大地坐标系文件上传
|
||||||
upload.render({
|
uploadInst2000 = upload.render({
|
||||||
elem: '#uploadFile2000',
|
elem: '#uploadFile2000',
|
||||||
auto: false,
|
auto: false,
|
||||||
accept: 'file',
|
accept: 'file',
|
||||||
|
|
@ -154,15 +159,13 @@ function setParams(params) {
|
||||||
// 关闭页面并刷新父页面
|
// 关闭页面并刷新父页面
|
||||||
} else {
|
} else {
|
||||||
layer.msg(res.msg || '上传失败', {icon: 2});
|
layer.msg(res.msg || '上传失败', {icon: 2});
|
||||||
// 上传失败时重置
|
resetFileSelection(); // 重置文件选择状态
|
||||||
resetFileSelection();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function() {
|
error: function() {
|
||||||
layer.close(loadingMsg);
|
layer.close(loadingMsg);
|
||||||
layer.msg('上传出错', {icon: 2});
|
layer.msg('上传出错', {icon: 2});
|
||||||
// 上传错误时重置
|
resetFileSelection(); // 重置文件选择状态
|
||||||
resetFileSelection();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue