Prechádzať zdrojové kódy

数据中心查询配置增加视图

unknown 5 rokov pred
rodič
commit
69973e63b4

+ 6 - 2
o2web/source/o2_core/o2/widget/Tab.js

@@ -267,9 +267,13 @@ o2.widget.TabPage = new Class({
 			this.fireEvent("hide");
 		}
 	},
-	enableTab : function(){
+	enableTab : function( notShow ){
 		this.disabled = false;
-		this.showTab();
+		if( notShow ){
+			this.tabNode.show();
+		}else{
+			this.showTab();
+		}
 	},
 	disableTab : function( notShowSibling ){
 		this.disabled = true;

+ 157 - 22
o2web/source/x_component_query_StatementDesigner/$Statement/column.html

@@ -2,35 +2,170 @@
 	<div title="基本" class="MWFTab">
         <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
             <tr>
-                <td class="editTableTitle">名称:</td>
-                <td class="editTableValue"><input type="text" name="name" value="text{$.name}" class="editTableInput"/></td>
+                <td class="editTableTitle">列标题:</td>
+                <td class="editTableValue"><input type="text" name="displayName" value="text{$.displayName}" class="editTableInput"/></td>
             </tr>
             <tr>
-                <td class="editTableTitle">描述:</td>
-                <td class="editTableValue"><input type="text" name="description" value="text{$.description}" class="editTableInput"/></td>
+                <td class="editTableTitle">列名:</td>
+                <td class="editTableValue"><input type="text" name="column" value="text{$.column}" class="editTableInput"/></td>
             </tr>
             <tr>
-                <td class="editTableTitle">类型:</td>
-                <td class="editTableValue"><select class="type" name="column">
-                    <option value="string">string</option>
-                    <option value="integer">integer</option>
-                    <option value="long">long</option>
-                    <option value="double">double</option>
-                    <option value="boolean">boolean</option>
-                    <option value="date">date</option>
-                    <option value="time">time</option>
-                    <option value="dateTime">dateTime</option>
-                    <option value="stringList">stringList</option>
-                    <option value="integerList">integerList</option>
-                    <option value="longList">longList</option>
-                    <option value="doubleList">doubleList</option>
-                    <option value="booleanList">booleanList</option>
-                    <option value="stringLob">stringLob</option>
-                    <option value="stringMap">stringMap</option>
-                </select></td>
+                <td class="editTableTitle">默认值:</td>
+                <td class="editTableValue"><input type="text" name="defaultValue" value="text{$.defaultValue}" class="editTableInput"/></td>
             </tr>
+<!--            <tr>-->
+<!--                <td class="editTableTitle">打开文档:</td>-->
+<!--                <td class="editTableValue">-->
+<!--                    <input class="editTableRadio" name="allowOpen" text{($.allowOpen===true)?'checked':''} type="radio" value="true"-->
+<!--                           onclick="if(this.checked){ $('text{$.pid}clickCodeTr').setStyle('display', '');}"/>是-->
+<!--                    <input class="editTableRadio" name="allowOpen" text{($.allowOpen!==true)?'checked':''} type="radio" value="false"-->
+<!--                           onclick="if(this.checked){ $('text{$.pid}clickCodeTr').setStyle('display', 'none');}"/>否-->
+<!--                </td>-->
+<!--            </tr>-->
+<!--            <tr id="text{$.pid}clickCodeTr" style="display:text{($.allowOpen===true)?'':'none'}">-->
+<!--                <td class="editTableValue" colspan="2">-->
+<!--                    <div class="MWFFormulaArea" name="clickCode" title="打开文档脚本(S)"></div>-->
+<!--                </td>-->
+<!--            </tr>-->
         </table>
+
+        <div style="border-top: 1px solid #999; margin-top:10px">
+            <div style="background-color: #EEE; height:24px; line-height: 24px; text-align: center; font-weight: bold">数据</div>
+            <div class="MWFDataData" id="text{$.pid}dataDataEditor">
+                <div style="display:text{($.vtype=='process')?'block':'none'}" id="text{$.pid}dataPathSelectedProcessArea" class="text{$.vid}dataPathSelectedProcessArea">
+                    <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
+                        <tr>
+                            <td class="editTableTitle">选择数据:</td>
+                            <td class="editTableValue"><select id="text{$.pid}dataPathSelected" onchange=" var v=this.options[this.selectedIndex].value; if (v){var n = $('text{$.pid}viewColumnPathInput'); n.set('value', v); n.focus();} ">
+                                <option value="" selected>(请选择)</option>
+                                <option value="$work.title">标题</option>
+                                <option value="$work.startTime">创建时间</option>
+                                <option value="$work.startTimeMonth">创建月份</option>
+                                <option value="$work.completedTime">完成时间</option>
+                                <option value="$work.completedTimeMonth">完成月份</option>
+                                <option value="$work.creatorPerson">拟稿人</option>
+                                <option value="$work.creatorIdentity">拟稿人身份</option>
+                                <option value="$work.creatorUnit">拟稿组织</option>
+                                <option value="$work.creatorUnitLevelName">拟稿组织层级</option>
+                                <option value="$work.application">应用ID</option>
+                                <option value="$work.applicationName">应用名称</option>
+                                <option value="$work.applicationAlias">应用别名</option>
+                                <option value="$work.process">流程ID</option>
+                                <option value="$work.processName">流程名称</option>
+                                <option value="$work.processAlias">流程别名</option>
+                                <option value="$work.serial">编号</option>
+                                <option value="$work.activityType">活动类型</option>
+                                <option value="$work.activityName">活动名称</option>
+                                <option value="$work.activityArrivedTime">活动到达时间</option>
+                                <option value="$work.workId">工作ID</option>
+                                <option value="$work.workCompletedId">已完成工作ID</option>
+                                <option value="$work.job">JOB的ID(job)</option>
+                                <option value="$work.completed">是否已完成(completed)</option>
+                            </select></td>
+                        </tr>
+                    </table>
+                </div>
+                <div style="display:text{($.vtype=='cms')?'block':'none'}" id="text{$.pid}dataPathSelectedCMSArea" class="text{$.vid}dataPathSelectedCMSArea">
+                    <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
+                        <tr>
+                            <td class="editTableTitle">选择数据:</td>
+                            <td class="editTableValue"><select  id="text{$.pid}dataPathSelectedCMS" onchange="var v=this.options[this.selectedIndex].value; if (v){var n = $('text{$.pid}viewColumnPathInput'); n.set('value', v); n.focus();} ">
+                                <option value="" selected>(请选择)</option>
+                                <option value="$document.title">标题</option>
+                                <option value="$document.publishTime">发布时间</option>
+                                <option value="$document.creatorPerson">拟稿人</option>
+                                <option value="$document.creatorIdentity">拟稿人身份</option>
+                                <option value="$document.creatorUnitName">拟稿组织</option>
+                                <option value="$document.creatorTopUnitName">拟稿顶级组织</option>
+                                <option value="$document.appId">栏目ID</option>
+                                <option value="$document.appName">栏目名称</option>
+                                <option value="$document.categoryId">分类ID</option>
+                                <option value="$document.categoryName">分类名称</option>
+                                <option value="$document.categoryAlias">分类别名</option>
+                                <option value="$document.id">文档ID</option>
+                            </select></td>
+                        </tr>
+                    </table>
+                </div>
+                <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
+                    <tr>
+                        <td class="editTableTitle">数据路径:</td>
+                        <td class="editTableValue"><input onkeypress="$('text{$.pid}dataPathSelected').getElement('option').set('selected', true); $('text{$.pid}dataPathSelectedCMS').getElement('option').set('selected', true)" id="text{$.pid}viewColumnPathInput" type="text" name="path" value="text{$.path}" class="editTableInput"/></td>
+                    </tr>
+                </table>
+            </div>
+        </div>
+
+        <div style="border-top: 1px solid #999; margin-top:10px">
+<!--            <div class="MWFColumnExport" id="text{$.pid}columnExportEditor">-->
+<!--                <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">-->
+<!--                    <tr>-->
+<!--                        <td class="editTableTitle">排序:</td>-->
+<!--                        <td class="editTableValue"><select name="orderType" onchange="-->
+<!--                            var node = $(this).getParent('table').getElement('.MWFColumnExportNumberOrder');-->
+<!--                            if(this.options[this.selectedIndex].value==='none'){-->
+<!--                                node.hide();-->
+<!--                                node.getElements('input')[1].click();-->
+<!--                            }else{-->
+<!--                                node.setStyle('display','table-row');-->
+<!--                            }-->
+<!--                        ">-->
+<!--                            <option value="none" text{(($.orderType)!='asc' && ($.orderType)!='desc') ?'selected':''}>无</option>-->
+<!--                            <option value="asc" text{($.orderType)=='asc' ?'selected':''}>升序</option>-->
+<!--                            <option value="desc" text{($.orderType)=='desc' ?'selected':''}>降序</option>-->
+<!--                        </select></td>-->
+<!--                    </tr>-->
+<!--                    <tr class="MWFColumnExportNumberOrder" style="display: text{(($.orderType)!='asc' && ($.orderType)!='desc') ?'none':'table-row'}">-->
+<!--                        <td class="editTableTitle">转换成数字排序:</td>-->
+<!--                        <td class="editTableValue">-->
+<!--                            <input class="MWFWorkDataCheck" name="numberOrder" type="radio" value="true" text{($.numberOrder)===true?'checked':''}/>是-->
+<!--                            <input class="MWFWorkDataCheck" name="numberOrder" type="radio" value="false" text{($.numberOrder)!==true?'checked':''}/>否-->
+<!--                        </td>-->
+<!--                    </tr>-->
+<!--                    <tr class="MWFColumnExportGroup">-->
+<!--                        <td class="editTableTitle">分类:</td>-->
+<!--                        <td class="editTableValue">-->
+<!--                            <input class="MWFWorkDataCheck" name="groupEntry" type="radio" value="true" text{($.groupEntry)===true?'checked':''}/>是-->
+<!--                            <input class="MWFWorkDataCheck" name="groupEntry" type="radio" value="false" text{($.groupEntry)!==true?'checked':''}/>否-->
+<!--                        </td>-->
+<!--                    </tr>-->
+<!--                </table>-->
+<!--            </div>-->
+            <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
+                <tr class="MWFColumnExportHide">
+                    <td class="editTableTitle">隐藏:</td>
+                    <td class="editTableValue">
+                        <input class="MWFWorkDataCheck" name="hideColumn" type="radio" value="true" text{($.hideColumn)===true?'checked':''}/>是
+                        <input class="MWFWorkDataCheck" name="hideColumn" type="radio" value="false" text{($.hideColumn)!==true?'checked':''}/>否
+                    </td>
+                </tr>
+                <tr class="MWFColumnExportGroup">
+                    <td class="editTableTitle">组织对象:</td>
+                    <td class="editTableValue">
+                        <input class="MWFWorkDataCheck" name="isName" type="radio" value="true" text{($.isName)===true?'checked':''}/>是
+                        <input class="MWFWorkDataCheck" name="isName" type="radio" value="false" text{($.isName)!==true?'checked':''}/>否
+                    </td>
+                </tr>
+                <tr class="MWFColumnExportGroup">
+                    <td class="editTableTitle">HTML值:</td>
+                    <td class="editTableValue">
+                        <input class="MWFWorkDataCheck" name="isHtml" type="radio" value="true" text{($.isHtml)===true?'checked':''}/>是
+                        <input class="MWFWorkDataCheck" name="isHtml" type="radio" value="false" text{($.isHtml)!==true?'checked':''}/>否
+                    </td>
+                </tr>
+            </table>
+        </div>
+        <div class="MWFFormulaArea" name="code" title="显示脚本 (S)"></div>
 	</div>
+    <div title="样式" class="MWFTab">
+        <div class="MWFMaplist" name="titleStyles" title="标题单元格样式"></div>
+        <div class="MWFMaplist" name="titleProperties" title="标题单元格属性"></div>
+        <div class="MWFMaplist" name="contentStyles" title="内容单元格样式"></div>
+        <div class="MWFMaplist" name="contentProperties" title="内容单元格属性"></div>
+    </div>
+    <div title="事件"  class="MWFTab">
+        <div class="MWFEventsArea" name="events"></div>
+    </div>
 	<div title="JSON"  class="MWFTab">
 		<div class="MWFJSONArea" style="font-family: Verdana, Geneva, sans-serif; font-size:14px"></div>
 	</div>

+ 37 - 0
o2web/source/x_component_query_StatementDesigner/$Statement/column_bak.html

@@ -0,0 +1,37 @@
+<div style="background-color: #FFF; overflow: hidden">
+	<div title="基本" class="MWFTab">
+        <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
+            <tr>
+                <td class="editTableTitle">名称:</td>
+                <td class="editTableValue"><input type="text" name="name" value="text{$.name}" class="editTableInput"/></td>
+            </tr>
+            <tr>
+                <td class="editTableTitle">描述:</td>
+                <td class="editTableValue"><input type="text" name="description" value="text{$.description}" class="editTableInput"/></td>
+            </tr>
+            <tr>
+                <td class="editTableTitle">类型:</td>
+                <td class="editTableValue"><select class="type" name="column">
+                    <option value="string">string</option>
+                    <option value="integer">integer</option>
+                    <option value="long">long</option>
+                    <option value="double">double</option>
+                    <option value="boolean">boolean</option>
+                    <option value="date">date</option>
+                    <option value="time">time</option>
+                    <option value="dateTime">dateTime</option>
+                    <option value="stringList">stringList</option>
+                    <option value="integerList">integerList</option>
+                    <option value="longList">longList</option>
+                    <option value="doubleList">doubleList</option>
+                    <option value="booleanList">booleanList</option>
+                    <option value="stringLob">stringLob</option>
+                    <option value="stringMap">stringMap</option>
+                </select></td>
+            </tr>
+        </table>
+	</div>
+	<div title="JSON"  class="MWFTab">
+		<div class="MWFJSONArea" style="font-family: Verdana, Geneva, sans-serif; font-size:14px"></div>
+	</div>
+</div>

+ 1 - 1
o2web/source/x_component_query_StatementDesigner/$Statement/default/css.wcss

@@ -336,7 +336,7 @@
         "margin-right": "8px",
         "top": "-38px"
     },
-    propertyRefreshFormNode: {
+    "propertyRefreshFormNode": {
         "width": "24px",
         "height": "24px",
         "float": "right",

+ 19 - 0
o2web/source/x_component_query_StatementDesigner/$Statement/default/statement.css

@@ -1,4 +1,5 @@
 .o2_statement_statementDesignerNode {
+    height : 360px;
     overflow: hidden;
     padding: 20px;
     box-shadow: 0 0 10px #999999;
@@ -49,7 +50,19 @@
     border: 1px solid #cccccc;
     background: #ffffff;
 }
+.o2_statement_statementDesignerCountJpqlLine {
+    height: 260px;
+    margin-top: 10px;
+    border: 1px solid #cccccc;
+    background: #ffffff;
+}
 .o2_statement_statementDesignerScript {
+     height: 260px;
+     margin-top: 10px;
+     border: 1px solid #cccccc;
+     background: #ffffff;
+ }
+.o2_statement_statementDesignerCountScript {
     height: 260px;
     margin-top: 10px;
     border: 1px solid #cccccc;
@@ -103,4 +116,10 @@
     top:45%;
     margin: auto;
     cursor: pointer;
+}
+.o2_statement_tabNode{
+    height: 32px;
+}
+.o2_statement_statementJpqlTabNode{
+    height: 32px;
 }

+ 60 - 44
o2web/source/x_component_query_StatementDesigner/$Statement/statementDesigner.html

@@ -1,6 +1,6 @@
 <div class="o2_statement_statementDesignerNode">
     <div class="o2_statement_statementDesignerFormatLine">
-        <div class="o2_statement_statementDesignerFormatTitle">{{$.lp.statementFormat}}: </div>
+        <div class="o2_statement_statementDesignerFormatTitle">{{$.lp.statementFormat}} </div>
         <div class="o2_statement_statementDesignerFormatContent" style="float: left; margin-right: 20px">
             <input name="format" type="radio" value="jpql" {{if $.data.format!=='script'}} checked {{end if}}/>{{$.lp.statementJpql}}
             <input name="format" type="radio" value="script" {{if $.data.format=='script'}} checked {{end if}}/>{{$.lp.statementScript}}
@@ -56,55 +56,71 @@
 
     </div>
 
-    <div class="o2_statement_statementDesignerJpql" style="{{if $.data.format=='script'}} display: none {{end if}}">
-
-        <div class="o2_statement_statementDesignerJpqlLine">
-
-<!--            <div class="o2_statement_statementDesignerJpql_select" style="{{if $.data.type=='update' || $.data.type=='delete'}} display: none {{end if}}">-->
-<!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_select">SELECT</div>&ndash;&gt;-->
-<!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_selectContent"></div>&ndash;&gt;-->
-<!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_from">FROM</div>&ndash;&gt;-->
-<!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_fromContent"></div>&ndash;&gt;-->
-<!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_where">WHERE</div>&ndash;&gt;-->
-<!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_whereContent"></div>&ndash;&gt;-->
-<!--            </div>-->
-
-<!--            <div class="o2_statement_statementDesignerJpql_update" style="{{if $.data.type!=='update'}} display: none {{end if}}">-->
-<!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_update">UPDATE</div>&ndash;&gt;-->
-<!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_updateContent"></div>&ndash;&gt;-->
-<!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_set">SET</div>&ndash;&gt;-->
-<!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_setContent"></div>&ndash;&gt;-->
-<!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_where">WHERE</div>&ndash;&gt;-->
-<!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_whereContent"></div>&ndash;&gt;-->
-<!--            </div>-->
-
-<!--            <div class="o2_statement_statementDesignerJpql_sdelete" style="{{if $.data.type!=='delete'}} display: none {{end if}}">-->
-<!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_delete">DELETE</div>&ndash;&gt;-->
-<!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_deleteContent"></div>&ndash;&gt;-->
-<!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_where">WHERE</div>&ndash;&gt;-->
-<!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_whereContent"></div>&ndash;&gt;-->
-<!--            </div>-->
+<!--    <div class="o2_statement_statementJpqlTabNode" style="{{if $.data.type!='select'}} display: none {{end if}}"></div>-->
+    <div class="o2_statement_statementJpqlTabNode"></div>
+
+    <div class="o2_statement_statementJpqlTabPageNode">
+        <div class="o2_statement_statementDesignerJpql" style="{{if $.data.format=='script'}} display: none {{end if}}">
+
+            <div class="o2_statement_statementDesignerJpqlLine">
+
+                <!--            <div class="o2_statement_statementDesignerJpql_select" style="{{if $.data.type=='update' || $.data.type=='delete'}} display: none {{end if}}">-->
+                <!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_select">SELECT</div>&ndash;&gt;-->
+                <!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_selectContent"></div>&ndash;&gt;-->
+                <!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_from">FROM</div>&ndash;&gt;-->
+                <!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_fromContent"></div>&ndash;&gt;-->
+                <!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_where">WHERE</div>&ndash;&gt;-->
+                <!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_whereContent"></div>&ndash;&gt;-->
+                <!--            </div>-->
+
+                <!--            <div class="o2_statement_statementDesignerJpql_update" style="{{if $.data.type!=='update'}} display: none {{end if}}">-->
+                <!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_update">UPDATE</div>&ndash;&gt;-->
+                <!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_updateContent"></div>&ndash;&gt;-->
+                <!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_set">SET</div>&ndash;&gt;-->
+                <!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_setContent"></div>&ndash;&gt;-->
+                <!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_where">WHERE</div>&ndash;&gt;-->
+                <!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_whereContent"></div>&ndash;&gt;-->
+                <!--            </div>-->
+
+                <!--            <div class="o2_statement_statementDesignerJpql_sdelete" style="{{if $.data.type!=='delete'}} display: none {{end if}}">-->
+                <!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_delete">DELETE</div>&ndash;&gt;-->
+                <!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_deleteContent"></div>&ndash;&gt;-->
+                <!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_where">WHERE</div>&ndash;&gt;-->
+                <!--&lt;!&ndash;                <div class="o2_statement_statementDesignerJpql_jpql_whereContent"></div>&ndash;&gt;-->
+                <!--            </div>-->
+            </div>
+        </div>
+        <div class="o2_statement_statementDesignerScript" style="{{if $.data.format!=='script'}} display: none {{end if}}">
+
         </div>
     </div>
-    <div class="o2_statement_statementDesignerScript" style="{{if $.data.format!=='script'}} display: none {{end if}}">
 
+
+    <div class="o2_statement_statementCountJpqlTabPageNode">
+        <div class="o2_statement_statementDesignerCountJpql" style="{{if $.data.format=='script'}} display: none {{end if}}">
+            <div class="o2_statement_statementDesignerCountJpqlLine"></div>
+        </div>
+        <div class="o2_statement_statementDesignerCountScript" style="{{if $.data.format!=='script'}} display: none {{end if}}">
+        </div>
     </div>
 </div>
 
-<!--<div class="o2_statement_statementRunNode">-->
+<div class="o2_statement_tabNode"></div>
+
+<div class="o2_statement_statementRunNode">
 <!--    <div class="o2_statement_statementRunTitleNode">{{$.lp.runTest}}</div>-->
-<!--    <div class="o2_statement_statementRunContentNode">-->
-<!--        <div class="o2_statement_statementRunJsonNode">-->
-<!--&lt;!&ndash;            <div class="o2_statement_statementRunJsonContent"></div>&ndash;&gt;-->
-<!--        </div>-->
-<!--        <div class="o2_statement_statementRunActionNode">-->
-<!--            <div class="o2_statement_statementRunActionContent"></div>-->
-<!--        </div>-->
-<!--        <div class="o2_statement_statementRunResultNode">-->
-<!--&lt;!&ndash;            <div class="o2_statement_statementRunResultContent"></div>&ndash;&gt;-->
-<!--        </div>-->
-<!--    </div>-->
-
-<!--</div>-->
+    <div class="o2_statement_statementRunContentNode">
+        <div class="o2_statement_statementRunJsonNode">
+<!--            <div class="o2_statement_statementRunJsonContent"></div>-->
+        </div>
+        <div class="o2_statement_statementRunActionNode">
+            <div class="o2_statement_statementRunActionContent"></div>
+        </div>
+        <div class="o2_statement_statementRunResultNode">
+<!--            <div class="o2_statement_statementRunResultContent"></div>-->
+        </div>
+    </div>
+
+</div>
 
 <div class="o2_statement_viewNode"></div>

+ 321 - 140
o2web/source/x_component_query_StatementDesigner/Statement.js

@@ -96,6 +96,9 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
                 this.currentSelectedModule.unSelected();
             }
         }
+        if( this.view && this.view.domListNode ){
+            this.view.domListNode.hide();
+        }
 
         this.currentSelectedModule = this;
         this.isSelected = true;
@@ -122,10 +125,71 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
     hideProperty: function(){
         if (this.property) this.property.hide();
     },
+    loadJpqlTab: function(callback){
+        var _self = this;
+        MWF.require("MWF.widget.Tab", null, false);
+
+        this.jpqlTab = new MWF.widget.Tab(this.jpqlTabNode, {"style": "script"});
+        this.jpqlTab.load();
+
+        this.tabJpqlNode = Element("div");
+        this.jpqlTabPageNode.inject( this.tabJpqlNode );
+
+        this.tabCountJpqlNode = Element("div");
+        this.countJpqlTabPageNode.inject( this.tabCountJpqlNode );
+
+        this.jpqlPage = this.jpqlTab.addTab(this.tabJpqlNode, this.designer.lp.queryStatement);
+        this.countJpqlPage = this.jpqlTab.addTab(this.tabCountJpqlNode, this.designer.lp.countStatement );
+
+        this.jpqlPage.showTabIm();
+
+        // this.jpqlPage.addEvent("postShow", function(){
+        //     if( this.view ){
+        //         this.view.setContentHeight();
+        //         this.view.selected();
+        //     }
+        // }.bind(this));
+        // this.countJpqlPage.addEvent("postShow", function(){
+        //     this.selected();
+        // }.bind(this));
+    },
+    loadTab: function(callback){
+        var _self = this;
+        MWF.require("MWF.widget.Tab", null, false);
+
+        this.tab = new MWF.widget.Tab(this.tabNode, {"style": "script"});
+        this.tab.load();
+
+        this.tabRunNode = Element("div");
+        this.pageRunNode = new Element("div", {"styles": {"overflow": "auto","background-color":"#fff"}}).inject(this.tabRunNode);
+        this.runArea.inject( this.pageRunNode );
+
+        this.tabViewNode = Element("div", {"styles": { "height": "100%" }});
+        this.pageViewNode = new Element("div.pageViewNode").inject(this.tabViewNode);
+        this.viewArea.inject( this.pageViewNode );
+
+        this.runPage = this.tab.addTab(this.tabRunNode, this.designer.lp.runTest);
+        this.viewPage = this.tab.addTab(this.tabViewNode, this.designer.lp.view );
+
+        this.runPage.showTabIm();
+
+        this.viewPage.addEvent("postShow", function(){
+            if( this.view ){
+                this.view.setContentHeight();
+                this.view.selected();
+            }
+        }.bind(this));
+        this.runPage.addEvent("postShow", function(){
+            this.selected();
+        }.bind(this));
+    },
     loadStatement: function(){
         //this.statementDesignerNode = new Element("div", {"styles": this.css.statementDesignerNode}).inject(this.areaNode);
         this.loadStatementHtml(function(){
             this.designerArea = this.areaNode.getElement(".o2_statement_statementDesignerNode");
+
+            this.jpqlTabPageNode = this.areaNode.getElement(".o2_statement_statementJpqlTabPageNode");
+
             this.jpqlArea = this.areaNode.getElement(".o2_statement_statementDesignerJpql");
             this.scriptArea = this.areaNode.getElement(".o2_statement_statementDesignerScript");
 
@@ -141,6 +205,7 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
 
             this.dynamicTableContent = this.areaNode.getElement(".o2_statement_statementDesignerTableContent");
 
+            this.jpqlTabNode = this.areaNode.getElement(".o2_statement_statementJpqlTabNode");
 
             this.jpqlTypeSelect = this.areaNode.getElement(".o2_statement_statementDesignerTypeContent").getElement("select");
 
@@ -157,29 +222,39 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
             this.jpqlEditorNode = this.areaNode.getElement(".o2_statement_statementDesignerJpqlLine");
 
 
-            // this.runArea = this.areaNode.getElement(".o2_statement_statementRunNode");
-            // this.runTitleNode = this.areaNode.getElement(".o2_statement_statementRunTitleNode");
-            // this.runContentNode = this.areaNode.getElement(".o2_statement_statementRunContentNode");
-            // this.runJsonNode = this.runContentNode.getFirst();
-            // this.runActionNode = this.runJsonNode.getNext();
-            // this.runResultNode = this.runContentNode.getLast();
-            //
-            // this.setRunnerSize();
-            // this.designer.addEvent("resize", this.setRunnerSize.bind(this));
+            this.countJpqlTabPageNode = this.areaNode.getElement(".o2_statement_statementCountJpqlTabPageNode");
+            this.countJpqlArea = this.areaNode.getElement(".o2_statement_statementDesignerCountJpql");
+            this.countScriptArea = this.areaNode.getElement(".o2_statement_statementDesignerCountScript");
+            this.countJpqlEditorNode = this.areaNode.getElement(".o2_statement_statementDesignerCountJpqlLine");
+            this.loadJpqlTab();
 
-            this.viewArea = this.areaNode.getElement(".o2_statement_viewNode");
-
-            this.setViewSize();
-            this.designer.addEvent("resize", this.setViewSize.bind(this));
+            this.tabNode = this.areaNode.getElement(".o2_statement_tabNode");
 
+            this.runArea = this.areaNode.getElement(".o2_statement_statementRunNode");
+            // this.runTitleNode = this.areaNode.getElement(".o2_statement_statementRunTitleNode");
+            this.runContentNode = this.areaNode.getElement(".o2_statement_statementRunContentNode");
+            this.runJsonNode = this.runContentNode.getFirst();
+            this.runActionNode = this.runJsonNode.getNext();
+            this.runResultNode = this.runContentNode.getLast();
+            this.setRunnerSize();
+            this.designer.addEvent("resize", this.setRunnerSize.bind(this));
             if (this.json.format=="script"){
                 this.loadStatementScriptEditor();
+                this.loadStatementCountScriptEditor();
             }else{
                 this.loadStatementEditor();
+                this.loadStatementCountEditor();
             }
+            this.loadStatementRunner();
+
+            this.viewArea = this.areaNode.getElement(".o2_statement_viewNode");
+            // if( this.json.viewEnable ){
+                this.loadView();
+            // }
+
+            this.loadTab();
+
 
-            // this.loadStatementRunner();
-            this.loadView();
             this.setEvent();
         }.bind(this));
     },
@@ -199,23 +274,43 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
             }.bind(this), false);
         }
     },
