12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- angular.module('push')
- .controller('orgInspectListCtrl', function ($scope, $stateParams, UserService, taskModuleService, CommentService, UtilService, $timeout, CommonService) {
- //获取高企预申报页面
- $scope.isuserlist = $stateParams.isuserlist;
- // console.log($stateParams.isuserlist)
- $scope.isShowSearchButton = true;
- $scope.keyfilter = {
- key: ''
- }
- $scope.sortKey = ['createtime', 'totalcount'];
- $scope.sort = $scope.sortKey[0];
- //发布时间最新排序
- $scope.reListByTime = function () {
- $scope.sort = $scope.sortKey[0];
- getInspectList();
- }
- //评分最高排序
- $scope.reListByScore = function () {
- $scope.sort = $scope.sortKey[1];
- getInspectList();
- }
- $scope.getData = function(){
- getInspectList();
- }
- var getInspectList = function () {
- $scope.showLoadingToastUtilEnd()
- taskModuleService.getInspectList(0, $scope.sort, $scope.keyfilter.key, $scope.isuserlist).then(function (res) {
- $scope.hideLoadingToast()
- if (res.code == 3350) {
- $scope.orginspectlist = res.data;
- }
- })
- }
- getInspectList();
- $scope.goToOrgInpect = function () {
- $scope.go('orgInspect');
- }
- $scope.goToOrgInspectDetail = function (orginspect) {
- $scope.go('orgInspectDetail', {orgInspect: JSON.stringify(orginspect), connid: orginspect.id});
- }
- $scope.showSearchButtonLeft = function () {
- $scope.isShowSearchButton = false;
- $timeout(function () {
- $(".showSearchInput").focus();
- }, 300)
- };
- $scope.clearSearch = function () {
- $scope.isShowSearchButton = true;
- $scope.keyfilter.key = '';
- $scope.getData();
- }
- //再次自评
- $scope.reRespectOrg = function(orgInspect){
- //通过对接id寻找对应的自评信息
- taskModuleService.getRespectOrgInfo(orgInspect.id).then(function (res) {
- if(res.code == 3350){
- $scope.highorginspection=JSON.parse(res.data);
- $scope.go('orgInspect', {highorginspection: $scope.highorginspection});
- }
- })
- }
- });
|