Browse Source

Merge branch 'fix/Query.statement_execption' into 'wrdp'

Merge of fix/Query.statement_execption 修复查询视图出错的问题 to wrdp

See merge request o2oa/o2oa!2001
蔡祥熠 5 years ago
parent
commit
1dda150fd9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      o2web/source/x_component_query_StatementDesigner/Statement.js

+ 2 - 1
o2web/source/x_component_query_StatementDesigner/Statement.js

@@ -939,7 +939,7 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
         }
 
         if (typeOf(this.viewJson) === "object") {
-            if(!this.viewJson.group)this.viewJson.group = {};
+            if(this.viewJson.data && !this.viewJson.data.group)this.viewJson.data.group = {};
             if(!this.viewJson.pageSize)this.viewJson.pageSize = "20";
             this.data.view = JSON.stringify(this.viewJson);
         }
@@ -970,6 +970,7 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({
         }
 
         if (typeOf(this.viewJson) === "object") {
+            if(this.viewJson.data && !this.viewJson.data.group)this.viewJson.data.group = {};
             if( !this.viewJson.pageSize )this.viewJson.pageSize = "20";
             this.data.view = JSON.stringify(this.viewJson);
         }