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

Merge branch 'fix/Selector.identity_with_unit' into 'develop'

Merge of fix/Selector.identity_with_unit to develop

See merge request o2oa/o2oa!69
蔡祥熠 5 лет назад
Родитель
Сommit
06970e171d
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      o2web/source/x_component_Selector/IdentityWidthDuty.js

+ 5 - 1
o2web/source/x_component_Selector/IdentityWidthDuty.js

@@ -169,7 +169,8 @@ MWF.xApplication.Selector.IdentityWidthDuty.ItemCategory = new Class({
         this.iconNode.setStyle("background-image", "url("+"/x_component_Selector/$Selector/"+style+"/icon/companyicon.png)");
     },
     loadSub: function(callback){
-        if (!this.loaded){
+        if (!this.loaded  && !this.loading){
+            this.loading = true;
             if (this.selector.options.units.length){
                 var action = MWF.Actions.get("x_organization_assemble_express");
                 var data = {"name":this.data.name, "unit":""};
@@ -209,6 +210,7 @@ MWF.xApplication.Selector.IdentityWidthDuty.ItemCategory = new Class({
                         if (i>=count){
                             if (!this.loaded) {
                                 this.loaded = true;
+                                this.loading = false;
                                 this.itemLoaded = true;
                                 if (callback) callback();
                             }
@@ -233,6 +235,7 @@ MWF.xApplication.Selector.IdentityWidthDuty.ItemCategory = new Class({
                             if (i>=count){
                                 if (!this.loaded) {
                                     this.loaded = true;
+                                    this.loading = false;
                                     this.itemLoaded = true;
                                     if (callback) callback();
                                 }
@@ -252,6 +255,7 @@ MWF.xApplication.Selector.IdentityWidthDuty.ItemCategory = new Class({
                         }
                     }.bind(this));
                     this.loaded = true;
+                    this.loading = false;
                     if (callback) callback();
                 }.bind(this), null, this.data.name);
             }