bcAbout-update.jsp改动如下:

因为默认子表的上传组件不能回显,所以改造成WebUploader

  1.在更新页面注销掉生成代码

<%--<script type="text/javascript">--%>
<%--$(document).ready(function(){--%>
<%--$('#tt').tabs({ 此段代码会造成子页面重复加载,导致回显异常且验证失效,第一次加载代码的位置未知。--%>
<%--onSelect:function(title){--%>
<%--$('#tt .panel-body').css('width','auto');--%>
<%--}--%>
<%--});--%>
<%--$(".tabs-wrap").css('width','100%');--%>
<%--});--%>
<%--</script>--%>
<t:tabs id="tt" iframe="false" tabPosition="top" fit="false">
<t:tab href="bcAboutController.do?bcAboutSubList&id=${bcAboutPage.id}" icon="icon-search" title="***团队" id="bcAboutSub" ></t:tab>
</t:tabs>

2.附表明细 模版 默认组件位置替换为WebUploader组件的模板
 
<%-- 上传组件模板start --%>
<link rel="stylesheet" type="text/css" href="plug-in/webuploader/custom.css">
<div id="bcAboutSubList_indeximgUrluploader" class="wu-example">
<div id="bcAboutSubList_indeximgUrlthelist" class="uploader-list"> </div>
<div id="bcAboutSubList_indeximgUrl_progress_bar" class="progress-bar-ty " style="display:none">
<div class="progress-ty">
<span class="upload-label-ty" style="display:none;">正在加载...<b class="value">79%</b></span>
</div>
</div>
<div class="btns">
<div id="bcAboutSubList_indeximgUrlpicker" class="webuploader-container">
选择文件
</div>
<%--<input nullmsg="请上传专家图片" datatype="*" type="hidden" id="bcAboutSubList_indeximgUrldataTypeInp">--%>
</div>
</div>
<div id="tempdiv_bcAboutSubList_indeximgUrl" class="tempIMGdiv"></div>
<%-- 上传组件模板end --%> 3.添加表单提交前的方法,用于修正新增行的name名称,否则提交报错
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" tiptype="1" action="bcAboutController.do?doUpdate" beforeSubmit="fixImgData" callback="jeecgFormFileCallBack@Override">
 
function fixImgData() {
// 将上传组件图片的name下标修正再提交表单
resetTrNum('add_bcAboutSub_table');//此方法jeecg自带,用于修正行顺序改变后元素的name属性值
}
 
bcAboutSubList.jsp子表页面修改如下:
  1.定义组件默认js,和计数全局变量(看着长,其实是默认组件生成的,生成后拷贝过来即可,注意js需改一个位置TODO那里)
