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

Merge branch 'wrdp' into 'develop'

Wrdp

See merge request o2oa/o2oa!3004
蔡祥熠 5 лет назад
Родитель
Сommit
368681cb1d
22 измененных файлов с 2765 добавлено и 1566 удалено
  1. 7 0
      o2web/source/x_component_process_FormDesigner/Module/Datagrid$Title/datagrid$Title.html
  2. 301 152
      o2web/source/x_component_process_FormDesigner/Module/Datagrid.js
  3. 51 0
      o2web/source/x_component_process_FormDesigner/Module/Datagrid/datagrid.html
  4. 10 0
      o2web/source/x_component_process_FormDesigner/Module/Datagrid/template.json
  5. 24 0
      o2web/source/x_component_process_FormDesigner/Module/Form/skin/styles_blue-flat.json
  6. 24 0
      o2web/source/x_component_process_FormDesigner/Module/Form/skin/styles_blue-simple.json
  7. 24 0
      o2web/source/x_component_process_FormDesigner/Module/Form/skin/styles_cmcc.json
  8. 24 0
      o2web/source/x_component_process_FormDesigner/Module/Form/skin/styles_default.json
  9. 24 0
      o2web/source/x_component_process_FormDesigner/Module/Form/skin/styles_defaultMobile.json
  10. 24 0
      o2web/source/x_component_process_FormDesigner/Module/Form/skin/styles_mobile-blue-flat.json
  11. 2 0
      o2web/source/x_component_process_FormDesigner/Module/Form/skin/styles_none.json
  12. 24 0
      o2web/source/x_component_process_FormDesigner/Module/Form/skin/styles_official.json
  13. 24 0
      o2web/source/x_component_process_FormDesigner/Module/Form/skin/styles_red-simple.json
  14. 6 0
      o2web/source/x_component_process_FormDesigner/lp/zh-cn.js
  15. 27 0
      o2web/source/x_component_process_Xform/$Form/default/css.wcss
  16. 1 1
      o2web/source/x_component_process_Xform/Attachment.js
  17. 32 6
      o2web/source/x_component_process_Xform/Checkbox.js
  18. 3 1
      o2web/source/x_component_process_Xform/DatagridMobile.js
  19. 2058 1377
      o2web/source/x_component_process_Xform/DatagridPC.js
  20. 34 6
      o2web/source/x_component_process_Xform/Radio.js
  21. 28 23
      o2web/source/x_component_process_Xform/Select.js
  22. 13 0
      o2web/source/x_component_process_Xform/lp/zh-cn.js

+ 7 - 0
o2web/source/x_component_process_FormDesigner/Module/Datagrid$Title/datagrid$Title.html

@@ -28,6 +28,13 @@
                     <input class="editTableRadio" name="isShow" text{($.isShow==false)?'checked':''} type="radio" value="false"/>隐藏该列 <br/>
                 </td>
             </tr>
+            <tr>
+                <td class="editTableTitle">导入导出:</td>
+                <td class="editTableValue">
+                    <input class="editTableRadio" name="isImpExp" text{($.isImpExp!==false)?'checked':''} type="radio" value="true"/>允许 <br/>
+                    <input class="editTableRadio" name="isImpExp" text{($.isImpExp==false)?'checked':''} type="radio" value="false"/>不允许 <br/>
+                </td>
+            </tr>
         </table>
 
         <div class="MWFMaplist" name="styles" title="样式"></div>

+ 301 - 152
o2web/source/x_component_process_FormDesigner/Module/Datagrid.js

@@ -11,17 +11,17 @@ MWF.xApplication.process.FormDesigner.Module.Datagrid = MWF.FCDatagrid = new Cla
 		"style": "default",
 		"propertyPath": "../x_component_process_FormDesigner/Module/Datagrid/datagrid.html"
 	},
-	
+
 	initialize: function(form, options){
 		this.setOptions(options);
-		
+
 		this.path = "../x_component_process_FormDesigner/Module/Datagrid/";
 		this.cssPath = "../x_component_process_FormDesigner/Module/Datagrid/"+this.options.style+"/css.wcss";
 
 		this._loadCss();
 		this.moduleType = "component";
 		this.moduleName = "datagrid";
-		
+
 		this.form = form;
 		this.container = null;
 		this.containerNode = null;
@@ -29,30 +29,30 @@ MWF.xApplication.process.FormDesigner.Module.Datagrid = MWF.FCDatagrid = new Cla
 		this.elements = [];
 		this.selectedMultiTds = [];
 	},
