From e8b488c06c11ec864891d7e29b33afaecba1eacd Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Tue, 19 Dec 2023 18:13:20 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9E=90=EB=B0=94=EC=8A=A4=ED=81=AC=EB=A6=BD?= =?UTF-8?q?=ED=8A=B8=20=ED=95=A8=EC=88=98=20=EC=B6=94=EA=B0=80(=EC=97=91?= =?UTF-8?q?=EC=85=80=ED=8C=8C=EC=9D=BC=EC=83=9D=EC=84=B1=EC=9A=A9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/fims/framework/cmm/cmmUtil.js | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/main/webapp/resources/js/fims/framework/cmm/cmmUtil.js b/src/main/webapp/resources/js/fims/framework/cmm/cmmUtil.js index a76a1f93..0917df3c 100644 --- a/src/main/webapp/resources/js/fims/framework/cmm/cmmUtil.js +++ b/src/main/webapp/resources/js/fims/framework/cmm/cmmUtil.js @@ -1,3 +1,33 @@ +//엑셀 파일 생성 정보 +function getColDefs($th, $td){ + var colDefs = []; + + for(var i=0; i < $th.length; i++){ + + var label = $th.eq(i).text(); + + if(label != ""){ + + var width = $th.eq(i).outerWidth(); + width = Math.ceil(width/10) + 2; + var field = $td.eq(i).text(); + field = field.replace("{", ""); + field = field.replace("}", ""); + + var colDef = { + label : label, + width : width, + field : field + }; + + colDefs.push(colDef); + } + + } + + return JSON.stringify(colDefs); +} + /************************************************************************** * 지연 **************************************************************************/