Commit ae923ba2 by jianshuqin

优化:组件功能

parent 255d5329
...@@ -95,7 +95,7 @@ namespace Bailun.DC.Services.Component ...@@ -95,7 +95,7 @@ namespace Bailun.DC.Services.Component
{ {
entity = this.Get(queryFilter.Code); entity = this.Get(queryFilter.Code);
} }
if (entity != null && (!string.IsNullOrWhiteSpace(entity.ColumnValue))) if (entity != null && (!string.IsNullOrWhiteSpace(entity.ColumnValue) || entity.ListColumn?.Count() > 0))
{ {
switch (entity.ColumnType) switch (entity.ColumnType)
{ {
...@@ -115,7 +115,7 @@ namespace Bailun.DC.Services.Component ...@@ -115,7 +115,7 @@ namespace Bailun.DC.Services.Component
#region 本地配置 #region 本地配置
case ColumnTypeEnum.Config: case ColumnTypeEnum.Config:
list = DeserializeCollection<dynamic>(entity.ColumnValue).ToList(); list = !string.IsNullOrWhiteSpace(entity.ColumnValue) ? DeserializeCollection<dynamic>(entity.ColumnValue).ToList() : entity.ListColumn.ToList();
break; break;
#endregion #endregion
......
...@@ -135,8 +135,21 @@ ...@@ -135,8 +135,21 @@
} }
} }
break; break;
//日期 //年月
case 'month': case 'month':
var date = new Date();
switch (that.item.defaultValue) {
case "new Date()":
case "curr month()":
date = new Date(date.setDate(1));
break;
case "prev month()":
date = new Date(new Date(date.setMonth(date.getMonth() - 1)).setDate(1));
break;
}
that.$set(that, "item_value", date);
break;
//日期
case 'date': case 'date':
that.$set(that, "item_value", that.item.defaultValue == 'new Date()' ? new Date() : that.item.defaultValue); that.$set(that, "item_value", that.item.defaultValue == 'new Date()' ? new Date() : that.item.defaultValue);
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment