jry_wxDetailCtrl.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536
  1. 'use strict';
  2. app.controller('wxDetailCtrl', ["$scope", "i18nService", "$rootScope", "$state","$stateParams", "$timeout", "$interval", "$modal", "SweetAlert", "uiGridConstants", "uiGridGroupingConstants", "Restangular", "api_bpm_data", "api_text", "api_user_data","api_wechatfile","api_bpm_domain", function($scope, i18nService, $rootScope, $state,$stateParams, $timeout, $interval, $modal, SweetAlert, uiGridConstants, uiGridGroupingConstants, Restangular, api_bpm_data, api_text, api_user_data,api_wechatfile,api_bpm_domain) {
  3. //保存报修主体
  4. $scope.repairMain = JSON.parse(sessionStorage.getItem("repair_main"));
  5. $scope.wxIncidentWithCmdb = JSON.parse(sessionStorage.getItem("wxIncidentWithCmdb"));//资产
  6. $scope.incidentWithConsumable = JSON.parse(sessionStorage.getItem("incidentWithConsumable"));//耗材
  7. //切换报修主体
  8. // $scope.repairMain.valueconfig = 2;
  9. $scope.model=JSON.parse($stateParams.model);
  10. console.log($scope.model)
  11. $scope.fileUrls=[];
  12. $scope.process=[];
  13. api_wechatfile.listAttachment('wechatRequesterIncident',$scope.model.id).then(function(res){
  14. $scope.fileUrls=res.data
  15. });
  16. if($scope.model.incident){
  17. api_bpm_domain.flowTracingCustom($scope.model.incident.processInstanceId).then(function(res){
  18. console.log(res);
  19. $scope.process=res.data
  20. })
  21. }
  22. $scope.back=function(){
  23. $state.go('app.desk.chart',{})
  24. }
  25. $scope.showBigImg=false;
  26. $scope.showBigImgCli=function(data){
  27. $scope.showBigImg=true;
  28. $scope.bigImgUrl=$rootScope.attachmentAddressSplicing(data)
  29. }
  30. $scope.closeBigImg=function(){
  31. $scope.showBigImg=false
  32. }
  33. }]);