推荐在线格式化代码工具http://tool.oschina.net/codeformat/js
//WebUploader组件js
var code="Array.prototype.removeItem = function(val) {\n" +
" var index = this.indexOf(val);\n" +
" if (index > -1) {\n" +
" this.splice(index, 1);\n" +
" }\n" +
"};\n" +
"var exsitPathArr_bcAboutSubList_indeximgUrl = new Array();\n" +
"$(function() {\n" +
" var state = 'pending';\n" +
" var $list = $('#bcAboutSubList_indeximgUrlthelist');\n" +
" var uploader = WebUploader.create({\n" +
" swf: 'plug-in/webuploader/Uploader.swf',\n" +
" server: 'systemController/filedeal.do',\n" +
" pick: '#bcAboutSubList_indeximgUrlpicker',\n" +
" duplicate: false,\n" +
" resize: false,\n" +
" auto: true,\n" +
" fileVal: 'file',\n" +
" fileNumLimit: 1,\n" +
" fileSingleSizeLimit: 10485760,\n" +
" accept: {\n" +
" extensions: 'jpg,png,gif,bmp,jpeg'\n" +
" },\n" +
" formData: {\n" +
" isup: '1',\n" +
" swfTransform: 'false',\n" +
" bizType: 'null'\n" +
" }\n" +
" });\n" +
" var imageAdd_bcAboutSubList_indeximgUrl = true;\n" +
" $('#bcAboutSubList_indeximgUrlpicker').find('div:eq(0)').addClass('webuploader-pick btn-blue btn-S');\n" +
" $('#tempdiv_bcAboutSubList_indeximgUrl').addClass('tempIMGdiv').append('<ul></ul>');\n" +
" $list.append('<table class=\"temptable\"></table>');\n" +
" var showUploadProgress = function(progress, mycallback, obj) {\n" +
" if (!obj) {\n" +
" obj = $('#bcAboutSubList_indeximgUrl_progress_bar').find('.progress-ty');\n" +
" }\n" +
" if (!$('#bcAboutSubList_indeximgUrl_progress_bar').hasClass('active')) {\n" +
" $('#bcAboutSubList_indeximgUrl_progress_bar').addClass('active');\n" +
" }\n" +
" obj.animate({\n" +
" width: progress + '%'\n" +
" },\n" +
" {\n" +
" duration: 100,\n" +
" easing: 'swing',\n" +
" complete: function(scope, i, elem) {\n" +
" if ( !! mycallback) {\n" +
" mycallback();\n" +
" }\n" +
" }\n" +
" })\n" +
" };\n" +
" var isSupportBase64 = function() {\n" +
" var data = new Image();\n" +
" var support = true;\n" +
" data.onload = data.onerror = function() {\n" +
" if (this.width != 1 || this.height != 1) {\n" +
" support = false;\n" +
" }\n" +
" } //data['src'] = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';\n" +
" return support;\n" +
" };\n" +
" var ratio = window.devicePixelRatio || 1;\n" +
" var thumbnailWidth = 100 * ratio;\n" +
" var thumbnailHeight = 100 * ratio;\n" +
" var bcAboutSubList_indeximgUrladdImgli = function(src, name, xpath, flag) {\n" +
" if (imageAdd_bcAboutSubList_indeximgUrl) {\n" +
" var titleclass = 'hidetitle'; //if(flag==1){titleclass='hidetitle';}\n" +
" var img = '<li><img name=\"' + name + 'img\" class=\"tempimg\" src=\"' + src + '\"><div class=\"' + titleclass + '\"><span';\n" +
" img += ' class=\"titledel\">' + xpath + '</span><span';\n" +
" img += xpath == 0 ? ' style=\"display:none;\"': ' ';\n" +
" img += ' class=\"titledown\">' + xpath + '</span></div></li>';\n" +
" $('#tempdiv_bcAboutSubList_indeximgUrl').find('ul').append(img);\n" +
" }\n" +
" }\n" +
" var addtrFile = function(id, name, text, downsrc, delflag) {\n" +
" var namet = name;\n" +
" if (name.length > 15) {\n" +
" name = name.substring(0, 15) + '...';\n" +
" }\n" +
" var trhtml = '<tr class=\"item\" id=\"' + id + '\"><td title = ' + namet + '>' + name + '</td><td class=\"state\">' + text + '</td><td class=\"icontd\"><span';\n" +
" trhtml += downsrc == 0 ? ' style=\"display:none;\"': ' ';\n" +
" trhtml += ' class=\"down icon-down\">' + downsrc + '</span></td><td class=\"icontd\"><span';\n" +
" trhtml += ' class=\"del icon-cha\" style=\"overflow:hidden;\">' + delflag + '</span></td>';\n" +
" trhtml += '<td></td></tr>';\n" +
" $list.children('table').append(trhtml);\n" +
" }\n" +
" $('#bcAboutSubList_indeximgUrluploader').find('div.btns').append('<input nullMsg=\"请上传专家图片\" datatype=\"*\" type=\"hidden\" id= \"bcAboutSubList_indeximgUrldataTypeInp\" />');\n" +
" var reset_bcAboutSubList_indeximgUrl_dataTypeInpVal = function(addOrdel) {\n" +
" var obj = $(\"#bcAboutSubList_indeximgUrldataTypeInp\");\n" +
" if (obj.length > 0) {\n" +
" var objval = obj.val() || '';\n" +
" if (addOrdel == 1) {\n" +
" if (objval == '') {\n" +
" obj.val('1');\n" +
" } else {\n" +
" obj.val(objval.toString() + (parseInt(objval.length) + 1));\n" +
" }\n" +
" } else {\n" +
" if (objval.length <= 1) {\n" +
" obj.val('');\n" +
" } else {\n" +
" obj.val(objval.substr(0, objval.length - 1));\n" +
" }\n" +
" }\n" +
" obj.blur();\n" +
" }\n" +
" }\n" +
" var imgDelReq = function(delpath, spanobj) {\n" +
" $.post('systemController/filedeal.do', {\n" +
" path: delpath,\n" +
" swfTransform: 'false',\n" +
" isdel: \"1\"\n" +
" },\n" +
" function(aj) {\n" +
" var data = JSON.parse(aj);\n" +
" if (data.success) {\n" +
" reset_bcAboutSubList_indeximgUrl_dataTypeInpVal(0);\n" +
" exsitPathArr_bcAboutSubList_indeximgUrl.removeItem(delpath);\n" +
" if (exsitPathArr_bcAboutSubList_indeximgUrl.length > 0) {\n" +
" $list.children('.fordel').children('input').val(exsitPathArr_bcAboutSubList_indeximgUrl.join(','));\n" +
" } else {\n" +
" $list.children('.fordel').children('input').remove();\n" +
" }\n" +
" var myimgli = $(spanobj).closest('li');\n" +
" myimgli.off().find('.hidetitle').off().end().remove();\n" +
" }\n" +
" });\n" +
" }\n" +
" var bcAboutSubList_indeximgUrladdFile = function(file, filepath) {\n" +
" uploader.makeThumb(file,\n" +
" function(error, src) {\n" +
" if (error) {\n" +
" return false;\n" +
" }\n" +
" if (isSupportBase64()) {\n" +
" if (filepath == '') {\n" +
" bcAboutSubList_indeximgUrladdImgli(src, file.id, 0, 0);\n" +
" }\n" +
" } else if (filepath != '') {\n" +
" var actSrc = \"\" + filepath;\n" +
" bcAboutSubList_indeximgUrladdImgli(actSrc, file.id, 0, 0);\n" +
" }\n" +
" },\n" +
" thumbnailWidth, thumbnailHeight);\n" +
" }\n" +
" var updatetdState = function(id, content) {\n" +
" $list.children('table').find('#bcAboutSubList_indeximgUrl' + id).find('.state').text('--' + content + '--');\n" +
" }\n" +
" var bcAboutSubList_indeximgUrl_oneLimit = 0;\n" +
" uploader.on('beforeFileQueued',\n" +
" function(file) {\n" +
" if (bcAboutSubList_indeximgUrl_oneLimit >= 1) {\n" +
" return false;\n" +
" } else {\n" +
" bcAboutSubList_indeximgUrl_oneLimit++;\n" +
" };\n" +
" var currLi = $('#tempdiv_bcAboutSubList_indeximgUrl>ul').find('li:last');\n" +
" if (currLi.length > 0) {\n" +
" currLi.addClass('wait-remove');\n" +
" var abcfile = currLi.find('img').attr('name');\n" +
" if (abcfile.indexOf('name') == 0) {} else {\n" +
" abcfile = abcfile.substring(0, abcfile.length - 3);\n" +
" uploader.removeFile(abcfile)\n" +
" }\n" +
" }\n" +
" });\n" +
" uploader.on('fileQueued',\n" +
" function(file) {\n" +
" var id = 'bcAboutSubList_indeximgUrl' + file.id;\n" +
" var name = file.name;\n" +
" var text = '--等待上传--';\n" +
" addtrFile(id, name, text, 0, 0);\n" +
" bcAboutSubList_indeximgUrladdFile(file, '');\n" +
" });\n" +
" uploader.on('uploadProgress',\n" +
" function(file, percentage) {\n" +
" var $li = $('#bcAboutSubList_indeximgUrl' + file.id + ' td:last'),\n" +
" $percent = $li.find('.progress .progress-bar');\n" +
" if (!$percent.length) {\n" +
" $percent = $('<div class=\"progress progress-striped active\"><div class=\"progress-bar\" role=\"progressbar\" style=\"width: 0%\"></div></div>').appendTo($li).find('.progress-bar');\n" +
" }\n" +
" updatetdState(file.id, '上传中');\n" +
" $percent.css('width', percentage * 100 + '%');\n" +
" });\n" +
" uploader.on('uploadStart',\n" +
" function(file) {\n" +
" $('#bcAboutSubList_indeximgUrl_progress_bar').find('.progress-ty').css('width', '1%');\n" +
" var temprd = Math.floor(Math.random() * 7 + 1);\n" +
" if (temprd < 4) {\n" +
" temprd = Number(temprd) + 3\n" +
" }\n" +
" temprd = Number(temprd) * 10;\n" +
" showUploadProgress(temprd,\n" +
" function() {\n" +
" showUploadProgress(Number(temprd) + 15);\n" +
" })\n" +
" });\n" +
" uploader.on('uploadSuccess',\n" +
" function(file, response) {\n" +
" showUploadProgress(100,\n" +
" function() {\n" +
" if (response.success) {\n" +
" $('#bcAboutSubList_indeximgUrl_progress_bar').removeClass('active');\n" +
" updatetdState(file.id, '上传成功');\n" +
" reset_bcAboutSubList_indeximgUrl_dataTypeInpVal(1);\n" +
" var filepath = response['bcAboutSubList_indeximgUrl'] || response.obj;\n" +
" $('#bcAboutSubList_indeximgUrl' + file.id + ' td:first').append('<input type=\"hidden\" name=\"bcAboutSubList[_index].imgUrl\" value=\"' + filepath + '\" />');\n" +
" bcAboutSubList_indeximgUrladdFile(file, filepath);\n" +
" bcAboutSubList_indeximgUrl_oneLimit = 0;\n" +
" $('#tempdiv_bcAboutSubList_indeximgUrl>ul').find('li.wait-remove').find('.titledel').click()\n" +
" } else {\n" +
" $('#bcAboutSubList_indeximgUrl_progress_bar').removeClass('active');\n" +
" updatetdState(file.id, '上传出错' + response.msg);\n" +
" }\n" +
" });\n" +
" });\n" +
" uploader.on('uploadError',\n" +
" function(file, reason) {\n" +
" updatetdState(file.id, '上传出错-code:' + reason);\n" +
" });\n" +
" uploader.on('error',\n" +
" function(type) {\n" +
" bcAboutSubList_indeximgUrl_oneLimit--;\n" +
" if (type == 'Q_TYPE_DENIED') {\n" +
" tip('文件类型不识别');\n" +
" }\n" +
" if (type == 'Q_EXCEED_NUM_LIMIT') {\n" +
" tip('文件数量超标');\n" +
" }\n" +
" if (type == 'F_DUPLICATE') {\n" +
" tip('相同文件请不要重复上传');\n" +
" }\n" +
" if (type == 'F_EXCEED_SIZE') {\n" +
" tip('单个文件大小超标');\n" +
" }\n" +
" if (type == 'Q_EXCEED_SIZE_LIMIT') {\n" +
" tip('文件大小超标');\n" +
" }\n" +
" });\n" +
" uploader.on('uploadComplete',\n" +
" function(file) {\n" +
" $('#bcAboutSubList_indeximgUrl' + file.id).find('.progress').fadeOut('slow');\n" +
" });\n" +
" $('#tempdiv_bcAboutSubList_indeximgUrl').on('mouseenter', 'li',\n" +
" function() {\n" +
" $(this).find('.hidetitle').slideDown(500);\n" +
" });\n" +
" $('#tempdiv_bcAboutSubList_indeximgUrl').on('mouseleave', 'li',\n" +
" function() {\n" +
" $(this).find('.hidetitle').slideUp(500);\n" +
" });\n" +
" $('#tempdiv_bcAboutSubList_indeximgUrl').on('click', 'span',\n" +
" function() {\n" +
" var spanopt = $(this).attr('class');\n" +
" var optpath = $(this).text();\n" +
" if (spanopt.indexOf('titledel') >= 0) {\n" +
" if (0 == optpath) {\n" +
" var optimgname = $(this).parent('.hidetitle').prev('img').attr('name');\n" +
" var img_file_div = 'bcAboutSubList_indeximgUrl' + optimgname.substring(0, optimgname.indexOf('img'));\n" +
" $('#' + img_file_div).find('.del').trigger('click');\n" +
" } else {\n" +
" imgDelReq(optpath, this);\n" +
" }\n" +
" }\n" +
" if (spanopt.indexOf('titledown') >= 0) {\n" +
" var downsrc = \"\" + optpath + '?down=true';\n" +
" location.href = downsrc; //$(this).find('a').click(function(event){event.stopPropagation()});\n" +
" }\n" +
" });\n" +
" $list.on(\"click\", \".down\",\n" +
" function() {\n" +
" var optpath = $(this).text();\n" +
" if (0 != optpath) {\n" +
" var downsrc = \"\" + optpath + '?down=true';\n" +
" location.href = downsrc;\n" +
" }\n" +
" });\n" +
" $list.on(\"click\", \".del\",\n" +
" function() {\n" +
" var delspantext = $(this).text();\n" +
" var itemObj = $(this).closest(\".item\");\n" +
"var strIndex=itemObj.attr(\"id\").indexOf(\"imgUrl\")+6;\n"+//TODO 自定义行,修复删除图标绑定方法不可用的问题(默认是写死的下标)
" var id = itemObj.attr(\"id\").substring(strIndex);\n" +//TODO 自定义strIndex
" var delpath = itemObj.find(\"input[name='bcAboutSubList[_index].imgUrl']\").val();\n" +
" if (undefined == delpath || null == delpath) {\n" +
" delpath = delspantext;\n" +
" if (delspantext == 0) {\n" +
" itemObj.remove();\n" +
" uploader.removeFile(id);\n" +
" var myimgli = $('#tempdiv_bcAboutSubList_indeximgUrl').find(\"img[name='\" + id + \"img']\").closest('li');\n" +
" myimgli.off().find('.hidetitle').off().end().remove();\n" +
" return false;\n" +
" }\n" +
" }\n" +
" $.post('systemController/filedeal.do', {\n" +
" path: delpath,\n" +
" swfTransform: 'false',\n" +
" isdel: \"1\"\n" +
" },\n" +
" function(aj) {\n" +
" var data = JSON.parse(aj);\n" +
" if (data.success) {\n" +
" reset_bcAboutSubList_indeximgUrl_dataTypeInpVal(0);\n" +
" var fordelInput = $list.children('.fordel').children('input');\n" +
" itemObj.remove();\n" +
" if (delspantext == 0) {\n" +
" uploader.removeFile(id);\n" +
" var myimgli = $('#tempdiv_bcAboutSubList_indeximgUrl').find(\"img[name='\" + id + \"img']\").closest('li');\n" +
" myimgli.off().find('.hidetitle').off().end().remove();\n" +
" } else if (fordelInput.length > 0) {\n" +
" exsitPathArr_bcAboutSubList_indeximgUrl.removeItem(delpath);\n" +
" if (exsitPathArr_bcAboutSubList_indeximgUrl.length > 0) {\n" +
" fordelInput.val(exsitPathArr_bcAboutSubList_indeximgUrl.join(','));\n" +
" } else {\n" +
" fordelInput.remove();\n" +
" }\n" +
" }\n" +
" }\n" +
" });\n" +
" });\n" +
" if (location.href.indexOf('load=detail') != -1) {\n" +
" $('#bcAboutSubList_indeximgUrluploader').find('.btns').addClass('virtual-hidden').css('visibility', 'hidden');\n" +
" $list.find('span.del').css('display', 'none');\n" +
" $('#tempdiv_bcAboutSubList_indeximgUrl').find('.titledel').css('display', 'none');\n" +
" }\n" +
"});\n" +
"function mygetFileName(filepath) {\n" +
" var fileNameEndindex = filepath.lastIndexOf('_');\n" +
" var filenameSuffix = filepath.lastIndexOf('.');\n" +
" if (fileNameEndindex < 0) {\n" +
" fileNameEndindex = filepath.length;\n" +
" }\n" +
" if (filepath.lastIndexOf('\\\\') > 0) {\n" +
" return filepath.substring(filepath.lastIndexOf('\\\\') + 1, fileNameEndindex) + filepath.substring(filenameSuffix);\n" +
" } else if (filepath.lastIndexOf('/') > 0) {\n" +
" return filepath.substring(filepath.lastIndexOf('/') + 1, fileNameEndindex) + filepath.substring(filenameSuffix);\n" +
" } else {\n" +
" return filepath;\n" +
" }\n" +
"}\n" +
"function randomFor(n) {\n" +
" var rnd = '';\n" +
" for (var i = 0; i < n; i++) {\n" +
" rnd += Math.floor(Math.random() * 10);\n" +
" }\n" +
" return rnd;\n" +
"}"; var imgId=0;//用于标记子记录上传组件id
  2,修改添加和减少子表记录的方法
//添加子表记录
$('#addBcAboutSubBtn').bind('click', function(){
var tr = $("#add_bcAboutSub_table_template tr").clone();
$("#add_bcAboutSub_table").append(tr);
//修正name的值
resetTrNum('add_bcAboutSub_table');//jeecg自带
//处理上传组件WebUploader,id加上“_”前缀,用于区别
resetTrIdAdd('add_bcAboutSub_table',"_"+(++imgId));//替换模板元素
var temp = code.replace(/_index/g, "_"+imgId );//替换js
//添加相应的上传js代码
loadScriptString(temp,"s"+(imgId));
return false;
});
//删除子表记录
$('#delBcAboutSubBtn').bind('click', function(){
var selectNum=$("#add_bcAboutSub_table").find("input[name$='ck']:checked");
if(selectNum.length>0){//仅当有选中才操作
selectNum.parent().parent().remove();//删除对应行 if(imgId>0){//有添加过
for(i=0;i<imgId;i++){
deleteScriptString("s"+(imgId-i));//删除对应js(文档中),删除非新增的行时,也会删除新增行对应的js代码,但该代码已经加载至内存中,所以删除动作并无影响。(加载到内存中的js代码无法删除,所以有内存泄漏的风险,单个页面不建议大量使用,或者自行添加限制代码)
}
} //因tr顺序改变,修正name属性值
resetTrNum('add_bcAboutSub_table');//jeecg自带
} return false;
});
  
  3.增加和删除用到的自定义方法
