gdzc_attributeCtrl.js 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. 'use strict';
  2. /**
  3. * controller for User Profile Example
  4. */
  5. // "$aside", "toaster", "api_bpm_domain", "api_configure_data", "api_cmdb", "api_configure_form",
  6. // app.controller('gdzc_attributeCtrl', ["$rootScope", "$scope", "$http", "$state", "$timeout", "$injector", '$parse', "$interval", "$modal", "$stateParams", "$aside", "SweetAlert", "toaster", "FileUploader", "i18nService", "uiGridConstants", "uiGridGroupingConstants", "Restangular", "api_bpm_domain", "api_configure_data", "api_cmdb", "api_configure_form", function($rootScope, $scope, $http, $state, $timeout, $parse, $injector, $interval, $modal, $stateParams, $aside, SweetAlert, toaster, FileUploader, i18nService, uiGridConstants, uiGridGroupingConstants, Restangular, api_bpm_domain, api_configure_data, api_cmdb, api_configure_form) {
  7. // $scope.getKey=function(){
  8. // api_configure_form.renderTabForm($rootScope.gdzc_label).then(function(data) {
  9. // // console.log(data);
  10. // $scope.getKeydata=data;
  11. // });
  12. // };
  13. // // console.log($rootScope.gdzc_label);
  14. // $scope.getKey();
  15. // $scope.val=function(res){
  16. // if($rootScope.gdzc_item.props[res]==''||$rootScope.gdzc_item.props[res]==undefined){
  17. // return "无"
  18. // }else{
  19. // return $rootScope.gdzc_item.props[res];
  20. // }
  21. // // return res
  22. // };
  23. // // console.log($rootScope.user)
  24. // }]);
  25. app.controller('gdzc_attributeCtrl', ["$rootScope", "$scope", "$http", "$state", "$timeout", "$injector", '$parse', "$interval", "$modal", "$stateParams", "$aside", "SweetAlert", "toaster", "FileUploader", "i18nService", "uiGridConstants", "uiGridGroupingConstants", "Restangular", "api_bpm_domain", "api_configure_data", "api_cmdb", "api_configure_form", function($rootScope, $scope, $http, $state, $timeout, $parse, $injector, $interval, $modal, $stateParams, $aside, SweetAlert, toaster, FileUploader, i18nService, uiGridConstants, uiGridGroupingConstants, Restangular, api_bpm_domain, api_configure_data, api_cmdb, api_configure_form) {
  26. $scope.gdzc_label=$stateParams.gdzc_label1;
  27. $scope.gdzc_item=JSON.parse($stateParams.gdzc_item1);
  28. $scope.gdzc_item.props['hw_createtime']=$scope.gdzc_item.createtime;//创建时间
  29. $scope.gdzc_item.props['hw_updata']=$scope.gdzc_item.lastupdatetime;//更新时间
  30. $scope.gdzc_item.props['hw_change']=$scope.gdzc_item.props.lastupdateperson;//更新人
  31. // console.log($scope.gdzc_item);
  32. // $scope.gdzc_item=$stateParams.gdzc_item;
  33. $scope.getKey=function(){
  34. api_configure_form.renderTabForm($scope.gdzc_label).then(function(data) {
  35. $scope.getKeydata=data;
  36. });
  37. };
  38. $scope.getKey();
  39. $scope.val=function(res){
  40. if($scope.gdzc_item.props[res]==''||$scope.gdzc_item.props[res]==undefined){
  41. return "无"
  42. }else{
  43. return $scope.gdzc_item.props[res];
  44. }
  45. // return res
  46. };
  47. }]);