|
@@ -109,9 +109,19 @@ let rptArchiveObj = {
|
|
|
me.currentArchivePdfPath = null;
|
|
|
if (aItem.items && aItem.items.length > 0) {
|
|
|
// me.currentArchiveUuid = aItem.items[0].uuid;
|
|
|
- me.currentArchiveUuid = aItem.items[aItem.items.length - 1].uuid;
|
|
|
// me.currentArchiveDateStr = aItem.items[0].updateDate_time;
|
|
|
- me.currentArchiveDateStr = '#' + (aItem.items.length) + ' ' + aItem.items[aItem.items.length - 1].updateDate_time;
|
|
|
+ const newItems = _.orderBy(aItem.items, ['updateDate_time'], ['desc']);
|
|
|
+ me.currentArchiveUuid = newItems[0].uuid;
|
|
|
+ me.currentArchiveDateStr = '#' + (_.findIndex(aItem.items, { updateDate_time: newItems[0].updateDate_time})+1) + ' ' + newItems[0].updateDate_time;
|
|
|
+ if (can_netcasign) {
|
|
|
+ for (const [i,item] of aItem.items.entries()) {
|
|
|
+ if (_.find(signLogList, { uuid: item.uuid })) {
|
|
|
+ me.currentArchiveUuid = item.uuid;
|
|
|
+ me.currentArchiveDateStr = '#' + (i+1) + ' ' + item.updateDate_time;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
@@ -164,15 +174,15 @@ let rptArchiveObj = {
|
|
|
$('#show-removesign-modal-btn').hide();
|
|
|
}
|
|
|
postData('/tender/'+ TENDER_ID +'/signReport/post', {type: 'pdfIsExist', uuid: me.currentArchiveUuid}, function (result) {
|
|
|
- me.currentArchivePdfPath = result ? oss_path + '/sign/'+ me.currentArchiveUuid +'.PDF' + (uSignLogList.length !== 0 ? '?' + uSignLogList[uSignLogList.length-1].versionid : '') : oss_path + '/'+ me.currentArchiveUuid +'.PDF';
|
|
|
+ me.currentArchivePdfPath = result ? oss_path + '/sign/'+ me.currentArchiveUuid +'.PDF' + (uSignLogList.length !== 0 ? '?' + uSignLogList[uSignLogList.length-1].versionid : '') : oss_path + '/'+ me.currentArchiveUuid +'.PDF?' + new Date(me.currentArchiveDateStr.slice(3).replace(/-/g, '/')).getTime();
|
|
|
$('#iframe_made').html('<iframe src="/archive/pdf/show?file=' + me.currentArchivePdfPath + '" height="750px" width="100%" style="border: none;"></iframe>');
|
|
|
}, function () {
|
|
|
- me.currentArchivePdfPath = oss_path + '/'+ me.currentArchiveUuid +'.PDF';
|
|
|
- $('#iframe_made').html('<iframe src="/archive/pdf/show?file=' + oss_path + '/'+ me.currentArchiveUuid +'.PDF" height="750px" width="100%" style="border: none;"></iframe>');
|
|
|
+ me.currentArchivePdfPath = oss_path + '/'+ me.currentArchiveUuid +'.PDF?' + new Date(me.currentArchiveDateStr.slice(3).replace(/-/g, '/')).getTime();
|
|
|
+ $('#iframe_made').html('<iframe src="/archive/pdf/show?file=' + me.currentArchivePdfPath + '" height="750px" width="100%" style="border: none;"></iframe>');
|
|
|
})
|
|
|
} else {
|
|
|
- me.currentArchivePdfPath = oss_path + '/'+ me.currentArchiveUuid +'.PDF';
|
|
|
- $('#iframe_made').html('<iframe src="/archive/pdf/show?file=' + oss_path + '/'+ me.currentArchiveUuid +'.PDF" height="750px" width="100%" style="border: none;"></iframe>');
|
|
|
+ me.currentArchivePdfPath = oss_path + '/'+ me.currentArchiveUuid +'.PDF?' + new Date(me.currentArchiveDateStr.slice(3).replace(/-/g, '/')).getTime();
|
|
|
+ $('#iframe_made').html('<iframe src="/archive/pdf/show?file=' + me.currentArchivePdfPath + '" height="750px" width="100%" style="border: none;"></iframe>');
|
|
|
}
|
|
|
// let uuIdUrl = "/getArchivedFileByUUID/" + me.currentArchiveUuid + "/" + stringUtil.replaceAll(me.currentNode.name, "#", "_");
|
|
|
// console.log(uuIdUrl);
|
|
@@ -192,18 +202,18 @@ let rptArchiveObj = {
|
|
|
if(can_netcasign) {
|
|
|
postData('/tender/'+ TENDER_ID +'/signReport/post', {type: 'pdfIsExist', uuid: me.currentArchiveUuid}, function (result) {
|
|
|
const uSignLogList = _.filter(signLogList, { uuid: me.currentArchiveUuid });
|
|
|
- me.currentArchivePdfPath = result ? oss_path + '/sign/'+ me.currentArchiveUuid +'.PDF' + (uSignLogList.length !== 0 ? '?' + uSignLogList[uSignLogList.length-1].versionid : '') : oss_path + '/'+ me.currentArchiveUuid +'.PDF';
|
|
|
+ me.currentArchivePdfPath = result ? oss_path + '/sign/'+ me.currentArchiveUuid +'.PDF' + (uSignLogList.length !== 0 ? '?' + uSignLogList[uSignLogList.length-1].versionid : '') : oss_path + '/'+ me.currentArchiveUuid +'.PDF?' + new Date(me.currentArchiveDateStr.slice(3).replace(/-/g, '/')).getTime();
|
|
|
$('#iframe_made').html('<iframe src="/archive/pdf/show?file=' + me.currentArchivePdfPath + '" height="750px" width="100%" style="border: none;"></iframe>');
|
|
|
me._buildeArchiveDateSelect();
|
|
|
}, function () {
|
|
|
- me.currentArchivePdfPath = oss_path + '/'+ me.currentArchiveUuid +'.PDF';
|
|
|
- $('#iframe_made').html('<iframe src="/archive/pdf/show?file=' + oss_path + '/'+ me.currentArchiveUuid +'.PDF" height="750px" width="100%" style="border: none;"></iframe>');
|
|
|
+ me.currentArchivePdfPath = oss_path + '/'+ me.currentArchiveUuid +'.PDF?' + new Date(me.currentArchiveDateStr.slice(3).replace(/-/g, '/')).getTime();
|
|
|
+ $('#iframe_made').html('<iframe src="/archive/pdf/show?file=' + me.currentArchivePdfPath + '" height="750px" width="100%" style="border: none;"></iframe>');
|
|
|
me._buildeArchiveDateSelect();
|
|
|
});
|
|
|
me._updateSignHtmlAndFrame();
|
|
|
} else {
|
|
|
- me.currentArchivePdfPath = oss_path + '/'+ me.currentArchiveUuid +'.PDF';
|
|
|
- $('#iframe_made').html('<iframe src="/archive/pdf/show?file=' + oss_path + '/'+ me.currentArchiveUuid +'.PDF" height="750px" width="100%" style="border: none;"></iframe>');
|
|
|
+ me.currentArchivePdfPath = oss_path + '/'+ me.currentArchiveUuid +'.PDF?' + new Date(me.currentArchiveDateStr.slice(3).replace(/-/g, '/')).getTime();
|
|
|
+ $('#iframe_made').html('<iframe src="/archive/pdf/show?file=' + me.currentArchivePdfPath + '" height="750px" width="100%" style="border: none;"></iframe>');
|
|
|
me._buildeArchiveDateSelect();
|
|
|
}
|
|
|
},
|
|
@@ -250,7 +260,7 @@ let rptArchiveObj = {
|
|
|
}
|
|
|
$('#page-list').html(pagetr);
|
|
|
if (needFrame) {
|
|
|
- me.currentArchivePdfPath = uSignLogList.length > 0 ? oss_path + '/sign/'+ me.currentArchiveUuid +'.PDF' : oss_path + '/'+ me.currentArchiveUuid +'.PDF';
|
|
|
+ me.currentArchivePdfPath = uSignLogList.length > 0 ? oss_path + '/sign/'+ me.currentArchiveUuid +'.PDF' : oss_path + '/'+ me.currentArchiveUuid +'.PDF?' + new Date(me.currentArchiveDateStr.slice(3).replace(/-/g, '/')).getTime();
|
|
|
$('#iframe_made').html('<iframe src="/archive/pdf/show?file=' + me.currentArchivePdfPath + (uSignLogList.length !== 0 ? '?' + uSignLogList[uSignLogList.length-1].versionid : '') + '" height="750px" width="100%" style="border: none;"></iframe>');
|
|
|
}
|
|
|
$('#dateStr').html(me.currentArchiveDateStr);
|