Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/showFullImg.jsp =================================================================== diff -u -r35482 -r36909 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/showFullImg.jsp (.../showFullImg.jsp) (revision 35482) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/showFullImg.jsp (.../showFullImg.jsp) (revision 36909) @@ -72,6 +72,9 @@ img = this.default_params.WWWROOT+'/disinfectSystem/baseData/showImageAction!getImage.do?objectId=' + objId + '&page=' + page + '&imageType=' + encodeURIComponent(imageType) + '&rotateIndex='+rotateIndex+'&showSourceImg=true&time='+new Date().getTime(); } + if(imageType == '灭菌器参数'){ + img = this.default_params.WWWROOT+'/disinfectSystem/baseData/showImageAction!getSterilizerRecordPic.do?sterilizationRecordId=' + objId + } return img; }, setImgInitWH:function(){ Index: ssts-web/src/main/webapp/js/showUploadImagesForExtWin.js =================================================================== diff -u -r31484 -r36909 --- ssts-web/src/main/webapp/js/showUploadImagesForExtWin.js (.../showUploadImagesForExtWin.js) (revision 31484) +++ ssts-web/src/main/webapp/js/showUploadImagesForExtWin.js (.../showUploadImagesForExtWin.js) (revision 36909) @@ -19,6 +19,7 @@ var getPicFun = '!getImage.do'; var getPicWHFun = '!getImageHW.do'; var delPicFun = '!deleteImage.do'; +var getSterilizerRecordPicFun = '!getSterilizerRecordPic.do'; //图片上传分页定义 var page = 1; var totalPage = 0; @@ -70,6 +71,7 @@ function showUploadImagesForWin(id, windowTitle) { page = 1; totalPage = 0; + var tbar = [{ xtype: 'button', text: '全屏', @@ -83,6 +85,7 @@ }, { xtype: 'button', text: '放大', + hidden: windowTitle == '灭菌器参数', handler: function () { if (srcWidth == 0 && srcHeight == 0) { showResult('图片不存在!'); @@ -92,12 +95,13 @@ var image = imageBrowse.dom; var width = imageBrowse.getWidth(); var height = imageBrowse.getHeight(); - image.style.width = width*scale + 'px'; - image.style.height = height*scale + 'px'; + image.style.width = width * scale + 'px'; + image.style.height = height * scale + 'px'; } }, { xtype: 'button', text: '缩小', + hidden: windowTitle == '灭菌器参数', handler: function () { if (srcWidth == 0 && srcHeight == 0) { showResult('图片不存在!'); @@ -107,23 +111,25 @@ var image = imageBrowse.dom; var width = imageBrowse.getWidth(); var height = imageBrowse.getHeight(); - image.style.width = width/scale + 'px'; - image.style.height = height/scale + 'px'; + image.style.width = width / scale + 'px'; + image.style.height = height / scale + 'px'; } }, { xtype: 'button', text: '顺转', + hidden: windowTitle == '灭菌器参数', handler: function () { if (srcWidth == 0 && srcHeight == 0) { showResult('图片不存在!'); return; } curRotateIndex = (curRotateIndex + 1) % 4; - reloadImg(id, srcHeight, srcWidth); + reloadImg(id, windowTitle, srcHeight, srcWidth); } }, { xtype: 'button', text: '逆转', + hidden: windowTitle == '灭菌器参数', handler: function () { if (srcWidth == 0 && srcHeight == 0) { showResult('图片不存在!'); @@ -133,11 +139,12 @@ curRotateIndex = 4; } curRotateIndex = (curRotateIndex - 1) % 4; - reloadImg(id, srcHeight, srcWidth); + reloadImg(id, windowTitle, srcHeight, srcWidth); } }, { xtype: 'button', text: '删除', + hidden: windowTitle == '灭菌器参数', handler: function () { top.Ext.Msg.confirm("请确认", "是否删除照片?", function (button, text) { if ("yes" == button) { @@ -169,6 +176,7 @@ xtype: 'button', text: "查看原图", id: "checkSourceImg", + hidden: windowTitle == '灭菌器参数', handler: function () { if (srcWidth == 0 && srcHeight == 0) { showResult('图片不存在!'); @@ -182,6 +190,7 @@ }, { xtype: 'button', text: '上一页', + hidden: windowTitle == '灭菌器参数', handler: function () { if (page - 1 <= 0) { showResult('已是第一页'); @@ -194,6 +203,7 @@ }, toolbarPage, toolbarTotalPage, { xtype: 'button', text: '下一页', + hidden: windowTitle == '灭菌器参数', handler: function () { if (page + 1 > totalPage) { showResult('已是最后一页'); @@ -207,8 +217,12 @@ imageType = windowTitle; - var url = WWWROOT + action + getPicFun + '?objectId=' + id + '&page=' + page + '&imageType=' + encodeURIComponent(imageType) + '&rotateIndex=' + curRotateIndex + '&showSourceImg=' + showSourceImg + '&time=' + new Date().getTime(); + var url = WWWROOT + action + getPicFun + '?objectId=' + id + '&page=' + page + '&imageType=' + encodeURIComponent(imageType) + '&rotateIndex=' + curRotateIndex + '&showSourceImg=' + showSourceImg + '&time=' + new Date().getTime(); + if (windowTitle == '灭菌器参数') { + url = WWWROOT + action + getSterilizerRecordPicFun + '?sterilizationRecordId=' + id; + } + var img = new ImgView({ src: [url] }); @@ -243,15 +257,20 @@ resizeTimer = setTimeout(function () { winWidth = e.lastSize.width; winHeight = e.lastSize.height - 55; - getRecordPicHW(id); + if (windowTitle == '灭菌器参数') { + totalPage = 1; + reloadImg(id, windowTitle, 800, 1050); + } else { + getRecordPicHW(id, windowTitle); + } }, 100); }) window.show(); } //获取图片的宽高 -function getRecordPicHW(id) { +function getRecordPicHW(id, windowTitle) { Ext.Ajax.request({ url: WWWROOT + action + getPicWHFun, params: { @@ -267,7 +286,7 @@ var imgWidth = res.width; var imgHeight = res.height; totalPage = res.totalPage || 0; - reloadImg(id, imgWidth, imgHeight); + reloadImg(id, windowTitle, imgWidth, imgHeight); } }); } @@ -316,7 +335,7 @@ } //重新加载图片 -function reloadImg(id, imgWidth, imgHeight) { +function reloadImg(id, windowTitle, imgWidth, imgHeight) { srcWidth = imgWidth; srcHeight = imgHeight; if (imgWidth == 0 && imgHeight == 0) { @@ -339,6 +358,9 @@ var totalPageElement = top.Ext.get(toolbarTotalPage.el); totalPageElement.update('共' + totalPage + '页'); var url = WWWROOT + action + getPicFun + '?objectId=' + id + '&page=' + page + '&imageType=' + encodeURIComponent(imageType) + '&rotateIndex=' + curRotateIndex + '&showSourceImg=' + showSourceImg + '&time=' + new Date().getTime(); + if (windowTitle == '灭菌器参数') { + url = WWWROOT + action + getSterilizerRecordPicFun + '?sterilizationRecordId=' + id; + } image.parentElement.style.cssText = 'margin:0 auto;padding-top: ' + paddingTop + 'px;width:' + wh.width + 'px;height:' + wh.height + 'px'; image.style.width = wh.width + 'px'; image.style.height = wh.height + 'px';