-    // setRunnerSize: function(){
-    //     debugger;
-    //     var size = this.areaNode.getSize();
-    //     var designerSize = this.designerArea.getComputedSize();
-    //     var y = size.y-designerSize.totalHeight;
-    //     var mTop = this.runArea.getStyle("margin-top").toInt();
-    //     var mBottom = this.runArea.getStyle("margin-bottom").toInt();
-    //     var pTop = this.runArea.getStyle("padding-top").toInt();
-    //     var pBottom = this.runArea.getStyle("padding-bottom").toInt();
-    //     y = y-mTop-mBottom-pTop-pBottom-1;
-    //
-    //     this.runArea.setStyle("height", ""+y+"px");
-    //
-    //     var titleSize = this.runTitleNode.getComputedSize();
-    //     y = y - titleSize.totalHeight;
-    //     this.runContentNode.setStyle("height", ""+y+"px");
-    // },
+    loadStatementCountScriptEditor: function(){
+        if (! this.countScriptEditor){
+            debugger;
+            o2.require("o2.widget.ScriptArea", function(){
+                this.countScriptEditor = new o2.widget.ScriptArea(this.countScriptArea, {
+                    "isbind": false,
+                    "maxObj": this.designer.designNode,
+                    "title": this.designer.lp.scriptTitle,
+                    "onChange": function(){
+                        this.json.countScriptText = this.countScriptEditor.toJson().code;
+                    }.bind(this)
+                });
+                this.countScriptEditor.load({"code": this.json.countScriptText})
+            }.bind(this), false);
+        }
+    },
+    setRunnerSize: function(){
+        debugger;
+        var size = this.areaNode.getSize();
+        var designerSize = this.designerArea.getComputedSize();
+        var y = size.y-designerSize.totalHeight;
+        var mTop = this.runArea.getStyle("margin-top").toInt();
+        var mBottom = this.runArea.getStyle("margin-bottom").toInt();
+        var pTop = this.runArea.getStyle("padding-top").toInt();
+        var pBottom = this.runArea.getStyle("padding-bottom").toInt();
+        y = y-mTop-mBottom-pTop-pBottom-1;
+
+        var tabSize = this.tabNode.getComputedSize();
+        y = y - tabSize.totalHeight;
+
+        this.runArea.setStyle("height", ""+y+"px");
+
+        // var titleSize = this.runTitleNode.getComputedSize();
+        // y = y - titleSize.totalHeight;
+
+        this.runContentNode.setStyle("height", ""+y+"px");
+    },
     loadStatementEditor: function(){
         if (!this.editor){
             o2.require("o2.widget.JavascriptEditor", function(){
@@ -252,6 +347,33 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
             }.bind(this), false);
         }
 
+    },
+    loadStatementCountEditor: function(){
+        if (!this.countEditor){
+            o2.require("o2.widget.JavascriptEditor", function(){
+                this.countEditor = new o2.widget.JavascriptEditor(this.countJpqlEditorNode, {"title": "JPQL", "option": {"mode": "sql"}});
+                this.countEditor.load(function(){
+                    if (this.json.countData){
+                        this.countEditor.editor.setValue(this.json.countData);
+                    }else{
+                        var table = "table";
+                        this.countEditor.editor.setValue("SELECT count(o.id) FROM "+table+" o");
+                    }
+                    this.json.countData = this.countEditor.editor.getValue();
+
+                    this.countEditor.addEditorEvent("change", function(){
+                        debugger;
+                        this.data.countData = this.countEditor.getValue();
+                    }.bind(this));
+
+                    // this.editor.editor.on("change", function(){
+                    //     this.data.data = this.editor.getValue();
+                    //     this.checkJpqlType();
+                    // }.bind(this));
+                }.bind(this));
+            }.bind(this), false);
+        }
+
     },
     setSatementTable: function(){
         if (!this.json.type) this.json.type = "select";
@@ -304,14 +426,14 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
             if (callback) callback();
         }.bind(this));
     },
