123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- 'use strict';
- /**
- * controller for User Profile Example
- */
- app.controller('processNodeCtr', ["$rootScope", "$scope", "$state", "$timeout", "$interval", "$modal", "SweetAlert", "i18nService", "uiGridConstants", "uiGridGroupingConstants", "Restangular", "api_user_data", "api_login","api_configure_data","api_wechatfile","api_sysinfo", function($rootScope, $scope, $state, $timeout, $interval, $modal, SweetAlert, i18nService, uiGridConstants, uiGridGroupingConstants, Restangular, api_user_data, api_login,api_configure_data,api_wechatfile,api_sysinfo) {
- // $scope.ceshi="哈哈"
- $scope.leftListIdx=0;
- $scope.tableName="报修流程提示设置";
- $scope.listData=[
- {"name":"报修端"},
- {"name":"处理端"}
- ]
- $scope.leftListCli=function(idx,value){
- $scope.leftListIdx=idx;
- $scope.tableName=value.name;
- if(value.name=="报修端"){
- $scope.tableName="报修流程提示设置";
- }else if(value.name=="处理端"){
- $scope.tableName="处理流程提示设置";
- }
- }
- $scope.rRowscatergry=[
- {
- "guding":"",
- "gaidong":"",
- }
- ,
- {
- "guding":"",
- "gaidong":""
- }
- ,
- {
- "guding":"",
- "gaidong":""
- }
- ,
- {
- "guding":"",
- "gaidong":""
- }
- ,
- {
- "guding":"",
- "gaidong":""
- }
- ]
- $scope.getbaoxiu_guding=function(){
- api_wechatfile.getDictionary({
- "key":"wxincident_task",
- "type":"list"
- }).then(function(res){
- for(var i=0;i<5;i++){
- $scope.rRowscatergry[i].guding=res[i];
- }
- })
- }
- $scope.getbaoxiu_guding();
- $scope.getbaoxiu_gaidong=function(){
- api_sysinfo.fetchDataList("dictionary",{
- "idx":0,
- "sum":10,
- "dictionary":{
- "key":"wxincident_task_default"
- }
- }).then(function(res){
- for(var i=0;i<5;i++){
- $scope.rRowscatergry[i].gaidong=res.list[i];
- }
- })
- }
- $scope.getbaoxiu_gaidong();
- $scope.rRowscatergry2=[
- {
- "guding":"",
- "gaidong":"",
- }
- ,
- {
- "guding":"",
- "gaidong":""
- }
- ,
- {
- "guding":"",
- "gaidong":""
- }
- ,
- {
- "guding":"",
- "gaidong":""
- }
- ,
- {
- "guding":"",
- "gaidong":""
- }
- ,
- {
- "guding":"",
- "gaidong":""
- }
- ]
- $scope.getchuli_guding=function(){
- api_wechatfile.getDictionary({
- "key":"incident_task_default",
- "type":"list"
- }).then(function(res){
- for(var i=0;i<6;i++){
- $scope.rRowscatergry2[i].guding=res[i];
- }
- })
- }
- $scope.getchuli_guding();
- $scope.getchuli_gaidong=function(){
- api_sysinfo.fetchDataList("dictionary",{
- "idx":0,
- "sum":10,
- "dictionary":{
- "key":"incident_task"
- }
- }).then(function(res){
- for(var i=0;i<6;i++){
- $scope.rRowscatergry2[i].gaidong=res.list[i];
- }
- })
- }
- $scope.getchuli_gaidong();
- $scope.bxBianji=function(data){
- var modalInstance = $modal.open({
- templateUrl: 'assets/views/system/tpl/processNodeBj.html',
- controller: function($scope, $modalInstance, api_bpm_data) {
- $scope.process=data.guding.name;
- $scope.processTis=data.guding.desc;
- $scope.processBj=data.gaidong.name;
- $scope.processTisBj=data.gaidong.desc;
- $scope.cancel = function() {
- $modalInstance.dismiss('cancel');
- };
- $scope.savercode = function(prioritymatrixdata) {
- if($scope.processBj&&$scope.processTisBj){
- var model={
- "gaidongAll":data.gaidong,
- "gaidongName":$scope.processBj,
- "gaidongDesc":$scope.processTisBj
- };
- data.gaidong.name=$scope.processBj;
- data.gaidong.desc=$scope.processTisBj;
- $modalInstance.close(data.gaidong);
- }else{
- SweetAlert.swal({
- title: "提交失败",
- text: "提交值不能为空!",
- type: "error",
- confirmButtonColor: "#DD6B55"
- });
- }
- };
- }
- });
- modalInstance.result.then(function(data) {
- console.log(data);
- api_sysinfo.addData("dictionary",data).then(function(res){
- if(res.status==200){
- SweetAlert.swal({
- title: "修改成功!",
- type: "success",
- confirmButtonColor: "#007AFF"
- }, function() {
- $scope.getbaoxiu_gaidong();
- $scope.getchuli_gaidong();
- });
- }
- })
- });
- }
- }]);
|