Commit 94e2bd0d by jianshuqin

优化:组件功能

parent c0c9cd12
...@@ -40,11 +40,11 @@ ...@@ -40,11 +40,11 @@
/// <summary> /// <summary>
/// 是否管理员可见:(默认否) /// 是否管理员可见:(默认否)
/// </summary> /// </summary>
public bool IsSys { get; set; } public bool? IsSys { get; set; }
/// <summary> /// <summary>
/// 是否只有开发可见:(默认是) /// 是否只有开发可见:(默认是)
/// </summary> /// </summary>
public bool IsDevelop { get; set; } public bool? IsDevelop { get; set; }
} }
} }
...@@ -68,10 +68,10 @@ namespace Bailun.DC.Services.Component ...@@ -68,10 +68,10 @@ namespace Bailun.DC.Services.Component
{ {
id = dto.Id, id = dto.Id,
parentid = dto.ParentId ?? 0, parentid = dto.ParentId ?? 0,
name = dto.Name, name = dto.Name ?? string.Empty,
icon = dto.Icon, icon = dto.Icon ?? string.Empty,
is_develop = dto.IsDevelop, is_develop = dto.IsDevelop ?? false,
is_sys = dto.IsSys, is_sys = dto.IsSys ?? false,
path = dto.Path ?? string.Empty, path = dto.Path ?? string.Empty,
sort = dto.Sort ?? 0, sort = dto.Sort ?? 0,
delstatus = false delstatus = false
......
...@@ -157,7 +157,14 @@ ...@@ -157,7 +157,14 @@
break; break;
//日期 //日期
case 'date': case 'date':
that.$set(that, "item_value", that.item.defaultValue == 'new Date()' ? new Date() : that.item.defaultValue); var date = new Date();
switch (that.item.defaultValue) {
case "prev Date()":
case "prev date()":
date = new Date(date.setDate(date.getDate() - 1));
break;
}
that.$set(that, "item_value", date);
break; break;
case 'daterange': case 'daterange':
var date = new Date(); var date = new Date();
......
...@@ -29,6 +29,10 @@ ...@@ -29,6 +29,10 @@
case "new Date()": case "new Date()":
date = l.type == "daterange" ? [new Date(), new Date()] : date; date = l.type == "daterange" ? [new Date(), new Date()] : date;
break; break;
case "prev Date()":
case "prev date()":
date = new Date(date.setDate(date.getDate() - 1));
break;
case "curr day()": case "curr day()":
date = [new Date(date.setDate(date.getDate() - date.getDay() + 1)), new Date(date.setDate(date.getDate() - date.getDay() + 7))]; date = [new Date(date.setDate(date.getDate() - date.getDay() + 1)), new Date(date.setDate(date.getDate() - date.getDay() + 7))];
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