//增加记录时修改模板中id的值
function resetTrIdAdd(tableId,imageId) { $("#"+tableId + " tr").each(function(i) { $(this).find("div").each(function() {//处理div的id var $this = $(this), id = $this.attr('id'), val = $this
.val();
if (id != null && id.indexOf("_index") >= 0) {
$this.attr("id", id.replace('_index', imageId));
}
});
$(this).find("input").each(function() {//处理input的id
var $this = $(this), id = $this.attr('id'), val = $this
.val();
if (id != null && id.indexOf("_index") >= 0) {
$this.attr("id", id.replace('_index', imageId));
}
});
}); }
function loadScriptString(code,idName) {//动态添加js代码,指定id
var script = document.createElement("script");
script.type = "text/javascript";
try {
script.appendChild(document.createTextNode(code));
} catch (ex) {//兼容ie
script.text = code;
}
script.id=idName;//指定id
document.body.appendChild(script);
} function deleteScriptString(idName) {//根据id动态删除js代码
var s=document.getElementById(idName);
if($(s).length>0){//存在才删除,否则报错
document.body.removeChild(s);
}
}
总算是能用了,改得超累,有更方便快捷方法的大神还请不吝赐教,写错的地方也希望大家帮忙指出,我会第一时间修改,多谢~
												

