OWL ITS + 탐지시스템(인터넷 진흥원)
이민희
2021-12-08 ab5d57055cf4c9943468baaa8934e0e9aa943894
src/main/webapp/scripts/components/utils/autoComplete.controller.js
@@ -312,6 +312,8 @@
                function getIssueDepartmentList(query, excludeList, page, callBack) {
                    var conditions = {
                        //issueTypeId : $scope.vm.form.issueTypeId,
                        issueTypeId : $rootScope.currentDetailIssueId,
                        departmentName : query,
                        userId : $rootScope.user.id,
                        projectId : (function () {
@@ -339,15 +341,23 @@
                    var deferred = $q.defer();
                    //프로젝트에 속해있는 담당부서 찾기
                    UserWorkspace.findProjectDepartment($resourceProvider.getContent(         //  페이징 업데이트가 필요한 컴포넌트 일경우, page 업데이트가 있을 경우 기본 10개씩 가져오고 아닐경우 25개씩 가져온다.
                    //워크플로우에 속해있는 담당부서 찾기
                    UserWorkspace.findWorkflowDepartment($resourceProvider.getContent(         //  페이징 업데이트가 필요한 컴포넌트 일경우, page 업데이트가 있을 경우 기본 10개씩 가져오고 아닐경우 25개씩 가져온다.
                        conditions, $resourceProvider.getPageContent($rootScope.isDefined(page) ? page : 0, $rootScope.isDefined(page) ? 10 : 25))).then(function (result) {
                        if (result.data.message.status === "success") {
                            const departments = result.data.data;
                            if(departments != null){
                                var filterDepartments = departments.filter(function(item, idx){
                                    return departments.findIndex(function(item2, idx2){
                                        return item.departmentName === item2.departmentName
                                    }) == idx;
                                });
                            }
                            if ($rootScope.isDefined(callBack)) {
                                callBack(result);
                            }
                            deferred.resolve(result.data.data);
                            deferred.resolve(filterDepartments);
                        }
                        else {
                            SweetAlert.swal($filter("translate")("common.failedToProjectListLookUp"), result.data.message.message, "error"); // "프로젝트 목록 조회 실패"