Merge pull request 'BUG:日期为空时,显示错误,缺少命名空音引用' (#346) from koy07555/Admin.NET.Pro:代码生成BUG into v2

Reviewed-on: https://code.adminnet.top/Admin.NET/Admin.NET.Pro/pulls/346
This commit is contained in:
zuohuaijun 2025-05-27 16:32:34 +08:00
commit fac3727006
3 changed files with 3 additions and 1 deletions

View File

@ -25,6 +25,7 @@
@if(@Model.NameSpace != "Admin.NET.Core"){
@:using Admin.NET.Core;
}
using Admin.NET.Core.Service;
namespace @(@Model.NameSpace);
public partial class @(@Model.ClassName)Mid

View File

@ -7,6 +7,7 @@
using Admin.NET.Core.Service;
using Microsoft.AspNetCore.Http;
using System.Linq.Expressions;
using Furion.EventBus;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
@{
string joinTableName = "u";

View File

@ -331,7 +331,7 @@ const checkTableColumnVisible = (tableColumnName: any) => {
} else if(@column.EffectType == "EnumSelector") {
@:{ visible: checkTableColumnVisible('@(@Model.LowerClassName):@(@column.LowerPropertyName)'), field: '@column.LowerPropertyName', title: '@column.ColumnComment', minWidth: 100, showOverflow: 'tooltip', slots: { default: 'row_@column.LowerPropertyName' }, @whethersortable },
} else if(@column.EffectType == "DatePicker") {
@:{ visible: checkTableColumnVisible('@(@Model.LowerClassName):@(@column.LowerPropertyName)'), field: '@column.LowerPropertyName', title: '@column.ColumnComment', minWidth: 100, showOverflow: 'tooltip', formatter: ({ cellValue }) => formatDate(new Date(cellValue), 'YYYY-mm-dd HH:MM:SS'), @whethersortable },
@:{ visible: checkTableColumnVisible('@(@Model.LowerClassName):@(@column.LowerPropertyName)'), field: '@column.LowerPropertyName', title: '@column.ColumnComment', minWidth: 100, showOverflow: 'tooltip', formatter: ({ cellValue }) => cellValue==null?'':formatDate(new Date(cellValue), 'YYYY-mm-dd HH:MM:SS'), @whethersortable },
} else {
@:{ visible: checkTableColumnVisible('@(@Model.LowerClassName):@(@column.LowerPropertyName)'), field: '@column.LowerPropertyName', title: '@column.ColumnComment', minWidth: 100, showOverflow: 'tooltip', @whethersortable},
}