新人求助,JEECG使用dgDelOpt dgFunOpt标签无效

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了新人求助,JEECG使用dgDelOpt dgFunOpt标签无效相关的知识,希望对你有一定的参考价值。

参考技术A jeecg3.5中实现从一个页面跳转到另一个页面jeecg3.5中实现从一个页面跳转到另一个页面实现以下效果点"跳转到demo"后直接跳转到demo示例,并且带上查询条件,如下:由于jeecg使用的是easyui,所以不能直接用类似于这样的方式来跳转了,但还是有法做到的,首先在\plug-in\accordion\js\left_shortcut_menu.js中增加以下代码:?1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253functiongoToTab(subtitle,url,icon)//beginauthor:屈然博2013-7-12for:解决firefox点击一次请求两次的问题varprogress=$("div.messager-progress");if(progress.length)return;//beginauthor:屈然博2013-7-12for:解决firefox点击一次请求两次的问题rowid="";$.messager.progress(text:loading,interval:200);if(!$('#maintabs').tabs('exists',subtitle))//判断是否进行iframe方式打开tab,默认为href方式if(url.indexOf('isHref')!=-1)$('#maintabs').tabs('add',title:subtitle,href:url,closable:true,icon:icon);else$('#maintabs').tabs('add',title:subtitle,content:'',closable:true,icon:icon);else$('#maintabs').tabs('select',subtitle);if(url.indexOf('isHref')!=-1)$('#maintabs').tabs('update',tab:$('#maintabs').tabs('getSelected'),options:href:url);else$('#maintabs').tabs('update',tab:$('#maintabs').tabs('getSelected'),options:content:'');$.messager.progress('close');//$('#maintabs').tabs('select',subtitle);tabClose();这个方法实际上基本上都是抄原来的addTab方法,就是在如果原来已经打开tab的情况下用update的方式来更新tab。然后在需要跳转到其它页面的地方增加以下代码,以jeecgNoteList.jsp为例:?1对应的js:?functiontoDemo()varurl="jeecgDemoController.do?jeecgDemo&selectedParams="+encodeURIComponent("\"sex\":0,\"createDate_begin\":\"2015-03-28\",\"createDate_end\":\"2015-04-14\"");window.parent.goToTab('Demo示例',url,'default')注意要用encodeURIComponent方法对链接进行处理,否则如果链接中带有特殊字符如引号的话不处理是无法正常传递参数的。然后在目标界面增加以下代码,以jeecgDemoList.jsp为例:$(function()//延迟200毫秒执行,否则easyui会加载两次数据setTimeout(init,200););functioninit()//alert($('#jeecgDemoList'));varhref=decodeURIComponent(window.location.href);//alert(href);varidx=href.indexOf('selectedParams');if(idx!=-1)idx=href.indexOf("",idx);if(idx!=-1)varendIdx=href.indexOf("",idx);if(endIdx!=-1)varselectedParams=href.substring(idx,endIdx+1);varjsonParam=$.parseJSON(selectedParams);$('#jeecgDemoListtb').find('*').each(function()if(jsonParam[$(this).attr('name')]!=undefined)if($(this)[0].tagName=="SELECT")//$(this).attr("value","0");$(this).val(jsonParam[$(this).attr('name')]);elseif($(this)[0].tagName=="INPUT")$(this).val(jsonParam[$(this).attr('name')]));jeecgDemoListsearch();注意其中的jeecgDemoList类似的字眼因为是jeecg生成的,所以需要根据实际情况修改成实际的值。本回答被提问者采纳

以上是关于新人求助,JEECG使用dgDelOpt dgFunOpt标签无效的主要内容,如果未能解决你的问题,请参考以下文章

新人发帖求助,python使用tushare股票分析包方法报错

新人求助为啥改了host还是很慢

新人求助.apache http server 停止工作,紧急求助

Arduino新人求助,Galileo Gen2 SD卡启动不了

新人求助,关于webStorm 浏览器无法访问问题

新人求助,修改百度地图定位图标