From 7f7a4c418169142829287abccbdaf881081e849c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 9 Oct 2020 15:48:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E9=80=89=E6=8B=A9=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E8=8C=83=E5=9B=B4=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- o2web/source/x_component_Selector/Identity.js | 4 ++++ o2web/source/x_component_Selector/IdentityWidthDuty.js | 5 ++++- .../IdentityWidthDutyCategoryByUnit.js | 4 ++++ o2web/source/x_component_Selector/Unit.js | 6 ++++++ o2web/source/x_component_Selector/UnitWithType.js | 6 ++++++ o2web/source/x_component_process_Work/Processor.js | 9 ++++++--- o2web/source/x_component_process_Xform/Org.js | 9 ++++++--- 7 files changed, 36 insertions(+), 7 deletions(-) diff --git a/o2web/source/x_component_Selector/Identity.js b/o2web/source/x_component_Selector/Identity.js index d320af19ce..65da024640 100644 --- a/o2web/source/x_component_Selector/Identity.js +++ b/o2web/source/x_component_Selector/Identity.js @@ -23,6 +23,10 @@ MWF.xApplication.Selector.Identity = new Class({ this.className = "Identity"; }, loadSelectItems : function(){ + if( this.options.disabled ){ + this.afterLoadSelectItem(); + return; + } if( this.className === "Identity" && (this.options.isCheckStatus || this.options.showSelectedCount )) { var unitList = []; diff --git a/o2web/source/x_component_Selector/IdentityWidthDuty.js b/o2web/source/x_component_Selector/IdentityWidthDuty.js index 49793b69cb..8fc4793b45 100644 --- a/o2web/source/x_component_Selector/IdentityWidthDuty.js +++ b/o2web/source/x_component_Selector/IdentityWidthDuty.js @@ -24,8 +24,11 @@ MWF.xApplication.Selector.IdentityWidthDuty = new Class({ this.className = "IdentityWidthDuty" }, loadSelectItems: function(addToNext){ - var afterLoadSelectItemFun = this.afterLoadSelectItem.bind(this); + if( this.options.disabled ){ + this.afterLoadSelectItem(); + return; + } if( this.options.resultType === "person" ){ if( this.titleTextNode ){ diff --git a/o2web/source/x_component_Selector/IdentityWidthDutyCategoryByUnit.js b/o2web/source/x_component_Selector/IdentityWidthDutyCategoryByUnit.js index 6f9b79bea3..ff0816e0cb 100644 --- a/o2web/source/x_component_Selector/IdentityWidthDutyCategoryByUnit.js +++ b/o2web/source/x_component_Selector/IdentityWidthDutyCategoryByUnit.js @@ -33,6 +33,10 @@ MWF.xApplication.Selector.IdentityWidthDutyCategoryByUnit = new Class({ this.options.title = MWF.xApplication.Selector.LP.selectPerson; } } + if( this.options.disabled ){ + this.afterLoadSelectItem(); + return; + } if (this.options.dutys.length){ this.loadInclude( function () { diff --git a/o2web/source/x_component_Selector/Unit.js b/o2web/source/x_component_Selector/Unit.js index 3cd26254b9..3c1c797b4c 100644 --- a/o2web/source/x_component_Selector/Unit.js +++ b/o2web/source/x_component_Selector/Unit.js @@ -21,6 +21,12 @@ MWF.xApplication.Selector.Unit = new Class({ this.className = "Unit"; }, loadSelectItems: function(addToNext){ + + if( this.options.disabled ){ + this.afterLoadSelectItem(); + return; + } + var afterLoadSelectItemFun = this.afterLoadSelectItem.bind(this); if (this.options.units.length){ diff --git a/o2web/source/x_component_Selector/UnitWithType.js b/o2web/source/x_component_Selector/UnitWithType.js index 8020f6d69f..537d9ce909 100644 --- a/o2web/source/x_component_Selector/UnitWithType.js +++ b/o2web/source/x_component_Selector/UnitWithType.js @@ -21,6 +21,12 @@ MWF.xApplication.Selector.UnitWithType = new Class({ this.className = "UnitWithType"; }, loadSelectItems: function(addToNext){ + + if( this.options.disabled ){ + this.afterLoadSelectItem(); + return; + } + var afterLoadSelectItemFun = this.afterLoadSelectItem.bind(this); var data = {}; diff --git a/o2web/source/x_component_process_Work/Processor.js b/o2web/source/x_component_process_Work/Processor.js index a7ab6e3700..b79d61f977 100644 --- a/o2web/source/x_component_process_Work/Processor.js +++ b/o2web/source/x_component_process_Work/Processor.js @@ -1725,13 +1725,15 @@ if( MWF.xApplication.process.Xform && MWF.xApplication.process.Xform.Form ){ if (this.json.identityRange!=="all"){ if ( !identityOpt.noUnit && (!identityOpt.units || !identityOpt.units.length) ){ this.form.notice(MWF.xApplication.process.Xform.LP.noIdentitySelectRange, "error", this.node); - return false; + identityOpt.disabled = true; + // return false; } } if ( !identityOpt.noUnit && this.json.dutyRange && this.json.dutyRange!=="all"){ if (!identityOpt.dutys || !identityOpt.dutys.length){ this.form.notice(MWF.xApplication.process.Xform.LP.noIdentityDutySelectRange, "error", this.node); - return false; + identityOpt.disabled = true; + // return false; } } if( this.ignoreOldData ){ @@ -1748,7 +1750,8 @@ if( MWF.xApplication.process.Xform && MWF.xApplication.process.Xform.Form ){ if (this.json.unitRange!=="all"){ if ( !unitOpt.units || !unitOpt.units.length){ this.form.notice(MWF.xApplication.process.Xform.LP.noUnitSelectRange, "error", this.node); - return false; + unitOpt.disabled = true; + // return false; } } if( this.ignoreOldData ){ diff --git a/o2web/source/x_component_process_Xform/Org.js b/o2web/source/x_component_process_Xform/Org.js index 069c78ad6d..fefb0af091 100644 --- a/o2web/source/x_component_process_Xform/Org.js +++ b/o2web/source/x_component_process_Xform/Org.js @@ -166,13 +166,15 @@ MWF.xApplication.process.Xform.Org = MWF.APPOrg = new Class({ if (this.json.identityRange!=="all"){ if ( !identityOpt.noUnit && (!identityOpt.units || !identityOpt.units.length) ){ this.form.notice(MWF.xApplication.process.Xform.LP.noIdentitySelectRange, "error", this.node); - return false; + identityOpt.disabled = true; + // return false; } } if ( !identityOpt.noUnit && this.json.dutyRange && this.json.dutyRange!=="all"){ if (!identityOpt.dutys || !identityOpt.dutys.length){ this.form.notice(MWF.xApplication.process.Xform.LP.noIdentityDutySelectRange, "error", this.node); - return false; + identityOpt.disabled = true; + // return false; } } identityOpt.values = (this.json.isInput) ? [] : values; @@ -186,7 +188,8 @@ MWF.xApplication.process.Xform.Org = MWF.APPOrg = new Class({ if (this.json.unitRange!=="all"){ if ( !unitOpt.units || !unitOpt.units.length){ this.form.notice(MWF.xApplication.process.Xform.LP.noUnitSelectRange, "error", this.node); - return false; + unitOpt.disabled = true; + // return false; } } unitOpt.values = (this.json.isInput) ? [] : values; -- GitLab