From 000ff61dd8a88eb875048e6a3deca8679d75df18 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 29 八月 2020 11:29:33 +0800
Subject: [PATCH] 2020-08-29

---
 src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx
index 677001d..66ed435 100644
--- a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx
+++ b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx
@@ -33,6 +33,9 @@
     ]
   }
 
+  let xfields = columns.filter(item => /^Nvarchar/ig.test(item.datatype))
+  let yfields = columns.filter(item => /^(Int|Decimal)/ig.test(item.datatype))
+
   return [
     {
       type: 'radio',
@@ -52,7 +55,7 @@
       label: 'X-杞�',
       initVal: card.Xaxis || '',
       required: true,
-      options: columns.filter(col => col.type === 'text')
+      options: xfields
     },
     {
       type: 'select',
@@ -62,7 +65,7 @@
       multi: true, // 澶氶��
       hidden: card.datatype === 'statistics',
       required: true,
-      options: columns.filter(col => col.type === 'number')
+      options: yfields
     },
     {
       type: 'select',
@@ -71,7 +74,7 @@
       initVal: card.InfoType || '',
       hidden: card.datatype !== 'statistics',
       required: true,
-      options: columns.filter(col => col.type === 'text')
+      options: xfields
     },
     {
       type: 'select',
@@ -80,7 +83,7 @@
       initVal: card.InfoValue || '',
       hidden: card.datatype !== 'statistics',
       required: true,
-      options: columns.filter(col => col.type === 'number')
+      options: yfields
     },
     {
       type: 'select',

--
Gitblit v1.8.0