From 051b5c867aa016250207b0c4633b8c29e36eb51d Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周日, 11 5月 2025 12:20:03 +0800
Subject: [PATCH] 222

---
 Weben_CMS专用代码生成器/Code/Utility/StructStrHelper.cs |   40 ++++++++++++++++++++++++++++++++++++++--
 1 files changed, 38 insertions(+), 2 deletions(-)

diff --git "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Utility/StructStrHelper.cs" "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Utility/StructStrHelper.cs"
index aee0a90..ca814b3 100644
--- "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Utility/StructStrHelper.cs"
+++ "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Utility/StructStrHelper.cs"
@@ -1962,6 +1962,7 @@
                             {
                                 elment = "select";
                                 sb.Append("                   el: '" + elment + "', \n");
+                                sb.Append("                   clearable:true, \n");
                                 sb.Append("                   options: [], \n");
                                 isWriteInt = false;
                             }
@@ -1997,7 +1998,24 @@
                     {
                         case DataTypeEnum.dt_bit:
                         case DataTypeEnum.dt_tinyint:
-                            sb.Append("                 options: [{label: '鏄�',value: true}, {label: '鍚�',value: false}] \n");
+                            //澧炲姞瀵规灇涓剧被鍨嬬殑鏀寔 
+                            if (param.EnumList?.Count > 0)
+                            {
+                                var findEnumObj = param.EnumList.Where(x => x.EnumAttrName == columnModel.ColumnName).FirstOrDefault();
+                                if (findEnumObj != null)
+                                {
+                                    sb.Append("                   clearable:true, \n");
+                                    sb.Append("                   option: [], \n");
+                                }
+                                else
+                                {
+                                    sb.Append("                 options: [{label: '鏄�',value: true}, {label: '鍚�',value: false}] \n");
+                                }
+                            }
+                            else
+                            {
+                                sb.Append("                 options: [{label: '鏄�',value: true}, {label: '鍚�',value: false}] \n");
+                            }
                             break;
                         default:
                             break;
@@ -2147,7 +2165,25 @@
                     {
                         case DataTypeEnum.dt_bit:
                         case DataTypeEnum.dt_tinyint:
-                            sb.Append("                 options: [{label: '鏄�',value: true}, {label: '鍚�',value: false}] \n");
+                            //澧炲姞瀵规灇涓剧被鍨嬬殑鏀寔 
+                            if (param.EnumList?.Count > 0)
+                            {
+                                var findEnumObj = param.EnumList.Where(x => x.EnumAttrName == columnModel.ColumnName).FirstOrDefault();
+                                if (findEnumObj != null)
+                                {
+                                    sb.Append("                   clearable:true, \n");
+                                    sb.Append("                   option: [], \n");
+                                }
+                                else
+                                {
+                                    sb.Append("                 options: [{label: '鏄�',value: true}, {label: '鍚�',value: false}] \n");
+                                }
+                            }
+                            else
+                            {
+                                sb.Append("                 options: [{label: '鏄�',value: true}, {label: '鍚�',value: false}] \n");
+                            }
+                            
                             break;
                         default:
                             break;

--
Gitblit v1.9.3