111
This commit is contained in:
parent
b47dfd31b0
commit
31e4e11343
File diff suppressed because one or more lines are too long
@ -403,7 +403,16 @@
|
||||
<div class="analysis-overall-situation-attr" data-index="{{index}}">{{item.columnDesc}}</div>
|
||||
<div class="analysis-overall-situation-fuhao" id="analysis-overall-situation-fuhao-{{index}}" data-index="{{index}}" data-type="{{item.data_type}}" >{{item.comparator_name}}</div>
|
||||
{{# if(item.comparator_id != "is null" && item.comparator_id != "is not null" && item.comparator_id !="not null" && item.comparator_id != "range"){ }}
|
||||
<div class="analysis-overall-situation-input" > <input type="text" data-index="{{index}}" placeholder="多个用,隔开" value="{{item.strftv}}" /> </div>
|
||||
<!-- <div class="analysis-overall-situation-input" > <input type="text" data-index="{{index}}" placeholder="多个用,隔开" value="{{item.strftv}}" /> </div> -->
|
||||
{{# if(item.data_type != "datetime"){ }}
|
||||
<div class="analysis-overall-situation-input" data-type="{{item.data_type}}">
|
||||
<input type="text" data-index="{{index}}" placeholder="多个用,隔开" value="{{item.strftv}}" data-type="{{item.data_type}}"/>
|
||||
</div>
|
||||
{{# } else { }}
|
||||
<div class="analysis-overall-situation-date" id="analysis-overall-situation-date{{index}}" data-type="{{item.data_type}}" data-index="{{index}}">
|
||||
{{item.ftv}}
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
|
||||
{{# if(item.comparator_id === "range"){ }}
|
||||
|
@ -161,7 +161,7 @@
|
||||
<div class="showsetup-box">
|
||||
<div class="showsetup-box-zz"></div>
|
||||
<div class="showsetup-down-box">
|
||||
<form class="layui-form" action="">
|
||||
<form class="layui-form" action="" lay-filter="showsetupexample">
|
||||
<div class="showsetup-radio-box">
|
||||
<input type="radio" name="showsetup" value="all" title="全部显示" checked="" lay-filter="showsetup">
|
||||
</div>
|
||||
|
358
web/src/x.min.js
vendored
358
web/src/x.min.js
vendored
@ -94,11 +94,11 @@ var X = window.X || {
|
||||
{'title':'合计','id':'total'},
|
||||
],
|
||||
'retention':[
|
||||
{'title':'当日','id':'1'},
|
||||
{'title':'次日','id':'2'},
|
||||
{'title':'7日','id':'7'},
|
||||
{'title':'14日','id':'14'},
|
||||
{'title':'30日','id':'30'}
|
||||
{'title':'当日','id':1},
|
||||
{'title':'次日','id':2},
|
||||
{'title':'7日','id':7},
|
||||
{'title':'14日','id':14},
|
||||
{'title':'30日','id':30}
|
||||
],
|
||||
'distribution':[
|
||||
{'title':'按天','id':'P1D'},
|
||||
@ -853,7 +853,7 @@ var X = window.X || {
|
||||
|
||||
if(data['filter_item_type'] != "all" && data['filter_item_type'] != "" && data['filter_item_type']){
|
||||
var filteritem = data['filter_item'];
|
||||
if(data['days'].length >= 7){
|
||||
if(data['days'].length >= 0){
|
||||
var filterarr = [];
|
||||
for(let i in data['days']){
|
||||
for(let j in filteritem){
|
||||
@ -915,7 +915,7 @@ var X = window.X || {
|
||||
}
|
||||
}else {
|
||||
for(let i in data['days']){
|
||||
var tit = "第" + i + "日";
|
||||
var tit = "第" + data['days'][i] + "日";
|
||||
titdata.push(tit);
|
||||
}
|
||||
}
|
||||
@ -1321,9 +1321,27 @@ var X = window.X || {
|
||||
|
||||
window.onhashchange = function(){
|
||||
// console.log( getHashParms() );
|
||||
var page = X.DATA['page'];
|
||||
var urlinfo = getHashParms();
|
||||
// if(urlinfo.page == 'dashboard'){
|
||||
// for(let i in X.DATA['ProjectData']){
|
||||
// for(let j in X.DATA['ProjectData'][i]['children']){
|
||||
// if(X.DATA['ProjectData'][i]['children'][j]['_id'] == urlinfo.menu){
|
||||
// $(".tab-tit-box .tab-tit").html(X.DATA['ProjectData'][i]['children'][j]['name']);
|
||||
// X.DATA['ProjectData'][i]['children'][j]['onclick'] = 1;
|
||||
// }else{
|
||||
// X.DATA['ProjectData'][i]['children'][j]['onclick'] = 0;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// X.laytpldata('#kongjian-dot',X.DATA['ProjectData'],'#kongjian');
|
||||
// X.DATA['page'] = urlinfo.page;
|
||||
// console.log(urlinfo.page);
|
||||
// console.log(urlinfo.menu);
|
||||
// if(page != urlinfo.page){
|
||||
// X.gourl(urlinfo.page,'conetnt');
|
||||
// }
|
||||
// X.DATA['dashboard_id'] = urlinfo.menu;
|
||||
// X.pageLogic['dashboard'].gettabledata();
|
||||
// }
|
||||
@ -2269,7 +2287,9 @@ var X = window.X || {
|
||||
|
||||
X.laytpldata("#analysis-con-left-screen-list-dot",d.query.events,".analysis-con-left-screen-list-box");
|
||||
X.laytpldata("#analysis-gpmain___3YGfw-dot",d.query.eventView.groupBy,".analysis-gpmain___3YGfw");
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",d.query['eventView']['filts'],".analysis-overall-situation-list-box");
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",d.query['eventView']['filts'],".analysis-overall-situation-list-box",function(){
|
||||
renderdate();
|
||||
});
|
||||
// analysisdown();
|
||||
calculationdata();
|
||||
}
|
||||
@ -2722,26 +2742,12 @@ var X = window.X || {
|
||||
}else{
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
}
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",data['eventView']['filts'],".analysis-overall-situation-list-box");
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",data['eventView']['filts'],".analysis-overall-situation-list-box",function(){
|
||||
renderdate();
|
||||
});
|
||||
// analysisdown();
|
||||
});
|
||||
|
||||
//循环给条件框渲染下拉框
|
||||
// function analysisdown(){
|
||||
// for(let i in data['eventView']['filts']){
|
||||
// X.laydropdown("#analysis-overall-situation-fuhao-"+i,filtsftvdata[i],function(val){
|
||||
// $(this).html(val.title);
|
||||
// data['eventView']['filts'][i]['comparator_name'] = val.title;
|
||||
// data['eventView']['filts'][i]['comparator'] = val.id;
|
||||
// if(val.id == "range"){
|
||||
// data['eventView']['filts'][i]['ftv'] = [-1,1];
|
||||
// }
|
||||
// X.laytpldata("#analysis-overall-situation-list-box-dot",data['eventView']['filts'],".analysis-overall-situation-list-box");
|
||||
// analysisdown();
|
||||
// })
|
||||
// }
|
||||
// };
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-fuhao').on('click','.analysis-overall-situation-fuhao',function(){
|
||||
var obj = $(this);
|
||||
var offset = obj.offset();
|
||||
@ -2754,7 +2760,9 @@ var X = window.X || {
|
||||
if(val.id == "range"){
|
||||
data['eventView']['filts'][index]['ftv'] = [-1,1];
|
||||
}
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",data['eventView']['filts'],".analysis-overall-situation-list-box");
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",data['eventView']['filts'],".analysis-overall-situation-list-box",function(){
|
||||
renderdate();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
@ -2768,10 +2776,36 @@ var X = window.X || {
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
// $(".analysis-overall-situation-left-box").hide();
|
||||
}
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",data['eventView']['filts'],".analysis-overall-situation-list-box");
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",data['eventView']['filts'],".analysis-overall-situation-list-box",function(){
|
||||
renderdate();
|
||||
});
|
||||
// analysisdown();
|
||||
});
|
||||
|
||||
var render_date_index;//且用户符合时间选择框的index
|
||||
$(document).off('click','.analysis-overall-situation-date').on('click','.analysis-overall-situation-date',function(){
|
||||
var index = $(this).attr('data-index');
|
||||
render_date_index = index;
|
||||
// console.log(index);
|
||||
});
|
||||
|
||||
// 渲染过滤项时间框
|
||||
function renderdate(){
|
||||
lay('.analysis-overall-situation-date').each(function(){
|
||||
layui.laydate.render({
|
||||
elem: this
|
||||
,type:"datetime"
|
||||
,trigger: 'click'
|
||||
,done: function(value, date, endDate){
|
||||
data['eventView']['filts'][render_date_index]['strftv'] = value;
|
||||
var datearr = [];
|
||||
datearr.push(value)
|
||||
data['eventView']['filts'][render_date_index]['ftv'] = datearr;
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-left-guanxi').on('click','.analysis-overall-situation-left-guanxi',function(){
|
||||
var html = $(this).html(); //condrelation筛选条件的关系
|
||||
@ -2798,7 +2832,9 @@ var X = window.X || {
|
||||
data['eventView']['filts'][index]['comparator'] = '==';
|
||||
data['eventView']['filts'][index]['tableType'] = val.table_type;
|
||||
filtsftvdata[index]=val.category;
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",data['eventView']['filts'],".analysis-overall-situation-list-box");
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",data['eventView']['filts'],".analysis-overall-situation-list-box",function(){
|
||||
renderdate();
|
||||
});
|
||||
// analysisdown();
|
||||
})
|
||||
});
|
||||
@ -4091,6 +4127,7 @@ var X = window.X || {
|
||||
|
||||
// 退出登录
|
||||
$(document).off('click','.sifnoutlogin').on('click','.sifnoutlogin',function(){
|
||||
window.localStorage.removeItem('loginData');
|
||||
X.gourl("login");
|
||||
});
|
||||
|
||||
@ -4108,6 +4145,7 @@ var X = window.X || {
|
||||
}
|
||||
$("#model-box").html("");
|
||||
me.freshMenu(X.DATA['projectid']);
|
||||
|
||||
// X.template("toptab","analysis-zhanwei",d);
|
||||
});
|
||||
|
||||
@ -4136,8 +4174,8 @@ var X = window.X || {
|
||||
$(document).off('click','.layui-left-dd').on('click','.layui-left-dd',function(){
|
||||
$(".tab-tit-box .tab-tit").html($(this).find("span").html());
|
||||
// setHashParms("menu",$(this).attr('data-id'));
|
||||
X.DATA['dashboard_id'] = $(this).attr('data-id'); //看板id
|
||||
$("#model-box").html("");
|
||||
X.DATA['dashboard_id'] = $(this).attr('data-id'); //看板id
|
||||
// 获取报表数据
|
||||
me.gettabledata();
|
||||
});
|
||||
@ -4492,7 +4530,11 @@ var X = window.X || {
|
||||
var timeParticleSize;
|
||||
X.granularityid(timeParticleSizename,function(d){
|
||||
timeParticleSize = d;
|
||||
if(cat == "retention"){
|
||||
query['eventView']['unitNum'] = parseInt(timeParticleSize);
|
||||
}else {
|
||||
query['eventView']['timeParticleSize'] = timeParticleSize;
|
||||
}
|
||||
X.modelapi("ck/"+ cat +"_model","post",query,function(val){
|
||||
if(JSON.stringify(val) != "{}"){
|
||||
var bbsetdata = {
|
||||
@ -4541,7 +4583,11 @@ var X = window.X || {
|
||||
eventView:val[0]['query']['eventView'],
|
||||
events:val[0]['query']['events'],
|
||||
};
|
||||
query['eventView']['timeParticleSize'] = d.id;
|
||||
if(cat == "retention"){
|
||||
query['eventView']['unitNum'] = parseInt(d.id);
|
||||
}else {
|
||||
query['eventView']['timeParticleSize'] = d.id;;
|
||||
}
|
||||
//时间获取修改后的时间
|
||||
// 报表时间id
|
||||
var dateid = "times"+id;
|
||||
@ -4573,7 +4619,7 @@ var X = window.X || {
|
||||
|
||||
$(document).off('click','.chart').on('click','.chart',function(){
|
||||
var dropdownlist = [
|
||||
{title:'表格',id:'table'},
|
||||
{title:'报表',id:'table'},
|
||||
{title:'图形',id:'echarts'}
|
||||
];
|
||||
var obj = $(this);
|
||||
@ -4680,6 +4726,8 @@ var X = window.X || {
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(d.spaces[i]['children'][0]['_id']);
|
||||
// setHashParms("menu",d.spaces[i]['children'][0]['_id']);
|
||||
$(".tab-tit-box .tab-tit").html(d.spaces[i]['children'][0]['name']);
|
||||
X.DATA['dashboard_id'] = d.spaces[i]['children'][0]['_id']; //看板id
|
||||
}else {
|
||||
@ -5082,9 +5130,14 @@ var X = window.X || {
|
||||
var timeParticleSize;
|
||||
X.granularityid(timeParticleSizename,function(d){
|
||||
timeParticleSize = d;
|
||||
if(oclickarr.cat == "retention"){
|
||||
query['eventView']['unitNum'] = parseInt(timeParticleSize);
|
||||
}else {
|
||||
query['eventView']['timeParticleSize'] = timeParticleSize;
|
||||
}
|
||||
// query['eventView']['timeParticleSize'] = timeParticleSize;
|
||||
X.api("ck/"+ oclickarr.cat +"_model","post",query,function(val){
|
||||
if(val.length > 0){
|
||||
if(JSON.stringify(val) != "{}" && JSON.stringify(val) != "[]"){
|
||||
var bbsetdata = {
|
||||
graph_size:oclickarr['modelsize'],
|
||||
graph_type:oclickarr['modeltype'],
|
||||
@ -6476,7 +6529,9 @@ var X = window.X || {
|
||||
}else{
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
});
|
||||
|
||||
//删除指定全局数据
|
||||
@ -6488,7 +6543,9 @@ var X = window.X || {
|
||||
}else{
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
});
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-attr').on('click','.analysis-overall-situation-attr',function(){
|
||||
@ -6504,26 +6561,12 @@ var X = window.X || {
|
||||
data['eventView']['filts'][index]['comparator_name'] = '等于';
|
||||
data['eventView']['filts'][index]['comparator_id'] = '==';
|
||||
data['eventView']['filts'][index]['table_type'] = val.table_type;
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
//循环给条件框渲染下拉框
|
||||
// function analysisdown(){
|
||||
// for(let i in data['eventView']['filts']){
|
||||
// X.laydropdown("#analysis-overall-situation-fuhao-"+i,filtsftvdata[i],function(val){
|
||||
// $(this).html(val.title);
|
||||
// data['eventView']['filts'][i]['comparator_name'] = val.title;
|
||||
// data['eventView']['filts'][i]['comparator_id'] = val.id;
|
||||
// if(val.id == "range"){
|
||||
// data['eventView']['filts'][i]['ftv'] = [-1,1];
|
||||
// }
|
||||
// X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
// analysisdown();
|
||||
// });
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-fuhao').on('click','.analysis-overall-situation-fuhao',function(){
|
||||
var obj = $(this);
|
||||
var offset = obj.offset();
|
||||
@ -6537,10 +6580,60 @@ var X = window.X || {
|
||||
if(val.id == "range"){
|
||||
data['eventView']['filts'][index]['ftv'] = [-1,1];
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
var render_date_index;//且用户符合时间选择框的index
|
||||
$(document).off('click','.analysis-overall-situation-date').on('click','.analysis-overall-situation-date',function(){
|
||||
var index = $(this).attr('data-index');
|
||||
render_date_index = index;
|
||||
// console.log(index);
|
||||
});
|
||||
|
||||
// 渲染过滤项时间框
|
||||
function renderdate(){
|
||||
lay('.analysis-overall-situation-date').each(function(){
|
||||
layui.laydate.render({
|
||||
elem: this
|
||||
,type:"datetime"
|
||||
,trigger: 'click'
|
||||
,done: function(value, date, endDate){
|
||||
data['eventView']['filts'][render_date_index]['strftv'] = value;
|
||||
var datearr = [];
|
||||
datearr.push(value)
|
||||
data['eventView']['filts'][render_date_index]['ftv'] = datearr;
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-input input').on('blur','.analysis-overall-situation-input input',function(){
|
||||
var val = $(this).val();
|
||||
var index = $(this).attr("data-index");
|
||||
var valarr = val.split(",");
|
||||
data['eventView']['filts'][index]['strftv'] = val;
|
||||
data['eventView']['filts'][index]['ftv']= valarr;
|
||||
});
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-input2 input').on('blur','.analysis-overall-situation-input2 input',function(){
|
||||
var name = $(this).attr('name');
|
||||
var val = $(this).val();
|
||||
var index = $(this).attr("data-index");
|
||||
|
||||
if(name == 'start'){
|
||||
data['eventView']['filts'][index]['ftv'][0] = val;
|
||||
data['eventView']['filts'][index]['section'][0] = val;
|
||||
data['eventView']['filts'][index]['ftv'].push(val);
|
||||
}else {
|
||||
data['eventView']['filts'][index]['ftv'][1] = val;
|
||||
data['eventView']['filts'][index]['section'][1] = val;
|
||||
data['eventView']['filts'][index]['ftv'].push(val);
|
||||
}
|
||||
});
|
||||
|
||||
// 分组项
|
||||
$(document).off('click','.analysis-action-right').on('click','.analysis-action-right',function() {
|
||||
var index = $(this).attr("data-index");
|
||||
@ -6896,7 +6989,9 @@ var X = window.X || {
|
||||
|
||||
X.template("funnel","funnel-event",data['events']);
|
||||
X.template("grouped","shushi",data['eventView']['groupBy']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
|
||||
retaineddata();
|
||||
}
|
||||
@ -7703,6 +7798,14 @@ var X = window.X || {
|
||||
(function(){
|
||||
X.pageLogic['login'] = {
|
||||
init : function(){
|
||||
|
||||
var userinfo = localStorage.getItem('loginData');
|
||||
if(userinfo){
|
||||
X.DATA["userinfo"] = JSON.parse(userinfo);
|
||||
X.loginCache(JSON.parse(userinfo));
|
||||
X.gourl("dashboard");
|
||||
};
|
||||
|
||||
$(".login-denglu").click(function(){
|
||||
postlogin();
|
||||
});
|
||||
@ -7826,7 +7929,9 @@ var X = window.X || {
|
||||
}else{
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
});
|
||||
|
||||
var listarr =[
|
||||
@ -7837,7 +7942,7 @@ var X = window.X || {
|
||||
X.laydropdown('.eventsplit',listarr,function(d){
|
||||
$('.eventsplit').html(d.title);
|
||||
data['eventView']['quota'] = d.id;
|
||||
console.log(d);
|
||||
// console.log(d);
|
||||
});
|
||||
|
||||
//删除指定全局数据
|
||||
@ -7849,7 +7954,9 @@ var X = window.X || {
|
||||
}else{
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
});
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-attr').on('click','.analysis-overall-situation-attr',function(){
|
||||
@ -7865,7 +7972,9 @@ var X = window.X || {
|
||||
data['eventView']['filts'][index]['comparator_name'] = '等于';
|
||||
data['eventView']['filts'][index]['comparator'] = '==';
|
||||
data['eventView']['filts'][index]['table_type'] = val.table_type;
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
@ -7883,10 +7992,37 @@ var X = window.X || {
|
||||
if(val.id == "range"){
|
||||
data['eventView']['filts'][index]['ftv'] = [-1,1];
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
var render_date_index;//且用户符合时间选择框的index
|
||||
$(document).off('click','.analysis-overall-situation-date').on('click','.analysis-overall-situation-date',function(){
|
||||
var index = $(this).attr('data-index');
|
||||
render_date_index = index;
|
||||
// console.log(index);
|
||||
});
|
||||
|
||||
// 渲染过滤项时间框
|
||||
function renderdate(){
|
||||
lay('.analysis-overall-situation-date').each(function(){
|
||||
layui.laydate.render({
|
||||
elem: this
|
||||
,type:"datetime"
|
||||
,trigger: 'click'
|
||||
,done: function(value, date, endDate){
|
||||
data['eventView']['filts'][render_date_index]['strftv'] = value;
|
||||
var datearr = [];
|
||||
datearr.push(value)
|
||||
data['eventView']['filts'][render_date_index]['ftv'] = datearr;
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-input input').on('blur','.analysis-overall-situation-input input',function(){
|
||||
var val = $(this).val();
|
||||
var index = $(this).attr("data-index");
|
||||
@ -7977,7 +8113,9 @@ var X = window.X || {
|
||||
data['eventView']['startTime'] = timearr[0] + " "+"00:00:00";
|
||||
data['eventView']['endTime'] = timearr[2]+" "+"23:59:59";
|
||||
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
|
||||
retaineddata();
|
||||
};
|
||||
@ -8516,13 +8654,13 @@ var X = window.X || {
|
||||
});
|
||||
}
|
||||
|
||||
$(".menu_dapax .item_kuvn").click(function(){
|
||||
$(document).off('click',".menu_dapax .item_kuvn").on('click',".menu_dapax .item_kuvn",function(){
|
||||
$(".menu_dapax .item_kuvn").removeClass("selected___3ctlt");
|
||||
$(this).addClass("selected___3ctlt");
|
||||
var url = $(this).attr("data-url");
|
||||
});
|
||||
|
||||
$(document).on("click",".roleinproject-tit",function(){
|
||||
$(document).off('click','.roleinproject-tit').on("click",".roleinproject-tit",function(){
|
||||
var index = $(this).attr("data-index");
|
||||
$(".projectadmin-con-hz-left-list-con").removeClass("selected___3ctlt");
|
||||
$(this).addClass("selected___3ctlt");
|
||||
@ -9054,7 +9192,9 @@ var X = window.X || {
|
||||
}else{
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
});
|
||||
|
||||
//删除指定全局数据
|
||||
@ -9067,7 +9207,9 @@ var X = window.X || {
|
||||
}else{
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
});
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-attr').on('click','.analysis-overall-situation-attr',function(){
|
||||
@ -9084,6 +9226,9 @@ var X = window.X || {
|
||||
data['eventView']['filts'][index]['comparator'] = '==';
|
||||
data['eventView']['filts'][index]['tableType'] = val.table_type;
|
||||
filtsftvdata[index]=val.category;
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
@ -9104,6 +9249,30 @@ var X = window.X || {
|
||||
// }
|
||||
// };
|
||||
|
||||
var render_date_index;//且用户符合时间选择框的index
|
||||
$(document).off('click','.analysis-overall-situation-date').on('click','.analysis-overall-situation-date',function(){
|
||||
var index = $(this).attr('data-index');
|
||||
render_date_index = index;
|
||||
// console.log(index);
|
||||
});
|
||||
|
||||
// 渲染过滤项时间框
|
||||
function renderdate(){
|
||||
lay('.analysis-overall-situation-date').each(function(){
|
||||
layui.laydate.render({
|
||||
elem: this
|
||||
,type:"datetime"
|
||||
,trigger: 'click'
|
||||
,done: function(value, date, endDate){
|
||||
data['eventView']['filts'][render_date_index]['strftv'] = value;
|
||||
var datearr = [];
|
||||
datearr.push(value)
|
||||
data['eventView']['filts'][render_date_index]['ftv'] = datearr;
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-fuhao').on('click','.analysis-overall-situation-fuhao',function(){
|
||||
var obj = $(this);
|
||||
var offset = obj.offset();
|
||||
@ -9117,7 +9286,9 @@ var X = window.X || {
|
||||
if(val.id == "range"){
|
||||
data['eventView']['filts'][index]['ftv'] = [-1,1];
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
@ -9247,7 +9418,9 @@ var X = window.X || {
|
||||
|
||||
X.template("event","initial-event",data['events'][0]);
|
||||
X.template("returnvisitevent","returnvisit-event",data['events'][1]);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
X.template("grouped","shushi",data['eventView']['groupBy']);
|
||||
|
||||
retaineddata();
|
||||
@ -9266,7 +9439,7 @@ var X = window.X || {
|
||||
|
||||
if(data['eventView']['filter_item_type'] != "all" && data['eventView']['filter_item_type']){
|
||||
var filteritem = data['eventView']['filter_item'];
|
||||
if(d['days'].length >= 7){
|
||||
if(d['days'].length >= 0){
|
||||
var filterarr = [];
|
||||
for(let i in d['days']){
|
||||
for(let j in filteritem){
|
||||
@ -9336,7 +9509,7 @@ var X = window.X || {
|
||||
}
|
||||
}else {
|
||||
for(let i in d['days']){
|
||||
var tit = "第" + i + "日";
|
||||
var tit = "第" + d['days'][i] + "日";
|
||||
titdata.push(tit);
|
||||
}
|
||||
}
|
||||
@ -9582,6 +9755,9 @@ var X = window.X || {
|
||||
$(".showsetup-box").show();
|
||||
$(".showsetup-down-box").css('top',offset.top+obj.height());
|
||||
$(".showsetup-down-box").css('left',offset.left-211);
|
||||
layui.form.val('showsetupexample',{
|
||||
'showsetup': data['eventView']['filter_item_type']
|
||||
})
|
||||
});
|
||||
|
||||
$(document).off('click','.showsetup-box-zz').on('click','.showsetup-box-zz',function(){
|
||||
@ -9887,7 +10063,9 @@ var X = window.X || {
|
||||
}else{
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['events']['user_filter']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['events']['user_filter']['filts'],function(){
|
||||
renderdate()
|
||||
});
|
||||
});
|
||||
|
||||
$(document).off('click','.analysis-shaix-initial-event').on('click','.analysis-shaix-initial-event',function(){
|
||||
@ -10006,7 +10184,9 @@ var X = window.X || {
|
||||
}else{
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['events']['user_filter']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['events']['user_filter']['filts'],function(){
|
||||
renderdate()
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@ -10020,6 +10200,9 @@ var X = window.X || {
|
||||
data['events']['user_filter']['filts'][index]['columnName'] = val.id;
|
||||
data['events']['user_filter']['filts'][index]['data_type'] = val.type;
|
||||
data['events']['user_filter']['filts'][index]['tableType'] = val.table_type;
|
||||
X.template("globalfilter","xinwei-whole",data['events']['user_filter']['filts'],function(){
|
||||
renderdate()
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
@ -10036,13 +10219,42 @@ var X = window.X || {
|
||||
if(val.id == "range"){
|
||||
data['events']['user_filter']['filts'][index]['ftv'] = [-1,1];
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['events']['user_filter']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['events']['user_filter']['filts'],function(){
|
||||
renderdate()
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
var render_date_index;//且用户符合时间选择框的index
|
||||
$(document).off('click','.analysis-overall-situation-date').on('click','.analysis-overall-situation-date',function(){
|
||||
var index = $(this).attr('data-index');
|
||||
render_date_index = index;
|
||||
// console.log(index);
|
||||
});
|
||||
|
||||
// 渲染过滤项时间框
|
||||
function renderdate(){
|
||||
lay('.analysis-overall-situation-date').each(function(){
|
||||
layui.laydate.render({
|
||||
elem: this
|
||||
,type:"datetime"
|
||||
,trigger: 'click'
|
||||
,done: function(value, date, endDate){
|
||||
data['events']['user_filter']['filts'][render_date_index]['strftv'] = value;
|
||||
var datearr = [];
|
||||
datearr.push(value)
|
||||
data['events']['user_filter']['filts'][render_date_index]['ftv'] = datearr;
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-input input').on('blur','.analysis-overall-situation-input input',function(){
|
||||
var index = $(this).attr('data-index');
|
||||
var val = $(this).val();
|
||||
var index = $(this).attr("data-index");
|
||||
var valarr = val.split(",");
|
||||
data['events']['user_filter']['filts'][index]['ftv']=valarr;
|
||||
data['events']['user_filter']['filts'][index]['strftv']=val;
|
||||
});
|
||||
|
||||
@ -10123,7 +10335,9 @@ var X = window.X || {
|
||||
// $('.participate-num').html(data.cachedata.event_names.length);
|
||||
|
||||
X.template("route","event-roue-event",data['events']['source_event']);
|
||||
X.template("globalfilter","xinwei-whole",data['events']['user_filter']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['events']['user_filter']['filts'],function(){
|
||||
renderdate()
|
||||
});
|
||||
X.laytpldata("#eventsplit-box-dot",data['events']['by_fields'],".eventsplit-box");
|
||||
// X.template("userpar","userpar-event",data['events']);
|
||||
|
||||
|
@ -98,9 +98,27 @@
|
||||
|
||||
window.onhashchange = function(){
|
||||
// console.log( getHashParms() );
|
||||
var page = X.DATA['page'];
|
||||
var urlinfo = getHashParms();
|
||||
// if(urlinfo.page == 'dashboard'){
|
||||
// for(let i in X.DATA['ProjectData']){
|
||||
// for(let j in X.DATA['ProjectData'][i]['children']){
|
||||
// if(X.DATA['ProjectData'][i]['children'][j]['_id'] == urlinfo.menu){
|
||||
// $(".tab-tit-box .tab-tit").html(X.DATA['ProjectData'][i]['children'][j]['name']);
|
||||
// X.DATA['ProjectData'][i]['children'][j]['onclick'] = 1;
|
||||
// }else{
|
||||
// X.DATA['ProjectData'][i]['children'][j]['onclick'] = 0;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// X.laytpldata('#kongjian-dot',X.DATA['ProjectData'],'#kongjian');
|
||||
// X.DATA['page'] = urlinfo.page;
|
||||
// console.log(urlinfo.page);
|
||||
// console.log(urlinfo.menu);
|
||||
// if(page != urlinfo.page){
|
||||
// X.gourl(urlinfo.page,'conetnt');
|
||||
// }
|
||||
// X.DATA['dashboard_id'] = urlinfo.menu;
|
||||
// X.pageLogic['dashboard'].gettabledata();
|
||||
// }
|
||||
|
@ -93,11 +93,11 @@ var X = window.X || {
|
||||
{'title':'合计','id':'total'},
|
||||
],
|
||||
'retention':[
|
||||
{'title':'当日','id':'1'},
|
||||
{'title':'次日','id':'2'},
|
||||
{'title':'7日','id':'7'},
|
||||
{'title':'14日','id':'14'},
|
||||
{'title':'30日','id':'30'}
|
||||
{'title':'当日','id':1},
|
||||
{'title':'次日','id':2},
|
||||
{'title':'7日','id':7},
|
||||
{'title':'14日','id':14},
|
||||
{'title':'30日','id':30}
|
||||
],
|
||||
'distribution':[
|
||||
{'title':'按天','id':'P1D'},
|
||||
@ -852,7 +852,7 @@ var X = window.X || {
|
||||
|
||||
if(data['filter_item_type'] != "all" && data['filter_item_type'] != "" && data['filter_item_type']){
|
||||
var filteritem = data['filter_item'];
|
||||
if(data['days'].length >= 7){
|
||||
if(data['days'].length >= 0){
|
||||
var filterarr = [];
|
||||
for(let i in data['days']){
|
||||
for(let j in filteritem){
|
||||
@ -914,7 +914,7 @@ var X = window.X || {
|
||||
}
|
||||
}else {
|
||||
for(let i in data['days']){
|
||||
var tit = "第" + i + "日";
|
||||
var tit = "第" + data['days'][i] + "日";
|
||||
titdata.push(tit);
|
||||
}
|
||||
}
|
||||
|
@ -168,7 +168,9 @@
|
||||
|
||||
X.laytpldata("#analysis-con-left-screen-list-dot",d.query.events,".analysis-con-left-screen-list-box");
|
||||
X.laytpldata("#analysis-gpmain___3YGfw-dot",d.query.eventView.groupBy,".analysis-gpmain___3YGfw");
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",d.query['eventView']['filts'],".analysis-overall-situation-list-box");
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",d.query['eventView']['filts'],".analysis-overall-situation-list-box",function(){
|
||||
renderdate();
|
||||
});
|
||||
// analysisdown();
|
||||
calculationdata();
|
||||
}
|
||||
@ -621,26 +623,12 @@
|
||||
}else{
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
}
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",data['eventView']['filts'],".analysis-overall-situation-list-box");
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",data['eventView']['filts'],".analysis-overall-situation-list-box",function(){
|
||||
renderdate();
|
||||
});
|
||||
// analysisdown();
|
||||
});
|
||||
|
||||
//循环给条件框渲染下拉框
|
||||
// function analysisdown(){
|
||||
// for(let i in data['eventView']['filts']){
|
||||
// X.laydropdown("#analysis-overall-situation-fuhao-"+i,filtsftvdata[i],function(val){
|
||||
// $(this).html(val.title);
|
||||
// data['eventView']['filts'][i]['comparator_name'] = val.title;
|
||||
// data['eventView']['filts'][i]['comparator'] = val.id;
|
||||
// if(val.id == "range"){
|
||||
// data['eventView']['filts'][i]['ftv'] = [-1,1];
|
||||
// }
|
||||
// X.laytpldata("#analysis-overall-situation-list-box-dot",data['eventView']['filts'],".analysis-overall-situation-list-box");
|
||||
// analysisdown();
|
||||
// })
|
||||
// }
|
||||
// };
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-fuhao').on('click','.analysis-overall-situation-fuhao',function(){
|
||||
var obj = $(this);
|
||||
var offset = obj.offset();
|
||||
@ -653,7 +641,9 @@
|
||||
if(val.id == "range"){
|
||||
data['eventView']['filts'][index]['ftv'] = [-1,1];
|
||||
}
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",data['eventView']['filts'],".analysis-overall-situation-list-box");
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",data['eventView']['filts'],".analysis-overall-situation-list-box",function(){
|
||||
renderdate();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
@ -667,10 +657,36 @@
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
// $(".analysis-overall-situation-left-box").hide();
|
||||
}
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",data['eventView']['filts'],".analysis-overall-situation-list-box");
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",data['eventView']['filts'],".analysis-overall-situation-list-box",function(){
|
||||
renderdate();
|
||||
});
|
||||
// analysisdown();
|
||||
});
|
||||
|
||||
var render_date_index;//且用户符合时间选择框的index
|
||||
$(document).off('click','.analysis-overall-situation-date').on('click','.analysis-overall-situation-date',function(){
|
||||
var index = $(this).attr('data-index');
|
||||
render_date_index = index;
|
||||
// console.log(index);
|
||||
});
|
||||
|
||||
// 渲染过滤项时间框
|
||||
function renderdate(){
|
||||
lay('.analysis-overall-situation-date').each(function(){
|
||||
layui.laydate.render({
|
||||
elem: this
|
||||
,type:"datetime"
|
||||
,trigger: 'click'
|
||||
,done: function(value, date, endDate){
|
||||
data['eventView']['filts'][render_date_index]['strftv'] = value;
|
||||
var datearr = [];
|
||||
datearr.push(value)
|
||||
data['eventView']['filts'][render_date_index]['ftv'] = datearr;
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-left-guanxi').on('click','.analysis-overall-situation-left-guanxi',function(){
|
||||
var html = $(this).html(); //condrelation筛选条件的关系
|
||||
@ -697,7 +713,9 @@
|
||||
data['eventView']['filts'][index]['comparator'] = '==';
|
||||
data['eventView']['filts'][index]['tableType'] = val.table_type;
|
||||
filtsftvdata[index]=val.category;
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",data['eventView']['filts'],".analysis-overall-situation-list-box");
|
||||
X.laytpldata("#analysis-overall-situation-list-box-dot",data['eventView']['filts'],".analysis-overall-situation-list-box",function(){
|
||||
renderdate();
|
||||
});
|
||||
// analysisdown();
|
||||
})
|
||||
});
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
// 退出登录
|
||||
$(document).off('click','.sifnoutlogin').on('click','.sifnoutlogin',function(){
|
||||
window.localStorage.removeItem('loginData');
|
||||
X.gourl("login");
|
||||
});
|
||||
|
||||
@ -36,6 +37,7 @@
|
||||
}
|
||||
$("#model-box").html("");
|
||||
me.freshMenu(X.DATA['projectid']);
|
||||
|
||||
// X.template("toptab","analysis-zhanwei",d);
|
||||
});
|
||||
|
||||
@ -64,8 +66,8 @@
|
||||
$(document).off('click','.layui-left-dd').on('click','.layui-left-dd',function(){
|
||||
$(".tab-tit-box .tab-tit").html($(this).find("span").html());
|
||||
// setHashParms("menu",$(this).attr('data-id'));
|
||||
X.DATA['dashboard_id'] = $(this).attr('data-id'); //看板id
|
||||
$("#model-box").html("");
|
||||
X.DATA['dashboard_id'] = $(this).attr('data-id'); //看板id
|
||||
// 获取报表数据
|
||||
me.gettabledata();
|
||||
});
|
||||
@ -420,7 +422,11 @@
|
||||
var timeParticleSize;
|
||||
X.granularityid(timeParticleSizename,function(d){
|
||||
timeParticleSize = d;
|
||||
if(cat == "retention"){
|
||||
query['eventView']['unitNum'] = parseInt(timeParticleSize);
|
||||
}else {
|
||||
query['eventView']['timeParticleSize'] = timeParticleSize;
|
||||
}
|
||||
X.modelapi("ck/"+ cat +"_model","post",query,function(val){
|
||||
if(JSON.stringify(val) != "{}"){
|
||||
var bbsetdata = {
|
||||
@ -469,7 +475,11 @@
|
||||
eventView:val[0]['query']['eventView'],
|
||||
events:val[0]['query']['events'],
|
||||
};
|
||||
query['eventView']['timeParticleSize'] = d.id;
|
||||
if(cat == "retention"){
|
||||
query['eventView']['unitNum'] = parseInt(d.id);
|
||||
}else {
|
||||
query['eventView']['timeParticleSize'] = d.id;;
|
||||
}
|
||||
//时间获取修改后的时间
|
||||
// 报表时间id
|
||||
var dateid = "times"+id;
|
||||
@ -501,7 +511,7 @@
|
||||
|
||||
$(document).off('click','.chart').on('click','.chart',function(){
|
||||
var dropdownlist = [
|
||||
{title:'表格',id:'table'},
|
||||
{title:'报表',id:'table'},
|
||||
{title:'图形',id:'echarts'}
|
||||
];
|
||||
var obj = $(this);
|
||||
@ -608,6 +618,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(d.spaces[i]['children'][0]['_id']);
|
||||
// setHashParms("menu",d.spaces[i]['children'][0]['_id']);
|
||||
$(".tab-tit-box .tab-tit").html(d.spaces[i]['children'][0]['name']);
|
||||
X.DATA['dashboard_id'] = d.spaces[i]['children'][0]['_id']; //看板id
|
||||
}else {
|
||||
@ -1010,9 +1022,14 @@
|
||||
var timeParticleSize;
|
||||
X.granularityid(timeParticleSizename,function(d){
|
||||
timeParticleSize = d;
|
||||
if(oclickarr.cat == "retention"){
|
||||
query['eventView']['unitNum'] = parseInt(timeParticleSize);
|
||||
}else {
|
||||
query['eventView']['timeParticleSize'] = timeParticleSize;
|
||||
}
|
||||
// query['eventView']['timeParticleSize'] = timeParticleSize;
|
||||
X.api("ck/"+ oclickarr.cat +"_model","post",query,function(val){
|
||||
if(val.length > 0){
|
||||
if(JSON.stringify(val) != "{}" && JSON.stringify(val) != "[]"){
|
||||
var bbsetdata = {
|
||||
graph_size:oclickarr['modelsize'],
|
||||
graph_type:oclickarr['modeltype'],
|
||||
|
@ -285,7 +285,9 @@
|
||||
}else{
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
});
|
||||
|
||||
//删除指定全局数据
|
||||
@ -297,7 +299,9 @@
|
||||
}else{
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
});
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-attr').on('click','.analysis-overall-situation-attr',function(){
|
||||
@ -313,26 +317,12 @@
|
||||
data['eventView']['filts'][index]['comparator_name'] = '等于';
|
||||
data['eventView']['filts'][index]['comparator_id'] = '==';
|
||||
data['eventView']['filts'][index]['table_type'] = val.table_type;
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
//循环给条件框渲染下拉框
|
||||
// function analysisdown(){
|
||||
// for(let i in data['eventView']['filts']){
|
||||
// X.laydropdown("#analysis-overall-situation-fuhao-"+i,filtsftvdata[i],function(val){
|
||||
// $(this).html(val.title);
|
||||
// data['eventView']['filts'][i]['comparator_name'] = val.title;
|
||||
// data['eventView']['filts'][i]['comparator_id'] = val.id;
|
||||
// if(val.id == "range"){
|
||||
// data['eventView']['filts'][i]['ftv'] = [-1,1];
|
||||
// }
|
||||
// X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
// analysisdown();
|
||||
// });
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-fuhao').on('click','.analysis-overall-situation-fuhao',function(){
|
||||
var obj = $(this);
|
||||
var offset = obj.offset();
|
||||
@ -346,10 +336,60 @@
|
||||
if(val.id == "range"){
|
||||
data['eventView']['filts'][index]['ftv'] = [-1,1];
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
var render_date_index;//且用户符合时间选择框的index
|
||||
$(document).off('click','.analysis-overall-situation-date').on('click','.analysis-overall-situation-date',function(){
|
||||
var index = $(this).attr('data-index');
|
||||
render_date_index = index;
|
||||
// console.log(index);
|
||||
});
|
||||
|
||||
// 渲染过滤项时间框
|
||||
function renderdate(){
|
||||
lay('.analysis-overall-situation-date').each(function(){
|
||||
layui.laydate.render({
|
||||
elem: this
|
||||
,type:"datetime"
|
||||
,trigger: 'click'
|
||||
,done: function(value, date, endDate){
|
||||
data['eventView']['filts'][render_date_index]['strftv'] = value;
|
||||
var datearr = [];
|
||||
datearr.push(value)
|
||||
data['eventView']['filts'][render_date_index]['ftv'] = datearr;
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-input input').on('blur','.analysis-overall-situation-input input',function(){
|
||||
var val = $(this).val();
|
||||
var index = $(this).attr("data-index");
|
||||
var valarr = val.split(",");
|
||||
data['eventView']['filts'][index]['strftv'] = val;
|
||||
data['eventView']['filts'][index]['ftv']= valarr;
|
||||
});
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-input2 input').on('blur','.analysis-overall-situation-input2 input',function(){
|
||||
var name = $(this).attr('name');
|
||||
var val = $(this).val();
|
||||
var index = $(this).attr("data-index");
|
||||
|
||||
if(name == 'start'){
|
||||
data['eventView']['filts'][index]['ftv'][0] = val;
|
||||
data['eventView']['filts'][index]['section'][0] = val;
|
||||
data['eventView']['filts'][index]['ftv'].push(val);
|
||||
}else {
|
||||
data['eventView']['filts'][index]['ftv'][1] = val;
|
||||
data['eventView']['filts'][index]['section'][1] = val;
|
||||
data['eventView']['filts'][index]['ftv'].push(val);
|
||||
}
|
||||
});
|
||||
|
||||
// 分组项
|
||||
$(document).off('click','.analysis-action-right').on('click','.analysis-action-right',function() {
|
||||
var index = $(this).attr("data-index");
|
||||
@ -705,7 +745,9 @@
|
||||
|
||||
X.template("funnel","funnel-event",data['events']);
|
||||
X.template("grouped","shushi",data['eventView']['groupBy']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
|
||||
retaineddata();
|
||||
}
|
||||
|
@ -1,6 +1,14 @@
|
||||
(function(){
|
||||
X.pageLogic['login'] = {
|
||||
init : function(){
|
||||
|
||||
var userinfo = localStorage.getItem('loginData');
|
||||
if(userinfo){
|
||||
X.DATA["userinfo"] = JSON.parse(userinfo);
|
||||
X.loginCache(JSON.parse(userinfo));
|
||||
X.gourl("dashboard");
|
||||
};
|
||||
|
||||
$(".login-denglu").click(function(){
|
||||
postlogin();
|
||||
});
|
||||
|
@ -92,7 +92,9 @@
|
||||
}else{
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
});
|
||||
|
||||
var listarr =[
|
||||
@ -103,7 +105,7 @@
|
||||
X.laydropdown('.eventsplit',listarr,function(d){
|
||||
$('.eventsplit').html(d.title);
|
||||
data['eventView']['quota'] = d.id;
|
||||
console.log(d);
|
||||
// console.log(d);
|
||||
});
|
||||
|
||||
//删除指定全局数据
|
||||
@ -115,7 +117,9 @@
|
||||
}else{
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
});
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-attr').on('click','.analysis-overall-situation-attr',function(){
|
||||
@ -131,7 +135,9 @@
|
||||
data['eventView']['filts'][index]['comparator_name'] = '等于';
|
||||
data['eventView']['filts'][index]['comparator'] = '==';
|
||||
data['eventView']['filts'][index]['table_type'] = val.table_type;
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
@ -149,10 +155,37 @@
|
||||
if(val.id == "range"){
|
||||
data['eventView']['filts'][index]['ftv'] = [-1,1];
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
var render_date_index;//且用户符合时间选择框的index
|
||||
$(document).off('click','.analysis-overall-situation-date').on('click','.analysis-overall-situation-date',function(){
|
||||
var index = $(this).attr('data-index');
|
||||
render_date_index = index;
|
||||
// console.log(index);
|
||||
});
|
||||
|
||||
// 渲染过滤项时间框
|
||||
function renderdate(){
|
||||
lay('.analysis-overall-situation-date').each(function(){
|
||||
layui.laydate.render({
|
||||
elem: this
|
||||
,type:"datetime"
|
||||
,trigger: 'click'
|
||||
,done: function(value, date, endDate){
|
||||
data['eventView']['filts'][render_date_index]['strftv'] = value;
|
||||
var datearr = [];
|
||||
datearr.push(value)
|
||||
data['eventView']['filts'][render_date_index]['ftv'] = datearr;
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-input input').on('blur','.analysis-overall-situation-input input',function(){
|
||||
var val = $(this).val();
|
||||
var index = $(this).attr("data-index");
|
||||
@ -243,7 +276,9 @@
|
||||
data['eventView']['startTime'] = timearr[0] + " "+"00:00:00";
|
||||
data['eventView']['endTime'] = timearr[2]+" "+"23:59:59";
|
||||
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
|
||||
retaineddata();
|
||||
};
|
||||
|
@ -19,13 +19,13 @@
|
||||
});
|
||||
}
|
||||
|
||||
$(".menu_dapax .item_kuvn").click(function(){
|
||||
$(document).off('click',".menu_dapax .item_kuvn").on('click',".menu_dapax .item_kuvn",function(){
|
||||
$(".menu_dapax .item_kuvn").removeClass("selected___3ctlt");
|
||||
$(this).addClass("selected___3ctlt");
|
||||
var url = $(this).attr("data-url");
|
||||
});
|
||||
|
||||
$(document).on("click",".roleinproject-tit",function(){
|
||||
$(document).off('click','.roleinproject-tit').on("click",".roleinproject-tit",function(){
|
||||
var index = $(this).attr("data-index");
|
||||
$(".projectadmin-con-hz-left-list-con").removeClass("selected___3ctlt");
|
||||
$(this).addClass("selected___3ctlt");
|
||||
|
@ -297,7 +297,9 @@
|
||||
}else{
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
});
|
||||
|
||||
//删除指定全局数据
|
||||
@ -310,7 +312,9 @@
|
||||
}else{
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
});
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-attr').on('click','.analysis-overall-situation-attr',function(){
|
||||
@ -327,6 +331,9 @@
|
||||
data['eventView']['filts'][index]['comparator'] = '==';
|
||||
data['eventView']['filts'][index]['tableType'] = val.table_type;
|
||||
filtsftvdata[index]=val.category;
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
@ -347,6 +354,30 @@
|
||||
// }
|
||||
// };
|
||||
|
||||
var render_date_index;//且用户符合时间选择框的index
|
||||
$(document).off('click','.analysis-overall-situation-date').on('click','.analysis-overall-situation-date',function(){
|
||||
var index = $(this).attr('data-index');
|
||||
render_date_index = index;
|
||||
// console.log(index);
|
||||
});
|
||||
|
||||
// 渲染过滤项时间框
|
||||
function renderdate(){
|
||||
lay('.analysis-overall-situation-date').each(function(){
|
||||
layui.laydate.render({
|
||||
elem: this
|
||||
,type:"datetime"
|
||||
,trigger: 'click'
|
||||
,done: function(value, date, endDate){
|
||||
data['eventView']['filts'][render_date_index]['strftv'] = value;
|
||||
var datearr = [];
|
||||
datearr.push(value)
|
||||
data['eventView']['filts'][render_date_index]['ftv'] = datearr;
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-fuhao').on('click','.analysis-overall-situation-fuhao',function(){
|
||||
var obj = $(this);
|
||||
var offset = obj.offset();
|
||||
@ -360,7 +391,9 @@
|
||||
if(val.id == "range"){
|
||||
data['eventView']['filts'][index]['ftv'] = [-1,1];
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
@ -490,7 +523,9 @@
|
||||
|
||||
X.template("event","initial-event",data['events'][0]);
|
||||
X.template("returnvisitevent","returnvisit-event",data['events'][1]);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['eventView']['filts'],function(){
|
||||
renderdate();
|
||||
});
|
||||
X.template("grouped","shushi",data['eventView']['groupBy']);
|
||||
|
||||
retaineddata();
|
||||
@ -509,7 +544,7 @@
|
||||
|
||||
if(data['eventView']['filter_item_type'] != "all" && data['eventView']['filter_item_type']){
|
||||
var filteritem = data['eventView']['filter_item'];
|
||||
if(d['days'].length >= 7){
|
||||
if(d['days'].length >= 0){
|
||||
var filterarr = [];
|
||||
for(let i in d['days']){
|
||||
for(let j in filteritem){
|
||||
@ -579,7 +614,7 @@
|
||||
}
|
||||
}else {
|
||||
for(let i in d['days']){
|
||||
var tit = "第" + i + "日";
|
||||
var tit = "第" + d['days'][i] + "日";
|
||||
titdata.push(tit);
|
||||
}
|
||||
}
|
||||
@ -825,6 +860,9 @@
|
||||
$(".showsetup-box").show();
|
||||
$(".showsetup-down-box").css('top',offset.top+obj.height());
|
||||
$(".showsetup-down-box").css('left',offset.left-211);
|
||||
layui.form.val('showsetupexample',{
|
||||
'showsetup': data['eventView']['filter_item_type']
|
||||
})
|
||||
});
|
||||
|
||||
$(document).off('click','.showsetup-box-zz').on('click','.showsetup-box-zz',function(){
|
||||
|
@ -166,7 +166,9 @@
|
||||
}else{
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['events']['user_filter']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['events']['user_filter']['filts'],function(){
|
||||
renderdate()
|
||||
});
|
||||
});
|
||||
|
||||
$(document).off('click','.analysis-shaix-initial-event').on('click','.analysis-shaix-initial-event',function(){
|
||||
@ -285,7 +287,9 @@
|
||||
}else{
|
||||
$(".analysis-overall-situation-left-guanxi").hide();
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['events']['user_filter']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['events']['user_filter']['filts'],function(){
|
||||
renderdate()
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@ -299,6 +303,9 @@
|
||||
data['events']['user_filter']['filts'][index]['columnName'] = val.id;
|
||||
data['events']['user_filter']['filts'][index]['data_type'] = val.type;
|
||||
data['events']['user_filter']['filts'][index]['tableType'] = val.table_type;
|
||||
X.template("globalfilter","xinwei-whole",data['events']['user_filter']['filts'],function(){
|
||||
renderdate()
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
@ -315,13 +322,42 @@
|
||||
if(val.id == "range"){
|
||||
data['events']['user_filter']['filts'][index]['ftv'] = [-1,1];
|
||||
}
|
||||
X.template("globalfilter","xinwei-whole",data['events']['user_filter']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['events']['user_filter']['filts'],function(){
|
||||
renderdate()
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
var render_date_index;//且用户符合时间选择框的index
|
||||
$(document).off('click','.analysis-overall-situation-date').on('click','.analysis-overall-situation-date',function(){
|
||||
var index = $(this).attr('data-index');
|
||||
render_date_index = index;
|
||||
// console.log(index);
|
||||
});
|
||||
|
||||
// 渲染过滤项时间框
|
||||
function renderdate(){
|
||||
lay('.analysis-overall-situation-date').each(function(){
|
||||
layui.laydate.render({
|
||||
elem: this
|
||||
,type:"datetime"
|
||||
,trigger: 'click'
|
||||
,done: function(value, date, endDate){
|
||||
data['events']['user_filter']['filts'][render_date_index]['strftv'] = value;
|
||||
var datearr = [];
|
||||
datearr.push(value)
|
||||
data['events']['user_filter']['filts'][render_date_index]['ftv'] = datearr;
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$(document).off('click','.analysis-overall-situation-input input').on('blur','.analysis-overall-situation-input input',function(){
|
||||
var index = $(this).attr('data-index');
|
||||
var val = $(this).val();
|
||||
var index = $(this).attr("data-index");
|
||||
var valarr = val.split(",");
|
||||
data['events']['user_filter']['filts'][index]['ftv']=valarr;
|
||||
data['events']['user_filter']['filts'][index]['strftv']=val;
|
||||
});
|
||||
|
||||
@ -402,7 +438,9 @@
|
||||
// $('.participate-num').html(data.cachedata.event_names.length);
|
||||
|
||||
X.template("route","event-roue-event",data['events']['source_event']);
|
||||
X.template("globalfilter","xinwei-whole",data['events']['user_filter']['filts']);
|
||||
X.template("globalfilter","xinwei-whole",data['events']['user_filter']['filts'],function(){
|
||||
renderdate()
|
||||
});
|
||||
X.laytpldata("#eventsplit-box-dot",data['events']['by_fields'],".eventsplit-box");
|
||||
// X.template("userpar","userpar-event",data['events']);
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
/* .layui-card { min-height: 388px; } */
|
||||
.modify-layui-card-small { height: 186px; }
|
||||
.modify-layui-card { height: 388px; }
|
||||
.layui-laydate .layui-this { background-color: rgba(89, 120, 249, 1) !important; }
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width:5px;
|
||||
|
Loading…
Reference in New Issue
Block a user