history_obxList.js 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. layui.use(['layer', 'form','laydate','util', 'table', 'admin', 'ax', 'element'], function () {
  2. var $ = layui.$;
  3. var layer = layui.layer;
  4. var form = layui.form;
  5. var laydate = layui.laydate;
  6. var table = layui.table;
  7. var $ax = layui.ax;
  8. var admin = layui.admin;
  9. var element = layui.element;
  10. press();
  11. //一些事件监听
  12. element.on('tab(demo)', function(data){
  13. console.log(data);
  14. if (data.index === 0){
  15. press();
  16. }
  17. if (data.index === 1){
  18. var spo2His = {
  19. tableId: "spo2Table", //表格id
  20. condition: {
  21. name: "",
  22. timeLimit: ""
  23. }
  24. };
  25. /**
  26. * 初始化表格的列
  27. */
  28. spo2His.initColumn = function () {
  29. return [[
  30. // {type: 'checkbox'},
  31. {field: 'id', hide: true, sort: true, title: 'id'},
  32. {field: 'spo2Value', sort: true, title: '血氧饱和度',width:200},
  33. {field: 'rateValue', sort: true, title: '血氧脉搏值'},
  34. {field: 'perfValue', sort: true, title: '血流灌注指数'},
  35. {field: 'createTime', sort: true, title: '时间'}
  36. ]];
  37. };
  38. // 渲染表格
  39. var tableResult = table.render({
  40. elem: '#' + spo2His.tableId,
  41. url: Feng.ctxPath + '/spo2/pageList?userId='+Feng.getUrlParam("id"),
  42. page: true,
  43. height: "full-158",
  44. cellMinWidth: 100,
  45. cols: spo2His.initColumn()
  46. });
  47. }
  48. if (data.index === 2){
  49. var ecgHis = {
  50. tableId: "ecgTable", //表格id
  51. condition: {
  52. name: "",
  53. timeLimit: ""
  54. }
  55. };
  56. /**
  57. * 初始化表格的列
  58. */
  59. ecgHis.initColumn = function () {
  60. return [[
  61. // {type: 'checkbox'},
  62. {field: 'id', hide: true, sort: true, title: 'id'},
  63. {field: 'heartValue', sort: true, title: '心跳',width:200},
  64. {field: 'respValue', sort: true, title: '呼吸'},
  65. {field: 'vpcValue', sort: true, title: '心室收缩次数'},
  66. {field: 'vpbValue', sort: true, title: '室性过早搏动'},
  67. {field: 'beatsValue', sort: true, title: '漏搏'},
  68. {field: 'createTime', sort: true, title: '时间'}
  69. ]];
  70. };
  71. // 渲染表格
  72. var tableResult = table.render({
  73. elem: '#' + ecgHis.tableId,
  74. url: Feng.ctxPath + '/ecg/pageList?userId='+Feng.getUrlParam("id"),
  75. page: true,
  76. height: "full-158",
  77. cellMinWidth: 100,
  78. cols: ecgHis.initColumn()
  79. });
  80. }
  81. if (data.index === 3){
  82. var ypHis = {
  83. tableId: "ypTable", //表格id
  84. condition: {
  85. name: "",
  86. timeLimit: ""
  87. }
  88. };
  89. /**
  90. * 初始化表格的列
  91. */
  92. ypHis.initColumn = function () {
  93. return [[
  94. // {type: 'checkbox'},
  95. {field: 'id', hide: true, sort: true, title: 'id'},
  96. {field: 'na', sort: true, title: 'na',width:200},
  97. {field: 'cl', sort: true, title: 'cl'},
  98. {field: 'k', sort: true, title: 'k'},
  99. {field: 'bun', sort: true, title: 'bun'},
  100. {field: 'urea', sort: true, title: 'urea'},
  101. {field: 'crea', sort: true, title: 'crea'},
  102. {field: 'glu', sort: true, title: 'glu'},
  103. {field: 'lac', sort: true, title: 'lac'},
  104. {field: 'an_gap', sort: true, title: 'an_gap'},
  105. {field: 'hct', sort: true, title: 'hct'},
  106. {field: 'hb', sort: true, title: 'hb'},
  107. {field: 'ph', sort: true, title: 'ph'},
  108. {field: 'pco2', sort: true, title: 'pco2'},
  109. {field: 'po2', sort: true, title: 'po2'},
  110. {field: 'hco3', sort: true, title: 'hco3'},
  111. {field: 'tco2', sort: true, title: 'tco2'},
  112. {field: 'be', sort: true, title: 'be'},
  113. {field: 'so2', sort: true, title: 'so2'},
  114. {field: 'c_tnl', sort: true, title: 'c_tnl'},
  115. {field: 'h_cg', sort: true, title: 'h_cg'},
  116. {field: 'create_time', sort: true, title: '时间'}
  117. ]];
  118. };
  119. // 渲染表格
  120. var tableResult = table.render({
  121. elem: '#' + ypHis.tableId,
  122. url: Feng.ctxPath + '/ypStat/pageList?userId='+Feng.getUrlParam("id"),
  123. page: true,
  124. height: "full-158",
  125. cellMinWidth: 100,
  126. cols: ypHis.initColumn()
  127. });
  128. }
  129. if (data.index === 4){
  130. var ratioHis = {
  131. tableId: "ratioTable", //表格id
  132. condition: {
  133. name: "",
  134. timeLimit: ""
  135. }
  136. };
  137. /**
  138. * 初始化表格的列
  139. */
  140. ratioHis.initColumn = function () {
  141. return [[
  142. // {type: 'checkbox'},
  143. {field: 'name', sort: true, title: '名称',width:200},
  144. {field: 'value2', sort: true, title: '2分'},
  145. {field: 'value4', sort: true, title: '4分'},
  146. {field: 'value8', sort: true, title: '8分'},
  147. {field: 'value16', sort: true, title: '16分'},
  148. {field: 'value32', sort: true, title: '32分'},
  149. ]];
  150. };
  151. // 渲染表格
  152. var tableResult = table.render({
  153. elem: '#' + ratioHis.tableId,
  154. url: Feng.ctxPath + '/grade/getLevel?id='+Feng.getUrlParam("id"),
  155. page: true,
  156. height: "full-158",
  157. cellMinWidth: 100,
  158. cols: ratioHis.initColumn()
  159. });
  160. }
  161. });
  162. function press() {
  163. var presslHis = {
  164. tableId: "pressTable", //表格id
  165. condition: {
  166. name: "",
  167. timeLimit: ""
  168. }
  169. };
  170. /**
  171. * 初始化表格的列
  172. */
  173. presslHis.initColumn = function () {
  174. return [[
  175. // {type: 'checkbox'},
  176. {field: 'id', hide: true, sort: true, title: 'id'},
  177. {field: 'systValue', sort: true, title: ' 收缩压',width:200},
  178. {field: 'diasValue', sort: true, title: '舒张压'},
  179. {field: '', sort: true, title: '平均动脉压', templet : function (d) {
  180. var s = d.systValue;
  181. var a = d.diasValue;
  182. var avg = (a-s)/3 + a;
  183. return Math.round(avg);
  184. }},
  185. {field: '', sort: true, title: '脑灌注压', templet : function (d) {
  186. var s = d.systValue;
  187. var a = d.diasValue;
  188. var avg = (a-s)/3 + a;
  189. return Math.round(avg - d.icpValue);
  190. }},
  191. {field: 'pulseValue', sort: true, title: '脉率'},
  192. {field: 'icpValue', sort: true, title: '颅内压'},
  193. {field: 'createTime', sort: true, title: '时间'}
  194. ]];
  195. };
  196. // 渲染表格
  197. var tableResult = table.render({
  198. elem: '#' + presslHis.tableId,
  199. url: Feng.ctxPath + '/press/pageList?userId='+Feng.getUrlParam("id"),
  200. page: true,
  201. height: "full-158",
  202. cellMinWidth: 100,
  203. cols: presslHis.initColumn()
  204. });
  205. }
  206. });