Commit 94e2bd0d by jianshuqin

优化:组件功能

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