Browse Source

【bug】界面设置-初始化时也判断分组启用可编辑状态

zhuth 7 years ago
parent
commit
ca97b414a2
1 changed files with 13 additions and 0 deletions
  1. 13 0
      frontend/saas-web/app/view/core/form/SettingWin.js

+ 13 - 0
frontend/saas-web/app/view/core/form/SettingWin.js

@@ -224,6 +224,19 @@ Ext.define('saas.view.core.form.SettingWin', {
         }else {
             store.loadData(data);
         }
+        
+        store.each(function(r, idx) {
+            let type = r.get('type');
+            r.set('index', idx + 1);
+            if(type == 'group') {
+                let flag = store.getAt(idx + 1) && store.getAt(idx + 1).get('type') == 'group';
+
+                if(flag)  {
+                    r.set('enable', !flag);
+                }
+                r.set('disabled', flag);
+            }
+        });
     },
 
     getStoreData: function() {