111
This commit is contained in:
parent
f44f2999b6
commit
ca284800b9
@ -350,7 +350,7 @@
|
||||
<div class="analysis-con-left-screen-list-right" id="analysis-con-left-screen-list-right-{{index}}">
|
||||
<div class="analysis-chongmingming" data-index="{{index}}" title="重命名指标"></div>
|
||||
<div class="analysis-chongmingming-del" data-index="{{index}}" title="取消重命名"></div>
|
||||
<div class="analysis-shaix" 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-zhibiao" data-index="{{index}}" title="切换为指标选择"></div>
|
||||
<div class="analysis-jia1" data-index="{{index}}" title="添加指标"></div>
|
||||
|
36
web/src/x.min.js
vendored
36
web/src/x.min.js
vendored
@ -2004,7 +2004,7 @@ var X = window.X || {
|
||||
});
|
||||
|
||||
// 添加筛选项
|
||||
$(document).off('click','.analysis-shaix').on('click','.analysis-shaix',function(){
|
||||
$(document).off('click','.analysis-shaix-jinting').on('click','.analysis-shaix-jinting',function(){
|
||||
var obj = $(this);
|
||||
var index = obj.attr("data-index");
|
||||
addscreen(index);
|
||||
@ -7817,6 +7817,7 @@ var X = window.X || {
|
||||
var filtersymbols = [[],[]];//默认两个事件
|
||||
var groupitemeventsdata=[[],[]]//分组项里的事件
|
||||
var type2data = [[],[]];
|
||||
var querydata; //计算后返回的数据
|
||||
|
||||
X.api("data_auth/my_event","get",{},function(d){
|
||||
eventdata = d;
|
||||
@ -7921,7 +7922,7 @@ var X = window.X || {
|
||||
// "comparatorName":"等于",
|
||||
// "ftv":[],
|
||||
// "strftv":"",
|
||||
// "table_type":groupitemeventsdata[0][0]['category'][0]['data_type'],
|
||||
// "tableType":groupitemeventsdata[0][0]['category'][0]['data_type'],
|
||||
// "timeUnit":""
|
||||
// }
|
||||
// data['events'][0]['filts'].push(arr);
|
||||
@ -7937,7 +7938,7 @@ var X = window.X || {
|
||||
// "comparatorName":"等于",
|
||||
// "ftv":[],
|
||||
// "strftv":"",
|
||||
// "table_type":groupitemeventsdata[1][0]['category'][0]['data_type'],
|
||||
// "tableType":groupitemeventsdata[1][0]['category'][0]['data_type'],
|
||||
// "timeUnit":""
|
||||
// }
|
||||
// data['events'][1]['filts'].push(arr);
|
||||
@ -7955,7 +7956,7 @@ var X = window.X || {
|
||||
"comparatorName":"等于",
|
||||
"ftv":[],
|
||||
"strftv":"",
|
||||
"table_type":groupitemeventsdata[0][0]['category'][0]['data_type'],
|
||||
"tableType":groupitemeventsdata[0][0]['category'][0]['data_type'],
|
||||
"timeUnit":""
|
||||
}
|
||||
initialevent.push(arr);
|
||||
@ -7973,7 +7974,7 @@ var X = window.X || {
|
||||
"comparatorName":"等于",
|
||||
"ftv":[],
|
||||
"strftv":"",
|
||||
"table_type":groupitemeventsdata[1][0]['category'][0]['data_type'],
|
||||
"tableType":groupitemeventsdata[1][0]['category'][0]['data_type'],
|
||||
"timeUnit":""
|
||||
}
|
||||
// data['events'][1]['filts'].push(arr);
|
||||
@ -8045,7 +8046,8 @@ var X = window.X || {
|
||||
data['events'][index]['filts'][indexs]['columnDesc'] = htmlstring;
|
||||
data['events'][index]['filts'][indexs]['columnName'] = val.id;
|
||||
data['events'][index]['filts'][indexs]['data_type'] = val.type;
|
||||
data['events'][index]['filts'][indexs]['table_type'] = val.table_type;
|
||||
data['events'][index]['filts'][indexs]['tableType'] = val.table_type;
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
@ -8085,7 +8087,7 @@ var X = window.X || {
|
||||
})
|
||||
});
|
||||
|
||||
$(document).off('click','.analysis-zhibiao-list-type4 input').on('blur','.analysis-zhibiao-list-type4 input',function(){
|
||||
$(document).off('click','.analysis-zhibiao-list-type4 input').on('change','.analysis-zhibiao-list-type4 input',function(){
|
||||
var index = $(this).attr('data-index');
|
||||
var indexs = $(this).attr('data-indexs');
|
||||
var txt = $(this).val();
|
||||
@ -8107,7 +8109,7 @@ var X = window.X || {
|
||||
"ftv":[],//条件
|
||||
"strftv":'',//显示条件
|
||||
"section":[-1,1],//区间
|
||||
"table_type":screentypedata[0]['id']
|
||||
"tableType":screentypedata[0]['id']
|
||||
};
|
||||
data['eventView']['filts'].push(drr);
|
||||
filtsftvdata.push(screentypedata[0]['category'][0]['category']);
|
||||
@ -8148,7 +8150,7 @@ var X = window.X || {
|
||||
data['eventView']['filts'][index]['data_type'] = val.type;
|
||||
data['eventView']['filts'][index]['comparator_name'] = '等于';
|
||||
data['eventView']['filts'][index]['comparator_id'] = '==';
|
||||
data['eventView']['filts'][index]['table_type'] = val.table_type;
|
||||
data['eventView']['filts'][index]['tableType'] = val.tableType;
|
||||
filtsftvdata[index]=val.category;
|
||||
analysisdown();//渲染下拉框
|
||||
})
|
||||
@ -8184,7 +8186,7 @@ var X = window.X || {
|
||||
"columnName": "#account_id",//事件中文显示
|
||||
"column_id": "#account_id",//事件id
|
||||
'data_type': "string",//类型
|
||||
'table_type': "event",
|
||||
'tableType': "event",
|
||||
"ftv":'',//条件
|
||||
"section":''//区间
|
||||
};
|
||||
@ -8204,7 +8206,7 @@ var X = window.X || {
|
||||
data.eventView.groupBy[index]['columnName'] = val.title;
|
||||
data.eventView.groupBy[index]['column_id'] = val.id;
|
||||
data.eventView.groupBy[index]['data_type'] = val.type;
|
||||
data.eventView.groupBy[index]['table_type'] = val.table_type;
|
||||
data.eventView.groupBy[index]['tableType'] = val.tableType;
|
||||
})
|
||||
});
|
||||
|
||||
@ -8212,9 +8214,14 @@ var X = window.X || {
|
||||
$(document).off('click','.sqlquery').on('click','.sqlquery',function(){
|
||||
var obj = $(this);
|
||||
var offset = obj.offset();
|
||||
X.querycriteriapop(data,'conditionquery',offset.left - 410,offset.top+obj.height(),function(){
|
||||
if(querydata){
|
||||
X.querycriteriapop(data,'conditionquery',offset.left - 410,offset.top+obj.height(),function(){
|
||||
|
||||
})
|
||||
})
|
||||
}else {
|
||||
layer.msg('请先计算');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// 时间粒度
|
||||
@ -8248,7 +8255,6 @@ var X = window.X || {
|
||||
|
||||
// 计算按钮
|
||||
$(document).off('click','.analysis-calculation').on('click','.analysis-calculation',function(){
|
||||
// console.log(data);
|
||||
retaineddata()
|
||||
});
|
||||
|
||||
@ -8263,7 +8269,6 @@ var X = window.X || {
|
||||
events: data.events
|
||||
}
|
||||
X.api("ck/retention_model","post",dataArr,function(d){
|
||||
// console.log(data);
|
||||
querydata = d;
|
||||
updata(d)
|
||||
})
|
||||
@ -8564,7 +8569,6 @@ var X = window.X || {
|
||||
|
||||
};
|
||||
|
||||
var querydata;
|
||||
$(document).off('click','.analtsis-chart-switch').on('click','.analtsis-chart-switch',function(){
|
||||
if(querydata){
|
||||
$('.analtsis-chart-switch-box .analtsis-chart-switch').removeClass('select-chart');
|
||||
|
@ -334,7 +334,7 @@
|
||||
});
|
||||
|
||||
// 添加筛选项
|
||||
$(document).off('click','.analysis-shaix').on('click','.analysis-shaix',function(){
|
||||
$(document).off('click','.analysis-shaix-jinting').on('click','.analysis-shaix-jinting',function(){
|
||||
var obj = $(this);
|
||||
var index = obj.attr("data-index");
|
||||
addscreen(index);
|
||||
|
@ -59,6 +59,7 @@
|
||||
var filtersymbols = [[],[]];//默认两个事件
|
||||
var groupitemeventsdata=[[],[]]//分组项里的事件
|
||||
var type2data = [[],[]];
|
||||
var querydata; //计算后返回的数据
|
||||
|
||||
X.api("data_auth/my_event","get",{},function(d){
|
||||
eventdata = d;
|
||||
@ -163,7 +164,7 @@
|
||||
// "comparatorName":"等于",
|
||||
// "ftv":[],
|
||||
// "strftv":"",
|
||||
// "table_type":groupitemeventsdata[0][0]['category'][0]['data_type'],
|
||||
// "tableType":groupitemeventsdata[0][0]['category'][0]['data_type'],
|
||||
// "timeUnit":""
|
||||
// }
|
||||
// data['events'][0]['filts'].push(arr);
|
||||
@ -179,7 +180,7 @@
|
||||
// "comparatorName":"等于",
|
||||
// "ftv":[],
|
||||
// "strftv":"",
|
||||
// "table_type":groupitemeventsdata[1][0]['category'][0]['data_type'],
|
||||
// "tableType":groupitemeventsdata[1][0]['category'][0]['data_type'],
|
||||
// "timeUnit":""
|
||||
// }
|
||||
// data['events'][1]['filts'].push(arr);
|
||||
@ -197,7 +198,7 @@
|
||||
"comparatorName":"等于",
|
||||
"ftv":[],
|
||||
"strftv":"",
|
||||
"table_type":groupitemeventsdata[0][0]['category'][0]['data_type'],
|
||||
"tableType":groupitemeventsdata[0][0]['category'][0]['data_type'],
|
||||
"timeUnit":""
|
||||
}
|
||||
initialevent.push(arr);
|
||||
@ -215,7 +216,7 @@
|
||||
"comparatorName":"等于",
|
||||
"ftv":[],
|
||||
"strftv":"",
|
||||
"table_type":groupitemeventsdata[1][0]['category'][0]['data_type'],
|
||||
"tableType":groupitemeventsdata[1][0]['category'][0]['data_type'],
|
||||
"timeUnit":""
|
||||
}
|
||||
// data['events'][1]['filts'].push(arr);
|
||||
@ -287,7 +288,8 @@
|
||||
data['events'][index]['filts'][indexs]['columnDesc'] = htmlstring;
|
||||
data['events'][index]['filts'][indexs]['columnName'] = val.id;
|
||||
data['events'][index]['filts'][indexs]['data_type'] = val.type;
|
||||
data['events'][index]['filts'][indexs]['table_type'] = val.table_type;
|
||||
data['events'][index]['filts'][indexs]['tableType'] = val.table_type;
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
@ -327,7 +329,7 @@
|
||||
})
|
||||
});
|
||||
|
||||
$(document).off('click','.analysis-zhibiao-list-type4 input').on('blur','.analysis-zhibiao-list-type4 input',function(){
|
||||
$(document).off('click','.analysis-zhibiao-list-type4 input').on('change','.analysis-zhibiao-list-type4 input',function(){
|
||||
var index = $(this).attr('data-index');
|
||||
var indexs = $(this).attr('data-indexs');
|
||||
var txt = $(this).val();
|
||||
@ -349,7 +351,7 @@
|
||||
"ftv":[],//条件
|
||||
"strftv":'',//显示条件
|
||||
"section":[-1,1],//区间
|
||||
"table_type":screentypedata[0]['id']
|
||||
"tableType":screentypedata[0]['id']
|
||||
};
|
||||
data['eventView']['filts'].push(drr);
|
||||
filtsftvdata.push(screentypedata[0]['category'][0]['category']);
|
||||
@ -390,7 +392,7 @@
|
||||
data['eventView']['filts'][index]['data_type'] = val.type;
|
||||
data['eventView']['filts'][index]['comparator_name'] = '等于';
|
||||
data['eventView']['filts'][index]['comparator_id'] = '==';
|
||||
data['eventView']['filts'][index]['table_type'] = val.table_type;
|
||||
data['eventView']['filts'][index]['tableType'] = val.tableType;
|
||||
filtsftvdata[index]=val.category;
|
||||
analysisdown();//渲染下拉框
|
||||
})
|
||||
@ -426,7 +428,7 @@
|
||||
"columnName": "#account_id",//事件中文显示
|
||||
"column_id": "#account_id",//事件id
|
||||
'data_type': "string",//类型
|
||||
'table_type': "event",
|
||||
'tableType': "event",
|
||||
"ftv":'',//条件
|
||||
"section":''//区间
|
||||
};
|
||||
@ -446,7 +448,7 @@
|
||||
data.eventView.groupBy[index]['columnName'] = val.title;
|
||||
data.eventView.groupBy[index]['column_id'] = val.id;
|
||||
data.eventView.groupBy[index]['data_type'] = val.type;
|
||||
data.eventView.groupBy[index]['table_type'] = val.table_type;
|
||||
data.eventView.groupBy[index]['tableType'] = val.tableType;
|
||||
})
|
||||
});
|
||||
|
||||
@ -454,9 +456,14 @@
|
||||
$(document).off('click','.sqlquery').on('click','.sqlquery',function(){
|
||||
var obj = $(this);
|
||||
var offset = obj.offset();
|
||||
X.querycriteriapop(data,'conditionquery',offset.left - 410,offset.top+obj.height(),function(){
|
||||
if(querydata){
|
||||
X.querycriteriapop(data,'conditionquery',offset.left - 410,offset.top+obj.height(),function(){
|
||||
|
||||
})
|
||||
})
|
||||
}else {
|
||||
layer.msg('请先计算');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// 时间粒度
|
||||
@ -490,7 +497,6 @@
|
||||
|
||||
// 计算按钮
|
||||
$(document).off('click','.analysis-calculation').on('click','.analysis-calculation',function(){
|
||||
// console.log(data);
|
||||
retaineddata()
|
||||
});
|
||||
|
||||
@ -505,7 +511,6 @@
|
||||
events: data.events
|
||||
}
|
||||
X.api("ck/retention_model","post",dataArr,function(d){
|
||||
// console.log(data);
|
||||
querydata = d;
|
||||
updata(d)
|
||||
})
|
||||
@ -806,7 +811,6 @@
|
||||
|
||||
};
|
||||
|
||||
var querydata;
|
||||
$(document).off('click','.analtsis-chart-switch').on('click','.analtsis-chart-switch',function(){
|
||||
if(querydata){
|
||||
$('.analtsis-chart-switch-box .analtsis-chart-switch').removeClass('select-chart');
|
||||
|
Loading…
Reference in New Issue
Block a user