OWL ITS + 탐지시스템(인터넷 진흥원)
wyu
2021-12-20 0e9a2d3cdad67b0c16d18bf349c14528f617aef0
src/main/webapp/scripts/app/issue/issueDetail.controller.js
@@ -55,7 +55,7 @@
                //  이슈 목록 컨트롤러 vm, fn 상속 중
                $scope.vm.viewer = {};      // 현재 이슈
                $scope.vm.images = [];  //  첨부된 파일 중 이미지 파일
                $scope.vm.activeTab = "ALL";    //  활동 내역 탭
                $scope.vm.activeTab = "RECODE";    //  활동 내역 탭
                //  이슈 상태 변경 표시 여부
                $scope.vm.editor = {
                    issueStatus : false
@@ -81,6 +81,7 @@
                $scope.vm.form = {
                    issues : [], //연관 일감
                    issuesDown : [],  // 하위 일감
                    issuesDownStatus : [], //하위 이슈 상태
                    issueCompanyVos : [],
                    issueIspVos : [],
                    issueHostingVos : []
@@ -235,7 +236,7 @@
                }
                function getDownIssueListCallBack(result) {
                    $scope.vm.autoCompletePage.issue.totalPage = result.data.page.totalPage;
                    $scope.vm.autoCompletePageDown.issue.totalPage = result.data.page.totalPage;
                }
                //  테이블의 연관 이슈 컬럼을 만들어준다.
@@ -243,7 +244,6 @@
                    //  연관 이슈 컬럼
                    switch(Rel_issueTableConfig.key) {
                        // 연관 이슈 구분
                        case "RELATION_ISSUE_TYPE" :
                            $scope.vm.relTableConfigs.push($tableProvider.config()
@@ -700,7 +700,8 @@
                            parameter : function () {
                                return {
                                    issueIds : [$scope.vm.viewer.id],
                                    projectId : $scope.vm.viewer.projectVo.id
                                    projectId : $scope.vm.viewer.projectVo.id,
                                    downIssuesStatus : $scope.vm.form.issuesDownStatus
                                };
                            }
                        }
@@ -881,6 +882,7 @@
                                $scope.vm.form.issues = [];
                                $scope.vm.form.issues.push(result.data.data);
                                $scope.vm.form.issuesDown = [];
                                $scope.vm.form.issuesDownStatus = [];// 하위이슈 상태
                                $scope.vm.form.issuesDown.push(result.data.data);
                                var issueTableConfigVos = result.data.data.issueTableConfigVos;
@@ -893,6 +895,9 @@
                                        issueRelationVo.relationIssueTypeName = $scope.vm.relationIssueTypes[issueRelationVo.relationIssueType].name;
                                        $scope.vm.form.issues.push(issueRelationVo.issueRelation);
                                    });
                                    result.data.data.issueRelationVos.sort(function (a, b) {   //최근변경일 내림차순
                                        return a.modifyDate > b.modifyDate ? -1 : a.modifyDate < b.modifyDate ? 1 : 0;
                                    });
                                }
                                // 하위 이슈 반목문
@@ -900,7 +905,10 @@
                                    angular.forEach(result.data.data.issueDownVos, function (issueDownVo){
                                        //$scope.vm.form.issuesDown.push(issueDownVo.issueDown);
                                        $scope.vm.form.issuesDown.push(issueDownVo);
                                        $scope.vm.form.issuesDownStatus.push(issueDownVo.issueStatusVo.issueStatusType);
                                    });
                                    result.data.data.issueDownVos.sort(function (a, b) {   //최근변경일 내림차순
                                        return a.modifyDate > b.modifyDate ? -1 : a.modifyDate < b.modifyDate ? 1 : 0;
                                    });
                                }
                                $scope.vm.viewer.issueRelationVos = result.data.data.issueRelationVos;
