Browse Source

openTab方法完善

zhuth 7 years ago
parent
commit
f3484e9037

+ 3 - 1
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -189,7 +189,9 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
             idValue = record.get(grid.idField),
             idValue = record.get(grid.idField),
             codeValue = record.get(grid.codeField),
             codeValue = record.get(grid.codeField),
             id = grid.xtype + idValue;
             id = grid.xtype + idValue;
-            openTab(grid.addXtype,grid.addTitle+"("+codeValue+")",id);
+            openTab(grid.addXtype,grid.addTitle+"("+codeValue+")",id, {
+                initId: idValue
+            });
         }
         }
     },
     },
     getFields: function() {
     getFields: function() {

+ 4 - 1
frontend/saas-web/overrides/i18n.js

@@ -1,6 +1,6 @@
 var basePath = '';
 var basePath = '';
 
 
-function openTab(xtype, title, id) {
+function openTab(xtype, title, id, config) {
     var mainTab = Ext.getCmp('main-tab-panel');
     var mainTab = Ext.getCmp('main-tab-panel');
     var panel = Ext.getCmp(id);
     var panel = Ext.getCmp(id);
     if(!panel) {
     if(!panel) {
@@ -9,6 +9,9 @@ function openTab(xtype, title, id) {
             title: title,
             title: title,
             viewType: xtype
             viewType: xtype
         });
         });
+
+        Ext.apply(panel, config);
+
         Ext.suspendLayouts();
         Ext.suspendLayouts();
         mainTab.setActiveTab(mainTab.add(panel));
         mainTab.setActiveTab(mainTab.add(panel));
         Ext.resumeLayouts(true);
         Ext.resumeLayouts(true);