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

Merge branch 'fieature/Process.form_select_dict_script' into 'develop'

Merge of fieature/Process.form_select_dict_script 表单属性增加脚本和数据字典的选择 to develop

See merge request o2oa/o2oa!1490
蔡祥熠 5 лет назад
Родитель
Сommit
63b259ff63

+ 4 - 1
o2web/source/o2_core/o2/lp/zh-cn.js

@@ -3,7 +3,10 @@ o2.LP = window.LP || {
     "description": "描述",
     "description": "描述",
     "searchKey": "请输入搜索关键字",
     "searchKey": "请输入搜索关键字",
     "desktop_style": "桌面风格",
     "desktop_style": "桌面风格",
-    "flat_style": "扁平风格"
+    "flat_style": "扁平风格",
+    "cmsName" : "内容管理",
+    "processName" : "流程管理",
+    "portalName" : "门户管理"
 };
 };
 
 
 o2.LP.process = {
 o2.LP.process = {

+ 157 - 1
o2web/source/o2_core/o2/widget/O2Identity.js

@@ -100,7 +100,16 @@ o2.widget.O2Identity = new Class({
             }.bind(this)
             }.bind(this)
         });
         });
     },
     },
-    setEvent: function(){},
+    setEvent: function(){
+	    if( this.open ){
+            this.node.addEvents({
+                "click": function(ev){
+                    this.open(ev);
+                    ev.stopPropagation();
+                }.bind(this)
+            });
+        }
+    },
     getPersonData: function(){
     getPersonData: function(){
         if (!this.data.dutys){
         if (!this.data.dutys){
             var action = o2.Actions.get("x_organization_assemble_control");
             var action = o2.Actions.get("x_organization_assemble_control");
@@ -446,6 +455,17 @@ o2.widget.O2QueryView = new Class({
         }else{
         }else{
             return this.data;
             return this.data;
         }
         }
+    },
+    open : function (e) {
+        if( this.data.id && this.data.query ){
+            var appId = "query.ViewDesigner" + this.data.id;
+            if (layout.desktop.apps[appId]){
+                layout.desktop.apps[appId].setCurrent();
+            }else {
+                var options = {"id": this.data.id, "application": this.data.query, "appId": appId};
+                layout.desktop.openApplication(e, "query.ViewDesigner", options);
+            }
+        }
     }
     }
 });
 });
 o2.widget.O2QueryStat = new Class({
 o2.widget.O2QueryStat = new Class({
@@ -461,6 +481,17 @@ o2.widget.O2QueryStat = new Class({
         }else{
         }else{
             return this.data;
             return this.data;
         }
         }
+    },
+    open : function (e) {
+        if( this.data.id && this.data.query){
+            var appId = "query.StatDesigner" + this.data.id;
+            if (layout.desktop.apps[appId]){
+                layout.desktop.apps[appId].setCurrent();
+            }else {
+                var options = {"id": this.data.id,"application": this.data.query, "appId": appId};
+                layout.desktop.openApplication(e, "query.StatDesigner", options);
+            }
+        }
     }
     }
 });
 });
 o2.widget.O2QueryTable = new Class({
 o2.widget.O2QueryTable = new Class({
@@ -476,6 +507,17 @@ o2.widget.O2QueryTable = new Class({
         }else{
         }else{
             return this.data;
             return this.data;
         }
         }
+    },
+    open : function (e) {
+        if( this.data.id && this.data.query){
+            var appId = "query.TableDesigner" + this.data.id;
+            if (layout.desktop.apps[appId]){
+                layout.desktop.apps[appId].setCurrent();
+            }else {
+                var options = {"id": this.data.id,"application": this.data.query, "appId": appId};
+                layout.desktop.openApplication(e, "query.TableDesigner", options);
+            }
+        }
     }
     }
 });
 });
 o2.widget.O2FormField = new Class({
 o2.widget.O2FormField = new Class({
@@ -524,6 +566,120 @@ o2.widget.O2File = new Class({
         return this.data;
         return this.data;
     }
     }
 });
 });
