Index: ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js =================================================================== diff -u -r27639 -r27654 --- ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 27639) +++ ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 27654) @@ -1171,8 +1171,9 @@ var imageName = Ext4.getCmp('imageName').getText(); var materialId = Ext4.getCmp('materialId').getValue(); if(imageName != "" && materialId == ""){ - var td_id = Ext4.getCmp('td_id').getValue(); - showTousseSpecificationImage(imageName,td_id); + var td_id = Ext4.getCmp('td_id').getValue(); + loadGoodsImage(imageName ,'器械包说明书' ,'',1 ,'' ,td_id); + //showTousseSpecificationImage(imageName,td_id); } } }, @@ -1184,11 +1185,10 @@ hidden : teachingPicture, handler : function(){ var imageName = Ext4.getCmp('imageName').getText(); - var imageType = Ext4.getCmp('imageType').getValue(); var materialId = Ext4.getCmp('materialId').getValue(); if(imageName != "" && materialId == ""){ var td_id = Ext4.getCmp('td_id').getValue(); - loadGoodsImage(imageName ,imageType ,'',1 ,'' ,td_id,'器械包装配教学图片'); + loadGoodsImage(imageName ,'器械包装配教学图片' ,'',1 ,'' ,td_id); //showToussePackingTeachingImage(imageName,td_id); } } @@ -2080,45 +2080,21 @@ var tousseDefinitionID = row.td_id; var currentPage = row.currentPage; var materialId = row.materialId; - var imgName = row.imgName; - var iframeHeight = $('body').height(); - var url = WWWROOT+'/disinfectsystem/touchScreen/recycle/tousseImage.jsp?resolution=1980&clientHeight='+iframeHeight+'&parentPageName=packingView&tousseDefinitionID='+tousseDefinitionID+'&materialId='+materialId+'&tousseName='+encodeURIComponent(tousseName)+'&imgName='+imgName+'&number='+currentPage; - - $.magnificPopup.open({ - items: [{ - src:url, - 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%"}); + var imgName = row.type; + var iframeHeight = window.screen.height; + var parentPageName; + if(imgName == '器械包装配教学图片'){ + parentPageName = 'packingView'; + }else { + parentPageName = ''; } + var url = WWWROOT+'/disinfectsystem/touchScreen/recycle/tousseImage.jsp?resolution=1980&clientHeight='+iframeHeight+'&parentPageName='+parentPageName+'&tousseDefinitionID='+tousseDefinitionID+'&materialId='+materialId+'&tousseName='+encodeURIComponent(tousseName)+'&imgName='+encodeURIComponent(imgName)+'&number='+currentPage; + openFullSizeWindowWithName(url,false,imgName); } -function loadGoodsImage(tousseName,type,materialId,currentPage,vedioName,td_id,imgName){ +function loadGoodsImage(tousseName,type,materialId,currentPage,vedioName,td_id){ var url; - if(imgName == '器械包装配教学图片'){ - url = WWWROOT+'/disinfectSystem/packingAction!getImage.do?id='+td_id+'&page='+currentPage+'&imageType='+encodeURIComponent(imgName)+'&originalImg=true'; + if(type == '器械包装配教学图片'){ + url = WWWROOT+'/disinfectSystem/packingAction!getImage.do?id='+td_id+'&page='+currentPage+'&imageType='+encodeURIComponent(type)+'&originalImg=true'; }else { url = WWWROOT + "/disinfectSystem/baseData/showImageAction!getToussePic.do?imageType=" + encodeURIComponent(type) +'&materialId='+materialId+'&tousseId='+td_id+'&page='+currentPage + '&name='+encodeURIComponent(tousseName); } @@ -2147,8 +2123,7 @@ td_id:td_id, type:type, materialId:materialId, - currentPage:currentPage, - imgName:imgName || '' + currentPage:currentPage } amendDisinfectionTousse(row); //showImage(this.el.dom.src,tousseName);