busQueryRuleController.js 1011 B

1234567891011121314151617181920212223242526272829
  1. var dataRightsJsonApp = angular.module('busQueryRuleApp', [ 'baseServices','DataRightsApp' ]);
  2. dataRightsJsonApp.controller('busQueryRuleCtrl',['$scope','BaseService','dataRightsService','$timeout',function($scope,BaseService,dataRightsService,$timeout){
  3. var service = dataRightsService;
  4. $scope.service = service;
  5. $timeout(function(){
  6. $scope.tab =$("#tab").ligerTab({});
  7. $scope.hasInitTab = 124;
  8. $scope.$digest();
  9. },100)
  10. service.init($scope);
  11. $scope.filterUrl = __ctx + "/platform/bus/busQueryRule/filterDialog.ht?tableName=";
  12. $scope.save = function(){
  13. if ($scope._validForm()) {
  14. service.customFormSubmit();
  15. }
  16. }
  17. $scope._validForm = function (){
  18. var form=$('#dataRightsForm');
  19. if(!form.valid()) return false;
  20. //判断排序字段太多报错问题
  21. if($scope.sortFields&&$scope.sortFields.length>3){
  22. $.ligerDialog.error("排序字段不能设置超过3个,请检查!","提示信息");
  23. $scope.tab.selectTabItem("sortSetting");
  24. return false;
  25. }
  26. return true;
  27. }
  28. }]);