-    // loadStatementRunner: function(){
-    //     o2.require("o2.widget.JavascriptEditor", function(){
-    //         this.jsonEditor = new o2.widget.JavascriptEditor(this.runJsonNode, {"title": "JPQL", "option": {"mode": "json"}});
-    //         this.jsonEditor.load(function(){
-    //             this.jsonEditor.editor.setValue("{}");
-    //         }.bind(this));
-    //     }.bind(this), false);
-    // },
+     loadStatementRunner: function(){
+        o2.require("o2.widget.JavascriptEditor", function(){
+            this.jsonEditor = new o2.widget.JavascriptEditor(this.runJsonNode, {"title": "JPQL", "option": {"mode": "json"}});
+            this.jsonEditor.load(function(){
+                this.jsonEditor.editor.setValue("{}");
+            }.bind(this));
+        }.bind(this), false);
+    },
     setEvent: function(){
         this.designerArea.addEvent("click", function (e) {
             this.selected();
@@ -324,10 +446,18 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
                     this.scriptArea.show();
                     this.jpqlArea.hide();
                     this.loadStatementScriptEditor();
+
+                    this.countScriptArea.show();
+                    this.countJpqlArea.hide();
+                    this.loadStatementCountScriptEditor();
                 }else{
                     this.scriptArea.hide();
                     this.jpqlArea.show();
                     this.loadStatementEditor();
+
+                    this.countScriptArea.hide();
+                    this.countJpqlArea.show();
+                    this.loadStatementCountEditor();
                 }
                 this.json.format = v;
             }
@@ -411,12 +541,24 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
         //     }
         }.bind(this));
 
