|
@@ -453,7 +453,7 @@ let rptArchiveObj = {
|
|
|
// 每页
|
|
|
for (let sCellIdx = 0; sCellIdx < currentRptPageRst.items[pageIdx].signature_cells.length; sCellIdx++) {
|
|
|
let sCell = currentRptPageRst.items[pageIdx].signature_cells[sCellIdx];
|
|
|
- if (sCell.signature_name === 'dummy_pic') {
|
|
|
+ if (sCell.signature_name === 'dummy_pic' && sCell.path.indexOf('/sign') < 0) {
|
|
|
if (picKeys.indexOf(sCell.path) < 0) {
|
|
|
picKeys.push(sCell.path);
|
|
|
picCells.push(sCell);
|
|
@@ -466,22 +466,37 @@ let rptArchiveObj = {
|
|
|
$.bootstrapLoading.start();
|
|
|
let picAmt = picCells.length, picCnt = 0;
|
|
|
for (let idx = 0; idx < picCells.length; idx++) {
|
|
|
- const img = new Image();
|
|
|
- img.src = picKeys[idx];
|
|
|
- img.onload = function() {
|
|
|
+ getBlob(picKeys[idx]).then(blob => {
|
|
|
+ // saveAs(blob, filename);
|
|
|
+ let oFileReader = new FileReader();
|
|
|
+ oFileReader.onloadend = function (e) {
|
|
|
+ let base64 = e.target.result;
|
|
|
+ console.log("方式一》》》》》》》》》", base64)
|
|
|
+ };
|
|
|
+ picCells.pic = oFileReader.readAsDataURL(blob);
|
|
|
picCnt++;
|
|
|
if (picCnt === picAmt) {
|
|
|
$.bootstrapLoading.end();
|
|
|
rptArchiveObj._archiveCurrentReport(currentRptPageRst, currentNode);
|
|
|
}
|
|
|
- };
|
|
|
- img.onerror = function() {
|
|
|
- picCnt++;
|
|
|
- if (picCnt === picAmt) {
|
|
|
- $.bootstrapLoading.end();
|
|
|
- rptArchiveObj._archiveCurrentReport(currentRptPageRst, currentNode);
|
|
|
- }
|
|
|
- }
|
|
|
+ });
|
|
|
+
|
|
|
+ // const img = new Image();
|
|
|
+ // img.src = picKeys[idx];
|
|
|
+ // img.onload = function() {
|
|
|
+ // picCnt++;
|
|
|
+ // if (picCnt === picAmt) {
|
|
|
+ // $.bootstrapLoading.end();
|
|
|
+ // rptArchiveObj._archiveCurrentReport(currentRptPageRst, currentNode);
|
|
|
+ // }
|
|
|
+ // };
|
|
|
+ // img.onerror = function() {
|
|
|
+ // picCnt++;
|
|
|
+ // if (picCnt === picAmt) {
|
|
|
+ // $.bootstrapLoading.end();
|
|
|
+ // rptArchiveObj._archiveCurrentReport(currentRptPageRst, currentNode);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
}
|
|
|
} else {
|
|
|
rptArchiveObj._archiveCurrentReport(currentRptPageRst, currentNode);
|