Index: ssts-web/src/main/webapp/js/commonUtils.js =================================================================== diff -u -r40949 -r40959 --- ssts-web/src/main/webapp/js/commonUtils.js (.../commonUtils.js) (revision 40949) +++ ssts-web/src/main/webapp/js/commonUtils.js (.../commonUtils.js) (revision 40959) @@ -27,48 +27,6 @@ } } -//FSEYEQ-26:获取pdf文件(清洗机和灭菌通用) -function getPDFFileUtil(params) { - var title = ''; - if (params.washAndDisinfectRecordId) { - title = '清洗参数'; - } else if (params.sterilizationRecordId) { - title = '灭菌炉运行参数'; - } - Ext.Ajax.request({ - url: WWWROOT + '/disinfectSystem/washData/washDataLineChartAction!getPDFFile.do', - params: params, - success: function (result) { - var resultStr = Ext.decode(result.responseText); - if (resultStr.success && resultStr.data) { - var url = 'data:application/pdf;base64,' + resultStr.data; - if (params.doc) { - params.doc.src = url; - } else { - var win = new top.Ext.Window({ - title: title, - width: 850, - height: 640, - autoScroll: false, - isTopContainer: true, - modal: true, - resizable: false, - buttonAlign: 'center', - items: [{ - xtype: "panel", - id: "index", - html: "" - }] - }) - win.show() - } - } else { - showResult('获取不到pdf文件!'); - } - } - }) -} - //ZSRY-60:form表单显示在iframe(可以通用) function getFormByIframeUtil(params) { var title = params.title; @@ -100,4 +58,82 @@ } }) win.show() +} + +//FSEYEQ-26:显示清洗机数据图形(通用) +function getWashDataLineCharByIframeUtil(id, deviceModel, isPrint) { + var url = WWWROOT + '/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washDataChart/washDataChartOfCommon.jsp?washAndDisinfectRecordId=' + id + '&deviceModel=' + deviceModel; + var win = new top.Ext.Window({ + title: '清洗参数', + id: 'extWindow' + id, + width: 850, + height: 640, + autoScroll: false, + isTopContainer: true, + modal: true, + resizable: false, + buttonAlign: 'center', + items: [{ + xtype: "panel", + id: "index", + html: "" + }], + buttons: [{ + text: '打印', + id: 'print', + hidden: true, + handler: function () { + top.document.getElementById('thisIframe').contentWindow.document.getElementById('print').click(); + } + }, { + text: '关闭', + id: 'close', + handler: function () { + win.close(); + } + }] + }) + win.show() + if (isPrint) { + top.Ext.getCmp('print').show(); + } +} + +//FSEYEQ-26:显示灭菌数据图形(通用) +function getSterilizerDataLineCharByIframeUtil(id, sterilizationParaType, isPrint) { + var url = WWWROOT + '/disinfectsystem/sterilizationmanager/sterilizerRecord/sterilizerLineChartOfCommon.jsp?sterilizationRecordId=' + id + '&sterilizationParaType=' + sterilizationParaType; + var win = new top.Ext.Window({ + title: '灭菌参数', + id: 'extWindow' + id, + width: 1050, + height: 700, + autoScroll: false, + isTopContainer: true, + modal: true, + resizable: false, + buttonAlign: 'center', + items: [{ + xtype: "panel", + id: "index", + html: "" + }], + buttons: [{ + text: '打印', + id: 'print', + hidden: true, + handler: function () { + top.document.getElementById('thisIframe').contentWindow.document.getElementById('print').click(); + } + }, { + text: '关闭', + id: 'close', + handler: function () { + win.close(); + } + }] + }) + win.show() + if (isPrint) { + top.Ext.getCmp('print').show(); + } } \ No newline at end of file