@@ -909,6 +917,7 @@
                                if ($rootScope.workProject.id > -1 && result.data.data.projectVo !== null) {
                                    $rootScope.changeLastProject(result.data.data.projectVo.id);
                                }
                            }
                        }
                        else {
@@ -991,8 +1000,61 @@
                //  활동 이력 만들기
                function makeActiveHistory() {
                    $scope.vm.viewer.activeHistory = $scope.vm.viewer.issueCommentVos.concat($scope.vm.viewer.issueHistoryVos);
                    $scope.vm.viewer.activeHistory.sort(function (a, b) {
                    $scope.vm.viewer.activeParentHistory = "";
                    $scope.vm.viewer.activeHistory = "";
                    if ($scope.vm.viewer.issueDownVos != null && $scope.vm.viewer.issueDownVos.length > 0) {
                        $scope.vm.viewer.activeDownHistory = ""; //하위이슈 히스토리만
                        $scope.vm.viewer.downComment = ""; //하위이슈 댓글만
                        $scope.vm.viewer.activeDownAllHistory = ""; //하위이슈 히스토리+댓글
                        var downTitle = "";
                        var oriDownHistory = [];
                        var oriDownCommentHistory = [];
                        // 하위이슈 히스토리
                        for (var i=0; i<$scope.vm.viewer.issueDownVos.length; i++){
                            oriDownHistory.push($scope.vm.viewer.issueDownVos[i].issueHistoryVos);
                            oriDownCommentHistory.push($scope.vm.viewer.issueDownVos[i].issueCommentVos);
                        }
                        for (var i=0; i<oriDownHistory.length; i++){
                            if ($scope.vm.viewer.activeDownHistory === "") {
                                $scope.vm.viewer.activeDownHistory = oriDownHistory[i];
                            } else {
                                $scope.vm.viewer.activeDownHistory = $scope.vm.viewer.activeDownHistory.concat(oriDownHistory[i]);
                            }
                        }
                        for (var i=0; i<$scope.vm.viewer.activeDownHistory.length; i++){
                            downTitle = "<div class='dot' style='margin-bottom: -8px'>*하위이슈 : "+$scope.vm.viewer.activeDownHistory[i].title+"</div>";
                            $scope.vm.viewer.activeDownHistory[i].desc = downTitle + $scope.vm.viewer.activeDownHistory[i].description;
                        }
                        $scope.vm.viewer.activeDownHistory.sort(function (a, b) {   //내림차순
                            return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0;
                        });
                        // 하위이슈 댓글 히스토리
                       for (var i=0; i<oriDownCommentHistory.length; i++) {
                           if ($scope.vm.viewer.downComment === "") {
                               $scope.vm.viewer.downComment = oriDownCommentHistory[i];
                           } else {
                               $scope.vm.viewer.downComment = $scope.vm.viewer.downComment.concat(oriDownCommentHistory[i]);
                           }
                       }
                       $scope.vm.viewer.issueDownVos.sort(function (a, b) {   //내림차순
                           return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0;
                       });
                       $scope.vm.viewer.activeDownAllHistory = $scope.vm.viewer.downComment.concat($scope.vm.viewer.activeDownHistory);
                       $scope.vm.viewer.activeParentHistory = $scope.vm.viewer.issueCommentVos.concat($scope.vm.viewer.issueHistoryVos);
                       $scope.vm.viewer.activeHistory = $scope.vm.viewer.activeParentHistory.concat($scope.vm.viewer.activeDownAllHistory);
                    }else {
                        $scope.vm.viewer.activeParentHistory = $scope.vm.viewer.issueCommentVos.concat($scope.vm.viewer.issueHistoryVos);
                        $scope.vm.viewer.activeHistory = $scope.vm.viewer.issueCommentVos.concat($scope.vm.viewer.issueHistoryVos);
                    }
                    $scope.vm.viewer.activeParentHistory.sort(function (a, b) {   //내림차순
                        return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0;
                    });
                    $scope.vm.viewer.activeHistory.sort(function (a, b) {   //내림차순
                        return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0;
                    });
                }
@@ -1046,7 +1108,6 @@
                                        $timeout(function () {
                                            SweetAlert.success($filter("translate")("common.deleteSucceeded"), result.data.message.message); // 삭제 성공
                                        }, 100);
                                        $scope.fn.getCommentList();
                                    }
                                    else {
@@ -1069,6 +1130,7 @@
                        if (result.data.message.status === "success") {
                            $scope.vm.viewer.issueCommentVos = result.data.data;
                            $scope.fn.updateActiveHistory();
                        }
                        else {
                            SweetAlert.swal({