Index: ssts-web/src/main/webapp/disinfectsystem/packing/tousesPackingTeachingImage.js =================================================================== diff -u -r27099 -r27630 --- ssts-web/src/main/webapp/disinfectsystem/packing/tousesPackingTeachingImage.js (.../tousesPackingTeachingImage.js) (revision 27099) +++ ssts-web/src/main/webapp/disinfectsystem/packing/tousesPackingTeachingImage.js (.../tousesPackingTeachingImage.js) (revision 27630) @@ -9,68 +9,58 @@ } function loadToussePackingTeachingImage(tousseName,td_id,imgType,currentPage,imgId){ lastLoadObj = { - tousseName: tousseName, - td_id: td_id, - imgType: imgType, - currentPage: currentPage + tousseName: tousseName, + td_id: td_id, + imgType: imgType, + currentPage: currentPage } - var viewOriginalImgPressed = top.Ext4.getCmp('pt_view_originalImg').pressed; var url = ""; var viewOriginalImg_url = ""; var title = ""; if(imgId){//器械包定义 url = WWWROOT + "/disinfectSystem/baseData/showImageAction!getToussePic.do?imageType=" + imgType +'&id='+td_id+'&page='+currentPage+'&isOriginalPic=true'; viewOriginalImg_url = WWWROOT + "/disinfectSystem/baseData/showImageAction!getToussePic.do?imageType=" + imgType +'&id='+td_id+'&page='+currentPage; }else{//装配 - url = WWWROOT + '/disinfectSystem/packingAction!getImage.do?id=' + td_id + '&page=' + currentPage +'&imageType='+imgType+'&originalImg='+viewOriginalImgPressed; + url = WWWROOT + '/disinfectSystem/packingAction!getImage.do?id=' + td_id + '&page=' + currentPage +'&imageType='+imgType; viewOriginalImg_url = WWWROOT + '/disinfectSystem/packingAction!getImage.do?id=' + td_id + '&page=' + currentPage +'&imageType='+imgType+'&originalImg=true' ; title = '双击预览图片'; } - url += '&time='+new Date(); - viewOriginalImg_url += '&time='+new Date(); + Ext4.getCmp('imageName').setText(tousseName); + Ext4.getCmp('imageType').setValue(imgType); + Ext4.getCmp('currentPage').setValue(currentPage); + Ext4.getCmp('materialId').setValue(imgId); + Ext4.getCmp('td_id').setValue(td_id); -// var image = top.Ext4.getCmp('pt_browseImage'); -// image.setSrc(''); -// image.setSrc(url);// 覆盖原来的图片 - top.Ext4.getCmp('pt_imageName').setText(tousseName); - top.Ext4.getCmp('pt_currentPage').setValue(currentPage); - - var panel = top.Ext4.getCmp('pt_imageContentPanel'); - var image = top.Ext4.getCmp('pt_browseImage'); + var panel = Ext4.getCmp('imageContentPanel'); + var image = Ext4.getCmp('browseImage'); panel.remove(image); - var newImage = top.Ext4.create('Ext4.Img', { - id : 'pt_browseImage', + var newImage = Ext4.create('Ext4.Img', { + id : 'browseImage', fieldLabel : "预览图片", - title:title, -// autoScroll: true, + title:'双击预览图片', listeners: { render: function() { var imgCmp = this; - var imgEl = this.getEl(); - if(!imgId){//装配模块才要双击预栏 - imgCmp.getEl().on("dblclick" , function(e){ - if(this.el.dom.src && this.el.dom.src != ''){ - // alert(this.el.dom.src) - showImage(viewOriginalImg_url,tousseName,function(){ - var obj = { - tousseName: tousseName, - td_id: td_id, - imgType: imgType, - currentPage: currentPage - } - showTousseImages_restore(obj); - }); - tousesPackingTeachingImage_window.close(); - } - }); - } - - imgEl.on('load',function(){ + imgCmp.getEl().on("dblclick" , function(e){ + if(this.el.dom.src && this.el.dom.src != ''){ + showImage(viewOriginalImg_url,tousseName,function(){ + var obj = { + tousseName: tousseName, + td_id: td_id, + imgType: imgType, + currentPage: currentPage + } + showTousseImages_restore(obj); + }); + } + }); + var img = this.imgEl + img.on('load',function(){ var img = this; - var panel = top.Ext4.getCmp('pt_imageContentPanel'); + var panel = Ext4.getCmp('imageContentPanel'); var panelSize = panel.getSize(true); var boundaryWidth = panelSize.width; @@ -101,19 +91,6 @@ x = (boundaryWidth - scaledWidth)/2; y = (boundaryHeight - scaledHeight)/2; } - if(viewOriginalImgPressed){ -// if(originalWidth > boundaryWidth){ -// x=0; -// } -// if(originalHeight > boundaryHeight){ -// y=0; -// } - x=0; - y=0; - scaledWidth = originalWidth; - scaledHeight = originalHeight; - - } imgCmp.setSize(scaledWidth,scaledHeight); imgCmp.setPosition(x,y); // Ext.Msg.alert('x='+x+',y='+y+',w='+scaledWidth+',h='+scaledHeight+',bw='+boundaryWidth+',bh='+boundaryHeight); @@ -122,7 +99,7 @@ } }, src : url - }); + }); panel.add(newImage); } @@ -134,10 +111,7 @@ } function showTousseImages(tousseName,td_id,imgType){ - - showTousseImages_newWindow(tousseName,td_id,imgType,""); - - loadToussePackingTeachingImage(tousseName,td_id,imgType,1,""); + loadToussePackingTeachingImage(tousseName,td_id,imgType,1,""); } //获取器械包定义图片的行号 @@ -156,110 +130,9 @@ /* 器械包定义图片信息 */ function showTousseDefinitionImages(tousseName,td_id,imgType,imgId){ - showTousseImages_newWindow(tousseName,td_id,imgType,imgId); - loadToussePackingTeachingImage(tousseName,td_id,imgType,getRowSeque(imgId),imgId); + loadToussePackingTeachingImage(tousseName,td_id,imgType,getRowSeque(imgId),imgId); } -function showTousseImages_newWindow(tousseName,td_id,imgType,imgId){ - var totalPage = 0; - var imgId = imgId; - if(imgId){//器械包定义 - Ext.Ajax.request({ - url : WWWROOT + '/disinfectSystem/baseData/showImageAction!getToussePictureAmount.do', - params : { - id : td_id, - imageType:imgType - }, - success : function(result){ - var pageCount = Ext4.JSON.decode(result.responseText); - totalPage = parseInt(pageCount.count); - }, - failure : function(){} - }); - }else{//装配 - Ext.Ajax.request({ - url :WWWROOT + '/disinfectSystem/packingAction!getUploadPicTotalPage.do', - params : { - td_id : td_id, - imageType:imgType - }, - success : function(result){ - var pageStr = result.responseText; - totalPage = parseInt(pageStr); - }, - failure : function(){} - }); - } - - var imagePanel = new top.Ext4.Panel({ - id : 'pt_imagePanel', -// height:297, - border : true, - layout:'fit', - items : [{ - xtype : 'panel', - layout:'absolute', -// autoScroll: true, - id: 'pt_imageContentPanel', - items: [{ - xtype : 'image', - id : 'pt_browseImage', - fieldLabel : "预览图片", -// title:'双击预览图片', - src : Ext4.BLANK_IMAGE_URL - }] - }], - bbar: [ - { id:'pt_imageName'}, - {xtype:'hidden',id:'pt_currentPage'}, - '->', - {xtype:'button',id:'pt_view_originalImg',text:'查看原图',tooltip :"查看原图", hidden: true, - enableToggle: true, - handler : function(){ - viewOriginalImg(); - }}, - {xtype:'button',text:'<<',tooltip :"上一页", handler : function(){ - var imageName = top.Ext4.getCmp('pt_imageName').getText(); - var currentPage = top.Ext4.getCmp('pt_currentPage').getValue(); - if(currentPage == 1){ - showResult("已是第一页!"); - }else{ - loadToussePackingTeachingImage(imageName,td_id,imgType,parseInt(currentPage)-1,imgId); - } - }}, - {xtype:'button',text:'>>', tooltip :"下一页", handler : function(){ - var imageName = top.Ext4.getCmp('pt_imageName').getText(); - var currentPage = top.Ext4.getCmp('pt_currentPage').getValue(); -// alert(currentPage+','+totalPage) - if(currentPage >= totalPage){ - showResult("已是最后一页!"); - }else{ - loadToussePackingTeachingImage(imageName,td_id,imgType,parseInt(currentPage)+1,imgId); - } - }} - ] - }); - - tousesPackingTeachingImage_window = new top.Ext4.Window({ - id : 'packageImg', - title : imgType, - width : document.body.clientHeight > 768 ? 1024 : 800, // 动态计算窗口大小,支持在1024x768分辨率下的显示 - height :document.body.clientHeight > 768 ? 768 : 600, - border : false, - autoScroll: true, - layout : 'border', - modal : true, - items : [{ - region : 'center', - layout : 'fit', - width : '100%', - items : imagePanel - }] - }); - tousesPackingTeachingImage_window.show(); -} function showTousseImages_restore(lastLoadObj){ - showTousseImages_newWindow(lastLoadObj.tousseName,lastLoadObj.td_id,lastLoadObj.imgType,""); - - loadToussePackingTeachingImage(lastLoadObj.tousseName,lastLoadObj.td_id,lastLoadObj.imgType,lastLoadObj.currentPage,""); + loadToussePackingTeachingImage(lastLoadObj.tousseName,lastLoadObj.td_id,lastLoadObj.imgType,lastLoadObj.currentPage,""); } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js =================================================================== diff -u -r27624 -r27630 --- ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 27624) +++ ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 27630) @@ -1186,9 +1186,9 @@ var imageName = Ext4.getCmp('imageName').getText(); var materialId = Ext4.getCmp('materialId').getValue(); if(imageName != "" && materialId == ""){ - var td_id = Ext4.getCmp('td_id').getValue(); + var td_id = Ext4.getCmp('td_id').getValue(); showToussePackingTeachingImage(imageName,td_id); - } + } } }, { @@ -2076,131 +2076,43 @@ 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 materialId = row.materialId; 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',''] - }); + $.magnificPopup.open({ + items: [{ + src:WWWROOT+'/disinfectsystem/touchScreen/recycle/tousseImage.jsp?resolution=1980&clientHeight='+iframeHeight+'&parentPageName=packingView&tousseDefinitionID='+tousseDefinitionID+'&materialId='+materialId+'&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%"}); } } 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); - - Ext4.getCmp('imageName').setText(tousseName); + Ext4.getCmp('imageName').setText(tousseName); Ext4.getCmp('imageType').setValue(type); Ext4.getCmp('currentPage').setValue(currentPage); Ext4.getCmp('materialId').setValue(materialId); @@ -2435,14 +2347,14 @@ cellclick: function(grid, td, cellIndex, record, tr, rowIndex, e, eOpts ){ curSelMaterialName = record.get('name'); curSelMaterialId = record.get('materialDefinitionId'); - var detachable = record.get('detachable'); + var detachable = record.get('detachable'); + var tousseDefinitionId = record.raw.tousseDefinitionId; showMaterialImgBtns(); - if(cellIndex == 5 && detachable == '是'){ - loadGoodsImage(curSelMaterialName,IMAGE_TYPE_MATERIAL_DETACHABLE,curSelMaterialId,1,"",""); + loadGoodsImage(curSelMaterialName,IMAGE_TYPE_MATERIAL_DETACHABLE,curSelMaterialId,1,"",tousseDefinitionId); return; } - loadGoodsImage(curSelMaterialName,imageType_material,curSelMaterialId,1,"",""); + loadGoodsImage(curSelMaterialName,imageType_material,curSelMaterialId,1,"",tousseDefinitionId); }, afterrender: function (grid) { grid.getView().getHeaderAtIndex(0).hide(); Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/tousseImage.jsp =================================================================== diff -u -r27624 -r27630 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/tousseImage.jsp (.../tousseImage.jsp) (revision 27624) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/tousseImage.jsp (.../tousseImage.jsp) (revision 27630) @@ -26,6 +26,7 @@ var showToussePictures; var clientHeight = '${param.clientHeight}'; var parentPageName = '${param.parentPageName}'; +var parentMaterialId = '${param.materialId}'; //动态加载JS和CSS document.write(''); @@ -156,7 +157,7 @@ objectId:tousseDefinitionID } - openModalWindowForExt("${ctx}/disinfectsystem/basedatamanager/tousse/watchVideoModel.jsp",params, "配包教学视频", "740", "400"); + openModalWindow("${ctx}/disinfectsystem/basedatamanager/tousse/watchVideoModel.jsp",params, "配包教学视频", "740", "400"); } var currentType = ''; var currentTypeMap = {}; @@ -328,9 +329,29 @@ showToussePictures = '${param.showToussePictures}'; } var url = null; + if(!isUndefinedOrNullOrEmpty(tousseDefinitionID)){ - loadTousseImage(); - getTousseMaterial(); + if(parentMaterialId !== ''){ + onMaterialItemClick(parentMaterialId,''); + var params = "{tousseName:'" + tousseName + "',tousseDefinitionID:'"+tousseDefinitionID+"'}"; + TousseDefinitionTableManager.getTousseIncludeMaterialsWithOutDisposableGoods(params,function(result){ + var json = JSON.parse(result); + var zindex = ''; + + for (var i = 0; i 8){ var start,end; jQuery(document).bind("mousedown", function(e) { @@ -494,18 +504,18 @@ #MaterialDIV{ float:right; } -.instruction-book,.packing-teach,.tousse-video{display: none;} +.instruction-book,.packing-teach,.tousse-video,.operationGuide-book{display: none;} .imageAndMaterialID{height:637px;} #ImageID{width: 50%;height:100%;} .image-box{width: 50%;height:100%;} .checkbox-materialTd{display: none;} .btn-box { width:100%; - height:50px; + height:40px; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; - line-height: 50px; + line-height: 40px; text-align: left !important; } .btn-box a{ @@ -515,7 +525,7 @@ .remark-box .box { width:100%; - height:50px !important; + height:40px !important; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; display: flex; @@ -542,11 +552,11 @@ 缩小 上一张 下一张 - 清洗操作指引 - 查看包图片 + 清洗操作指引 说明书 装配教学 教学视频 + 查看包图片