From c07a5f2dc8c568bf7933b72986f1d911f857b49c Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Dec 2020 12:56:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8B=E6=8B=89=E6=A1=86?= =?UTF-8?q?=E5=8F=AA=E8=AF=BB=E6=83=85=E5=86=B5=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../x_component_process_Xform/Select.js | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/o2web/source/x_component_process_Xform/Select.js b/o2web/source/x_component_process_Xform/Select.js index e982697181..58d2046e7d 100644 --- a/o2web/source/x_component_process_Xform/Select.js +++ b/o2web/source/x_component_process_Xform/Select.js @@ -322,16 +322,20 @@ MWF.xApplication.process.Xform.Select = MWF.APPSelect = new Class({ return {"value": value, "text": text}; }, getInputData: function(){ - var ops = this.node.getElements("option"); - var value = []; - ops.each(function(op){ - if (op.selected){ - var v = op.get("value"); - if (v) value.push(v); - } - }); - if (!value.length) return null; - return (value.length==1) ? value[0] : value; + if( this.readonly || this.json.isReadonly ){ + return this._getBusinessData(); + }else{ + var ops = this.node.getElements("option"); + var value = []; + ops.each(function(op){ + if (op.selected){ + var v = op.get("value"); + if (v) value.push(v); + } + }); + if (!value.length) return null; + return (value.length==1) ? value[0] : value; + } }, resetData: function(){ -- GitLab