From a152d2dc9e4ae6fa1fdd0dcfe5db8bb455e15c4f Mon Sep 17 00:00:00 2001 From: zs <zhousong@weben-smart.com> Date: 周二, 06 5月 2025 14:21:15 +0800 Subject: [PATCH] 111 --- Weben_CMS专用代码生成器/Code/MainForm.cs | 27 ++++++++++++++++++++++----- 1 files changed, 22 insertions(+), 5 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/MainForm.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/MainForm.cs" index ff60dcd..5fd6b7f 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/MainForm.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/MainForm.cs" @@ -35,6 +35,10 @@ this.tb_PageMenuInstanceName.Text = "wmsMaterial"; this.tb_CreatePerson.Text = "shaocx";//鍒涘缓浜� this.tb_EntityName.Text = "WmsMaterial";//瀹炰綋绫诲悕 + + this.tb_LikeQueryAttrs.Text = "'MaterialCode', 'MaterialName', 'Remark'"; + this.tb_LikeQueryAttrsName.Text = "璇疯緭鍏ョ墿鏂欑紪鐮�/鐗╂枡鍚嶇О/澶囨敞"; + //this.tb_EntityProName.Text = "wmsMaterial";//瀹炰綋绫诲璞″悕 this.tb_EnumList.Text = "PurchaseType|PurchaseTypeEnum|PurchaseTypeDesc,MaterialType|MaterialTypeEnum|MaterialTypeDesc,IsMainBranch|YesNoEnum|IsMainBranchDesc"; @@ -225,6 +229,19 @@ }); } } + else + { + if (!string.IsNullOrEmpty(str_enumList)) + { + var arr_single = str_enumList.Split('|'); + enumList.Add(new EnumModel() + { + EnumAttrName = arr_single[0], + EnumType = arr_single[1], + EnumTypeDesc = arr_single[2] + }); + } + } param.EnumList = enumList; //鐢熸垚Model @@ -345,15 +362,15 @@ //20銆佺敓鎴� Views\NameSpacePath 鏂囦欢 str_generate = NameSpacePath_Generate.CreateText(param); - tf = TextHelper.Export2File_V2(webRootPath + @"\Views", $"{param.NameSpacePath}.tsx", tableName, str_generate, FileType.InputModel, filePrefixName, entityName, modulelogo); + tf = TextHelper.Export2File_V2(webRootPath + @"\Views", $"{param.EntityName}.tsx", tableName, str_generate, FileType.InputModel, filePrefixName, entityName, modulelogo); //21銆佺敓鎴� Views\NameSpacePath_module 鏂囦欢 str_generate = NameSpacePath_module_Generate.CreateText(param); - tf = TextHelper.Export2File_V2(webRootPath + @"\Views", $"{param.NameSpacePath}.module.scss", tableName, str_generate, FileType.InputModel, filePrefixName, entityName, modulelogo); + tf = TextHelper.Export2File_V2(webRootPath + @"\Views", $"{param.EntityName}.module.scss", tableName, str_generate, FileType.InputModel, filePrefixName, entityName, modulelogo); //22銆佺敓鎴� Views\NameSpacePath_Config 鏂囦欢 str_generate = NameSpacePath_Config_Generate.CreateText(param); - tf = TextHelper.Export2File_V2(webRootPath + @"\Views\config", $"{param.NameSpacePath}.module.scss", tableName, str_generate, FileType.InputModel, filePrefixName, entityName, modulelogo); + tf = TextHelper.Export2File_V2(webRootPath + @"\Views\config", $"{param.EntityName}.module.scss", tableName, str_generate, FileType.InputModel, filePrefixName, entityName, modulelogo); //23銆佺敓鎴� Views\NameSpacePath_Config 鏂囦欢 @@ -530,12 +547,12 @@ { var moule_str = tableName.Substring(index + 1, tableName.Length - index - 1); this.tb_Modulelogo.Text = moule_str; - this.tb_EntityProName.Text = CommonHelper.TitleToLower(moule_str); + tb_PageMenuInstanceName.Text = this.tb_EntityProName.Text = CommonHelper.TitleToLower(moule_str); } else { this.tb_Modulelogo.Text = tableName; - this.tb_EntityProName.Text = CommonHelper.TitleToLower(tableName); + tb_PageMenuInstanceName.Text = this.tb_EntityProName.Text = CommonHelper.TitleToLower(tableName); } } } -- Gitblit v1.9.3