本帖最后由 manabout 于 2016-11-25 17:24 编辑
function loadImage() {
var file = document.getElementById("file");
//图片上传到数据库
$('#attachForm').ajaxSubmit({
url: '/emp/system/announcement/attach/',
type: 'post',
success: function(data) {},
});
var reader = new FileReader();
reader.onload = function(e){
$("#preview").src = e.target.result;
sheet.removePicture("f2");
if (reviewData.modelTypeName == "塑模") {
sheet.addPicture("f2",e.target.result,6,17,12,22);
} else {
sheet.addPicture("f2",e.target.result,5,17,12,24);
}
document.getElementById('preview').src = e.target.result;
if (viewer) {
viewer.destroy();
}
viewer = new Viewer(document.getElementById('preview'), {});
}
reader.readAsDataURL(file.files[0]);
}
--------------------------------------------------------------------------------------
为什么上面的代码将图片加到sheet中,下载下来之后没有图片?同一条数据用.net平台下载就没有问题,用在线导出就有问题?
|