diff --git a/ZR.Admin.WebApi/Controllers/CodeGeneratorController.cs b/ZR.Admin.WebApi/Controllers/CodeGeneratorController.cs index cb778a80..e503f8e9 100644 --- a/ZR.Admin.WebApi/Controllers/CodeGeneratorController.cs +++ b/ZR.Admin.WebApi/Controllers/CodeGeneratorController.cs @@ -90,8 +90,11 @@ namespace ZR.Admin.WebApi.Controllers var genTableInfo = GenTableService.GetGenTableInfo(dto.TableId); genTableInfo.Columns = GenTableColumnService.GenTableColumns(dto.TableId); - Dictionary options = JsonConvert.DeserializeObject>(genTableInfo.Options); - dto.ParentMenuId = (long)options.GetValueOrDefault("parentMenuId", 0); + if (!string.IsNullOrEmpty(genTableInfo.Options)) + { + Dictionary options = JsonConvert.DeserializeObject>(genTableInfo.Options); + dto.ParentMenuId = (long)options.GetValueOrDefault("parentMenuId", 0); + } dto.GenTable = genTableInfo; //鐢熸垚浠g爜 CodeGeneratorTool.Generate(genTableInfo, dto); @@ -176,9 +179,9 @@ namespace ZR.Admin.WebApi.Controllers ClassName = CodeGeneratorTool.GetClassName(tableName), BusinessName = CodeGeneratorTool.GetClassName(tableName), FunctionAuthor = ConfigUtils.Instance.GetConfig(GenConstants.Gen_author), - FunctionName = tabInfo.Description, + FunctionName = string.IsNullOrEmpty(tabInfo.Description) ? tableName : tabInfo.Description, TableName = tableName, - TableComment = tabInfo.Description, + TableComment = string.IsNullOrEmpty(tabInfo.Description) ? tableName : tabInfo.Description, Create_by = userName, }; genTable.TableId = GenTableService.ImportGenTable(genTable); diff --git a/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs b/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs index 93af7f7f..13cfd24f 100644 --- a/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs +++ b/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs @@ -137,7 +137,7 @@ namespace ZR.Admin.WebApi.Controllers.System { string uuid = Guid.NewGuid().ToString().Replace("-", ""); var code = SecurityCodeHelper.GetRandomEnDigitalText(4); - var imgByte = SecurityCodeHelper.GetGifEnDigitalCodeByte(code); + var imgByte = SecurityCodeHelper.GetEnDigitalCodeByte(code); string base64Str = Convert.ToBase64String(imgByte); CacheHelper.SetCache(uuid, code); var obj = new { uuid, img = base64Str };// File(stream, "image/png") diff --git a/ZR.Admin.WebApi/Properties/launchSettings.json b/ZR.Admin.WebApi/Properties/launchSettings.json index c5c22934..365059a8 100644 --- a/ZR.Admin.WebApi/Properties/launchSettings.json +++ b/ZR.Admin.WebApi/Properties/launchSettings.json @@ -19,7 +19,7 @@ "commandName": "Project", "launchBrowser": true, "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Stage" + "ASPNETCORE_ENVIRONMENT": "" }, "applicationUrl": "https://localhost:5001;http://localhost:5000" } diff --git a/ZR.Admin.WebApi/appsettings.json b/ZR.Admin.WebApi/appsettings.json index 51eede73..8b294291 100644 --- a/ZR.Admin.WebApi/appsettings.json +++ b/ZR.Admin.WebApi/appsettings.json @@ -7,11 +7,11 @@ } }, "ConnectionStrings": { - "conn_zrAdmin": "server=127.0.0.1;user=zr;pwd=abc;database=admin", - "conn_bus": "server=127.0.0.1;user=zr;pwd=abc;database=admin" + "conn_zrAdmin": "server=LAPTOP-STKF2M8H\\SQLEXPRESS;uid=sa;pwd=zradmin123;database=ZrAdmin;Trusted_Connection=SSPI", + "conn_bus": "server=LAPTOP-STKF2M8H\\SQLEXPRESS;uid=zr;pwd=zradmin123;database=ZrAdmin;Trusted_Connection=SSPI" }, - "conn_zrAdmin_type": 0, //MySql = 0, SqlServer = 1 - "conn_bus_type": 0, + "conn_zrAdmin_type": 1, //MySql = 0, SqlServer = 1 + "conn_bus_type": 1, "urls": "http://localhost:8888", //项目启动url "sysConfig": { "DBCommandTimeout": 10, @@ -30,8 +30,8 @@ "SECRET": "XX" }, "gen": { - "conn": "server=127.0.0.1;user=zr;pwd=abc;database={database}", - "dbType": 0, //MySql = 0, SqlServer = 1 + "conn": "server=LAPTOP-STKF2M8H\\SQLEXPRESS;user=zr;pwd=abc;database={database};Trusted_Connection=SSPI", + "dbType": 1, //MySql = 0, SqlServer = 1 "autoPre": true, //自动去除表前缀 "author": "zr", "tablePrefix": "live_,sys_" //"表前缀(生成类名不会包含表前缀,多个用逗号分隔)", diff --git a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/ControllersTemplate.txt b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/ControllersTemplate.txt index 97bb3b08..27824d56 100644 --- a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/ControllersTemplate.txt +++ b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/ControllersTemplate.txt @@ -49,7 +49,7 @@ namespace {ApiControllerNamespace}.Controllers //寮濮嬫嫾瑁呮煡璇㈡潯浠 var predicate = Expressionable.Create<{ModelName}>(); - //TODO 鎼滅储鏉′欢 + //TODO 鑷繁瀹炵幇鎼滅储鏉′欢鏌ヨ璇硶鍙傝僑qlsugar锛岄粯璁ゆ煡璇㈡墍鏈 //predicate = predicate.And(m => m.Name.Contains(parm.Name)); var response = _{ModelName}Service.GetPages(predicate.ToExpression(), parm); diff --git a/ZR.CodeGenerator/CodeGeneratorTool.cs b/ZR.CodeGenerator/CodeGeneratorTool.cs index 9f547cc8..acd00b96 100644 --- a/ZR.CodeGenerator/CodeGeneratorTool.cs +++ b/ZR.CodeGenerator/CodeGeneratorTool.cs @@ -482,6 +482,7 @@ namespace ZR.CodeGenerator Create_by = genTable.Create_by, Create_time = DateTime.Now, IsInsert = !column.IsIdentity,//闈炶嚜澧炲瓧娈甸兘闇瑕佹彃鍏 + IsEdit = true, IsQuery = false, HtmlType = GenConstants.HTML_INPUT }; @@ -509,9 +510,9 @@ namespace ZR.CodeGenerator genTableColumn.HtmlType = GenConstants.HTML_TEXTAREA; } //缂栬緫瀛楁 - if (GenConstants.COLUMNNAME_NOT_EDIT.Any(f => column.DbColumnName.Contains(f)) && !column.IsIdentity && !column.IsPrimarykey) + if (column.IsIdentity || column.IsPrimarykey || GenConstants.COLUMNNAME_NOT_EDIT.Any(f => column.DbColumnName.Contains(f)) ) { - genTableColumn.IsEdit = true; + genTableColumn.IsEdit = false; } //鍒楄〃瀛楁 if (!GenConstants.COLUMNNAME_NOT_LIST.Any(f => column.DbColumnName.Contains(f) && !column.IsPrimarykey)) diff --git a/ZR.Vue/README.md b/ZR.Vue/README.md index b3030b78..6508c901 100644 --- a/ZR.Vue/README.md +++ b/ZR.Vue/README.md @@ -30,7 +30,7 @@ npm run build:prod ``` # 鎻掍欢璇存槑 -### Autoprefixer +### Autoprefixer 锛堝凡鍒犻櫎锛 娴忚鍣ㄨ嚜鍔ㄨˉ鍏ㄥ墠缂 渚嬪锛 ``` diff --git a/ZR.Vue/package.json b/ZR.Vue/package.json index fcb7cc97..873c7e6a 100644 --- a/ZR.Vue/package.json +++ b/ZR.Vue/package.json @@ -51,7 +51,6 @@ "@vue/cli-plugin-babel": "4.4.4", "@vue/cli-plugin-eslint": "4.4.4", "@vue/cli-service": "4.4.4", - "autoprefixer": "9.5.1", "babel-eslint": "10.1.0", "babel-plugin-dynamic-import-node": "2.3.3", "chalk": "4.1.0", @@ -59,13 +58,11 @@ "eslint": "6.7.2", "eslint-plugin-vue": "6.2.2", "lint-staged": "8.1.5", - "node-sass": "4.14.1", - "runjs": "4.3.2", - "sass-loader": "8.0.2", + "sass": "1.32.13", + "runjs": "4.4.2", + "sass-loader": "10.1.0", "script-ext-html-webpack-plugin": "2.1.3", - "serve-static": "1.13.2", "svg-sprite-loader": "4.1.3", - "svgo": "2.8.0", "vue-template-compiler": "2.6.12" }, "engines": { diff --git a/ZR.Vue/src/components/HeaderSearch/index.vue b/ZR.Vue/src/components/HeaderSearch/index.vue index 2980c06d..f814c29e 100644 --- a/ZR.Vue/src/components/HeaderSearch/index.vue +++ b/ZR.Vue/src/components/HeaderSearch/index.vue @@ -168,7 +168,7 @@ export default { display: inline-block; vertical-align: middle; - /deep/ .el-input__inner { + ::v-deep .el-input__inner { border-radius: 0; border: 0; padding-left: 0; diff --git a/ZR.Vue/src/views/system/notice/index.vue b/ZR.Vue/src/views/system/notice/index.vue index 3160e377..a2e73b41 100644 --- a/ZR.Vue/src/views/system/notice/index.vue +++ b/ZR.Vue/src/views/system/notice/index.vue @@ -2,31 +2,14 @@
- + - + - + @@ -37,33 +20,15 @@ - 鏂板 + 鏂板 - 淇敼 + 淇敼 + - 鍒犻櫎 + 鍒犻櫎 + @@ -71,26 +36,9 @@ - - - + + + \ No newline at end of file diff --git a/ZR.Vue/src/views/tool/email/sendEmail.vue b/ZR.Vue/src/views/tool/email/sendEmail.vue index 684de538..aa5413bf 100644 --- a/ZR.Vue/src/views/tool/email/sendEmail.vue +++ b/ZR.Vue/src/views/tool/email/sendEmail.vue @@ -9,11 +9,12 @@ - + - + 閫夋嫨鏂囦欢 涓婁紶鍒版湇鍔″櫒 @@ -27,9 +28,11 @@