orgInspectListCtrl.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. angular.module('push')
  2. .controller('orgInspectListCtrl', function ($scope, $stateParams, UserService, taskModuleService, CommentService, UtilService, $timeout, CommonService) {
  3. //获取高企预申报页面
  4. $scope.isuserlist = $stateParams.isuserlist;
  5. // console.log($stateParams.isuserlist)
  6. $scope.isShowSearchButton = true;
  7. $scope.keyfilter = {
  8. key: ''
  9. }
  10. $scope.sortKey = ['createtime', 'totalcount'];
  11. $scope.sort = $scope.sortKey[0];
  12. //发布时间最新排序
  13. $scope.reListByTime = function () {
  14. $scope.sort = $scope.sortKey[0];
  15. getInspectList();
  16. }
  17. //评分最高排序
  18. $scope.reListByScore = function () {
  19. $scope.sort = $scope.sortKey[1];
  20. getInspectList();
  21. }
  22. $scope.getData = function(){
  23. getInspectList();
  24. }
  25. var getInspectList = function () {
  26. $scope.showLoadingToastUtilEnd()
  27. taskModuleService.getInspectList(0, $scope.sort, $scope.keyfilter.key, $scope.isuserlist).then(function (res) {
  28. $scope.hideLoadingToast()
  29. if (res.code == 3350) {
  30. $scope.orginspectlist = res.data;
  31. }
  32. })
  33. }
  34. getInspectList();
  35. $scope.goToOrgInpect = function () {
  36. $scope.go('orgInspect');
  37. }
  38. $scope.goToOrgInspectDetail = function (orginspect) {
  39. $scope.go('orgInspectDetail', {orgInspect: JSON.stringify(orginspect), connid: orginspect.id});
  40. }
  41. $scope.showSearchButtonLeft = function () {
  42. $scope.isShowSearchButton = false;
  43. $timeout(function () {
  44. $(".showSearchInput").focus();
  45. }, 300)
  46. };
  47. $scope.clearSearch = function () {
  48. $scope.isShowSearchButton = true;
  49. $scope.keyfilter.key = '';
  50. $scope.getData();
  51. }
  52. //再次自评
  53. $scope.reRespectOrg = function(orgInspect){
  54. //通过对接id寻找对应的自评信息
  55. taskModuleService.getRespectOrgInfo(orgInspect.id).then(function (res) {
  56. if(res.code == 3350){
  57. $scope.highorginspection=JSON.parse(res.data);
  58. $scope.go('orgInspect', {highorginspection: $scope.highorginspection});
  59. }
  60. })
  61. }
  62. });