1
This commit is contained in:
parent
27dade435c
commit
5d43762134
144
web/src/x.min.js
vendored
144
web/src/x.min.js
vendored
@ -277,6 +277,25 @@ var X = window.X || {
|
||||
});
|
||||
};
|
||||
|
||||
//提交修改记录
|
||||
X.submitrecord = function(content){
|
||||
var game = X.game;//项目名
|
||||
var name = X.userinfo.name;//账号名
|
||||
var date = new Date();
|
||||
var y = date.getFullYear();
|
||||
var m = date.getMonth()+1;
|
||||
var d = date.getDate();
|
||||
var h = date.getHours();
|
||||
var min = date.getMinutes();
|
||||
var s = date.getSeconds();
|
||||
var time = y+'年'+(m<10?('0'+m):m)+'月'+(d<10?('0'+d):d)+'日 '+(h<10?('0'+h):h)+':'+(min<10?('0'+min):min)+':'+(s<10?('0'+s):s);//操作时间
|
||||
|
||||
console.log(name+'在'+time+'修改'+content);
|
||||
// X.api(function(){
|
||||
|
||||
// })
|
||||
};
|
||||
|
||||
X.uploadfile=function(url,id,callback){
|
||||
var loginCache = X.loginCache();
|
||||
var token = (loginCache? loginCache.token:"");
|
||||
@ -610,6 +629,16 @@ var X = window.X || {
|
||||
callback && callback(dataArr);
|
||||
};
|
||||
|
||||
//分页
|
||||
X.layuipages = function(id,count,callback){//绑定id,数据总数
|
||||
layui.laypage.render({
|
||||
elem: id
|
||||
,count: count //数据总数
|
||||
,limit: 18 //每页显示数
|
||||
,jump:callback
|
||||
});
|
||||
};
|
||||
|
||||
// 日期选择器
|
||||
X.daterender = function(id,callback){
|
||||
// console.log(moment().subtract(1, 'week').startOf('week'))
|
||||
@ -3133,8 +3162,6 @@ var X = window.X || {
|
||||
for(let i in addroledata){
|
||||
dataArr.push(i);
|
||||
}
|
||||
// console.log(addroledata);
|
||||
// console.log(dataArr);
|
||||
if(passdata){
|
||||
// X.api("authz/add_roles","post",{name:tit,game:X['DATA']['game'],desc:'111'},function(d){
|
||||
|
||||
@ -3150,6 +3177,7 @@ var X = window.X || {
|
||||
layer.msg("创建成功");
|
||||
$(".addrole-qx a").click();
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
});
|
||||
@ -7347,7 +7375,11 @@ var X = window.X || {
|
||||
init : function(parms){
|
||||
var me = this;
|
||||
|
||||
layui.form.render();
|
||||
X.api("project/","get",{},function(d){
|
||||
X.laytpldata('#select-datacheck-list-box-dot',d,'.select-datacheck-list-box',function(){
|
||||
layui.form.render();
|
||||
});
|
||||
})
|
||||
|
||||
// 事件属性添加
|
||||
var eventarr = [];
|
||||
@ -7448,11 +7480,25 @@ var X = window.X || {
|
||||
|
||||
$(document).off('click','.condition-input').on('blur','.condition-input',function(){
|
||||
var index = $(this).attr('data-index');
|
||||
if(conditionarr[index] == undefined){
|
||||
var arr = {
|
||||
'conditionname':'',
|
||||
'v':''
|
||||
}
|
||||
conditionarr.push(arr);
|
||||
}
|
||||
conditionarr[index]['conditionname'] = $(this).val();
|
||||
});
|
||||
|
||||
$(document).off('click','.condition-v-input').on('blur','.condition-v-input',function(){
|
||||
var index = $(this).attr('data-index');
|
||||
if(conditionarr[index] == undefined){
|
||||
var arr = {
|
||||
'conditionname':'',
|
||||
'v':''
|
||||
}
|
||||
conditionarr.push(arr);
|
||||
}
|
||||
conditionarr[index]['v'] = $(this).val();
|
||||
});
|
||||
|
||||
@ -7499,7 +7545,7 @@ var X = window.X || {
|
||||
}
|
||||
|
||||
var data={
|
||||
// 'game': fromdata.game,
|
||||
'game': fromdata.game,
|
||||
'db_name':fromdata.db_name,
|
||||
'event_name':fromdata.eventname,
|
||||
'is_unique':is_unique,
|
||||
@ -7548,7 +7594,7 @@ var X = window.X || {
|
||||
conditionarr = conditionData;
|
||||
modeltitle = data.title;
|
||||
layui.form.val('datacheckexample',{
|
||||
// 'game':data['game'],
|
||||
'game':data['game'],
|
||||
'db_name':data['check']['db_name'],
|
||||
'eventname':data['check']['event_name'],
|
||||
'only':data['check']['is_unique'],
|
||||
@ -7581,6 +7627,7 @@ var X = window.X || {
|
||||
}
|
||||
|
||||
var data={
|
||||
'game': fromdata.game,
|
||||
'db_name':fromdata.db_name,
|
||||
'event_name':fromdata.eventname,
|
||||
'is_unique':is_unique,
|
||||
@ -8913,8 +8960,16 @@ var X = window.X || {
|
||||
me.eventmanagementlist();
|
||||
})
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
$(document).off('click','.eventattradmin-actions___141YT').on('click','.eventattradmin-actions___141YT',function(){
|
||||
|
||||
X.parametersopen(1,"personalsettingsedit",'auto',function(){
|
||||
|
||||
me.eventmanagementlist();
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
eventmanagementlist : function(){
|
||||
@ -11279,6 +11334,19 @@ var X = window.X || {
|
||||
}
|
||||
};
|
||||
})();
|
||||
// srczip/logic/operation.js
|
||||
(function(){
|
||||
X.pageLogic['operation'] = {
|
||||
init : function(parms){
|
||||
var me = this;
|
||||
|
||||
X.layuipages("operation-pages",50,function(e){
|
||||
console.log(e);
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
})();
|
||||
// srczip/logic/participate.js
|
||||
(function(){
|
||||
X.pageLogic['participate'] = {
|
||||
@ -11456,18 +11524,20 @@ var X = window.X || {
|
||||
this.callback = parms.callback; //选择后执行的回调
|
||||
var data = parms.extData;//获取到上层弹窗传的数据
|
||||
layui.form.render();
|
||||
if(data){
|
||||
if(data != 1 && data){
|
||||
layui.form.val('personalsettingseditexample', {
|
||||
"show_name": data.show_name // "name": "value"
|
||||
,"desc": data.desc
|
||||
,"is_show":(data.is_show)? 1 : 0
|
||||
});
|
||||
}else {
|
||||
|
||||
}
|
||||
$(document).off('click','.personalsettingsedit-qd').on('click','.personalsettingsedit-qd',function(){
|
||||
var arr = layui.form.val('personalsettingseditexample');
|
||||
arr['event_name'] = data.name;
|
||||
X.api("data_mana/event_edit","post",arr,function(d){
|
||||
layer.msg("修改成功");
|
||||
layer.msg("保存成功");
|
||||
me.callback && me.callback(d);
|
||||
layer.closeAll();
|
||||
})
|
||||
@ -13503,6 +13573,7 @@ var X = window.X || {
|
||||
X.api('report/edit','post',arr,function(d){
|
||||
layer.msg(d);
|
||||
layer.closeAll();
|
||||
|
||||
})
|
||||
}else {
|
||||
data['eventView']['date_type'] = tabval.date_type;
|
||||
@ -13518,13 +13589,11 @@ var X = window.X || {
|
||||
layer.closeAll();
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
$(document).off('click',".savereport-but-qx").on('click','.savereport-but-qx',function(){
|
||||
layer.closeAll();
|
||||
})
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
@ -14081,8 +14150,59 @@ var X = window.X || {
|
||||
report_id:postdata[0]['_id']
|
||||
}
|
||||
X.api('report/edit','post',reportedit,function(d){
|
||||
|
||||
var ascending = data.ascending ==="false" ? false : true;
|
||||
var avesumdata = data.avesumdata === "false" ? false : true;
|
||||
var daydata = data.daydata === "false" ? false : true;
|
||||
var modelswitch = data.modelswitch === "false" ? false : true;
|
||||
var reverseorder = data.reverseorder === "false" ? false : true;
|
||||
|
||||
var updatatype='操作'+postdata[0]['name'];
|
||||
if(postdata[0]['name'] != title){
|
||||
updatatype+=",修改 报表名称"
|
||||
}
|
||||
if(postdata[0]['desc'] != desc){
|
||||
// updatatype 操作 基础数据报表
|
||||
updatatype+=",修改 备注"
|
||||
}
|
||||
if(ascending != arr['report']['ascending']){
|
||||
// 倒序
|
||||
updatatype+=",修改 倒序"
|
||||
}
|
||||
if(avesumdata != arr['report']['avesumdata']){
|
||||
//平均总和
|
||||
updatatype+=",修改 平均总和展示"
|
||||
}
|
||||
if(daydata != arr['report']['daydata']){0
|
||||
// 当天数据
|
||||
updatatype+=",修改 当天数据展示"
|
||||
}
|
||||
if(data.modelsize != arr['report']['graph_size']){
|
||||
// 窗体大小
|
||||
updatatype+=",修改 窗体大小"
|
||||
}
|
||||
if(modelswitch != arr['report']['modelswitch']){
|
||||
// xy轴切换
|
||||
updatatype+=",修改 xy轴切换"
|
||||
}
|
||||
if(data.modeltype != arr['report']['graph_type']){
|
||||
// 图表类型
|
||||
updatatype+=",修改 图表类型"
|
||||
}
|
||||
if(reverseorder != arr['report']['reverseorder']){
|
||||
// 首行浮动
|
||||
updatatype+=",修改 首行浮动"
|
||||
}
|
||||
if(updatatype){
|
||||
|
||||
}
|
||||
// console.log(updatatype);
|
||||
// X.submitrecord()
|
||||
// console.log(data);
|
||||
// console.log(arr);
|
||||
me.callback && me.callback(d);
|
||||
layer.closeAll();
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user