-        // this.runActionNode.getFirst().addEvent("click", this.runStatement.bind(this));
+        this.runActionNode.getFirst().addEvent("click", this.runStatement.bind(this));
 
         this.dynamicTableSelect.addEvent("click", this.selectTable.bind(this));
         this.jpqlTypeSelect.addEvent("change", function(){
             var t = this.jpqlTypeSelect.options[this.jpqlTypeSelect.selectedIndex].value;
-            if (t!=this.json.type) this.json.type=t;
+            if (t!=this.json.type){
+                this.json.type = t;
+            }
+            if( t!="select"){
+                this.jpqlPage.showTabIm();
+                this.countJpqlPage.disableTab();
+
+                this.runPage.showTabIm();
+                this.viewPage.disableTab();
+            }else{
+                this.countJpqlPage.enableTab( true );
+                this.viewPage.enableTab( true );
+            }
         }.bind(this));
     },
 
@@ -456,9 +598,9 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
             var o = JSON.parse(json);
             o2.Actions.get("x_query_assemble_designer").executeStatement(this.json.id, 1, 50 , o, function(json){
                 o2.require("o2.widget.JsonParse", function(){
-                    // this.runResultNode.empty();
-                    // var jsonResult = new o2.widget.JsonParse(json.data, this.runResultNode);
-                    // jsonResult.load();
+                    this.runResultNode.empty();
+                    var jsonResult = new o2.widget.JsonParse(json.data, this.runResultNode);
+                    jsonResult.load();
                 }.bind(this));
                 this.runMask.hide();
             }.bind(this), function(xhr, text, error){
@@ -523,10 +665,15 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
         }.bind(this));
     },
 
