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

流程表单可选择数据字典

unknown 5 лет назад
Родитель
Сommit
551c37ad2b

+ 8 - 3
o2web/source/x_component_process_FormDesigner/Module/Form/form.html

@@ -65,7 +65,15 @@
                     <div class="MWFFormSelect" name="printForm"></div>
                 </td>
             </tr>
+            <tr>
+                <td class="editTableTitle">数据字典:</td>
+                <td class="editTableValue">
+                    <div class="MWFDictionarySelect" name="dictionaries"></div>
+                </td>
+            </tr>
         </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="includedScripts"></div>
 
 
 		<!--<div class="MWFArraylist" name="cssLinks" title="CSS引用"></div>-->
@@ -74,9 +82,6 @@
 		<div class="MWFMaplist" name="styles" title="样式"></div>
 		<div class="MWFMaplist" name="properties" title="属性"></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="MWFScriptIncluder" name="scriptIncluder"></div>
-
         <div class="MWFCssArea" name="css" title="CSS"></div>
 		<!--<div class="MWFScriptArea" name="jsheader" title="JS Header"></div>-->
 

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

@@ -1245,6 +1245,8 @@ debugger;
         var processFileNodes = this.propertyContent.getElements(".MWFProcessImageFileSelect");
         var scriptNodes = this.propertyContent.getElements(".MWFScriptSelect");
         var formStyleNodes = this.propertyContent.getElements(".MWFFormStyleSelect");
+        var dictionaryNodes = this.propertyContent.getElements(".MWFDictionarySelect");
+
 
         MWF.xDesktop.requireApp("process.ProcessDesigner", "widget.PersonSelector", function(){
             personIdentityNodes.each(function(node){
@@ -1404,6 +1406,37 @@ debugger;
                 }
             }.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){
                 var d = this.data[node.get("name")];
                 var data = d || {};