OWL ITS + 탐지시스템(인터넷 진흥원)
jhjang
2021-12-24 f846fa62722566a00436c0ebfc394e9ddf1c0cb6
- 통합 검색 완료
4개 파일 변경됨
94 ■■■■■ 파일 변경됨
src/main/webapp/scripts/app/common/common.controller.js 19 ●●●● 패치 | 보기 | raw | blame | 히스토리
src/main/webapp/scripts/app/issue/issueList.controller.js 46 ●●●●● 패치 | 보기 | raw | blame | 히스토리
src/main/webapp/scripts/app/issue/issueManager.controller.js 9 ●●●●● 패치 | 보기 | raw | blame | 히스토리
src/main/webapp/scripts/config.js 20 ●●●●● 패치 | 보기 | raw | blame | 히스토리
src/main/webapp/scripts/app/common/common.controller.js
@@ -58,17 +58,18 @@
                    //}
                });
                $rootScope.$on("$stateChangeStart", function (event, toState, toStateParams) {
                    var keyWord = $rootScope.getCookie("searchKeyword");
                    if (keyWord == null || keyWord === '') {
                        $scope.vm.searchAll.keyWord = "";
                    }
                });
                // 메인 상단 검색
                function searchAll() {
                    if ($state.current.name !== "issues.list") {
                        // $state.go("issues.list");
                        var myUrl = window.location.href.split('#/');
                        location.href = myUrl[0] + "#/issues/issueList?keyWord=" + $scope.vm.searchAll.keyWord;
                    } else {
                        $scope.$broadcast("searchIssueList", {keyWord: $scope.vm.searchAll.keyWord});
                    }
                    //$scope.vm.searchAll.keyWord = "";
                    //$rootScope.previousGetParams = null;
                    $rootScope.setCookie("searchKeyword", $scope.vm.searchAll.keyWord, 60000);
                    moveMenu("issues.list");
                }
                function setLastIssueType() {
src/main/webapp/scripts/app/issue/issueList.controller.js
@@ -66,15 +66,13 @@
                        issueStatusIds : [],    //  이슈 상태 검색
                        issueTypeIds : []   //  이슈 유형 검색
                    },
                    searchAll : {
                        keyWord : "", //  전체 검색
                    },
                    searchView : false, //  상세 검색 조건 표시 여부
                    detailView : false, //  상세 모드 변경 값
                    page : {
                        selectedPage : 0,
                        selectedPageRowCount : String(10)
                    },
                    tableConfigs : [],  //  테이블 셋팅 정보
                    treeConfigs : [], // 트리 셋팅 정보
                    responseData : {
@@ -130,14 +128,8 @@
                $scope.$on("changedIssueListMenu", function (event, args) {
                    $scope.vm.search.keyWord = "";
                    $scope.vm.searchAll.keyWord = "";
                    $scope.fn.getPageList($scope.vm.page.selectedPage - 1);
                });
                // 상단 검색시
                $scope.$on("searchIssueList", function (event, args) {
                    $scope.vm.search.keyWord = args.keyWord;
                    $scope.fn.getPageList(0);
                    $rootScope.isMainSearch = false;
                    //$scope.fn.getPageList($scope.vm.page.selectedPage - 1);
                });
                //  검색 조건을 기억한다. - 적용 보류
@@ -167,7 +159,7 @@
                }
                //  서버에 저장한 이슈 검색 조건을 가져온다.
                function getVmSearchObject() {
                function getVmSearchObject(keyWord = null) {
                    IssueSearch.detail($resourceProvider.getContent({}, $resourceProvider.getPageContent(0, 0))).then(function (result) {
@@ -181,9 +173,9 @@
                                // $scope.vm.projects = issueListSearchObject.projects;
                                // $scope.vm.registers = issueListSearchObject.registers;
                                $scope.fn.getPageList(0, true);
                                $scope.fn.getPageList(0, true, keyWord);
                            } else {
                                $scope.fn.getPageList(0);
                                $scope.fn.getPageList(0, false, keyWord);
                            }
                        }
                        else {
@@ -597,14 +589,17 @@
                }
                //  이슈 목록을 조회한다.
                function getPageList(selectedPage, detail = false, keyWord = "") {
                function getPageList(selectedPage, detail = false, keyWord = null) {
                    $rootScope.spinner = true;  //  프로그래스 바
                    if (selectedPage < 0) {
                        selectedPage = 0;
                    }
                    if (keyWord !== "") {
                    if (keyWord != null) {
                        $scope.vm.search.keyWord = keyWord;
                        $rootScope.isMainSearch = true;
                        $rootScope.$broadcast("getPageListKeyWord", {keyWord: $scope.vm.search.keyWord});
                    }
                    if ($scope.vm.hideCompleteIssue) {
@@ -628,7 +623,7 @@
                    // 검색 기본값 세팅
                    $scope.vm.search.issueTypeIds = [];
                    $scope.vm.projects = [];
                    if ($scope.vm.searchAll.keyWord == null || $scope.vm.searchAll.keyWord === "") {
                    if (keyWord == null || keyWord === '') {
                        // 메뉴에서 선택된 이슈 유형을 기본으로 추가
                        if ($rootScope.issueTypeMenu != null) {
                            //$scope.vm.pageTitle = $rootScope.issueTypeMenu.name;
@@ -654,6 +649,9 @@
                    //  이슈 검색 조건을 만든다.
                    var conditions = $scope.fn.makeSearchConditions();
                    if ($rootScope.previousGetParams != null)
                        $rootScope.previousGetParams = null;
                    Issue.find($resourceProvider.getContent(conditions,
                        $resourceProvider.getPageContent(currentPage, $scope.vm.page.selectedPageRowCount))).then(function (result) {
@@ -1260,13 +1258,21 @@
                //  최초 실행
                function startExecute() {
                    // 쿠키 읽기
                    var paramKeyWord = null;
                    var keyWord = $rootScope.getCookie("searchKeyword");
                    if (keyWord != null && keyWord !== '') {
                        paramKeyWord = keyWord;
                        $rootScope.deleteCookie("searchKeyword");
                    }
                    // 파라미터 읽기
                    var params = $rootScope.previousGetParams;
                    if ($rootScope.isDefined(params)) {
                        // $rootScope.$broadcast("makeIssueSearch", {  projectKey : params.projectKey, issueNumber : params.issueNumber });
                         if (params.keyWord != null) {
                             $scope.vm.searchAll.keyWord = params.keyWord;
                             getPageList(0,false, params.keyWord);
                             paramKeyWord = params.keyWord;
                         }else {
                            getDetailList(params.projectKey, params.issueNumber);
                            return;
@@ -1304,7 +1310,7 @@
                            //  이슈 테이블 설정
                            $scope.fn.makeTableConfigs();
                            //  서버에 저장한 이슈 검색 조건을 가져와서 이슈 목록 검색을 진행한다.
                            $scope.fn.getVmSearchObject();
                            $scope.fn.getVmSearchObject(paramKeyWord);
                        });
                    });
                }
src/main/webapp/scripts/app/issue/issueManager.controller.js
@@ -47,12 +47,13 @@
                });
                // 상단 검색시
                if ($rootScope.previousGetParams != null && $rootScope.previousGetParams.keyWord != null && $rootScope.previousGetParams.keyWord !== "") {
                $scope.$on("searchIssueList", function (event, args) {
                    $scope.vm.pageTitle = $filter("translate")("issue.searchIssue");
                }
                /*$scope.$on("searchIssueList", function (event, args) {
                });
                $scope.$on("getPageListKeyWord", function (event, args) {
                    $scope.vm.pageTitle = $filter("translate")("issue.searchIssue");
                });*/
                });
                function start() {
                    if ($rootScope.issueTypeMenu != null) {
src/main/webapp/scripts/config.js
@@ -119,6 +119,8 @@
                    file : 314572800    //  100MB
                };
                $rootScope.isMainSearch = false;   // 통합 검색 여부
                //  테이블 설정 및 기능을 관리하는 서비스
                $rootScope.$tableProvider = $tableProvider;
@@ -258,6 +260,24 @@
                    "USER_PERMISSION_MNG_GUIDE" : 2,
                };
                // 쿠키 저장
                $rootScope.setCookie = function (name, value, exp) {
                    var date = new Date();
                    date.setTime(date.getTime() + exp*24*60*60*1000);
                    document.cookie = name + '=' + value + ';expires=' + date.toUTCString() + ';path=/';
                };
                // 쿠키 가져오기
                $rootScope.getCookie = function (name) {
                    var value = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)');
                    return value? value[2] : null;
                }
                // 쿠키 삭제
                $rootScope.deleteCookie = function (name) {
                    document.cookie = name + '=; expires=Thu, 01 Jan 1999 00:00:10 GMT;';
                }
                // 현재 선택된 이슈 타입 아이디 가져오기
                $rootScope.getCurrentIssueTypeId = function () {
                    return $rootScope.issueTypeMenu != null ? $rootScope.issueTypeMenu.id : null;