////////////////// //Document Ready ////////////////// var selectedPdServiceId; // 제품(서비스) 아이디 var selectedVersionId; // 선택된 버전 아이디 var dataTableRef; var req_state, resource_info, issue_info, period_info, total_days_progress; var labelType, useGradients, nativeTextSupport, animate; //투입 인력별 요구사항 관여 차트 var table; function execDocReady() { var pluginGroups = [ [ "../reference/light-blue/lib/vendor/jquery.ui.widget.js", "../reference/light-blue/lib/vendor/http_blueimp.github.io_JavaScript-Templates_js_tmpl.js", "../reference/light-blue/lib/vendor/http_blueimp.github.io_JavaScript-Load-Image_js_load-image.js", "../reference/light-blue/lib/vendor/http_blueimp.github.io_JavaScript-Canvas-to-Blob_js_canvas-to-blob.js", "../reference/light-blue/lib/jquery.iframe-transport.js", "../reference/lightblue4/docs/lib/widgster/widgster.js", "../reference/lightblue4/docs/lib/slimScroll/jquery.slimscroll.min.js", ], [ "../reference/jquery-plugins/select2-4.0.2/dist/css/select2_lightblue4.css", "../reference/jquery-plugins/lou-multi-select-0.9.12/css/multiselect-lightblue4.css", "../reference/jquery-plugins/multiple-select-1.5.2/dist/multiple-select-bluelight.css", "../reference/jquery-plugins/select2-4.0.2/dist/js/select2.min.js", "../reference/jquery-plugins/lou-multi-select-0.9.12/js/jquery.quicksearch.js", "../reference/jquery-plugins/lou-multi-select-0.9.12/js/jquery.multi-select.js", "../reference/jquery-plugins/multiple-select-1.5.2/dist/multiple-select.min.js", // jspreadsheet "../reference/jquery-plugins/jspreadsheet-ce-4.13.1/dist/jsuites.js", "../reference/jquery-plugins/jspreadsheet-ce-4.13.1/dist/jsuites.css", "../reference/jquery-plugins/jspreadsheet-ce-4.13.1/dist/index.js", "../reference/jquery-plugins/jspreadsheet-ce-4.13.1/dist/jspreadsheet.css", "../reference/jquery-plugins/jspreadsheet-ce-4.13.1/dist/jspreadsheet.theme.css" ], [ //d3 "../reference/jquery-plugins/d3-5.16.0/d3.min.js", //chart Colors "./js/common/colorPalette.js", // Apache Echarts "../reference/jquery-plugins/echarts-5.4.3/dist/echarts.min.js", // 투입 인력별 요구사항 관여 차트 "../reference/jquery-plugins/Jit-2.0.1/jit.js", "../reference/jquery-plugins/Jit-2.0.1/Examples/css/Treemap.css", "./js/common/chart/others/treemap.js", // 제품-버전-투입인력 차트 "../reference/jquery-plugins/d3-sankey-v0.12.3/d3-sankey.min.js", "./js/common/chart/d3/sankey.js", // 최상단 메뉴 "./js/analysis/topmenu/topMenuApi.js", "./js/common/chart/eCharts/basicRadar.js", "./js/common/table.js", "./js/analysis/api/resourceApi.js", "./js/analysis/table/workerStatusTable.js", "./js/common/chart/eCharts/horizontalBarChart.js", "./js/common/chart/eCharts/simplePie.js" ], [ "../reference/jquery-plugins/dataTables-1.10.16/media/css/jquery.dataTables_lightblue4.css", "../reference/jquery-plugins/dataTables-1.10.16/extensions/Responsive/css/responsive.dataTables_lightblue4.css", "../reference/jquery-plugins/dataTables-1.10.16/extensions/Select/css/select.dataTables_lightblue4.css", "../reference/jquery-plugins/dataTables-1.10.16/media/js/jquery.dataTables.min.js", "../reference/jquery-plugins/dataTables-1.10.16/extensions/Responsive/js/dataTables.responsive.min.js", "../reference/jquery-plugins/dataTables-1.10.16/extensions/Select/js/dataTables.select.min.js", "../reference/jquery-plugins/dataTables-1.10.16/extensions/RowGroup/js/dataTables.rowsGroup.min.js", "../reference/jquery-plugins/dataTables-1.10.16/extensions/Buttons/js/dataTables.buttons.min.js", "../reference/jquery-plugins/dataTables-1.10.16/extensions/Buttons/js/buttons.html5.js", "../reference/jquery-plugins/dataTables-1.10.16/extensions/Buttons/js/buttons.print.js", "../reference/jquery-plugins/dataTables-1.10.16/extensions/Buttons/js/jszip.min.js", "../reference/jquery-plugins/jQCloud-2.0.3/dist/jqcloud.js", "../reference/jquery-plugins/jQCloud-2.0.3/dist/jqcloud.css" ] // 추가적인 플러그인 그룹들을 이곳에 추가하면 됩니다. ]; loadPluginGroupsParallelAndSequential(pluginGroups) .then(function() { //vfs_fonts 파일이 커서 defer 처리 함. setTimeout(function () { var script = document.createElement("script"); script.src = "../reference/jquery-plugins/dataTables-1.10.16/extensions/Buttons/js/vfs_fonts.js"; script.defer = true; // defer 속성 설정 document.head.appendChild(script); }, 5000); // 5초 후에 실행됩니다. //pdfmake 파일이 커서 defer 처리 함. setTimeout(function () { var script = document.createElement("script"); script.src = "../reference/jquery-plugins/dataTables-1.10.16/extensions/Buttons/js/pdfmake.min.js"; script.defer = true; // defer 속성 설정 document.head.appendChild(script); }, 5000); // 5초 후에 실행됩니다. // 사이드 메뉴 색상 설정 $('.widget').widgster(); setSideMenu("sidebar_menu_analysis", "sidebar_menu_analysis_resource"); //제품(서비스) 셀렉트 박스 이니시에이터 makePdServiceSelectBox(); //버전 멀티 셀렉트 박스 이니시에이터 makeVersionMultiSelectBox(); // 전체보기 관련 이벤트 세팅 전체보기_관련_이벤트(); //데이터테이블초기화 table = initTable(); // 높이 조정 $('.top-menu-div').matchHeight({ target: $('.top-menu-div-scope') }); }) .catch(function() { console.error('플러그인 로드 중 오류 발생'); }); } ////////////////////////////////////////////// // 우하단 StackedHorizontalBar ////////////////////////////////////////////// function stackedHorizontalBar(){ function stackedHorizontalBarChartInit(yAxis, seriesData) { let chartDom = document.getElementById('apache-echarts-stacked-horizontal-bar'); let myChart = echarts.init(chartDom); const option = { tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' // 'line' or 'shadow'. 기본값은 'shadow' }, formatter: function (params) { const tooltip = params.reduce((acc, param) => { const { marker, seriesName, value } = param; acc += `${marker}${seriesName}: ${value}
`; return acc; }, ''); const totalCount = params.reduce((acc, param) => acc + param.value, 0); const totalTooltip = `Total: ${totalCount}
`; return totalTooltip + tooltip; } }, legend: { left: 'left', // data: statusTypes, textStyle: { color: 'white', fontSize: 11 } }, grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true }, xAxis: { type: 'value', axisLabel: { textStyle: { color: 'white', fontWeight: "", fontSize: "11" } }, splitLine: { lineStyle: { type: 'dashed', color: 'white', width: 0.2, opacity: 0.5 } } }, yAxis: { type: yAxis['type'], data: yAxis['data'], axisLabel: { textStyle: { color: 'white', fontWeight: "", fontSize: "11" }, formatter: function (value) { if (value.length > 15) { // 길이가 15보다 크면 생략 return value.substr(0, 15) + '...'; // 일부만 표시하고 "..." 추가 } else { return value; } } } }, series: seriesData.map(element => { return { name: element.name, type: element.type, stack: 'total', label: { show: true }, emphasis: { focus: 'series' }, data: element.data }; }) }; option && myChart.setOption(option); window.addEventListener('resize', function () { myChart.resize(); }); } $.ajax({ url: "/auth-admin/api/arms/analysis/resource/issue-status-stacked-bar", type: "GET", data: { "pdServiceAndIsReq.pdServiceLink" : selectedPdServiceId, "pdServiceAndIsReq.pdServiceVersionLinks" : selectedVersionId }, contentType: "application/json;charset=UTF-8", dataType: "json", progress: true, statusCode: { 200: function (result) { console.log("[analysisResource :: issue-status-stacked-bar] :: 결과 "); let apiResponse = result.response; stackedHorizontalBarChartInit(apiResponse.yaxisVO, apiResponse.series); } } }); } /////////////////////// //제품 서비스 셀렉트 박스 ////////////////////// function makePdServiceSelectBox() { //제품 서비스 셀렉트 박스 이니시에이터 $(".chzn-select").each(function () { $(this).select2($(this).data()); }); //제품 서비스 셀렉트 박스 데이터 바인딩 $.ajax({ url: "/auth-user/api/arms/pdServicePure/getPdServiceMonitor.do", type: "GET", contentType: "application/json;charset=UTF-8", dataType: "json", progress: true, async: false, statusCode: { 200: function (data) { ////////////////////////////////////////////////////////// for (var k in data.response) { var obj = data.response[k]; var newOption = new Option(obj.c_title, obj.c_id, false, false); $("#selected_pdService").append(newOption).trigger("change"); } ////////////////////////////////////////////////////////// } } }); $("#selected_pdService").on("select2:open", function () { //슬림스크롤 makeSlimScroll(".select2-results__options"); }); // --- select2 ( 제품(서비스) 검색 및 선택 ) 이벤트 --- // $("#selected_pdService").on("select2:select", function (e) { selectedPdServiceId = $("#selected_pdService").val(); refreshDetailChart(); 레이더_스택바_초기화(); // 제품( 서비스 ) 선택했으니까 자동으로 버전을 선택할 수 있게 유도 // 디폴트는 base version 을 선택하게 하고 ( select all ) //~> 이벤트 연계 함수 :: Version 표시 jsTree 빌드 bind_VersionData_By_PdService(); }); } // end makePdServiceSelectBox() //////////////////////////////////////////////////////////// //버전 멀티 셀렉트 박스 (버전 옵션 선택 시) //////////////////////////////////////////////////////////// function makeVersionMultiSelectBox() { //버전 선택시 셀렉트 박스 이니시에이터 $(".multiple-select").multipleSelect({ filter: true, onClose: function () { console.log("onOpen event fire!\n"); var checked = $("#checkbox1").is(":checked"); var endPointUrl = ""; var versionTag = $(".multiple-select").val(); console.log("[ analysisResource :: makeVersionMultiSelectBox ] :: versionTag"); console.log(versionTag); if (versionTag === null || versionTag == "") { alert("버전이 선택되지 않았습니다."); $(".ms-parent").css("z-index", 1000); return; } selectedVersionId = versionTag.join(','); // 최상단 메뉴 세팅 TopMenuApi.톱메뉴_초기화(); TopMenuApi.톱메뉴_세팅(); refreshDetailChart(); 레이더_스택바_초기화(); // 요구사항 및 연결이슈 통계 issueContributorPieChart(selectedPdServiceId, selectedVersionId, true); // 요구사항 이슈 issueContributorPieChart(selectedPdServiceId, selectedVersionId, false); // 하위작업 및 연결이슈 // 작업자별 상태 - dataTable drawResource(selectedPdServiceId, selectedVersionId); // 샌키 versionAssigneesSankeyChart($("#selected_pdService").val(), selectedVersionId , "chart-product-manpower"); $("#btn_modal_sankey").click(); drawManRequirementTreeMapChart($("#selected_pdService").val(), selectedVersionId); // word-cloud wordCloud(); // horizontalStackedBar stackedHorizontalBar(); $(".ms-parent").css("z-index", 1000); }, onOpen: function() { console.log("open event"); $(".ms-parent").css("z-index", 9999); } }); } //////////////////////////////////////////////////////////// // 제품서비스 - 버전 데이터 바인딩 (제품 선택 시) //////////////////////////////////////////////////////////// function bind_VersionData_By_PdService() { $(".multiple-select option").remove(); $.ajax({ url: "/auth-user/api/arms/pdService/getVersionList?c_id=" + $("#selected_pdService").val(), type: "GET", dataType: "json", progress: true, statusCode: { 200: function (data) { ////////////////////////////////////////////////////////// var pdServiceVersionIds = []; for (var k in data.response) { var obj = data.response[k]; pdServiceVersionIds.push(obj.c_id); var newOption = new Option(obj.c_title, obj.c_id, true, false); $(".multiple-select").append(newOption); } refreshDetailChart(); 레이더_스택바_초기화(); selectedVersionId = pdServiceVersionIds.join(','); // 최상단 메뉴 세팅 TopMenuApi.톱메뉴_초기화(); TopMenuApi.톱메뉴_세팅(); // 요구사항 및 연결이슈 통계 issueContributorPieChart(selectedPdServiceId, selectedVersionId, true); // 요구사항 이슈 issueContributorPieChart(selectedPdServiceId, selectedVersionId, false); // 하위작업 및 연결이슈 // 작업자별 상태 - dataTable drawResource(selectedPdServiceId, selectedVersionId); versionAssigneesSankeyChart(selectedPdServiceId, selectedVersionId, "chart-product-manpower"); drawManRequirementTreeMapChart(selectedPdServiceId, selectedVersionId); stackedHorizontalBar(); wordCloud(); if (data.length > 0) { console.log("display 재설정."); } //$('#multiversion').multipleSelect('refresh'); //$('#edit_multi_version').multipleSelect('refresh'); $(".multiple-select").multipleSelect("refresh"); ////////////////////////////////////////////////////////// } } }); } //////////////////////////////////////////////////////////////////////////////////////// // 전체보기 클릭 및 모달 동작 이벤트 //////////////////////////////////////////////////////////////////////////////////////// function 전체보기_관련_이벤트() { /* window.addEventListener('resize', function() { var container = document.getElementById("analysis_modal_sankey"); // Recalculate column widths on window resize jspreadsheet(container, { columns: [ { width: container.clientWidth * 0.3 }, // 30% width { width: container.clientWidth * 0.2 }, // 20% width { width: container.clientWidth * 0.5 }, // 50% width ], }); }); */ // 테스트용 $("#btn_modal_sankey").on("click", function() { let serId = 22; let verList = [33,35,36,37,46,55,59,61,74]; let verListSplit = verList.join(","); let tarId = "modal_chart"; drawProductToManSankeyChart(serId, verListSplit, tarId, 10000); }); $("#btn_modal_excel").on("click", function() { let tarId = "modal_excel"; JspreadsheetApi.getSheetData(); JspreadsheetApi.sheetRender(tarId); }); // 모달이 띄워졌을 때 동작. $('#analysis_modal_sankey').on('shown.bs.modal', function () { // let serId = 22; let verList = [33,35,36,37,46,55,59,61,74]; let verListSplit = verList.join(","); let tarId = "modal_chart"; if (selectedVersionId) { drawProductToManSankeyChart(selectedPdServiceId, selectedVersionId, tarId, 10000); } else { jError("서비스 및 버전을 설정 후 선택해주세요."); } }); $('a[data-toggle="tab"]').on("shown.bs.tab", function (e) { var target = $(e.target).attr("href"); // activated tab console.log(target); if(target === "#chart_data") { let tarId = "modal_chart"; if (selectedVersionId) { drawProductToManSankeyChart(selectedPdServiceId, selectedVersionId, tarId, 10000); } else { jError("서비스 및 버전을 설정 후 선택해주세요."); } } else if (target === "#excel_data") { console.log("excel_data"); $("#btn_modal_excel").click(); } else if (target === "#option_toggle") { $(".option_tab").removeClass("active"); e.preventDefault(); if ($(".modal-body-main").hasClass("col-lg-12")) { $(".modal-body-main").removeClass("col-lg-12").addClass("col-lg-9"); $(".modal-body-option").removeClass("hidden"); } else { $(".modal-body-main").removeClass("col-lg-9").addClass("col-lg-12"); $(".modal-body-option").addClass("hidden"); } } }); } ///////////////////////////////////////// // wordCloud ///////////////////////////////////////// function wordCloud() { $('#tag-cloud').jQCloud('destroy'); $.ajax({ url: "/auth-admin/api/arms/analysis/resource/word-cloud", type: "GET", data: { "pdServiceAndIsReq.pdServiceLink" : selectedPdServiceId, "pdServiceAndIsReq.pdServiceVersionLinks" : selectedVersionId }, contentType: "application/json;charset=UTF-8", dataType: "json", progress: true, async: false, statusCode: { 200: function (apiResponse) { $('#tag-cloud').jQCloud(apiResponse); } } }); } // 데이터 테이블 구성 이후 꼭 구현해야 할 메소드 : 열 클릭시 이벤트 function dataTableClick(tempDataTable, selectedData) { console.log(selectedData); } //데이터 테이블 그리고 난 후 시퀀스 이벤트 function dataTableCallBack(settings, json) { console.log("dataTableCallBack"); } //데이터 테이블 그리고 난 후 시퀀스 이벤트 function dataTableDrawCallback(tableInfo) { console.log("dataTableDrawCallback"); } function issueContributorPieChart(pdServiceLink, pdServiceVersionLinks, isReq, size) { $.ajax({ url: "/auth-admin/api/arms/analysis/resource/top-contributors", type: "GET", data: { "pdServiceAndIsReq.pdServiceLink" : selectedPdServiceId, "pdServiceAndIsReq.pdServiceVersionLinks" : selectedVersionId, "pdServiceAndIsReq.isReq" : isReq, "size" : (size ? size : 5) }, contentType: "application/json;charset=UTF-8", dataType: "json", progress: true, async: false, statusCode: { 200: function (data) { console.log("issueContributorPieChart"); console.log(data); let totalIssueCount = data["totalIssueCount"]; let top5IssueTotal = 0; let targetElementId = ""; let seriesName = ""; let dataMapForPieChart = []; let isReqType = ""; if ( totalIssueCount == null || totalIssueCount === 0) { return false; } if (isReq === true) { targetElementId = "req_pie"; seriesName = "요구사항 이슈"; isReqType = "REQUIREMENT"; ResourceApi.setReqAssignees(data["pieChartVOs"]); } else if (isReq === false) { targetElementId = "linkedIssue_subtask_pie"; seriesName = "하위작업 및 연결이슈"; isReqType = "ISSUE"; ResourceApi.setNotReqAssignees(data["pieChartVOs"]); } let assigneeDTOs = []; data["assigneeAndIssueCounts"].forEach( (element) => { var assigneeDTO = { name: "", serverId: "", accountId: "", emailAddress: "" }; assigneeDTO.name = element.name; assigneeDTO.serverId = element.serverId; assigneeDTO.accountId = element.accountId; if (element.emailAddress) { let idFromMail = getIdFromMail(element.emailAddress); element.name = element.name +" ("+idFromMail+")"; assigneeDTO.emailAddress = element.emailAddress; } assigneeDTOs.push(assigneeDTO); dataMapForPieChart.push(element); top5IssueTotal += element.value; }); if (totalIssueCount !== top5IssueTotal) { dataMapForPieChart.push({name: "etc.", value: (totalIssueCount - top5IssueTotal)}); } drawSimplePieChart(targetElementId, seriesName, dataMapForPieChart); let sub1 = "priority.priority_name.keyword"; let sub2 = "status.status_name.keyword"; let sub3 = "issuetype.issuetype_name.keyword"; let $target = { "sub1" : { "REQUIREMENT": "req-priority-bar", "ISSUE" : "subtask-priority-bar" }, "sub2" : { "REQUIREMENT": "req-status-bar", "ISSUE" : "subtask-status-bar" }, "sub3" : { "REQUIREMENT": "req-issuetype-bar", "ISSUE" : "subtask-issuetype-bar" } }; findHorizontalBarChartData(pdServiceLink, pdServiceVersionLinks, assigneeDTOs, isReq, sub1, $target["sub1"][isReqType]); findHorizontalBarChartData(pdServiceLink, pdServiceVersionLinks, assigneeDTOs, isReq, sub2, $target["sub2"][isReqType]); findHorizontalBarChartData(pdServiceLink, pdServiceVersionLinks, assigneeDTOs, isReq, sub3, $target["sub3"][isReqType]); }, error: function (e) { jError("작업자_이슈_집계 데이터 Status 조회에 실패했습니다. 나중에 다시 시도 바랍니다."); } } }); } function findHorizontalBarChartData(pdServiceLink, pdServiceVersionLinks, assigneeInfos, isReq, subGroupField, targetId) { let pdServiceVersionLinksArray = pdServiceVersionLinks .split(",") // 콤마를 기준으로 문자열 분리 .map(Number); // 각 문자열을 숫자(Long)로 변환 $.ajax({ url: "/auth-admin/api/arms/analysis/resource/top-contributors/issue-properties", type: "POST", data: JSON.stringify({ "pdServiceAndIsReq": { "pdServiceLink" : pdServiceLink, "pdServiceVersionLinks": pdServiceVersionLinksArray, "isReq" : isReq }, "assignees": assigneeInfos, "subGroup" : subGroupField }), contentType: "application/json;charset=UTF-8", dataType: "json", progress: true, statusCode: { 200: function (data) { console.log("drawHorizontalBarCHart Data ======>"); console.log(data); drawHorizontalBarChart(targetId, data.yaxisVO["data"], data.series); } } }); } var initTable = function () { var workerStatusTable = new $.fn.WorkerStatusTable("#analysis_worker_status_table"); $("#analysis_worker_status_table").on('page.dt', function() { scrollPos = $(window).scrollTop(); $(window).scrollTop(scrollPos); }); workerStatusTable.dataTableBuild({ rowGroup: [0], isAddCheckbox: true }); workerStatusTable.onDataTableClick = function (selectedData) { disposeDetailChartInstance(); ResourceApi.pushCustomAssignee(selectedData['uniqueAssigneeVO']); drawBarChartsWithCustomAssignees(selectedPdServiceId, selectedVersionId, ResourceApi.getCustomAssigneesExceptUniqueId()); }; workerStatusTable.onDeselect = function (selectedData) { disposeDetailChartInstance(); ResourceApi.removeCustomAssignee(selectedData['uniqueAssigneeVO']); drawBarChartsWithCustomAssignees(selectedPdServiceId, selectedVersionId, ResourceApi.getCustomAssigneesExceptUniqueId()); }; return { redrawTable: workerStatusTable.reDraw.bind(workerStatusTable) }; }; function drawBarChartsWithCustomAssignees(pdServiceId, pdServiceVersions, assignees) { const params = ResourceApi.getHorizontalBarParamMap(); var properties = params.properties; properties.forEach((element, idx) => { console.log("[drowHorizontalBarChart :: properties] idx: " + idx + ", element: " + element); findHorizontalBarChartData(pdServiceId, pdServiceVersions, assignees, true, params[element]["subGroupField"],params[element]["target-req"]); findHorizontalBarChartData(pdServiceId, pdServiceVersions, assignees, false, params[element]["subGroupField"],params[element]["target-notReq"]); }); } var drawResource = function (pdservice_id, pdServiceVersionLinks) { var deferred = $.Deferred(); var pdId = pdservice_id; var verLinks = pdServiceVersionLinks; ResourceApi.fetchResourceData(pdId, verLinks) .done( function() { var fetchedReousrceData = ResourceApi.getFetchedResourceData(); table.redrawTable(fetchedReousrceData); deferred.resolve(); } ); return deferred.promise(); }; function refreshDetailChart() { // 차트8개 초기화 disposeDetailChartInstance(); } function disposeDetailChartInstance() { const params = ResourceApi.getHorizontalBarParamMap(); var properties = params.properties; properties.forEach((element, idx) => { let reqChartInstance = echarts.getInstanceByDom(document.getElementById(params[element]["target-req"])); let subtaskChartInstance = echarts.getInstanceByDom(document.getElementById(params[element]["target-notReq"])); if(reqChartInstance) { reqChartInstance.dispose(); }; if(subtaskChartInstance) { subtaskChartInstance.dispose(); }; }); } //email에서 ID 만 가져오기 function getIdFromMail (param) { var full_str = param; var indexOfAt = full_str.indexOf('@'); return full_str.substring(0,indexOfAt); } function 레이더_스택바_초기화() { let radarChart = echarts.getInstanceByDom(document.getElementById("radarPart")); if(radarChart) { radarChart.dispose(); } let stackBarChart = echarts.getInstanceByDom(document.getElementById("apache-echarts-stacked-horizontal-bar")); if(stackBarChart) { stackBarChart.dispose(); } } //////////////////////////////////////////////////////////////////////////////////////// // 투입 인력별 요구사항 관여 차트 생성 (트리맵) //////////////////////////////////////////////////////////////////////////////////////// function drawManRequirementTreeMapChart(pdServiceLink, pdServiceVersionLinks) { const url = new UrlBuilder() .setBaseUrl('/auth-admin/api/arms/analysis/resource/assignees-requirements-involvements') .addQueryParam('pdServiceLink', pdServiceLink) .addQueryParam('pdServiceVersionLinks', pdServiceVersionLinks) .build(); $.ajax({ url: url, type: "GET", contentType: "application/json;charset=UTF-8", dataType: "json", progress: true, async: false, statusCode: { 200: function (apiResponse) { const data = apiResponse.response; if ($("#chart-manpower-requirement").children().length !== 0) { $("#chart-manpower-requirement").empty(); } const treeMapInfos = { "id": "root", "name": "작업자별 요구사항 관여 트리맵", "data": {}, "children": data }; init(treeMapInfos); } } }); }