+
+o2.widget.O2Script = new Class({
+    Extends: o2.widget.O2Group,
+    getPersonData: function(){
+        return this.data;
+    },
+    createInforNode: function(){
+        if( !this.data.appType )return false;
+
+        this.inforNode = new Element("div", {
+            "styles": this.style.identityInforNode
+        });
+        var nameNode = new Element("div", {
+            "text": o2.LP[this.data.appType+"Name"]
+        }).inject(this.inforNode);
+        var nameTextNode = new Element("div", {
+            "text": this.data.applicationName || this.data.appName
+        }).inject(this.inforNode);
+        this.tooltip = new mBox.Tooltip({
+            content: this.inforNode,
+            setStyles: {content: {padding: 15, lineHeight: 20}},
+            attach: this.node,
+            transition: 'flyin'
+        });
+    },
+    open : function (e) {
+        if( this.data.id && this.data.appId &&  this.data.appType){
+            var appName;
+            if( this.data.appType === "cms" ){
+                appName = "cms.ScriptDesigner";
+            }else if( this.data.appType === "portal" ){
+                appName = "portal.ScriptDesigner";
+            }else if( this.data.appType === "process" ) {
+                appName = "process.ScriptDesigner";
+            }
+            var appId = appName + this.data.id;
+            if (layout.desktop.apps[appId]){
+                layout.desktop.apps[appId].setCurrent();
+            }else {
+                var options = {"id": this.data.id, "appId": appId, "application":this.data.appId};
+                layout.desktop.openApplication(e, appName, options);
+            }
+        }
+    }
+});
+
+o2.widget.O2FormStyle = new Class({
+    Extends: o2.widget.O2Group,
+    getPersonData: function(){
+        return this.data;
+    },
+    open : function (e) {
+        if( typeOf(this.data)==="object" && this.data.id && this.data.appId && this.data.type === "script"){
+            var appName;
+            if( this.data.appType === "cms" ){
+                appName = "cms.ScriptDesigner";
+            }else{
+                appName = "process.ScriptDesigner";
+            }
+            var appId = appName + this.data.id;
+            if (layout.desktop.apps[appId]){
+                layout.desktop.apps[appId].setCurrent();
+            }else {
+                var options = {"id": this.data.id, "appId": appId, "application":this.data.appId};
+                layout.desktop.openApplication(e, appName, options);
+            }
+        }
+    }
+});
+
+o2.widget.O2Dictionary = new Class({
+    Extends: o2.widget.O2Group,
+    getPersonData: function(){
+        return this.data;
+    },
+    createInforNode: function(){
+        if( !this.data.appType )return false;
+
+        this.inforNode = new Element("div", {
+            "styles": this.style.identityInforNode
+        });
+        var nameNode = new Element("div", {
+            "text": o2.LP[this.data.appType+"Name"]
+        }).inject(this.inforNode);
+        var nameTextNode = new Element("div", {
+            "text": this.data.applicationName || this.data.appName
+        }).inject(this.inforNode);
+        this.tooltip = new mBox.Tooltip({
+            content: this.inforNode,
+            setStyles: {content: {padding: 15, lineHeight: 20}},
+            attach: this.node,
+            transition: 'flyin'
+        });
+    },
+    open : function (e) {
+        if( this.data.id && this.data.appId && this.data.appType){
+            var appName;
+            if( this.data.appType === "cms" ){
+                appName = "cms.DictionaryDesigner";
+            }else if( this.data.appType === "process" ) {
+                appName = "process.DictionaryDesigner";
+            }
+            var appId = appName + this.data.id;
+            if (layout.desktop.apps[appId]){
+                layout.desktop.apps[appId].setCurrent();
+            }else {
+                var options = {"id": this.data.id, "appId": appId, "application":this.data.appId};
+                layout.desktop.openApplication(e, appName, options);
+            }
+        }
+    }
+});
+
+
 o2.widget.O2Other = new Class({
 o2.widget.O2Other = new Class({
     Extends: o2.widget.O2Group,
     Extends: o2.widget.O2Group,
     getPersonData: function(){
     getPersonData: function(){

+ 18 - 0
o2web/source/o2_core/o2/xScript/CMSEnvironment.js

@@ -874,6 +874,24 @@ MWF.xScript.CMSEnvironment = function(ev){
         scriptAction.getScriptByName( application, name, includedScripts, function(json){
         scriptAction.getScriptByName( application, name, includedScripts, function(json){
             if (json.data){
             if (json.data){
                 includedScripts.push( key );
                 includedScripts.push( key );
+
+                //名称、别名、id
+                json.data.importedList.each( function ( flag ) {
+                    if( type === "portal" ){
+                        includedScripts.push( type + "-" + json.data.portal + "-" + flag );
+                        if( json.data.portalName )includedScripts.push( type + "-" + json.data.portalName + "-" + flag );
+                        if( json.data.portalAlias )includedScripts.push( type + "-" + json.data.portalAlias + "-" + flag );
+                    }else if( type === "cms" ){
+                        includedScripts.push( type + "-" + json.data.appId + "-" + flag );
+                        if( json.data.appName )includedScripts.push( type + "-" + json.data.appName + "-" + flag );
+                        if( json.data.appAlias )includedScripts.push( type + "-" + json.data.appAlias + "-" + flag );
+                    }else if( type === "process" ){
+                        includedScripts.push( type + "-" + json.data.application + "-" + flag );
+                        if( json.data.appName )includedScripts.push( type + "-" + json.data.appName + "-" + flag );
+                        if( json.data.appAlias )includedScripts.push( type + "-" + json.data.appAlias + "-" + flag );
+                    }
+                });
+
                 includedScripts = includedScripts.concat(json.data.importedList);
                 includedScripts = includedScripts.concat(json.data.importedList);
                 MWF.CMSMacro.exec(json.data.text, this);
                 MWF.CMSMacro.exec(json.data.text, this);
                 if (callback) callback.apply(this);
                 if (callback) callback.apply(this);

+ 18 - 0
o2web/source/o2_core/o2/xScript/Environment.js

@@ -926,7 +926,25 @@ debugger;
         scriptAction.getScriptByName( application, name, includedScripts, function(json){
         scriptAction.getScriptByName( application, name, includedScripts, function(json){
             if (json.data){
             if (json.data){
                 includedScripts.push( key );
                 includedScripts.push( key );
+
+                //名称、别名、id
+                json.data.importedList.each( function ( flag ) {
+                    if( type === "portal" ){
+                        includedScripts.push( type + "-" + json.data.portal + "-" + flag );
+                        if( json.data.portalName )includedScripts.push( type + "-" + json.data.portalName + "-" + flag );
+                        if( json.data.portalAlias )includedScripts.push( type + "-" + json.data.portalAlias + "-" + flag );
+                    }else if( type === "cms" ){
+                        includedScripts.push( type + "-" + json.data.appId + "-" + flag );
+                        if( json.data.appName )includedScripts.push( type + "-" + json.data.appName + "-" + flag );
+                        if( json.data.appAlias )includedScripts.push( type + "-" + json.data.appAlias + "-" + flag );
+                    }else if( type === "process" ){
+                        includedScripts.push( type + "-" + json.data.application + "-" + flag );
+                        if( json.data.appName )includedScripts.push( type + "-" + json.data.appName + "-" + flag );
+                        if( json.data.appAlias )includedScripts.push( type + "-" + json.data.appAlias + "-" + flag );
+                    }
+                });
                 includedScripts = includedScripts.concat(json.data.importedList);
                 includedScripts = includedScripts.concat(json.data.importedList);
+
                 MWF.Macro.exec(json.data.text, this);
                 MWF.Macro.exec(json.data.text, this);
                 if (callback) callback.apply(this);
                 if (callback) callback.apply(this);
             }else{
             }else{

+ 18 - 0
o2web/source/o2_core/o2/xScript/PageEnvironment.js

@@ -811,6 +811,24 @@ MWF.xScript.PageEnvironment = function (ev) {
         scriptAction.getScriptByName( application, name, includedScripts, function(json){
         scriptAction.getScriptByName( application, name, includedScripts, function(json){
             if (json.data){
             if (json.data){
                 includedScripts.push( key );
                 includedScripts.push( key );
+
+                //名称、别名、id
+                json.data.importedList.each( function ( flag ) {
+                    if( type === "portal" ){
+                        includedScripts.push( type + "-" + json.data.portal + "-" + flag );
+                        if( json.data.portalName )includedScripts.push( type + "-" + json.data.portalName + "-" + flag );
+                        if( json.data.portalAlias )includedScripts.push( type + "-" + json.data.portalAlias + "-" + flag );
+                    }else if( type === "cms" ){
+                        includedScripts.push( type + "-" + json.data.appId + "-" + flag );
+                        if( json.data.appName )includedScripts.push( type + "-" + json.data.appName + "-" + flag );
+                        if( json.data.appAlias )includedScripts.push( type + "-" + json.data.appAlias + "-" + flag );
+                    }else if( type === "process" ){
+                        includedScripts.push( type + "-" + json.data.application + "-" + flag );
+                        if( json.data.appName )includedScripts.push( type + "-" + json.data.appName + "-" + flag );
+                        if( json.data.appAlias )includedScripts.push( type + "-" + json.data.appAlias + "-" + flag );
+                    }
+                });
+
                 includedScripts = includedScripts.concat(json.data.importedList);
                 includedScripts = includedScripts.concat(json.data.importedList);
                 MWF.Macro.exec(json.data.text, this);
                 MWF.Macro.exec(json.data.text, this);
                 if (callback) callback.apply(this);
                 if (callback) callback.apply(this);

+ 18 - 0
o2web/source/o2_core/o2/xScript/ViewEnvironment.js

@@ -727,6 +727,24 @@ MWF.xScript.ViewEnvironment = function (ev) {
         scriptAction.getScriptByName(application, name, includedScripts, function (json) {
         scriptAction.getScriptByName(application, name, includedScripts, function (json) {
             if (json.data) {
             if (json.data) {
                 includedScripts.push(key);
                 includedScripts.push(key);
+
+                //名称、别名、id
+                json.data.importedList.each( function ( flag ) {
+                    if( type === "portal" ){
+                        includedScripts.push( type + "-" + json.data.portal + "-" + flag );
+                        if( json.data.portalName )includedScripts.push( type + "-" + json.data.portalName + "-" + flag );
+                        if( json.data.portalAlias )includedScripts.push( type + "-" + json.data.portalAlias + "-" + flag );
+                    }else if( type === "cms" ){
+                        includedScripts.push( type + "-" + json.data.appId + "-" + flag );
+                        if( json.data.appName )includedScripts.push( type + "-" + json.data.appName + "-" + flag );
+                        if( json.data.appAlias )includedScripts.push( type + "-" + json.data.appAlias + "-" + flag );
+                    }else if( type === "process" ){
+                        includedScripts.push( type + "-" + json.data.application + "-" + flag );
+                        if( json.data.appName )includedScripts.push( type + "-" + json.data.appName + "-" + flag );
+                        if( json.data.appAlias )includedScripts.push( type + "-" + json.data.appAlias + "-" + flag );
+                    }
+                });
+
                 includedScripts = includedScripts.concat(json.data.importedList);
                 includedScripts = includedScripts.concat(json.data.importedList);
                 MWF.Macro.exec(json.data.text, this);
                 MWF.Macro.exec(json.data.text, this);
                 if (callback) callback.apply(this);
                 if (callback) callback.apply(this);

+ 6 - 0
o2web/source/x_component_Selector/Dictionary.js

@@ -48,9 +48,15 @@ MWF.xApplication.Selector.Dictionary = new Class({
                 }.bind(this));
                 }.bind(this));
                 for (var application in json) {
                 for (var application in json) {
                     if (json[application].dictionaryList && json[application].dictionaryList.length) {
                     if (json[application].dictionaryList && json[application].dictionaryList.length) {
+                        json[application].dictionaryList.sort(function (a, b) {
+                            return (a.name||"").localeCompare((b.name||""));
+                        });
                         array.push(json[application]);
                         array.push(json[application]);
                     }
                     }
                 }
                 }
+                array.sort( function (a, b) {
+                    return (a.name||"").localeCompare((b.name||""));
+                });
 
 
                 if( this.options.appType.length === 1 ){
                 if( this.options.appType.length === 1 ){
                     array.each( function (data) {
                     array.each( function (data) {

+ 6 - 0
o2web/source/x_component_Selector/FormStyle.js

@@ -54,9 +54,15 @@ MWF.xApplication.Selector.FormStyle = new Class({
                         }.bind(this));
                         }.bind(this));
                         for (var application in json) {
                         for (var application in json) {
                             if (json[application].scriptList && json[application].scriptList.length) {
                             if (json[application].scriptList && json[application].scriptList.length) {
+                                json[application].scriptList.sort(function (a, b) {
+                                    return (a.name||"").localeCompare((b.name||""));
+                                });
                                 array.push(json[application]);
                                 array.push(json[application]);
                             }
                             }
                         }
                         }
+                        array.sort( function (a, b) {
+                            return (a.name||"").localeCompare((b.name||""));
+                        });
 
 
                         var category = this._newItemCategory({
                         var category = this._newItemCategory({
                             name : "自定义样式(脚本)",
                             name : "自定义样式(脚本)",

+ 7 - 1
o2web/source/x_component_Selector/Script.js

@@ -8,7 +8,7 @@ MWF.xApplication.Selector.Script = new Class({
         "title": MWF.xApplication.Selector.LP.selectScript,
         "title": MWF.xApplication.Selector.LP.selectScript,
         "values": [],
         "values": [],
         "names": [],
         "names": [],
-        "appType" : ["process","portal"],
+        "appType" : ["process","portal","cms"],
         "expand": false,
         "expand": false,
         "forceSearchInItem" : true
         "forceSearchInItem" : true
     },
     },
@@ -50,9 +50,15 @@ MWF.xApplication.Selector.Script = new Class({
                 }.bind(this));
                 }.bind(this));
                 for (var application in json) {
                 for (var application in json) {
                     if (json[application].scriptList && json[application].scriptList.length) {
                     if (json[application].scriptList && json[application].scriptList.length) {
+                        json[application].scriptList.sort(function (a, b) {
+                            return (a.name||"").localeCompare((b.name||""));
+                        });
                         array.push(json[application]);
                         array.push(json[application]);
                     }
                     }
                 }
                 }
+                array.sort( function (a, b) {
+                    return (a.name||"").localeCompare((b.name||""));
+                });
 
 
                 if( this.options.appType.length === 1 ){
                 if( this.options.appType.length === 1 ){
                     array.each( function (data) {
                     array.each( function (data) {

+ 14 - 4
o2web/source/x_component_process_FormDesigner/Module/Form/form.html

@@ -65,7 +65,16 @@
                     <div class="MWFFormSelect" name="printForm"></div>
                     <div class="MWFFormSelect" name="printForm"></div>
                 </td>
                 </td>
             </tr>
             </tr>
+            <tr>
+                <td class="editTableTitle">数据字典:</td>
+                <td class="editTableValue">
+                    <div class="MWFDictionarySelect" name="dictionaries"></div>
+                </td>
+            </tr>
         </table>
         </table>
+        <div style="height:24px; text-align: center; line-height: 24px; background-color: #EEE; border-top: 1px solid #999;font-weight:bold;">加载脚本</div>
+        <div class="MWFScriptIncluder" name="scripts"></div>
+
 
 
 		<!--<div class="MWFArraylist" name="cssLinks" title="CSS引用"></div>-->
 		<!--<div class="MWFArraylist" name="cssLinks" title="CSS引用"></div>-->
 		<!--<div class="MWFArraylist" name="scriptSrc" title="JS引用"></div>-->
 		<!--<div class="MWFArraylist" name="scriptSrc" title="JS引用"></div>-->
@@ -76,10 +85,6 @@
         <div class="MWFCssArea" name="css" title="CSS"></div>
         <div class="MWFCssArea" name="css" title="CSS"></div>
 		<!--<div class="MWFScriptArea" name="jsheader" title="JS Header"></div>-->
 		<!--<div class="MWFScriptArea" name="jsheader" title="JS Header"></div>-->
 
 
-        <div class="MWFScriptArea" name="validationOpinion" title="校验意见 (S)"></div>
-        <div class="MWFScriptArea" name="validationRoute" title="校验路由 (S)"></div>
-        <div class="MWFScriptArea" name="validationFormCustom" title="流转校验 (S)"></div>
-
 	</div>
 	</div>
 	<div title="提交" class="MWFTab">
 	<div title="提交" class="MWFTab">
 
 
@@ -201,6 +206,11 @@
             <span>(返回一个URL用于重定向)</span>
             <span>(返回一个URL用于重定向)</span>
         </div>
         </div>
 
 
+        <div style="height:24px; text-align: center; line-height: 24px; background-color: #EEE; border-top: 1px solid #999; font-weight: bold">校验</div>
+        <div class="MWFScriptArea" name="validationOpinion" title="校验意见 (S)"></div>
+        <div class="MWFScriptArea" name="validationRoute" title="校验路由 (S)"></div>
+        <div class="MWFScriptArea" name="validationFormCustom" title="流转校验 (S)"></div>
+
     </div>
     </div>
     <div title="操作"  class="MWFTab" style="overflow: hidden; display: text{($.mode=='Mobile')?'block':'none'}">
     <div title="操作"  class="MWFTab" style="overflow: hidden; display: text{($.mode=='Mobile')?'block':'none'}">
         <div class="MWFDefaultActionArea" name="defaultTools" data-target="mobileForm"></div>
         <div class="MWFDefaultActionArea" name="defaultTools" data-target="mobileForm"></div>

+ 52 - 0
o2web/source/x_component_process_FormDesigner/Property.js

@@ -85,6 +85,7 @@ MWF.xApplication.process.FormDesigner.Property = MWF.FCProperty = new Class({
                     this.loadSidebarPosition();
                     this.loadSidebarPosition();
                     this.loadViewFilter();
                     this.loadViewFilter();
                     this.loadDocumentTempleteSelect();
                     this.loadDocumentTempleteSelect();
+                    this.loadScriptIncluder();
                     //this.testRestful();
                     //this.testRestful();
 //			this.loadScriptInput();
 //			this.loadScriptInput();
                     //MWF.process.widget.EventsEditor
                     //MWF.process.widget.EventsEditor
@@ -1244,6 +1245,8 @@ debugger;
         var processFileNodes = this.propertyContent.getElements(".MWFProcessImageFileSelect");
         var processFileNodes = this.propertyContent.getElements(".MWFProcessImageFileSelect");
         var scriptNodes = this.propertyContent.getElements(".MWFScriptSelect");
         var scriptNodes = this.propertyContent.getElements(".MWFScriptSelect");
         var formStyleNodes = this.propertyContent.getElements(".MWFFormStyleSelect");
         var formStyleNodes = this.propertyContent.getElements(".MWFFormStyleSelect");
+        var dictionaryNodes = this.propertyContent.getElements(".MWFDictionarySelect");
+
 
 
         MWF.xDesktop.requireApp("process.ProcessDesigner", "widget.PersonSelector", function(){
         MWF.xDesktop.requireApp("process.ProcessDesigner", "widget.PersonSelector", function(){
             personIdentityNodes.each(function(node){
             personIdentityNodes.each(function(node){
@@ -1403,6 +1406,37 @@ debugger;
                 }
                 }
             }.bind(this));
             }.bind(this));
 
 
+            dictionaryNodes.each(function(node){
+                debugger;
+                var data = this.data[node.get("name")];
+                new MWF.xApplication.process.ProcessDesigner.widget.PersonSelector(node, this.form.designer, {
+                    "type": "Dictionary",
+                    "count": 0,
+                    "names": typeOf(data)==="array" ? data : [data],
+                    "onChange": function(ids){
+                        var d = ids[0].data;
+                        var data = [];
+                        ids.each( function (id) {
+                            var d = id.data;
+                            data.push({
+                                "type" : "dictionary",
+                                "name": d.name,
+                                "alias": d.alias,
+                                "id": d.id,
+                                "appName" : d.appName || d.applicationName,
+                                "appId": d.appId,
+                                "application": d.application,
+                                "appType" : d.appType
+                            })
+                        });
+                        var name = node.get("name");
+                        var oldValue = this.data[name];
+                        this.data[name] = data;
+                        this.changeData(name, node, oldValue);
+                    }.bind(this)
+                });
+            }.bind(this));
+
             fileNodes.each(function(node){
             fileNodes.each(function(node){
                 var d = this.data[node.get("name")];
                 var d = this.data[node.get("name")];
                 var data = d || {};
                 var data = d || {};
@@ -1446,6 +1480,24 @@ debugger;
 
 
         }.bind(this));
         }.bind(this));
     },
     },
+    loadScriptIncluder : function(){
+        var nodes = this.propertyContent.getElements(".MWFScriptIncluder");
+        if (nodes.length){
+            nodes.each(function(node){
+                var name = node.get("name");
+                MWF.xDesktop.requireApp("process.FormDesigner", "widget.ScriptIncluder", function(){
+                    var scriptIncluder = new MWF.xApplication.process.FormDesigner.widget.ScriptIncluder(node, this.designer, {
+                        "onChange": function(){
+                            var data = scriptIncluder.getData();
+                            this.data[name] = data;
+                        }.bind(this)
+                    });
+                    scriptIncluder.load(this.data[name])
+                }.bind(this));
+            }.bind(this));
+        }
+
+    },
     saveFileItem: function(node, ids){
     saveFileItem: function(node, ids){
         if (ids[0]){
         if (ids[0]){
             var file = ids[0].data;
             var file = ids[0].data;

+ 12 - 0
o2web/source/x_component_process_FormDesigner/lp/zh-cn.js

@@ -90,6 +90,18 @@ MWF.xApplication.process.FormDesigner.LP = {
             "selectDefaultTool" : "选择系统操作"
             "selectDefaultTool" : "选择系统操作"
         },
         },
         "isSave": "正在保存,请稍候...",
         "isSave": "正在保存,请稍候...",
+        "scriptIncluder" : {
+		    "yes" : "是",
+            "no" : "否",
+		    "selectScript" : "选择脚本:",
+		    "repeatAddScriptNotice" : "请不要重复添加脚本",
+		    "selectScriptNotice" : "请先选择脚本",
+            "asyncLoad" : "异步加载:",
+		    "asyncLoadScript" : "异步加载脚本:",
+            "syncLoadScript" : "同步加载脚本:",
+            "delete_title": "取消加载脚本确认",
+            "delete_text": "您确定要取消加载选择的脚本?"
+        },
         "validation": {
         "validation": {
             "validation": "校验",
             "validation": "校验",
             "anytime": "任何时候",
             "anytime": "任何时候",

+ 150 - 0
o2web/source/x_component_process_FormDesigner/widget/$ScriptIncluder/default/css.wcss

@@ -0,0 +1,150 @@
+{
+    "titleNode": {
+        "height": "24px",
+        "background-color": "#eeeeee",
+        "line-height": "24px",
+        "text-align": "center",
+        "border-top": "1px solid #999"
+    },
+    "editorNode": {
+        "border-top": "0px",
+        "overflow": "hidden"
+    },
+    "actionNode":{
+        "height": "30px",
+        "text-align": "center"
+    },
+    "listNode": {
+        "border-top": "1px solid #bbb",
+        "min-height": "60px",
+        "padding-top": "2px",
+        "overflow": "hidden"
+    },
+    "editTableTdValue": {
+        "height": "24px",
+        "line-height": "24px",
+        "border-bottom": "1px dashed #CCC"
+    },
+    "decisionNameInput": {
+        "color": "#666",
+        "width": "90%",
+        "border-top": "1px solid #AAA",
+        "border-left": "1px solid #AAA",
+        "border-bottom": "1px solid #CCC",
+        "border-right": "1px solid #CCC"
+    },
+    "valueInput":{
+        "color": "#666",
+        "width": "90%",
+        "border-top": "1px solid #AAA",
+        "border-left": "1px solid #AAA",
+        "border-bottom": "1px solid #CCC",
+        "border-right": "1px solid #CCC"
+    },
+    "promptInput": {
+        "color": "#666",
+        "width": "90%",
+        "border-top": "1px solid #AAA",
+        "border-left": "1px solid #AAA",
+        "border-bottom": "1px solid #CCC",
+        "border-right": "1px solid #CCC"
+    },
+    "valueSelect": {
+        "color": "#666",
+        "width": "auto",
+        "border-top": "1px solid #AAA",
+        "border-left": "1px solid #AAA",
+        "border-bottom": "1px solid #CCC",
+        "border-right": "1px solid #CCC"
+    },
+    "titleTd": {
+        "width": "60px",
+        "font-weight": "bold",
+        "font-size": "12px",
+        "height": "24px",
+        "line-height": "24px"
+    },
+    "actionAreaNode": {
+        "width": "110px",
+        "height": "22px",
+        "margin": "auto",
+        "margin-top": "4px"
+    },
+    "addAction": {
+        "width": "50px",
+        "height": "20px",
+        "line-height": "20px",
+        "float": "left",
+        "cursor": "pointer",
+        "border-radius": "3px",
+        "border": "1px solid #999",
+        "background-color": "#798795",
+        "color": "#FFF"
+    },
+    "modifyAction": {
+        "width": "50px",
+        "height": "20px",
+        "line-height": "20px",
+        "float": "right",
+        "cursor": "pointer",
+        "border-radius": "3px",
+        "border": "1px solid #999",
+        "background-color": "#798795",
+        "color": "#FFF"
+    },
+    "modifyAction_disabled": {
+        "width": "50px",
+        "height": "20px",
+        "line-height": "20px",
+        "float": "right",
+        "cursor": "pointer",
+        "border-radius": "3px",
+        "border": "1px solid #999",
+        "background-color": "#d1dee9",
+        "color": "#999"
+    },
+    "errorNode": {
+        "height": "24px",
+        "background-color": "#fbe8e8",
+        "color": "#FF0000"
+    },
+    "errorTextNode": {
+        "height": "24px",
+        "line-height": "24px",
+        "background": "url("+"../x_component_process_FormDesigner/widget/$ValidationEditor/default/icon/error.png) no-repeat 5px center",
+        "padding-left": "30px"
+    },
+    "scriptNode" : {
+        "padding-left" : "5px",
+        "padding-top" : "5px"
+    },
+    "itemNode": {
+        "cursor": "pointer",
+        "height": "auto",
+        "margin": "2px 4px",
+        "background-color": "#fff",
+        "border": "1px solid #ddd"
+    },
+    "itemNode_current": {
+        "cursor": "pointer",
+        "height": "auto",
+        "margin": "2px 4px",
+        "background-color": "#eee",
+        "border": "1px solid #bbb"
+    },
+    "itemDeleteNode": {
+        "width": "20px",
+        "height": "24px",
+        "float": "right",
+        "background": "url("+"../x_component_process_FormDesigner/widget/$ValidationEditor/default/icon/delete1.png) no-repeat center center",
+        "cursor": "pointer"
+    },
+    "itemContentNode": {
+        "padding": "5px",
+        "margin-right": "20px",
+        "height": "auto",
+        "overflow": "hidden",
+        "text-overflow": "ellipsis",
+        "white-space": "nowrap"
+    }
+}

BIN
o2web/source/x_component_process_FormDesigner/widget/$ScriptIncluder/default/icon/delete1.png


BIN
o2web/source/x_component_process_FormDesigner/widget/$ScriptIncluder/default/icon/error.png


+ 286 - 0
o2web/source/x_component_process_FormDesigner/widget/ScriptIncluder.js

@@ -0,0 +1,286 @@
+MWF.xApplication.process.FormDesigner.widget = MWF.xApplication.process.FormDesigner.widget || {};
+MWF.require("MWF.widget.UUID", null, false);
+MWF.require("MWF.widget.O2Identity", null, false);
+MWF.xApplication.process.FormDesigner.widget.ScriptIncluder = new Class({
+	Implements: [Options, Events],
+	Extends: MWF.widget.Common,
+	options: {
+		"style": "default",
+		"maxObj": document.body
+	},
+	initialize: function(node, designer, options){
+		this.setOptions(options);
+		this.node = $(node);
+        this.designer = designer;
+		
+		this.path = "../x_component_process_FormDesigner/widget/$ScriptIncluder/";
+		this.cssPath = "../x_component_process_FormDesigner/widget/$ScriptIncluder/"+this.options.style+"/css.wcss";
+		this._loadCss();
+		this.lp = this.designer.lp.scriptIncluder;
+		
+		this.items = [];
+	},
+    load: function(data){
+		this.editorNode = new Element("div", {"styles": this.css.editorNode}).inject(this.node);
+        this.actionNode = new Element("div", {"styles": this.css.actionNode}).inject(this.node);
+        this.listNode = new Element("div", {"styles": this.css.listNode}).inject(this.node);
+        this.loadEditorNode();
+        this.loadActionNode();
+        this.loadListNode(data);
+	},
+    loadEditorNode: function(){
+	    debugger;
+        var html = "<table width='100%' border='0' cellpadding='5' cellspacing='0' class='editTable'>" +
+            "<tr><td style='width: 60px; '>"+this.lp.asyncLoad+"</td><td align='left'>"+
+            "<input type='radio' name='"+(this.designer.appId||"")+"asyncLoadScript' value='true' checked/>"+this.lp.yes+
+            "<input type='radio' name='"+(this.designer.appId||"")+"asyncLoadScript' value='false'/>"+this.lp.no+
+            "</td></tr><tr><td>"+this.lp.selectScript+"</td><td><div class='scriptSelectorArea'></div></td></tr></table>";
+        this.editorNode.set("html", html);
+        var tds = this.editorNode.getElements("td").setStyles(this.css.editTableTdValue);
+        this.asyncLoadScript = this.editorNode.getElements("[type='radio']");
+        this.scriptSelectorArea = this.editorNode.getElement(".scriptSelectorArea");
+        this.loadScriptSelector();
+    },
+    loadScriptSelector: function( data ){
+        MWF.xDesktop.requireApp("process.ProcessDesigner", "widget.PersonSelector", function(){
+            var _self = this;
+            if( !data )data = [];
+            this.scriptSelector = new MWF.xApplication.process.ProcessDesigner.widget.PersonSelector(this.scriptSelectorArea, this.designer, {
+                "type": "Script",
+                "count": 0,
+                "names": data,
+                "onChange": function(ids){
+                    var value = [];
+                    ids.each( function (id) {
+                        var d = id.data;
+                        value.push({
+                            "type" : "script",
+                            "name": d.name,
+                            "alias": d.alias,
+                            "id": d.id,
+                            "appName" : d.appName || d.applicationName,
+                            "appId": d.appId || d.application,
+                            "appType" : d.appType
+                        });
+                    })
+                    this.currentSelectScripts = value;
+                }.bind(this)
+            });
+        }.bind(this));
+    },
+    loadActionNode: function(){
+        this.actionAreaNode = new Element("div", {"styles": this.css.actionAreaNode}).inject(this.actionNode);
+        this.addAction = new Element("div", {"styles": this.css.addAction, "text": this.designer.lp.validation.add}).inject(this.actionAreaNode);
+        this.modifyAction = new Element("div", {"styles": this.css.modifyAction_disabled, "text": this.designer.lp.validation.modify}).inject(this.actionAreaNode);
+
+        this.addAction.addEvent("click", function(){
+            this.add();
+        }.bind(this));
+        this.modifyAction.addEvent("click", function(){
+            this.modify();
+        }.bind(this));
+    },
+    getCurrentData: function(){
+	    var async = true;
+        this.asyncLoadScript.each( function (el) {
+            if( el.checked ){
+                async = el.get("value") === "true";
+            }
+        });
+
+        return {
+            "async": async,
+            "scriptList": this.currentSelectScripts || []
+        };
+    },
+    add: function(){
+        this.hideErrorNode();
+        var data = this.getCurrentData();
+
+        if ( data.scriptList.length === 0 ){
+            this.showErrorNode(this.lp.selectScriptNotice);
+            return false;
+        }
+        for( var i=0; i<this.items.length; i++ ){
+            var scriptList = this.items[i].data.scriptList;
+            for( var j=0; j<scriptList.length; j++ ){
+                for( var k=0; k< data.scriptList.length; k++ )
+                if( scriptList[j].id === data.scriptList[i].id ){
+                    this.showErrorNode(this.lp.repeatAddScriptNotice);
+                    return false;
+                }
+            }
+        }
+        var item = new MWF.xApplication.process.FormDesigner.widget.ScriptIncluder.Item(data, this);
+        this.items.push(item);
+        item.selected();
+        this.empty();
+        this.fireEvent("change");
+    },
+    empty: function(){
+        this.asyncLoadScript.each( function (el) {
+            if( el.get("value") === "true" ){
+                el.set("checked", true)
+            }
+        });
+        if(this.scriptSelector)this.scriptSelector.setData( [] );
+        this.currentSelectScripts = [];
+    },
+    showErrorNode: function(text){
+        this.errorNode = new Element("div", {"styles": this.css.errorNode}).inject(this.actionNode, "before");
+        this.errorTextNode = new Element("div", {"styles": this.css.errorTextNode}).inject(this.errorNode);
+        this.errorTextNode.set("text", text);
+        this.errorNode.addEvent("click", function(){this.hideErrorNode();}.bind(this));
+    },
+    hideErrorNode: function(){
+        if (this.errorNode) this.errorNode.destroy();
+    },
+    modify: function(){
+        if (this.currentItem){
+            this.hideErrorNode();
+
+            var data = this.getCurrentData();
+
+            if ( data.scriptList.length === 0 ){
+                this.showErrorNode(this.lp.selectScriptNotice);
+                return false;
+            }
+            for( var i=0; i<this.items.length; i++ ){
+                if( this.currentItem !== this.items[i] ){
+                    var scriptList = this.items[i].data.scriptList;
+                    for( var j=0; j< scriptList.length; j++ ){
+                        for( var k=0; k< data.scriptList.length; k++ )
+                            if( scriptList[j].id === data.scriptList[i].id ){
+                                this.showErrorNode(this.lp.repeatAddScriptNotice);
+                                return false;
+                            }
+                    }
+                }
+            }
+
+            this.currentItem.reload(data);
+            this.currentItem.unSelected();
+            this.disabledModify();
+            this.empty();
+            this.fireEvent("change");
+        }
+    },
+    loadListNode: function(data){
+        if (data){
+            if (data.length){
+                data.each(function(itemData){
+                    var item = new MWF.xApplication.process.FormDesigner.widget.ScriptIncluder.Item(itemData, this);
+                    this.items.push(item);
+                }.bind(this));
+            }
+        }
+    },
+    enabledModify: function(){
+        this.modifyAction.setStyles(this.css.modifyAction);
+    },
+    disabledModify: function(){
+        this.modifyAction.setStyles(this.css.modifyAction_disabled);
+    },
+    setData: function(data){
+        this.asyncLoadScript.each( function (el) {
+            if( el.get("value") === "true" && data.async ){
+                el.set("checked", true)
+            }else if( el.get("value") === "false" && !data.async ){
+                el.set("checked", true)
+            }
+        });
+        if( !this.scriptSelector ){
+            this.loadScriptSelector( data.scriptList );
+        }else{
+            this.scriptSelector.setData( data.scriptList );
+        }
+        this.currentSelectScripts = data.scriptList;
+    },
+
+    deleteItem: function(item){
+        if (this.currentItem == item) item.unSelected();
+        this.items.erase(item);
+        item.node.destroy();
+        MWF.release(item);
+        this.fireEvent("change");
+    },
+    getData: function(){
+        var data = [];
+        this.items.each(function(item){
+            data.push(item.data);
+        });
+        return data;
+    }
+
+});
+MWF.xApplication.process.FormDesigner.widget.ScriptIncluder.Item = new Class({
+    initialize: function(data, editor){
+        this.data = data;
+        this.editor = editor;
+        this.container = this.editor.listNode;
+        this.css = this.editor.css;
+        this.lp = this.editor.designer.lp;
+        this.load();
+    },
+    load: function(){
+        debugger;
+        this.node = new Element("div", {"styles": this.css.itemNode}).inject(this.container);
+        this.deleteNode = new Element("div", {"styles": this.css.itemDeleteNode}).inject(this.node);
+        this.contentNode = new Element("div", {"styles": this.css.itemContentNode}).inject(this.node);
+
+        this.asyncNode = new Element("div", {"styles": {}}).inject(this.contentNode);
+        this.asyncNode.set({
+            "text": this.data.async ? this.lp.scriptIncluder.asyncLoadScript : this.lp.scriptIncluder.syncLoadScript
+        });
+        this.scriptNode = new Element("div", {
+            styles : this.css.scriptNode
+        }).inject(this.contentNode);
+        this.data.scriptList.each( function (scipt) {
+            new MWF.widget.O2Script(scipt, this.scriptNode)
+        }.bind(this));
+
+        this.contentNode.addEvent("click", function(){
+            this.selected();
+        }.bind(this));
+
+        this.deleteNode.addEvent("click", function(e){
+            this.deleteItem(e);
+        }.bind(this));
+    },
+    reload: function(data){
+        this.data = data;
+        this.asyncNode.set({
+            "text": this.data.async ? this.lp.scriptIncluder.asyncLoadScript : this.lp.scriptIncluder.syncLoadScript
+        });
+        this.scriptNode.empty();
+        this.data.scriptList.each( function (scipt) {
+            new MWF.widget.O2Script(scipt, this.scriptNode)
+        }.bind(this));
+    },
+    selected: function(){
+        if (this.editor.currentItem) this.editor.currentItem.unSelected();
+        this.node.setStyles(this.css.itemNode_current);
+        this.editor.currentItem = this;
+        this.editor.setData(this.data);
+        this.editor.enabledModify();
+    },
+    unSelected: function(){
+        this.node.setStyles(this.css.itemNode);
+        this.editor.currentItem = this;
+        //this.editor.modifyValidation();
+        this.editor.disabledModify();
+    },
+    deleteItem: function(e){
+        var _self = this;
+        this.editor.designer.confirm("warn", e, this.lp.scriptIncluder.delete_title, this.lp.scriptIncluder.delete_text, 300, 120, function(){
+            _self.destroy();
+            this.close();
+        }, function(){
+            this.close();
+        });
+    },
+    destroy: function(){
+        this.editor.deleteItem(this);
+    }
+
+});

+ 12 - 4
o2web/source/x_component_process_ProcessDesigner/widget/PersonSelector.js

@@ -37,6 +37,12 @@ MWF.xApplication.process.ProcessDesigner.widget.PersonSelector = new Class({
         this.createAddNode();
         this.createAddNode();
         this.loadIdentitys();
         this.loadIdentitys();
     },
     },
+    setData: function( data ){
+        this.node.empty();
+        this.identitys = [];
+        this.options.names = data;
+        this.loadIdentitys();
+    },
     loadIdentitys: function(){
     loadIdentitys: function(){
         if (this.options.names){
         if (this.options.names){
             if (this.options.type.toLowerCase()==="duty"){
             if (this.options.type.toLowerCase()==="duty"){
@@ -88,8 +94,9 @@ MWF.xApplication.process.ProcessDesigner.widget.PersonSelector = new Class({
                             if (this.options.type.toLowerCase()==="portalfile") this.identitys.push(new MWF.widget.O2File(data, this.node));
                             if (this.options.type.toLowerCase()==="portalfile") this.identitys.push(new MWF.widget.O2File(data, this.node));
                             if (this.options.type.toLowerCase()==="processfile") this.identitys.push(new MWF.widget.O2File(data, this.node));
                             if (this.options.type.toLowerCase()==="processfile") this.identitys.push(new MWF.widget.O2File(data, this.node));
 
 
-                            if (this.options.type.toLowerCase()==="script") this.identitys.push(new MWF.widget.O2Other(data, this.node));
-                            if (this.options.type.toLowerCase()==="formstyle") this.identitys.push(new MWF.widget.O2Other(data, this.node));
+                            if (this.options.type.toLowerCase()==="dictionary") this.identitys.push(new MWF.widget.O2Dictionary(data, this.node));
+                            if (this.options.type.toLowerCase()==="script") this.identitys.push(new MWF.widget.O2Script(data, this.node));
+                            if (this.options.type.toLowerCase()==="formstyle") this.identitys.push(new MWF.widget.O2FormStyle(data, this.node));
                         }.bind(this));
                         }.bind(this));
                     }
                     }
                 }.bind(this));
                 }.bind(this));
@@ -154,8 +161,9 @@ MWF.xApplication.process.ProcessDesigner.widget.PersonSelector = new Class({
                             if (this.options.type.toLowerCase()==="portalfile") this.identitys.push(new MWF.widget.O2File(item.data, this.node));
                             if (this.options.type.toLowerCase()==="portalfile") this.identitys.push(new MWF.widget.O2File(item.data, this.node));
                             if (this.options.type.toLowerCase()==="processfile") this.identitys.push(new MWF.widget.O2File(item.data, this.node));
                             if (this.options.type.toLowerCase()==="processfile") this.identitys.push(new MWF.widget.O2File(item.data, this.node));
 
 
-                            if (this.options.type.toLowerCase()==="script") this.identitys.push(new MWF.widget.O2Other(item.data, this.node));
-                            if (this.options.type.toLowerCase()==="formstyle") this.identitys.push(new MWF.widget.O2Other(item.data, this.node));
+                            if (this.options.type.toLowerCase()==="dictionary") this.identitys.push(new MWF.widget.O2Dictionary(item.data, this.node));
+                            if (this.options.type.toLowerCase()==="script") this.identitys.push(new MWF.widget.O2Script(item.data, this.node));
+                            if (this.options.type.toLowerCase()==="formstyle") this.identitys.push(new MWF.widget.O2FormStyle(item.data, this.node));
                         }.bind(this));
                         }.bind(this));
                         if (this.options.type.toLowerCase()==="duty") {
                         if (this.options.type.toLowerCase()==="duty") {
                             items.each(function(item){
                             items.each(function(item){

+ 1 - 1
o2web/source/x_component_process_Xform/Attachment.js

@@ -495,7 +495,7 @@ MWF.xApplication.process.Xform.AttachmentController = new Class({
 
 
         if (!att.data.person && att.data.creatorUid) att.data.person = att.data.creatorUid;
         if (!att.data.person && att.data.creatorUid) att.data.person = att.data.creatorUid;
 
 
-        if ((!att.data.control.allowControl) && att.data.person !== user) { //|| !att.data.control.allowEdit
+        if (!att.data.control.allowControl && att.data.person !== user) {
             flag = false;
             flag = false;
         }
         }
         return flag;
         return flag;

+ 89 - 8
o2web/source/x_component_process_Xform/Form.js

@@ -216,17 +216,98 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
 
 
                 this._loadEvents();
                 this._loadEvents();
 
 
-                this.fireEvent("queryLoad");
-                if (this.event_resolve){
-                    this.event_resolve(function(){
-                        this.loadForm(callback)
-                    }.bind(this));
-                }else{
-                    this.loadForm(callback);
-                }
+                this.loadResource( function () {
+                    this.fireEvent("queryLoad");
+                    if (this.event_resolve){
+                        this.event_resolve(function(){
+                            this.loadForm(callback)
+                        }.bind(this));
+                    }else{
+                        this.loadForm(callback);
+                    }
+                }.bind(this));
+
             }.bind(this));
             }.bind(this));
         }.bind(this))
         }.bind(this))
     },
     },
+    loadResource : function( callback ){
+        var cb = function () {
+            if( this.syncScriptLoaded && this.asyncScriptLoaded && this.dictionaryLoaded ){
+                if(callback)callback();
+            }
+        }.bind(this);
+        this.loadScriptList( cb );
+        this.loadDictionaryList( cb );
+    },
+    loadDictionaryList: function( callback ){
+        this.dictionaryLoaded = false;
+        var loadedCount = 0;
+        if( this.json.dictionaries && this.json.dictionaries.length ){
+            this.json.dictionaries.map(function (d) {
+                d.type = d.appType;
+                d.application = d.application || d.appId || d.appName;
+                new this.Macro.environment.Dict( d ).get( "", function(){
+                    loadedCount++;
+                    if (this.json.dictionaries.length <= loadedCount){
+                        this.dictionaryLoaded = true;
+                        if(callback)callback();
+                    }
+                }.bind(this), null, true);
+            }.bind(this));
+        }else{
+            this.dictionaryLoaded = true;
+            if(callback)callback();
+        }
+    },
+    loadScriptList : function( callback ){
+        var asyncList = [];
+        var syncList = [];
+
+        this.syncScriptLoaded = false;
+        this.asyncScriptLoaded = false;
+
+        if( this.json.scripts && this.json.scripts.length ){
+            for( var i=0; i<this.json.scripts.length; i++ ){
+                var script = this.json.scripts[i];
+                script.scriptList.map( function ( s ) {
+                    s.type = s.appType;
+                    s.application = s.application || s.appId || s.appName;
+                });
+                if( script.async ){
+                    asyncList = asyncList.concat( script.scriptList );
+                }else{
+                    syncList = syncList.concat( script.scriptList );
+                }
+            }
+        }
+
+        var loadSyncList = function () {
+            if( syncList.length === 0 ){
+                this.syncScriptLoaded = true;
+                if(callback)callback();
+            }else{
+                this.Macro.environment.include(syncList, function(){
+                    this.syncScriptLoaded = true;
+                    if(callback)callback();
+                }.bind(this), false);
+            }
+        }.bind(this);
+
+        var loadAsyncList = function () {
+            if( asyncList.length === 0 ){
+                this.asyncScriptLoaded = true;
+                if(callback)callback();
+            }else{
+                this.Macro.environment.include(asyncList, function(){
+                    this.asyncScriptLoaded = true;
+                    if(callback)callback();
+                }.bind(this), true);
+            }
+        }.bind(this);
+
+        loadAsyncList();
+        loadSyncList();
+    },
     loadForm: function(callback){
     loadForm: function(callback){
         if (this.lockDataPerson){
         if (this.lockDataPerson){
             var text = MWF.xApplication.process.Xform.LP.keyLockInfor;
             var text = MWF.xApplication.process.Xform.LP.keyLockInfor;