|
|
|
@ -117,12 +117,13 @@
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
, done: function (res) {
|
|
|
|
|
layer.close(layer.msg());//关闭上传提示窗口
|
|
|
|
|
layer.close(layer.msg());//关闭上传提示窗口
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
|
|
|
|
//上传完毕
|
|
|
|
|
$('#uploader-list-' + res.input_id).append(
|
|
|
|
|
'<div id="" class="file-iteme">' +
|
|
|
|
|
'<div class="handle"><i class="layui-icon layui-icon-delete"></i></div>' +
|
|
|
|
|
'<div id="' + res.file_id + '" class="file-iteme">' +
|
|
|
|
|
'<div class="handle"><i class="layui-icon layui-icon-delete" onclick=delimgs("' + res.file_id + '")></i></div>' +
|
|
|
|
|
'<img style="width: 100px;height: 100px;" src=/QingLong' + res.url + '>' +
|
|
|
|
|
'</div>'
|
|
|
|
|
);
|
|
|
|
@ -163,7 +164,7 @@
|
|
|
|
|
tr.find('.demo-delete').on('click', function () {
|
|
|
|
|
delete files[index]; //删除对应的文件
|
|
|
|
|
tr.remove();
|
|
|
|
|
uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选
|
|
|
|
|
// uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
that.elemList.append(tr);
|
|
|
|
@ -261,11 +262,10 @@
|
|
|
|
|
'</tr>'
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
$('#uploader-list-' + res.data[i].input_id).append(
|
|
|
|
|
'<div id="" class="file-iteme">' +
|
|
|
|
|
'<div class="handle"><i class="layui-icon layui-icon-delete"></i></div>' +
|
|
|
|
|
'<div id="' + res.data[i].file_id + '" class="file-iteme">' +
|
|
|
|
|
'<div class="handle"><i class="layui-icon layui-icon-delete" onclick=delimgs("' + res.data[i].file_id + '")></i></div>' +
|
|
|
|
|
'<img style="width: 100px;height: 100px;" src=/QingLong/Excel/' + res.data[i].file_id + '.' + res.data[i].suffix + '>' +
|
|
|
|
|
'</div>'
|
|
|
|
|
);
|
|
|
|
@ -308,6 +308,33 @@
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
window.delimgs = function (file_id) {
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: '/QingLong/collect/delUploadFile',
|
|
|
|
|
type: 'post',
|
|
|
|
|
data: {
|
|
|
|
|
"job_id": jobId,
|
|
|
|
|
"file_id": file_id
|
|
|
|
|
},
|
|
|
|
|
success: function (result) {
|
|
|
|
|
if (result.success) {
|
|
|
|
|
layer.msg("成功!", {
|
|
|
|
|
icon: 1,
|
|
|
|
|
time: 1000
|
|
|
|
|
}, function () {
|
|
|
|
|
$('#' + file_id).remove();
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(result.message, {
|
|
|
|
|
icon: 2,
|
|
|
|
|
time: 2000
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
window.delfiles = function (file_id, file_input_id) {
|
|
|
|
|
event.preventDefault();
|
|
|
|
|
|
|
|
|
@ -336,7 +363,7 @@
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|