jianchajianyan.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. window.localStorage.setItem('checkRow', JSON.stringify(row));
  41. if(row.dataFrom == 2) {// json格式
  42. document.location.href = "jiuzhenxiangqing.html?patient="+patient;
  43. } else {// xml格式:来源基卫
  44. document.location.href = "jianchajianyan-detail.html?patient="+patient;
  45. }
  46. }
  47. })
  48. $("#prescriptTable").bootstrapTable(options);
  49. }
  50. function queryParams(params) {
  51. return {
  52. page: params.offset/params.limit + 1,
  53. pageSize: params.limit,
  54. patient: patient
  55. };
  56. }