Commit 5e6321b3 by chenjinjing

no message

parent 1e7e55a5
...@@ -82,7 +82,9 @@ protected getListCount(list: string[], target: string, data: any, year: string) ...@@ -82,7 +82,9 @@ protected getListCount(list: string[], target: string, data: any, year: string)
const count = this.registerItems(list); const count = this.registerItems(list);
data.forEach(row => { data.forEach(row => {
const rowDate = excelSerialToJSDate(row['创建时间']); let rowDate:any = 0;
if (!isNaN(row['创建时间'])) rowDate = excelSerialToJSDate(row['创建时间']);
else rowDate = row['创建时间'];
const rowYear = rowDate.getFullYear(); const rowYear = rowDate.getFullYear();
if (rowYear == targetYear) { if (rowYear == targetYear) {
count.set(row[target], (count.get(row[target]) || 0) + 1); count.set(row[target], (count.get(row[target]) || 0) + 1);
......
...@@ -41,11 +41,10 @@ export class getEventCountByYearStrategy extends abstractDataStrategyRight { ...@@ -41,11 +41,10 @@ export class getEventCountByYearStrategy extends abstractDataStrategyRight {
let finishedEventCount = 0; let finishedEventCount = 0;
data.forEach(row => { data.forEach(row => {
const rawDate = row['创建时间']; let rowDate:any = 0;
if (!isNaN(row['创建时间'])) rowDate = excelSerialToJSDate(row['创建时间']);
let time = new Date((rawDate - 1) * 24 * 3600000 + 1); else rowDate = row['创建时间'];
let year = time.setFullYear(time.getFullYear() - 70) let rowYear = rowDate.getFullYear();
let rowYear = parseInt(moment(year).format("YYYY"));
// const rowDate = excelSerialToJSDate(rawDate); // const rowDate = excelSerialToJSDate(rawDate);
......
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