在我使用的代码中,
@*@if (!string.IsNullOrEmpty(Model))
{*@
@(Html.Kendo().Grid<Guardian.Core.Model.ViewModels.MRAprofileGridNew>()
.TableHtmlAttributes(new { @class = "table table-condensed Patient-Grid" })
.Name(gridId)
.ToolBar(tb =>
{
tb.Excel().HtmlAttributes(new { @class = "btn btn-danger btn-xs pull-right " });
})
.Columns(columns =>
{
// foreach (var ColumnName in Model)
// {
// columns.Bound(gl => gl.DBColumnvalue).Title(ColumnName.DBColumnName).Width(200).Filterable(false).Sortable(false);
// }
columns.Bound(team => team.DBColumnName).Title("Team Name");
columns.Bound(team => team.DBColumnvalue);
//foreach (var tem in Model)
//{
// string blabal = tem.DBColumnName.ToString();
// columns.Template(gl => gl.DBColumnvalue[0]).Title(blabal).Width(100);
//}
//columns.Bound(p => p.FirstName).Title("First Name").Width(90);
//columns.Bound(p => p.LastName).Title("Last Name").Width(90);
//columns.Bound(p => p.HICN).Title("HICN").Width(70).HtmlAttributes(new { @class = "text text-left" });
//columns.Bound(p => p.year).Title("Year").Width(50).HtmlAttributes(new { @class = "text text-right" });
//columns.Bound(p => p.ProviderName).Title("Provider Name").Width(200);
//columns.Bound(p => p.ACOID).Title("ACOID").Width(50).HtmlAttributes(new { @class = "text text-left" });
//columns.Bound(p => p.V22MedicalRiskScore).Width(10).HtmlAttributes(new { @class = "text text-right" }).HeaderTemplate("<span class='kh-Grid-tooltip' data-toggle='tooltip' data-placement='top' title='CMS-HCC V22 Risk Score'>CMS-HCC V22 RS</span>");
//columns.Bound(p => p.RxRiskScore).Width(20).HtmlAttributes(new { @class = "text text-right" }).HeaderTemplate("<span class='kh-Grid-tooltip' data-toggle='tooltip' data-placement='top' title='RxRiskScore'>RxRscore</span>");
})
.Excel(excel => excel
.FileName("")
.Filterable(true)
.AllPages(true))
.Filterable()
.Pageable()
.Sortable()
.Events(events => events.DataBound("onDataBoundPreservePatientGrid"))
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(10)
.Read(read => read.Action("RiskScorePatientData", "Reports", new { ACOName = Convert.ToString(ViewBag.CurrAcoName) }))
.ServerOperation(false)
)
.Resizable(resize => resize.Columns(true))
.Reorderable(reorder => reorder.Columns(true))
)
@*}*@
,输出值为
@RequestMapping(value = "/getBlueprintById", method = RequestMethod.GET)
public @ResponseBody BlueprintsMessage find(@FormDataParam("id") String id, final HttpServletResponse response) {
ResponseStatus status = null;
Long blueprintId = Long.parseLong(id);
response.setHeader("Cache-Control", "no-cache");
Iterable<Map<String, Object>> entity = null;
try {
entity = blueprintService.getBlueprintById(blueprintId);
status = new ResponseStatus(ResponseStatusCode.STATUS_OK, "SUCCESS");
} catch (Exception e) {
e.printStackTrace();
}
return new BlueprintsMessage(status, entity);
}
我想删除输出中的{
"blueprint": {
"relation": [
{
"id": 1271,
"relationParam": [
{
"value": "{\"canaries\":\"1\",\"canary_watch_time\":\"30000-180000\",\"update_watch_time\":\"30000-180000\",\"max_in_flight\":\"4\"}"
}
]
}
]
}
}
,输出与\
类型相同。保存到数据库中的值,我只是从DB获取值。