-    loadView : function(){
+    loadView : function( callback ){
+        this.setViewSize();
+        this.designer.addEvent("resize", this.setViewSize.bind(this));
+
         if( !this.data.view )this.data.view = {};
         this.view = new MWF.xApplication.query.StatementDesigner.View(this.designer, this, this.data.view, {});
-        this.view.load();
+        this.view.load( function () {
+            this.view.setContentHeight();
+        }.bind(this));
     },
     setViewSize: function(){
         debugger;
@@ -539,6 +686,9 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
         var pBottom = this.viewArea.getStyle("padding-bottom").toInt();
         y = y-mTop-mBottom-pTop-pBottom-1;
 
+        var tabSize = this.tabNode.getComputedSize();
+        y = y - tabSize.totalHeight;
+
         this.viewArea.setStyle("height", ""+y+"px");
 
         // var titleSize = this.runTitleNode.getComputedSize();
@@ -599,7 +749,7 @@ MWF.xApplication.query.StatementDesigner.View = new Class({
         //     if (this.autoSaveTimerID) window.clearInterval(this.autoSaveTimerID);
         // }.bind(this));
     },
-    load : function(){
+    load : function( callback ){
         this.setAreaNodeSize();
         this.designer.addEvent("resize", this.setAreaNodeSize.bind(this));
         this.areaNode.inject(this.node);
@@ -621,6 +771,8 @@ MWF.xApplication.query.StatementDesigner.View = new Class({
             this.setViewWidth();
 
             this.designer.addEvent("resize", this.setViewWidth.bind(this));
+
+            if(callback)callback();
         }.bind(this))
     },
     parseData: function(){
@@ -667,6 +819,7 @@ MWF.xApplication.query.StatementDesigner.View = new Class({
         }
         this.areaNode.setStyles(this.css.areaNode_selected);
         this.statement.currentSelectedModule = this;
+        this.domListNode.show();
         this.isSelected = true;
         this.showProperty();
     },
@@ -918,6 +1071,23 @@ MWF.xApplication.query.StatementDesigner.View = new Class({
         }.bind(this));
         //new Fx.Scroll(this.view.areaNode, {"wheelStops": false, "duration": 0}).toRight();
     },
+    setContentHeight: function(){
+        var size = this.areaNode.getSize();
+        var titleSize = this.viewTitleNode.getSize();
+        var actionbarSize = this.actionbarNode ? this.actionbarNode.getSize() : {x:0, y:0};
+        var pagingSize = this.pagingNode ? this.pagingNode.getSize() : {x:0, y:0};
+        var height = size.y-titleSize.y-actionbarSize.y-pagingSize.y-4;
+
+        this.viewContentScrollNode.setStyle("height", height);
+
+        var contentSize = this.viewContentBodyNode.getSize();
+        if (height<contentSize.y) height = contentSize.y+10;
+
+        this.viewContentNode.setStyle("height", height);
+        this.contentLeftNode.setStyle("height", height);
+        this.contentRightNode.setStyle("height", height);
+        //this.viewContentBodyNode.setStyle("min-height", height);
+    },
     loadViewColumns: function(){
         //    for (var i=0; i<10; i++){
         if (this.json.data.selectList) {
@@ -979,55 +1149,6 @@ MWF.xApplication.query.StatementDesigner.View = new Class({
         this.setContentHeight();
     },
 
-
-    preview: function(){
-        if( this.isNewView ){
-            this.designer.notice( this.designer.lp.saveViewNotice, "error" );
-            return;
-        }
-        this.saveSilence( function () {
-            var url = "../x_desktop/app.html?app=query.Query&status=";
-            url += JSON.stringify({
-                id : this.data.application,
-                viewId : this.data.id
-            });
-            window.open(o2.filterUrl(url),"_blank");
-        }.bind(this));
-    },
-    saveSilence: function(callback){
-        if (!this.data.name){
-            this.designer.notice(this.designer.lp.notice.inputName, "error");
-            return false;
-        }
-
-        this.designer.actions.saveView(this.data, function(json){
-            this.data.id = json.data.id;
-            this.isNewView = false;
-            //this.page.textNode.set("text", this.data.name);
-            if (this.lisNode) {
-                this.lisNode.getLast().set("text", this.data.name+"("+this.data.alias+")");
-            }
-            if (callback) callback();
-        }.bind(this));
-    },
-    save: function(callback){
-        //if (this.designer.tab.showPage==this.page){
-        if (!this.data.name){
-            this.designer.notice(this.designer.lp.notice.inputName, "error");
-            return false;
-        }
-        //}
-        this.designer.actions.saveView(this.data, function(json){
-            this.designer.notice(this.designer.lp.notice.save_success, "success", this.node, {"x": "left", "y": "bottom"});
-            this.isNewView = false;
-            this.data.id = json.data.id;
-            //this.page.textNode.set("text", this.data.name);
-            if (this.lisNode) {
-                this.lisNode.getLast().set("text", this.data.name+"("+this.data.alias+")");
-            }
-            if (callback) callback();
-        }.bind(this));
-    },
     _setEditStyle: function(name, input, oldValue){
         if( name=="data.actionbarHidden" ){
             if( this.json.data.actionbarHidden ){
@@ -1110,54 +1231,111 @@ MWF.xApplication.query.StatementDesigner.View = new Class({
         Object.each(from, function(style, key){
             if (!this.json.data.viewStyles[to][key]) this.json.data.viewStyles[to][key] = style;
         }.bind(this));
-    },
-
-    saveAs: function(){
-        var form = new MWF.xApplication.query.StatementDesigner.View.NewNameForm(this, {
-            name : this.data.name + "_" + MWF.xApplication.query.StatementDesigner.LP.copy,
-            query : this.data.query || this.data.application,
-            queryName :	this.data.queryName || this.data.applicationName
-        }, {
-            onSave : function( data, callback ){
-                this._saveAs( data, callback );
-            }.bind(this)
-        }, {
-            app: this.designer
-        });
-        form.edit()
-    },
-    _saveAs : function( data , callback){
-        var _self = this;
-
-        var d = this.cloneObject( this.data );
-
-        d.isNewView = true;
-        d.id = this.designer.actions.getUUID();
-        d.name = data.name;
-        d.alias = "";
-        d.query = data.query;
-        d.queryName = data.queryName;
-        d.application = data.query;
-        d.applicationName = data.queryName;
-        d.pid = d.id + d.id;
-
-        delete d[this.data.id+"viewFilterType"];
-        d[d.id+"viewFilterType"]="custom";
-
-        d.data.selectList.each( function( entry ){
-            entry.id = (new MWF.widget.UUID).id;
-        }.bind(this));
-
-        this.designer.actions.saveView(d, function(json){
-            this.designer.notice(this.designer.lp.notice.saveAs_success, "success", this.node, {"x": "left", "y": "bottom"});
-            if (callback) callback();
-        }.bind(this));
     }
+// preview: function(){
+    //     if( this.isNewView ){
+    //         this.designer.notice( this.designer.lp.saveViewNotice, "error" );
+    //         return;
+    //     }
+    //     this.saveSilence( function () {
+    //         var url = "../x_desktop/app.html?app=query.Query&status=";
+    //         url += JSON.stringify({
+    //             id : this.data.application,
+    //             viewId : this.data.id
+    //         });
+    //         window.open(o2.filterUrl(url),"_blank");
+    //     }.bind(this));
+    // },
+    // saveSilence: function(callback){
+    //     if (!this.data.name){
+    //         this.designer.notice(this.designer.lp.notice.inputName, "error");
+    //         return false;
+    //     }
+    //
+    //     this.designer.actions.saveView(this.data, function(json){
+    //         this.data.id = json.data.id;
+    //         this.isNewView = false;
+    //         //this.page.textNode.set("text", this.data.name);
+    //         if (this.lisNode) {
+    //             this.lisNode.getLast().set("text", this.data.name+"("+this.data.alias+")");
+    //         }
+    //         if (callback) callback();
+    //     }.bind(this));
+    // },
+    // save: function(callback){
+    //     //if (this.designer.tab.showPage==this.page){
+    //     if (!this.data.name){
+    //         this.designer.notice(this.designer.lp.notice.inputName, "error");
+    //         return false;
+    //     }
+    //     //}
+    //     this.designer.actions.saveView(this.data, function(json){
+    //         this.designer.notice(this.designer.lp.notice.save_success, "success", this.node, {"x": "left", "y": "bottom"});
+    //         this.isNewView = false;
+    //         this.data.id = json.data.id;
+    //         //this.page.textNode.set("text", this.data.name);
+    //         if (this.lisNode) {
+    //             this.lisNode.getLast().set("text", this.data.name+"("+this.data.alias+")");
+    //         }
+    //         if (callback) callback();
+    //     }.bind(this));
+    // },
+    // saveAs: function(){
+    //     var form = new MWF.xApplication.query.StatementDesigner.View.NewNameForm(this, {
+    //         name : this.data.name + "_" + MWF.xApplication.query.StatementDesigner.LP.copy,
+    //         query : this.data.query || this.data.application,
+    //         queryName :	this.data.queryName || this.data.applicationName
+    //     }, {
+    //         onSave : function( data, callback ){
+    //             this._saveAs( data, callback );
+    //         }.bind(this)
+    //     }, {
+    //         app: this.designer
+    //     });
+    //     form.edit()
+    // },
+    // _saveAs : function( data , callback){
+    //     var _self = this;
+    //
+    //     var d = this.cloneObject( this.data );
+    //
+    //     d.isNewView = true;
+    //     d.id = this.designer.actions.getUUID();
+    //     d.name = data.name;
+    //     d.alias = "";
+    //     d.query = data.query;
+    //     d.queryName = data.queryName;
+    //     d.application = data.query;
+    //     d.applicationName = data.queryName;
+    //     d.pid = d.id + d.id;
+    //
+    //     delete d[this.data.id+"viewFilterType"];
+    //     d[d.id+"viewFilterType"]="custom";
+    //
+    //     d.data.selectList.each( function( entry ){
+    //         entry.id = (new MWF.widget.UUID).id;
+    //     }.bind(this));
+    //
+    //     this.designer.actions.saveView(d, function(json){
+    //         this.designer.notice(this.designer.lp.notice.saveAs_success, "success", this.node, {"x": "left", "y": "bottom"});
+    //         if (callback) callback();
+    //     }.bind(this));
+    // }
 
 });
 
 MWF.xApplication.query.StatementDesigner.View.Column = new Class({
     Extends: MWF.xApplication.query.ViewDesigner.View.Column,
+    initialize: function(json, view, next){
+        this.propertyPath = "../x_component_query_StatementDesigner/$Statement/column.html";
+        this.view = view;
+        this.json = json;
+        this.next = next;
+        this.css = this.view.css;
+        this.content = this.view.viewTitleTrNode;
+        this.domListNode = this.view.domListNode;
+        this.load();
+    },
     selected: function(){
         if (this.view.statement.currentSelectedModule){
             if (this.view.statement.currentSelectedModule==this){
@@ -1166,6 +1344,7 @@ MWF.xApplication.query.StatementDesigner.View.Column = new Class({
                 this.view.statement.currentSelectedModule.unSelected();
             }
         }
+        this.view.domListNode.show();
         this.node.setStyles(this.css.viewTitleColumnNode_selected);
         this.listNode.setStyles(this.css.cloumnListNode_selected);
         new Fx.Scroll(this.view.areaNode, {"wheelStops": false, "duration": 100}).toElementEdge(this.node);
@@ -1221,6 +1400,7 @@ MWF.xApplication.query.StatementDesigner.View.Actionbar = new Class({
                 this.view.statement.currentSelectedModule.unSelected();
             }
         }
+        this.view.domListNode.show();
         this.node.setStyles(this.css.toolbarWarpNode_selected);
         //this.listNode.setStyles(this.css.cloumnListNode_selected);
         new Fx.Scroll(this.view.areaNode, {"wheelStops": false, "duration": 100}).toElementEdge(this.node);
@@ -1233,7 +1413,7 @@ MWF.xApplication.query.StatementDesigner.View.Actionbar = new Class({
     },
     unSelected: function(){
         this.view.statement.currentSelectedModule = null;
-        this.node.setStyles(this.css.toolbarWarpNode)
+        this.node.setStyles(this.css.toolbarWarpNode);
 
         //this.listNode.setStyles(this.css.cloumnListNode);
         this.isSelected = false;
@@ -1252,6 +1432,7 @@ MWF.xApplication.query.StatementDesigner.View.Paging = new Class({
                 this.view.statement.currentSelectedModule.unSelected();
             }
         }
+        this.view.domListNode.show();
         this.node.setStyles(this.css.pagingWarpNode_selected);
         new Fx.Scroll(this.view.areaNode, {"wheelStops": false, "duration": 100}).toElementEdge(this.node);
 

+ 2 - 0
o2web/source/x_component_query_StatementDesigner/lp/zh-cn.js

@@ -32,4 +32,6 @@ MWF.xApplication.query.StatementDesigner.LP = Object.merge( MWF.xApplication.que
     "jpqlRunSuccess": "JPQL执行成功",
     "newLineSuccess": "插入数据成功",
     "newLineJsonError": "插入数据错误,数据格式有误",
+    "queryStatement": "查询语句",
+    "countStatement": "总数语句"
 });