handsontable format

parent 40d2f569
......@@ -148,6 +148,27 @@
工作量
</summary>
</member>
<member name="F:Performance.DtoModels.DataFormat.普通格式">
<summary> 普通格式 </summary>
</member>
<member name="F:Performance.DtoModels.DataFormat.小数">
<summary> 小数 </summary>
</member>
<member name="F:Performance.DtoModels.DataFormat.货币">
<summary> 货币 </summary>
</member>
<member name="F:Performance.DtoModels.DataFormat.百分比">
<summary> 百分比 </summary>
</member>
<member name="F:Performance.DtoModels.DataFormat.科学计数">
<summary> 科学计数 </summary>
</member>
<member name="F:Performance.DtoModels.DataFormat.分数">
<summary> 分数 </summary>
</member>
<member name="F:Performance.DtoModels.DataFormat.日期">
<summary> 日期 </summary>
</member>
<member name="P:Performance.DtoModels.PerAgainData.RowNumber">
<summary>
行号
......
......@@ -93,4 +93,21 @@ public enum AgWorkloadType
/// </summary>
Workload = 2,
}
public enum DataFormat
{
/// <summary> 普通格式 </summary>
普通格式,
/// <summary> 小数 </summary>
小数,
/// <summary> 货币 </summary>
货币,
/// <summary> 百分比 </summary>
百分比,
/// <summary> 科学计数 </summary>
科学计数,
/// <summary> 分数 </summary>
分数,
/// <summary> 日期 </summary>
日期
}
}
......@@ -87,13 +87,36 @@ private void InitColumns(List<collect_permission> permissions)
public class HandsonColumn
{
public HandsonColumn(string data, bool readOnly = false)
public HandsonColumn(string data, bool readOnly = false, DataFormat format = DataFormat.普通格式)
{
Data = data;
ReadOnly = readOnly;
switch (format)
{
case DataFormat.普通格式:
Type = "text";
break;
case DataFormat.小数:
Type = "numeric";
NumericFormat = new NumericFormat { Pattern = "0,00.00" };
break;
case DataFormat.百分比:
Type = "numeric";
NumericFormat = new NumericFormat { Pattern = "0,00.00%" };
break;
}
}
public string Data { get; set; }
public bool ReadOnly { get; set; }
public string Type { get; set; }
public NumericFormat NumericFormat { get; set; }
}
public class NumericFormat
{
public string Pattern { get; set; }
}
public class DefalutHandsonHeader
......
......@@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
namespace Performance.Infrastructure
......@@ -55,4 +56,4 @@ public static T GetValue<T>(this SortedDictionary<string, object> keyValues, str
return kv;
}
}
}
}
\ No newline at end of file
using System;
using Performance.DtoModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Performance.Services
{
public enum DataFormat
{
/// <summary> 普通格式 </summary>
普通格式,
/// <summary> 小数 </summary>
小数,
/// <summary> 货币 </summary>
货币,
/// <summary> 百分比 </summary>
百分比,
/// <summary> 科学计数 </summary>
科学计数,
/// <summary> 分数 </summary>
分数,
/// <summary> 日期 </summary>
日期
}
public class RecognitionDataFormat
{
......
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