yuzd / antmgr Goto Github PK
View Code? Open in Web Editor NEWnetcore+vue mvc role management 快速开发系统(菜单,角色,权限[精确到按钮])
Home Page: https://github.com/yuzd/AntMgr/wiki
License: Apache License 2.0
netcore+vue mvc role management 快速开发系统(菜单,角色,权限[精确到按钮])
Home Page: https://github.com/yuzd/AntMgr/wiki
License: Apache License 2.0
MS Sql的初始化脚本中还有2个小问题。
1 system_role中少2个字段
RoleName和Description,用CodeGen生成成功后代码会报错。
2 插入默认数据的语句,去掉主键列,ms sql默认自增长列是不要显示添加值的,否则脚本会报错,或者关闭自增长的设置,脚本如下:
INSERT INTO dbo.system_menu ( DataChangeLastTime, IsActive, ParentTid, Name, Ico, Url, OrderRule, Level, Class) VALUES ( '2019-05-15 18:59:43.000', 1, 0, '系统管理', null, '#', 3, 1, 'glyphicon glyphicon-cog'); INSERT INTO dbo.system_menu ( DataChangeLastTime, IsActive, ParentTid, Name, Ico, Url, OrderRule, Level, Class) VALUES ( '2019-07-01 13:49:10.000', 1, 1, '菜单管理', null, '~/Home/MenuList', 1, 2, 'fa fa-reorder'); INSERT INTO dbo.system_menu ( DataChangeLastTime, IsActive, ParentTid, Name, Ico, Url, OrderRule, Level, Class) VALUES ( '2019-07-01 13:49:52.000', 1, 1, '权限配置', null, '~/Role/RoleAction', 2, 2, 'fa fa-shield'); INSERT INTO dbo.system_menu ( DataChangeLastTime, IsActive, ParentTid, Name, Ico, Url, OrderRule, Level, Class) VALUES ( '2019-07-01 13:52:58.000', 1, 1, '角色管理', null, '~/Role/RoleList', 3, 2, 'fa fa-th-large'); INSERT INTO dbo.system_menu ( DataChangeLastTime, IsActive, ParentTid, Name, Ico, Url, OrderRule, Level, Class) VALUES ( '2019-07-01 13:53:15.000', 1, 1, '系统用户', null, '~/Account/UserList', 4, 2, 'fa fa-users'); INSERT INTO dbo.system_menu ( DataChangeLastTime, IsActive, ParentTid, Name, Ico, Url, OrderRule, Level, Class) VALUES ( '2019-07-01 13:53:32.000', 1, 1, '代码生成', null, '~/Common/CodeGen', 5, 2, 'fa fa-clone'); INSERT INTO dbo.system_users( DataChangeLastTime, IsActive, Eid, UserName, Pwd, Phone, LoginIp, MenuRights, RoleTid, LastLoginTime, UserAgent, CreateRoleName, CreateUser) VALUES ('2019-05-15 18:59:49.000', 1, 'zdyu', '俞正东', 'e10adc3949ba59abbe56e057f20f883e', '1300000000', '127.0.0.1', null, 0, '2019-07-01 13:47:55.000', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36', null, null);
新增用户配置好权限,再登录时cookie没有取到
什么时候升级到.netcore3.1
缺少SystemMenu和SystemUsers引用 ,没编译成功
数据库可否给全一点,我把他改成MSSQL,数据不全,数据库数据权限表都没有
debug过程中登录以后cookie没有写入,浏览器里没有cookie信息,userAgent是Chrome/6
除了上帝模式的用户可以登录,新增的任何用户都不能登录,userAgent用过Chrome/69,Chrome/88
调用logon接口前端有返回token,这时在浏览器cookie里没有cookie,用上帝模式的用户没有此问题
DbModels.cs文件中增加一个新表,增加一个实体对象后,就可以用代码生成了。生成以后做个微调,不过比较麻烦的是,但是在请求分页list时,DbContext中新表的provider是null,应该是还要在AntEntity中做修改。json配置方式生成代码看似好用,但是确增加了学习成本,总体而言,还不是那么好用。这个框架有点spring data jpa的味道。总体而言还是挺好的。
我設定了兩條SQL連線,我要如何同時都使用?
"ConnectionItemList": [
{
"Name": "PJW_DB",
"ConnectionString": "Data Source=.;Initial Catalog=xxxxxx;User ID=sa;Password=xxxxxxx;MultipleActiveResultSets=true",
"DatabaseType": "Master"
},
{
"Name": "IntranetDB",
"ConnectionString": "Data Source=.;Initial Catalog=xxxxxx;User ID=sa;Password=xxxxxxxxx!;MultipleActiveResultSets=true",
"DatabaseType": "Master"
}
]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.