Code Monkey home page Code Monkey logo

wtm's Introduction

English | 简体中文

WalkingTec.Mvvm for asp.net core

Walkingtec.mvvm framework (WTM) is a rapid development framework based on .net core. It supports LayUI, React, VUE. WTM has built-in code generator to maximize development efficiency. It is a powerful tool for efficient web development.

Coverage Status Member project of .NET Core Community Gitter GitHub license FOSSA Status

CI Build Status

Platform Build Server SDK Master Status Develop Status
Azure Pipelines Windows/Linux/OSX v2.2.300 Build Status Build Status
Azure Pipelines Windows/Linux/OSX v3.1.101 Build Status Build Status
Azure Pipelines Windows/Linux/OSX v5.0.103 Build Status Build Status
Azure Pipelines Windows/Linux/OSX v6.0.101 Build Status Build Status

Nuget Packages

Package name Version Downloads
WalkingTec.Mvvm.Core NuGet downloads
WalkingTec.Mvvm.Mvc NuGet downloads
WalkingTec.Mvvm.Mvc.Admin NuGet downloads
WalkingTec.Mvvm.TagHelpers.LayUI NuGet downloads

WTM Features

WTM provides 4 types of ViewModel, covering all of the common functionalities of mainstream web applications.

  • CrudVM provides most common functionalities for data addition, deletion and modification.

  • ListVM provides paging and exporting functionality.

  • ImportVM & TemplateVM provides importing via excel functionality.

  • BatchVM provides batch operation functionality.

  • WTM has its own code generator, which makes development efficient and fast.

  • WTM provides dozens of client-side controls, including Form, Grid, Panel, Dialog and quite alot of other common controls.

  • WTM provides built-in user, role, user group, Data permission, page permission, menu, log, mail, SMS, file and other common back-end functionalities;

  • WTM supports single sign on, portal and distributed database;

  • WTM provides simplified integration with libraries such as Redis, DFS etc.

  • WTM provides both server-side and client-side frameworks for building user interfaces.

Mode UI Status
Server-side LayUI Stable
Client-side React Stable
Client-side VUE Stable
Server/Client Blazor Stable

Under WTM framework's client-side mode, you can also use code generator to generate server-side and client-side code at the same time, greatly reducing the communication cost of front-end and back-end developers, essentially improving the development efficiency, so that "separation" is no longer complex and expensive.

Framework document address: http://wtmdoc.walkingtec.cn

Frame QQ communication group: 694148336(full), 892848149 (group2)

version 5.0x is in VNext branch

Click here to generate a WTM project online and experience the beauty of WTM immediately~~~

At present, we are a team of 7 developers. We are looking for all kinds of C#, React, VUE experts to join us!

If WTM hepls you:

wtm's People

Contributors

aaronlucas avatar alienwow avatar andylxy avatar buchunmiao avatar buffonlwx avatar cai50 avatar cai5080292 avatar chongyar avatar dfzone avatar duwenink avatar haozl1129 avatar hd2y avatar huang05137 avatar jinakin avatar lengyxin avatar liuliang-wt avatar mzorec avatar xuegaoge avatar zhaohl2045 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wtm's Issues

selector 多级嵌套问题

我发现,selector不能嵌套使用,不知道能不能解决,通常数据量很多时才需要这样做,简单的commbo就行了。

<wt:selector field="Entity.Id" list-vm="IdList" text-bind="IdList.EntityList[0].Name" val-bind="IdList.EntityList[0].ID" select-button-text="选择">
<wt:searchpanel vm="IdList">
<wt:row items-per-row=" ItemsPerRowEnum.Two">
<wt:selector field="Entity.AId" list-vm="AIdList" text-bind="AIdList.EntityList[0].Name" val-bind="AIdList.EntityList[0].ID" select-button-text="选择" link-field="Entity.StorageLocationId" trigger-url="abc">
<wt:searchpanel vm="AIdList">
<wt:row items-per-row=" ItemsPerRowEnum.Two">
<wt:textbox field="AIdList.Searcher.No" />
<wt:textbox field="AIdList.Searcher.Name" />
<wt:checkbox field="AIdList.Searcher.TypeIds" label-text="类型" items="AIdList.Searcher.AllTypes" />
</wt:row>
</wt:searchpanel>
</wt:selector>
<wt:datetime field="IdList.Searcher.DateRange" range="true" type="Date" />
</wt:row>
</wt:searchpanel>
</wt:selector>

后台返回的弹层 移动端显示不正常

image
就像这样 Dialog宽度超出浏览器

GridActionExtensions类中的函数
image
这里为空则默认800

如果能自动展开最大化是最好的,但是layui 的open好像没有提供这个参数
image
这样移动端看起来是最舒服的。

