Commit fe9f1776 authored by 高飞's avatar 高飞

将BMP单独拉出展示

parent 324c7b51
...@@ -548,7 +548,7 @@ export default { ...@@ -548,7 +548,7 @@ export default {
// item.imgUrl = 'api/rest/file/viewPicture/DocumentPicture?objectName=' + item.file.uuid + '&' + new Date().getTime(); // item.imgUrl = 'api/rest/file/viewPicture/DocumentPicture?objectName=' + item.file.uuid + '&' + new Date().getTime();
// } // }
if (img_type) { if (img_type) {
if (item.file.type.toUpperCase() == 'BMP' || item.file.type.toUpperCase() == "JPEG" || item.file.type.toUpperCase() == "JPG" || item.file.type.toUpperCase() == "PNG") { if (item.file.type.toUpperCase() == "JPEG" || item.file.type.toUpperCase() == "JPG" || item.file.type.toUpperCase() == "PNG") {
item.imgUrl = 'api/rest/file/viewPicture/Document?objectName=' + item.file.uuid + '&' + new Date().getTime(); item.imgUrl = 'api/rest/file/viewPicture/Document?objectName=' + item.file.uuid + '&' + new Date().getTime();
}else if(item.file.type.toUpperCase() == 'PSD'){ }else if(item.file.type.toUpperCase() == 'PSD'){
PSD.fromURL(item.imgUrl).then(function (psd) { PSD.fromURL(item.imgUrl).then(function (psd) {
...@@ -563,6 +563,10 @@ export default { ...@@ -563,6 +563,10 @@ export default {
item.imgUrl = tiff.toDataURL(); item.imgUrl = tiff.toDataURL();
}; };
xhr.send(); xhr.send();
}else if(item.file.type.toUpperCase() == 'BMP'){
_this.convertBMPtoPNG(item.imgUrl, function (pngImage) {
item.imgUrl = pngImage;
});
} }
} }
}) })
......
...@@ -548,7 +548,7 @@ export default { ...@@ -548,7 +548,7 @@ export default {
// item.imgUrl = 'api/rest/file/viewPicture/DocumentPicture?objectName=' + item.file.uuid + '&' + new Date().getTime(); // item.imgUrl = 'api/rest/file/viewPicture/DocumentPicture?objectName=' + item.file.uuid + '&' + new Date().getTime();
// } // }
if (img_type) { if (img_type) {
if (item.file.type.toUpperCase() == 'BMP' || item.file.type.toUpperCase() == "JPEG" || item.file.type.toUpperCase() == "JPG" || item.file.type.toUpperCase() == "PNG") { if (item.file.type.toUpperCase() == "JPEG" || item.file.type.toUpperCase() == "JPG" || item.file.type.toUpperCase() == "PNG") {
item.imgUrl = 'api/rest/file/viewPicture/Document?objectName=' + item.file.uuid + '&' + new Date().getTime(); item.imgUrl = 'api/rest/file/viewPicture/Document?objectName=' + item.file.uuid + '&' + new Date().getTime();
}else if(item.file.type.toUpperCase() == 'PSD'){ }else if(item.file.type.toUpperCase() == 'PSD'){
PSD.fromURL(item.imgUrl).then(function (psd) { PSD.fromURL(item.imgUrl).then(function (psd) {
...@@ -563,6 +563,10 @@ export default { ...@@ -563,6 +563,10 @@ export default {
item.imgUrl = tiff.toDataURL(); item.imgUrl = tiff.toDataURL();
}; };
xhr.send(); xhr.send();
}else if(item.file.type.toUpperCase() == 'BMP'){
_this.convertBMPtoPNG(item.imgUrl, function (pngImage) {
item.imgUrl = pngImage;
});
} }
} }
}) })
......
...@@ -600,7 +600,7 @@ export default { ...@@ -600,7 +600,7 @@ export default {
// item.imgUrl = 'api/rest/file/viewPicture/DocumentPicture?objectName=' + item.file.uuid + '&' + new Date().getTime(); // item.imgUrl = 'api/rest/file/viewPicture/DocumentPicture?objectName=' + item.file.uuid + '&' + new Date().getTime();
// } // }
if (img_type) { if (img_type) {
if (item.file.type.toUpperCase() == 'BMP' || item.file.type.toUpperCase() == "JPEG" || item.file.type.toUpperCase() == "JPG" || item.file.type.toUpperCase() == "PNG") { if (item.file.type.toUpperCase() == "JPEG" || item.file.type.toUpperCase() == "JPG" || item.file.type.toUpperCase() == "PNG") {
item.imgUrl = 'api/rest/file/viewPicture/Document?objectName=' + item.file.uuid + '&' + new Date().getTime(); item.imgUrl = 'api/rest/file/viewPicture/Document?objectName=' + item.file.uuid + '&' + new Date().getTime();
}else if(item.file.type.toUpperCase() == 'PSD'){ }else if(item.file.type.toUpperCase() == 'PSD'){
PSD.fromURL(item.imgUrl).then(function (psd) { PSD.fromURL(item.imgUrl).then(function (psd) {
...@@ -615,6 +615,10 @@ export default { ...@@ -615,6 +615,10 @@ export default {
item.imgUrl = tiff.toDataURL(); item.imgUrl = tiff.toDataURL();
}; };
xhr.send(); xhr.send();
}else if(item.file.type.toUpperCase() == 'BMP'){
_this.convertBMPtoPNG(item.imgUrl, function (pngImage) {
item.imgUrl = pngImage;
});
} }
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment