当前位置: 编程技术>WEB前端
JQEasy-ui在IE9以下版本中二次加载的问题分析及处理方法
来源: 互联网 发布时间:2014-08-25
本文导语: 网上答案说是因为Easy-ui在低版本时应将class样式删去,而在javascript里写url,因为class里有url的话javascript里也存在url,就会使页面刷新俩次,但是测试后没有解决我的问题,后来通过反复测试终于找到问题, 因为在页面写...
网上答案说是因为Easy-ui在低版本时应将class样式删去,而在javascript里写url,因为class里有url的话javascript里也存在url,就会使页面刷新俩次,但是测试后没有解决我的问题,后来通过反复测试终于找到问题,
因为在页面写了style,将style里的样式删去就可以解决问题了,现附上完整的ajax动态树和Grid表格代码。
Tree
var NodeText;
var time;
var treeeva;
$(function () {
initTable();
$("#SelectForm").css("display", "none");
bindSearcheClick();
$('#eva').tree({
url: '/OEE/GetTree',
method: 'get',
animate: true,
checkbox: true
});
});
//初始化表格
function initTable() {
$('#tt').datagrid({
url: '/OEE/Details',
title: 'OEE',
width: 700,
height: 360,
fitColumns: true,
idField: 'Fid',
loadMsg: '正在加载设备的信息...',
pagination: true,
singleSelect: false,
pageSize: 10,
pageNumber: 1,
pageList: [10, 20, 30],
queryParams: {//要传入的参数
NodeResult: NodeText,
SelectTime: $('#SelectTime').datebox('getValue')
},
columns: [[//{EID, ETypeName, ThenTypeInfoTID, EtypeNum}
{field: 'Num', title: '设备编号', width: 80, align: "center" },
{ field: 'Name', title: '设备名称', width: 80, align: "center" },
{ field: 'EarlyTimeOEE', title: '早班OEE', width: 80, align: "center" },
{ field: 'MiddleTimeOEE', title: '午班OEE', width: 80, align: "center" },
{ field: 'LaterTimeOEE', title: '晚班OEE', width: 80, align: "center" },
{
field: 'DelFlag', title: '操作', width: 80, align: 'center',
formatter: function (value, row, index) {
var str = "明细 ";
return str;
}
}
]],
onHeaderContextMenu: function (e, field) {
},
onLoadSuccess: function (data) {
$(".SelectInfo").unbind("click");
$(".SelectInfo").bind("click", function () {
doSelect($(this).attr("Fid"), time);
return false;
});
}
});
}
function doSelect(Fid, Time) {
var reg = new RegExp("-", "g");
var strobj = Fid.toString();
var newstr = strobj.replace(reg, "$");
$('#SelectFrame').attr('src', '/OEE/GetSelectInfo/' + Fid + '/' + Time);
$('#SelectForm').css('display', 'block');
$('#SelectForm').dialog({
width: 470,
height: 470,
modal: true,
title: "显示明细信息",
collapsible: true,
minimizable: true,
maximizable: true,
resizable: true,
buttons: [{
id: 'btnSelect',
text: '确定',
iconCls: 'icon-add',
handler: function () {
$("#SelectForm").dialog("close");
}
}]
});
}
//绑定搜索查询的 点击事件
function bindSearcheClick() {
//linkButtonSearch
$("#linkButtonSearch").click(function () {
var nodes = $('#eva').tree('getChecked');
var s = '';
for (var i = 0; i < nodes.length; i++) {
if (s != '') s += ',';
s += nodes[i].id;
}
NodeText = s;
time = $('#SelectTime').datebox('getValue');
initTable();
});
}
查询时间:
查询
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。