Browse Source

【bug】界面设置-重置按钮提示/分组别名更改无效问题

zhuth 7 years ago
parent
commit
e19a2296ba

+ 1 - 1
frontend/saas-web/app/util/FormUtil.js

@@ -3,7 +3,7 @@ Ext.define('saas.util.FormUtil', {
     statics: {
 
         // 主表允许自定义的配置名
-        MAIN_ALLOW_CUS_FIELDS: ['fieldLabel', 'hidden', 'index', 'columnWidth', 'group'],
+        MAIN_ALLOW_CUS_FIELDS: ['fieldLabel', 'hidden', 'index', 'columnWidth', 'group', 'html'],
         // 从表允许自定义的配置名
         DETAIL_ALLOW_CUS_FIELDS: ['text', 'hidden', 'index', 'width'],
 

+ 3 - 1
frontend/saas-web/app/view/core/form/SettingWin.js

@@ -288,6 +288,8 @@ Ext.define('saas.view.core.form.SettingWin', {
         if(settype == 'main') {
             if(item._init_fieldLabel) {
                 text = item.fieldLabel;
+            }else if(item._init_html) {
+                text = item.html;
             }
         }else {
             if(item._init_text) {
@@ -386,7 +388,7 @@ Ext.define('saas.view.core.form.SettingWin', {
         cusConfig = storeData.map(function(d) {
             let modified = d.modified || {},
             nameField = settype == 'main' ? 'name' : 'dataIndex',
-            textField = settype == 'main' ? 'fieldLabel' : 'text',
+            textField = settype == 'main' ? (d.get('type') == 'group' ? 'html' : 'fieldLabel') : 'text',
             name = d.get('name');
 
             // 强行保存序号

+ 7 - 2
frontend/saas-web/app/view/core/form/SettingWinController.js

@@ -68,8 +68,13 @@ Ext.define('saas.view.core.form.SettingWinController', {
         win = me.getView(),
         grid = win.down('grid');
 
-        win.fieldItems = me.resetItems();
-        win.setStoreData();
+        saas.util.BaseUtil.showConfirm('警告', '即将清空所有自定义配置,是否继续?<br/>'+'<span style="color: red;font-size: 12px;">(*保存后生效)</span>')
+        .then(function(bid) {
+            if(bid == 'yes') {
+                win.fieldItems = me.resetItems();
+                win.setStoreData();
+            }
+        })
     },
 
     resetItems: function() {