diff --git a/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/template.json b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/template.json index 32a258a8793dcd07bd093e318ed3b0fc391dcc6a..35446f3d05e8a45b774ecb163f55ce356d6ddd4f 100644 --- a/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/template.json +++ b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/template.json @@ -1,7 +1,7 @@ { "id": "", "name": "", - "type": "statementSelector", + "type": "StatementSelector", "description": "", "titleStyles": {}, "itemStyles": {}, diff --git a/o2web/source/x_component_query_Query/Main.js b/o2web/source/x_component_query_Query/Main.js index fdc1c3f2f2ff8ecfd3c19b274322ae1589eb956f..2104815c5202fd2b01a35042d01f2c05d449c905 100644 --- a/o2web/source/x_component_query_Query/Main.js +++ b/o2web/source/x_component_query_Query/Main.js @@ -252,11 +252,12 @@ MWF.xApplication.query.Query.StatementItem = new Class({ loadView: function(){ MWF.xDesktop.requireApp("query.Query", "Statement",function(){ this.viewContent.empty(); - this.viewer = new MWF.QStatement(this.app, this.viewContent, { + debugger; + this.viewer = new MWF.QStatement( this.viewContent, { "application": this.view.query, "statementName": this.view.name, "statementId" : this.view.id - }); + },{}, this.app); }.bind(this)); } }); \ No newline at end of file diff --git a/o2web/source/x_component_query_Query/Statement.js b/o2web/source/x_component_query_Query/Statement.js index 3b8f9a99500ee1db6a5295092ba76b3ce400b033..e2ad4cce9cc1798097351e9ef44c83ebac57c83d 100644 --- a/o2web/source/x_component_query_Query/Statement.js +++ b/o2web/source/x_component_query_Query/Statement.js @@ -155,7 +155,15 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({ if( d.comparison === "like" || d.comparison === "notLike" ){ this.parameter[ parameterName ] = "%"+d.value+"%"; }else{ - this.parameter[ parameterName ] = d.value; + var value = d.value; + if( d.formatType === "dateTimeValue" || d.formatType === "datetimeValue"){ + value = "{ts '"+value+"'}" + }else if( d.formatType === "dateValue" ){ + value = "{d '"+value+"'}" + }else if( d.formatType === "timeValue" ){ + value = "{t '"+value+"'}" + } + this.parameter[ parameterName ] = value; } d.value = parameterName; @@ -163,6 +171,7 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({ }.bind(this)) }, loadParameter : function(){ + this.parameter = {}; ( this.viewJson.filterList || [] ).each( function (f) { var value = f.value; debugger; @@ -177,17 +186,17 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({ case "@identityList": value = user.identityList.map( function (d) { return d.distinguishedName; - }) + }); break; case "@unitList": o2.Actions.load("x_organization_assemble_express").UnitAction.listWithPerson({ "personList" : [user.distinguishedName] }, function (json) { value = json.unitList; - }, null, false) + }, null, false); break; case "@unitAllList": o2.Actions.load("x_organization_assemble_express").UnitAction.listWithIdentitySupNested({ "personList" : [user.distinguishedName] }, function (json) { value = json.unitList; - }, null, false) + }, null, false); break; case "@year": value = (new Date().getFullYear()).toString(); @@ -216,6 +225,13 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({ default: } } + if( f.formatType === "dateTimeValue" || f.formatType === "datetimeValue"){ + value = "{ts '"+value+"'}" + }else if( f.formatType === "dateValue" ){ + value = "{d '"+value+"'}" + }else if( f.formatType === "timeValue" ){ + value = "{t '"+value+"'}" + } this.parameter[ f.parameter ] = value; }.bind(this)) }, @@ -241,7 +257,7 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({ //this.createLoadding(); this.loadViewRes = o2.Actions.load("x_query_assemble_surface").StatementAction.executeV2( - this.json.statementId || this.json.statementName, + this.options.statementId || this.options.statementName || this.json.statementId || this.json.statementName, type || "data", p, this.json.pageSize, d, function(json){ if( type === "all" || type === "count" ){ diff --git a/o2web/source/x_component_query_StatementDesigner/$Statement/statementDesigner.html b/o2web/source/x_component_query_StatementDesigner/$Statement/statementDesigner.html index e3af09028464be54d74dec9c5c8b4eb8f976c6a4..4d8e353d03a72665d1c766709bc5230f20ebe9b4 100644 --- a/o2web/source/x_component_query_StatementDesigner/$Statement/statementDesigner.html +++ b/o2web/source/x_component_query_StatementDesigner/$Statement/statementDesigner.html @@ -39,6 +39,7 @@
{{$.lp.statementTable}}:
- - 选择参数: - - - - + + + + + + 参数: @@ -174,7 +174,7 @@ debugger; $('text{$.id}viewFilterRestrict').setStyle('display', 'block'); $('text{$.id}parameterInputTr').setStyle('display', 'table-row'); - $('text{$.id}parameterInputSelectTr').setStyle('display', 'table-row'); + // $('text{$.id}parameterInputSelectTr').setStyle('display', 'table-row'); $('text{$.id}viewCustomFilterRestrict').setStyle('display', 'none'); $('text{$.id}pathInputTr').setStyle('display', 'none'); $('text{$.id}pathInputSelectTr').setStyle('display', 'none'); @@ -182,7 +182,7 @@