-    clearTemplateStyles: function(styles){
-        if (styles){
-            if (styles.styles) this.removeStyles(styles.styles, "styles");
-            if (styles.tableStyles) this.removeStyles(styles.tableStyles, "tableStyles");
-            if (styles.titleStyles) this.removeStyles(styles.titleStyles, "titleStyles");
-            if (styles.contentStyles) this.removeStyles(styles.contentStyles, "contentStyles");
-            if (styles.actionStyles) this.removeStyles(styles.actionStyles, "actionStyles");
-            if (styles.editStyles) this.removeStyles(styles.editStyles, "editStyles");
-            if (styles.amountStyles) this.removeStyles(styles.amountStyles, "amountStyles");
-            if (styles.itemTitleStyles) this.removeStyles(styles.itemTitleStyles, "itemTitleStyles");
-            if (styles.properties) this.removeStyles(styles.properties, "properties");
-        }
-    },
-    setTemplateStyles: function(styles){
-        if (styles.styles) this.copyStyles(styles.styles, "styles");
-        if (styles.tableStyles) this.copyStyles(styles.tableStyles, "tableStyles");
-        if (styles.titleStyles) this.copyStyles(styles.titleStyles, "titleStyles");
-        if (styles.contentStyles) this.copyStyles(styles.contentStyles, "contentStyles");
-        if (styles.actionStyles) this.copyStyles(styles.actionStyles, "actionStyles");
-        if (styles.editStyles) this.copyStyles(styles.editStyles, "editStyles");
-        if (styles.amountStyles) this.copyStyles(styles.amountStyles, "amountStyles");
-        if (styles.itemTitleStyles) this.copyStyles(styles.itemTitleStyles, "itemTitleStyles");
-        if (styles.properties) this.copyStyles(styles.properties, "properties");
-    },
+	clearTemplateStyles: function(styles){
+		if (styles){
+			if (styles.styles) this.removeStyles(styles.styles, "styles");
+			if (styles.tableStyles) this.removeStyles(styles.tableStyles, "tableStyles");
+			if (styles.titleStyles) this.removeStyles(styles.titleStyles, "titleStyles");
+			if (styles.contentStyles) this.removeStyles(styles.contentStyles, "contentStyles");
+			if (styles.actionStyles) this.removeStyles(styles.actionStyles, "actionStyles");
+			if (styles.editStyles) this.removeStyles(styles.editStyles, "editStyles");
+			if (styles.amountStyles) this.removeStyles(styles.amountStyles, "amountStyles");
+			if (styles.itemTitleStyles) this.removeStyles(styles.itemTitleStyles, "itemTitleStyles");
+			if (styles.properties) this.removeStyles(styles.properties, "properties");
+		}
+	},
+	setTemplateStyles: function(styles){
+		if (styles.styles) this.copyStyles(styles.styles, "styles");
+		if (styles.tableStyles) this.copyStyles(styles.tableStyles, "tableStyles");
+		if (styles.titleStyles) this.copyStyles(styles.titleStyles, "titleStyles");
+		if (styles.contentStyles) this.copyStyles(styles.contentStyles, "contentStyles");
+		if (styles.actionStyles) this.copyStyles(styles.actionStyles, "actionStyles");
+		if (styles.editStyles) this.copyStyles(styles.editStyles, "editStyles");
+		if (styles.amountStyles) this.copyStyles(styles.amountStyles, "amountStyles");
+		if (styles.itemTitleStyles) this.copyStyles(styles.itemTitleStyles, "itemTitleStyles");
+		if (styles.properties) this.copyStyles(styles.properties, "properties");
+	},
 	_createMoveNode: function(){
 
 		var tableHTML = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"2\" width=\"100%\" align=\"center\">";
@@ -65,9 +65,9 @@ MWF.xApplication.process.FormDesigner.Module.Datagrid = MWF.FCDatagrid = new Cla
 //		this.moveNode = divNode.getFirst(); 
 //		this.moveNode.inject(divNode, "after");
 //		divNode.destroy();
-		
+
 		this.moveNode.setStyles(this.css.moduleNodeMove);
-		
+
 		this._setTableStyle();
 	},
 	_setTableStyle: function(){
@@ -87,7 +87,7 @@ MWF.xApplication.process.FormDesigner.Module.Datagrid = MWF.FCDatagrid = new Cla
 	_getContainers: function(){
 
 		var tds = this.node.getElements("td");
-		
+
 		this.form.getTemplateData("Datagrid$Data", function(data){
 			tds.each(function(td){
 				var json = this.form.getDomjson(td);
@@ -110,7 +110,7 @@ MWF.xApplication.process.FormDesigner.Module.Datagrid = MWF.FCDatagrid = new Cla
 	_getElements: function(){
 		//this.elements.push(this);
 		var ths = this.node.getElements("th");
-		
+
 		this.form.getTemplateData("Datagrid$Title", function(data){
 			ths.each(function(th){
 				var json = this.form.getDomjson(th);
@@ -130,12 +130,12 @@ MWF.xApplication.process.FormDesigner.Module.Datagrid = MWF.FCDatagrid = new Cla
 			}.bind(this));
 		}.bind(this), false);
 	},
-	
+
 	_createNode: function(callback){
 		var module = this;
 		var url = this.path+"datagridCreate.html";
 		MWF.require("MWF.widget.Dialog", function(){
-			var size = $(document.body).getSize();			
+			var size = $(document.body).getSize();
 			var x = size.x/2-180;
 			var y = size.y/2-130;
 
@@ -150,43 +150,43 @@ MWF.xApplication.process.FormDesigner.Module.Datagrid = MWF.FCDatagrid = new Cla
 				"height": 260,
 				"url": url,
 				"buttonList": [
-				    {
-				    	"text": MWF.APPFD.LP.button.ok,
-				    	"action": function(){
-				    		module._createTableNode();
-				    		callback();
-				    		this.close();
-				    	}
-				    }
+					{
+						"text": MWF.APPFD.LP.button.ok,
+						"action": function(){
+							module._createTableNode();
+							callback();
+							this.close();
+						}
+					}
 				]
 			});
-			
+
 			dlg.show();
 		}.bind(this));
 	},
 	_createTableNode: function(){
 		var cols = $("MWFNewTableColumn").get("value");
-		
+
 		var width = $("MWFNewTableWidth").get("value");
 		var widthUnitNode = $("MWFNewTableWidthUnit");
 		var widthUnit = widthUnitNode.options[widthUnitNode.selectedIndex].value;
-		
+
 		var border = $("MWFNewTableBorder").get("value");
 		var cellpadding = $("MWFNewTableCellpadding").get("value");
 		var cellspacing = $("MWFNewTableCellspacing").get("value");
-		
+
 		var w = "";
 		if (widthUnit=="percent"){
 			w = width+"%";
 		}else{
 			w = width+"px";
 		}
-		
+
 		this.json.properties.width = w;
 		this.json.properties.border = border;
 		this.json.properties.cellpadding = cellpadding;
 		this.json.properties.cellspacing = cellspacing;
-		
+
 		var tableHTML = "<table border=\""+border+"\" cellpadding=\""+cellpadding+"\" cellspacing=\""+cellspacing+"\" width=\""+w+"\" align=\"center\">";
 		tableHTML += "<tr>";
 		for (var j=0; j<cols.toInt(); j++){
@@ -198,7 +198,7 @@ MWF.xApplication.process.FormDesigner.Module.Datagrid = MWF.FCDatagrid = new Cla
 			tableHTML += "<td></td>";
 		}
 		tableHTML += "</tr></table>";
-		
+
 		this.node = new Element("div", {
 			"id": this.json.id,
 			"MWFType": "datagrid",
@@ -211,13 +211,13 @@ MWF.xApplication.process.FormDesigner.Module.Datagrid = MWF.FCDatagrid = new Cla
 			}
 		}).inject(this.form.node);
 
-        this.table = this.node.getElement("table");
+		this.table = this.node.getElement("table");
 	},
 	_dragComplete: function(){
 		if (!this.node){
 			this._createNode(function(){
 				this._dragMoveComplete();
-			}.bind(this)); 
+			}.bind(this));
 		}else{
 			this._dragMoveComplete();
 		}
@@ -225,14 +225,14 @@ MWF.xApplication.process.FormDesigner.Module.Datagrid = MWF.FCDatagrid = new Cla
 	_dragMoveComplete: function(){
 		this._resetTreeNode();
 		this.node.inject(this.copyNode, "before");
-		
+
 		this._initModule();
-		
+
 		var thisDisplay = this.node.retrieve("thisDisplay");
 		if (thisDisplay){
 			this.node.setStyle("display", thisDisplay);
 		}
-		
+
 		if (this.copyNode) this.copyNode.destroy();
 		if (this.moveNode) this.moveNode.destroy();
 		this.moveNode = null;
@@ -243,9 +243,9 @@ MWF.xApplication.process.FormDesigner.Module.Datagrid = MWF.FCDatagrid = new Cla
 		this.form.json.moduleList[this.json.id] = this.json;
 		this.selected();
 	},
-	
+
 	_initModule: function(){
-        if (!this.initialized){
+		if (!this.initialized){
 			if (this.json.initialized!=="yes")this.setStyleTemplate();
 
 			this.table = this.node.getElement("table");
@@ -259,12 +259,14 @@ MWF.xApplication.process.FormDesigner.Module.Datagrid = MWF.FCDatagrid = new Cla
 			this._setNodeProperty();
 			if (!this.form.isSubform) this._createIconAction();
 
-	   //     this.checkSequenceShow();
+			//     this.checkSequenceShow();
 
 			this._setNodeEvent();
 
 			this.setDatagridStyles();
 
+			this._setEditStyle_custom("impexpType");
+
 			this.initialized = true;
 			this.json.initialized = "yes";
 		}
@@ -282,15 +284,15 @@ MWF.xApplication.process.FormDesigner.Module.Datagrid = MWF.FCDatagrid = new Cla
 				}
 			}.bind(this));
 		}
-        if (name=="tableStyles"){
-            this.table.clearStyles();
-            Object.each(this.json.tableStyles, function(value, key){
-                var reg = /^border\w*/ig;
-                if (!key.test(reg)){
-                    this.table.setStyle(key, value);
-                }
-            }.bind(this));
-        }
+		if (name=="tableStyles"){
+			this.table.clearStyles();
+			Object.each(this.json.tableStyles, function(value, key){
+				var reg = /^border\w*/ig;
+				if (!key.test(reg)){
+					this.table.setStyle(key, value);
+				}
+			}.bind(this));
+		}
 
 		if (name=="properties"){
 			this.node.getFirst().setProperties(this.json.properties);
@@ -304,7 +306,7 @@ MWF.xApplication.process.FormDesigner.Module.Datagrid = MWF.FCDatagrid = new Cla
 					var id = container.json.id;
 					var newId = id.replace(reg, this.json.id);
 					container.json.id = newId;
-					
+
 					delete this.form.json.moduleList[id];
 					this.form.json.moduleList[newId] = container.json;
 					container._setEditStyle("id");
@@ -312,100 +314,247 @@ MWF.xApplication.process.FormDesigner.Module.Datagrid = MWF.FCDatagrid = new Cla
 			}
 		}
 
-        if (name=="titleStyles"){
-            var ths = this.table.getElements("th");
-            ths.each(function(th){
-            	var opacity = th.getStyle("opacity");
-                this.setCustomNodeStyles(th, this.json.titleStyles);
-                if(opacity)th.setStyle("opacity", opacity);
-            }.bind(this));
-        }
-        if (name=="contentStyles"){
-            var tds = this.table.getElements("td");
-            tds.each(function(td){
+		if (name=="titleStyles"){
+			var ths = this.table.getElements("th");
+			ths.each(function(th){
+				var opacity = th.getStyle("opacity");
+				this.setCustomNodeStyles(th, this.json.titleStyles);
+				if(opacity)th.setStyle("opacity", opacity);
+			}.bind(this));
+		}
+		if (name=="contentStyles"){
+			var tds = this.table.getElements("td");
+			tds.each(function(td){
 				var opacity = td.getStyle("opacity");
-                this.setCustomNodeStyles(td, this.json.contentStyles);
+				this.setCustomNodeStyles(td, this.json.contentStyles);
 				if(opacity)td.setStyle("opacity", opacity);
-            }.bind(this));
-        }
-        //if (name=="sequence") this.checkSequenceShow();
+			}.bind(this));
+		}
+
+		var setImportExportAreaNodeWidth = function () {
+
+			if( ["centerTop","centerBottom"].contains( this.json.impexpPosition ) ){
+
+				var width = 2;
+
+				if( this.exportActionNode ){
+					width = width + this.exportActionNode.getSize().x +
+						this.exportActionNode.getStyle("padding-left").toFloat() +
+						+ this.exportActionNode.getStyle("padding-right").toFloat() +
+						+ this.exportActionNode.getStyle("margin-left").toFloat() +
+						+ this.exportActionNode.getStyle("margin-right").toFloat()
+				}
+
+				if( this.importActionNode ){
+					width = width + this.importActionNode.getSize().x +
+						this.importActionNode.getStyle("padding-left").toFloat() +
+						+ this.importActionNode.getStyle("padding-right").toFloat() +
+						+ this.importActionNode.getStyle("margin-left").toFloat() +
+						+ this.importActionNode.getStyle("margin-right").toFloat()
+				}
+
+				this.importExportAreaNode.setStyle( "width", width+"px" );
+			}else{
+				this.importExportAreaNode.setStyle( "width", "auto" );
+			}
+
+		}.bind(this);
+
+		if( name === "impexpType" ){
+			debugger;
+			//允许导入
+			var importenable  = this.json.impexpType === "impexp" || this.json.impexpType === "imp";
+			//允许导出
+			var exportenable  = this.json.impexpType === "impexp" || this.json.impexpType === "exp";
+
+			if( this.impexpNode )this.impexpNode.destroy();
+			this.impexpNode = null;
+
+			this.impexpNode = this.node.getElement("div.impexpNode");
+			if( this.impexpNode )this.impexpNode.destroy();
+			this.impexpNode = null;
+
+			if( !exportenable && !importenable ){
+				return;
+			}
+
+
+			var position = ["leftTop","centerTop","rightTop"].contains( this.json.impexpPosition || "" ) ? "top" : "bottom";
+			this.impexpNode = new Element("div.impexpNode", { styles : { "width" : "100%", "overflow" : "hidden" } }).inject(this.node, position);
+
+			var importExportAreaNode = new Element("div.importExportAreaNode").inject( this.impexpNode );
+			if( ["leftTop","leftBottom"].contains( this.json.impexpPosition || "" ) ){
+				importExportAreaNode.setStyles({ "float" : "left", "margin" : "0px" })
+			}else if( ["rightTop","rightBottom"].contains( this.json.impexpPosition || "" ) ){
+				importExportAreaNode.setStyles({ "float" : "right", "margin" : "0px" })
+			}else{
+				importExportAreaNode.setStyles({ "float" : "none", "margin" : "0px auto" })
+			}
+			this.importExportAreaNode = importExportAreaNode;
+
+			var styles;
+			var width = 0;
+			if( exportenable ){
+				var exportActionNode = new Element("div.exportActionStyles", { text : this.json.exportActionText }).inject( importExportAreaNode );
+				if( this.json.exportActionStyles ){
+					styles = Object.clone(this.json.exportActionStyles)
+				}else{
+					styles = {
+						"color" : "#777",
+						"border-radius": "5px",
+						"border": "1px solid #ccc",
+						"cursor": "pointer",
+						"height": "26px",
+						"float" : "left",
+						"line-height": "26px",
+						"padding": "0px 5px",
+						"background-color": "#efefef",
+						"margin" : "5px"
+					}
+				}
+				exportActionNode.setStyles(styles);
+				this.exportActionNode = exportActionNode;
+			}
+
+			if( importenable ){
+				var importActionNode = new Element("div.importActionNode", { text : this.json.importActionText }).inject( importExportAreaNode );
+				if( this.json.importActionStyles ){
+					styles = Object.clone(this.json.importActionStyles);
+				}else{
+					styles = {
+						"color" : "#777",
+						"border-radius": "5px",
+						"border": "1px solid #ccc",
+						"cursor": "pointer",
+						"height": "26px",
+						"float" : "left",
+						"line-height": "26px",
+						"padding": "0px 5px",
+						"background-color": "#efefef",
+						"margin" : "5px"
+					}
+				}
+				importActionNode.setStyles(styles);
+				this.importActionNode = importActionNode;
+			}
+
+			setImportExportAreaNodeWidth();
+		}
+
+		if( name === "impexpPosition" && this.impexpNode && this.importExportAreaNode ){
+			var position = ["leftTop","centerTop","rightTop"].contains( this.json.impexpPosition || "" ) ? "top" : "bottom";
+			this.impexpNode.inject(this.node, position);
+
+			var importExportAreaNode = this.importExportAreaNode;
+			if( ["leftTop","leftBottom"].contains( this.json.impexpPosition || "" ) ){
+				importExportAreaNode.setStyles({ "float" : "left", "margin" : "0px" })
+			}else if( ["rightTop","rightBottom"].contains( this.json.impexpPosition || "" ) ){
+				importExportAreaNode.setStyles({ "float" : "right", "margin" : "0px" })
+			}else{
+				importExportAreaNode.setStyles({ "float" : "none", "margin" : "0px auto" })
+			}
+			setImportExportAreaNodeWidth();
+		}
+
+		if( name === "importActionText" &&  this.importActionNode ){
+			this.importActionNode.set("text", this.json.importActionText );
+			setImportExportAreaNodeWidth();
+		}
+
+		if( name === "exportActionText" &&  this.exportActionNode ){
+			this.exportActionNode.set("text", this.json.exportActionText );
+			setImportExportAreaNodeWidth();
+		}
+
+		if( name === "importActionStyles" &&  this.importActionNode ){
+			this.importActionNode.setStyles( this.json.importActionStyles || {} );
+			setImportExportAreaNodeWidth();
+		}
+
+		if( name === "exportActionStyles" &&  this.exportActionNode ){
+			this.exportActionNode.setStyles( this.json.exportActionStyles || {} );
+			setImportExportAreaNodeWidth();
+		}
+
+
+		//if (name=="sequence") this.checkSequenceShow();
 	},
-    setDatagridStyles: function(){
-        if (this.json.titleStyles){
-            var ths = this.table.getElements("th");
-            ths.each(function(th){
+	setDatagridStyles: function(){
+		if (this.json.titleStyles){
+			var ths = this.table.getElements("th");
+			ths.each(function(th){
 				var opacity = th.getStyle("opacity");
-                this.setCustomNodeStyles(th, this.json.titleStyles);
+				this.setCustomNodeStyles(th, this.json.titleStyles);
 				if(opacity)th.setStyle("opacity", opacity);
-            }.bind(this));
-        }
-        if (this.json.contentStyles){
-            var tds = this.table.getElements("td");
-            tds.each(function(td){
+			}.bind(this));
+		}
+		if (this.json.contentStyles){
+			var tds = this.table.getElements("td");
+			tds.each(function(td){
 				var opacity = td.getStyle("opacity");
-                this.setCustomNodeStyles(td, this.json.contentStyles);
+				this.setCustomNodeStyles(td, this.json.contentStyles);
 				if(opacity)td.setStyle("opacity", opacity);
-            }.bind(this));
-        }
-    },
-    setAllStyles: function(){
-        this.setPropertiesOrStyles("styles");
-        this.setPropertiesOrStyles("tableStyles");
-        this.setPropertiesOrStyles("properties");
-
-        this.setDatagridStyles();
-
-        this.reloadMaplist();
-    },
-
-    //checkSequenceShow: function(){
-    //    if (this.json.sequence=="yes"){
-    //        if (!this.sequenceTitleTd || !this.sequenceTd){
-    //            if (this.sequenceTitleTd){
-    //                this.sequenceTitleTd.destroy();
-    //                this.sequenceTitleTd = null;
-    //            }
-    //            if (this.sequenceTd){
-    //                this.sequenceTd.destroy();
-    //                this.sequenceTd = null;
-    //            }
-    //            var trs = this.node.getElements("tr");
-    //            if (trs[0]){
-    //                this.sequenceTitleTd = new Element("th", {"styles": this.css.sequenceTitleTd}).inject(trs[0], "top");
-    //            }
-    //            if (trs[1]){
-    //                this.sequenceTd = new Element("td", {"styles": this.css.sequenceTd, "text": "1"}).inject(trs[1], "top");
-    //            }
-    //        }
-    //    }else{
-    //        if (this.sequenceTitleTd){
-    //            this.sequenceTitleTd.destroy();
-    //            this.sequenceTitleTd = null;
-    //        }
-    //        if (this.sequenceTd){
-    //            this.sequenceTd.destroy();
-    //            this.sequenceTd = null;
-    //        }
-    //    }
-    //},
+			}.bind(this));
+		}
+	},
+	setAllStyles: function(){
+		this.setPropertiesOrStyles("styles");
+		this.setPropertiesOrStyles("tableStyles");
+		this.setPropertiesOrStyles("properties");
+
+		this.setDatagridStyles();
+
+		this.reloadMaplist();
+	},
+
+	//checkSequenceShow: function(){
+	//    if (this.json.sequence=="yes"){
+	//        if (!this.sequenceTitleTd || !this.sequenceTd){
+	//            if (this.sequenceTitleTd){
+	//                this.sequenceTitleTd.destroy();
+	//                this.sequenceTitleTd = null;
+	//            }
+	//            if (this.sequenceTd){
+	//                this.sequenceTd.destroy();
+	//                this.sequenceTd = null;
+	//            }
+	//            var trs = this.node.getElements("tr");
+	//            if (trs[0]){
+	//                this.sequenceTitleTd = new Element("th", {"styles": this.css.sequenceTitleTd}).inject(trs[0], "top");
+	//            }
+	//            if (trs[1]){
+	//                this.sequenceTd = new Element("td", {"styles": this.css.sequenceTd, "text": "1"}).inject(trs[1], "top");
+	//            }
+	//        }
+	//    }else{
+	//        if (this.sequenceTitleTd){
+	//            this.sequenceTitleTd.destroy();
+	//            this.sequenceTitleTd = null;
+	//        }
+	//        if (this.sequenceTd){
+	//            this.sequenceTd.destroy();
+	//            this.sequenceTd = null;
+	//        }
+	//    }
+	//},
 	getContainerNodes: function(){
 		return this.node.getElements("td");
 	},
-    copyComponentJsonData: function(newNode, pid){
-        var tds = newNode.getElements("td");
-        var ths = newNode.getElements("th");
-        tds.each(function(td, idx){
-            var newContainerJson = Object.clone(this.containers[idx].json);
-            newContainerJson.id = this.containers[idx]._getNewId(pid);
-            this.form.json.moduleList[newContainerJson.id] = newContainerJson;
-            td.set("id", newContainerJson.id);
-        }.bind(this));
-        ths.each(function(th, idx){
-            var newElementJson = Object.clone(this.elements[idx].json);
-            newElementJson.id = this.elements[idx]._getNewId(pid);
-            this.form.json.moduleList[newElementJson.id] = newElementJson;
-            th.set("id", newElementJson.id);
-        }.bind(this));
-    }
-	
+	copyComponentJsonData: function(newNode, pid){
+		var tds = newNode.getElements("td");
+		var ths = newNode.getElements("th");
+		tds.each(function(td, idx){
+			var newContainerJson = Object.clone(this.containers[idx].json);
+			newContainerJson.id = this.containers[idx]._getNewId(pid);
+			this.form.json.moduleList[newContainerJson.id] = newContainerJson;
+			td.set("id", newContainerJson.id);
+		}.bind(this));
+		ths.each(function(th, idx){
+			var newElementJson = Object.clone(this.elements[idx].json);
+			newElementJson.id = this.elements[idx]._getNewId(pid);
+			this.form.json.moduleList[newElementJson.id] = newElementJson;
+			th.set("id", newElementJson.id);
+		}.bind(this));
+	}
+
 });

+ 51 - 0
o2web/source/x_component_process_FormDesigner/Module/Datagrid/datagrid.html

@@ -60,6 +60,57 @@
         </table>
         <div class="MWFScriptArea" name="editableScript" title="是否可编辑(S)"></div>
 
+        <div style="height:24px; text-align: center; line-height: 24px; background-color: #EEE; border-top: 1px solid #999;">导出导入</div>
+        <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
+            <tr>
+                <td class="editTableTitle">启用:</td>
+                <td class="editTableValue">
+                    <input type="radio" name="impexpType" value="none" text{(!$.impexpType || $.impexpType==='none')?'checked':''}
+                           onclick="if (this.checked){ $('text{$.pid}impexpArea').setStyle('display', 'none')}" />禁用
+                    <input type="radio" name="impexpType" value="impexp" text{($.impexpType==='impexp')?'checked':''}
+                           onclick="if (this.checked){ $('text{$.pid}impexpArea').setStyle('display', 'block')}" />导出导入
+                    <input type="radio" name="impexpType" value="exp" text{($.impexpType==='exp')?'checked':''}
+                           onclick="if (this.checked){ $('text{$.pid}impexpArea').setStyle('display', 'block')}" />仅导出
+                    <input type="radio" name="impexpType" value="imp" text{($.impexpType==='imp')?'checked':''}
+                           onclick="if (this.checked){ $('text{$.pid}impexpArea').setStyle('display', 'block')}" />仅导入
+                </td>
+            </tr>
+        </table>
+        <div id="text{$.pid}impexpArea" style="display: text{($.impexpType && $.impexpType!=='none')?'block':'none'};">
+            <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
+                <tr>
+                    <td class="editTableTitle"></td>
+                    <td class="editTableValue">
+                        注:序号、图片、附件和隐藏列不能导入导出。
+                    </td>
+                </tr>
+                <tr>
+                    <td class="editTableTitle">按钮位置:</td>
+                    <td class="editTableValue">
+                        <input type="radio" name="impexpPosition" value="leftTop" text{(!$.impexpPosition || $.impexpPosition==='leftTop')?'checked':''}/>左上
+                        <input type="radio" name="impexpPosition" value="centerTop" text{($.impexpPosition==='centerTop')?'checked':''}/>中上
+                        <input type="radio" name="impexpPosition" value="rightTop" text{($.impexpPosition==='rightTop')?'checked':''}/>右上
+                        <input type="radio" name="impexpPosition" value="leftBottom" text{($.impexpPosition==='leftBottom')?'checked':''}/>左下
+                        <input type="radio" name="impexpPosition" value="centerBottom" text{($.impexpPosition==='centerBottom')?'checked':''}/>中下
+                        <input type="radio" name="impexpPosition" value="rightBottom" text{($.impexpPosition==='rightBottom')?'checked':''}/>右下
+                    </td>
+                </tr>
+                <tr>
+                    <td class="editTableTitle">导入按钮文本:</td>
+                    <td class="editTableValue"><input type="text" name="importActionText" value="text{$.importActionText || '导入Excel'}" class="editTableInput"/></td>
+                </tr>
+            </table>
+            <div class="MWFMaplist" name="importActionStyles" collapse="true" title="导入按钮样式"></div>
+            <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
+                <tr>
+                    <td class="editTableTitle">导出按钮文本:</td>
+                    <td class="editTableValue"><input type="text" name="exportActionText" value="text{$.exportActionText || '导出Excel'}" class="editTableInput"/></td>
+                </tr>
+            </table>
+            <div class="MWFMaplist" name="exportActionStyles" collapse="true" title="导出按钮样式"></div>
+            <div class="MWFFormulaArea" name="excelName" title="导出文件名称"></div>
+        </div>
+
         <div class="MWFValidation" name="validationConfig"></div>
         <div class="MWFScriptArea" name="validation" title="校验脚本 (S)"></div>
     </div>

