Browse Source

Merge branch 'wrdp' into 'develop'

Wrdp

See merge request o2oa/o2oa!2584
蔡祥熠 5 years ago
parent
commit
4edb111a8a

+ 13 - 8
o2web/source/x_component_Selector/Identity.js

@@ -631,7 +631,7 @@ MWF.xApplication.Selector.Identity.Item = new Class({
         var style = this.selector.options.style;
         this.iconNode.setStyle("background-image", "url("+"../x_component_Selector/$Selector/"+style+"/icon/personicon.png)");
     },
-    getData: function(callback){
+    getData: function(callback, isWait){
         if( this.selector.options.resultType === "person" ){
             var isPerson = false;
             if( this.data && this.data.distinguishedName ){
@@ -641,7 +641,7 @@ MWF.xApplication.Selector.Identity.Item = new Class({
             if( isPerson ) {
                 if (callback) callback();
             }else if( this.data.woPerson ){
-                this.data == this.data.woPerson;
+                this.data = this.data.woPerson;
                 if (callback) callback();
             }else if( this.data.person ){
                 this.selector.orgAction.getPerson(function(json){
@@ -652,13 +652,14 @@ MWF.xApplication.Selector.Identity.Item = new Class({
                 if (callback) callback();
             }
         }else{
+            if (!isWait && callback) callback();
             if (!this.data.woPerson && (!this.data.personDn || !this.data.personEmployee || !this.data.personUnique)){
                 this.selector.orgAction.getPerson(function(json){
                     this.data.woPerson = json.data;
-                    if (callback) callback();
+                    if (isWait && callback) callback();
                 }.bind(this), null, this.data.person)
             }else{
-                if (callback) callback();
+                if (isWait && callback) callback();
             }
         }
     },
@@ -714,7 +715,7 @@ MWF.xApplication.Selector.Identity.SearchItem = new Class({
 
 MWF.xApplication.Selector.Identity.ItemSelected = new Class({
     Extends: MWF.xApplication.Selector.Person.ItemSelected,
-    getData: function(callback){
+    getData: function(callback, isWait){
         if( this.selector.options.resultType === "person" ){
             var isPerson = false;
             if( this.data && this.data.distinguishedName ){
@@ -735,10 +736,11 @@ MWF.xApplication.Selector.Identity.ItemSelected = new Class({
                 if (callback) callback();
             }
         }else if (!this.data.woPerson && (!this.data.personDn || !this.data.personEmployee || !this.data.personUnique) ){
+            if (!isWait && callback) callback();
             if (this.data.person){
                 this.selector.orgAction.getPerson(function(json){
                     this.data.woPerson = json.data;
-                    if (callback) callback();
+                    if (isWait && callback) callback();
                 }.bind(this), function(xhr, text, error){
                     var errorText = error;
                     if (xhr){
@@ -750,11 +752,11 @@ MWF.xApplication.Selector.Identity.ItemSelected = new Class({
                         }
                     }
                     MWF.xDesktop.notice("error", {x: "right", y:"top"}, errorText);
-                    if (callback) callback();
+                    if (isWait && callback) callback();
                 }.bind(this), this.data.person)
             }else{
                 MWF.xDesktop.notice("error", {x: "right", y:"top"}, MWF.SelectorLP.noPerson.replace(/{name}/g, this.data.name));
-                if (callback) callback();
+                if (isWait && callback) callback();
             }
         }else{
             if (callback) callback();
@@ -920,6 +922,7 @@ MWF.xApplication.Selector.Identity.ItemCategory = new Class({
             this.loadSub(function(){
                 this.loading = false;
                 if( firstLoaded ){
+                    this.selector.fireEvent("expand", [this] );
                     if( !this.selector.isFlatCategory ){
                         this.children.setStyles({"display": "block", "height": "auto"});
                         this.actionNode.setStyles(this.selector.css.selectorItemCategoryActionNode_expand);
@@ -929,10 +932,12 @@ MWF.xApplication.Selector.Identity.ItemCategory = new Class({
                 }else{
                     var display = this.children.getStyle("display");
                     if (display === "none"){
+                        this.selector.fireEvent("expand", [this] );
                         this.children.setStyles({"display": "block", "height": "auto"});
                         this.actionNode.setStyles(this.selector.css.selectorItemCategoryActionNode_expand);
                         this.isExpand = true;
                     }else{
+                        this.selector.fireEvent("collapse", [this] );
                         this.children.setStyles({"display": "none", "height": "0px"});
                         this.actionNode.setStyles(this.selector.css.selectorItemCategoryActionNode_collapse);
                         this.isExpand = false;

+ 2 - 1
o2web/source/x_component_portal_Portal/Main.js

@@ -28,6 +28,7 @@ MWF.xApplication.portal.Portal.Main = new Class({
             this.options.portalId = this.status.portalId;
             this.options.pageId = this.status.pageId;
             this.options.widgetId = this.status.widgetId;
+            this.options.parameters = this.status.parameters;
         }
     },
     loadApplication: function(callback){
@@ -246,7 +247,7 @@ MWF.xApplication.portal.Portal.Main = new Class({
         }
     },
     recordStatus: function(){
-        return {"portalId": this.options.portalId, "pageId": this.options.pageId};
+        return {"portalId": this.options.portalId, "pageId": this.options.pageId, "parameters" : this.options.parameters};
     },
     onPostClose: function(){
         if (this.appForm){

+ 2 - 1
o2web/source/x_component_portal_Portal/PortalPage.js

@@ -11,6 +11,7 @@ MWF.xApplication.portal.Portal.Main = new Class({
         if (this.status){
             this.options.portalId = this.status.portalId;
             this.options.pageId = this.status.pageId;
+            this.options.parameters = this.status.parameters;
         }
 	},
 	loadApplication: function(callback){
@@ -156,7 +157,7 @@ MWF.xApplication.portal.Portal.Main = new Class({
         }
     },
     recordStatus: function(){
-        return {"portalId": this.options.portalId, "pageId": this.options.pageId};
+        return {"portalId": this.options.portalId, "pageId": this.options.pageId, "parameters" : this.options.parameters};
     },
     onPostClose: function(){
         if (this.appForm){

+ 28 - 9
o2web/source/x_component_process_Xform/DatagridPC.js

@@ -8,7 +8,7 @@
 	  "data": [ //数据网格条目
 		{
 		  "datagrid_datagrid$Title": { //数据网格第1列title标识
-			"org_20": [{  //数据网格第1列字段标识
+			"org_20": {  //数据网格第1列字段标识,人员组件单个对象,存的是对象
 			  "distinguishedName": "张三@bf007525-99a3-4178-a474-32865bdddec8@I",
 			  "id": "bf007525-99a3-4178-a474-32865bdddec8",
 			  "name": "张三",
@@ -16,16 +16,35 @@
 			  "unit": "9e6ce205-86f6-4d84-96e1-83147567aa8d",
 			  "unitLevelName": "兰德纵横/市场营销部",
 			  "unitName": "市场营销部"
+			}
+		  },
+		  "datagrid_datagrid$Title1": { //数据网格第2列title标识
+			"org_21": [{  //数据网格第2列字段标识,人员组件多个对象,存的是数组
+			  "distinguishedName": "张三@bf007525-99a3-4178-a474-32865bdddec8@I",
+			  "id": "bf007525-99a3-4178-a474-32865bdddec8",
+			  "name": "张三",
+			  "person": "0c828550-d8ab-479e-9880-09a59332f1ed",
+			  "unit": "9e6ce205-86f6-4d84-96e1-83147567aa8d",
+			  "unitLevelName": "兰德纵横/市场营销部",
+			  "unitName": "市场营销部"
+			},{
+			  "distinguishedName": "李四@bf007525-99a3-4178-a474-32865bdddec8@I",
+			  "id": "bf007525-99a3-4178-a474-32865bdddec8",
+			  "name": "李四",
+			  "person": "0c828550-d8ab-479e-9880-09a59332f1ed",
+			  "unit": "9e6ce205-86f6-4d84-96e1-83147567aa8d",
+			  "unitLevelName": "兰德纵横/市场营销部",
+			  "unitName": "市场营销部"
 			}]
 		  },
-		  "datagrid_datagrid$Title_1": { //数据网格第2列title标识
-			"number": "111" //数据网格第2列字段标识和值
+		  "datagrid_datagrid$Title_2": { //数据网格第2列title标识
+			"number": "111" //数据网格第3列字段标识和值
 		  },
-		  "datagrid_datagrid$Title_2": { //数据网格第3列title标识
-			"textfield_2": "杭州" //数据网格第3列字段标识和值
+		  "datagrid_datagrid$Title_3": { //数据网格第3列title标识
+			"textfield_2": "杭州" //数据网格第4列字段标识和值
 		  },
-		  "datagrid_datagrid$Title_3": { //数据网格第4列title标识
-			"attachment_1": [  //数据网格第4列字段标识
+		  "datagrid_datagrid$Title_4": { //数据网格第4列title标识
+			"attachment_1": [  //数据网格第5列字段标识
 			  {
 				"activityName": "拟稿",
 				"extension": "jpg",
@@ -41,8 +60,8 @@
 		...
 	  ],
 	  "total": {  //统计数据,列title设置了总计
-		"datagrid_datagrid$Title_1": "333", //总计列1
-		"datagrid_datagrid$Title_2": "2" //总计列2
+		"datagrid_datagrid$Title_2": "333", //总计列2
+		"datagrid_datagrid$Title_3": "2" //总计列3
 	  }
 	}
  */