19 lines
751 B
TypeScript
19 lines
751 B
TypeScript
import type { SelectDataType } from "@common/business_components/ui";
|
|
import moment from "moment";
|
|
|
|
export const excelCoSttnParsing = (data: any[],sidoCode:SelectDataType[] , sggCode:SelectDataType[]): string[][] => {
|
|
const excelExportData: string[][] = [];
|
|
data.forEach((item) => {
|
|
excelExportData.push([
|
|
sidoCode.find((sido) => sido.val === item.ctpvCd.toString().trim() )?.text ?? "",
|
|
sggCode.find((sgg) => sgg.val === item.sggCd.toString().trim() )?.text ?? "",
|
|
item.dmdCoNm ?? "",
|
|
item.daddr ?? "",
|
|
String(item.dmdInfoId ?? ""),
|
|
item.telno ?? "",
|
|
moment(item.regDt).format("YYYY-MM-DD") ?? ""
|
|
]);
|
|
});
|
|
return excelExportData;
|
|
};
|