Просмотр исходного кода

Merge branch 'wrdp' into 'develop'

Wrdp

See merge request o2oa/o2oa!2017
蔡祥熠 5 лет назад
Родитель
Сommit
3831266a04

+ 6 - 7
o2web/source/o2_core/o2/xScript/ViewEnvironment.js

@@ -669,13 +669,12 @@ MWF.xScript.ViewEnvironment = function (ev) {
 
     this.statement = {
         "execute": function (statement, callback, async) {
-            var filterList = { "filterList": (statement.filter || null) };
-            MWF.Actions.get("x_query_assemble_surface").execute(statement.view, statement.application, filterList, function (json) {
-                var data = {
-                    "grid": json.data.grid,
-                };
-                if (callback) callback(data);
-            }, null, async);
+            var obj = { "filterList": (statement.filterList || []), parameter : (statement.parameter || {}) };
+            MWF.Actions.load("x_query_assemble_surface").StatementAction.executeV2(
+                statement.name, statement.mode || "data", statement.page || 1, statement.pageSize || 20, obj,
+                function (json) {
+                    if (callback) callback(json);
+                }, null, async);
         },
         "select": function (statement, callback, options) {
             if (statement.statement) {

+ 1 - 3
o2web/source/x_component_process_FormDesigner/Module/Statement/statement.html

@@ -161,9 +161,7 @@
 			</div>
 			<div class="actionAreaNode_vf"></div>
 			<div style="height: 20px; line-height: 20px; text-align:center; background-color: #eeeeee">默认过滤条件</div>
-			<div class="listAreaNode_vf" style="min-height: 56px; border-bottom:1px solid #CCCCCC; overflow: hidden;"></div>
-			<div style="display:none; height: 20px; line-height: 20px; text-align:center; background-color: #eeeeee">自定义过滤数据</div>
-			<div class="fieldListAreaNode_vf" style="display:none; min-height: 56px; border-bottom:1px solid #CCCCCC; overflow: hidden;"></div>
+			<div class="filterListAreaNode_vf" style="min-height: 56px; border-bottom:1px solid #CCCCCC; overflow: hidden;"></div>
 		</div>
 		<div class="MWFScriptArea" name="defaultSelectedScript" title="默认选中行脚本"></div>
 		<div class="MWFScriptArea" name="selectedAbleScript" title="允许选择行脚本" id="text{$.pid}selectedAbleScript"

+ 3 - 3
o2web/source/x_component_process_FormDesigner/Module/StatementSelector/StatementSelector.html

@@ -191,9 +191,9 @@
             </div>
             <div class="actionAreaNode_vf"></div>
             <div style="height: 20px; line-height: 20px; text-align:center; background-color: #eeeeee">默认过滤条件</div>
-            <div class="listAreaNode_vf" style="min-height: 56px; border-bottom:1px solid #CCCCCC; overflow: hidden;"></div>
-            <div style="display:none; height: 20px; line-height: 20px; text-align:center; background-color: #eeeeee">自定义过滤数据</div>
-            <div class="fieldListAreaNode_vf" style="display:none; min-height: 56px; border-bottom:1px solid #CCCCCC; overflow: hidden;"></div>
+            <div class="filterListAreaNode_vf" style="min-height: 56px; border-bottom:1px solid #CCCCCC; overflow: hidden;"></div>
+<!--            <div style="display:none; height: 20px; line-height: 20px; text-align:center; background-color: #eeeeee">自定义过滤数据</div>-->
+<!--            <div class="fieldListAreaNode_vf" style="display:none; min-height: 56px; border-bottom:1px solid #CCCCCC; overflow: hidden;"></div>-->
         </div>
     </div>
 

+ 2 - 2
o2web/source/x_component_process_FormDesigner/Property.js

@@ -525,12 +525,12 @@ MWF.xApplication.process.FormDesigner.Property = MWF.FCProperty = new Class({
         nodes.each(function(node){
             MWF.xDesktop.requireApp("query.StatementDesigner", "widget.ViewFilter", function(){
                 var _slef = this;
-                this.viewFilter = new MWF.xApplication.query.StatementDesigner.widget.ViewFilter(node, this.form.designer, {"filtrData": filtrData, "customData": null}, {
+                this.viewFilter = new MWF.xApplication.query.StatementDesigner.widget.ViewFilter(node, this.form.designer, {"filtrData": filtrData, "customData": null, "parameterData": null}, {
                     "statementId" : this.data.queryStatement ? this.data.queryStatement.id : "",
                     "withForm" : true,
                     "onChange": function(ids){
                         var data = this.getData();
-                        _slef.changeJsonDate(["filterList"], data.data);
+                        _slef.changeJsonDate(["filterList"], data.filterData);
                         //_slef.changeJsonDate(["data", "customFilterEntryList"], data.customData);
                     }
                 });

+ 23 - 22
o2web/source/x_component_query_Query/Statement.js

@@ -157,11 +157,13 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({
         ( data.filterList || [] ).each( function (d) {
             var parameterName = d.path.replace(/\./g, "_");
             var value = d.value;
-            if( d.code && d.code.code ){
-                value = this.Macro.exec( d.code.code, this);
-            }
+            // if( d.code && d.code.code ){
+            //     value = this.Macro.exec( d.code.code, this);
+            // }
             if( d.comparison === "like" || d.comparison === "notLike" ){
-                this.parameter[ parameterName ] = "%"+value+"%";
+                if( value.substr(0, 1) !== "%" )value = "%"+value;
+                if( value.substr(value.length-1,1) !== "%" )value = value+"%";
+                this.parameter[ parameterName ] = value; //"%"+value+"%";
             }else{
                 if( d.formatType === "dateTimeValue" || d.formatType === "datetimeValue"){
                     value = "{ts '"+value+"'}"
@@ -177,14 +179,15 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({
             this.filterList.push( d );
         }.bind(this))
     },
-    loadParameter : function( data ){
+    loadParameter : function(){
         this.parameter = {};
+        var parameter = this.json.parameter ? Object.clone(this.json.parameter) : {};
         //系统默认的参数
-        ( this.viewJson.filterList || [] ).each( function (f) {
+        ( this.viewJson.parameterList || [] ).each( function (f) {
             var value = f.value;
-            if( data.parameter && data.parameter[ f.parameter ] ){
-                value = data.parameter[ f.parameter ];
-                delete data.parameter[ f.parameter ];
+            if( parameter && parameter[ f.parameter ] ){
+                value = parameter[ f.parameter ];
+                delete parameter[ f.parameter ];
             }
             debugger;
             if( typeOf( value ) === "date" ){
@@ -254,14 +257,12 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({
             this.parameter[ f.parameter ] = value;
         }.bind(this));
         //传入的参数
-        if( data.parameter ){
-            for( var p in data.parameter ){
-                var value = data.parameter[p];
-                if( typeOf( value ) === "date" ){
-                    value = "{ts '"+value+"'}"
-                }
-                this.parameter[ p ] = value;
+        for( var p in parameter ){
+            var value = parameter[p];
+            if( typeOf( value ) === "date" ){
+                value = "{ts '"+value+"'}"
             }
+            parameter[ p ] = value;
         }
     },
     loadCurrentPageData: function( callback, async, type ){
@@ -484,14 +485,14 @@ MWF.xApplication.query.Query.Statement = MWF.QStatement = new Class({
     switchStatement : function (json) {
         this.switchView(json);
     },
-    setFilter : function( filter, callback ){
+    setFilter : function( filter, parameter, callback ){
         if( this.lookuping || this.pageloading )return;
-        if( !filter )filter = {"filterList": [], "paramter" : {} };
-        if( typeOf( filter ) === "object" )return;
-        this.json.filter = filter.filterList || [];
-        this.json.paramter = filter.paramter || {};
+        if( !filter )filter = [];
+        if( !parameter )parameter = {};
+        this.json.filter = filter;
+        this.json.parameter = parameter;
         if( this.viewAreaNode ){
-            this.createViewNode({"filterList": this.json.filter.clone(), "paramter" : Object.clone(this.json.paramter) }, callback);
+            this.createViewNode({"filterList": this.json.filter.clone() }, callback);
         }
     }
 });

+ 52 - 52
o2web/source/x_component_query_StatementDesigner/$Statement/view.html

@@ -166,28 +166,28 @@
                         <td class="editTableTitle">数据类型:</td>
                         <td class="editTableValue"><select class="datatypeInput_vf">
 <!--                                 onchange="if (this.selectedIndex==2){-->
-<!--                                    $('text{$.id}viewFilterDateFormulaSelector').setStyle('display', 'block');-->
-<!--                                    $('text{$.id}viewFilterDateOnlyFormulaSelector').setStyle('display', 'none');-->
-<!--                                    $('text{$.id}viewFilterTimeOnlyFormulaSelector').setStyle('display', 'none');-->
+<!--                                    $('text{$.id}viewParameterDateFormulaSelector').setStyle('display', 'block');-->
+<!--                                    $('text{$.id}viewParameterDateOnlyFormulaSelector').setStyle('display', 'none');-->
+<!--                                    $('text{$.id}viewParameterTimeOnlyFormulaSelector').setStyle('display', 'none');-->
 <!--                                   }else if (this.selectedIndex==3){-->
-<!--                                    $('text{$.id}viewFilterDateFormulaSelector').setStyle('display', 'none');-->
-<!--                                    $('text{$.id}viewFilterDateOnlyFormulaSelector').setStyle('display', 'block');-->
-<!--                                    $('text{$.id}viewFilterTimeOnlyFormulaSelector').setStyle('display', 'none');-->
+<!--                                    $('text{$.id}viewParameterDateFormulaSelector').setStyle('display', 'none');-->
+<!--                                    $('text{$.id}viewParameterDateOnlyFormulaSelector').setStyle('display', 'block');-->
+<!--                                    $('text{$.id}viewParameterTimeOnlyFormulaSelector').setStyle('display', 'none');-->
 
 <!--                                }else if (this.selectedIndex==4){-->
-<!--                                    $('text{$.id}viewFilterDateFormulaSelector').setStyle('display', 'none');-->
-<!--                                    $('text{$.id}viewFilterDateOnlyFormulaSelector').setStyle('display', 'none');-->
-<!--                                    $('text{$.id}viewFilterTimeOnlyFormulaSelector').setStyle('display', 'block');-->
+<!--                                    $('text{$.id}viewParameterDateFormulaSelector').setStyle('display', 'none');-->
+<!--                                    $('text{$.id}viewParameterDateOnlyFormulaSelector').setStyle('display', 'none');-->
+<!--                                    $('text{$.id}viewParameterTimeOnlyFormulaSelector').setStyle('display', 'block');-->
 <!--                                }else{-->
-<!--                                    $('text{$.id}viewFilterDateFormulaSelector').setStyle('display', 'none');-->
-<!--                                    $('text{$.id}viewFilterDateOnlyFormulaSelector').setStyle('display', 'none');-->
-<!--                                    $('text{$.id}viewFilterTimeOnlyFormulaSelector').setStyle('display', 'none');-->
+<!--                                    $('text{$.id}viewParameterDateFormulaSelector').setStyle('display', 'none');-->
+<!--                                    $('text{$.id}viewParameterDateOnlyFormulaSelector').setStyle('display', 'none');-->
+<!--                                    $('text{$.id}viewParameterTimeOnlyFormulaSelector').setStyle('display', 'none');-->
 <!--                                }-->
 
 <!--                                if (this.selectedIndex==0){-->
-<!--                                    $('text{$.id}viewFilterTextFormulaSelector').setStyle('display', 'block');-->
+<!--                                    $('text{$.id}viewParameterTextFormulaSelector').setStyle('display', 'block');-->
 <!--                                }else{-->
-<!--                                    $('text{$.id}viewFilterTextFormulaSelector').setStyle('display', 'none');-->
+<!--                                    $('text{$.id}viewParameterTextFormulaSelector').setStyle('display', 'none');-->
 <!--                                }">-->
 
                             <option value="textValue" selected>文本</option>
@@ -201,9 +201,9 @@
                     <tr>
                         <td class="editTableTitle"></td>
                         <td class="editTableValue">
-                            <input type="radio" class="restrictFilterInput_vf" value="restrict" name="text{$.id}viewFilterType" onclick="if (this.checked){
+                            <input type="radio" class="restrictParameterInput_vf" value="restrict" name="text{$.id}viewFilterType" onclick="if (this.checked){
                                 debugger;
-                                $('text{$.id}viewFilterRestrict').setStyle('display', 'block');
+                                $('text{$.id}viewParameterRestrict').setStyle('display', 'block');
                                 $('text{$.id}parameterInputTr').setStyle('display', 'table-row');
                                 // $('text{$.id}parameterInputSelectTr').setStyle('display', 'table-row');
                                 $('text{$.id}viewCustomFilterRestrict').setStyle('display', 'none');
@@ -211,7 +211,7 @@
                                 $('text{$.id}pathInputSelectTr').setStyle('display', 'none');
                             }"/>作为默认过滤条件<br>
                             <input type="radio" class="customFilterInput_vf" value="custom" name="text{$.id}viewFilterType" onclick="if (this.checked){
-                                $('text{$.id}viewFilterRestrict').setStyle('display', 'none');
+                                $('text{$.id}viewParameterRestrict').setStyle('display', 'none');
                                 $('text{$.id}parameterInputTr').setStyle('display', 'none');
                                 // $('text{$.id}parameterInputSelectTr').setStyle('display', 'none');
                                 $('text{$.id}viewCustomFilterRestrict').setStyle('display', 'block');
@@ -221,32 +221,32 @@
                         </td>
                     </tr>
                 </table>
-                 <div id="text{$.id}viewFilterRestrict"  style="display: none">
+                 <div id="text{$.id}viewParameterRestrict"  style="display: none">
                     <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
                         <tr>
-                            <td class="editTableTitle" id="text{$.id}viewFilterValueTitleArea">值:</td>
+                            <td class="editTableTitle" id="text{$.id}viewParameterValueTitleArea">值:</td>
 
                             <td class="editTableValue">
-                                <input class="editTableRadio"  name="viewFilterValueType" type="radio" value="input" checked onclick="
+                                <input class="editTableRadio"  name="viewParameterValueType" type="radio" value="input" checked onclick="
                                     if (this.checked){
-                                        $('text{$.id}viewFilterValueScriptDiv').setStyle('display', 'none');
-                                        $('text{$.id}viewFilterValueArea').setStyle('display', 'table-row');
-                                        $('text{$.id}viewFilterFormulaSelector').setStyle('display', 'block');
+                                        $('text{$.id}viewParameterValueScriptDiv').setStyle('display', 'none');
+                                        $('text{$.id}viewParameterValueArea').setStyle('display', 'table-row');
+                                        $('text{$.id}viewParameterFormulaSelector').setStyle('display', 'block');
                                     }
                                 "/>输入
-                                <input class="editTableRadio" name="viewFilterValueType" type="radio" value="script" onclick="
+                                <input class="editTableRadio" name="viewParameterValueType" type="radio" value="script" onclick="
                                     if (this.checked){
-                                        $('text{$.id}viewFilterValueScriptDiv').setStyle('display', 'block');
-                                        $('text{$.id}viewFilterValueArea').setStyle('display', 'none');
-                                        $('text{$.id}viewFilterFormulaSelector').setStyle('display', 'none');
+                                        $('text{$.id}viewParameterValueScriptDiv').setStyle('display', 'block');
+                                        $('text{$.id}viewParameterValueArea').setStyle('display', 'none');
+                                        $('text{$.id}viewParameterFormulaSelector').setStyle('display', 'none');
                                     }
                                 "/>脚本
                             </td>
                         </tr>
-                        <tr id="text{$.id}viewFilterValueArea">
+                        <tr id="text{$.id}viewParameterValueArea">
                             <td class="editTableTitle"></td>
                             <td class="editTableValue">
-                                <input type="text" class="editTableInput valueTextInput_vf" style="display: block" onkeypress="$('text{$.id}viewFilterTextFormulaSelector').getElements('input').set('checked', false)"/>
+                                <input type="text" class="editTableInput valueTextInput_vf" style="display: block" onkeypress="$('text{$.id}viewParameterTextFormulaSelector').getElements('input').set('checked', false)"/>
                                 <input type="number" class="editTableInput valueNumberInput_vf" style="display: none"/>
                                 <input type="text" class="editTableInput valueDatetimeInput_vf" style="display: none" readonly/>
                                 <input type="text" class="editTableInput valueDateInput_vf" style="display: none" readonly/>
@@ -259,62 +259,62 @@
                         </tr>
 
                     </table>
-                     <div id="text{$.id}viewFilterFormulaSelector">
-                        <div style="display: none" id="text{$.id}viewFilterDateFormulaSelector">
+                     <div id="text{$.id}viewParameterFormulaSelector">
+                        <div style="display: none" id="text{$.id}viewParameterDateFormulaSelector">
                             <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
                                 <tr>
                                     <td class="editTableTitle"></td>
                                     <td class="editTableValue">
-                                        <input onclick="$('text{$.id}viewFilterValueArea').getElement('.valueDatetimeInput_vf').set('value', this.value)" name="text{$.id}viewFilterDateFormula" type="radio" value="@year" />当前年度
-                                        <input onclick="$('text{$.id}viewFilterValueArea').getElement('.valueDatetimeInput_vf').set('value', this.value)" name="text{$.id}viewFilterDateFormula" type="radio" value="@season" />当前季度
-                                        <input onclick="$('text{$.id}viewFilterValueArea').getElement('.valueDatetimeInput_vf').set('value', this.value)" name="text{$.id}viewFilterDateFormula" type="radio" value="@month" />当前月份<br/>
-                                        <input onclick="$('text{$.id}viewFilterValueArea').getElement('.valueDatetimeInput_vf').set('value', this.value)" name="text{$.id}viewFilterDateFormula" type="radio" value="@time" />当前时间
-                                        <input onclick="$('text{$.id}viewFilterValueArea').getElement('.valueDatetimeInput_vf').set('value', this.value)" name="text{$.id}viewFilterDateFormula" type="radio" value="@date" />当天
+                                        <input onclick="$('text{$.id}viewParameterValueArea').getElement('.valueDatetimeInput_vf').set('value', this.value)" name="text{$.id}viewParameterDateFormula" type="radio" value="@year" />当前年度
+                                        <input onclick="$('text{$.id}viewParameterValueArea').getElement('.valueDatetimeInput_vf').set('value', this.value)" name="text{$.id}viewParameterDateFormula" type="radio" value="@season" />当前季度
+                                        <input onclick="$('text{$.id}viewParameterValueArea').getElement('.valueDatetimeInput_vf').set('value', this.value)" name="text{$.id}viewParameterDateFormula" type="radio" value="@month" />当前月份<br/>
+                                        <input onclick="$('text{$.id}viewParameterValueArea').getElement('.valueDatetimeInput_vf').set('value', this.value)" name="text{$.id}viewParameterDateFormula" type="radio" value="@time" />当前时间
+                                        <input onclick="$('text{$.id}viewParameterValueArea').getElement('.valueDatetimeInput_vf').set('value', this.value)" name="text{$.id}viewParameterDateFormula" type="radio" value="@date" />当天
 
                                     </td>
                                 </tr>
                             </table>
                         </div>
-                        <div style="display: none" id="text{$.id}viewFilterDateOnlyFormulaSelector">
+                        <div style="display: none" id="text{$.id}viewParameterDateOnlyFormulaSelector">
                             <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
                                 <tr>
                                     <td class="editTableTitle"></td>
                                     <td class="editTableValue">
-                                        <input onclick="$('text{$.id}viewFilterValueArea').getElement('.valueDateInput_vf').set('value', this.value)" name="text{$.id}viewFilterDateFormula" type="radio" value="@year" />当前年度
-                                        <input onclick="$('text{$.id}viewFilterValueArea').getElement('.valueDateInput_vf').set('value', this.value)" name="text{$.id}viewFilterDateFormula" type="radio" value="@season" />当前季度
-                                        <input onclick="$('text{$.id}viewFilterValueArea').getElement('.valueDateInput_vf').set('value', this.value)" name="text{$.id}viewFilterDateFormula" type="radio" value="@month" />当前月份<br/>
-                                        <input onclick="$('text{$.id}viewFilterValueArea').getElement('.valueDateInput_vf').set('value', this.value)" name="text{$.id}viewFilterDateFormula" type="radio" value="@date" />当天
+                                        <input onclick="$('text{$.id}viewParameterValueArea').getElement('.valueDateInput_vf').set('value', this.value)" name="text{$.id}viewParameterDateFormula" type="radio" value="@year" />当前年度
+                                        <input onclick="$('text{$.id}viewParameterValueArea').getElement('.valueDateInput_vf').set('value', this.value)" name="text{$.id}viewParameterDateFormula" type="radio" value="@season" />当前季度
+                                        <input onclick="$('text{$.id}viewParameterValueArea').getElement('.valueDateInput_vf').set('value', this.value)" name="text{$.id}viewParameterDateFormula" type="radio" value="@month" />当前月份<br/>
+                                        <input onclick="$('text{$.id}viewParameterValueArea').getElement('.valueDateInput_vf').set('value', this.value)" name="text{$.id}viewParameterDateFormula" type="radio" value="@date" />当天
 
                                     </td>
                                 </tr>
                             </table>
                         </div>
-                        <div style="display: none" id="text{$.id}viewFilterTimeOnlyFormulaSelector">
+                        <div style="display: none" id="text{$.id}viewParameterTimeOnlyFormulaSelector">
                             <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
                                 <tr>
                                     <td class="editTableTitle"></td>
                                     <td class="editTableValue">
-                                        <input onclick="$('text{$.id}viewFilterValueArea').getElement('.valueTimeInput_vf').set('value', this.value)" name="text{$.id}viewFilterDateFormula" type="radio" value="@time" />当前时间
+                                        <input onclick="$('text{$.id}viewParameterValueArea').getElement('.valueTimeInput_vf').set('value', this.value)" name="text{$.id}viewParameterDateFormula" type="radio" value="@time" />当前时间
                                     </td>
                                 </tr>
                             </table>
                         </div>
-                        <div style="display: block" id="text{$.id}viewFilterTextFormulaSelector">
+                        <div style="display: block" id="text{$.id}viewParameterTextFormulaSelector">
                             <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
                                 <tr>
                                     <td class="editTableTitle"></td>
                                     <td class="editTableValue">
-                                        <input onclick="$('text{$.id}viewFilterValueArea').getElement('.valueTextInput_vf').set('value', this.value)" name="text{$.id}viewFilterTextFormula" onclick="" type="radio" value="@person" />当前人
-                                        <input onclick="$('text{$.id}viewFilterValueArea').getElement('.valueTextInput_vf').set('value', this.value)" name="text{$.id}viewFilterTextFormula" type="radio" value="@identityList" />当前身份<br/>
-                                        <input onclick="$('text{$.id}viewFilterValueArea').getElement('.valueTextInput_vf').set('value', this.value)" name="text{$.id}viewFilterTextFormula" type="radio" value="@unitList" />当前人所在直接组织<br/>
-                                        <input onclick="$('text{$.id}viewFilterValueArea').getElement('.valueTextInput_vf').set('value', this.value)" name="text{$.id}viewFilterTextFormula" type="radio" value="@unitAllList" />当前人所在所有组织
+                                        <input onclick="$('text{$.id}viewParameterValueArea').getElement('.valueTextInput_vf').set('value', this.value)" name="text{$.id}viewParameterTextFormula" onclick="" type="radio" value="@person" />当前人
+                                        <input onclick="$('text{$.id}viewParameterValueArea').getElement('.valueTextInput_vf').set('value', this.value)" name="text{$.id}viewParameterTextFormula" type="radio" value="@identityList" />当前身份<br/>
+                                        <input onclick="$('text{$.id}viewParameterValueArea').getElement('.valueTextInput_vf').set('value', this.value)" name="text{$.id}viewParameterTextFormula" type="radio" value="@unitList" />当前人所在直接组织<br/>
+                                        <input onclick="$('text{$.id}viewParameterValueArea').getElement('.valueTextInput_vf').set('value', this.value)" name="text{$.id}viewParameterTextFormula" type="radio" value="@unitAllList" />当前人所在所有组织
                                     </td>
                                 </tr>
                             </table>
                         </div>
                      </div>
-                     <div style="display:none" id="text{$.id}viewFilterValueScriptDiv">
-                         <div name="text{$.id}viewFilterValueScript" title="脚本"></div>
+                     <div style="display:none" id="text{$.id}viewParameterValueScriptDiv">
+                         <div name="text{$.id}viewParameterValueScript" title="脚本"></div>
                      </div>
                 </div>
 
@@ -343,9 +343,9 @@
             </div>
             <div class="actionAreaNode_vf"></div>
             <div style="height: 20px; line-height: 20px; text-align:center; background-color: #eeeeee">默认过滤条件</div>
-            <div class="listAreaNode_vf" style="min-height: 56px; border-bottom:1px solid #CCCCCC; overflow: hidden;"></div>
+            <div class="parameterListAreaNode_vf" style="min-height: 56px; border-bottom:1px solid #CCCCCC; overflow: hidden;"></div>
             <div style="height: 20px; line-height: 20px; text-align:center; background-color: #eeeeee">自定义过滤数据</div>
-            <div class="fieldListAreaNode_vf" style="min-height: 56px; border-bottom:1px solid #CCCCCC; overflow: hidden;"></div>
+            <div class="customFilterListAreaNode_vf" style="min-height: 56px; border-bottom:1px solid #CCCCCC; overflow: hidden;"></div>
         </div>
     </div>
 

+ 3 - 3
o2web/source/x_component_query_StatementDesigner/Property.js

@@ -58,18 +58,18 @@ MWF.xApplication.query.StatementDesigner.Property = MWF.SDProperty = new Class({
     },
     loadViewFilter: function () {
         var nodes = this.propertyContent.getElements(".MWFViewFilter");
-        var filtrData = this.view.data.data.filterList;
+        var parameterData = this.view.data.data.parameterList;
         var customData = this.view.data.data.customFilterList;
         nodes.each(function (node) {
             MWF.xDesktop.requireApp("query.StatementDesigner", "widget.ViewFilter", function () {
                 var _slef = this;
                 this.viewFilter = new MWF.xApplication.query.StatementDesigner.widget.ViewFilter(node, this.view.designer, {
-                    "filtrData": filtrData,
+                    "parameterData": parameterData,
                     "customData": customData
                 }, {
                     "onChange": function (ids) {
                         var data = this.getData();
-                        _slef.changeJsonDate(["data", "filterList"], data.data);
+                        _slef.changeJsonDate(["data", "parameterList"], data.parameterData);
                         _slef.changeJsonDate(["data", "customFilterList"], data.customData);
                     }
                 });

+ 135 - 135
o2web/source/x_component_query_StatementDesigner/widget/ViewFilter.js

@@ -50,17 +50,21 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
         }
     },
     loadData: function () {
-        if (this.filtrData.filtrData && this.filtrData.filtrData.length) {
+        if (this.filtrData.parameterData && this.filtrData.parameterData.length && this.parameterListAreaNode) {
+            this.filtrData.parameterData.each(function (data) {
+                data.type = "parameter";
+                this.items.push(new MWF.xApplication.query.StatementDesigner.widget.ViewFilter.ItemParameter(this, data));
+            }.bind(this));
+        }
+
+        if (this.filtrData.filtrData && this.filtrData.filtrData.length && this.filterListAreaNode ) {
             this.filtrData.filtrData.each(function (data) {
-                if( this.options.withForm ){
-                    this.items.push(new MWF.xApplication.query.StatementDesigner.widget.ViewFilter.ItemWithForm(this, data));
-                }else{
-                    this.items.push(new MWF.xApplication.query.StatementDesigner.widget.ViewFilter.Item(this, data));
-                }
+                data.type = "filter";
+                this.items.push(new MWF.xApplication.query.StatementDesigner.widget.ViewFilter.ItemFilter(this, data));
             }.bind(this));
         }
 
-        if (this.filtrData.customData && this.filtrData.customData.length) {
+        if (this.filtrData.customData && this.filtrData.customData.length && this.customFilterListAreaNode ) {
             this.filtrData.customData.each(function (data) {
                 data.type = "custom";
                 this.items.push(new MWF.xApplication.query.StatementDesigner.widget.ViewFilter.ItemCustom(this, data));
@@ -87,25 +91,25 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
             this.scriptArea.load(v);
         }.bind(this));
     },
-    createFilterValueScriptArea: function (node) {
+    createParameterValueScriptArea: function (node) {
         var title = node.get("title");
 
         MWF.require("MWF.widget.ScriptArea", function () {
-            this.filterValueScriptArea = new MWF.widget.ScriptArea(node, {
+            this.parameterValueScriptArea = new MWF.widget.ScriptArea(node, {
                 "title": title,
                 "isload": true,
                 "isbind": false,
                 "maxObj": this.app.formContentNode || this.app.pageContentNode,
                 "onChange": function () {
-                    this.filterValueScriptData = this.filterValueScriptArea.toJson();
+                    this.parameterValueScriptData = this.parameterValueScriptArea.toJson();
                 }.bind(this),
                 "onSave": function () {
                     //this.app.saveForm();
                 }.bind(this),
                 "style": "formula"
             });
-            var v = (this.filterValueScriptData) ? this.filterValueScriptData.code : "";
-            this.filterValueScriptArea.load(v);
+            var v = (this.parameterValueScriptData) ? this.parameterValueScriptData.code : "";
+            this.parameterValueScriptArea.load(v);
         }.bind(this));
     },
     createCustomFilterValueScriptArea: function (node) {
@@ -134,8 +138,10 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
         this.inputAreaNode = this.node.getElement(".inputAreaNode_vf");
         this.actionAreaNode = this.node.getElement(".actionAreaNode_vf");
         this.actionAreaNode.setStyles(this.css.actionAreaNode);
-        this.listAreaNode = this.node.getElement(".listAreaNode_vf");
-        this.fieldListAreaNode = this.node.getElement(".fieldListAreaNode_vf");
+
+        this.filterListAreaNode = this.node.getElement(".filterListAreaNode_vf");
+        this.parameterListAreaNode = this.node.getElement(".parameterListAreaNode_vf");
+        this.customFilterListAreaNode = this.node.getElement(".customFilterListAreaNode_vf");
 
         this.restrictViewFilterTable = this.node.getElement(".restrictViewFilterTable_vf");
 
@@ -151,6 +157,7 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
         // this.parameterInputSelect = this.inputAreaNode.getElement(".parameterInputSelect_vf");
         this.datatypeInput = this.inputAreaNode.getElement(".datatypeInput_vf");
 
+        this.restrictParameterInput = this.inputAreaNode.getElement(".restrictParameterInput_vf");
         this.restrictFilterInput = this.inputAreaNode.getElement(".restrictFilterInput_vf");
         this.customFilterInput = this.inputAreaNode.getElement(".customFilterInput_vf");
 
@@ -171,11 +178,11 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
         if (this.app.statement && this.app.statement.view) {
             var dataId = this.app.statement.view.data.id;
 
-            this.filterValueType = this.inputAreaNode.getElements("[name='" + dataId + "viewFilterValueType']");
-            this.filterValueScriptDiv = this.inputAreaNode.getElement("#" + dataId + "viewFilterValueScriptDiv");
-            this.filterValueScript = this.inputAreaNode.getElement("[name='" + dataId + "viewFilterValueScript']");
-            if (this.filterValueScript) {
-                this.createFilterValueScriptArea(this.filterValueScript);
+            this.parameterValueType = this.inputAreaNode.getElements("[name='" + dataId + "viewParameterValueType']");
+            this.parameterValueScriptDiv = this.inputAreaNode.getElement("#" + dataId + "viewParameterValueScriptDiv");
+            this.parameterValueScript = this.inputAreaNode.getElement("[name='" + dataId + "viewParameterValueScript']");
+            if (this.parameterValueScript) {
+                this.createParameterValueScriptArea(this.parameterValueScript);
             }
 
             this.customFilterValueTypes = this.inputAreaNode.getElements("[name='" + dataId + "viewCustomFilterValueType']");
@@ -194,7 +201,7 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
                 "target": this.app.content,
                 "format": "db",
                 "onComplate": function () {
-                    this.node.getElement("#" + id + "viewFilterDateFormulaSelector").getElements("input").set("checked", false);
+                    this.node.getElement("#" + id + "viewParameterDateFormulaSelector").getElements("input").set("checked", false);
                 }.bind(this)
             });
             new MWF.widget.Calendar(this.valueDateInput, {
@@ -268,8 +275,8 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
                         case "date":
                             t = "dateTimeValue";
                             break;
-                            // t = "dateValue";
-                            // break;
+                        // t = "dateValue";
+                        // break;
                         case "time":
                             t = "timeValue";
                             break;
@@ -302,7 +309,7 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
 
         //if (this.app.statement.view){
         //    var id = this.app.view.data.id;
-        //     var div = this.node.getElement("#"+id+"viewFilterValueArea2");
+        //     var div = this.node.getElement("#"+id+"viewParameterValueArea2");
         //     // inputs = div.getElements("input");
         //     if( div ){
         //this.valueTextInput2 = div.getElement(".valueTextInput2_vf") || null;
@@ -320,7 +327,7 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
         //        "target": this.app.content,
         //        "format": "db",
         //        "onComplate": function(){
-        //            this.node.getElement("#"+id+"viewFilterDateFormulaSelector2").getElements("input").set("checked", false);
+        //            this.node.getElement("#"+id+"viewParameterDateFormulaSelector2").getElements("input").set("checked", false);
         //        }.bind(this)
         //    });
         //    new MWF.widget.Calendar(this.valueDateInput2, {
@@ -411,23 +418,23 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
             }
             var config = {
                 "textValue": {
-                    "selectorArea": "#" + id + "viewFilterTextFormulaSelector",
+                    "selectorArea": "#" + id + "viewParameterTextFormulaSelector",
                     "input": this.valueTextInput
                 },
                 "datetimeValue": {
-                    "selectorArea": "#" + id + "viewFilterDateFormulaSelector",
+                    "selectorArea": "#" + id + "viewParameterDateFormulaSelector",
                     "input": this.valueDatetimeInput
                 },
                 "dateTimeValue": {
-                    "selectorArea": "#" + id + "viewFilterDateFormulaSelector",
+                    "selectorArea": "#" + id + "viewParameterDateFormulaSelector",
                     "input": this.valueDatetimeInput
                 },
                 "dateValue": {
-                    "selectorArea": "#" + id + "viewFilterDateOnlyFormulaSelector",
+                    "selectorArea": "#" + id + "viewParameterDateOnlyFormulaSelector",
                     "input": this.valueDateInput
                 },
                 "timeValue": {
-                    "selectorArea": "#" + id + "viewFilterTimeOnlyFormulaSelector",
+                    "selectorArea": "#" + id + "viewParameterTimeOnlyFormulaSelector",
                     "input": this.valueTimeInput
                 },
                 "numberValue": {
@@ -439,10 +446,10 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
             };
 
             var formulaSelectorIdList = [
-                "#" + id + "viewFilterTextFormulaSelector",
-                "#" + id + "viewFilterDateFormulaSelector",
-                "#" + id + "viewFilterDateOnlyFormulaSelector",
-                "#" + id + "viewFilterTimeOnlyFormulaSelector"
+                "#" + id + "viewParameterTextFormulaSelector",
+                "#" + id + "viewParameterDateFormulaSelector",
+                "#" + id + "viewParameterDateOnlyFormulaSelector",
+                "#" + id + "viewParameterTimeOnlyFormulaSelector"
             ];
 
             var inputList = [
@@ -516,15 +523,19 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
     },
     modifyOrAddFilterItem: function () {
         var flag;
-        if (this.currentFilterItem) {
+        var type;
+        if (this.currentItem) {
             flag = this.modifyFilterItem();
         } else {
-            if( this.options.withForm ){
-                flag = this.addFilterItemWithForm();
-            }else if (this.restrictFilterInput.checked) {
+            if( this.restrictFilterInput && this.restrictFilterInput.checked ){ //this.options.withForm this.restrictParameterInput
                 flag = this.addFilterItem();
+                type = "filter"
+            }else if ( this.restrictParameterInput && this.restrictParameterInput.checked) {
+                flag = this.addParameterItem();
+                type = "parameter"
             } else {
                 flag = this.addCustomFilterItem();
+                type = "custom"
             }
         }
         if( flag ){
@@ -533,7 +544,7 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
                 "path": "",
                 "parameter" : "",
                 "title": "",
-                "type": this.restrictFilterInput.checked ? "restrict" : "custom",
+                "type": type,
                 "comparison": "equals",
                 "formatType": "textValue",
                 "value": "",
@@ -544,34 +555,34 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
     },
     modifyFilterItem: function () {
         var data = this.getInputData();
-        if( this.options.withForm ){
+        if( this.restrictFilterInput && this.restrictFilterInput.checked ){ //this.options.withForm
             if (this.verificationDataWithForm(data)) {
-                this.currentFilterItem.reload(data);
-                this.currentFilterItem.unSelected();
+                this.currentItem.reload(data);
+                this.currentItem.unSelected();
                 this.fireEvent("change");
                 return true;
             }
-        }else if( this.restrictFilterInput.checked ){
+        }else if( this.restrictParameterInput && this.restrictParameterInput.checked ){
             if (this.verificationData(data)) {
-                this.currentFilterItem.reload(data);
-                this.currentFilterItem.unSelected();
+                this.currentItem.reload(data);
+                this.currentItem.unSelected();
                 this.fireEvent("change");
                 return true;
             }
         }else{
             if (this.verificationDataCustom(data)) {
-                this.currentFilterItem.reload(data);
-                this.currentFilterItem.unSelected();
+                this.currentItem.reload(data);
+                this.currentItem.unSelected();
                 this.fireEvent("change");
                 return true;
             }
         }
         return false;
     },
-    addFilterItem: function () {
+    addParameterItem: function () {
         var data = this.getInputData();
         if (this.verificationData(data)) {
-            this.items.push(new MWF.xApplication.query.StatementDesigner.widget.ViewFilter.Item(this, data));
+            this.items.push(new MWF.xApplication.query.StatementDesigner.widget.ViewFilter.ItemParameter(this, data));
             this.fireEvent("change");
             return true;
         }
@@ -586,10 +597,10 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
         }
         return false;
     },
-    addFilterItemWithForm : function(){
+    addFilterItem : function(){
         var data = this.getInputData();
         if (this.verificationDataWithForm(data)) {
-            this.items.push(new MWF.xApplication.query.StatementDesigner.widget.ViewFilter.ItemWithForm(this, data));
+            this.items.push(new MWF.xApplication.query.StatementDesigner.widget.ViewFilter.ItemFilter(this, data));
             this.fireEvent("change");
             return true;
         }
@@ -746,8 +757,11 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
         var parameter = this.parameterInput ? this.parameterInput.get("value") : "";
 
         var title = this.titleInput.get("value");
-        if (this.restrictFilterInput.checked) var type = "restrict";
-        if (this.customFilterInput.checked) var type = "custom";
+
+        var type = "custom";
+        if ( this.restrictFilterInput && this.restrictFilterInput.checked) type = "filter";
+        if ( this.restrictParameterInput && this.restrictParameterInput.checked) type = "parameter";
+        if (this.customFilterInput.checked) type = "custom";
 
         // var comparison = this.comparisonInput.options[this.comparisonInput.selectedIndex].value;
         var comparison = "";
@@ -796,7 +810,7 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
                 //}
                 break;
         }
-        if (this.options.withForm ) {
+        if ( type === "filter" ) { //this.options.withForm
             return {
                 // "logic": "and",
                 "path": path,
@@ -808,8 +822,8 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
                 "otherValue": value2,
                 "code": this.scriptData
             };
-        }else if (type === "restrict") {
-            this.filterValueType.each(function (radio) {
+        }else if (type === "parameter") {
+            this.parameterValueType.each(function (radio) {
                 if (radio.get("checked")) valueType = radio.get("value");
             });
             return {
@@ -823,7 +837,7 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
                 //"otherValue": value2,
                 "code": this.scriptData,
                 "valueType": valueType,
-                "valueScript": this.filterValueScriptData
+                "valueScript": this.parameterValueScriptData
             };
         } else {
             var valueType = "";
@@ -894,9 +908,7 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
         } catch (e) {
         }
 
-        if( this.options.withForm ){
-            this.switchInputDisplay();
-        }else{
+        if (data.type === "parameter"){
             switch (data.formatType) {
                 case "textValue":
                     this.valueTextInput.set("value", data.value);
@@ -933,66 +945,52 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
                             break;
                         }
                     }
-                    //if (this.valueBooleanInput2){
-                    //    for (var i=0; i<this.valueBooleanInput2.options.length; i++){
-                    //        var v = this.valueBooleanInput2.options[i].value;
-                    //        if (v=="true"){
-                    //            v = true;
-                    //        }else{
-                    //            v = false;
-                    //        }
-                    //        if (v===data.otherValue){
-                    //            this.valueBooleanInput2.options[i].set("selected", true);
-                    //            break;
-                    //        }
-                    //    }
-                    //}
                     break;
             }
+        }
 
-            if (data.type === "custom") {
-                this.customFilterValueTypes.each(function (radio) {
-                    if (data.valueType) {
-                        if (data.valueType === radio.get("value")) radio.set("checked", true);
-                    } else {
-                        if ("input" === radio.get("value")) radio.set("checked", true);
-                    }
-                });
-                if (this.customFilterValueScriptArea) {
-                    if (!data.valueType || data.valueType === "input") {
-                        this.customFilterValueScriptDiv.hide();
-                        this.customFilterValueScriptData = "";
-                        this.customFilterValueScriptArea.editor.setValue("");
-                    } else {
-                        this.customFilterValueScriptDiv.show();
-                        this.customFilterValueScriptData = data.valueScript;
-                        this.customFilterValueScriptArea.editor.setValue(data.valueScript ? data.valueScript.code : "");
-                    }
+        if (data.type === "custom") {
+            this.customFilterValueTypes.each(function (radio) {
+                if (data.valueType) {
+                    if (data.valueType === radio.get("value")) radio.set("checked", true);
+                } else {
+                    if ("input" === radio.get("value")) radio.set("checked", true);
+                }
+            });
+            if (this.customFilterValueScriptArea) {
+                if (!data.valueType || data.valueType === "input") {
+                    this.customFilterValueScriptDiv.hide();
+                    this.customFilterValueScriptData = "";
+                    this.customFilterValueScriptArea.editor.setValue("");
+                } else {
+                    this.customFilterValueScriptDiv.show();
+                    this.customFilterValueScriptData = data.valueScript;
+                    this.customFilterValueScriptArea.editor.setValue(data.valueScript ? data.valueScript.code : "");
                 }
             }
+        }
 
-            if (data.type === "restrict") {
-                this.filterValueType.each(function (radio) {
-                    if (data.valueType) {
-                        if (data.valueType === radio.get("value")) radio.set("checked", true);
-                    } else {
-                        if ("input" === radio.get("value")) radio.set("checked", true);
-                    }
-                });
-                if (this.filterValueScriptArea) {
-                    if (!data.valueType || data.valueType === "input") {
-                        this.filterValueScriptDiv.hide();
-                        this.filterValueScriptData = "";
-                        this.filterValueScriptArea.editor.setValue("");
-                    } else {
-                        this.filterValueScriptDiv.show();
-                        this.filterValueScriptData = data.valueScript;
-                        this.filterValueScriptArea.editor.setValue(data.valueScript ? data.valueScript.code : "");
-                    }
+        if (data.type === "parameter") {
+            this.parameterValueType.each(function (radio) {
+                if (data.valueType) {
+                    if (data.valueType === radio.get("value")) radio.set("checked", true);
+                } else {
+                    if ("input" === radio.get("value")) radio.set("checked", true);
+                }
+            });
+            if (this.parameterValueScriptArea) {
+                if (!data.valueType || data.valueType === "input") {
+                    this.parameterValueScriptDiv.hide();
+                    this.parameterValueScriptData = "";
+                    this.parameterValueScriptArea.editor.setValue("");
+                } else {
+                    this.parameterValueScriptDiv.show();
+                    this.parameterValueScriptData = data.valueScript;
+                    this.parameterValueScriptArea.editor.setValue(data.valueScript ? data.valueScript.code : "");
                 }
             }
-            this.switchInputDisplay();
         }
+        this.switchInputDisplay();
 
         if (this.datatypeInput.onchange) {
             this.datatypeInput.onchange();
@@ -1000,32 +998,35 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter = new Class({
     },
 
     deleteItem: function (item) {
-        if (this.currentFilterItem == item) item.unSelected();
+        if (this.currentItem == item) item.unSelected();
         this.items.erase(item);
         item.node.destroy();
         MWF.release(item);
         this.fireEvent("change");
     },
     getData: function () {
-        var data = [];
+        var parameterData = [];
         var customData = [];
+        var filterData = [];
         this.items.each(function (item) {
             if (item.data.type === "custom") {
                 customData.push(item.data);
+            }else if (item.data.type === "filter") {
+                filterData.push(item.data);
             } else {
-                data.push(item.data);
+                parameterData.push(item.data);
             }
         }.bind(this));
-        return {"data": data, "customData": customData};
+        return {"parameterData": parameterData, "customData": customData, "filterData" : filterData };
     }
 });
 
-MWF.xApplication.query.StatementDesigner.widget.ViewFilter.Item = new Class({
+MWF.xApplication.query.StatementDesigner.widget.ViewFilter.ItemParameter = new Class({
     Implements: [Events],
     initialize: function (filter, data) {
         this.filter = filter;
         this.data = data;
-        this.container = this.filter.listAreaNode;
+        this.container = this.filter.parameterListAreaNode;
         this.css = this.filter.css;
         this.app = this.filter.app;
         this.load();
@@ -1062,17 +1063,16 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter.Item = new Class({
             this.filter.verificationNode = null;
             this.filter.parameterInput.setStyle("background-color", "#FFF");
         }
-        this.filter.restrictFilterInput.set("checked", true);
-        this.filter.restrictFilterInput.click();
-        if (this.filter.currentFilterItem) this.filter.currentFilterItem.unSelected();
+        this.filter.restrictParameterInput.set("checked", true);
+        this.filter.restrictParameterInput.click();
+        if (this.filter.currentItem) this.filter.currentItem.unSelected();
         this.node.setStyles(this.css.itemNode_current);
-        this.filter.currentFilterItem = this;
+        this.filter.currentItem = this;
         this.filter.setData(this.data);
     },
     unSelected: function () {
         this.node.setStyles(this.css.itemNode);
-        this.filter.currentFilterItem = null;
-        this.filter.currentItem = this;
+        this.filter.currentItem = null;
     },
     deleteItem: function (e) {
         var _self = this;
@@ -1089,11 +1089,11 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter.Item = new Class({
 });
 
 MWF.xApplication.query.StatementDesigner.widget.ViewFilter.ItemCustom = new Class({
-    Extends: MWF.xApplication.query.StatementDesigner.widget.ViewFilter.Item,
+    Extends: MWF.xApplication.query.StatementDesigner.widget.ViewFilter.ItemParameter,
     initialize: function (filter, data) {
         this.filter = filter;
         this.data = data;
-        this.container = this.filter.fieldListAreaNode;
+        this.container = this.filter.customFilterListAreaNode;
         this.css = this.filter.css;
         this.app = this.filter.app;
         this.load();
@@ -1104,11 +1104,11 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter.ItemCustom = new Clas
             this.filter.verificationNode = null;
             this.filter.pathInput.setStyle("background-color", "#FFF");
         }
-         this.filter.customFilterInput.set("checked", true);
-         this.filter.customFilterInput.click();
-        if (this.filter.currentFilterItem) this.filter.currentFilterItem.unSelected();
+        this.filter.customFilterInput.set("checked", true);
+        this.filter.customFilterInput.click();
+        if (this.filter.currentItem) this.filter.currentItem.unSelected();
         this.node.setStyles(this.css.itemNode_current);
-        this.filter.currentFilterItem = this;
+        this.filter.currentItem = this;
         this.filter.setData(this.data);
     },
     getText: function () {
@@ -1117,12 +1117,12 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter.ItemCustom = new Clas
     },
 });
 
-MWF.xApplication.query.StatementDesigner.widget.ViewFilter.ItemWithForm = new Class({
-    Extends: MWF.xApplication.query.StatementDesigner.widget.ViewFilter.Item,
+MWF.xApplication.query.StatementDesigner.widget.ViewFilter.ItemFilter = new Class({
+    Extends: MWF.xApplication.query.StatementDesigner.widget.ViewFilter.ItemParameter,
     initialize: function (filter, data) {
         this.filter = filter;
         this.data = data;
-        this.container = this.filter.listAreaNode;
+        this.container = this.filter.filterListAreaNode;
         this.css = this.filter.css;
         this.app = this.filter.app;
         this.load();
@@ -1133,11 +1133,11 @@ MWF.xApplication.query.StatementDesigner.widget.ViewFilter.ItemWithForm = new Cl
             this.filter.verificationNode = null;
             this.filter.pathInput.setStyle("background-color", "#FFF");
         }
-        // this.filter.customFilterInput.set("checked", true);
-        // this.filter.customFilterInput.click();
-        if (this.filter.currentFilterItem) this.filter.currentFilterItem.unSelected();
+        this.filter.restrictFilterInput.set("checked", true);
+        this.filter.restrictFilterInput.click();
+        if (this.filter.currentItem) this.filter.currentItem.unSelected();
         this.node.setStyles(this.css.itemNode_current);
-        this.filter.currentFilterItem = this;
+        this.filter.currentItem = this;
         this.filter.setData(this.data);
     },
     getText: function () {