diff --git a/web/pages/analysis.html b/web/pages/analysis.html index e6e7079..751d772 100644 --- a/web/pages/analysis.html +++ b/web/pages/analysis.html @@ -357,7 +357,8 @@
-
+
+
diff --git a/web/src/x.min.js b/web/src/x.min.js index c207981..f8465bf 100644 --- a/web/src/x.min.js +++ b/web/src/x.min.js @@ -116,7 +116,7 @@ var X = window.X || { (function(){ //本地 - // var ipurl = "http://10.0.0.77:7889/api/v1/"; + // var ipurl = "http://10.0.0.77:7889/api/v1/"; //线上 var ipurl = "http://139.159.159.3:9865/api/v1/"; //线上测试 @@ -2040,11 +2040,6 @@ var X = window.X || { "filts":[],//全局筛选 "relation":1, "zone_time":'8'//时区 - }, - "cachedata":{ - // filtersymbols:[], - groupitemeventsdata:[], - defaultgroupdata:[], } } @@ -2197,18 +2192,19 @@ var X = window.X || { }) }); - // 切换为指标公式 - $(document).on('click','.analysis-gongshi',function(){ + // 切换为指标公式或组合 + $(document).off('click','.analysis-gongshi').on('click','.analysis-gongshi',function(){ var index = $(this).attr("data-index"); + var type = $(this).attr("data-type"); + data['events'][index]['customType'] = type; $("#analysis-con-left-screen-list-left-box-"+index).hide(); $("#analysis-custom-box-"+index).show(); $(this).hide(); $("#analysis-con-left-screen-list-right-"+index+" "+".analysis-zhibiao").show(); - }); - + // 切换为指标选择 - $(document).on('click','.analysis-zhibiao',function(){ + $(document).off('click','.analysis-zhibiao').on('click','.analysis-zhibiao',function(){ var index = $(this).attr("data-index"); $("#analysis-con-left-screen-list-left-box-"+index).show(); $("#analysis-custom-box-"+index).hide(); @@ -2217,7 +2213,7 @@ var X = window.X || { }); //复制指标 - $(document).on('click','.analysis-fuzhi',function(){ + $(document).off('click','.analysis-fuzhi').on('click','.analysis-fuzhi',function(){ var index = $(this).attr("data-index"); var arr = data.events[index]; data.events.push(arr); @@ -2363,9 +2359,10 @@ var X = window.X || { }; //监听重命名指标 - $(document).off('click','.analysis-con-left-screen-list-left-zhibiaoname input').on('blur','.analysis-con-left-screen-list-left-zhibiaoname input',function(){ + $(document).off('click','.analysis-con-left-screen-list-left-zhibiaoname input').on('change','.analysis-con-left-screen-list-left-zhibiaoname input',function(){ var index = $(this).attr("data-index"); var txt = $(this).val(); + data['events'][index]['eventNameDisplay'] = txt; }); @@ -2472,7 +2469,6 @@ var X = window.X || { $(".analysis-custom-event-box .analysis-custom-event-txt").blur(function(){ $(this).css("border-bottom","0px"); - }); $(document).off('click','.analysis-custom-event-box .analysis-custom-event-txt').on('blur','.analysis-custom-event-box .analysis-custom-event-txt',function(){ @@ -2480,6 +2476,7 @@ var X = window.X || { var obj = $(this); var offset = obj.offset(); var index = obj.attr("data-index"); + console.log(data['events']); data['events'][index]['customEvent'] = $(this).val(); }); @@ -3962,6 +3959,7 @@ var X = window.X || { return; } + // 退出登录 $(document).off('click','.sifnoutlogin').on('click','.sifnoutlogin',function(){ X.gourl("login"); }); diff --git a/web/srczip/common.js b/web/srczip/common.js index ba45a05..9a980ab 100644 --- a/web/srczip/common.js +++ b/web/srczip/common.js @@ -115,7 +115,7 @@ var X = window.X || { (function(){ //本地 - // var ipurl = "http://10.0.0.77:7889/api/v1/"; + // var ipurl = "http://10.0.0.77:7889/api/v1/"; //线上 var ipurl = "http://139.159.159.3:9865/api/v1/"; //线上测试 diff --git a/web/srczip/logic/analysis.js b/web/srczip/logic/analysis.js index c9fd411..241f860 100644 --- a/web/srczip/logic/analysis.js +++ b/web/srczip/logic/analysis.js @@ -30,11 +30,6 @@ "filts":[],//全局筛选 "relation":1, "zone_time":'8'//时区 - }, - "cachedata":{ - // filtersymbols:[], - groupitemeventsdata:[], - defaultgroupdata:[], } } @@ -187,18 +182,19 @@ }) }); - // 切换为指标公式 - $(document).on('click','.analysis-gongshi',function(){ + // 切换为指标公式或组合 + $(document).off('click','.analysis-gongshi').on('click','.analysis-gongshi',function(){ var index = $(this).attr("data-index"); + var type = $(this).attr("data-type"); + data['events'][index]['customType'] = type; $("#analysis-con-left-screen-list-left-box-"+index).hide(); $("#analysis-custom-box-"+index).show(); $(this).hide(); $("#analysis-con-left-screen-list-right-"+index+" "+".analysis-zhibiao").show(); - }); - + // 切换为指标选择 - $(document).on('click','.analysis-zhibiao',function(){ + $(document).off('click','.analysis-zhibiao').on('click','.analysis-zhibiao',function(){ var index = $(this).attr("data-index"); $("#analysis-con-left-screen-list-left-box-"+index).show(); $("#analysis-custom-box-"+index).hide(); @@ -207,7 +203,7 @@ }); //复制指标 - $(document).on('click','.analysis-fuzhi',function(){ + $(document).off('click','.analysis-fuzhi').on('click','.analysis-fuzhi',function(){ var index = $(this).attr("data-index"); var arr = data.events[index]; data.events.push(arr); @@ -353,9 +349,10 @@ }; //监听重命名指标 - $(document).off('click','.analysis-con-left-screen-list-left-zhibiaoname input').on('blur','.analysis-con-left-screen-list-left-zhibiaoname input',function(){ + $(document).off('click','.analysis-con-left-screen-list-left-zhibiaoname input').on('change','.analysis-con-left-screen-list-left-zhibiaoname input',function(){ var index = $(this).attr("data-index"); var txt = $(this).val(); + data['events'][index]['eventNameDisplay'] = txt; }); @@ -462,7 +459,6 @@ $(".analysis-custom-event-box .analysis-custom-event-txt").blur(function(){ $(this).css("border-bottom","0px"); - }); $(document).off('click','.analysis-custom-event-box .analysis-custom-event-txt').on('blur','.analysis-custom-event-box .analysis-custom-event-txt',function(){ @@ -470,6 +466,7 @@ var obj = $(this); var offset = obj.offset(); var index = obj.attr("data-index"); + console.log(data['events']); data['events'][index]['customEvent'] = $(this).val(); }); diff --git a/web/static/css/analysis.css b/web/static/css/analysis.css index 02bc111..2f35d5f 100644 --- a/web/static/css/analysis.css +++ b/web/static/css/analysis.css @@ -82,7 +82,7 @@ .analysis-con-left-screen-list-right-box { display: none; } .analysis-con-left-screen-list-right { margin-right: 8px; display: flex; justify-content: space-between; align-items: center; } -.analysis-con-left-screen-list-right div { width: 24px; height: 24px; border-radius: 2px; margin-left: 8px; cursor: pointer; background-position: center; } +.analysis-con-left-screen-list-right div { width: 24px; height: 24px; border-radius: 2px; margin-left: 8px; cursor: pointer;} .analysis-con-left-screen-list-right div:hover { background-color: #f0f2f5; } .analysis-chongmingming { background: url("../img/chongmingming.png") no-repeat; } .analysis-chongmingming-del { background: url("../img/cha1.png") no-repeat; display: none;} @@ -92,6 +92,7 @@ .analysis-jia1 { background: url("../img/jia1.png") no-repeat; } .analysis-fuzhi { background: url("../img/fuzhi.png") no-repeat; } .analysis-del { background: url("../img/del.png") no-repeat;} +.analysis-zuhe { background: url("../img/zuhe.png") no-repeat !important; } .analysis-con-left-screen-list-left-zhibiaoname { display: none; color: #42546d; height: 24px; margin-left: 32px; padding-bottom: 8px; font-weight: 500; font-size: 13px; line-height: 24px; border: 0px ; } .analysis-con-left-screen-list-left-zhibiaoname input { color: #42546d; border: 0; background-color: rgba(0, 0, 0, 0); } .analysis-con-left-screen-list-left-zhibiaoname2 { border-bottom: 1px solid #f0f0f0; display: block; color: #42546d; height: 24px; margin-left: 7px; padding-bottom: 8px; font-weight: 500; font-size: 13px; line-height: 24px; border: 0px ; } diff --git a/web/static/img/zuhe.png b/web/static/img/zuhe.png new file mode 100644 index 0000000..cac7168 Binary files /dev/null and b/web/static/img/zuhe.png differ