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

[流程管理]修复移动端子表单不能打开的问题

unknown 5 лет назад
Родитель
Сommit
8cb9803309

+ 10 - 7
o2web/source/x_component_process_Xform/Subform.js

@@ -121,6 +121,8 @@ MWF.xApplication.process.Xform.Subform = MWF.APPSubform =  new Class({
         this.form.checkSubformLoaded();
     },
     getSubform: function(callback){
+        var method = (this.form.json.mode !== "Mobile" && !layout.mobile) ? "getForm": "getFormMobile";
+
         if (this.json.subformType==="script"){
             if (this.json.subformScript.code){
                 var data = this.form.Macro.exec(this.json.subformScript.code, this);
@@ -134,7 +136,7 @@ MWF.xApplication.process.Xform.Subform = MWF.APPSubform =  new Class({
                     }
                     if( formName ){
                         if( !app )app = (this.form.businessData.work || this.form.businessData.workCompleted).application;
-                        MWF.Actions.get("x_processplatform_assemble_surface").getForm(formName, app, function(json){
+                        MWF.Actions.get("x_processplatform_assemble_surface")[method](formName, app, function(json){
                             this.getSubformData(json.data);
                             if (callback) callback();
                         }.bind(this));
@@ -153,7 +155,7 @@ MWF.xApplication.process.Xform.Subform = MWF.APPSubform =  new Class({
                 }else{
                     app = (this.form.businessData.work || this.form.businessData.workCompleted).application;
                 }
-                MWF.Actions.get("x_processplatform_assemble_surface").getForm(this.json.subformSelected, app, function(json){
+                MWF.Actions.get("x_processplatform_assemble_surface")[method](this.json.subformSelected, app, function(json){
                     this.getSubformData(json.data);
                     if (callback) callback();
                 }.bind(this));
@@ -165,11 +167,12 @@ MWF.xApplication.process.Xform.Subform = MWF.APPSubform =  new Class({
     getSubformData: function(data){
         if( !data || typeOf(data)!=="object" )return;
         var subformDataStr = null;
-        if ( this.form.json.mode !== "Mobile" && !layout.mobile){
-            subformDataStr = data.data;
-        }else{
-            subformDataStr = data.mobileData;
-        }
+        // if ( this.form.json.mode !== "Mobile" && !layout.mobile){
+        //     subformDataStr = data.data;
+        // }else{
+        //     subformDataStr = data.mobileData;
+        // }
+        subformDataStr = data.data;
         this.subformData = null;
         if (subformDataStr){
             this.subformData = JSON.decode(MWF.decodeJsonString(subformDataStr));

+ 10 - 7
o2web/source/x_component_process_Xform/Subpage.js

@@ -123,12 +123,14 @@ MWF.xApplication.process.Xform.Subpage = MWF.APPSubpage =  new Class({
         this.form.checkSubformLoaded();
     },
     getSubpage: function(callback){
+        var method = (this.form.json.mode !== "Mobile" && !layout.mobile) ? "getPageByName": "getPageByNameMobile";
+
         if (this.json.subpageType==="script"){
             if (this.json.subpageScript.code){
                 var formNome = this.form.Macro.exec(this.json.subpageScript.code, this);
                 if (formNome){
                     var app = this.form.businessData.pageInfor.portal;
-                    o2.Actions.get("x_portal_assemble_surface").getPageByName(formNome, app, function(json){
+                    o2.Actions.get("x_portal_assemble_surface")[method](formNome, app, function(json){
                         this.getSubpageData(json.data);
                         if (callback) callback();
                     }.bind(this));
@@ -139,7 +141,7 @@ MWF.xApplication.process.Xform.Subpage = MWF.APPSubpage =  new Class({
         }else{
             if (this.json.subpageSelected && this.json.subpageSelected!=="none"){
                 var app = this.form.businessData.pageInfor.portal;
-                o2.Actions.get("x_portal_assemble_surface").getPageByName(this.json.subpageSelected, app, function(json){
+                o2.Actions.get("x_portal_assemble_surface")[method](this.json.subpageSelected, app, function(json){
                     this.getSubpageData(json.data);
                     if (callback) callback();
                 }.bind(this));
@@ -150,11 +152,12 @@ MWF.xApplication.process.Xform.Subpage = MWF.APPSubpage =  new Class({
     },
     getSubpageData: function(data){
         var subpageDataStr = null;
-        if (this.form.json.mode !== "Mobile" && !layout.mobile){
-            subpageDataStr = data.data;
-        }else{
-            subpageDataStr = data.mobileData;
-        }
+        // if (this.form.json.mode !== "Mobile" && !layout.mobile){
+        //     subpageDataStr = data.data;
+        // }else{
+        //     subpageDataStr = data.mobileData;
+        // }
+        subpageDataStr = data.data;
         this.subpageData = null;
         if (subpageDataStr){
             this.subpageData = JSON.decode(MWF.decodeJsonString(subpageDataStr));