所以 希望把GridActionExtensions 函数中的
DialogWidth = dialogWidth ?? 800 改成 DialogWidth = dialogWidth;
或者前段的OpenDialog函数中
能添加对宽度的判断,宽度超过浏览器则最大化。

在向导快速配置打包WTM框架下载下来出错了。代码:MSB3086

不能运行,一上来就报错,我用的是vs2019最新版本
警告 NU1608 检测到的包版本在依赖项约束之外: Oracle.EntityFrameworkCore 2.19.30 需要 Microsoft.EntityFrameworkCore.Relational (>= 2.2.4 && < 3.0.0),但版本 Microsoft.EntityFrameworkCore.Relational 3.0.0 已解决。 xxks.Test D:\360极速浏览器下载\xxks\xxks.Test\xxks.Test.csproj 1

警告 NU1608 检测到的包版本在依赖项约束之外: Oracle.EntityFrameworkCore 2.19.30 需要 Microsoft.EntityFrameworkCore.Relational (>= 2.2.4 && < 3.0.0),但版本 Microsoft.EntityFrameworkCore.Relational 3.0.0 已解决。 xxks D:\360极速浏览器下载\xxks\xxks\xxks.csproj 1

错误 MSB3086 任务未能使用 SdkToolsPath“”或注册表项“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\NETFXSDK\4.7.2\WinSDK-NetFx40Tools-x86”找到“al.exe”。请确保已设置 SdkToolsPath,在 SdkToolsPath 之下的相应处理器特定位置存在该工具,并且已安装 Microsoft Windows SDK xxks D:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 3639

建议增加顶部菜单导航设置

前后端分离react版本,当前的实现,菜单的布局在左侧(side-menu),占用了屏幕主区域的不少空间。
建议增加导航菜单在顶部的设置,可以设置导航菜单在顶部显示,如下图:
屏幕快照 2019-04-29 10 40 56

IE8 有问题啊

SCRIPT438: 对象不支持“addEventListener”属性或方法
SCRIPT5009: “jQuery”未定义
SCRIPT5007: 属性“$”的值为 null、未定义或不是 Function 对象

ITreeData 主键

框架更新为自定义主键后,ITreeData接口的ParentId 还是 Guid 类型。

image

前后端分离的问题

介绍上说:“从2.2.8开始,WTM框架开始支持前后端分离的模式”,那现在的版本有前后端分离吗?

ef core生成数据报错

拉取的是master最新源码,我生成的是sqlserver,生成ef报了这个错
线上生成的项目,2.3.9的版本是对的
Add-Migration test
An error occurred while accessing the IWebHost on class 'Program'. Continuing without the application service provider. Error: Object reference not set to an instance of an object.

[Fearure]建议框架增加多租户支持

维基百科中是这样定义多租户的:
软件多租户技术指的是一种软件架构,这种架构可以使用软件的单实例运行并为多个租户提供服务.租户是通过软件实例的特定权限共享通用访问的一组用户.使用多租户架构,软件应用为每个租户提供实例的专用共享,包括实例的数据、配置、用户管理、租户的私有功能和非功能属性.多租户与多实例架构形成对比,将软件实例的行为根据不同的租户分割开来.

关于多租户的支持及实现,可以参考ABP框架:https://cn.abp.io/documents/abp/latest/Multi-Tenancy

外部菜单怎么用?

