This commit is contained in:
罗松柏 2021-09-10 15:32:33 +08:00
parent 22ddc61e25
commit a7265a6df9
6 changed files with 27 additions and 30 deletions

View File

@ -357,7 +357,8 @@
<div class="analysis-chongmingming" data-index="{{index}}" title="重命名指标"></div> <div class="analysis-chongmingming" data-index="{{index}}" title="重命名指标"></div>
<div class="analysis-chongmingming-del" data-index="{{index}}" title="取消重命名"></div> <div class="analysis-chongmingming-del" data-index="{{index}}" title="取消重命名"></div>
<div class="analysis-shaix analysis-shaix-jinting" data-index="{{index}}" title="指标筛选"></div> <div class="analysis-shaix analysis-shaix-jinting" data-index="{{index}}" title="指标筛选"></div>
<div class="analysis-gongshi" data-index="{{index}}" title="切换为指标公式"></div> <div class="analysis-gongshi analysis-zuhe" data-index="{{index}}" data-type="combination" title="组合"></div>
<div class="analysis-gongshi" data-index="{{index}}" data-type="formula" title="切换为指标公式"></div>
<div class="analysis-zhibiao" data-index="{{index}}" title="切换为指标选择"></div> <div class="analysis-zhibiao" data-index="{{index}}" title="切换为指标选择"></div>
<div class="analysis-jia1" data-index="{{index}}" title="添加指标"></div> <div class="analysis-jia1" data-index="{{index}}" title="添加指标"></div>
<div class="analysis-fuzhi" title="复制指标" data-index="{{index}}"></div> <div class="analysis-fuzhi" title="复制指标" data-index="{{index}}"></div>

26
web/src/x.min.js vendored
View File

@ -116,7 +116,7 @@ var X = window.X || {
(function(){ (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/"; var ipurl = "http://139.159.159.3:9865/api/v1/";
//线上测试 //线上测试
@ -2040,11 +2040,6 @@ var X = window.X || {
"filts":[],//全局筛选 "filts":[],//全局筛选
"relation":1, "relation":1,
"zone_time":'8'//时区 "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 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-con-left-screen-list-left-box-"+index).hide();
$("#analysis-custom-box-"+index).show(); $("#analysis-custom-box-"+index).show();
$(this).hide(); $(this).hide();
$("#analysis-con-left-screen-list-right-"+index+" "+".analysis-zhibiao").show(); $("#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"); var index = $(this).attr("data-index");
$("#analysis-con-left-screen-list-left-box-"+index).show(); $("#analysis-con-left-screen-list-left-box-"+index).show();
$("#analysis-custom-box-"+index).hide(); $("#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 index = $(this).attr("data-index");
var arr = data.events[index]; var arr = data.events[index];
data.events.push(arr); 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 index = $(this).attr("data-index");
var txt = $(this).val(); var txt = $(this).val();
data['events'][index]['eventNameDisplay'] = txt; data['events'][index]['eventNameDisplay'] = txt;
}); });
@ -2472,7 +2469,6 @@ var X = window.X || {
$(".analysis-custom-event-box .analysis-custom-event-txt").blur(function(){ $(".analysis-custom-event-box .analysis-custom-event-txt").blur(function(){
$(this).css("border-bottom","0px"); $(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(){ $(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 obj = $(this);
var offset = obj.offset(); var offset = obj.offset();
var index = obj.attr("data-index"); var index = obj.attr("data-index");
console.log(data['events']);
data['events'][index]['customEvent'] = $(this).val(); data['events'][index]['customEvent'] = $(this).val();
}); });
@ -3962,6 +3959,7 @@ var X = window.X || {
return; return;
} }
// 退出登录
$(document).off('click','.sifnoutlogin').on('click','.sifnoutlogin',function(){ $(document).off('click','.sifnoutlogin').on('click','.sifnoutlogin',function(){
X.gourl("login"); X.gourl("login");
}); });

View File

@ -115,7 +115,7 @@ var X = window.X || {
(function(){ (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/"; var ipurl = "http://139.159.159.3:9865/api/v1/";
//线上测试 //线上测试

View File

@ -30,11 +30,6 @@
"filts":[],//全局筛选 "filts":[],//全局筛选
"relation":1, "relation":1,
"zone_time":'8'//时区 "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 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-con-left-screen-list-left-box-"+index).hide();
$("#analysis-custom-box-"+index).show(); $("#analysis-custom-box-"+index).show();
$(this).hide(); $(this).hide();
$("#analysis-con-left-screen-list-right-"+index+" "+".analysis-zhibiao").show(); $("#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"); var index = $(this).attr("data-index");
$("#analysis-con-left-screen-list-left-box-"+index).show(); $("#analysis-con-left-screen-list-left-box-"+index).show();
$("#analysis-custom-box-"+index).hide(); $("#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 index = $(this).attr("data-index");
var arr = data.events[index]; var arr = data.events[index];
data.events.push(arr); 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 index = $(this).attr("data-index");
var txt = $(this).val(); var txt = $(this).val();
data['events'][index]['eventNameDisplay'] = txt; data['events'][index]['eventNameDisplay'] = txt;
}); });
@ -462,7 +459,6 @@
$(".analysis-custom-event-box .analysis-custom-event-txt").blur(function(){ $(".analysis-custom-event-box .analysis-custom-event-txt").blur(function(){
$(this).css("border-bottom","0px"); $(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(){ $(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 obj = $(this);
var offset = obj.offset(); var offset = obj.offset();
var index = obj.attr("data-index"); var index = obj.attr("data-index");
console.log(data['events']);
data['events'][index]['customEvent'] = $(this).val(); data['events'][index]['customEvent'] = $(this).val();
}); });

View File

@ -82,7 +82,7 @@
.analysis-con-left-screen-list-right-box { display: none; } .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 { 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-con-left-screen-list-right div:hover { background-color: #f0f2f5; }
.analysis-chongmingming { background: url("../img/chongmingming.png") no-repeat; } .analysis-chongmingming { background: url("../img/chongmingming.png") no-repeat; }
.analysis-chongmingming-del { background: url("../img/cha1.png") no-repeat; display: none;} .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-jia1 { background: url("../img/jia1.png") no-repeat; }
.analysis-fuzhi { background: url("../img/fuzhi.png") no-repeat; } .analysis-fuzhi { background: url("../img/fuzhi.png") no-repeat; }
.analysis-del { background: url("../img/del.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 { 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-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 ; } .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 ; }

BIN
web/static/img/zuhe.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B