OWL ITS + 탐지시스템(인터넷 진흥원)
wyu
2021-11-29 ab13ec078a26ec1439682ba579b710f6c390f035
src/main/webapp/scripts/app/issue/issueAdd.controller.js
@@ -9,9 +9,9 @@
    ],
    function (app, angular) {
        app.controller('issueAddController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$uibModalInstance', '$uibModal', '$injector',
            '$controller', '$tableProvider', 'SweetAlert', '$timeout', '$stateParams', '$q', 'Issue', 'User', 'AttachedFile', 'IssueType', 'HostingField','Priority', 'Severity', 'IssueTypeCustomField', '$filter', '$state',
            '$controller', '$tableProvider', 'SweetAlert', '$timeout', '$stateParams', '$q', 'Issue', 'User', 'AttachedFile', 'IssueType', 'Priority', 'Severity', 'IssueTypeCustomField', '$filter', '$state',
            function ($scope, $rootScope, $log, $resourceProvider, $uibModalInstance, $uibModal,  $injector, $controller, $tableProvider, SweetAlert, $timeout,
                      $stateParams, $q, Issue, User, AttachedFile, IssueType, HostingField, Priority, Severity, IssueTypeCustomField, $filter, $state) {
                      $stateParams, $q, Issue, User, AttachedFile, IssueType, Priority, Severity, IssueTypeCustomField, $filter, $state) {
                $scope.fn = {
                    cancel : cancel,    //  팝업 창 닫기
@@ -36,8 +36,7 @@
                    removeDepartment : removeDepartment,  //  담당부서 삭제
                    setIssueTypeTemplate : setIssueTypeTemplate,    //  이슈 유형 템플릿 적용하기
                    startExecute : startExecute, //  컨트롤 로딩시 처음으로 시작되는 함수
                    containsPartner : containsPartner,
                    getPartners : getPartners
                    containsPartner : containsPartner
                };
                $scope.vm = {
@@ -133,19 +132,12 @@
                $scope.$watch("vm.form.projects", function (newValue, oldValue) {
                    if (angular.isDefined(newValue)) {
                        if (newValue.length < 1) {
                            $scope.vm.form.departments = [];
                            $scope.vm.form.issueCustomFields = [];
                            $scope.vm.form.users = [];
                        }
                        else {
                            if ($rootScope.isDefined($scope.vm.issueTypeId)) {
                                $scope.fn.getIssueTypeCustomFields();
                            }
                        }
                    }
                });
                $scope.$watch("vm.form.issueTypeId", function (newValue, oldValue) {
                    $scope.vm.partnerVos = $scope.fn.getPartners();
                        //  이슈 유형에 연결된 사용자 정의 필드 가져오기
                        $scope.fn.getIssueTypeCustomFields();
                    }
                });
                //  섬머노트 이미지 업로드
@@ -322,14 +314,15 @@
                function containsPartner(name) {
                    var result = false;
                    if ($scope.vm.partnerVos != null) {
                        $scope.vm.partnerVos.forEach(function (partnerVo) {
                    if ($scope.vm.viewer.usePartnerVo != null) {
                        $scope.vm.viewer.usePartnerVo.forEach(function (partnerVo) {
                            if (name === partnerVo.name) {
                                result = true;
                            }
                        });
                    }
                    return result;
                }
                //  담당자 autocomplete page 업데이트트
@@ -761,19 +754,6 @@
                        }
                    }
                }
                function getPartners() {
                    HostingField.getPartnerList($resourceProvider.getContent(
                        {},
                        $resourceProvider.getPageContent(0, 1))).then(function (result) {
                        if (result.data.message.status === "success") {
                            $scope.vm.partnerVos = result.data.content;
                        }
                    });
                }
                //  최초 실행
                function startExecute() {