comment.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. $(function() {
  2. var ww = $(window).width();
  3. var wh = $(window).height();
  4. var mainbox = $('.ui_mainbox');
  5. if (wh - 76 < 425) {
  6. mainbox.height(425);
  7. } else {
  8. mainbox.height(wh - 76);
  9. }
  10. if (ww > 1600) {
  11. mainbox.width(1600);
  12. $('.ui_button').width(1580);
  13. } else {
  14. mainbox.width(1200);
  15. $('.ui_button').width(1180);
  16. }
  17. //$('.cb,.rb').inputbox();
  18. $(window).resize(function() {
  19. ww = $(window).width();
  20. wh = $(window).height();
  21. if (wh - 76 < 425) {
  22. mainbox.height(425);
  23. } else {
  24. mainbox.height(wh - 76);
  25. }
  26. if (ww > 1600) {
  27. mainbox.width(1600);
  28. } else {
  29. mainbox.width(1200);
  30. }
  31. });
  32. });
  33. angular.module('app',[]).controller('commentExpertCtrl',function($scope,$http){
  34. //获取评审列表
  35. $scope.reviewtasksParm = {
  36. "type":1,
  37. "pageIndex":1,
  38. "pageSize":20
  39. }
  40. $scope.getReviewTasksData = function(){
  41. $http.get(main_host + '/api/EvalCalibrationReviewTasks/'+8,{params:$scope.reviewtasksParm}).success(function(data){
  42. console.log(data);
  43. if(data.success){
  44. $scope.reviewtaskslists = data.map.data.list;
  45. $scope.pageData = {
  46. "pageIndex": data.map.data.pageIndex,
  47. "pageSize": data.map.data.pageSize,
  48. "totalCounts": data.map.data.totalCounts,
  49. "totalPages": data.map.data.totalPages
  50. }
  51. }
  52. });
  53. }
  54. }).factory('frameAjaxInterceptor', function($q, $rootScope) {
  55. return {
  56. 'request': function(config) {
  57. return config;
  58. },
  59. 'requestError': function(rejection) {
  60. return $q.reject(rejection);
  61. },
  62. 'response': function(response) {
  63. return response;
  64. },
  65. 'responseError': function(rejection) {
  66. if (rejection.status == 504) {
  67. var d = dialog({
  68. title: '错误提示',
  69. content: "您超时间未操作,请重新登录本系统",
  70. ok: function() {
  71. document.location.href = '';
  72. },
  73. okValue: '确定'
  74. });
  75. d.showModal();
  76. return $q.reject(rejection);
  77. } else {
  78. return $q.reject(rejection);
  79. }
  80. }
  81. };
  82. }).config(['$httpProvider', function($httpProvider) {
  83. $httpProvider.interceptors.push('frameAjaxInterceptor');
  84. }]);