+ 10 - 0
o2web/source/x_component_process_FormDesigner/Module/Datagrid/template.json

@@ -6,6 +6,8 @@
     "sequence": "yes",
     "section": "no",
     "sectionBy": "person",
+	"importActionText" : "导入Excel",
+	"exportActionText" : "导出Excel",
     "sectionByScript": {
       "code": "",
       "html": ""
@@ -51,6 +53,14 @@
 		  "code": "",
 		  "html": ""
 		},
+		"export": {
+			"code": "",
+			"html": ""
+		},
+		"import": {
+			"code": "",
+			"html": ""
+		},
 		"click": {
 			"code": "",
 			"html": ""

+ 24 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/skin/styles_blue-flat.json

@@ -269,6 +269,30 @@
       "font-weight": "bold",
       "border-bottom": "0px solid #DCDFE6"
     },
+    "importActionStyles" : {
+      "color" : "#777",
+      "border-radius": "5px",
+      "border": "1px solid #ccc",
+      "cursor": "pointer",
+      "height": "26px",
+      "float" : "left",
+      "line-height": "26px",
+      "padding": "0px 5px",
+      "background-color": "#efefef",
+      "margin" : "5px"
+    },
+    "exportActionStyles" : {
+      "color" : "#777",
+      "border-radius": "5px",
+      "border": "1px solid #ccc",
+      "cursor": "pointer",
+      "height": "26px",
+      "float" : "left",
+      "line-height": "26px",
+      "padding": "0px 5px",
+      "background-color": "#efefef",
+      "margin" : "5px"
+    },
     "properties": {
       "border": "0",
       "cellpadding": "3",

+ 24 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/skin/styles_blue-simple.json

@@ -244,6 +244,30 @@
       "font-weight": "bold",
       "border-bottom": "0px solid #cccccc"
     },
+    "importActionStyles" : {
+      "color" : "#777",
+      "border-radius": "5px",
+      "border": "1px solid #ccc",
+      "cursor": "pointer",
+      "height": "26px",
+      "float" : "left",
+      "line-height": "26px",
+      "padding": "0px 5px",
+      "background-color": "#efefef",
+      "margin" : "5px"
+    },
+    "exportActionStyles" : {
+      "color" : "#777",
+      "border-radius": "5px",
+      "border": "1px solid #ccc",
+      "cursor": "pointer",
+      "height": "26px",
+      "float" : "left",
+      "line-height": "26px",
+      "padding": "0px 5px",
+      "background-color": "#efefef",
+      "margin" : "5px"
+    },
     "properties": {
       "border": "0",
       "cellpadding": "3",

+ 24 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/skin/styles_cmcc.json

@@ -252,6 +252,30 @@
       "font-weight": "bold",
       "border-bottom": "0px solid #cccccc"
     },
+    "importActionStyles" : {
+      "color" : "#777",
+      "border-radius": "5px",
+      "border": "1px solid #ccc",
+      "cursor": "pointer",
+      "height": "26px",
+      "float" : "left",
+      "line-height": "26px",
+      "padding": "0px 5px",
+      "background-color": "#efefef",
+      "margin" : "5px"
+    },
+    "exportActionStyles" : {
+      "color" : "#777",
+      "border-radius": "5px",
+      "border": "1px solid #ccc",
+      "cursor": "pointer",
+      "height": "26px",
+      "float" : "left",
+      "line-height": "26px",
+      "padding": "0px 5px",
+      "background-color": "#efefef",
+      "margin" : "5px"
+    },
     "properties": {
       "border": "0",
       "cellpadding": "3",

+ 24 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/skin/styles_default.json

@@ -249,6 +249,30 @@
       "font-weight": "bold",
       "border-bottom": "0px solid #cccccc"
     },
+    "importActionStyles" : {
+      "color" : "#777",
+      "border-radius": "5px",
+      "border": "1px solid #ccc",
+      "cursor": "pointer",
+      "height": "26px",
+      "float" : "left",
+      "line-height": "26px",
+      "padding": "0px 5px",
+      "background-color": "#efefef",
+      "margin" : "5px"
+    },
+    "exportActionStyles" : {
+      "color" : "#777",
+      "border-radius": "5px",
+      "border": "1px solid #ccc",
+      "cursor": "pointer",
+      "height": "26px",
+      "float" : "left",
+      "line-height": "26px",
+      "padding": "0px 5px",
+      "background-color": "#efefef",
+      "margin" : "5px"
+    },
     "properties": {
       "width": "100%",
       "border": "0",

+ 24 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/skin/styles_defaultMobile.json

@@ -232,6 +232,30 @@
       "font-weight": "bold",
       "border-bottom": "0px solid #cccccc"
     },
+    "importActionStyles" : {
+      "color" : "#777",
+      "border-radius": "5px",
+      "border": "1px solid #ccc",
+      "cursor": "pointer",
+      "height": "26px",
+      "float" : "left",
+      "line-height": "26px",
+      "padding": "0px 5px",
+      "background-color": "#efefef",
+      "margin" : "5px"
+    },
+    "exportActionStyles" : {
+      "color" : "#777",
+      "border-radius": "5px",
+      "border": "1px solid #ccc",
+      "cursor": "pointer",
+      "height": "26px",
+      "float" : "left",
+      "line-height": "26px",
+      "padding": "0px 5px",
+      "background-color": "#efefef",
+      "margin" : "5px"
+    },
     "properties": {
       "border": "0",
       "cellpadding": "5",

+ 24 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/skin/styles_mobile-blue-flat.json

@@ -302,6 +302,30 @@
       "margin-bottom" : "10px",
       "margin-top" : "10px"
     },
+    "importActionStyles" : {
+      "color" : "#777",
+      "border-radius": "5px",
+      "border": "1px solid #ccc",
+      "cursor": "pointer",
+      "height": "26px",
+      "float" : "left",
+      "line-height": "26px",
+      "padding": "0px 5px",
+      "background-color": "#efefef",
+      "margin" : "5px"
+    },
+    "exportActionStyles" : {
+      "color" : "#777",
+      "border-radius": "5px",
+      "border": "1px solid #ccc",
+      "cursor": "pointer",
+      "height": "26px",
+      "float" : "left",
+      "line-height": "26px",
+      "padding": "0px 5px",
+      "background-color": "#efefef",
+      "margin" : "5px"
+    },
     "properties": {
       "width": "100%",
       "border": "0",

+ 2 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/skin/styles_none.json

@@ -126,6 +126,8 @@
     "editStyles": {},
     "amountStyles": {},
     "itemTitleStyles": {},
+    "importActionStyles" : {},
+    "exportActionStyles" : {},
     "properties": {}
   },
   "datagrid$Title": {

+ 24 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/skin/styles_official.json

@@ -264,6 +264,30 @@
       "font-weight": "bold",
       "border-bottom": "0px solid #cccccc"
     },
