<% layout('/layouts/default.html', {title: '健康知识管理', libs: ['dataGrid']}){ %>
< divclass = " main-content" > < divclass = " box box-main" > < divclass = " box-header" > < divclass = " box-title" > < iclass = " fa icon-notebook" > </ i> </ div> < divclass = " box-tools pull-right" > < ahref = " #" class = " btn btn-default" id = " btnSearch" title = " ${text('查询')}" > < iclass = " fa fa-filter" > </ i> </ a> < ahref = " ${ctx}/health/health/form" class = " btn btn-default btnTool" title = " ${text('新增健康知识')}" > < iclass = " fa fa-plus" > </ i> </ a> < ahref = " #" class = " btn btn-default" id = " btnSetting" title = " ${text('设置')}" > < iclass = " fa fa-navicon" > </ i> </ a> </ div> </ div> < divclass = " box-body" > < #form: formid = " searchForm" model = " ${health}" action = " ${ctx}/health/health/listData" method = " post" class = " form-inline hide" data-page-no = " ${parameter.pageNo}" data-page-size = " ${parameter.pageSize}" data-order-by = " ${parameter.orderBy}" > < divclass = " form-group" > < labelclass = " control-label" > </ label> < divclass = " control-inline" > < #form: inputpath = " healthKnowleage" class = " form-control width-120" /> </ div> </ div> < divclass = " form-group" > < buttontype = " submit" class = " btn btn-primary btn-sm" > < iclass = " glyphicon glyphicon-search" > </ i> </ button> < buttontype = " reset" class = " btn btn-default btn-sm isQuick" > < iclass = " glyphicon glyphicon-repeat" > </ i> </ button> </ div> </ #form: form> < tableid = " dataGrid" > </ table> < divid = " dataGridPage" > </ div> </ div> </ div> </ div> < script> 
$ ( '#dataGrid' ) . dataGrid ( { searchForm :  $ ( '#searchForm' ) , columnModel :  [ { header : '${text("健康知识")}' ,  name : 'healthKnowleage' ,  index : 'a.health_knowleage' ,  width : 150 ,  align : "left" ,  frozen : true ,  formatter :  function ( val,  obj,  row,  act ) { return  '<a href="${ctx}/health/health/form?healthCode=' + row. healthCode+ '" class="btnList" data-title="${text("编辑健康知识")}">' + ( val|| row. id) + '</a>' ; } } , { header : '${text("操作")}' ,  name : 'actions' ,  width : 120 ,  formatter :  function ( val,  obj,  row,  act ) { var  actions =  [ ] ; actions. push ( '<a href="${ctx}/health/health/form?healthCode=' + row. healthCode+ '" class="btnList" title="${text("编辑健康知识")}"><i class="fa fa-pencil"></i></a> ' ) ; actions. push ( '<a href="${ctx}/health/health/delete?healthCode=' + row. healthCode+ '" class="btnList" title="${text("删除健康知识")}" data-confirm="${text("确认要删除该健康知识吗?")}"><i class="fa fa-trash-o"></i></a> ' ) ; return  actions. join ( '' ) ; } } ] , ajaxSuccess :  function ( data ) { } 
} ) ; 
 </ script> CREATE  TABLE  ` health` ( ` health_code` varchar ( 100 )  NOT  NULL  COMMENT  '编号' , ` health_knowleage` text  COMMENT  '健康知识' , PRIMARY  KEY  ( ` health_code` ) 
)  ENGINE = InnoDB  DEFAULT  CHARSET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '健康知识' ; INSERT  INTO  ` jeesite` . ` health` ( ` health_code` ,  ` health_knowleage` )  VALUES  ( '1' ,  '如果牛奶不喝,就喝酸奶;酸奶不喝,就喝豆浆;如果牛奶、酸奶、豆浆都不喝,那就等死了。' ) ; 
INSERT  INTO  ` jeesite` . ` health` ( ` health_code` ,  ` health_knowleage` )  VALUES  ( '2' ,  '鹿群没有了敌人,越来越胖,是狼救了它们。' ) ; 
INSERT  INTO  ` jeesite` . ` health` ( ` health_code` ,  ` health_knowleage` )  VALUES  ( '3' ,  '每日250克碳水就能调控体重。' ) ; 
INSERT  INTO  ` jeesite` . ` health` ( ` health_code` ,  ` health_knowleage` )  VALUES  ( '4' ,  '为什么广东人瘦,饭前喝汤。饭后喝汤,越喝越胖。' ) ; 
INSERT  INTO  ` jeesite` . ` health` ( ` health_code` ,  ` health_knowleage` )  VALUES  ( '5' ,  '获得“健康食品”的殊荣,世界上仅有两种:黄豆和燕麦。' ) ; 
INSERT  INTO  ` jeesite` . ` health` ( ` health_code` ,  ` health_knowleage` )  VALUES  ( '6' ,  '每顿不能吃太饱。' ) ; 
INSERT  INTO  ` jeesite` . ` health` ( ` health_code` ,  ` health_knowleage` )  VALUES  ( '7' ,  '水果、蔬菜,预防癌症最好。' ) ; 
INSERT  INTO  ` jeesite` . ` health` ( ` health_code` ,  ` health_knowleage` )  VALUES  ( '8' ,  '红黄色蔬菜-维生素A之最。' ) ; 
INSERT  INTO  ` jeesite` . ` health` ( ` health_code` ,  ` health_knowleage` )  VALUES  ( '9' ,  '饮料里茶最好,茶叶当中绿茶最好。' ) ; 
INSERT  INTO  ` jeesite` . ` health` ( ` health_code` ,  ` health_knowleage` )  VALUES  ( '10' ,  '吃了一个半月黑木耳,3个血管都通了。' ) ; 
INSERT  INTO  ` jeesite` . ` health` ( ` health_code` ,  ` health_knowleage` )  VALUES  ( '11' ,  '少纤维,少运动,能不便秘?广播操,多按摩,保你健康。' ) ;