From 813a0495502daa59e5c78ecffb66db48d4cf9720 Mon Sep 17 00:00:00 2001
From: wyu <kknd09321@nate.com>
Date: 월, 20 12월 2021 18:30:00 +0900
Subject: [PATCH] 이슈리스트 새로고침 수정

---
 src/main/webapp/scripts/app/issue/issueList.controller.js |   67 +++++++++++++++++++++++++++------
 1 files changed, 55 insertions(+), 12 deletions(-)

diff --git a/src/main/webapp/scripts/app/issue/issueList.controller.js b/src/main/webapp/scripts/app/issue/issueList.controller.js
index 7193801..d7d74e8 100644
--- a/src/main/webapp/scripts/app/issue/issueList.controller.js
+++ b/src/main/webapp/scripts/app/issue/issueList.controller.js
@@ -24,6 +24,7 @@
                     add : add,   //  �씠�뒋 �깮�꽦
                     modify : modify,    //  �씠�뒋 �닔�젙
                     addRelationIssueForm : addRelationIssueForm,    //  �뿰愿� �씠�뒋 異붽�
+                    addDownIssueForm : addDownIssueForm,    //  �븯�쐞 �씠�뒋 異붽�
                     modifyMultiIssueStatus : modifyMultiIssueStatus,    //  �씠�뒋 �떎以� �긽�깭 蹂�寃�
                     removes : removes,  //  �씠�뒋 �궘�젣
                     addIssueTableConfig : addIssueTableConfig,    //  �씠�뒋 紐⑸줉 �뀒�씠釉� �꽕�젙
