From a8ffcbc351371c10a1e6e3d930f470352a0456e3 Mon Sep 17 00:00:00 2001
From: luosongbai <15272473386@163.com>
Date: Mon, 15 Nov 2021 14:51:27 +0800
Subject: [PATCH] 1
---
web/pages/analysis.html | 2 +-
web/src/x.min.js | 52 ++++++++++++++++++--------------
web/srczip/logic/analysis.js | 2 +-
web/srczip/logic/dashboard.js | 40 ++++++++++++------------
web/srczip/logic/distribution.js | 10 ++++--
5 files changed, 61 insertions(+), 45 deletions(-)
diff --git a/web/pages/analysis.html b/web/pages/analysis.html
index 390c2a3..31053d3 100644
--- a/web/pages/analysis.html
+++ b/web/pages/analysis.html
@@ -326,7 +326,7 @@
{{# if(item.filts.length > 1){ }}
- {{# if(item.condrelation === "and"){ }}
+ {{# if(item.relation === "and"){ }}
且
{{# } else { }}
或
diff --git a/web/src/x.min.js b/web/src/x.min.js
index 22809c8..7d792b9 100644
--- a/web/src/x.min.js
+++ b/web/src/x.min.js
@@ -3852,7 +3852,7 @@ var X = window.X || {
// var id = "analysis-zhibiao-list-mar-"+$(this).attr("data-twonum");
// $("#"+id).remove();
var index = $(this).attr("data-index");
- var indexs = $(this).attr("data-indexs");
+ var indexs = $(this).attr("data-twonum");
// filtersymbols[index].splice(indexs,1);
data.events[index]['filts'].splice(indexs,1);
updataindex(data.events);
@@ -5718,32 +5718,36 @@ var X = window.X || {
url: "screen",
extData : id,
callback : function(d){
+ d['startTime'] = startTime;
+ d['endTime']=endTime;
var dataArr = {
report_id : id,
- ext_filter : d,
- startTime: startTime,
- endTime:endTime
+ ext_filter : d
}
X.api("ck/"+ cat +"_model","post",dataArr,function(vals){
if(vals == null){
layer.msg('查无数据');
return;
}
- var bbsetdata = {
- graph_size:modelsize,
- graph_type:modeltype,
- model:cat,
- name:name,
- report_id:id
- }
- var modeldata = X.pageLogic['dashboard'].modeldata(bbsetdata,vals);
- //渲染模板和数据
- X.template("modeltable",'conent-box'+modeldata[0]['id'],modeldata[0],function(){
- X.pageLogic['dashboard'].morefeatures(modeldata[0]);
- });
+ var report_id = [];
+ report_id.push(id);
+ X.api('report/read_report','post',{project_id:X.DATA['projectid'],report_id:report_id,dashboard_id:X.DATA.dashboard_id},function(q){
+ var bbsetdata = {
+ graph_size:modelsize,
+ graph_type:modeltype,
+ model:cat,
+ name:name,
+ report_id:id,
+ modelswitch:q[0].show_config.modelswitch,
+ ascending:q[0].show_config.ascending
+ }
+ var modeldata = X.pageLogic['dashboard'].modeldata(bbsetdata,vals);
+ //渲染模板和数据
+ X.template("modeltable",'conent-box'+modeldata[0]['id'],modeldata[0],function(){
+ X.pageLogic['dashboard'].morefeatures(modeldata[0]);
+ });
+ })
})
-
-
}
})
});
@@ -6156,11 +6160,9 @@ var X = window.X || {
var arr = [];
arr.push(id);
X.api('report/read_report','post',{project_id:X.DATA.projectid,report_id:arr},function(d){
- console.log(d);
var arr = {
"eventView": d[0]['query']['eventView'],
"events": d[0]['query']['events'],
- // "report_id": id,
}
var dateid = "times"+id;
var time = $("#"+dateid).html();
@@ -7503,6 +7505,12 @@ var X = window.X || {
if(d){
baobiaodata = d;
data = d.query;
+ // 数据看板点进来时吧保存的时间初始化为当前时间
+ var time = $("#retained-condition-date").val();
+ var timearr = time.split(" ");
+ data['eventView']['startTime'] = timearr[0] + " "+"00:00:00";
+ data['eventView']['endTime'] = timearr[2]+" "+"23:59:59";
+
X.template("userpar","userpar-event",data['events']);
X.template("grouped","shushi",data['eventView']['groupBy']);
distributiondata();
@@ -7590,7 +7598,7 @@ var X = window.X || {
if(type2data.length >0){
X.querycriteriapop(type2data[0],'dropdownlist',offset.left,offset.top+obj.height(),function(val){
if(val != undefined){
- console.log(val);
+ // console.log(val);
$("#analysis-zhibiao-list-type2-"+index).html(val.title);
data['events'][index]['quotaname'] = val.title;
@@ -7603,7 +7611,7 @@ var X = window.X || {
data['events'][index]['analysis'] = val.category[0].id;
}else {
$("#analysis-zhibiao-list-type3-"+index).hide();
- data['events'][index]['analysis'] = val.analysis;
+ // data['events'][index]['analysis'] = val.analysis;
}
X.template("userpar","userpar-event",data['events']);
}
diff --git a/web/srczip/logic/analysis.js b/web/srczip/logic/analysis.js
index b0adcdb..d2e5f4c 100644
--- a/web/srczip/logic/analysis.js
+++ b/web/srczip/logic/analysis.js
@@ -465,7 +465,7 @@
// var id = "analysis-zhibiao-list-mar-"+$(this).attr("data-twonum");
// $("#"+id).remove();
var index = $(this).attr("data-index");
- var indexs = $(this).attr("data-indexs");
+ var indexs = $(this).attr("data-twonum");
// filtersymbols[index].splice(indexs,1);
data.events[index]['filts'].splice(indexs,1);
updataindex(data.events);
diff --git a/web/srczip/logic/dashboard.js b/web/srczip/logic/dashboard.js
index 719b52d..916cf6c 100644
--- a/web/srczip/logic/dashboard.js
+++ b/web/srczip/logic/dashboard.js
@@ -182,32 +182,36 @@
url: "screen",
extData : id,
callback : function(d){
+ d['startTime'] = startTime;
+ d['endTime']=endTime;
var dataArr = {
report_id : id,
- ext_filter : d,
- startTime: startTime,
- endTime:endTime
+ ext_filter : d
}
X.api("ck/"+ cat +"_model","post",dataArr,function(vals){
if(vals == null){
layer.msg('查无数据');
return;
}
- var bbsetdata = {
- graph_size:modelsize,
- graph_type:modeltype,
- model:cat,
- name:name,
- report_id:id
- }
- var modeldata = X.pageLogic['dashboard'].modeldata(bbsetdata,vals);
- //渲染模板和数据
- X.template("modeltable",'conent-box'+modeldata[0]['id'],modeldata[0],function(){
- X.pageLogic['dashboard'].morefeatures(modeldata[0]);
- });
+ var report_id = [];
+ report_id.push(id);
+ X.api('report/read_report','post',{project_id:X.DATA['projectid'],report_id:report_id,dashboard_id:X.DATA.dashboard_id},function(q){
+ var bbsetdata = {
+ graph_size:modelsize,
+ graph_type:modeltype,
+ model:cat,
+ name:name,
+ report_id:id,
+ modelswitch:q[0].show_config.modelswitch,
+ ascending:q[0].show_config.ascending
+ }
+ var modeldata = X.pageLogic['dashboard'].modeldata(bbsetdata,vals);
+ //渲染模板和数据
+ X.template("modeltable",'conent-box'+modeldata[0]['id'],modeldata[0],function(){
+ X.pageLogic['dashboard'].morefeatures(modeldata[0]);
+ });
+ })
})
-
-
}
})
});
@@ -620,11 +624,9 @@
var arr = [];
arr.push(id);
X.api('report/read_report','post',{project_id:X.DATA.projectid,report_id:arr},function(d){
- console.log(d);
var arr = {
"eventView": d[0]['query']['eventView'],
"events": d[0]['query']['events'],
- // "report_id": id,
}
var dateid = "times"+id;
var time = $("#"+dateid).html();
diff --git a/web/srczip/logic/distribution.js b/web/srczip/logic/distribution.js
index c984ac6..55adba1 100644
--- a/web/srczip/logic/distribution.js
+++ b/web/srczip/logic/distribution.js
@@ -62,6 +62,12 @@
if(d){
baobiaodata = d;
data = d.query;
+ // 数据看板点进来时吧保存的时间初始化为当前时间
+ var time = $("#retained-condition-date").val();
+ var timearr = time.split(" ");
+ data['eventView']['startTime'] = timearr[0] + " "+"00:00:00";
+ data['eventView']['endTime'] = timearr[2]+" "+"23:59:59";
+
X.template("userpar","userpar-event",data['events']);
X.template("grouped","shushi",data['eventView']['groupBy']);
distributiondata();
@@ -149,7 +155,7 @@
if(type2data.length >0){
X.querycriteriapop(type2data[0],'dropdownlist',offset.left,offset.top+obj.height(),function(val){
if(val != undefined){
- console.log(val);
+ // console.log(val);
$("#analysis-zhibiao-list-type2-"+index).html(val.title);
data['events'][index]['quotaname'] = val.title;
@@ -162,7 +168,7 @@
data['events'][index]['analysis'] = val.category[0].id;
}else {
$("#analysis-zhibiao-list-type3-"+index).hide();
- data['events'][index]['analysis'] = val.analysis;
+ // data['events'][index]['analysis'] = val.analysis;
}
X.template("userpar","userpar-event",data['events']);
}