jianchajianyan.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. var request = getRequest(),
  2. patient = request.patient,
  3. totalCount = 0;
  4. $(function(){
  5. getList();
  6. });
  7. function getList(isRefresh){
  8. var options = $.extend(janchaAPI.getListTableAjaxObj, {
  9. queryParams: queryParams,
  10. queryParamsType: "limit",
  11. pagination: true,
  12. paginationLoop: true,
  13. sidePagination: 'server',
  14. pageNumber: 1,
  15. pageSize: 15,
  16. responseHandler: function (res) {
  17. return {
  18. rows: res.data,
  19. total: res.data.length
  20. }
  21. },
  22. columns: [{
  23. field: '',
  24. title:'',
  25. formatter: function(val, row, index){
  26. var html = template('info_tmp', row);
  27. return html;
  28. }
  29. },{
  30. field: 'eventDate',
  31. title: '申请时间',
  32. class: 'c-999 pr20',
  33. align: 'right',
  34. formatter: function(val, row, index){
  35. return '<span class="pr10">'+val+'</span>';
  36. }
  37. }],
  38. onClickRow: function(row, $el){
  39. window.localStorage.setItem('checkRow', JSON.stringify(row));
  40. if(row.dataFrom == 2) {// json格式
  41. document.location.href = "jiuzhenxiangqing.html?patient="+patient;
  42. } else {// xml格式:来源基卫
  43. document.location.href = "jianchajianyan-detail.html?patient="+patient;
  44. }
  45. }
  46. })
  47. $("#prescriptTable").bootstrapTable(options);
  48. }
  49. function queryParams(params) {
  50. return {
  51. page: params.offset/params.limit + 1,
  52. pageSize: params.limit,
  53. patient: patient
  54. };
  55. }