Index: ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js =================================================================== diff -u -r27565 -r27624 --- ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 27565) +++ ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 27624) @@ -2073,19 +2073,140 @@ } ] }); +function amendDisinfectionTousse(row){ + var tousseName = row.tousseName; + var tousseDefinitionID = row.td_id; + var tousseType = row.type.split('图片')[0]; + var materials = row.materialId; + var currentPage = row.currentPage; + var iframeHeight = $('body').height(); + + if(tousseType == '消毒物品' || tousseType == '灭菌物品'){ + var width = 740; + var height = 400; + + layerIndex=layer.open({ + type : 2, + title : ['消毒物品明细',true], + content : 'disinfectionTousseItems.jsp?resolution=1980&row=0&tousseDefinitionID='+tousseDefinitionID+'&materials='+encodeURIComponent(materials), + area : [ width + 'px' , height + 'px'], + border : [5, 0.3, '#fff', true], + closeBtn : [2 , true], + offset : ['100px',''] + }); + }else if(tousseType == '器械包'){ + $.magnificPopup.open({ + items: [{ + src:WWWROOT+'/disinfectsystem/touchScreen/recycle/tousseImage.jsp?resolution=1980&clientHeight='+iframeHeight+'&parentPageName=packingView&tousseDefinitionID='+tousseDefinitionID+'&tousseName='+encodeURIComponent(tousseName)+'&number='+currentPage, + type :'iframe' + + },{ + //只是为了让箭头出现,如果可以有其他办法,这里可以去掉。因为在tousseImage.jsp内部,修改了下一页和上一页的处理 + src: '
永远看不到我
', + type: 'inline' + }], + tClose: '关闭(Esc)', + gallery: { + enabled: true, + tPrev: '上一页 (左箭头)', // Alt text on left arrow + tNext: '下一页 (右箭头)' + }, + image: { + verticalFit: true + }, + type: 'image' // this is default type + }); + var windowScreenH = window.screen.height; + if(windowScreenH == 1080){ + $(".mfp-iframe-scaler iframe").css({"top":"10px","height":"100%"}); + $(".mfp-iframe-holder .mfp-close").css({"top":"12px"}); + }else if(windowScreenH == 1050){ + $(".mfp-iframe-scaler iframe").css({"top":"10px","height":"100%"}); + $(".mfp-iframe-holder .mfp-close").css({"top":"0px"}); + }else{ + $(".mfp-iframe-scaler iframe").css({"top":"10px","height":"100%"}); + } + }else if(tousseType == '自定义器械包'){ + var width = 740; + var height = 400; + var designedTousseWidth = 980; + var designedTousseHeight = 700; + var designedWidth = 1920; + var designedHeight = 1080; + var actualWidth = window.screen.availWidth; + var actualHeight = window.screen.availHeight; + var offsetTop = 100; + var heightExtra = 10; + var zoomRatio = calculateZoomRatio(designedWidth,designedHeight,actualWidth,actualHeight); + var size = calculateSizeAfterZoom(designedTousseWidth,designedTousseHeight,zoomRatio); + var isLessIE11 = navigator.userAgent.indexOf('compatible') > -1 && navigator.userAgent.indexOf('MSIE') > -1; + + if(!isLessIE11){ + document.body.style.zoom = 1; + documentGetElementsByClassName('mbody')[0].style.zoom = zoomRatio; + } + + width = size.width; + height = size.height; + + offsetTop = offsetTop*zoomRatio; + layerIndex=layer.open({ + type : 2, + title : [tousseName + ' 材料信息',true], + content : 'setMaterialRecycleAmount.jsp?resolution=1980&width='+width+'&height='+height+'&row='+row+'&tousseDefinitionID=' + tousseDefinitionID, + area : [ width + 'px' , height +heightExtra + 'px'], + border : [5, 0.3, '#fff', true], + closeBtn : [2 , true], + offset : [offsetTop+'px',''] + }); + }else if(tousseType == '外来器械包'){ + var width = 740; + var height = 400; + var designedTousseWidth = 980; + var designedTousseHeight = 700; + var designedWidth = 1920; + var designedHeight = 1080; + var actualWidth = window.screen.availWidth; + var actualHeight = window.screen.availHeight; + var offsetTop = 100; + var heightExtra = 10; + var zoomRatio = calculateZoomRatio(designedWidth,designedHeight,actualWidth,actualHeight); + var size = calculateSizeAfterZoom(designedTousseWidth,designedTousseHeight,zoomRatio); + + var isLessIE11 = navigator.userAgent.indexOf('compatible') > -1 && navigator.userAgent.indexOf('MSIE') > -1; + + if(!isLessIE11){ + document.body.style.zoom = 1; + documentGetElementsByClassName('mbody')[0].style.zoom = zoomRatio; + } + + width = size.width; + height = size.height; + + offsetTop = offsetTop*zoomRatio; + + layerIndex=layer.open({ + type : 2, + title : [tousseName + ' 信息',true], + content : 'setForeignTousseDefinition.jsp?resolution=1980&width='+width+'&height='+height+'&row='+row+'&tousseDefinitionID=' + tousseDefinitionID + '&applicationId=' + params_appId + '&recyclingrecordId=' + params_id, + area : [ width + 'px' , height +heightExtra + 'px'], + border : [5, 0.3, '#fff', true], + closeBtn : [2 , true], + offset : [offsetTop+'px',''] + }); + } +} function loadGoodsImage(tousseName,type,materialId,currentPage,vedioName,td_id){ var url = WWWROOT + "/disinfectSystem/baseData/showImageAction!getToussePic.do?imageType=" + type +'&materialId='+materialId+'&tousseId='+td_id+'&page='+currentPage + '&name='+encodeURIComponent(tousseName); -// var image = Ext4.getCmp('browseImage'); -// image.setSrc(''); -// image.setSrc(url);// 覆盖原来的图片 + Ext4.getCmp('imageName').setText(tousseName); Ext4.getCmp('imageType').setValue(type); Ext4.getCmp('currentPage').setValue(currentPage); Ext4.getCmp('materialId').setValue(materialId); Ext4.getCmp('vedioName').setValue(vedioName); - Ext4.getCmp('td_id').setValue(td_id); - + Ext4.getCmp('td_id').setValue(td_id); + var panel = Ext4.getCmp('imageContentPanel'); var image = Ext4.getCmp('browseImage'); panel.remove(image); @@ -2099,7 +2220,15 @@ var imgCmp = this; imgCmp.getEl().on("dblclick" , function(e){ if(this.el.dom.src && this.el.dom.src != ''){ - showImage(this.el.dom.src,tousseName); + var row = { + tousseName:tousseName, + td_id:td_id, + type:type, + materialId:materialId, + currentPage:currentPage + } + amendDisinfectionTousse(row); + //showImage(this.el.dom.src,tousseName); } }); var img = this.imgEl @@ -2144,7 +2273,7 @@ } }, src : url - }); + }); panel.add(newImage); }