diff --git a/demo/WalkingTec.Mvvm.Demo/ViewModels/CityVMs/CityVM.cs b/demo/WalkingTec.Mvvm.Demo/ViewModels/CityVMs/CityVM.cs index aaeb436c7..06dbca1a0 100644 --- a/demo/WalkingTec.Mvvm.Demo/ViewModels/CityVMs/CityVM.cs +++ b/demo/WalkingTec.Mvvm.Demo/ViewModels/CityVMs/CityVM.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -12,7 +12,7 @@ namespace WalkingTec.Mvvm.Demo.ViewModels.CityVMs { public partial class CityVM : BaseCRUDVM { - public List AllParents { get; set; } + public List AllParents { get; set; } public CityVM() { @@ -21,7 +21,7 @@ public CityVM() protected override void InitVM() { - AllParents = DC.Set().GetSelectListItems(LoginUserInfo?.DataPrivileges, null, y => y.Name); + AllParents = DC.Set().GetTreeSelectListItems(LoginUserInfo?.DataPrivileges, null, y => y.Name); } public override void DoAdd() diff --git a/demo/WalkingTec.Mvvm.Demo/Views/City/Create.cshtml b/demo/WalkingTec.Mvvm.Demo/Views/City/Create.cshtml index e6d68d051..d4d2a5b47 100644 --- a/demo/WalkingTec.Mvvm.Demo/Views/City/Create.cshtml +++ b/demo/WalkingTec.Mvvm.Demo/Views/City/Create.cshtml @@ -2,8 +2,8 @@ - - + + diff --git a/demo/WalkingTec.Mvvm.VueDemo/appsettings.json b/demo/WalkingTec.Mvvm.VueDemo/appsettings.json index 38eb39b21..d7282f858 100644 --- a/demo/WalkingTec.Mvvm.VueDemo/appsettings.json +++ b/demo/WalkingTec.Mvvm.VueDemo/appsettings.json @@ -3,7 +3,7 @@ { "Key": "default", // "Value": "Server=47.93.23.242;Database=wtm_demoapi;port=3306;uid=lengyx;password=q299qSmwP9wYsw2deEp4%36UtDXKtvFJ" - "Value": "Server=(localdb)\\mssqllocaldb;Database=wtmdemo;Trusted_Connection=True;MultipleActiveResultSets=true" + "Value": "Server=(localdb)\\mssqllocaldb;Database=wtmdemo43;Trusted_Connection=True;MultipleActiveResultSets=true" } ], "DBType": "sqlserver", //使用的数据库,可选mysql,sqlserver,pgsql diff --git a/src/WalkingTec.Mvvm.Mvc.Admin/ApiControllers/FrameworkMenuController.cs b/src/WalkingTec.Mvvm.Mvc.Admin/ApiControllers/FrameworkMenuController.cs index 8a1a74ff8..25c411621 100644 --- a/src/WalkingTec.Mvvm.Mvc.Admin/ApiControllers/FrameworkMenuController.cs +++ b/src/WalkingTec.Mvvm.Mvc.Admin/ApiControllers/FrameworkMenuController.cs @@ -142,8 +142,8 @@ public string UnsetPages() public async Task RefreshMenu() { Cache.Delete("FFMenus"); - var userids = DC.Set().Select(x => x.ID.ToString().ToLower()).ToArray(); - await LoginUserInfo.RemoveUserCache(userids); + //var userids = DC.Set().Select(x => x.ID.ToString().ToLower()).ToArray(); + //await LoginUserInfo.RemoveUserCache(userids); return Ok(Mvc.Admin.Program._localizer["OprationSuccess"]); } #endregion diff --git a/src/WalkingTec.Mvvm.Mvc.Admin/Areas/_Admin/Controllers/FrameworkMenuController.cs b/src/WalkingTec.Mvvm.Mvc.Admin/Areas/_Admin/Controllers/FrameworkMenuController.cs index 943901394..e26202b53 100644 --- a/src/WalkingTec.Mvvm.Mvc.Admin/Areas/_Admin/Controllers/FrameworkMenuController.cs +++ b/src/WalkingTec.Mvvm.Mvc.Admin/Areas/_Admin/Controllers/FrameworkMenuController.cs @@ -152,8 +152,8 @@ public ActionResult UnsetPages() public async Task RefreshMenu() { Cache.Delete("FFMenus"); - var userids = DC.Set().Select(x => x.ID.ToString().ToLower()).ToArray(); - await LoginUserInfo.RemoveUserCache(userids); + //var userids = DC.Set().Select(x => x.ID.ToString().ToLower()).ToArray(); + //await LoginUserInfo.RemoveUserCache(userids); return FFResult().Alert(Program._localizer["OprationSuccess"]); } #endregion