jeecg3.8在子表页面中使用WebUploader组件的更多相关文章

  1. JS 在open打开的子窗口页面中调用父窗口页面的JS方法

    需求的情景如下: 1:做新增或修改等操作的时候打开一个新的浏览器窗口(使用window.open(参数等)方法) 2:在新增或修改等的页面上有返回按钮.重置按钮.保存按钮,对于返回就直接关闭此窗口(使 ...

  2. 在子jsp页面中调用父jsp中的function或父jsp调用子页面中的function

    项目场景: A.jsp中有一个window,window里嵌入了一个<iframe>,通过<iframe>引入了另一个页面B.jsp.在B.jsp中的一个function中需要 ...

  3. Maximo子表中增加附件功能

    附件功能的实现(详见ewell.webclient.beans.warranty.WarrantysDateBean ,ewell.webclient.beans.doclinks.custom.Ad ...

  4. jQuery 互相调用iframe页面中js的方法

    1,子iframe内调用父类函数方法: window.parent.func(); 2,子Iframe中获取父界面的元素: $("#xx", window.parent.docum ...

  5. 解决同一页面中两个iframe互相调用jquery,js函数

    这一个月又没更新博客,唉,懒癌又犯了,今天解决了一个问题,关于两个iframe互相调用jquery函数方法 a.html中有两个iframe,如下: <iframe width="10 ...

  6. easyui的tab加载页面中的form重复提交

    http://blog.csdn.net/fxz1982/article/details/8987769 Easyui中的tabs组件以href方式加载目标页面,如果目标页面中有dialog或者win ...

  7. H3BPM子表的复制

    在做一个流程的时候,碰到了下面的表数据直接从上表中获取,并且为不可编辑状态,没有增加和删除行的按钮.一开始使用的是ComputationRule属性,但是有一项是日期空间,没有这个属性,不知道怎么处理 ...

  8. 基于SqlSugar的开发框架循序渐进介绍(12)-- 拆分页面模块内容为组件,实现分而治之的处理

    在早期的随笔就介绍过,把常规页面的内容拆分为几个不同的组件,如普通的页面,包括列表查询.详细资料查看.新增资料.编辑资料.导入资料等页面场景,这些内容相对比较独立,而有一定的代码量,本篇随笔介绍基于V ...

  9. WinForm中的ListBox组件编程

    ListBox组件是一个程序设计中经常使用到的组件,在Visual C#和Visual Basic .Net程序中使用这个组件,必须要在程序中导入.Net FrameWork SDK中名称空间Syst ...

随机推荐

  1. P1402 酒店之王 最大流

    \(\color{#0066ff}{ 题目描述 }\) XX酒店的老板想成为酒店之王,本着这种希望,第一步要将酒店变得人性化.由于很多来住店的旅客有自己喜好的房间色调.阳光等,也有自己所爱的菜,但是该 ...

  2. 最短路【洛谷P1606】 [USACO07FEB]荷叶塘Lilypad Pond

    P1606 [USACO07FEB]荷叶塘Lilypad Pond 为了让奶牛们娱乐和锻炼,农夫约翰建造了一个美丽的池塘.这个长方形的池子被分成了M行N列个方格(1≤M,N≤30).一些格子是坚固得令 ...

  3. 洛谷4316 绿豆蛙的归宿(DAG递推/概率dp)

    题目大意: 给定一个DAG,求起点到终点的路径长度期望 根据题意可以知道每一条边都有一定概率被走到 那么\(\displaystyle\begin{aligned} Ans = \sum_{e \in ...

  4. 选课 ( dp 树形dp 动态规划 树规)

    和某篇随笔重了?!!?!?!?!?!?不管了留着吧 题目: 在大学里每个学生,为了达到一定的学分,必须从很多课程里选择一些课程来学习,在课程里有些课程必须在某些课程之前学习,如高等数学总是在其它课程之 ...

  5. DRF教程7-token认证

    Authentication 认证是将一个传入的请求和一组标识凭据相关联的机制,比如请求过来的用户,或者用户登录时携带的token. 然后权限策略就能使用这些凭据来决定是否允许这个请求. REST框架 ...

  6. SQL-Error-1

    错误描述:String   or   binary   data   would   be   truncated. 原因:字段长度不够

  7. 2016计蒜之道初赛第四场A

    在每年的淘宝“双十一”时,访问量都会暴涨,服务器的请求会被流量分配程序按照一定策略,分发给不同的进程去处理.有一类请求,有两个进程可以接受分发的请求,其中一个进程所在服务器的配置.网络传输性能等都要优 ...

  8. Docker 使用samba 共享文件

    Docker 使用samba 共享文件   docker run -it --name samba \ -p 139:139 -p 445:445 \ -v /home/develop/code/de ...

  9. day_09 函数及参数

    1.定义:把功能封装起来,方便下次直接调用 2.语法:def 关键词开头,空格之后接函数名称和圆括号(). def 函数名(形参) 函数体 3.参数:圆括号用来接收参数.若传入多个参数,参数之间用逗号 ...

  10. Arm寄存器介绍及汇编基础

    一.ARM处理器支持7种工作模式 ① 用户模式(USR): 用于正常执行程序(The normal ARM program execution state) ② 快速中断模式(FIQ): 用于高速数据 ...