(function(){function u(){var c;this.setMessageCurtain=function(d){c=d};this.ImageSelector=function(d,e){d.selectFile(function(a){var b=a.getFile();a.isSizeLargeThan(20971520)?(c.showPrompt(g.get("overSize","\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u5927\u4e8e20M\u3002")),e(!1)):a.isTypeMatched()?k(b,function(f){e(f)}):c.showPrompt(g.get("fileNotImage","\u8be5\u6587\u4ef6\u7c7b\u578b\u4e0d\u662f\u56fe\u7247\u3002"))},".jpg, .jpeg, .png, .bmp, .gif",function(a){return 0===a.indexOf("image/")})};this.ImageVisitor=
function(d,e){d=com.kingdee.bos.qing.framework.common.RemoteFramework.getLoadImgUrl(d,"upload");e(d)};var k=function(d,e){var a=new n;a.setShowBlocking(!0);a.setText(g.get("uploadBackgroundImageTips","\u6b63\u5728\u4e0a\u4f20\u80cc\u666f\u56fe\u7247"));a.setRequestPreparer(function(f){f.append("filename",d)});a.setFinishedHandler(function(f,h,l){f&&(3099003==h?c.showError(l):c.showError(g.get("failToUploadImg","\u4e0a\u4f20\u56fe\u7247\u5931\u8d25\u3002")))});a.setSuccessHandler(function(f){e(f.data)});
var b=com.kingdee.bos.qing.framework.common.RemoteFrameworkRegister.getUploadUrl();a.uploadTo(b)}}function p(c,k,d,e){com.kingdee.bos.qing.framework.common.AbstractFacade.call(this,c,k,d,e);var a=this.protectedMethod;this.loadMap=function(b){a.remote("loadMap",{mapId:b})};this.saveMap=function(b,f){b={mapId:b,model:JSON.stringify(f)};a.remote("saveMap",b)};this.preview=function(b){b={model:JSON.stringify(b)};a.remote("preview",b)};this.saveImage=function(b,f,h){a.remote("saveImage",{imageFileName:b,
imageName:f,mapId:h})}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.scene&&(com.kingdee.bos.qing.scene={});var q=com.kingdee.bos.qing.scene;q.MapDesignerScene=function(){com.kingdee.bos.qing.AbstractMapDesignerScene.call(this);var c=this,k=this.protectedMethod,d;this.protectedImportMoreCode=function(a){};
this.protectedCustomInitEnv=function(){};this.protectedGetRemoteUrl=function(){var a=k.getUrlParamUtil().getParamPathPrefix();return(a?a:"/ierp")+"/qing/mapDesigner.do"};this.protectedRegisterImplements=function(a){var b=new u;b.setMessageCurtain(e());a.registerImageSelector(b.ImageSelector);a.registerImageVisitor(b.ImageVisitor)};this.protectedInitDesigner=function(a){"false"!=k.getUrlParamUtil().getUrlParam("isUser")&&(a.getConductor().setDirtyListener(function(b){m.setTabStatus(b)}),a.getConductor().insertToolbarButton(function(){a.getConductor().isDirty()?
(new p(c.getRemoteImpl(),function(b){a.getConductor().clearDirty();e().showSuccess(g.get("saveMapSuccess","\u4fdd\u5b58\u5730\u56fe\u6210\u529f\u3002"))},function(b,f,h){return!0})).saveMap(k.getUrlParamUtil().getUrlParam("mapId"),a.getJsonModel()):e().showPrompt(g.get("noEditMap","\u672a\u4fee\u6539\uff0c\u4e0d\u9700\u8981\u4fdd\u5b58\u3002"),2E3)},null,g.get("save","\u4fdd\u5b58")),a.getConductor().insertToolbarSeperator(),a.getConductor().appendToolbarButton(function(){a.getConductor().isDirty()?
m.showConfirmExitDialog():r.closeCurrentTab()},"error_close",g.get("closeTab","\u9000\u51fa")))};this.protectedLoading=function(a,b,f){(new p(a,function(h){h?(b.setJsonModel(h,function(l){l.isError()&&e().showError(g.get("failToLoadMap","\u52a0\u8f7d\u5730\u56fe\u5931\u8d25\u3002"))}),f(!0)):f(!1);"false"==k.getUrlParamUtil().getUrlParam("isUser")&&e().showPrompt(g.get("systemMapCanNotEdit","\u7cfb\u7edf\u5730\u56fe\u4e0d\u5141\u8bb8\u76f4\u63a5\u4fee\u6539\uff0c\u82e5\u9700\u4fee\u6539\u5730\u56fe\u6a21\u677f\uff0c\u8bf7\u590d\u5236\u540e\u518d\u8fdb\u884c\u4fee\u6539\u3002"),
4E3)},function(h,l){return"800003"==h||"800004"==h?(e().showError(g.get("failToLoadMap","\u52a0\u8f7d\u5730\u56fe\u5931\u8d25\u3002")),!0):!1})).loadMap(k.getUrlParamUtil().getUrlParam("mapId"))};var e=function(){d||(d=new t,d.getJqUi().appendTo($(document.body)));return d}};var n,g,r,t,m;(function(){var c=com.kingdee.bos.qing.framework.common;n=c.FileUploader;g=c.MultilanguageManager.createPackageAccessor(q);r=c.TabbedUiUtil;c=com.kingdee.bos.qing.ui.component;t=c.MessageCurtain;c=com.kingdee.bos.qing.integration;
m=c.TabStatusHelper})()})();
//qingVersionTag: 20250415