|
@@ -181,9 +181,17 @@ module.exports = app => {
|
|
|
// throw 'ok';
|
|
|
// }
|
|
|
const updateDate = new Date();
|
|
|
- const montStr = (updateDate.getMonth() + 1) < 10 ? ('0' + (updateDate.getMonth() + 1)) : ((updateDate.getMonth() + 1));
|
|
|
- const dateStr = (updateDate.getDate()) < 10 ? ('0' + (updateDate.getDate())) : ((updateDate.getDate()));
|
|
|
- const dtStr = updateDate.getFullYear() + '-' + montStr + '-' + dateStr;
|
|
|
+ const montStr = (updateDate.getMonth() + 1) < 10 ? ('0' + (updateDate.getMonth() + 1)) : (updateDate.getMonth() + 1);
|
|
|
+ const dateStr = (updateDate.getDate()) < 10 ? ('0' + updateDate.getDate()) : (updateDate.getDate());
|
|
|
+ let hrStr = '' + updateDate.getHours();
|
|
|
+ if (hrStr.length === 1) hrStr = '0' + hrStr;
|
|
|
+ let minStr = '' + updateDate.getMinutes();
|
|
|
+ if (minStr.length === 1) minStr = '0' + minStr;
|
|
|
+ let secStr = '' + updateDate.getSeconds();
|
|
|
+ if (secStr.length === 1) secStr = '0' + secStr;
|
|
|
+
|
|
|
+ // const dtStr = updateDate.getFullYear() + '-' + montStr + '-' + dateStr;
|
|
|
+ const dtStr = `${updateDate.getFullYear()}-${montStr}-${dateStr} ${hrStr}:${minStr}:${secStr}`;
|
|
|
const orgArchiveList = await ctx.service.rptArchive.getPrjStgArchive(prjId, stgId);
|
|
|
if (orgArchiveList.length > 0) {
|
|
|
const contentArr = JSON.parse(orgArchiveList[0].content);
|
|
@@ -262,7 +270,16 @@ module.exports = app => {
|
|
|
const updateDate = new Date();
|
|
|
const montStr = (updateDate.getMonth() + 1) < 10 ? ('0' + (updateDate.getMonth() + 1)) : ((updateDate.getMonth() + 1));
|
|
|
const dateStr = (updateDate.getDate()) < 10 ? ('0' + (updateDate.getDate())) : ((updateDate.getDate()));
|
|
|
- const dtStr = updateDate.getFullYear() + '-' + montStr + '-' + dateStr;
|
|
|
+ let hrStr = '' + updateDate.getHours();
|
|
|
+ if (hrStr.length === 1) hrStr = '0' + hrStr;
|
|
|
+ let minStr = '' + updateDate.getMinutes();
|
|
|
+ if (minStr.length === 1) minStr = '0' + minStr;
|
|
|
+ let secStr = '' + updateDate.getSeconds();
|
|
|
+ if (secStr.length === 1) secStr = '0' + secStr;
|
|
|
+
|
|
|
+ // const dtStr = updateDate.getFullYear() + '-' + montStr + '-' + dateStr;
|
|
|
+ const dtStr = `${updateDate.getFullYear()}-${montStr}-${dateStr} ${hrStr}:${minStr}:${secStr}`;
|
|
|
+
|
|
|
const orgArchiveList = await ctx.service.rptArchive.getPrjStgArchive(prjId, stgId);
|
|
|
if (orgArchiveList.length > 0) {
|
|
|
const contentArr = JSON.parse(orgArchiveList[0].content);
|