提交
This commit is contained in:
parent
638cd6d840
commit
6deb154d7b
@ -224,7 +224,11 @@
|
||||
|
||||
<div class="analysis-con-left-screen-list">
|
||||
<!-- 指标选择 -->
|
||||
{{# if(item.customEvent != " " && item.customEvent != undefined){ }}
|
||||
<div class="analysis-con-left-screen-list-left-box" id="analysis-con-left-screen-list-left-box-{{index}}" style="display: none;">
|
||||
{{# } else { }}
|
||||
<div class="analysis-con-left-screen-list-left-box" id="analysis-con-left-screen-list-left-box-{{index}}">
|
||||
{{# } }}
|
||||
|
||||
{{# if(item.eventNameDisplay != " " && item.eventNameDisplay != undefined){ }}
|
||||
<div class="analysis-con-left-screen-list-left-zhibiaoname" id="analysis-con-left-screen-list-left-zhibiaoname-{{index}}" style="display: block;">
|
||||
@ -281,7 +285,11 @@
|
||||
{{# } }}
|
||||
</div>
|
||||
<!-- 公式 -->
|
||||
{{# if(item.customEvent != " " && item.customEvent != undefined){ }}
|
||||
<div class="analysis-custom-box" id="analysis-custom-box-{{index}}" style="display: block;">
|
||||
{{# } else { }}
|
||||
<div class="analysis-custom-box" id="analysis-custom-box-{{index}}">
|
||||
{{# } }}
|
||||
<div class="analysis-custom-top">
|
||||
<div class="analysis-num">{{index}}</div>
|
||||
<div class="analysis-con-left-screen-list-left-zhibiaoname2"> <input data-index="{{index}}" type="text" value="{{item.eventNameDisplay}}" placeholder="请出入指标名"/></div>
|
||||
@ -299,7 +307,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ant-select-selector">两位小数</div>
|
||||
<!-- <div class="ant-select-selector">两位小数</div> -->
|
||||
</div>
|
||||
<!-- 操作按钮 -->
|
||||
<div class="analysis-con-left-screen-list-right-box">
|
||||
|
@ -167,7 +167,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 15px; height: calc(100% - 90px); overflow-y:auto; ">
|
||||
<div style="padding: 15px; height: calc(100% - 17px); overflow-y:auto; ">
|
||||
|
||||
<div id="chart-box">
|
||||
<!-- 图表数据显示区域 -->
|
||||
@ -300,10 +300,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-footer modify-layui-footer">
|
||||
<!-- 底部固定区域 -->
|
||||
<!-- <div class="layui-footer modify-layui-footer">
|
||||
底部固定区域
|
||||
© layui.com - 底部固定区域
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
13
web/pages/dropdownlist2.html
Normal file
13
web/pages/dropdownlist2.html
Normal file
@ -0,0 +1,13 @@
|
||||
<div class="dropdownlist-box">
|
||||
|
||||
<div class="dropdownlist-con-box">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script id="dropdownlist-con-box-dot" type="text/html">
|
||||
{{# layui.each(d, function(index, item){ }}
|
||||
<div class="dropdownlist-list" data-index="{{index}}" data-id="{{item.id}}" > {{item.title}}</div>
|
||||
{{# }); }}
|
||||
</script>
|
@ -66,8 +66,9 @@
|
||||
<div class="kanbanadmin-list-box">
|
||||
<span class="kanbanadmin-list-tit">{{item.name}}</span>
|
||||
<span class="kanbanadmin-list-add-box">
|
||||
<span class="kanbanadmin-list-add to-added-table" data-id="{{item._id}}"><i class="layui-icon"></i></span>
|
||||
<span class="kanbanadmin-list-add to-added-chart" data-id="{{item._id}}"><i class="layui-icon"></i></span>
|
||||
<!-- <span class="kanbanadmin-list-add to-added-table" data-id="{{item._id}}"><i class="layui-icon"></i></span>
|
||||
<span class="kanbanadmin-list-add to-added-chart" data-id="{{item._id}}"><i class="layui-icon"></i></span> -->
|
||||
<span class="kanbanadmin-list-add kanbanadmin-menu" data-id="{{item._id}}" data-index="{{index}}"><i class="layui-icon"></i></span>
|
||||
<span class="kanbanadmin-list-add to-added-del" data-id="{{item._id}}"> <i class="layui-icon">ဆ</i> </span>
|
||||
</span>
|
||||
</div>
|
||||
|
39
web/pages/kanbantypeset.html
Normal file
39
web/pages/kanbantypeset.html
Normal file
@ -0,0 +1,39 @@
|
||||
<!-- 看板类型设置 -->
|
||||
<div class="kanbantypeset-box">
|
||||
<div class="adduser-top-box">
|
||||
<div>看板类型设置</div>
|
||||
<img src="./static/img/cha.png">
|
||||
</div>
|
||||
|
||||
<div class="kanbantypeset-list-box" style="height: 165px; border-bottom: 1px solid #f0f0f0;">
|
||||
<div class="zidingyizhibiao-list-box" style="margin-top: 15px;">
|
||||
<form class="layui-form" action="" lay-filter="kanbantypeexample">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">模板类型</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="graph_type" value="table" title="表格展示" checked="">
|
||||
<input type="radio" name="graph_type" value="echarts" title="图形展示">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">显示大小</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="graph_size" value="large" title="大图" checked="">
|
||||
<input type="radio" name="graph_size" value="in" title="中图">
|
||||
<input type="radio" name="graph_size" value="small" title="小图">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="kanbantypeset-but-box">
|
||||
<div class="adduser-btn">取消</div>
|
||||
<div class="adduser-btn2">确定</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="login-bg">
|
||||
<!-- <div class="login-bg">
|
||||
|
||||
<div class="login-box">
|
||||
<form method="post" onsubmit="return false" action="##" id="formtest"></form>
|
||||
@ -11,10 +11,58 @@
|
||||
<input type="password" class="password" >
|
||||
</div>
|
||||
<div class="login-but-box">
|
||||
<!-- <div class="login-denglu">登录</div> -->
|
||||
<input type="button" value="登录" class="login-denglu">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div> -->
|
||||
|
||||
<div class="login-bg">
|
||||
<div class="login-box">
|
||||
<div class="login-left">
|
||||
<img src="./static/img/left_login.png" class="left_login">
|
||||
</div>
|
||||
<div class="login-right">
|
||||
<div class="login-txt-box">
|
||||
<div class="logo-box">
|
||||
<img src="./static/img/logo_2.png">
|
||||
<!-- <p>乐谷游戏</p> -->
|
||||
</div>
|
||||
<form method="post" action="sidebar.html" id="formtest">
|
||||
<div class="login-text-box">
|
||||
<div class="login-text">
|
||||
<div class="login-left-img">
|
||||
<img src="./static/img/yonghuming.png">
|
||||
</div>
|
||||
<input type="text" class="login-form-control account" placeholder="输入用户名" name="username">
|
||||
</div>
|
||||
<div class="login-text" style="margin-top: 22px;">
|
||||
<div class="login-left-img">
|
||||
<img src="./static/img/mima.png" style="width: 16px;">
|
||||
</div>
|
||||
<input type="password" class="login-form-control password" placeholder="输入密码" name="password">
|
||||
</div>
|
||||
|
||||
<div class="col-8">
|
||||
<div class="icheck-primary" style="text-align: right;">
|
||||
<!-- <input type="checkbox" id="remember" style="width: 20px; height: 20px;">
|
||||
<label for="remember" style="font-size: 14px; color: #d9d9d9;">
|
||||
记住密码
|
||||
</label> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-8" style="margin-top: 23px;">
|
||||
<input type="button" value="登录" class="login-btn btn-primary btn-block login-denglu"></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="login-bottom-box">
|
||||
<div class="login-bottom-left">Copyright © 2013-2020 乐谷数据分析平台. All rights reserved.</div>
|
||||
<div class="login-bottom-right">Version 1.0.0</div>
|
||||
</div>
|
||||
</div>
|
@ -1,12 +1,13 @@
|
||||
<div class="layui-row layui-col-space15" id="model-box" style="width: 100%; height: 765px; display: flex; flex-wrap: wrap;">
|
||||
<div class="layui-row layui-col-space15" id="model-box" style="width: 100%; height: 780px;">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script id="kanban-model-table-dot" type="text/html">
|
||||
|
||||
{{# if(d.modeltype === "table"){ }}
|
||||
<div class="layui-col-md6" style="float: none;">
|
||||
{{# if(d.modelsize === "small"){ }}
|
||||
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-card">
|
||||
<div class="row-top">
|
||||
<div class="row-tit">
|
||||
@ -29,7 +30,61 @@
|
||||
|
||||
<div class="condition-box">
|
||||
<div class="time-cond">
|
||||
<span>过去30天</span>
|
||||
<span>{{d.date}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="small-data-box">{{d.num}}</div>
|
||||
|
||||
<div class="small-proportion">
|
||||
{{# if(d.thedaypropsize === "+"){ }}
|
||||
<div class="proportion-data">较环比 <div class="sanjiao"></div><span>{{d.thedayprop}}%</span></div>
|
||||
{{# } else { }}
|
||||
<div class="proportion-data">较环比 <div class="sanjiao fu"></div><span class="funum">{{d.thedayprop}}%</span></div>
|
||||
{{# } }}
|
||||
{{# if(d.weekpropsize === "+"){ }}
|
||||
<div class="proportion-data">较同比 <div class="sanjiao"></div><span>{{d.weekprop}}%</span></div>
|
||||
{{# } else { }}
|
||||
<div class="proportion-data">较同比 <div class="sanjiao fu"></div><span class="funum">{{d.weekprop}}%</span></div>
|
||||
{{# } }}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{# } else { }}
|
||||
|
||||
{{# if(d.modeltype === "table"){ }}
|
||||
{{# if(d.modelsize === "large"){ }}
|
||||
<div class="layui-col-md12">
|
||||
{{# } else { }}
|
||||
<div class="layui-col-md6">
|
||||
{{# } }}
|
||||
<!-- <div class="layui-col-md6" style="float: none;"> -->
|
||||
<div class="layui-card">
|
||||
<div class="row-top">
|
||||
<div class="row-tit">
|
||||
<p><a href="#">{{d.name}}</a></p>
|
||||
</div>
|
||||
<div class="control">
|
||||
<div class="action-box" >
|
||||
<div class="tishi" title="更新">
|
||||
<img src="./static/img/gengxin.png" />
|
||||
</div>
|
||||
<div class="tishi" title="探索">
|
||||
<img src="./static/img/fangda.png" />
|
||||
</div>
|
||||
<div class="tishi" title="更多">
|
||||
<img src="./static/img/gengduo.png" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="condition-box">
|
||||
<div class="time-cond">
|
||||
<span>过去7天</span>
|
||||
<div class="xian"></div>
|
||||
<span>按天</span>
|
||||
</div>
|
||||
@ -61,8 +116,13 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{# } else { }}
|
||||
<div class="layui-col-md6" style="float: none;">
|
||||
{{# if(d.modelsize === "large"){ }}
|
||||
<div class="layui-col-md12">
|
||||
{{# } else { }}
|
||||
<div class="layui-col-md6">
|
||||
{{# } }}
|
||||
<div class="layui-card">
|
||||
<div class="row-top">
|
||||
<div class="row-tit">
|
||||
@ -88,7 +148,7 @@
|
||||
|
||||
<div class="condition-box">
|
||||
<div class="time-cond">
|
||||
<span>过去30天</span>
|
||||
<span>过去7天</span>
|
||||
<div class="xian"></div>
|
||||
<span>按天</span>
|
||||
</div>
|
||||
@ -123,4 +183,8 @@
|
||||
|
||||
|
||||
{{# } }}
|
||||
|
||||
|
||||
{{# } }}
|
||||
|
||||
</script>
|
158
web/src/x.min.js
vendored
158
web/src/x.min.js
vendored
@ -103,8 +103,8 @@ var X = window.X || {
|
||||
|
||||
(function(){
|
||||
|
||||
// var ipurl = "http://10.0.0.77:7889/api/v1/";
|
||||
var ipurl = "http://139.159.159.3:9865/api/v1/";
|
||||
var ipurl = "http://10.0.0.77:7889/api/v1/";
|
||||
// var ipurl = "http://139.159.159.3:9865/api/v1/";
|
||||
|
||||
//设置或读取登录缓存,需要保存到localStorage,防止刷新时候登录数据丢失
|
||||
X.loginCache = function(data){
|
||||
@ -494,6 +494,48 @@ var X = window.X || {
|
||||
callback && callback(dataArr);
|
||||
};
|
||||
|
||||
X.eventsmall = function(data,callback){
|
||||
var date,num,thedayprop,weekprop,thedaypropsize,weekpropsize; //时间,当天数量,与前天对比,与上个星期对比,与前天对比正负,与上个星期对比正负
|
||||
console.log(data);
|
||||
for(let i in data){
|
||||
if(data[i]['groups']['length'] == 0){
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
var length = data[0]['date_range'].length - 1;
|
||||
date = data[0]['date_range'][length];
|
||||
num = data[0]['values'][0][length];
|
||||
thedayprop = num / data[0]['values'][0][length - 1];
|
||||
weekprop = num / data[0]['values'][0][length - 8];
|
||||
var prop1,prop2;
|
||||
if(thedayprop >= 1){
|
||||
prop1 = parseFloat((thedayprop - 1)*100);
|
||||
thedaypropsize = '+';
|
||||
}else {
|
||||
prop1 = parseFloat((1 - thedayprop)*100);
|
||||
thedaypropsize = '-';
|
||||
}
|
||||
|
||||
if(weekprop >= 1){
|
||||
prop2 = parseFloat((weekprop - 1)*100);
|
||||
weekpropsize = '+';
|
||||
}else {
|
||||
prop2 = parseFloat((1 - weekprop)*100);
|
||||
weekpropsize = '-';
|
||||
}
|
||||
|
||||
var dataArr = {
|
||||
date: date,
|
||||
num: num,
|
||||
thedayprop: prop1.toFixed(2),
|
||||
thedaypropsize:thedaypropsize,
|
||||
weekprop: weekprop.toFixed(2),
|
||||
weekpropsize:weekpropsize
|
||||
}
|
||||
callback && callback(dataArr);
|
||||
}
|
||||
|
||||
// 分组项
|
||||
// X.grouped=function(data,id){
|
||||
// console.log(data)
|
||||
@ -1413,7 +1455,7 @@ var X = window.X || {
|
||||
"analysis":'total_count',
|
||||
"filts":[],//过滤项
|
||||
"condrelation":'and',
|
||||
"customEvent":'',
|
||||
"customEvent":' ',
|
||||
"eventNameDisplay":' '//重命名指标
|
||||
}
|
||||
data.events.push(defaultindicator);
|
||||
@ -1737,7 +1779,7 @@ var X = window.X || {
|
||||
"analysis":'total_count',
|
||||
"filts":[],//过滤项
|
||||
"condrelation":'and',
|
||||
"customEvent":'',
|
||||
"customEvent":' ',
|
||||
"eventNameDisplay":' '//重命名指标
|
||||
}
|
||||
data['events'].push(defaultindicator);
|
||||
@ -3023,6 +3065,7 @@ var X = window.X || {
|
||||
$(document).on('click','.layui-left-dd',function(){
|
||||
$(".tab-tit-box .tab-tit").html($(this).find("span").html());
|
||||
X.DATA['dashboard_id'] = $(this).attr('data-id'); //看板id
|
||||
$("#chart-box").html("");
|
||||
// 获取报表数据
|
||||
me.gettabledata();
|
||||
});
|
||||
@ -3052,7 +3095,7 @@ var X = window.X || {
|
||||
});
|
||||
|
||||
//管理我创建的看板
|
||||
$(".sousuo-box .kbglkanbanbtn").click(function(){
|
||||
$(document).off('click','.sousuo-box .kbglkanbanbtn').on("click",".sousuo-box .kbglkanbanbtn",function(){
|
||||
X.open({
|
||||
type: 1,
|
||||
title: false,
|
||||
@ -3225,12 +3268,22 @@ var X = window.X || {
|
||||
// console.log(val);
|
||||
if(d[i]['model'] == "event"){
|
||||
// 事件分析
|
||||
if(d[i]['graph_size'] == 'small'){
|
||||
X.eventsmall(val,function(data){//表格数据处理
|
||||
data['name'] = d[i]['name'];
|
||||
data['modeltype'] = d[i]['graph_type'];
|
||||
data['id'] = d[i]['report_id'];
|
||||
data['modelsize'] = d[i]['graph_size'];
|
||||
eventdata.push(data);
|
||||
})
|
||||
}else {
|
||||
if(d[i]['graph_type'] == 'table'){
|
||||
//表格样式
|
||||
X.eventtable(val,function(data){//表格数据处理
|
||||
data['name'] = d[i]['name'];
|
||||
data['modeltype'] = d[i]['graph_type'];
|
||||
data['id'] = d[i]['report_id'];
|
||||
data['modelsize'] = d[i]['graph_size'];
|
||||
eventdata.push(data);
|
||||
})
|
||||
}else if(d[i]['graph_type'] == 'echarts'){
|
||||
@ -3239,15 +3292,19 @@ var X = window.X || {
|
||||
data['name'] = d[i]['name'];
|
||||
data['modeltype'] = d[i]['graph_type'];
|
||||
data['id'] = d[i]['report_id'];
|
||||
data['modelsize'] = d[i]['graph_size'];
|
||||
eventdata.push(data);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
index --;
|
||||
console.log(eventdata);
|
||||
if(index <= 0){
|
||||
X.template("modeltable","chart-box",eventdata,function(){
|
||||
for(let i in eventdata){
|
||||
if(eventdata[i]['modeltype'] == 'echarts'){
|
||||
if(eventdata[i]['modeltype'] == 'echarts' && eventdata[i]['modelsize'] != 'small' ){
|
||||
var myChart = echarts.init(document.getElementById(eventdata[i]['id']));
|
||||
var option = {
|
||||
title: {
|
||||
@ -5306,7 +5363,26 @@ var X = window.X || {
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
$(document).off('click','.kanbanadmin-menu').on('click','.kanbanadmin-menu',function(){
|
||||
var obj = $(this);
|
||||
var id = obj.attr("data-id");
|
||||
var configdata = [];
|
||||
for(let i in submitdata){
|
||||
if(submitdata[i]['report_id'] == id){
|
||||
configdata = submitdata[i];
|
||||
}
|
||||
}
|
||||
X.parametersopen(configdata,'kanbantypeset','auto',function(d){
|
||||
var graph_size = d['graph_size'];
|
||||
var graph_type = d['graph_type'];
|
||||
for(let i in submitdata){
|
||||
if(submitdata[i]['report_id'] == id){
|
||||
submitdata[i]['graph_type'] = graph_type;
|
||||
submitdata[i]['graph_size'] = graph_size;
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
//渲染已添加报表下拉框
|
||||
function toadddataprocessing(){
|
||||
@ -5317,12 +5393,14 @@ var X = window.X || {
|
||||
}
|
||||
};
|
||||
submitdata = [];
|
||||
console.log(toadddata);
|
||||
for(let i in toadddata){
|
||||
var arr = {
|
||||
report_id:toadddata[i]['_id'],
|
||||
graph_type:'table',
|
||||
graph_type: toadddata[i]['show_config']['graph_type'] || 'table',
|
||||
model:toadddata[i]['cat'],
|
||||
name:toadddata[i]['name'],
|
||||
graph_size:toadddata[i]['show_config']['graph_size'] || 'in'
|
||||
};
|
||||
submitdata.push(arr);
|
||||
}
|
||||
@ -5335,12 +5413,16 @@ var X = window.X || {
|
||||
});
|
||||
});
|
||||
|
||||
$(document).off('click','.kanbanadmin-but-qx').on('click','.kanbanadmin-but-qx',function(){
|
||||
layer.closeAll();
|
||||
});
|
||||
|
||||
$(document).off('click','.kanbanadmin-but-yy').on('click','.kanbanadmin-but-yy',function(){
|
||||
X.api('dashboard/add_report','post',{_id:X['DATA']['dashboard_id'],report_ids:submitdata},function(d){
|
||||
if(d == 'ok'){
|
||||
me.callback && me.callback();
|
||||
layer.closeAll();
|
||||
layer.msg('应用成功');
|
||||
me.callback && me.callback();
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -5429,6 +5511,40 @@ var X = window.X || {
|
||||
};
|
||||
})();
|
||||
|
||||
// srczip/logic/kanbantypeset.js
|
||||
(function(){
|
||||
X.pageLogic['kanbantypeset'] = {
|
||||
init : function(parms){
|
||||
var me = this;
|
||||
this.parms = parms;
|
||||
this.callback = parms.callback;
|
||||
var listdata = parms.extData;
|
||||
layui.form.render();
|
||||
if(listdata){
|
||||
layui.form.val('kanbantypeexample',{
|
||||
graph_type: listdata.graph_type || 'table',
|
||||
graph_size: listdata.graph_size || 'in'
|
||||
})
|
||||
}
|
||||
|
||||
$(document).off('click','.adduser-top-box img').on('click','.adduser-top-box img',function(){
|
||||
layer.close(parms.layIndex);
|
||||
});
|
||||
|
||||
$(document).off('click','.kanbantypeset-but-box .adduser-btn').on('click','.kanbantypeset-but-box .adduser-btn',function(){
|
||||
layer.close(parms.layIndex);
|
||||
})
|
||||
|
||||
$(document).off('click','.kanbantypeset-but-box .adduser-btn2').on('click','.kanbantypeset-but-box .adduser-btn2',function(){
|
||||
var data = layui.form.val('kanbantypeexample');
|
||||
console.log(data);
|
||||
me.callback && me.callback(data);
|
||||
layer.close(parms.layIndex);
|
||||
})
|
||||
|
||||
}
|
||||
};
|
||||
})();
|
||||
// srczip/logic/kongjianshezhi.js
|
||||
(function(){
|
||||
X.pageLogic['kongjianshezhi'] = {
|
||||
@ -5437,11 +5553,11 @@ var X = window.X || {
|
||||
|
||||
$(".kongjian-mc-box .kongjian-tianjia").click(function(){
|
||||
$(".kongjian-box .member-box").show();
|
||||
})
|
||||
});
|
||||
|
||||
$(".member-top-box .member-cha").click(function(){
|
||||
$(".kongjian-box .member-box").hide();
|
||||
})
|
||||
});
|
||||
var userarr,adduadaserarr;
|
||||
|
||||
var userinfo = X.DATA.userinfo;
|
||||
@ -5457,7 +5573,7 @@ var X = window.X || {
|
||||
X.DATA['adduadaserarr'] = [];
|
||||
X.DATA['userarr'] = d;
|
||||
me.updatauserarr();
|
||||
})
|
||||
});
|
||||
|
||||
//添加用户数据
|
||||
|
||||
@ -5586,7 +5702,20 @@ var X = window.X || {
|
||||
(function(){
|
||||
X.pageLogic['login'] = {
|
||||
init : function(){
|
||||
$(".login-but-box .login-denglu").click(function(){
|
||||
$(".login-denglu").click(function(){
|
||||
postlogin();
|
||||
});
|
||||
|
||||
document.onkeydown=function(ev){
|
||||
var event=ev ||event
|
||||
if(event.keyCode==13){
|
||||
|
||||
postlogin();
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
function postlogin(){
|
||||
var account = $(".login-txt-box .account").val();
|
||||
var password = $(".login-txt-box .password").val();
|
||||
// X.gourl("dashboard");
|
||||
@ -5596,7 +5725,8 @@ var X = window.X || {
|
||||
X.loginCache(d);
|
||||
X.gourl("dashboard");
|
||||
});
|
||||
})
|
||||
};
|
||||
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
@ -102,8 +102,8 @@ var X = window.X || {
|
||||
|
||||
(function(){
|
||||
|
||||
// var ipurl = "http://10.0.0.77:7889/api/v1/";
|
||||
var ipurl = "http://139.159.159.3:9865/api/v1/";
|
||||
var ipurl = "http://10.0.0.77:7889/api/v1/";
|
||||
// var ipurl = "http://139.159.159.3:9865/api/v1/";
|
||||
|
||||
//设置或读取登录缓存,需要保存到localStorage,防止刷新时候登录数据丢失
|
||||
X.loginCache = function(data){
|
||||
@ -493,6 +493,48 @@ var X = window.X || {
|
||||
callback && callback(dataArr);
|
||||
};
|
||||
|
||||
X.eventsmall = function(data,callback){
|
||||
var date,num,thedayprop,weekprop,thedaypropsize,weekpropsize; //时间,当天数量,与前天对比,与上个星期对比,与前天对比正负,与上个星期对比正负
|
||||
console.log(data);
|
||||
for(let i in data){
|
||||
if(data[i]['groups']['length'] == 0){
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
var length = data[0]['date_range'].length - 1;
|
||||
date = data[0]['date_range'][length];
|
||||
num = data[0]['values'][0][length];
|
||||
thedayprop = num / data[0]['values'][0][length - 1];
|
||||
weekprop = num / data[0]['values'][0][length - 8];
|
||||
var prop1,prop2;
|
||||
if(thedayprop >= 1){
|
||||
prop1 = parseFloat((thedayprop - 1)*100);
|
||||
thedaypropsize = '+';
|
||||
}else {
|
||||
prop1 = parseFloat((1 - thedayprop)*100);
|
||||
thedaypropsize = '-';
|
||||
}
|
||||
|
||||
if(weekprop >= 1){
|
||||
prop2 = parseFloat((weekprop - 1)*100);
|
||||
weekpropsize = '+';
|
||||
}else {
|
||||
prop2 = parseFloat((1 - weekprop)*100);
|
||||
weekpropsize = '-';
|
||||
}
|
||||
|
||||
var dataArr = {
|
||||
date: date,
|
||||
num: num,
|
||||
thedayprop: prop1.toFixed(2),
|
||||
thedaypropsize:thedaypropsize,
|
||||
weekprop: weekprop.toFixed(2),
|
||||
weekpropsize:weekpropsize
|
||||
}
|
||||
callback && callback(dataArr);
|
||||
}
|
||||
|
||||
// 分组项
|
||||
// X.grouped=function(data,id){
|
||||
// console.log(data)
|
||||
|
@ -85,7 +85,7 @@
|
||||
"analysis":'total_count',
|
||||
"filts":[],//过滤项
|
||||
"condrelation":'and',
|
||||
"customEvent":'',
|
||||
"customEvent":' ',
|
||||
"eventNameDisplay":' '//重命名指标
|
||||
}
|
||||
data.events.push(defaultindicator);
|
||||
@ -409,7 +409,7 @@
|
||||
"analysis":'total_count',
|
||||
"filts":[],//过滤项
|
||||
"condrelation":'and',
|
||||
"customEvent":'',
|
||||
"customEvent":' ',
|
||||
"eventNameDisplay":' '//重命名指标
|
||||
}
|
||||
data['events'].push(defaultindicator);
|
||||
|
@ -45,6 +45,7 @@
|
||||
$(document).on('click','.layui-left-dd',function(){
|
||||
$(".tab-tit-box .tab-tit").html($(this).find("span").html());
|
||||
X.DATA['dashboard_id'] = $(this).attr('data-id'); //看板id
|
||||
$("#chart-box").html("");
|
||||
// 获取报表数据
|
||||
me.gettabledata();
|
||||
});
|
||||
@ -74,7 +75,7 @@
|
||||
});
|
||||
|
||||
//管理我创建的看板
|
||||
$(".sousuo-box .kbglkanbanbtn").click(function(){
|
||||
$(document).off('click','.sousuo-box .kbglkanbanbtn').on("click",".sousuo-box .kbglkanbanbtn",function(){
|
||||
X.open({
|
||||
type: 1,
|
||||
title: false,
|
||||
@ -247,12 +248,22 @@
|
||||
// console.log(val);
|
||||
if(d[i]['model'] == "event"){
|
||||
// 事件分析
|
||||
if(d[i]['graph_size'] == 'small'){
|
||||
X.eventsmall(val,function(data){//表格数据处理
|
||||
data['name'] = d[i]['name'];
|
||||
data['modeltype'] = d[i]['graph_type'];
|
||||
data['id'] = d[i]['report_id'];
|
||||
data['modelsize'] = d[i]['graph_size'];
|
||||
eventdata.push(data);
|
||||
})
|
||||
}else {
|
||||
if(d[i]['graph_type'] == 'table'){
|
||||
//表格样式
|
||||
X.eventtable(val,function(data){//表格数据处理
|
||||
data['name'] = d[i]['name'];
|
||||
data['modeltype'] = d[i]['graph_type'];
|
||||
data['id'] = d[i]['report_id'];
|
||||
data['modelsize'] = d[i]['graph_size'];
|
||||
eventdata.push(data);
|
||||
})
|
||||
}else if(d[i]['graph_type'] == 'echarts'){
|
||||
@ -261,15 +272,19 @@
|
||||
data['name'] = d[i]['name'];
|
||||
data['modeltype'] = d[i]['graph_type'];
|
||||
data['id'] = d[i]['report_id'];
|
||||
data['modelsize'] = d[i]['graph_size'];
|
||||
eventdata.push(data);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
index --;
|
||||
console.log(eventdata);
|
||||
if(index <= 0){
|
||||
X.template("modeltable","chart-box",eventdata,function(){
|
||||
for(let i in eventdata){
|
||||
if(eventdata[i]['modeltype'] == 'echarts'){
|
||||
if(eventdata[i]['modeltype'] == 'echarts' && eventdata[i]['modelsize'] != 'small' ){
|
||||
var myChart = echarts.init(document.getElementById(eventdata[i]['id']));
|
||||
var option = {
|
||||
title: {
|
||||
|
21
web/srczip/logic/dropdownlist2.js
Normal file
21
web/srczip/logic/dropdownlist2.js
Normal file
@ -0,0 +1,21 @@
|
||||
(function(){
|
||||
X.pageLogic['dropdownlist2'] = {
|
||||
init : function(parms){
|
||||
var me = this;
|
||||
this.parms = parms;
|
||||
this.callback = parms.callback;
|
||||
var listdata = parms.extData;
|
||||
// console.log('aaa',listdata);
|
||||
|
||||
X.laytpldata("#dropdownlist-con-box-dot",listdata,".dropdownlist-con-box");
|
||||
|
||||
$(document).off('click','.dropdownlist-list').on('click','.dropdownlist-list',function(){
|
||||
var index = $(this).attr("data-index");
|
||||
var dataArr = listdata[index];
|
||||
me.callback && me.callback(dataArr);
|
||||
layer.closeAll(0);
|
||||
})
|
||||
|
||||
}
|
||||
};
|
||||
})();
|
@ -103,7 +103,26 @@
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
$(document).off('click','.kanbanadmin-menu').on('click','.kanbanadmin-menu',function(){
|
||||
var obj = $(this);
|
||||
var id = obj.attr("data-id");
|
||||
var configdata = [];
|
||||
for(let i in submitdata){
|
||||
if(submitdata[i]['report_id'] == id){
|
||||
configdata = submitdata[i];
|
||||
}
|
||||
}
|
||||
X.parametersopen(configdata,'kanbantypeset','auto',function(d){
|
||||
var graph_size = d['graph_size'];
|
||||
var graph_type = d['graph_type'];
|
||||
for(let i in submitdata){
|
||||
if(submitdata[i]['report_id'] == id){
|
||||
submitdata[i]['graph_type'] = graph_type;
|
||||
submitdata[i]['graph_size'] = graph_size;
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
//渲染已添加报表下拉框
|
||||
function toadddataprocessing(){
|
||||
@ -114,12 +133,14 @@
|
||||
}
|
||||
};
|
||||
submitdata = [];
|
||||
console.log(toadddata);
|
||||
for(let i in toadddata){
|
||||
var arr = {
|
||||
report_id:toadddata[i]['_id'],
|
||||
graph_type:'table',
|
||||
graph_type: toadddata[i]['show_config']['graph_type'] || 'table',
|
||||
model:toadddata[i]['cat'],
|
||||
name:toadddata[i]['name'],
|
||||
graph_size:toadddata[i]['show_config']['graph_size'] || 'in'
|
||||
};
|
||||
submitdata.push(arr);
|
||||
}
|
||||
@ -132,12 +153,16 @@
|
||||
});
|
||||
});
|
||||
|
||||
$(document).off('click','.kanbanadmin-but-qx').on('click','.kanbanadmin-but-qx',function(){
|
||||
layer.closeAll();
|
||||
});
|
||||
|
||||
$(document).off('click','.kanbanadmin-but-yy').on('click','.kanbanadmin-but-yy',function(){
|
||||
X.api('dashboard/add_report','post',{_id:X['DATA']['dashboard_id'],report_ids:submitdata},function(d){
|
||||
if(d == 'ok'){
|
||||
me.callback && me.callback();
|
||||
layer.closeAll();
|
||||
layer.msg('应用成功');
|
||||
me.callback && me.callback();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
33
web/srczip/logic/kanbantypeset.js
Normal file
33
web/srczip/logic/kanbantypeset.js
Normal file
@ -0,0 +1,33 @@
|
||||
(function(){
|
||||
X.pageLogic['kanbantypeset'] = {
|
||||
init : function(parms){
|
||||
var me = this;
|
||||
this.parms = parms;
|
||||
this.callback = parms.callback;
|
||||
var listdata = parms.extData;
|
||||
layui.form.render();
|
||||
if(listdata){
|
||||
layui.form.val('kanbantypeexample',{
|
||||
graph_type: listdata.graph_type || 'table',
|
||||
graph_size: listdata.graph_size || 'in'
|
||||
})
|
||||
}
|
||||
|
||||
$(document).off('click','.adduser-top-box img').on('click','.adduser-top-box img',function(){
|
||||
layer.close(parms.layIndex);
|
||||
});
|
||||
|
||||
$(document).off('click','.kanbantypeset-but-box .adduser-btn').on('click','.kanbantypeset-but-box .adduser-btn',function(){
|
||||
layer.close(parms.layIndex);
|
||||
})
|
||||
|
||||
$(document).off('click','.kanbantypeset-but-box .adduser-btn2').on('click','.kanbantypeset-but-box .adduser-btn2',function(){
|
||||
var data = layui.form.val('kanbantypeexample');
|
||||
console.log(data);
|
||||
me.callback && me.callback(data);
|
||||
layer.close(parms.layIndex);
|
||||
})
|
||||
|
||||
}
|
||||
};
|
||||
})();
|
@ -5,11 +5,11 @@
|
||||
|
||||
$(".kongjian-mc-box .kongjian-tianjia").click(function(){
|
||||
$(".kongjian-box .member-box").show();
|
||||
})
|
||||
});
|
||||
|
||||
$(".member-top-box .member-cha").click(function(){
|
||||
$(".kongjian-box .member-box").hide();
|
||||
})
|
||||
});
|
||||
var userarr,adduadaserarr;
|
||||
|
||||
var userinfo = X.DATA.userinfo;
|
||||
@ -25,7 +25,7 @@
|
||||
X.DATA['adduadaserarr'] = [];
|
||||
X.DATA['userarr'] = d;
|
||||
me.updatauserarr();
|
||||
})
|
||||
});
|
||||
|
||||
//添加用户数据
|
||||
|
||||
|
@ -1,7 +1,20 @@
|
||||
(function(){
|
||||
X.pageLogic['login'] = {
|
||||
init : function(){
|
||||
$(".login-but-box .login-denglu").click(function(){
|
||||
$(".login-denglu").click(function(){
|
||||
postlogin();
|
||||
});
|
||||
|
||||
document.onkeydown=function(ev){
|
||||
var event=ev ||event
|
||||
if(event.keyCode==13){
|
||||
|
||||
postlogin();
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
function postlogin(){
|
||||
var account = $(".login-txt-box .account").val();
|
||||
var password = $(".login-txt-box .password").val();
|
||||
// X.gourl("dashboard");
|
||||
@ -11,7 +24,8 @@
|
||||
X.loginCache(d);
|
||||
X.gourl("dashboard");
|
||||
});
|
||||
})
|
||||
};
|
||||
|
||||
}
|
||||
};
|
||||
})();
|
@ -125,7 +125,7 @@
|
||||
|
||||
.ant-select-selector { cursor: pointer; width: 54px; text-align: center; line-height: 28px; margin-left: 32px; margin-top: 6px; color: #67729d; font-size: 13px; height: 28px; padding: 0 6px; background-color: #f0f2f5; border-color: #f0f2f5; border-radius: 2px; }
|
||||
.analysis-custom-box:hover > .ant-select-selector { background-color: #ffffff; }
|
||||
.analysis-custom-top { margin-left: 12px; display: flex; align-items: center; }
|
||||
.analysis-custom-top { margin-left: 0px; display: flex; align-items: center; }
|
||||
.analysis-custom-top .analysis-con-left-screen-list-left-zhibiaoname { margin-left: 10px; }
|
||||
.analysis-custom-top .analysis-num { margin-bottom: 8px; }
|
||||
|
||||
|
@ -353,7 +353,7 @@ span.comboTreeItemTitle{display: block;padding: 2px 4px;}
|
||||
|
||||
|
||||
/* 登录界面 */
|
||||
.login-bg { width: 100%; min-height: 100%; background-color: #000; position: fixed; }
|
||||
/* .login-bg { width: 100%; min-height: 100%; background-color: #000; position: fixed; }
|
||||
.login-bg .login-box { width: 500px; height: 300px; position: absolute; margin: auto; top: 0; bottom: 0; left: 0; right: 0; background-color: #fff; border-radius: 2px; }
|
||||
.login-box .login-txt-box { padding: 20px 100px; display: flex; justify-content: space-between; align-items: center; }
|
||||
.login-box .login-txt-box input { width: 250px; height: 30px; line-height: 30px; }
|
||||
@ -361,7 +361,36 @@ span.comboTreeItemTitle{display: block;padding: 2px 4px;}
|
||||
.login-box .login-but-box { margin-top: 30px; display: flex; justify-content: space-between; align-items: center; }
|
||||
.login-but-box .login-denglu { border: 0; cursor: pointer; width: 150px; height: 34px; line-height: 34px; text-align: center; margin: 0 auto; background-color: #1890ff; color: #fff; }
|
||||
|
||||
.search_data-zwsj { text-align: center; position: absolute; margin: auto; top: 278px; left: 0; right: 0; }
|
||||
.search_data-zwsj { text-align: center; position: absolute; margin: auto; top: 278px; left: 0; right: 0; } */
|
||||
|
||||
*, ::after, ::before { box-sizing: inherit; }
|
||||
.login-bg { width: 100%; height: 100%; position: absolute; background: url('../img/bg_login.png') no-repeat; background-size: 100% 100%; }
|
||||
.login-box { width: 69%; height: 70%; position: absolute; margin: auto; left: 0; right: 0; top: 0; bottom: 0; background-color: #fff; border-radius: 8px; display: flex; justify-content: space-around; align-items: center; }
|
||||
.login-left { width: 55.5%; height: 100%; background-color: #e0f1ff; border-radius: 8px 0 0 8px; line-height: 100%; display: flex; justify-content: space-around; align-items: center;}
|
||||
.left_login { text-align: center; width: 77.8%;}
|
||||
.login-right { width: 44.5%; height: 100%; }
|
||||
.logo-box { text-align: center; font-size: 20px; color: #828282; margin-top: 19.6%; }
|
||||
.logo-box img { height: 75px; }
|
||||
.logo-box p { margin-top: 10px; }
|
||||
.login-text-box { margin: 35px 12% 0 12%; }
|
||||
.login-left-img { width: 20px; padding: 8px 12px; }
|
||||
.login-left-img img{ width: 18px; position: relative; top: -2px; }
|
||||
.login-text { display: flex; align-items: center; }
|
||||
|
||||
.login-form-control { border: 0; padding: 8px 0; font-size: 0.9rem; height: calc(2.25rem + 2px); width: 100%; }
|
||||
.login-text { border: 1px solid #d9d9d9; }
|
||||
.col-8 { max-width: 100%; padding: 0 !important; margin-top: 13px;}
|
||||
[class*=icheck-]>input:first-child+input[type=hidden]+label::before, [class*=icheck-]>input:first-child+label::before { width: 18px; height: 18px; position: relative; top: 5px; }
|
||||
.btn { padding: 0.87rem 0; }
|
||||
.btn-primary { background-color: #40a9ff; border-color: #40a9ff; }
|
||||
.btn-primary:hover { background-color: #40a9ff; border-color: #40a9ff; }
|
||||
[class*=icheck-]>input:first-child:checked+input[type=hidden]+label::after, [class*=icheck-]>input:first-child:checked+label::after { left: -2px; top: 2px; }
|
||||
label:not(.form-check-label):not(.custom-file-label) { font-weight: 400; }
|
||||
.bottom-box { width: 70%; font-weight: 300; position: absolute; margin: 0 auto; bottom: 3%; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; color: #ffffff; font-size: 16px; }
|
||||
[class*=icheck-]>input:first-child+input[type=hidden]+label::before, [class*=icheck-]>input:first-child+label::before { border:1px solid #d9d9d9; }
|
||||
.icheck-primary>input:first-child:checked+input[type=hidden]+label::before, .icheck-primary>input:first-child:checked+label::before { background-color: #40a9ff; border-color: #40a9ff;}
|
||||
.login-btn { background-color: #40a9ff; border-color: #40a9ff; padding: 0.87rem 0; width: 100%; }
|
||||
.login-bottom-box { width: 70%; font-size: 300; position: absolute; margin: 0 auto; bottom: 3%; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; color: #fff; font-size: 16px; }
|
||||
|
||||
/* 看板设置 */
|
||||
.kanbanshezhi-box { width: 396px; background-color: #fff; }
|
||||
@ -441,4 +470,11 @@ span.comboTreeItemTitle{display: block;padding: 2px 4px;}
|
||||
.zhuanghu_xila_xian { margin: 0 auto; width: 15px; height: 2px; background-color: #94c8ff; }
|
||||
.layui-project-box a{ width: 120px; }
|
||||
|
||||
/* 看板类型设置 */
|
||||
.kanbantypeset-box { width: 500px; height: 300px; background-color: #fff; }
|
||||
.kanbantypeset-but-box { padding: 14px 32px; text-align: right; display: flex; justify-content: flex-end; }
|
||||
|
||||
.small-data-box { height: 38px; margin-top: 16px; color: #202d3f; font-weight: 500; font-size: 36px; line-height: 38px; text-align: left; font-size: 36px; padding: 0 24px; }
|
||||
.small-proportion { padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; }
|
||||
.fu { transform:rotate(180deg); border-bottom: 3px solid #ff5d5d; }
|
||||
.funum { color: #ff5d5d !important; }
|
||||
|
BIN
web/static/img/bg_login.png
Normal file
BIN
web/static/img/bg_login.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
BIN
web/static/img/left_login.png
Normal file
BIN
web/static/img/left_login.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
BIN
web/static/img/logo_2.png
Normal file
BIN
web/static/img/logo_2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.0 KiB |
BIN
web/static/img/mima.png
Normal file
BIN
web/static/img/mima.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 388 B |
BIN
web/static/img/yonghuming.png
Normal file
BIN
web/static/img/yonghuming.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 354 B |
Loading…
Reference in New Issue
Block a user