OWL ITS + 탐지시스템(인터넷 진흥원)
이민희
2022-03-17 916a3cbabe4e50062fce61ff6f2f5d46c05dfbd1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
'use strict';
 
define(['app'],
    function (app) {
        app.directive('jsTree', ['$log',
            function ($log) {
                return {
                    restrict : 'E',
                    scope : {
                        event : '=',
                        data : '=',
                        tableConfigs : '=',
                        useSort : '=', // 정령 기능 사용 여부
                        detailView : "="    //  이슈 목록 상세형 변경을 위해 사용. 다른 화면은 사용하지 않음.
                    },
                    replace : true,
                    templateUrl : '/custom_components/js-tree/js-tree.html',
                    controller : function ($scope, $element, $attrs) {
                        $scope.fn = {
                            getResponseData : getResponseData
                        }
 
                        //  테이블 정보 가져오기
                        function getResponseData() {
                            const data = $scope.data;
 
                            var filterData = data.filter(function(item, idx){
                                return data.findIndex(function(item2, idx2){
                                    return item.id === item2.id
                                }) == idx;
                            });
 
                            return filterData;
                        }
                    },
                    link : function (scope, element, attrs) {
 
                    },
 
                };
            }])
    });