1
This commit is contained in:
parent
ec911eece2
commit
23f0fd1fde
@ -134,12 +134,12 @@
|
||||
<script id="table-fenxi-td-dot" type="text/html">
|
||||
{{# layui.each(d, function(index, item){ }}
|
||||
<tr >
|
||||
<td>{{item.date}}</td>
|
||||
<td>{{item.date}} <img src="./static/img/jia1.png" class="table-info-list-box" data-time="{{item.date}}"> </td>
|
||||
<td>{{item.total}}</td>
|
||||
{{# layui.each(item.data, function(indexs, items){ }}
|
||||
<td>
|
||||
<p>{{items.n}}</p>
|
||||
<p>{{items.p}}</p>
|
||||
<p>{{items.p}}%</p>
|
||||
</td>
|
||||
{{# }); }}
|
||||
</tr>
|
||||
|
46
web/pages/grouptable.html
Normal file
46
web/pages/grouptable.html
Normal file
@ -0,0 +1,46 @@
|
||||
<div class="grouptable-box">
|
||||
|
||||
<p class="grouptable-title-box"><span>2022-04-18</span> 分组详情</p>
|
||||
|
||||
<div class="grouptable-table-box">
|
||||
<div class="table-div-box table-grouptable-div-box">
|
||||
<table class="table-fenxi-box">
|
||||
<thead>
|
||||
<tr class="table-fenxi-group-th">
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-fenxi-group-td">
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script id="table-fenxi-th-group-dot" type="text/html">
|
||||
{{# layui.each(d, function(index, item){ }}
|
||||
{{# if(item == "第0日"){ }}
|
||||
<th>当日</th>
|
||||
{{# } else { }}
|
||||
<th>{{item}}</th>
|
||||
{{# } }}
|
||||
{{# }); }}
|
||||
</script>
|
||||
|
||||
<script id="table-fenxi-td-group-dot" type="text/html">
|
||||
{{# layui.each(d, function(index, item){ }}
|
||||
|
||||
<tr >
|
||||
<td>{{item.first}}</td>
|
||||
<td>{{item.total}}</td>
|
||||
{{# layui.each(item.data, function(indexs, items){ }}
|
||||
<td>
|
||||
<p>{{items.n}}</p>
|
||||
<p>{{items.p}}%</p>
|
||||
</td>
|
||||
{{# }); }}
|
||||
</tr>
|
||||
{{# }); }}
|
||||
</script>
|
81
web/src/x.min.js
vendored
81
web/src/x.min.js
vendored
@ -8263,7 +8263,7 @@ var X = window.X || {
|
||||
X.pageLogic['distribution'] = {
|
||||
init : function(){
|
||||
|
||||
var data ={
|
||||
const data ={
|
||||
"eventView":{
|
||||
"cksql":"scatter",
|
||||
"endTime":"",
|
||||
@ -8306,10 +8306,14 @@ var X = window.X || {
|
||||
distributiondata();
|
||||
});
|
||||
|
||||
//获取选择的时间
|
||||
timesdata();
|
||||
function timesdata(){
|
||||
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";
|
||||
}
|
||||
|
||||
$(document).off('click','.analysis-navigation-bar-right-img-baobiao').on('click','.analysis-navigation-bar-right-img-baobiao',function(){
|
||||
X.parametersopen(data['eventView']['cksql'],'savedbaobiao','rt',function(d){
|
||||
@ -8645,9 +8649,8 @@ var X = window.X || {
|
||||
|
||||
// 计算
|
||||
$(document).off('click','.analysis-calculation').on('click','.analysis-calculation',function(){
|
||||
|
||||
distributiondata()
|
||||
|
||||
timesdata();
|
||||
distributiondata();
|
||||
});
|
||||
|
||||
var querydata;
|
||||
@ -8663,6 +8666,12 @@ var X = window.X || {
|
||||
d['tabletitle'].unshift('事件发生时间','总人数');
|
||||
updata(d);
|
||||
$(".chawushuj").hide();
|
||||
|
||||
if(data.eventView.groupBy.length > 0){
|
||||
$(".table-info-list-box").show();
|
||||
}else {
|
||||
$(".table-info-list-box").hide();
|
||||
}
|
||||
}else{
|
||||
$("#distribution-echarts").empty();
|
||||
$(".table-fenxi-th").html("");
|
||||
@ -8711,7 +8720,7 @@ var X = window.X || {
|
||||
}
|
||||
tabledata.push(arr)
|
||||
}
|
||||
// console.log(tabledata);
|
||||
console.log(tabledata);
|
||||
X.laytpldata("#table-fenxi-th-dot",d.tabletitle,".table-fenxi-th");
|
||||
X.laytpldata("#table-fenxi-td-dot",tabledata,".table-fenxi-td");
|
||||
};
|
||||
@ -8908,6 +8917,22 @@ var X = window.X || {
|
||||
// return;
|
||||
});
|
||||
|
||||
|
||||
$(document).off('click','.table-info-list-box').on('click','.table-info-list-box',function(){
|
||||
var time = $(this).attr("data-time");
|
||||
const dataArr = {
|
||||
eventView: data.eventView,
|
||||
events: data.events,
|
||||
time:time
|
||||
}
|
||||
|
||||
X.parametersopen(dataArr,'grouptable','auto',function(){
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
})();
|
||||
@ -10235,6 +10260,52 @@ var X = window.X || {
|
||||
};
|
||||
})();
|
||||
|
||||
// srczip/logic/grouptable.js
|
||||
(function(){
|
||||
X.pageLogic['grouptable'] = {
|
||||
init : function(parms){
|
||||
var me = this;
|
||||
this.parms = parms;
|
||||
this.callback = parms.callback;
|
||||
var data = parms.extData;
|
||||
|
||||
data['eventView']['endTime'] = data.time+" 23:59:59";
|
||||
data['eventView']['startTime'] = data.time+" 00:00:00";
|
||||
|
||||
X.api("ck/scatter_model_details","post",data,function(d){
|
||||
d['tabletitle'] = $.extend(true,[],d['label']);
|
||||
d['tabletitle'].unshift(d.biaotou,'全部用户');
|
||||
var contnetdata =[];
|
||||
for(let i in d.list){
|
||||
var arrdata= [];
|
||||
for(let j in d.list[i]['n']){
|
||||
var n = d.list[i]['n'][j];
|
||||
var p = d.list[i]['p'][j];
|
||||
var arr = {
|
||||
n: n,
|
||||
p: p
|
||||
}
|
||||
arrdata.push(arr);
|
||||
}
|
||||
var drr = {
|
||||
total : d.list[i]['total'],
|
||||
first: i,
|
||||
data: arrdata
|
||||
}
|
||||
contnetdata.push(drr);
|
||||
}
|
||||
|
||||
console.log(contnetdata);
|
||||
|
||||
X.laytpldata("#table-fenxi-th-group-dot",d.tabletitle,".table-fenxi-group-th");
|
||||
X.laytpldata("#table-fenxi-td-group-dot",contnetdata,".table-fenxi-group-td");
|
||||
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
})();
|
||||
// srczip/logic/importuser.js
|
||||
(function(){
|
||||
X.pageLogic['importuser'] = {
|
||||
|
@ -2,7 +2,7 @@
|
||||
X.pageLogic['distribution'] = {
|
||||
init : function(){
|
||||
|
||||
var data ={
|
||||
const data ={
|
||||
"eventView":{
|
||||
"cksql":"scatter",
|
||||
"endTime":"",
|
||||
@ -45,10 +45,14 @@
|
||||
distributiondata();
|
||||
});
|
||||
|
||||
//获取选择的时间
|
||||
timesdata();
|
||||
function timesdata(){
|
||||
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";
|
||||
}
|
||||
|
||||
$(document).off('click','.analysis-navigation-bar-right-img-baobiao').on('click','.analysis-navigation-bar-right-img-baobiao',function(){
|
||||
X.parametersopen(data['eventView']['cksql'],'savedbaobiao','rt',function(d){
|
||||
@ -384,9 +388,8 @@
|
||||
|
||||
// 计算
|
||||
$(document).off('click','.analysis-calculation').on('click','.analysis-calculation',function(){
|
||||
|
||||
distributiondata()
|
||||
|
||||
timesdata();
|
||||
distributiondata();
|
||||
});
|
||||
|
||||
var querydata;
|
||||
@ -402,6 +405,12 @@
|
||||
d['tabletitle'].unshift('事件发生时间','总人数');
|
||||
updata(d);
|
||||
$(".chawushuj").hide();
|
||||
|
||||
if(data.eventView.groupBy.length > 0){
|
||||
$(".table-info-list-box").show();
|
||||
}else {
|
||||
$(".table-info-list-box").hide();
|
||||
}
|
||||
}else{
|
||||
$("#distribution-echarts").empty();
|
||||
$(".table-fenxi-th").html("");
|
||||
@ -450,7 +459,7 @@
|
||||
}
|
||||
tabledata.push(arr)
|
||||
}
|
||||
// console.log(tabledata);
|
||||
console.log(tabledata);
|
||||
X.laytpldata("#table-fenxi-th-dot",d.tabletitle,".table-fenxi-th");
|
||||
X.laytpldata("#table-fenxi-td-dot",tabledata,".table-fenxi-td");
|
||||
};
|
||||
@ -647,6 +656,22 @@
|
||||
// return;
|
||||
});
|
||||
|
||||
|
||||
$(document).off('click','.table-info-list-box').on('click','.table-info-list-box',function(){
|
||||
var time = $(this).attr("data-time");
|
||||
const dataArr = {
|
||||
eventView: data.eventView,
|
||||
events: data.events,
|
||||
time:time
|
||||
}
|
||||
|
||||
X.parametersopen(dataArr,'grouptable','auto',function(){
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
})();
|
45
web/srczip/logic/grouptable.js
Normal file
45
web/srczip/logic/grouptable.js
Normal file
@ -0,0 +1,45 @@
|
||||
(function(){
|
||||
X.pageLogic['grouptable'] = {
|
||||
init : function(parms){
|
||||
var me = this;
|
||||
this.parms = parms;
|
||||
this.callback = parms.callback;
|
||||
var data = parms.extData;
|
||||
|
||||
data['eventView']['endTime'] = data.time+" 23:59:59";
|
||||
data['eventView']['startTime'] = data.time+" 00:00:00";
|
||||
|
||||
X.api("ck/scatter_model_details","post",data,function(d){
|
||||
d['tabletitle'] = $.extend(true,[],d['label']);
|
||||
d['tabletitle'].unshift(d.biaotou,'全部用户');
|
||||
var contnetdata =[];
|
||||
for(let i in d.list){
|
||||
var arrdata= [];
|
||||
for(let j in d.list[i]['n']){
|
||||
var n = d.list[i]['n'][j];
|
||||
var p = d.list[i]['p'][j];
|
||||
var arr = {
|
||||
n: n,
|
||||
p: p
|
||||
}
|
||||
arrdata.push(arr);
|
||||
}
|
||||
var drr = {
|
||||
total : d.list[i]['total'],
|
||||
first: i,
|
||||
data: arrdata
|
||||
}
|
||||
contnetdata.push(drr);
|
||||
}
|
||||
|
||||
console.log(contnetdata);
|
||||
|
||||
X.laytpldata("#table-fenxi-th-group-dot",d.tabletitle,".table-fenxi-group-th");
|
||||
X.laytpldata("#table-fenxi-td-group-dot",contnetdata,".table-fenxi-group-td");
|
||||
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
})();
|
@ -298,7 +298,9 @@
|
||||
.table-fenxi-box { width: 100%; }
|
||||
.table-fenxi-box th { background-color: #f0f2f5; min-width: 100px; max-width: 200px; padding: 10px 16px; color: #202d3f; font-size: 13px; font-weight: 400; border-right: 1px solid #e6e6e6; border-bottom: 1px solid #f0f2f5; }
|
||||
.table-fenxi-box tr { text-align: center; border-left: 1px solid #e6e6e6; }
|
||||
.table-fenxi-box tr td{ min-width: 120px; max-height: 200px; width: 150px; max-width: 120px; padding: 10px 16px; color: #202d3f; font-size: 13px; font-weight: 400; border: 1px solid #e6e6e6; word-wrap:break-word; white-space:pre-wrap; }
|
||||
.table-fenxi-box tr td{ min-width: 120px; max-height: 200px; width: 150px; max-width: 120px; padding: 10px 16px; color: #202d3f; font-size: 13px; font-weight: 400; border: 1px solid #e6e6e6; word-wrap:break-word;
|
||||
/* white-space:pre-wrap; */
|
||||
}
|
||||
|
||||
.participate-box { color: #67729d; margin-left: 16px; padding: 0 6px; display: inline-block; min-width: 40px; height: 28px; font-size: 13px; line-height: 29px; border-radius: 2px; cursor: pointer; background-color: #fff; border: 1px solid #f0f2f5; }
|
||||
|
||||
@ -362,3 +364,18 @@
|
||||
.showsetup-wancheng { display: none; }
|
||||
.showsetup-edit { display: none; }
|
||||
|
||||
.table-info-list-box { cursor: pointer; }
|
||||
.grouptable-box { width: 1270px; max-width: 1270px; height: 742px; }
|
||||
.grouptable-title-box {
|
||||
margin: 0 30px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
border-bottom: 1px solid #e7e7e7;
|
||||
font-size: 16px;
|
||||
}
|
||||
.grouptable-table-box {
|
||||
margin: 30px;
|
||||
}
|
||||
.table-grouptable-div-box { height: 600px; }
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user