cq-panda / vue.netcore Goto Github PK
View Code? Open in Web Editor NEW(已支持sqlsugar).NetCore、.Net6、Vue2、Vue3、Vite、TypeScript、Element plus+uniapp前后端分离,全自动生成代码;支持移动端(ios/android/h5/微信小程序。http://www.volcore.xyz/
License: MIT License
(已支持sqlsugar).NetCore、.Net6、Vue2、Vue3、Vite、TypeScript、Element plus+uniapp前后端分离,全自动生成代码;支持移动端(ios/android/h5/微信小程序。http://www.volcore.xyz/
License: MIT License
数据字典中定义为查询语句时上传excel会有问题,做了如下修改,你看看怎么改
private static List<CellOptions> GetExportColumnInfo(string tableName, bool temlate = false, bool filterKeyValue = true)
{
//&& x.IsDisplay == 1&&x.IsReadDataset==0只导出代码生器中设置为显示并且不是只读的列,可根据具体业务设置导出列
List<CellOptions> cellOptions = DBServerProvider.DbContext.Set<Sys_TableColumn>()
.Where(x => x.TableName == tableName && x.IsDisplay == 1 && x.IsReadDataset == 0).Select(c => new CellOptions()
{
ColumnName = c.ColumnName,
ColumnCNName = c.ColumnCnName,
DropNo = c.DropNo,
Requierd = c.IsNull > 0 ? false : true,
ColumnWidth = c.ColumnWidth ?? 90
}).ToList();
if (temlate) return cellOptions;
var dicNos = cellOptions.Where(x => !string.IsNullOrEmpty(x.DropNo)).Select(c => c.DropNo);
if (dicNos.Count() == 0) return cellOptions;
List<Sys_Dictionary> dictionaries = DictionaryManager.GetDictionaries(dicNos);
//获取绑定字典数据源下拉框的值
foreach (string dicNo in dicNos.Distinct())
{
Dictionary<string, string> keyValues = null;
if (dictionaries.Find(p => p.DicNo == dicNo).DbSql != string.Empty)//通过查询语句
{
var data = DBServerProvider.SqlDapper.QueryList<KeyValueDto>(dictionaries
.Find(p => p.DicNo == dicNo).DbSql, null).ToList();
if (filterKeyValue)
{
keyValues = data
.Where(w => w.key != w.value)? //key==value相同的则不处理
.ToDictionary(r => r.key, r => r.value);
}
else
{
keyValues = data.ToDictionary(r => r.key, r => r.value);
}
}
else//通过数据字典
{
var query = dictionaries
.Where(x => x.DicNo == dicNo && x.Sys_DictionaryList != null)
.Select(s => s.Sys_DictionaryList);
// .FirstOrDefault()
//.Where(w => (filterKeyValue && w.DicName != w.DicValue)|| !filterKeyValue) //key==value相同的则不处理
// .ToDictionary(r => r.DicValue, r => r.DicName);
if (filterKeyValue)
{
keyValues = query.FirstOrDefault()?
.Where(w => w.DicName != w.DicValue)? //key==value相同的则不处理
.ToDictionary(r => r.DicValue, r => r.DicName);
}
else
{
keyValues = query.FirstOrDefault()?.ToDictionary(r => r.DicValue, r => r.DicName);
}
}
foreach (CellOptions options in cellOptions.Where(x => x.DropNo == dicNo))
{
options.KeyValues = keyValues;
}
}
return cellOptions;
}
}
public class KeyValueDto
{
public string key { get; set; }
public string value { get; set; }
}
执行npm run build 或者 npm run dev 提示 App_Expert.js 报错
ERROR in ./src/extension/appmanager/App_Expert.js Module not found: Error: Can't resolve './App_Expert/App_ExpertModelBody.vue' in 'D:\Project\Vue.NetCore-master\Vol.Vue\src\extension\appmanager' @ ./src/extension/appmanager/App_Expert.js 1:0-56 @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/appmanager/App_Expert.vue @ ./src/views/appmanager/App_Expert.vue @ ./src/router/viewGird.js @ ./src/router/index.js @ ./src/main.js @ multi babel-polyfill ./src/main.js
Vue.NetCore/Vue.Net/VOL.Core/Dapper/SqlDapper.cs
增加,修改,删除方法都直接return true;没有具体实现
因为iview中form的validate是异步的Promise,故直接返回的话校验形同虚设了,但在有些浏览器是有效的,Google Chrome 版本 75.0.3770.100(正式版本) (64 位),这个版本就有问题。
原因如下:
就是直接返回Promise:
validate() {
return this.$refs["formValidate"].validate(valid => {
if (!valid) {
this.$Message.error("数据验证未通过!");
}
return valid;
});
}
但返回Promise的话,所有调用validate的方法都要改了:
rslt.then(res => {
if (res) {
// doSomething 就这样就OK了
}
});
不知道有没有更好的方法
update to net core 3.0
当前默认值为100,有时需要稍微宽一点,多谢!
是否有支持一个用户多个角色的计划?
系统没有配置好编辑的数据,请检查model!
日志批量写入数据时出错: The used command is not allowed with this MySQL version.
感谢作者,太给力了,学习一下
"DbConnectionString": "Data Source=MYMSSQLSERVER;Initial Catalog=netcoredev;Persist Security Info=True;User ID=sa;Password=;Connect Timeout=500;",
使用优化后的代码生成器 del 时 出现Exception has been thrown by the target of an invocation.System.NullReferenceException: Object reference not set to an instance of an object.↵ at VOL.Core.BaseProvider.ServiceBase2.Del(Object[] keys, Boolean delList) in /Users/admin/Documents/Vue.NetCore/Vue.Net2.23/VOL.Core/BaseProvider/ServiceBase.cs:line 896 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)↵ at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)↵ at VOL.Core.Controllers.Basic.BaseController
1.InvokeService(String methodName, Object[] parameters) in /Users/admin/Documents/Vue.NetCore/Vue.Net2.23/VOL.Core/Controllers/Basic/BaseController.cs:line 170↵ at VOL.Core.Controllers.Basic.BaseController1.<>c__DisplayClass19_0.<Del>b__0() in /Users/admin/Documents/Vue.NetCore/Vue.Net2.23/VOL.Core/Controllers/Basic/BaseController.cs:line 136↵ at System.Threading.Tasks.Task
1.InnerInvoke()↵ at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)↵--- End of stack trace from previous location where exception was thrown ---↵ at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)↵--- End of stack trace from previous location where exception was thrown ---↵ at VOL.Core.Controllers.Basic.BaseController1.Del(Object[] keys) in /Users/admin/Documents/Vue.NetCore/Vue.Net2.23/VOL.Core/Controllers/Basic/BaseController.cs:line 136↵ at VOL.Core.Controllers.Basic.ApiBaseController
1.Del(Object[] keys) in /Users/admin/Documents/Vue.NetCore/Vue.Net2.23/VOL.Core/Controllers/Basic/ApiBaseController.cs:line 110↵ at lambda_method(Closure , Object )↵ at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()↵ at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)↵ at System.Threading.Tasks.ValueTask`1.get_Result()↵ at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()↵ at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()↵ at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)↵ at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)↵ at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()↵ at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()↵ at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)↵ at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)↵ at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()↵ at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()↵ at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)↵ at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.InvokeCore(HttpContext context)↵ at VOL.Core.Middleware.ExceptionHandlerMiddleWare.Invoke(HttpContext context) in /Users/admin/Documents/Vue.NetCore/Vue.Net2.23/VOL.Core/Middleware/ExceptionHandlerMiddleWare.cs:line 26
目前是不是不支持导航属性,请问如果我想要在主表编辑界面把导航属性中部分字段显示出来如何实现?
请问代码生成器中填写 表名*:Wechat 实际表名:wx_wechat
生成实体和服务类都是Wechat命名,这样好看些 (不想到处都是wx_wechat命名文件和类)
实体Wechat类属性
[Entity(TableCnName = "公众号信息",TableName = "wx_wechat")]
说明tableName对了得(wx_wechat)
但是实际执行得时候 tablename是Wechat
说明取值并不是我填写得 "实际表名". 而是取值 "表名*"
提问: 应该判断 可选填"实际表名"空时,才取值"表名*" ?
左侧导航栏不支持折叠,希望支持hamberge样式 折叠后只显示图标
.NET Core 3.1发布了,大神,什么时候后台升级成3.1的版本
ef感觉灵活,很笨
在linux下使用用在线代码生成器后,只能生成业务类,其他Vue,modele,model均无法生成。
能否增加:下拉树,多选输入款~~~
各项目文件中配置项&lgPackageReference Include="Microsoft.AspNetCore.App" Version="2.1.5"/> 指定了版本号,vs2019编译会触发警告CS1701(不应指定版本号)。
删除版本号,并在VOL.Order项目文件添加&lgPackageReference Include="Microsoft.AspNetCore.App" >引用,解决方案可以编译通过(运行加载2.1.14版),但在vs2017中编译报错NU1107(版本冲突)。
头像的img 中图像加载了,但不显示,iview 中有专门的头像组件使用,同时iview 已经升级到4.0了
有微信群或者QQ群吗,方便交流啊
vue权限分配对不同的用户不起作用
前端什么时候能升级到Vue/cli3
在VOL.WebApi\Controllers\AppManager\Partial对应文件增加接口后,访问出现404错误,如http://127.0.0.1:8080/health/test
[HttpGet, Route("test")]
public IActionResult test()
{
return Ok("test");
}
本地测试,个人中心不能换头像
建议仓库在gitee中开一个,github 在国内这速度真是无语了
能否用参数控制,数据库表主键参数,比如MSSQL 支持自增,GUID或其他方式。
多表关联,数据恢复等,自增不是很灵活。
今天更新的相应的数据库文件更新了没?
不好意思,又来一个问题。
数据字典的方式绑定下拉框是个非常好用的特性。我的问题是,需要绑定的数据来自某个数据量比较大的表,怎样自动绑定是否能类似于根据数据的字符自动过滤或查询,设想应该是通过API的方式绑定?没有看到相关例子,请教下这个该如何实现
多谢 !
table,表单一对多,图表等在主菜单中未显示出来,dome网站中有,貌似一个账号只能在一个地方登陆是不是?
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.