+    "importActionStyles" : {
+      "color" : "#777",
+      "border-radius": "5px",
+      "border": "1px solid #ccc",
+      "cursor": "pointer",
+      "height": "26px",
+      "float" : "left",
+      "line-height": "26px",
+      "padding": "0px 5px",
+      "background-color": "#efefef",
+      "margin" : "5px"
+    },
+    "exportActionStyles" : {
+      "color" : "#777",
+      "border-radius": "5px",
+      "border": "1px solid #ccc",
+      "cursor": "pointer",
+      "height": "26px",
+      "float" : "left",
+      "line-height": "26px",
+      "padding": "0px 5px",
+      "background-color": "#efefef",
+      "margin" : "5px"
+    },
     "properties": {
       "width": "90%",
       "border": "0",

+ 24 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/skin/styles_red-simple.json

@@ -244,6 +244,30 @@
       "font-weight": "bold",
       "border-bottom": "0px solid #cccccc"
     },
+    "importActionStyles" : {
+      "color" : "#777",
+      "border-radius": "5px",
+      "border": "1px solid #ccc",
+      "cursor": "pointer",
+      "height": "26px",
+      "float" : "left",
+      "line-height": "26px",
+      "padding": "0px 5px",
+      "background-color": "#efefef",
+      "margin" : "5px"
+    },
+    "exportActionStyles" : {
+      "color" : "#777",
+      "border-radius": "5px",
+      "border": "1px solid #ccc",
+      "cursor": "pointer",
+      "height": "26px",
+      "float" : "left",
+      "line-height": "26px",
+      "padding": "0px 5px",
+      "background-color": "#efefef",
+      "margin" : "5px"
+    },
     "properties": {
       "width": "90%",
       "border": "0",

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

@@ -140,6 +140,12 @@ MWF.xApplication.process.FormDesigner.LP = {
             "delete_title": "删除校验内容确认",
             "delete_text": "您确定要删除此项校验码?"
         },
+
+    "datagrid" : {
+		"import" : "导入",
+       "export" : "导出"
+    },
+
     "selectIcon": "选择图标",
     "selectImage": "选择图片",
     "selectApplication" : "选择应用",

+ 27 - 0
o2web/source/x_component_process_Xform/$Form/default/css.wcss

@@ -426,6 +426,33 @@
         "border-radius": "5px",
         "text-align": "center"
     },