@@ -47,6 +48,7 @@
 
                 //  蹂��닔
                 $scope.vm = {
+                    projectId : "",
                     issueTypeId : "",
                     partnerVos : "",
                     search : {
@@ -90,7 +92,8 @@
                     issueTableConfigs : [],  //  �씠�뒋 �뀒�씠釉� �꽕�젙
                     issueTreeConfigs : [],  //  �씠�뒋 �뀒�씠釉� �꽕�젙
                     parentIssueId : "",
-                    hideIssue : false,
+                    hideCompleteIssue : false,
+                    hideDownIssue : true,
                     listMode : 0, // 紐⑸줉 紐⑤뱶 0:湲곕낯 由ъ뒪�듃 1:�듃由ш뎄議� 由ъ뒪�듃
                 };
 
@@ -101,10 +104,20 @@
 
                 angular.extend(this, $controller('autoCompleteController', {$scope : $scope, $injector : $injector}));
 
+                // �씠�뒋紐⑸줉 �깉濡쒓퀬移� 紐⑸줉 媛깆떊
+                $scope.$on("findIssueListOK", function (event, args) {
+                    if (args != null) {
+                        $scope.fn.startExecute();
+                    }
+                });
+
                 //  �씠�뒋 紐⑸줉 �뜲�씠�꽣 媛깆떊
                 $scope.$on("getIssueList", function () {
                     $scope.fn.getPageList($scope.vm.page.selectedPage - 1);
                 });
+
+                // �씠�뒋 紐⑸줉 �깉濡쒓퀬移�
+                $rootScope.$on("getIssueList", function (event, args) {})
 
                 //  �씠�뒋 �뀒�씠釉� �꽕�젙 �젙蹂� 媛깆떊
                 $scope.$on("getIssueTableConfigs", function () {
@@ -119,7 +132,6 @@
                 $scope.$on("searchIssueList", function (event, args) {
                     $scope.vm.search.keyWord = args.keyWord;
                     $scope.fn.getPageList(0);
-                    $rootScope.isMainSearch = false;
                 });
 
                 //  寃��깋 議곌굔�쓣 湲곗뼲�븳�떎. - �쟻�슜 蹂대쪟
@@ -441,7 +453,8 @@
                         endStartDate : "",
                         beginCompleteDate : "",
                         endCompleteDate : "",
-                        hideIssue : $scope.vm.hideIssue,
+                        hideCompleteIssue: $scope.vm.hideCompleteIssue,
+                        hideDownIssue : $scope.vm.hideDownIssue,
                         isTree : $scope.vm.listMode === 1,
                         projectIds : (function () {
                             var projectIds = [];
@@ -574,8 +587,12 @@
                         selectedPage = 0;
                     }
 
-                    if ($scope.vm.hideIssue) {
-                        $scope.vm.hideIssue = true;
+                    if ($scope.vm.hideCompleteIssue) {
+                        $scope.vm.hideCompleteIssue = true;
+                    }
+
+                    if ($scope.vm.hideDownIssue) {
+                        $scope.vm.hideDownIssue = true;
                     }
                     //  �쁽�옱 �럹�씠吏� �젙蹂�
                     var currentPage = 0;
@@ -588,15 +605,13 @@
                         currentPage = selectedPage;
                     }
 
-
-
                     // 寃��깋 湲곕낯媛� �꽭�똿
                     $scope.vm.search.issueTypeIds = [];
                     $scope.vm.projects = [];
                     if (!$rootScope.isMainSearch) {
                         // 硫붾돱�뿉�꽌 �꽑�깮�맂 �씠�뒋 �쑀�삎�쓣 湲곕낯�쑝濡� 異붽�
                         if ($rootScope.issueTypeMenu != null) {
-                            // $scope.vm.pageTitle = $rootScope.issueTypeMenu.name;
+                            //$scope.vm.pageTitle = $rootScope.issueTypeMenu.name;
 
                             $scope.vm.search.issueTypeIds.push({
                                 fieldKey: $rootScope.issueTypeMenu.id,
@@ -624,12 +639,16 @@
 
                         if (result.data.message.status === "success") {
                             if (result.data.data !=  null && result.data.data.length > 0) {
+                                //var resultSize = result.data.data.length;
                                 for (var i = 0; i < result.data.data.length; i++) {
-                                    if (result.data.data[i].parentIssueId != null) {
+                                    /*if (result.data.data[i].parentIssueId != null) {//�븯�쐞�씠�뒋�뒗 由ъ뒪�듃�뿉�꽌 �궘�젣
                                         result.data.data.splice(i, 1);
-                                    }else if ($scope.vm.search.issueTypeIds !== null && $scope.vm.search.issueTypeIds.length > 0
-                                            && result.data.data[i].issueTypeId !== $scope.vm.search.issueTypeIds[0].fieldKey) {
+                                        i--;
+                                    }else*/
+                                    if ($scope.vm.search.issueTypeIds !== null && $scope.vm.search.issueTypeIds.length > 0
+                                                && result.data.data[i].issueTypeId !== $scope.vm.search.issueTypeIds[0].fieldKey) { //�씠�뒋���엯 泥댄겕
                                         result.data.data.splice(i, 1);
+                                        i--;
                                     }
                                 }
                             }
@@ -733,6 +752,7 @@
                     angular.forEach($scope.vm.responseData.data, function (data) {
                         if (data.checked) {
                             issueIds.push(data.id);
+                            $scope.vm.projectId = data.projectId;
                         }
                     });
 
@@ -749,7 +769,8 @@
                         resolve : {
                             parameter : function () {
                                 return {
-                                    issueIds : issueIds
+                                    issueIds : issueIds,
+                                    projectId : $scope.vm.projectId
                                 };
                             }
                         }
@@ -778,6 +799,22 @@
                         templateUrl : 'views/issue/issueAddRelation.html',
                         size : "lg",
                         controller : 'issueAddRelationController',
+                        backdrop : 'static',
+                        resolve : {
+                            parameter : function () {
+                                return {
+                                    id : id,
+                                };
+                            }
+                        }
+                    });
+                }
+
+                function addDownIssueForm(id) {
+                    $uibModal.open({
+                        templateUrl : 'views/issue/issueAddDown.html',
+                        size : "lg",
+                        controller : 'issueAddDownController',
                         backdrop : 'static',
                         resolve : {
                             parameter : function () {
@@ -1248,6 +1285,12 @@
                     });
                 }
 
+                // this.router.navigate(['path/to'])
+                //     .then(() => {
+                //         window.location.reload();
+                //     });
+
+
                 $scope.fn.startExecute();
             }
 

--
Gitblit v1.8.0