jianchajianyan.js 1.4 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: 10,
  16. responseHandler: function (res) {
  17. // var data = JSON.parse(res.data);
  18. return {
  19. rows: res.data,
  20. // total: data.total
  21. }
  22. },
  23. columns: [{
  24. field: '',
  25. title:'',
  26. formatter: function(val, row, index){
  27. var html = template('info_tmp', row);
  28. return html;
  29. }
  30. },{
  31. field: 'eventDate',
  32. title: '申请时间',
  33. class: 'c-999 pr20',
  34. align: 'right',
  35. formatter: function(val, row, index){
  36. return '<span class="pr10">'+val+'</span>';
  37. }
  38. }],
  39. // onClickRow: function(row, $el){
  40. // document.location.href = "jw-prescription-detail.html?id="+row.id+"&patient="+patient;
  41. // }
  42. })
  43. $("#prescriptTable").bootstrapTable(options);
  44. }
  45. function queryParams(params) {
  46. return {
  47. page: params.offset/params.limit + 1,
  48. pageSize: params.limit,
  49. patient: patient
  50. };
  51. }