Index: ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordForm.js =================================================================== diff -u -r30877 -r30886 --- ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordForm.js (.../sterilizationRecordForm.js) (revision 30877) +++ ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordForm.js (.../sterilizationRecordForm.js) (revision 30886) @@ -4458,6 +4458,46 @@ }] }); + //获取缩放后的屏幕大小 + function ChangeRatio(type){ + var ratio=0; + var screen=window.screen; + var ua=navigator.userAgent.toLowerCase(); + + if(window.devicePixelRatio !== undefined){ + ratio=window.devicePixelRatio; + }else if(~ua.indexOf('msie')){ + if(screen.deviceXDPI && screen.logicalXDPI) + { + ratio=screen.deviceXDPI/screen.logicalXDPI; + } + }else if(window.outerWidth !== undefined && window.innerWidth !== undefined){ + ratio=window.outerWidth/window.innerWidth; + } + + if(ratio){ + ratio=Math.round(ratio*100); + } + + var value; + if(type == 'width'){ + var width = top.screen.width; + if(isIE()){ + value = width; + }else { + value = width/ratio*100; + } + }else { + var height = top.screen.height; + if(isIE()){ + value = height; + }else { + value = height/ratio*100; + } + } + return parseInt(value); + } + function uploadWindow(imageType) { var onUploadComplete = function (dialog) { dialog.hide(); @@ -4500,16 +4540,18 @@ } var winG = new Ext.WindowGroup(); - winG.zseed = 8000; + winG.zseed = 8000; + var bodyWidth = ChangeRatio('width'); + var bodyHeight = ChangeRatio('height'); sterilizationRecordWin = new top.Ext.Window({ id: 'sterilizationRecordWin', layout: 'fit', title: '灭菌记录信息', border: false, modal: true, - width : top.screen.width > 1600 ? 1580 :top.screen.width-20, - height : top.screen.height -170, + width : bodyWidth > 1600 ? 1580 :bodyWidth-20, + height : bodyHeight -170, plain: true, manager: winG, align: 'center',