Index: vue/src/assets/images/devops/DevSupport/github.png =================================================================== diff -u -r426a60000a69bd31c50dc5b3a5b9bf7fcb1c7d96 -ra8086ba49f0bda615f950a395933c7fbd1081e0e --- vue/src/assets/images/devops/DevSupport/github.png (.../github.png) (revision 426a60000a69bd31c50dc5b3a5b9bf7fcb1c7d96) +++ vue/src/assets/images/devops/DevSupport/github.png (.../github.png) (revision a8086ba49f0bda615f950a395933c7fbd1081e0e) @@ -1515,10 +1515,61 @@ opacity: 1; } +.req-table { + background: rgba(51, 51, 51, 0.8) !important; + border: 1px solid rgba(51, 51, 51, 0.825) !important; +} + +.req-table.dropdown-menu a:hover, +.req-table.dropdown-menu .active a { + background: none; +} + +.req-table.dropdown-menu a:hover, #select2-selected_pdService-container .select2-selection__placeholder, .multiple-select .ms-choice > span.placeholder { color: #f8f8f8; } +.req-table.dropdown-menu .active a, #disabled_input_pdservice.form-control { color: #a4c6ff; -} \ No newline at end of file +} + +#reqDataTable { + margin-bottom: 0; + min-height: 300px; + max-height: 800px; + overflow: auto; +} + +#reqDataTable .reqTable { + width: max-content; + table-layout: fixed; +} + +#reqDataTable .reqTable th { + padding: 20px 10px; +} + +#reqDataTable .reqTable th, +#reqDataTable .reqTable td { + padding: 5px 10px; + text-align: center; +} + +#reqDataTable .reqTable td.depth1, +#reqDataTable .reqTable td.depth2, +#reqDataTable .reqTable td.depth3, +#reqDataTable .reqTable td.content { + text-align: left; +} + +#reqDataTable .reqTable .tbody tr:nth-child(odd) { + background-color: rgba(51, 51, 51, 0.325); +} +#reqDataTable .reqTable .tbody tr:first-child { + height: 37px !important; +} +#reqDataTable .reqTable .tbody tr td { + border-right: 2px solid #515256; +} Index: arms/html/reqAdd/content-container.html =================================================================== diff -u -r8f80a47be1f6e946476d9044ce1a0834969ab7c0 -ra8086ba49f0bda615f950a395933c7fbd1081e0e --- arms/html/reqAdd/content-container.html (.../content-container.html) (revision 8f80a47be1f6e946476d9044ce1a0834969ab7c0) +++ arms/html/reqAdd/content-container.html (.../content-container.html) (revision a8086ba49f0bda615f950a395933c7fbd1081e0e) @@ -1,1627 +1,1715 @@ -
-
+
+
-

- - - 요구사항 조회 - -

