Parcourir la source

修复移动端提交界面选人可能的问题

unknown il y a 5 ans
Parent
commit
00e7beaa0c

+ 5 - 4
o2web/source/x_component_Selector/Person.js

@@ -1938,15 +1938,15 @@ MWF.xApplication.Selector.Person.Item = new Class({
         });
     },
     clickItem: function( callback, checkValid ){
-        if ( layout.mobile && this.selector.options.count.toInt()===1){
-            this.selectedSingle( checkValid );
-        }else{
+        // if ( layout.mobile && this.selector.options.count.toInt()===1){
+        //     this.selectedSingle( checkValid );
+        // }else{
             if (this.isSelected){
                 this.unSelected( checkValid );
             }else{
                 this.selected( checkValid );
             }
-        }
+        // }
     },
     overItem: function(){
         if (!this.isSelected ){
@@ -2004,6 +2004,7 @@ MWF.xApplication.Selector.Person.Item = new Class({
 
             }.bind(this));
         }else {
+            this.selector.emptySelectedItems();
             this.unSelectedSingle( checkValid );
         }
     },

+ 6 - 5
o2web/source/x_component_process_Xform/$Input.js

@@ -272,7 +272,7 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input =  new Class(
 		return {"value": [value || ""] , "text": [text || value || ""]};
 	},
     /**
-     * 判断组件值是否为空.
+     * @summary 判断组件值是否为空.
      * @example
      * if( this.form.get('subject').isEmpty() ){
      *     this.form.notice('标题不能为空', 'warn');
@@ -284,9 +284,10 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input =  new Class(
 	    return !data || !data.trim();
     },
     /**
-     * 获取组件值。该方法和 this.data.{fieldName} 在绝大部分的时候效果一样。区别如下:
+     *  该方法和 this.data.{fieldName} 在绝大部分的时候效果一样。区别如下:
      * 当使用异步函数生成器(Promise)为组件赋值的时候,getData立即获取数据,可能返回修改前的值,当Promise执行完成以后,会返回修改后的值。
      * this.data.{fieldName} 立即获取数据,可能获取到异步函数生成器,当Promise执行完成以后,会返回修改后的值。{@link https://www.yuque.com/o2oa/ixsnyt/ws07m0#EggIl|具体差异请查看链接}
+     * @summary 获取组件值。
      *  @example
      * var data = this.form.get('subject').getData();
      * @return 组件的数据.
@@ -303,7 +304,7 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input =  new Class(
         }
     },
     /**
-     * 重置组件的值为默认值或置空。
+     * @summary 重置组件的值为默认值或置空。
      *  @example
      * this.form.get('subject').resetData();
      */
@@ -311,7 +312,7 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input =  new Class(
         this.setData(this.getValue());
     },
     /**
-     * 为控件赋值。
+     * @summary 为控件赋值。
      *  @param data{String|Number|JsonObject|Array} .
      */
 	setData: function(data){
@@ -545,7 +546,7 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input =  new Class(
         return true;
     },
     /**
-     * 根据组件的校验设置进行校验。
+     * @summary 根据组件的校验设置进行校验。
      *  @param {String} routeName - 可选,路由名称.
      *  @example
      *  if( !this.form.get('fieldName').validation() ){

+ 5 - 5
o2web/source/x_component_process_Xform/$Module.js

@@ -13,7 +13,7 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module =  new Class(
     },
     initialize: function(node, json, form, options){
         /**
-         * 组件的节点
+         * @summary 组件的节点
          * @see https://mootools.net/core/docs/1.6.0/Element/Element
          * @member {Element}
          * @example
@@ -26,7 +26,7 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module =  new Class(
         this.node.store("module", this);
 
         /**
-         * 组件的配置信息,比如id,类型等.
+         * @summary 组件的配置信息,比如id,类型等.
          * @member {JsonObject}
          * @example
          *  //可以在脚本中获取该组件
@@ -37,7 +37,7 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module =  new Class(
         this.json = json;
 
         /**
-         * 组件的所在表单对象.
+         * @summary 组件的所在表单对象.
          * @member {MWF.xApplication.process.Xform.Form}
          * @example
          * var form = this.form.get("fieldName").form; //获取组件所在表单对象
@@ -55,7 +55,7 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module =  new Class(
         return (parent) ? parent.retrieve("module") : null;
     },
     /**
-     * 隐藏组件.
+     * @summary 隐藏组件.
      * @example
      * this.form.get("fieldName").hide(); //隐藏组件
      */
@@ -66,7 +66,7 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module =  new Class(
         if (this.iconNode) this.iconNode.setStyle("display", "none");
     },
     /**
-     * 显示组件.
+     * @summary 显示组件.
      * @example
      * this.form.get("fieldName").show(); //显示组件
      */

+ 3 - 3
o2web/source/x_component_process_Xform/Actionbar.js

@@ -20,7 +20,7 @@ MWF.xApplication.process.Xform.Actionbar = MWF.APPActionbar =  new Class(
         "moduleEvents": ["load", "queryLoad", "postLoad", "afterLoad"]
     },
     /**
-     * 重新加载操作条.
+     * @summary 重新加载操作条.
      * @example
      * this.form.get("name").reload(); //显示操作条
      */
@@ -220,7 +220,7 @@ MWF.xApplication.process.Xform.Actionbar = MWF.APPActionbar =  new Class(
         }
     },
     /**
-     * 根据操作id获取操作,该方法在操作条的afterLoad事件中有效,操作的操作脚本有效。
+     * @summary 根据操作id获取操作,该方法在操作条的afterLoad事件中有效,操作的操作脚本有效。
      *  @param {String} id - 必选,操作id.
      *  @return {o2.widget.ToolbarButton} 操作
      *  @example
@@ -235,7 +235,7 @@ MWF.xApplication.process.Xform.Actionbar = MWF.APPActionbar =  new Class(
         }
     },
     /**
-     * 获取所有操作,该方法在操作条的afterLoad事件中有效,操作的操作脚本有效。
+     * @summary 获取所有操作,该方法在操作条的afterLoad事件中有效,操作的操作脚本有效。
      *  @return {Array} 操作数组
      *  @example
      *  var actionbar = this.form.get("name"); //获取操作条

+ 4 - 9
o2web/source/x_component_process_Xform/Attachment.js

@@ -1035,14 +1035,6 @@ MWF.xApplication.process.Xform.AttachmentController = new Class({
     }
 
 });
-
-/**
- * 当前登录人员的附件权限数据结构.
- * @typedef {Object} AttachmentControl
- * @property {Boolean} allowRead - 是否允许阅读.
- * @property {Boolean} allowEdit - 是否允许编辑.
- * @property {Boolean} allowControl - 是否允许设置.
- */
 /**
  * 附件数据结构.
  * @typedef {Object} AttachmentData
@@ -1051,7 +1043,10 @@ MWF.xApplication.process.Xform.AttachmentController = new Class({
  * @property {String} person - 上传人.
  * @property {Number} orderNumber - 排序号.
  * @property {String} activityName - 上传的节点.
- * @property {AttachmentControl} control - 当前登录人员对附件拥有的权限.
+ * @property {Object} control - 当前登录人员对附件拥有的权限.
+ * @property {Boolean} control.allowRead - 是否允许阅读.
+ * @property {Boolean} control.allowEdit - 是否允许编辑.
+ * @property {Boolean} control.allowControl - 是否允许设置.
  * @property {Number} length - 附件大小.
  * @property {String} createTime - 创建时间.
  * @property {String} updateTime - 修改时间.