+    "gridImpExpAreaNode" : {
+      "display" : "block"
+    },
+  "gridImportActionStyles" : {
+    "color" : "#777",
+    "border-radius": "5px",
+    "border": "1px solid #ccc",
+    "cursor": "pointer",
+    "height": "26px",
+    "float" : "left",
+    "line-height": "26px",
+    "padding": "0px 5px",
+    "background-color": "#efefef",
+    "margin" : "5px"
+  },
+  "gridExportActionStyles" : {
+    "color" : "#777",
+    "border-radius": "5px",
+    "border": "1px solid #ccc",
+    "cursor": "pointer",
+    "height": "26px",
+    "float" : "left",
+    "line-height": "26px",
+    "padding": "0px 5px",
+    "background-color": "#efefef",
+    "margin" : "5px"
+  },
     "mobileGridHelpNode": {
         "width": "30px",
         "height": "30px",

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

@@ -1710,7 +1710,7 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class(
      */
     setData: function(data){
         this.attachmentController.clear();
-        data.each(function (att) {
+        ( data || [] ).each(function (att) {
             var attachment = this.form.businessData.attachmentList.find(function(a){
                 return a.id==att.id;
             });

+ 32 - 6
o2web/source/x_component_process_Xform/Checkbox.js

@@ -108,12 +108,15 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox =  new Class(
         this.node.empty();
         this.setOptions();
     },
-    /**
-     * @summary 获取选择项数组.
-     * @example
-     * var array = this.form.get('fieldId').getOptions();
-     * @return {Array} 选择项数组,如果配置为脚本返回计算结果.
-     */
+        /**
+         * @summary 获取选择项。
+         * @return {Array} 返回选择项数组,如果使用选择项脚本,根据脚本返回决定,如:<pre><code class='language-js'>[
+         *  "女|female",
+         *  "男|male"
+         * ]</code></pre>
+         * @example
+         * this.form.get('fieldId').getOptions();
+         */
 	getOptions: function(){
 		if (this.json.itemType == "values"){
 			return this.json.itemValues;
@@ -123,6 +126,29 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox =  new Class(
 		//return [];
 	},
 
+    /**
+     * @summary 获取整理后的选择项。
+     * @return {Object} 返回整理后的选择项,如:
+     * <pre><code class='language-js'>{"valueList": ["","female","male"], "textList": ["","女","男"]}
+     * </code></pre>
+     * @example
+     * var optionData = this.form.get('fieldId').getOptionsObj();
+     */
+    getOptionsObj : function(){
+        var textList = [];
+        var valueList = [];
+        var optionItems = this.getOptions();
+        if (!optionItems) optionItems = [];
+        if (o2.typeOf(optionItems)==="array"){
+            optionItems.each(function(item){
+                var tmps = item.split("|");
+                textList.push( tmps[0] );
+                valueList.push( tmps[1] || tmps[0] );
+            }.bind(this));
+        }
+        return { textList : textList, valueList : valueList };
+    },
+
     setOptions: function(){
         var optionItems = this.getOptions();
         this._setOptions(optionItems);

+ 3 - 1
o2web/source/x_component_process_Xform/DatagridMobile.js

@@ -66,7 +66,9 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class(
 
 
         this.editable = (!this.readonly);
-        if (this.editable) this.editable = this.form.Macro.exec(((this.json.editableScript) ? this.json.editableScript.code : ""), this);
+        if (this.editable && this.json.editableScript && this.json.editableScript.code){
+            this.editable = this.form.Macro.exec(((this.json.editableScript) ? this.json.editableScript.code : ""), this);
+        }
         //this.editable = false;
 
         this.deleteable = this.json.deleteable !== "no";

Разница между файлами не показана из-за своего большого размера
+ 2058 - 1377
o2web/source/x_component_process_Xform/DatagridPC.js


+ 34 - 6
o2web/source/x_component_process_Xform/Radio.js

@@ -126,12 +126,15 @@ MWF.xApplication.process.Xform.Radio = MWF.APPRadio =  new Class(
         this.node.empty();
         this.setOptions();
     },
-    /**
-     * @summary 获取选择项。
-     * @return {Array} 返回选择项数组,如果使用选择项脚本,根据脚本返回决定
-     * @example
-     * this.form.get('fieldId').getOptions();
-     */
+        /**
+         * @summary 获取选择项。
+         * @return {Array} 返回选择项数组,如果使用选择项脚本,根据脚本返回决定,如:<pre><code class='language-js'>[
+         *  "女|female",
+         *  "男|male"
+         * ]</code></pre>
+         * @example
+         * this.form.get('fieldId').getOptions();
+         */
 	getOptions: function(){
 		if (this.json.itemType == "values"){
 			return this.json.itemValues;
@@ -140,6 +143,30 @@ MWF.xApplication.process.Xform.Radio = MWF.APPRadio =  new Class(
 		}
 		return [];
 	},
+
+    /**
+     * @summary 获取整理后的选择项。
+     * @return {Object} 返回整理后的选择项,如:
+     * <pre><code class='language-js'>{"valueList": ["","female","male"], "textList": ["","女","男"]}
+     * </code></pre>
+     * @example
+     * var optionData = this.form.get('fieldId').getOptionsObj();
+     */
+    getOptionsObj : function(){
+        var textList = [];
+        var valueList = [];
+        var optionItems = this.getOptions();
+        if (!optionItems) optionItems = [];
+        if (o2.typeOf(optionItems)==="array"){
+            optionItems.each(function(item){
+                var tmps = item.split("|");
+                textList.push( tmps[0] );
+                valueList.push( tmps[1] || tmps[0] );
+            }.bind(this));
+        }
+        return { textList : textList, valueList : valueList };
+    },
+
     setOptions: function(){
         var optionItems = this.getOptions();
         this._setOptions(optionItems);
@@ -362,6 +389,7 @@ MWF.xApplication.process.Xform.Radio = MWF.APPRadio =  new Class(
     resetData: function(){
         this.setData(this.getValue());
     },
+
     /**
      * @summary 获取选中的Dom对象。
      * @return {Element} 返回选中的Dom对象

+ 28 - 23
o2web/source/x_component_process_Xform/Select.js

@@ -158,7 +158,10 @@ MWF.xApplication.process.Xform.Select = MWF.APPSelect =  new Class(
     },
 	/**
 	 * @summary 获取选择项。
-	 * @return {Array} 返回选择项数组,如果使用选择项脚本,根据脚本返回决定
+	 * @return {Array} 返回选择项数组,如果使用选择项脚本,根据脚本返回决定,如:<pre><code class='language-js'>[
+	 *  "女|female",
+	 *  "男|male"
+	 * ]</code></pre>
 	 * @example
 	 * this.form.get('fieldId').getOptions();
 	 */
@@ -170,6 +173,30 @@ MWF.xApplication.process.Xform.Select = MWF.APPSelect =  new Class(
 		}
 		return [];
 	},
+
+	/**
+	 * @summary 获取整理后的选择项。
+	 * @return {Object} 返回整理后的选择项,如:
+	 * <pre><code class='language-js'>{"valueList": ["","female","male"], "textList": ["","女","男"]}
+	 * </code></pre>
+	 * @example
+	 * var optionData = this.form.get('fieldId').getOptionsObj();
+	 */
+	getOptionsObj : function(){
+		var textList = [];
+		var valueList = [];
+		var optionItems = this.getOptions();
+		if (!optionItems) optionItems = [];
+		if (o2.typeOf(optionItems)==="array"){
+			optionItems.each(function(item){
+				var tmps = item.split("|");
+				textList.push( tmps[0] );
+				valueList.push( tmps[1] || tmps[0] );
+			}.bind(this));
+		}
+		return { textList : textList, valueList : valueList };
+	},
+
 	setOptions: function(){
 		var optionItems = this.getOptions();
 		this._setOptions(optionItems);
@@ -389,28 +416,6 @@ MWF.xApplication.process.Xform.Select = MWF.APPSelect =  new Class(
 
         this.setData(this.getValue());
     },
-	/**
-	 * @summary 获取整理后的选择项。
-	 * @return {Object} 返回整理后的选择项,如:
-	 * <pre><code class='language-js'>{"value": ["","female","male"], "text": ["","女","男"]}
-	 * </code></pre>
-	 * @example
-	 * var optionData = this.form.get('fieldId').getOptionsObj();
-	 */
-	getOptionsObj : function(){
-		var textList = [];
-		var valueList = [];
-		var optionItems = this.getOptions();
-		if (!optionItems) optionItems = [];
-		if (o2.typeOf(optionItems)==="array"){
-			optionItems.each(function(item){
-				var tmps = item.split("|");
-				textList.push( tmps[0] );
-				valueList.push( tmps[1] || tmps[0] );
-			}.bind(this));
-		}
-		return { textList : textList, valueList : valueList };
-	},
 
 	setData: function(data){
 		return this._setValue(data, "__setData");

+ 13 - 0
o2web/source/x_component_process_Xform/lp/zh-cn.js

@@ -8,6 +8,19 @@ MWF.xApplication.process.Xform.LP = {
     "cancelDatagridLineEditTitle" : "取消编辑数据网格确认",
     "cancelDatagridLineEdit" : "是否确定取消编辑数据网格?",
 
+    "datagridImport" : "导入Excel",
+    "datagridExport" : "导出Excel",
+    "exportDefaultName" : "数据网格",
+    "importSuccess" : "导入成功!",
+    "validationInfor" : "校验信息",
+    "importFail" : "导入失败",
+    "importValidationColumnText" : "第{n}列:",
+    "notValidNumber" : "不是数字",
+    "notValidDate" : "不是日期格式",
+    "fullstop" : "。",
+    "notExistInSystem" : "在系统中不存在",
+    "uploadedFilesCannotHaveSpaces" : "上传的文件不能带空格",
+
     "browserNotActiveX": "您的浏览器不支持ActiveX控件,不能加载Office控件,请使用IE浏览器",
 
     "activity": "活动",

Некоторые файлы не были показаны из-за большого количества измененных файлов