- +
-
+ +
-
- 1. 제품 - 서비스 - 선택 → 버전 선택 → 요구사항 선택 -
- -
-
-
- -
-
-
  • -
    -
    - + id="reqAddDefault" + class="tab-pane active"> +
    +
    +
    +

    + + + 요구사항 조회 + +

    + +
    +
    +
    +
    + 1. 제품 + 서비스 + 선택 → 버전 선택 → 요구사항 선택 +
    + +
    +
    +
    + +
    - - 선택된 제품 - 서비스 - : - - 선택되지 않음 - + class="panel-group json-menu" + id="versionAccordion" + style="margin-bottom: 0px !important"> +
  • +
    +
    + +
    + + 선택된 제품 + 서비스 + : + + 선택되지 않음 + +
    +
    + + 선택된 버전 : + + 선택되지 않음 + +
    +
    + + 선택된 요구사항 : + + 선택되지 않음 + +
    +
    +
    +
  • +
    +
    +
    +
    - - 선택된 버전 : - - 선택되지 않음 - + class="controls form-group darkBack" + style="margin-bottom: 15px !important"> + +
    - - 선택된 요구사항 : - - 선택되지 않음 - + class="controls form-group darkBack" + style="margin-bottom: 5px !important"> +
    +
    + +
    +
    + 설명 +
    -
  • -
    -
    -
    -
    -
    -
    - - -
    -
    - -
    -
    -
    -
    -
    -
    - 설명 -
    -
    - - - -
    -
    -
    -

    - - - 요구사항 내용 - -

    - -
    -
    -
    -
    - 2. 요구사항 세부 내용 조회 -
    - -
    -
    -
    -
    -
    -
  • -
    + class="col-lg-7 col-layer" + style="padding-right: 0"> +
    +
    +

    + + + 요구사항 내용 + +

    + +
    +
    +
    +
    + 2. 요구사항 세부 내용 조회 +
    + +
    +
    +
    +
    - + id="selected_info" + style="float: left">
    - 선택된 제품(서비스) : - - 선택되지 않음 - + class="panel-group json-menu" + id="versionAccordion" + style="margin-bottom: 0px !important"> +
  • +
    +
    + +
    + 선택된 제품(서비스) : + + 선택되지 않음 + +
    +
    +
    +
  • -
    -
  • -
    -
    -
    - -
    - - - -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    - +
    + +
    + + + +
    +
    +
    +
    +
    + +
    +
    - - - - -
    -
    -
    - -
    - - - - -
    -
    -
    - -
    - - - - -
    -
    -
    - -
    - - - - -
    -
    -
    - -
    - - - -
    -
    -
    -
    -
    -
    - - - - -
    -
    -
    - -
    - - - - - INFO : 공동 책임자 -
    -
    - - - - - INFO : 공동 책임자 -
    -
    - - - - - INFO : 공동 책임자 -
    -
    - - - - - INFO : 공동 책임자 -
    -
    - - - - - INFO : 공동 책임자 -
    -
    -
    - -
    - - 하단 영역 참조 -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    - -
    -
    - - - -
    - -
    -
    -
    -
    -
    - - - - - -
    -
    - - - - -
    -
    -
    -
    - -
    -
    - - - - -
    -
    -
    -
    - -
    -
    - - - - -
    -
    -
    -
    - -
    -
    - - - - -
    -
    -
    -
    - -
    - - - -
    -
    -
    -
    - - - - - - - - -
    c_idc_leftc_title
    -
    -
    - - - - - - - - - - -
    -
    -
      -
      -
      -
      -
      -
      -
      - - +
      +
      +
      + +
      +
      + + + + +
      +
      +
      +
      + +
      +
      + + + + +
      +
      +
      +
      + +
      +
      + + + + +
      +
      +
      +
      + +
      +
      + + 입력 창이 좁다면 하단의 + + ( 풀스크린 편집 ) 아이콘을 클릭하세요 + +
      +
      +
      +

      요구사항 내용을 기록합니다.

      +
      +
      +
      +
      + +
      -
      - - - - - - -
      + id="report" + class="tab-pane" + style="padding-top: 10px !important"> + + + + + + + + +
      c_idc_leftc_title
      -
      - - - - - - + id="doc" + class="tab-pane" + style="padding-top: 10px !important"> + + + + + + + + + + +
      +
      +
        +
        - + id="jira" + class="tab-pane" + style="padding-top: 10px !important"> +
        -

        -
        - - - -
      1. - -
        - - - - 09:00 (MON) - -

        - - 착수 - - 제품(서비스) 등록, 버전 등록 -

        +
        + +
        -
        -
      2. - -
      3. - -
      4. - +
        +
        +
        +
        +
        @@ -1818,163 +1906,182 @@ required="required" /> -
        -
         
        -
         
        @@ -447,7 +452,7 @@ buttonList, isServerSide ); - } else if(selectRel !== "folder") { + } else if (selectRel !== "folder") { //select node 정보를 가져온다. console.log("tableName:: " + tableName); $.ajax({ @@ -493,7 +498,7 @@ .done(function (data) {}) .fail(function (e) {}) .always(function () {}); - }else{ + } else { console.log("folder clicked"); var columnList = [ { data: "c_id", defaultContent: "-" }, @@ -507,7 +512,7 @@ var buttonList = []; var jquerySelector = "#req_table"; - var ajaxUrl = "/auth-user/api/arms/reqAdd/" + tableName + "/getChildNodeWithParent.do?c_id="+selectId; + var ajaxUrl = "/auth-user/api/arms/reqAdd/" + tableName + "/getChildNodeWithParent.do?c_id=" + selectId; var jsonRoot = ""; var isServerSide = false; @@ -523,14 +528,13 @@ buttonList, isServerSide ); - } } // --- 데이터 테이블 설정 --- // getConnectionInfo.do function datatables_jira_project() { // jiraProjectConnectionInfo(); - // 데이터 테이블 컬럼 및 열그룹 구성 + // 데이터 테이블 컬럼 및 열그룹 구성 var columnList = [ { data: "c_id", @@ -544,10 +548,10 @@ var checkboxHtml = ' " + $("#popup_req_priority input[name='popup_req_priority_options']:checked").val()); - console.log("save_req :: popup_req_difficulty -> " + $("#popup_req_difficulty input[name='popup_req_difficulty_options']:checked").val()); - console.log("save_req :: popup_req_state -> " + $("#popup_req_state input[name='popup_req_state_options']:checked").val()); + console.log( + "save_req :: popup_req_priority -> " + + $("#popup_req_priority input[name='popup_req_priority_options']:checked").val() + ); + console.log( + "save_req :: popup_req_difficulty -> " + + $("#popup_req_difficulty input[name='popup_req_difficulty_options']:checked").val() + ); + console.log( + "save_req :: popup_req_state -> " + $("#popup_req_state input[name='popup_req_state_options']:checked").val() + ); let selectedReqPriorityLink = $("#popup_req_priority input[name='popup_req_priority_options']:checked").val(); let selectedReqDifficultLink = $("#popup_req_difficulty input[name='popup_req_difficulty_options']:checked").val(); let selectedReqStateLink = $("#popup_req_state input[name='popup_req_state_options']:checked").val(); @@ -1429,9 +1438,9 @@ c_req_pdservice_link: $("#selected_pdService").val(), c_req_pdservice_versionset_link: JSON.stringify($("#popup_version").val()), c_req_writer: "[" + userName + "]" + " - " + userID, - c_req_priority_link: (selectedReqPriorityLink === undefined ? "5" : selectedReqPriorityLink), // 5 - 중간 - c_req_difficulty_link: (selectedReqDifficultLink === undefined ? "5" : selectedReqDifficultLink), // 5 - 보통 - c_req_state_link: (selectedReqStateLink === undefined ? "10" : selectedReqStateLink), //10 - 열림 + c_req_priority_link: selectedReqPriorityLink === undefined ? "5" : selectedReqPriorityLink, // 5 - 중간 + c_req_difficulty_link: selectedReqDifficultLink === undefined ? "5" : selectedReqDifficultLink, // 5 - 보통 + c_req_state_link: selectedReqStateLink === undefined ? "10" : selectedReqStateLink, //10 - 열림 c_req_reviewer01: reviewers01, c_req_reviewer02: reviewers02, c_req_reviewer03: reviewers03, @@ -1448,8 +1457,8 @@ }; console.log(dataObjectParam); - if($("#popup_version").val().length >= 1) { - if($("#req_title").val().trim() !== "" ) { + if ($("#popup_version").val().length >= 1) { + if ($("#req_title").val().trim() !== "") { /* $.ajax({ url: "/auth-user/api/arms/reqAdd/" + tableName + "/addNode.do", @@ -1503,22 +1512,35 @@ if ($("#editview_req_reviewers").select2("data")[4] != undefined) { reviewers05 = $("#editview_req_reviewers").select2("data")[4].text; } - console.log("click_btn_for_req_update :: editview_req_priority -> " + $("#editview_req_priority input[name='editview_req_priority_options']:checked").val()); - console.log("click_btn_for_req_update :: editview_req_difficulty -> " + $("#editview_req_difficulty input[name='editview_req_difficulty_options']:checked").val()); - console.log("click_btn_for_req_update :: editview_req_state -> " + $("#editview_req_state input[name='editview_req_state_options']:checked").val()); + console.log( + "click_btn_for_req_update :: editview_req_priority -> " + + $("#editview_req_priority input[name='editview_req_priority_options']:checked").val() + ); + console.log( + "click_btn_for_req_update :: editview_req_difficulty -> " + + $("#editview_req_difficulty input[name='editview_req_difficulty_options']:checked").val() + ); + console.log( + "click_btn_for_req_update :: editview_req_state -> " + + $("#editview_req_state input[name='editview_req_state_options']:checked").val() + ); - let selectedEditReqPriorityLink = $("#editview_req_priority input[name='editview_req_priority_options']:checked").val(); - let selectedEditReqDifficultyLink = $("#editview_req_difficulty input[name='editview_req_difficulty_options']:checked").val(); + let selectedEditReqPriorityLink = $( + "#editview_req_priority input[name='editview_req_priority_options']:checked" + ).val(); + let selectedEditReqDifficultyLink = $( + "#editview_req_difficulty input[name='editview_req_difficulty_options']:checked" + ).val(); let selectedEditReqStateLink = $("#editview_req_state input[name='editview_req_state_options']:checked").val(); - + let dataObjectParam = { c_id: $("#editview_req_id").val(), c_title: $("#editview_req_name").val(), c_req_pdservice_versionset_link: JSON.stringify($("#edit_multi_version").val()), // c_req_writer: "[" + userName + "]" + " - " + userID, 요청자는 최초 요청자로 고정. 수정 시 요청자는 변경하지 않는 것으로 처리 - c_req_priority_link: (selectedEditReqPriorityLink === undefined? "5" : selectedEditReqPriorityLink), // 5 - 중간 - c_req_difficulty_link: (selectedEditReqDifficultyLink === undefined? "5" : selectedEditReqDifficultyLink),// 5 - 보통 - c_req_state_link: (selectedEditReqStateLink === undefined? "10" : selectedEditReqStateLink), //10 - 열림 + c_req_priority_link: selectedEditReqPriorityLink === undefined ? "5" : selectedEditReqPriorityLink, // 5 - 중간 + c_req_difficulty_link: selectedEditReqDifficultyLink === undefined ? "5" : selectedEditReqDifficultyLink, // 5 - 보통 + c_req_state_link: selectedEditReqStateLink === undefined ? "10" : selectedEditReqStateLink, //10 - 열림 c_req_update_date: new Date(), c_req_reviewer01: reviewers01, c_req_reviewer02: reviewers02, @@ -1797,21 +1819,18 @@ $(".edit_btn_group").addClass("hidden"); $(".jira_btn_group").addClass("hidden"); $(".newReqDiv").hide(); - - } else if (target == "#edit") { $(".edit_btn_group").removeClass("hidden"); $(".jira_btn_group").addClass("hidden"); $(".newReqDiv").hide(); - } else if (target == "#jira") { $(".edit_btn_group").addClass("hidden"); $(".jira_btn_group").removeClass("hidden"); $(".newReqDiv").hide(); console.log("jira tab click event"); //1-1. 제품(서비스) 아이디를 기준으로, -- $('#selected_pdService').val() - console.log("selected_pdService::::" + $('#selected_pdService').val()); // service id + console.log("selected_pdService::::" + $("#selected_pdService").val()); // service id console.log("selectedJsTreeId::::" + selectedJsTreeId); // jsTree ID //1-2. 요구사항 jsTree ID 가져와서 -- selectedJsTreeId @@ -1820,25 +1839,21 @@ //제품 서비스 셀렉트 박스 데이터 바인딩 //요구사항 클릭하면 자세히보기 탭으로 가니까 이 로직은 유효하다. - var tableName = "T_ARMS_REQADD_" + $("#selected_pdService").val(); console.log("jira selectedJsTreeId" + selectedJsTreeId); console.log("jira tableName" + tableName); - console.log("jira datatables_jira_project 완료 " ); - + console.log("jira datatables_jira_project 완료 "); } else if (target == "#report") { $(".newReqDiv").show(); $(".edit_btn_group").addClass("hidden"); - }else if (target == "#doc") { + } else if (target == "#doc") { $(".edit_btn_group").addClass("hidden"); $(".jira_btn_group").addClass("hidden"); $(".newReqDiv").hide(); - } else if (target == "#history") { $(".edit_btn_group").addClass("hidden"); $(".jira_btn_group").addClass("hidden"); $(".newReqDiv").hide(); - } }); } @@ -1855,18 +1870,18 @@ // $("input:checkbox[name=jiraVerList]:checked").each(function (i, iVal) { // chk_Val.push(iVal.value); // }); - console.log(" jiraCheckId :: "+JSON.stringify(jiraCheckId)); + console.log(" jiraCheckId :: " + JSON.stringify(jiraCheckId)); //반영할 테이블 네임 값 셋팅 var tableName = "T_ARMS_REQADD_" + $("#selected_pdService").val(); - // check box 값 = jiraCheckId + // check box 값 = jiraCheckId $.ajax({ url: "/auth-user/api/arms/reqAdd/" + tableName + "/updateNode.do", data: { - c_id: selectedJsTreeId, // reqAdd id - c_req_pdservice_versionset_link: "[]", //c_req_pdservice_versionset_link + c_id: selectedJsTreeId, // reqAdd id + c_req_pdservice_versionset_link: "[]", //c_req_pdservice_versionset_link c_jira_link: "independent", - c_req_etc: JSON.stringify(jiraCheckId) //c_req_etc, c_jira_ver_link + c_req_etc: JSON.stringify(jiraCheckId) //c_req_etc, c_jira_ver_link }, type: "POST", progress: true @@ -1887,7 +1902,37 @@ }); } -$('#text').on('input', function() { +$("#text").on("input", function () { var searchString = $(this).val(); - $('#req_tree').jstree('search', searchString); + $("#req_tree").jstree("search", searchString); }); + +function tableSelectOption(obj) { + const $li = document.createElement("li"); + + $li.innerHTML = `${obj.c_title}`; + + return $li; +} + +function tableSelect(id) { + makeTable(id, "reqDataTable", { + content: { + version: "Version", + category: "구분", + id: "TASK NO", + manager: "TASK OWNER", + status: "Status", + depth1: "Depth 1", + depth2: "Depth 2", + depth3: "Depth 3", + content: "기능", + priority: "우선순위", + difficulty: "난이도", + createDate: "생성일", + startDate: "시작일", + endDate: "종료일", + progress: "진행률" + } + }); +} Index: arms/js/reqAddTable.js =================================================================== diff -u --- arms/js/reqAddTable.js (revision 0) +++ arms/js/reqAddTable.js (revision a8086ba49f0bda615f950a395933c7fbd1081e0e) @@ -0,0 +1,147 @@ +class Table { + constructor(options, data) { + this.options = options; + this.$table = this.makeElement("table"); + this.$data = data; + } + + makeElement(name) { + return document.createElement(name); + } + + makeRow(rows, tag) { + return rows.reduce((acc, cur) => { + const $tr = this.makeElement("tr"); + Object.keys(this.options.content).forEach((key) => { + const $col = this.makeElement(tag); + $col.className = key; + $col.innerHTML = cur[key]; + + $tr.appendChild($col); + }); + + return [...acc, $tr]; + }, []); + } + makeHead() { + const $thead = this.makeElement("thead"); + this.makeRow([this.options.content], "th").forEach((r) => $thead.append(r)); + + return $thead; + } + makeBody() { + const $tbody = this.makeElement("tbody"); + this.makeRow(this.$data, "td").forEach((r) => $tbody.append(r)); + + return $tbody; + } + + makeSection(rowData, name, col) { + const $el = this.makeElement(name); + $el.className = name; + this.makeRow(rowData, col).forEach((r) => $el.append(r)); + + return $el; + } + + get template() { + this.$table.className = "reqTable"; + this.$table.appendChild(this.makeSection([this.options.content], "thead", "th")); + this.$table.appendChild(this.makeSection(this.$data, "tbody", "td")); + return this.$table; + } +} + +const getDate = (stamp) => { + if (!stamp || stamp < 0) return "-"; + const time = new Date(stamp); + return `${time.getFullYear()}-${addZero(time.getMonth() + 1)}-${addZero(time.getDate())}`; +}; + +const addZero = (n) => { + return n < 10 ? `0${n}` : n; +}; + +const setDepth = (data, parentId, titles) => { + if (parentId === 2) return { depth1: titles[0] }; + + const node = data.find((task) => task.c_id === parentId); + + if (node.c_parentid <= 2) { + const reulst = {}; + + titles + .concat(node.c_title) + .reverse() + .forEach((title, index) => (reulst[`depth${index + 1}`] = title)); + + return reulst; + } + + return setDepth(data, node.c_parentid, titles.concat(node.c_title)); +}; +const setTableData = (data) => { + return data + .sort((a, b) => a.c_parentid - b.c_parentid) + .reduce((acc, cur) => { + const { + c_id, + c_parentid, + c_title, + c_req_owner, + c_req_contents, + reqStateEntity, + reqPriorityEntity, + reqDifficultyEntity, + c_req_create_date, + c_req_start_date, + c_req_end_date, + c_req_plan_progress + } = cur; + if (cur.c_parentid < 2) return acc; + + return [ + ...acc, + { + version: "", + id: c_id, + category: "", + manager: c_req_owner, + status: reqStateEntity?.data ?? "", + ...Object.assign({ depth1: "", depth2: "", depth3: "" }, setDepth(data, c_parentid, [c_title])), + content: c_title, + priority: reqPriorityEntity?.data ?? "", + difficulty: reqDifficultyEntity?.data ?? "", + createDate: getDate(c_req_create_date), + startDate: getDate(c_req_start_date), + endDate: getDate(c_req_end_date), + progress: c_req_plan_progress || 0, + origin: cur + } + ]; + }, []); +}; + +const getMonitorData = async (id) => { + return await $.ajax({ + url: `/auth-user/api/arms/reqAdd/T_ARMS_REQADD_${id}/getMonitor.do`, + type: "GET", + dataType: "json", + progress: true, + statusCode: { + 200: function (data) { + if (!isEmpty(data)) { + return data; + } + } + } + }); +}; + +const makeTable = async (id, wrapper, options) => { + const res = await getMonitorData(id); + const $wrapper = document.getElementById(wrapper); + const table = new Table(options, setTableData(res)); + + $wrapper.appendChild(table.template); +};