From 129a0c82833a11f5305855ae6d6ce401756d49be Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周二, 06 5月 2025 08:15:24 +0800 Subject: [PATCH] 222 --- Weben_CMS专用代码生成器/Code/MainForm.cs | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 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 6ba8aff..39a34fb 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" @@ -31,6 +31,8 @@ this.tb_WCF_NameSpacePath.Text = "HIAWms";//WCF椤圭洰鍛藉悕绌洪棿 this.tb_FileName.Text = "Xiangzi";//鏂囦欢鍓嶇紑鍚� this.tb_ChinaComment.Text = "鐗╂枡鍩虹淇℃伅琛�";//涓枃娉ㄩ噴 + this.tb_MenuName.Text = "鐗╂枡淇℃伅";//涓枃娉ㄩ噴 + this.tb_PageMenuInstanceName.Text = "wmsMaterial"; this.tb_CreatePerson.Text = "shaocx";//鍒涘缓浜� this.tb_EntityName.Text = "WmsMaterial";//瀹炰綋绫诲悕 //this.tb_EntityProName.Text = "wmsMaterial";//瀹炰綋绫诲璞″悕 @@ -98,6 +100,26 @@ string filePrefixName = this.tb_FileName.Text.Trim();//鏂囦欢鍓嶇紑鍚� string modulelogo = this.tb_Modulelogo.Text.Trim();//妯″潡绠�鍐� string chinaComment = this.tb_ChinaComment.Text.Trim();//涓枃娉ㄩ噴 + if (chinaComment == "") + { + MessageBox.Show("璇疯緭鍏� 琛ㄧ殑涓枃娉ㄨВ锛�"); + this.tb_ChinaComment.Focus(); + return; + } + string menuName = this.tb_MenuName.Text.Trim();//涓枃娉ㄩ噴 + if (menuName == "") + { + MessageBox.Show("璇疯緭鍏� 椤甸潰鑿滃崟鍚嶏紒"); + this.tb_MenuName.Focus(); + return; + } + string _tb_PageMenuInstanceName = this.tb_PageMenuInstanceName.Text.Trim();//涓枃娉ㄩ噴 + if (_tb_PageMenuInstanceName == "") + { + MessageBox.Show("璇疯緭鍏� 椤甸潰鑿滃崟瀵硅薄缂╁啓锛�"); + this.tb_PageMenuInstanceName.Focus(); + return; + } string createPerson = this.tb_CreatePerson.Text.Trim();//鍒涘缓浜� string entityName = this.tb_EntityName.Text.Trim();//瀹炰綋绫诲悕 string tableAlias = this.tb_EntityProName.Text.Trim();//瀹炰綋绫诲璞″悕/琛ㄥ埆鍚� @@ -160,6 +182,8 @@ { Modulelogo = modulelogo, ChinaComment = chinaComment, + PageMenuName = menuName, + PageMenuInstanceName = _tb_PageMenuInstanceName, NameSpacePath = wcf_NameSpacePath, ColumnNameList = columnList, EntityName = entityName, @@ -265,6 +289,20 @@ #endregion + #region Web + var webRootPath = tbPath.Text + @"\web\src\widgets\" + tb_EntityName.Text.Trim(); + + //13銆佺敓鎴� Index 鏂囦欢 + str_generate = Index_Generate.CreateText(param); + tf = TextHelper.Export2File_V2(webRootPath, $"index.ts", tableName, str_generate, FileType.InputModel, filePrefixName, entityName, modulelogo); + + //14銆佺敓鎴� enum 鏂囦欢 + str_generate = enum_Generate.CreateText(param); + tf = TextHelper.Export2File_V2(webRootPath, $"enum.ts", tableName, str_generate, FileType.InputModel, filePrefixName, entityName, modulelogo); + + + #endregion + ////鐢熸垚 OutputModel 鏂囦欢 -- Gitblit v1.9.3