我的理解是可以在框架中加载一个外部的菜单
但是我发现现在不好用
请求的地址是[http://localhost:53065/#/http://www.baidu.com]
这样的一个地址
请问是否使用方式不对

页面传值必须继承BaseVM

报错信息如下:
System.InvalidOperationException: The model item passed into the ViewDataDictionary is of type 'WalkingTec.Mvvm.Core.BaseVM', but this ViewDataDictionary instance requires a model item of type 'System.Collections.Generic.List`1[DNH.Model.PProductInfo]'.
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.EnsureCompatible(Object value)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary..ctor(ViewDataDictionary source, Object model, Type declaredModelType)
at lambda_method(Closure , ViewDataDictionary )
at Microsoft.AspNetCore.Mvc.Razor.Internal.RazorPagePropertyActivator.CreateViewDataDictionary(ViewContext context)
at Microsoft.AspNetCore.Mvc.Razor.Internal.RazorPagePropertyActivator.Activate(Object page, ViewContext context)
at Microsoft.AspNetCore.Mvc.Razor.RazorPageActivator.Activate(IRazorPage page, ViewContext context)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
at Microsoft.

The captcha doesn't show if deploy the app to the docker.

Here is the exception:

An unhandled exception has occurred while executing the request.
2019-09-05T09:07:51.55414483+08:00 System.TypeInitializationException: The type initializer for 'Gdip' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
2019-09-05T09:07:51.554172912+08:00    at Interop.Libdl.dlopen(String fileName, Int32 flag)
2019-09-05T09:07:51.554189177+08:00    at System.Drawing.SafeNativeMethods.Gdip.LoadNativeLibrary()
2019-09-05T09:07:51.554197875+08:00    at System.Drawing.SafeNativeMethods.Gdip..cctor()
2019-09-05T09:07:51.55420546+08:00    --- End of inner exception stack trace ---
2019-09-05T09:07:51.554213804+08:00    at System.Drawing.SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(Int32 width, Int32 height, Int32 stride, Int32 format, HandleRef scan0, IntPtr& bitmap)
2019-09-05T09:07:51.554222023+08:00    at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
2019-09-05T09:07:51.554229964+08:00    at WalkingTec.Mvvm.Mvc._FrameworkController.GetVerifyCode()

And I found the reason is because microsoft/dotnet images do not contain the native libgdiplus library required by System.Drawing.

Here is the reference : Can't use System.Drawing.Common in microsoft/dotnet:runtime

So it will be good to generate Dockerfile when creating template project.

WTM LAYUI 版功能修改建议

1、 数据权限->新建数据权限->选择用户组
建议修改成弹窗,选择用户组,切弹出可以搜索,且能分页
2、数据权限->修改数据权限->选择用户组
建议修改成弹窗,选择用户组,切弹出可以搜索,且能分页
3、 数据权限->新建数据权限->选择数据权限
建议弹出的数据权限清单,增加按Name搜索的功能,且能分页
4、 数据权限->修改数据权限->选择数据权限
建议弹出的数据权限清单,增加按Name搜索的功能,且能分页
5、用户组管理->数据权限
如果有多个数据权限的情况下,多个必须都填写,不能只填写其中一种数据权限

Failed to load API definition

新版swagger不能正常使用,报错 Failed to load API definition,Internal Server Error /swagger/v1/swagger.json。
1.跟踪调试控制台报错System.NotSupportedException: Ambiguous HTTP method for action - WalkingTec.Mvvm.Admin.Api._ActionLogController.RedoValidation (WalkingTec.Mvvm.Mvc.Admin). Actions require an explicit HttpMethod binding for Swagger 2.0
at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.CreatePathItem(IEnumerable`1 apiDescriptions, ISchemaRegistry schemaRegistry);
2.查看源代码,应该是BaseApiController中,RedoValidation的问题。

为了支持网站前台页面的2个需求建议:

因为实际项目需求中,除了网站后台还需要前台页面配合使用,为了支持这一功能有2个建议:

  • 支持跨域请求,例如www.xxx.com是前台页面,admin.xxx.com是后台页面。
  • 可以自定义路由,例如xxx.com是前台页面,xxx.com/admin是后台页面。

生成ef报错

拉取的是master最新源码,demo中WalkingTec.Mvvm.Demo,生成的是sqlserver,生成ef报了这个错
Add-Migration init
An error occurred while accessing the IWebHost on class 'Program'. Continuing without the application service provider. Error: Object reference not set to an instance of an object.
额...

提示Table 'test.FrameworkUsers' doesn't exist

按照链接http://wtmdoc.walkingtec.cn/setup 生成项目后,在vs中运行报如题错误,猜测应该是没有生成相关的表导致的。数据库用的是mysql,版本号5.7.1,链接字符串已按文档要求设置成Server=120.25.210.45;Database=test;port=3306;uid=root;password=xxxx 格式,该链接字符串通过mysql管理工具,是可以链接到mysql的。是不是不能自动生成数据库?如果不能自动生成,项目中应提供建库脚本,以方便项目的建立,谢谢

[Bug]前后端分离React版本,表单中下拉列表、复选列表数据引用另外一张表的字段时,初始值不正确

1、环境
数据库:PostgreSQL
前后端分离React版本
github上拉的WTM代码,执行里面的WalkingTec.Mvvm.ApiDemo项目
2、执行步骤
1)对Major、Student、School模型依次生成专业管理、学生管理、学校管理的CRUD前后端代码;
2)增加一条学校信息:北京大学,如下图
屏幕快照 2019-04-30 10 35 46

3)增加一条学生信息:张三
屏幕快照 2019-04-30 10 44 52

4)问题:进入专业管理,新增专业,表单中所属学校下拉列表、学生复选框没有显示2)、3)步增加的学校、学生,如下图
屏幕快照 2019-04-30 10 36 08

5)退出前后台程序重新启动运行前后台后,进入专业管理,新增专业,表单中所属学校下拉列表、学生复选框正常显示了之前添加的学生,但是学校还是显示不出来,如下图:

屏幕快照 2019-04-30 11 05 15

Transfer 穿梭框 显示问题

当把 Transfer 穿梭框 的enable-search 改为 false后,就没有滚动条了。
image
显示结果:
image
浏览器版本:
Google Chrome 已是最新版本
版本 77.0.3865.90(正式版本) (64 位)

补充:
发现 提交保存后 不能将值传递回vm中,不能保存到数据库中。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.