history_list.js 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. layui.use(['layer', 'form','laydate','util', 'table', 'admin', 'ax'], 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. /**
  10. * 系统管理--消息管理
  11. */
  12. var MilitaryMedicalHis = {
  13. tableId: "militaryTable", //表格id
  14. condition: {
  15. name: "",
  16. timeLimit: ""
  17. }
  18. };
  19. /**
  20. * 初始化表格的列
  21. */
  22. MilitaryMedicalHis.initColumn = function () {
  23. return [[
  24. // {type: 'checkbox'},
  25. {field: 'index_id', hide: true, sort: true, title: 'index_id'},
  26. {field: 'create_time', sort: true, title: '时间',width:200},
  27. {field: 'name', sort: true, title: '姓名'},
  28. {field: 'index_movement', sort: true, title: '运动指标'},
  29. {field: 'tong_reflect', sort: true, title: '瞳孔反射'},
  30. {field: 'tong_change', sort: true, title: '瞳孔变化'},
  31. {field: 'index_xz', sort: true, title: '血肿体积 '},
  32. {field: 'index_nzx', sort: true, title: '脑中线偏移距离'},
  33. {field: 'index_zwm', sort: true, title: '蛛网膜下腔出血'},
  34. {field: 'index_hckd', sort: true, title: '环池平均宽度'},
  35. {field: 'index_xt', sort: true, title: '血糖'},
  36. {field: 'index_nl', sort: true, title: '颅内压'},
  37. {field: 'index_dmy', sort: true, title: '动脉压脑灌'},
  38. {field: 'index_hx', sort: true, title: '呼吸'},
  39. {field: 'avgmy', sort: true, title: '平均动脉压'},
  40. {field: 'ngzy', sort: true, title: '脑灌注压'},
  41. {field: 'tw', sort: true, title: '体温'},
  42. {align: 'center', toolbar: '#tableBar', title: '心电图'},
  43. {field: 'sum_value', sort: true, title: '评分'}
  44. ]];
  45. };
  46. // 渲染表格
  47. var tableResult = table.render({
  48. elem: '#' + MilitaryMedicalHis.tableId,
  49. url: Feng.ctxPath + '/index/pageList?id='+Feng.getUrlParam("id"),
  50. page: true,
  51. height: "full-158",
  52. cellMinWidth: 100,
  53. cols: MilitaryMedicalHis.initColumn()
  54. });
  55. /**
  56. * 跳转心电图页面
  57. * @param data
  58. */
  59. MilitaryMedicalHis.openHistory = function(data){
  60. admin.putTempData('formOk', false);
  61. top.layui.admin.open({
  62. type: 2,
  63. title: '心电图',
  64. area: ['70%', '60%'],
  65. content: Feng.ctxPath + '/index/history_xd?indexId='+data.index_id,
  66. end: function () {
  67. admin.getTempData('formOk') && table.reload(MilitaryMedicalHis.tableId);
  68. }
  69. });
  70. };
  71. // 工具条点击事件
  72. table.on('tool(' + MilitaryMedicalHis.tableId + ')', function (obj) {
  73. var data = obj.data;
  74. var layEvent = obj.event;
  75. if (layEvent === 'xdHistory') {
  76. MilitaryMedicalHis.openHistory(data);
  77. }
  78. });
  79. // 导出病况数据excel
  80. $('#btn').click(function () {
  81. //location.href = '/index/exportTechParse';
  82. var ajax = new $ax(Feng.ctxPath + "/index/exportTechParse?id="+Feng.getUrlParam("id"));
  83. var result = ajax.start();
  84. console.log(result.data);
  85. window.location.href = result.data
  86. });
  87. });