Index: ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js =================================================================== diff -u -r41116 -r41171 --- ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js (.../qualitymonitoringInstanceForm.js) (revision 41116) +++ ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js (.../qualitymonitoringInstanceForm.js) (revision 41171) @@ -1389,9 +1389,12 @@ } }, 100); } + var actualWidth = document.body.clientWidth; + var columnWidth = actualWidth > 500 ? 0.5 : 1; + if (type == '文本') { return { - columnWidth: .5, + columnWidth: columnWidth, layout: 'form', labelWidth: 90, hidden: hideElement, @@ -1409,7 +1412,7 @@ }; } else if (type == '文本框') { return { - columnWidth: .9, + columnWidth: columnWidth, layout: 'form', labelWidth: 90, hidden: hideElement, @@ -1428,7 +1431,7 @@ } else if (type == '数字') { return { - columnWidth: .5, + columnWidth: columnWidth, layout: 'form', labelWidth: 90, hidden: hideElement, @@ -1447,7 +1450,7 @@ }; } else if (type == '时间') { return { - columnWidth: .5, + columnWidth: columnWidth, layout: 'form', labelWidth: 90, hidden: hideElement, @@ -1469,7 +1472,7 @@ value = '00:00'; } return { - columnWidth: .5, + columnWidth: columnWidth, layout: 'form', labelWidth: 90, hidden: hideElement, @@ -1489,7 +1492,7 @@ }; } else if (type == '日期') { return { - columnWidth: .5, + columnWidth: columnWidth, layout: 'form', labelWidth: 90, hidden: hideElement, @@ -1524,7 +1527,7 @@ } } var optionItems = [{ - columnWidth: sstsConfig.enableCSSDNursingQualityControlReport ? 0.4 : 0.5, + columnWidth: actualWidth > 500 ? (sstsConfig.enableCSSDNursingQualityControlReport ? 0.4 : 0.5) : (sstsConfig.enableCSSDNursingQualityControlReport ? 0.8 : 1), layout: 'form', labelWidth: 90, items: [{ @@ -1571,7 +1574,7 @@ }] if (sstsConfig.enableCSSDNursingQualityControlReport) { optionItems.push({ - columnWidth: 0.08, + columnWidth: actualWidth > 500 ? 0.08 : 0.16, layout: 'form', style: 'margin-left:2%', id: 'quantityBox' + id, @@ -1614,14 +1617,16 @@ hidden: true, value: '' }); - var columnWidth = 0.5; + var checkColumnWidth = 0.5; var columnFormWidth = 1; if (sstsConfig.enableRecordMaterialDetailsOfQualityMonitoring) { - columnWidth = 1; + checkColumnWidth = 1; columnFormWidth = 0.5; } else if (sstsConfig.enableCSSDNursingQualityControlReport) { columnFormWidth = 0.5; } + checkColumnWidth = actualWidth > 500 ? checkColumnWidth : 1; + columnFormWidth = actualWidth > 500 ? columnFormWidth : 0.5; if (options != "") { var optionsJson = JSON.parse(options); var optionNames = []; @@ -1641,7 +1646,7 @@ sessionOptionsJson.push(optionsJson[j]) optionsArray.push({ layout: 'column', - columnWidth: columnWidth, + columnWidth: checkColumnWidth, height: 36, items: [{ layout: 'form', @@ -3106,10 +3111,13 @@ } }); + var actualWidth = document.body.clientWidth; + + var columnWidth = actualWidth > 500 ? 0.5 : 1; items = { layout: 'form', id: 'materialC' + materialItemCount, - columnWidth: .36, + columnWidth: actualWidth > 500 ? 0.36 : ((addExtractClick == true || btnShowOrHide == true) ? 0.56 : 0.66), labelWidth: 90, height: setH, items: [{ @@ -3180,7 +3188,7 @@ if (addExtractClick == true || btnShowOrHide == true) { items5 = { layout: 'form', - columnWidth: .04, + columnWidth: actualWidth > 500 ? 0.04 : 0.10, labelWidth: 90, height: setH, id: "addExtractCheckMaterialBtnC" + materialItemCount,//materialItemCount这里必须取这个,不然id会重复 @@ -3221,8 +3229,8 @@ items1 = { layout: 'form', id: 'materialAmountC' + materialItemCount, - columnWidth: columnW, - labelWidth: labelW, + columnWidth: actualWidth > 500 ? 0.36 : 0.34, + labelWidth: actualWidth > 500 ? labelW : 70, height: setH, items: [{ xtype: 'numberfield', @@ -3942,11 +3950,13 @@ var idpreKey2 = 'tempBarcodeHidden' + tousseItemCount; var idpreKey3 = 'hiddenResponsiblePerson' + tousseItemCount; var rememberNum = tousseAndMaterialWrapperCount; + var actualWidth = document.body.clientWidth; + var columnWidth = actualWidth > 500 ? 0.5 : 1; items1 = { layout: 'form', id: 'tousseBarcodeC' + tousseItemCount + "_" + 2, labelWidth: 90, - columnWidth: .25, + columnWidth: actualWidth > 500 ? 0.25 : 0.5, height: setH, items: [{ id: 'tempBarcode' + tousseItemCount + "_" + 2, @@ -3972,7 +3982,7 @@ layout: 'form', id: 'tousseBarcodeC' + tousseItemCount + "_" + 4, labelWidth: 90, - columnWidth: .25, + columnWidth: actualWidth > 500 ? 0.25 : 0.5, height: setH, items: [{ id: 'tempBarcode' + tousseItemCount + "_" + 4, @@ -3998,7 +4008,7 @@ layout: 'form', id: 'tousseBarcodeC' + tousseItemCount + "_" + 12, labelWidth: 90, - columnWidth: .25, + columnWidth: actualWidth > 500 ? 0.25 : 0.5, height: setH, items: [{ id: 'tempBarcode' + tousseItemCount + "_" + 12, @@ -4024,7 +4034,7 @@ layout: 'form', id: 'tousseBarcodeC' + tousseItemCount + "_" + 14, labelWidth: 90, - columnWidth: .25, + columnWidth: actualWidth > 500 ? 0.25 : 0.5, height: setH, items: [{ id: 'tempBarcode' + tousseItemCount + "_" + 14, @@ -4048,7 +4058,7 @@ layout: 'form', id: 'tousseBarcodeC' + tousseItemCount + "_" + 1, labelWidth: 90, - columnWidth: .36, + columnWidth: actualWidth > 500 ? 0.36 : 0.9, height: setH, items: [{ xtype: 'textfield', @@ -4147,7 +4157,7 @@ if (addTousseClick) { items10 = { layout: 'form', - columnWidth: .04, + columnWidth: actualWidth > 500 ? 0.04 : 0.1, labelWidth: 90, height: setH, id: "addExtractCheckTousseBtnC" + tousseAndMaterialWrapperCount, @@ -4211,8 +4221,8 @@ items4 = { layout: 'form', id: 'tousseBarcodeC' + tousseItemCount + "_" + 3, - labelWidth: labelW, - columnWidth: columnW, + labelWidth: actualWidth > 500 ? labelW : 90, + columnWidth: actualWidth > 500 ? columnW : 0.5, height: setH, items: [{ xtype: 'combo', @@ -4304,7 +4314,7 @@ layout: 'form', id: 'tousseBarcodeC' + tousseItemCount + "_" + 6, labelWidth: 90, - columnWidth: .2, + columnWidth: actualWidth > 500 ? 0.2 : 0.5, height: setH, items: [{ xtype: 'textfield', @@ -4725,9 +4735,11 @@ * @param id 质量监测实例id */ function getResponsibilityPartContent(id) { + var actualWidth = document.body.clientWidth; + var columnWidth = actualWidth > 500 ? 0.5 : 1; return { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, height: setH, items: [{ @@ -4997,9 +5009,11 @@ */ function getInspectItemContent(id) { + var actualWidth = document.body.clientWidth; + var columnWidth = actualWidth > 500 ? 0.5 : 1; return { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, height: setH, items: [{ @@ -5091,8 +5105,7 @@ } else { disableShowImageButton = false; } - - formPanel = getFormPanelContent(id); + //formPanel = getFormPanelContent(id); if (id != null && id != '') { Ext.getCmp('formName').addClass("fieldReadOnlyNoRemove"); Ext.getCmp('responsibilityPart').addClass("fieldReadOnlyNoRemove"); @@ -6913,6 +6926,8 @@ } var actualWidth = document.body.clientWidth; var actualHeight = document.body.clientHeight; + + var columnWidth = actualWidth > 500 ? 0.5 : 1; formPanel = new Ext.FormPanel({ id: 'addQualityMonitoringForm', frame: true, @@ -6960,7 +6975,7 @@ varibaleContent2, { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, height: setH, items: [{ @@ -6977,7 +6992,7 @@ }] }, { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, height: setH, items: [{ @@ -7026,7 +7041,7 @@ }] }, { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, height: setH, items: [{ @@ -7045,7 +7060,7 @@ value: currentOrgUnitCoding }, { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, height: setH, items: [{ @@ -7057,7 +7072,7 @@ }] }, { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, height: setH, items: [{ @@ -7078,7 +7093,7 @@ }] }, { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, height: setH, items: [{ @@ -7093,7 +7108,7 @@ id: 'insertBasket', name: 'insertBasket', layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, height: setH, items: [{ @@ -7127,7 +7142,7 @@ id: 'containerNameItem', name: 'containerNameItem', layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, height: setH, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, items: [{ @@ -7143,7 +7158,7 @@ id: 'rinseBasketsBarcodeWrapper', name: 'rinseBasketsBarcodeWrapper', layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, height: setH, hidden: true, @@ -7202,7 +7217,7 @@ id: 'rinseBasketsNameWrapper', name: 'rinseBasketsNameWrapper', layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, height: setH, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, hidden: true, @@ -7219,7 +7234,7 @@ id: 'cleaningMachinePositionWrapper', name: 'cleaningMachinePositionWrapper', layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, hidden: true, height: setH, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, @@ -7235,7 +7250,7 @@ id: 'cleaningMachineDateWrapper', name: 'cleaningMachineDateWrapper', layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, height: setH, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, hidden: true, @@ -7251,7 +7266,7 @@ id: 'cleaningMachineNameWrapper', name: 'cleaningMachineNameWrapper', layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, height: setH, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, hidden: true, @@ -7267,7 +7282,7 @@ id: 'cleaningMachineProgramNameWrapper', name: 'cleaningMachineProgramNameWrapper', layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, height: setH, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, hidden: true, @@ -7283,7 +7298,7 @@ id: 'cleaningStartTimeWrapper', name: 'cleaningStartTimeWrapper', layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, height: setH, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, hidden: true, @@ -7299,7 +7314,7 @@ id: 'cleaningEndTimeWrapper', name: 'cleaningEndTimeWrapper', layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, height: setH, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, hidden: true, @@ -7313,7 +7328,7 @@ }] }, { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: recycleQM ? 182 : labelWidthLeft, hidden: true, height: setH, @@ -7336,7 +7351,7 @@ }] }, { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, hidden: true, height: setH, @@ -7355,7 +7370,7 @@ }] }, { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, hidden: true, height: setH, @@ -7370,7 +7385,7 @@ }] }, { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, hidden: true, height: setH, @@ -7385,7 +7400,7 @@ }] }, { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, hidden: true, height: setH, @@ -7400,7 +7415,7 @@ }] }, { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, hidden: true, height: setH, @@ -7415,7 +7430,7 @@ }] }, { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, hidden: true, height: setH, @@ -7435,7 +7450,7 @@ }] }, { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, hidden: true, height: setH, @@ -7459,7 +7474,7 @@ }] }, { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, hidden: true, height: setH, @@ -7474,7 +7489,7 @@ }] }, { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, hidden: true, height: setH, @@ -7489,7 +7504,7 @@ }] }, { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, hidden: true, height: setH, @@ -7504,7 +7519,7 @@ }] }, { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, hidden: true, height: setH, @@ -7519,7 +7534,7 @@ }] }, { layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, hidden: true, height: setH, @@ -7553,7 +7568,7 @@ items: [ { layout: 'form', - columnWidth: 0.8, + columnWidth: actualWidth > 500 ? 0.8 : 0.6, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, items: [ { @@ -7567,7 +7582,7 @@ }, { layout: 'form', - columnWidth: 0.08, + columnWidth: actualWidth > 500 ? 0.08 : 0.2, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, items: [ { @@ -7585,7 +7600,7 @@ }, { layout: 'form', - columnWidth: 0.12, + columnWidth: actualWidth > 500 ? 0.12 : 0.2, labelWidth: (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, items: [ { @@ -7651,12 +7666,10 @@ hidden: !sstsConfig.enableRecordsQualifiedOfQualityMonitoringFunction, items: [{ layout: 'column', - columnWidth: .5, - labelWidth: 90, id: 'qualifiedInformationSetLayout', items: [{ layout: 'form', - columnWidth: .3, + columnWidth: columnWidth, labelWidth: 90, items: [{ xtype: 'combo', @@ -7718,12 +7731,9 @@ xtype: "fieldset", labelAlign: 'left', title: "器械包信息", - // layout:'column', autoHeight: true, items: [{ layout: 'column', - columnWidth: .5, - labelWidth: 90, id: 'tousseInfoSetLayout', items: [{ layout: 'form', @@ -7751,7 +7761,7 @@ }] }, { layout: 'form', - columnWidth: .25, + columnWidth: actualWidth > 500 ? 0.25 : 0.5, id: 'recycleC', labelWidth: 90, items: [{ @@ -7788,7 +7798,7 @@ }] }, { layout: 'form', - columnWidth: .25, + columnWidth: actualWidth > 500 ? 0.25 : 0.5, id: 'repackingC', labelWidth: 90, items: [{ @@ -7826,7 +7836,7 @@ }, { layout: 'form', - columnWidth: .25, + columnWidth: actualWidth > 500 ? 0.25 : 0.5, id: 'disabledBarcodeC', labelWidth: 90, items: [{ @@ -7863,7 +7873,7 @@ }] }, { layout: 'form', - columnWidth: .25, + columnWidth: actualWidth > 500 ? 0.25 : 0.5, id: 'tousseReprintC', labelWidth: 90, hidden: true, @@ -7892,7 +7902,7 @@ layout: 'form', id: 'tousseBarcodeC', labelWidth: 90, - columnWidth: .36, + columnWidth: actualWidth > 500 ? 0.36 : 0.9, height: 28, items: [{ xtype: 'textfield', @@ -7920,7 +7930,7 @@ }] }, { layout: 'form', - columnWidth: .04, + columnWidth: actualWidth > 500 ? 0.04 : 0.10, labelWidth: 90, id: "addExtractCheckTousseBtnC", height: setH, @@ -7946,7 +7956,7 @@ layout: 'form', id: 'tousseNameC', labelWidth: 90, - columnWidth: .4, + columnWidth: actualWidth > 500 ? 0.4 : 0.5, height: setH, items: [{ xtype: 'combo', @@ -8020,7 +8030,7 @@ layout: 'form', id: 'tousseAmountC', labelWidth: 90, - columnWidth: .2, + columnWidth: actualWidth > 500 ? 0.2 : 0.5, items: [{ xtype: 'numberfield', allowDecimals: false, @@ -8039,7 +8049,7 @@ items: [{ layout: 'form', id: 'materialC', - columnWidth: .36, + columnWidth: actualWidth > 500 ? 0.36 : 0.56, height: setH, labelWidth: 90, items: [{ @@ -8097,7 +8107,7 @@ }] }, { layout: 'form', - columnWidth: .04, + columnWidth: actualWidth > 500 ? 0.04 : 0.10, labelWidth: 90, height: setH, id: "addExtractCheckMaterialBtnC", @@ -8119,8 +8129,8 @@ }, { layout: 'form', id: 'materialAmountC', - columnWidth: 0.32, - labelWidth: 91, + columnWidth: actualWidth > 500 ? 0.32 : 0.34, + labelWidth: actualWidth > 500 ? 91 : 70, height: setH, items: [{ xtype: 'numberfield', @@ -8136,7 +8146,7 @@ layout: 'form', //hidden : !(qualityMonitoringWRRecordID > 0 && (sstsConfig.hasOwnProperty('haveRinserPosition')) && sstsConfig.haveRinserPosition), id: 'basketBarcodeC', - columnWidth: .36, + columnWidth: actualWidth > 500 ? 0.36 : 0.56, labelWidth: 90, items: [{ xtype: 'textfield', @@ -8158,8 +8168,8 @@ layout: 'form', //hidden : !(qualityMonitoringWRRecordID > 0 && (sstsConfig.hasOwnProperty('haveRinserPosition')) && sstsConfig.haveRinserPosition), id: 'positionC', - columnWidth: .36, - labelWidth: labelWidthPosition, + columnWidth: actualWidth > 500 ? 0.36 : 0.44, + labelWidth: 70, items: [{ xtype: 'textfield', name: 'position', @@ -8181,12 +8191,12 @@ autoHeight: true, items: [{ layout: 'column', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: 90, id: 'setLayout', items: [{ layout: 'form', - columnWidth: .5, + columnWidth: columnWidth, labelWidth: 90, items: [{ xtype: 'datefieldWithMin', @@ -8280,6 +8290,10 @@ return true } +Ext.onReady(function () { + formPanel = getFormPanelContent(id); +}); + //仪器图谱 function loadDataForToussePictures(responPartName, newMaterialCountRecords) { materialCountRecords = newMaterialCountRecords;