function initGEImport(){setFileUrl();$(function(){$("#importkey").on("keyup",function(){setFileUrl()})})}function analyimport(){$("#myimportlist").html("");$("#upoafile").fileinput("upload");beginWait()}function setFileUrl(){var t=$("#importkey").val();var e="GETImport?case=upload&key="+t;$("#upoafile").fileinput("refresh",{uploadUrl:e})}function importgetables(){Ewin.confirm({title:" 注意",message:"确实要导入选定的项目吗？"}).on(function(t){if(!t){return}var r={};r.import={};r.key=$("#importkey").val();r.fid=$("#importid").html();$(".importid").each(function(){if($(this).prop("checked")===true){var t=this.getAttribute("data-type");var e=this.getAttribute("data-id");if(r.import[t]){}else{r.import[t]={}}r.import[t][e]={};var i=this.getAttribute("data-iid");r.import[t][e].iid=i;if($("#over"+i).length>0){if($("#over"+i).prop("checked")===true){r.import[t][e].over=true}else{r.import[t][e].over=false}}}});beginWait("导入项目...");$.post("GETImport",{geTable:JSON.stringify(r),case:"importfile"},function(t){var e=myJSONParse(t);if(e["msg"]==="ok"){e.importlist.forEach(function(t,e){$("#msg"+t.iid).html(t.text)})}else{myAlert(e.msg)}endWait()})})}function setAllOverWrite(){$(".importid").each(function(){if($(this).prop("checked")===true){var t=this.getAttribute("data-iid");if($("#over"+t).length>0){$("#over"+t).prop("checked",true)}}})}function delUnselected(){$(".importid").each(function(){if($(this).prop("checked")===true){}else{$(this).parent().parent().remove()}})}function setAllSelected(){$(".importid").prop("checked",true)}function setAllUnSelected(){$(".importid").prop("checked",false)}