seimin 2 年之前
父节点
当前提交
73b8d4b23d

+ 1 - 0
assets/js/config.constant.js

@@ -115,6 +115,7 @@ app.constant('JS_REQUIRES', {
115 115
         'nxreportCtrl': 'assets/js/controllers/report/nxreportCtrl.js',
116 116
         'childpapeCtrl': 'assets/js/controllers/report/childpapeCtrl.js',
117 117
         //*** inspect 
118
+        'integralCtrl': 'assets/js/controllers/inspect/integralCtrl.js',
118 119
         'inspectPlanCtrl': 'assets/js/controllers/inspect/inspectPlanCtrl.js',
119 120
         'inspectReportCtrl': 'assets/js/controllers/inspect/inspectReportCtrl.js',
120 121
         'inspectListCtrl': 'assets/js/controllers/inspect/inspectListCtrl.js',

+ 12 - 0
assets/js/config.router.js

@@ -1411,6 +1411,18 @@ app.config(['$authProvider', '$httpProvider', '$stateProvider', '$urlRouterProvi
1411 1411
                 }
1412 1412
             })
1413 1413
 
1414
+            //管理事件>积分管理
1415
+            .state('app.incident.integral', {
1416
+                url: '/integral',
1417
+                templateUrl: "assets/views/inspect/integral.html",
1418
+                resolve: loadSequence('jquery-nestable-plugin', 'ng-nestable', 'ui.select', 'angularBootstrapNavTree', 'multi.select.tree', 'ckeditor-plugin', 'ckeditor', 'angularFileUpload', 'spin', 'ladda', 'angular-ladda', 'ui.grid', 'integralCtrl'),
1419
+                title: 'integral.LIST',
1420
+                icon: 'ti-list',
1421
+                ncyBreadcrumb: {
1422
+                    label: 'integral list'
1423
+                }
1424
+            })
1425
+
1414 1426
             //巡检管理>巡检报告
1415 1427
             .state('app.inspection.inspectReport', {
1416 1428
                 url: '/inspectReport',

+ 291 - 51
assets/js/controllers/customform/customformCtrl.js

@@ -20733,6 +20733,7 @@ appFormly.controller("CustomformCtrl", [
20733 20733
   "api_statistic",
20734 20734
   "up_down_file",
20735 20735
   "fileReader",
20736
+  "api_wechatfile",
20736 20737
   function (
20737 20738
     $rootScope,
20738 20739
     $scope,
@@ -20760,7 +20761,8 @@ appFormly.controller("CustomformCtrl", [
20760 20761
     api_user_data,
20761 20762
     api_statistic,
20762 20763
     up_down_file,
20763
-    fileReader
20764
+    fileReader,
20765
+    api_wechatfile
20764 20766
   ) {
20765 20767
     //console.log($parse('Restangular')($scope));
20766 20768
     //console.log($injector.get('Restangular'));
@@ -21606,6 +21608,7 @@ appFormly.controller("CustomformCtrl", [
21606 21608
               });
21607 21609
             } else {
21608 21610
               console.log($scope.formData.url, "zzzz");
21611
+              var integralMechanism = sessionStorage.getItem('integralMechanism');
21609 21612
               switch ($scope.formData.url) {
21610 21613
                 case "start":
21611 21614
                   vm.model["initUser"] = $rootScope.user.id;
@@ -21675,13 +21678,6 @@ appFormly.controller("CustomformCtrl", [
21675 21678
                   //处理请求数据0327
21676 21679
                   var data0327 = JSON.parse(JSON.stringify(vm.model));
21677 21680
                   delete data0327.repairType;
21678
-                  // 增加地点的请求参数2020年4月24日10:44:36
21679
-                  // console.log($scope.$parent.$parent.$parent.$parent.$parent.$parent.selecthouseNumber,'2020年4月24日20:24:10');
21680
-                  // if($scope.$parent.$parent.$parent.$parent.$parent.$parent.selecthouseNumber){
21681
-                  //     data0327.incident.place = {
21682
-                  //         id:$scope.$parent.$parent.$parent.$parent.$parent.$parent.selecthouseNumber.id
21683
-                  //     }
21684
-                  // }
21685 21681
                   if (data0327.start_code == "close") {
21686 21682
                     data0327.incident.directProcess = 1;
21687 21683
                   }
@@ -21693,10 +21689,94 @@ appFormly.controller("CustomformCtrl", [
21693 21689
                       data0327.incident.callID = paramsModel.model.incident.sockid;
21694 21690
                     }
21695 21691
                   }
21696
-                  api_bpm_domain
21692
+                  // --------------------------- start----------------------------------------
21693
+                  // 积分机制,直接处理
21694
+                  if(vm.model.start_code == "close"&&(integralMechanism == 1 || (integralMechanism == 2 && $rootScope.user.userType.value == 2))){
21695
+                    $modal.open({
21696
+                      templateUrl: 'assets/views/incident/tpl/toIntegralMechanism.tpl.html',
21697
+                      controller: function ($scope, $modalInstance, api_bpm_domain, incidentData, currentUserId, Alert, api_user_data,api_wechatfile,scope) {
21698
+                          console.log(incidentData,currentUserId);
21699
+                          $scope.flag = false;
21700
+                          $scope.complexityConfirm = {complexity:null,updateReason:''};
21701
+                          $scope.complexityFn = function(category){
21702
+                            if(category.complexity){
21703
+                              return category.complexity.value;
21704
+                            }else if(category.parent){
21705
+                              return $scope.complexityFn(category.parent);
21706
+                            }else{
21707
+                              return $scope.list[0]?$scope.list[0].value:1;
21708
+                            }
21709
+                          }
21710
+                          $scope.list = [];
21711
+                          api_wechatfile.getDictionary({"key":"incident_complexity","type":"list"}).then(function(res){
21712
+                            $scope.list = res;
21713
+                            $scope.complexity = $scope.complexityFn(incidentData.category);
21714
+                            $scope.complexityConfirm.complexity = $scope.list.find(v=>v.value == $scope.complexity);
21715
+                          })
21716
+                          $scope.onChangeComplexity = function(item){
21717
+                            
21718
+                          }
21719
+                          $scope.ok = function () {
21720
+                              if (!$scope.complexityConfirm.complexity){
21721
+                                  Alert.swal({
21722
+                                      title: "操作失败",
21723
+                                      text: "请选择工时!",
21724
+                                      type: "error"
21725
+                                  });
21726
+                                  return;
21727
+                              }
21728
+                              if ($scope.complexityConfirm.complexity.value != $scope.complexity&&!$scope.complexityConfirm.updateReason.trim()){
21729
+                                  Alert.swal({
21730
+                                      title: "操作失败",
21731
+                                      text: "请填写升级原因!",
21732
+                                      type: "error"
21733
+                                  });
21734
+                                  return;
21735
+                              }
21736
+                              $modalInstance.close('success');
21737
+                              handlerStart();
21738
+                              scope.complexity = $scope.complexity;
21739
+                              scope.complexityConfirm = $scope.complexityConfirm;
21740
+                              // 暂存--后面直接处理后调用积分接口
21741
+                          }
21742
+                          $scope.cancel = function () {
21743
+                              scope.ldloading.expand_right = false;
21744
+                              $modalInstance.dismiss('cancel');
21745
+                          }
21746
+                      },
21747
+                      size: 'sm',
21748
+                      resolve: {
21749
+                          scope: function () {
21750
+                              return $scope;
21751
+                          },
21752
+                          api_bpm: function () {
21753
+                              return api_bpm;
21754
+                          },
21755
+                          incidentData: function () {
21756
+                              return data0327.incident;
21757
+                          },
21758
+                          currentUserId: function () {
21759
+                              return loginUser.id;
21760
+                          },
21761
+                          Alert: function () {
21762
+                              return SweetAlert;
21763
+                          },
21764
+                          api_user_data: function () {
21765
+                              return api_user_data;
21766
+                          },
21767
+                          api_wechatfile: function () {
21768
+                              return api_wechatfile;
21769
+                          }
21770
+                      }
21771
+                    });
21772
+                }else{
21773
+                  handlerStart();
21774
+                }
21775
+                  // -------------------------------end------------------------------------
21776
+                  function handlerStart(){
21777
+                    api_bpm_domain
21697 21778
                     .start(pdKey, data0327)
21698 21779
                     .then(function (response) {
21699
-                      // console.log("response="+JSON.stringify(response));
21700 21780
                       if (response) {
21701 21781
                         var resData = Restangular.stripRestangular(response);
21702 21782
                         if (resData) {
@@ -21729,27 +21809,76 @@ appFormly.controller("CustomformCtrl", [
21729 21809
                             }
21730 21810
                           }
21731 21811
                         }
21732
-
21733
-                        SweetAlert.swal(
21734
-                          {
21735
-                            title: "提交成功!",
21736
-                            type: "success",
21737
-                            confirmButtonColor: "#007AFF",
21738
-                          },
21739
-                          function () {
21740
-                            if (
21741
-                              vm.model.incident &&
21742
-                              vm.model.incident.callID &&
21743
-                              vm.model.incident.callID != ""
21744
-                            ) {
21745
-                              $rootScope.app.layout.isSidebarClosed = false;
21746
-                              if ($scope.login && !$rootScope.busy) {
21747
-                                $rootScope.setidle();
21812
+                        if(vm.model.start_code == "close"&&(integralMechanism == 1 || (integralMechanism == 2 && $rootScope.user.userType.value == 2))){
21813
+                          api_wechatfile.getDictionary({"key":"incident_integral_state","type":"list"}).then(function(res){
21814
+                            var auditState = res.find(v=>v.value == 0);
21815
+                            var postData = { 
21816
+                              incidentIntegral: {
21817
+                                incidentId:resData.bussId,
21818
+                                auditState:auditState,
21819
+                                handlerUser:$rootScope.user.id,
21820
+                                handlerUserName:$rootScope.user.name,
21821
+                                sourceScore:$scope.complexity,
21822
+                                currentScore:$scope.complexityConfirm.complexity.value,
21823
+                                updateReason:$scope.complexityConfirm.updateReason.trim() || undefined,
21748 21824
                               }
21749 21825
                             }
21750
-                            $state.go($scope.formData.cancelUrl);
21751
-                          }
21752
-                        );
21826
+                            console.log(postData)
21827
+                            api_bpm_data.addData('incidentIntegral', postData).then(function (response) {
21828
+                                console.log(response)
21829
+                                if (response.status == 200) {
21830
+                                  SweetAlert.swal(
21831
+                                    {
21832
+                                      title: "提交成功!",
21833
+                                      type: "success",
21834
+                                      confirmButtonColor: "#007AFF",
21835
+                                    },
21836
+                                    function () {
21837
+                                      if (
21838
+                                        vm.model.incident &&
21839
+                                        vm.model.incident.callID &&
21840
+                                        vm.model.incident.callID != ""
21841
+                                      ) {
21842
+                                        $rootScope.app.layout.isSidebarClosed = false;
21843
+                                        if ($scope.login && !$rootScope.busy) {
21844
+                                          $rootScope.setidle();
21845
+                                        }
21846
+                                      }
21847
+                                      $state.go($scope.formData.cancelUrl);
21848
+                                    }
21849
+                                  );
21850
+                                } else {
21851
+                                    Alert.swal({
21852
+                                        title: "操作失败",
21853
+                                        text: "操作失败, 请稍后再试!",
21854
+                                        type: "error"
21855
+                                    });
21856
+                                }
21857
+                            });
21858
+                          })
21859
+                        }else{
21860
+                          SweetAlert.swal(
21861
+                            {
21862
+                              title: "提交成功!",
21863
+                              type: "success",
21864
+                              confirmButtonColor: "#007AFF",
21865
+                            },
21866
+                            function () {
21867
+                              if (
21868
+                                vm.model.incident &&
21869
+                                vm.model.incident.callID &&
21870
+                                vm.model.incident.callID != ""
21871
+                              ) {
21872
+                                $rootScope.app.layout.isSidebarClosed = false;
21873
+                                if ($scope.login && !$rootScope.busy) {
21874
+                                  $rootScope.setidle();
21875
+                                }
21876
+                              }
21877
+                              $state.go($scope.formData.cancelUrl);
21878
+                            }
21879
+                          );
21880
+                        }
21881
+                        
21753 21882
                       } else {
21754 21883
                         SweetAlert.swal({
21755 21884
                           title: "系统错误",
@@ -21760,6 +21889,7 @@ appFormly.controller("CustomformCtrl", [
21760 21889
                       }
21761 21890
                       $scope.ldloading[style.replace("-", "_")] = false;
21762 21891
                     });
21892
+                  }
21763 21893
                   break;
21764 21894
                 case "complete":
21765 21895
                   //api_bpm_domain.complete(pdKey, userId, vm.model).then(function(response){
@@ -21778,32 +21908,142 @@ appFormly.controller("CustomformCtrl", [
21778 21908
                     return;
21779 21909
                   }
21780 21910
                   console.log(vm);
21781
-                  //处理日志
21782
-                  // 处理日志不为空并且事件是处理中状态
21783
-                  if (vm.model.handlerLog && vm.model.handlerLog.trim() && vm.model.incident.state.value == 'handler') {
21784
-                    api_bpm_data.addData('operationLog', { operationLog: { opType: 'handlerLog', opValue: vm.model.handlerLog, extra1: vm.model.incident.id } }).then(function (result1) {
21785
-                      baseHandler();
21786
-                    })
21787
-                  } else {
21788
-                    if($stateParams.formUiEdit === 'inspection_LinHu_confirm'){
21789
-                      //巡检计划
21790
-                      if(vm.model.inspectionProcessActual.group&&vm.model.inspectionProcessActual.group.id){
21791
-                        api_bpm.assign({ids:$stateParams.dataId.toString(),userId:$rootScope.user.id}).then(function (response) {
21792
-                            if (response.status == 200) {
21793
-                                baseHandler();
21794
-                            } else {
21795
-                                Alert.swal({
21796
-                                    title: "操作失败",
21797
-                                    text: "操作失败, 请稍后再试!",
21798
-                                    type: "error"
21799
-                                });
21911
+                  // 积分机制,事件状态是“处理中”
21912
+                  if($scope.formData.name === 'handlerform'&&(integralMechanism == 1 || (integralMechanism == 2 && $rootScope.user.userType.value == 2))){
21913
+                      $modal.open({
21914
+                        templateUrl: 'assets/views/incident/tpl/toIntegralMechanism.tpl.html',
21915
+                        controller: function ($scope, $modalInstance, api_bpm_domain, incidentData, currentUserId, Alert, api_user_data,api_wechatfile,scope) {
21916
+                            console.log(incidentData,currentUserId);
21917
+                            $scope.flag = true;
21918
+                            $scope.complexityConfirm = {complexity:null,updateReason:''};
21919
+                            $scope.complexityFn = function(category){
21920
+                              if(category.complexity){
21921
+                                return category.complexity.value;
21922
+                              }else if(category.parent){
21923
+                                return $scope.complexityFn(category.parent);
21924
+                              }else{
21925
+                                return $scope.list[0]?$scope.list[0].value:1;
21926
+                              }
21800 21927
                             }
21801
-                        });
21928
+                            $scope.list = [];
21929
+                            api_wechatfile.getDictionary({"key":"incident_complexity","type":"list"}).then(function(res){
21930
+                              $scope.list = res;
21931
+                              $scope.complexity = $scope.complexityFn(incidentData.category);
21932
+                              $scope.complexityConfirm.complexity = $scope.list.find(v=>v.value == $scope.complexity);
21933
+                            })
21934
+                            $scope.onChangeComplexity = function(item){
21935
+                              if($scope.complexityConfirm.complexity.value == $scope.complexity){
21936
+                                $scope.complexityConfirm.updateReason = '';
21937
+                              }
21938
+                            }
21939
+                            $scope.ok = function () {
21940
+                                if (!$scope.complexityConfirm.complexity){
21941
+                                    Alert.swal({
21942
+                                        title: "操作失败",
21943
+                                        text: "请选择工时!",
21944
+                                        type: "error"
21945
+                                    });
21946
+                                    return;
21947
+                                }
21948
+                                if ($scope.complexityConfirm.complexity.value != $scope.complexity&&!$scope.complexityConfirm.updateReason.trim()){
21949
+                                    Alert.swal({
21950
+                                        title: "操作失败",
21951
+                                        text: "请填写升级原因!",
21952
+                                        type: "error"
21953
+                                    });
21954
+                                    return;
21955
+                                }
21956
+                                api_wechatfile.getDictionary({"key":"incident_integral_state","type":"list"}).then(function(res){
21957
+                                  var auditState = $scope.complexityConfirm.complexity.value == $scope.complexity?res.find(v=>v.value == 1):res.find(v=>v.value == 0);
21958
+                                  var postData = { 
21959
+                                    incidentIntegral: {
21960
+                                      incidentId:incidentData.id,
21961
+                                      auditState:auditState,
21962
+                                      handlerUser:$rootScope.user.id,
21963
+                                      handlerUserName:$rootScope.user.name,
21964
+                                      sourceScore:$scope.complexity,
21965
+                                      currentScore:$scope.complexityConfirm.complexity.value,
21966
+                                      updateReason:$scope.complexityConfirm.updateReason.trim() || undefined,
21967
+                                    }
21968
+                                  }
21969
+                                  console.log(postData)
21970
+                                  api_bpm_data.addData('incidentIntegral', postData).then(function (response) {
21971
+                                      console.log(response)
21972
+                                      if (response.status == 200) {
21973
+                                          $modalInstance.close('success');
21974
+                                          handlerLogFn();
21975
+                                      } else {
21976
+                                          Alert.swal({
21977
+                                              title: "操作失败",
21978
+                                              text: "操作失败, 请稍后再试!",
21979
+                                              type: "error"
21980
+                                          });
21981
+                                      }
21982
+                                  });
21983
+                                })
21984
+                            }
21985
+                            $scope.cancel = function () {
21986
+                                scope.ldloading.expand_right = false;
21987
+                                $modalInstance.dismiss('cancel');
21988
+                            }
21989
+                        },
21990
+                        size: 'sm',
21991
+                        resolve: {
21992
+                            scope: function () {
21993
+                                return $scope;
21994
+                            },
21995
+                            api_bpm: function () {
21996
+                                return api_bpm;
21997
+                            },
21998
+                            incidentData: function () {
21999
+                                return $scope.formData.model.incident;
22000
+                            },
22001
+                            currentUserId: function () {
22002
+                                return loginUser.id;
22003
+                            },
22004
+                            Alert: function () {
22005
+                                return SweetAlert;
22006
+                            },
22007
+                            api_user_data: function () {
22008
+                                return api_user_data;
22009
+                            },
22010
+                            api_wechatfile: function () {
22011
+                                return api_wechatfile;
22012
+                            }
22013
+                        }
22014
+                      });
22015
+                  }else{
22016
+                    handlerLogFn();
22017
+                  }
22018
+                  
22019
+                  function handlerLogFn(){
22020
+                    //处理日志
22021
+                    // 处理日志不为空并且事件是处理中状态
22022
+                    if (vm.model.handlerLog && vm.model.handlerLog.trim() && vm.model.incident.state.value == 'handler') {
22023
+                      api_bpm_data.addData('operationLog', { operationLog: { opType: 'handlerLog', opValue: vm.model.handlerLog, extra1: vm.model.incident.id } }).then(function (result1) {
22024
+                        baseHandler();
22025
+                      })
22026
+                    } else {
22027
+                      if($stateParams.formUiEdit === 'inspection_LinHu_confirm'){
22028
+                        //巡检计划
22029
+                        if(vm.model.inspectionProcessActual.group&&vm.model.inspectionProcessActual.group.id){
22030
+                          api_bpm.assign({ids:$stateParams.dataId.toString(),userId:$rootScope.user.id}).then(function (response) {
22031
+                              if (response.status == 200) {
22032
+                                  baseHandler();
22033
+                              } else {
22034
+                                  Alert.swal({
22035
+                                      title: "操作失败",
22036
+                                      text: "操作失败, 请稍后再试!",
22037
+                                      type: "error"
22038
+                                  });
22039
+                              }
22040
+                          });
22041
+                        }else{
22042
+                          baseHandler();
22043
+                        }
21802 22044
                       }else{
21803 22045
                         baseHandler();
21804 22046
                       }
21805
-                    }else{
21806
-                      baseHandler();
21807 22047
                     }
21808 22048
                   }
21809 22049
                   // return;

+ 1 - 1
assets/js/controllers/incident/incidentCtrl.js

@@ -2958,7 +2958,7 @@ app.controller('IncidentOperCtrl', ['$rootScope', '$http', '$scope', '$modal', '
2958 2958
 
2959 2959
     //修改页面显示判断
2960 2960
     $scope.jry_modify = function (item) {
2961
-        console.log(item)
2961
+        // console.log(item)
2962 2962
         // var jry_role = false;
2963 2963
         // for (var i = 0; i < $rootScope.user.role.length; i++) {
2964 2964
         //     if ($rootScope.user.role[i].rolecode == "call center") {

文件差异内容过多而无法显示
+ 1258 - 0
assets/js/controllers/inspect/integralCtrl.js


+ 3 - 0
assets/js/controllers/loginCtrl.js

@@ -38,6 +38,9 @@ app.controller('LoginCtrl', ['$rootScope', '$scope', '$state', '$translate', '$l
38 38
                               case "ifRoom": //是否增加房间号选择
39 39
                                 sessionStorage.setItem("ifRoom", v.valueconfig);
40 40
                                 break;
41
+                              case "integralMechanism": //积分机制
42
+                                sessionStorage.setItem("integralMechanism", v.valueconfig);
43
+                                break;
41 44
                             }
42 45
                         });
43 46
                     }

+ 23 - 19
assets/js/controllers/system/sysconfigCtrl.js

@@ -28,6 +28,7 @@ app.controller("sysconfigCtrl", ["$rootScope", "$scope", "$state", "$timeout", "
28 28
         arr.systemConfiguration.push(a.incidentWithConsumable);//是否需要绑定耗材
29 29
         arr.systemConfiguration.push(a.wxIncidentWithCmdb);//是否需要绑定资产
30 30
         arr.systemConfiguration.push(a.ifWorking);//是否开通上下班
31
+        arr.systemConfiguration.push(a.integralMechanism);//积分机制
31 32
         arr.systemConfiguration.push(a.ifRoom);//是否增加房间号选择
32 33
         arr.systemConfiguration.push(a.requesterLgoinType);//保修人登录方式
33 34
         arr.systemConfiguration.push(a.autoCloseIncidentHour);//自动关单小时
@@ -40,25 +41,25 @@ app.controller("sysconfigCtrl", ["$rootScope", "$scope", "$state", "$timeout", "
40 41
                         if (res.status == 200) {
41 42
                             //存储报修主体到缓存
42 43
                             var list = res.list;
43
-                            var repairMain = list.find((v) => v.keyconfig == "repairMain"); //报修主体
44
-                            var incidentWithConsumable = list.find(
45
-                            (v) => v.keyconfig == "incidentWithConsumable"
46
-                            ); //是否绑定耗材
47
-                            var wxIncidentWithCmdb = list.find(
48
-                            (v) => v.keyconfig == "wxIncidentWithCmdb"
49
-                            ); //是否绑定资产
50
-                            sessionStorage.setItem(
51
-                            "repair_main",
52
-                            JSON.stringify(repairMain)
53
-                            );
54
-                            sessionStorage.setItem(
55
-                            "incidentWithConsumable",
56
-                            incidentWithConsumable.valueconfig
57
-                            );
58
-                            sessionStorage.setItem(
59
-                            "wxIncidentWithCmdb",
60
-                            wxIncidentWithCmdb.valueconfig
61
-                            );
44
+                            list.forEach(v => {
45
+                                switch (v.keyconfig) {
46
+                                  case "repairMain": //报修主体
47
+                                    sessionStorage.setItem("repair_main", JSON.stringify(v));
48
+                                    break;
49
+                                  case "incidentWithConsumable": //是否绑定耗材
50
+                                    sessionStorage.setItem("incidentWithConsumable", v.valueconfig);
51
+                                    break;
52
+                                  case "wxIncidentWithCmdb": //是否绑定资产
53
+                                    sessionStorage.setItem("wxIncidentWithCmdb", v.valueconfig);
54
+                                    break;
55
+                                  case "ifRoom": //是否增加房间号选择
56
+                                    sessionStorage.setItem("ifRoom", v.valueconfig);
57
+                                    break;
58
+                                  case "integralMechanism": //积分机制
59
+                                    sessionStorage.setItem("integralMechanism", v.valueconfig);
60
+                                    break;
61
+                                }
62
+                            });
62 63
                             o.swal({
63 64
                                 title: "保存成功!",
64 65
                                 type: "success",
@@ -116,6 +117,9 @@ app.controller("sysconfigCtrl", ["$rootScope", "$scope", "$state", "$timeout", "
116 117
                     if (v.keyconfig == 'ifWorking') {
117 118
                         a.ifWorking = v;//是否开通上下班
118 119
                     }
120
+                    if (v.keyconfig == 'integralMechanism') {
121
+                        a.integralMechanism = v;//积分机制
122
+                    }
119 123
                     if (v.keyconfig == 'ifRoom') {
120 124
                         a.ifRoom = v;//是否增加房间号选择
121 125
                     }

+ 14 - 0
assets/js/main.js

@@ -653,6 +653,20 @@ app.factory('BpmRestangular', function (Restangular) {
653 653
         RestangularConfigurer.setBaseUrl(serverIp + '/bpm');
654 654
     });
655 655
 });
656
+app.factory('SimpleRestangular', function (Restangular) {
657
+    return Restangular.withConfig(function (RestangularConfigurer) {
658
+        RestangularConfigurer.setBaseUrl(serverIp + '/simple');
659
+    });
660
+});
661
+app.factory('api_simple', ['SimpleRestangular', function (SimpleRestangular) {
662
+    var r_data = SimpleRestangular.all("data");
663
+
664
+    return {
665
+        addListData: function (model, data) {
666
+            return r_data.customPOST(data, 'addListData/' + model, {});
667
+        },
668
+    }
669
+}]);
656 670
 app.factory('api_statistic', ['BpmRestangular', function (BpmRestangular) {
657 671
     var statistic = BpmRestangular.all("statistic");
658 672
     var table = BpmRestangular.all("data");

+ 14 - 0
assets/views/incident/tpl/toAudit.tpl.html

@@ -0,0 +1,14 @@
1
+<!-- 转派 -->
2
+<div class="modal-header">
3
+    <div class="modal-title fontcolor-two fontsizes-14">审核
4
+        <button type="button" class="close pull-right" ng-click="cancel()">×</button>
5
+    </div>
6
+</div>
7
+<div class="modal-body center" style="height: 100px;display:flex;justify-content:center;align-items:center;padding:16px;">
8
+    <div>{{msg}}</div>
9
+</div>
10
+<div class="modal-footer modelfooter-hint pointfont">
11
+    <div class="hintfooterleft pull-left" ng-click="ok()" style="cursor: pointer;width: 33%;">审核通过</div>
12
+    <div class="hintfooterleft pull-left" ng-click="time()" style="cursor: pointer;width: 33%;">调整工时</div>
13
+    <div class="hintfooterright pull-right" ng-click="cancel()" style="cursor: pointer;width: 33%;">取消</div>
14
+</div>

+ 28 - 0
assets/views/incident/tpl/toAuditTime.tpl.html

@@ -0,0 +1,28 @@
1
+<!-- 转派 -->
2
+<div class="modal-header">
3
+    <div class="modal-title fontcolor-two fontsizes-14">指派对象
4
+        <button type="button" class="close pull-right" ng-click="cancel()">×</button>
5
+    </div>
6
+</div>
7
+<div class="modal-body center">
8
+    <div class="form-group" style="margin:0 auto;width: 300px;">
9
+        <div class="input-group" style="margin:8px 0 0;">
10
+            <div class="control-label pull-left margin-top-5 margin-right-5">
11
+                <label class="demoincident">您需要将工时调整为</label>:</div>
12
+            <div class="pull-right">
13
+                <ui-select class="pull-left" style="width:150px" ng-model="searchList.time" theme="bootstrap">
14
+                    <ui-select-match placeholder="">
15
+                        {{$select.selected.value}}
16
+                    </ui-select-match>
17
+                    <ui-select-choices repeat="item in list | filter:{$:$select.search}">
18
+                        <div ng-bind-html="item.value | highlight: $select.search"></div>
19
+                    </ui-select-choices>
20
+                </ui-select>
21
+            </div>
22
+        </div>
23
+    </div>
24
+</div>
25
+<div class="modal-footer modelfooter-hint pointfont">
26
+    <div class="hintfooterleft pull-left" ng-click="ok()" style="cursor: pointer;">确定</div>
27
+    <div class="hintfooterright pull-right" ng-click="cancel()" style="cursor: pointer;">取消</div>
28
+</div>

+ 47 - 0
assets/views/incident/tpl/toIntegralMechanism.tpl.html

@@ -0,0 +1,47 @@
1
+<!-- 积分机制 -->
2
+<div class="modal-header">
3
+    <div class="modal-title fontcolor-two fontsizes-14">提示
4
+        <button type="button" class="close pull-right" ng-click="cancel()">×</button>
5
+    </div>
6
+</div>
7
+<div class="modal-body center">
8
+    <div style="margin:8px 0 0;">您本次事件处理获得工时{{complexity}},如遇问题对工时进行调整</div>
9
+    <div class="form-group incidentsearch" style="margin:0 auto;width: 300px;">
10
+        <div class="input-group" style="margin:8px 0 0;">
11
+            <div class="control-label pull-left margin-top-5 margin-right-5">
12
+                <label class="demoincident">工时<span class="red">*</span></label>:</div>
13
+            <div class="pull-right">
14
+                <ui-select class="pull-left" style="width:220px" ng-model="complexityConfirm.complexity" theme="bootstrap" ng-change="onChangeComplexity($select.selected)">
15
+                    <ui-select-match placeholder="">
16
+                        {{$select.selected.value}}
17
+                    </ui-select-match>
18
+                    <ui-select-choices repeat="item in list | filter:{$:$select.search}">
19
+                        <div ng-bind-html="item.value | highlight: $select.search"></div>
20
+                    </ui-select-choices>
21
+                </ui-select>
22
+            </div>
23
+        </div>
24
+    </div>
25
+    <div class="form-group incidentsearch" style="margin:0 auto;width: 300px;" ng-if="flag && complexityConfirm.complexity.value != complexity">
26
+        <div class="input-group" style="margin:8px 0 0;">
27
+            <div class="control-label pull-left margin-top-5 margin-right-5">
28
+                <label class="demoincident">升级原因<span class="red">*</span></label>:</div>
29
+            <div class="pull-right">
30
+                <textarea placeholder="请输入升级原因" class="pull-left" style="width:220px;height: 100px;resize:none;" ng-model="complexityConfirm.updateReason"></textarea>
31
+            </div>
32
+        </div>
33
+    </div>
34
+    <div class="form-group incidentsearch" style="margin:0 auto;width: 300px;" ng-if="!flag">
35
+        <div class="input-group" style="margin:8px 0 0;">
36
+            <div class="control-label pull-left margin-top-5 margin-right-5">
37
+                <label class="demoincident">升级原因<span class="red">*</span></label>:</div>
38
+            <div class="pull-right">
39
+                <textarea placeholder="请输入升级原因" class="pull-left" style="width:220px;height: 100px;resize:none;" ng-model="complexityConfirm.updateReason"></textarea>
40
+            </div>
41
+        </div>
42
+    </div>
43
+</div>
44
+<div class="modal-footer modelfooter-hint pointfont">
45
+    <div class="hintfooterleft pull-left" ng-click="ok()" style="cursor: pointer;">确定</div>
46
+    <div class="hintfooterright pull-right" ng-click="cancel()" style="cursor: pointer;">取消</div>
47
+</div>

+ 290 - 0
assets/views/inspect/integral.html

@@ -0,0 +1,290 @@
1
+<style type="text/css">
2
+  .incidentsearch {
3
+    width: 20% !important;
4
+    margin-right: 16px;
5
+  }
6
+  .wt_width5 {
7
+    width: 160px;
8
+    border-color: #dedede;
9
+    float: right;
10
+    height: 28px;
11
+    border-radius: 2px !important;
12
+  }
13
+
14
+  .iptSize {
15
+    width: 60% !important;
16
+    height: 28px !important;
17
+  }
18
+
19
+  .tree-control .tree-input {
20
+    min-height: 28px !important;
21
+  }
22
+
23
+  .searchBtnBox > .btn {
24
+    margin: 0 8px 10px 0;
25
+  }
26
+</style>
27
+<div ng-controller="integralCtrl">
28
+  <!-- <section id="page-title">
29
+        <div class="row">
30
+            <div class="col-sm-8">
31
+                <h1 class="mainTitle">积分管理</h1><span class="mainDescription">积分管理列表,可对巡检进行修改,新增,删除</span></div>
32
+        </div>
33
+    </section> -->
34
+  <section id="page-title">
35
+    <div class="row">
36
+      <!-- <i class="iconfont icon-bianji pull-left"></i> -->
37
+      <div class="col-sm-8">
38
+        <h1 class="mainTitle">
39
+          积分管理<i
40
+            tooltip="积分管理列表,可对巡检进行修改"
41
+            tooltip-placement="right"
42
+            class="fa ti-help-alt margin-left-10 fontcolor-five pointfont"
43
+          ></i>
44
+        </h1>
45
+      </div>
46
+    </div>
47
+  </section>
48
+  <!-- <div class="col-xs-2 col-md-2 col-sm-2">
49
+        <h5 class="over-title margin-bottom-15"><i class="fa fa-building-o" /><span class="text-bold">巡检类型</span></h5>
50
+        <div>
51
+            <div class="row">
52
+                <div class="panel panel-white">
53
+                    <div class="panel-body">
54
+                        <div class="box-tree">
55
+                            <span ng-if="doing_async">...加载中...</span>
56
+                            <abn-tree tree-data="my_data" tree-control="my_tree" on-select="my_tree_handler(branch)" expand-level="2" initial-selection="Granny Smith" icon-leaf="ti-file" icon-expand="ti-plus" icon-collapse="ti-minus"></abn-tree>
57
+                        </div>
58
+                    </div>
59
+                </div>
60
+            </div>
61
+        </div>
62
+    </div> -->
63
+  <div class="schuback" id="searchid">
64
+    <div class="row" style="padding-right: 0px !important">
65
+      <div class="col-xs-12">
66
+        <div class="col-xs-10" style="padding-right: 0px !important">
67
+          <form class="form-inline incidentsearchsize">
68
+            <!-- <div class="form-group incidentsearch">
69
+              <div>
70
+                <div class="control-label pull-left" style="padding-top: 4px">
71
+                  计划主题:
72
+                </div>
73
+                <input
74
+                  class="form-control pull-right inputcolor iptSize"
75
+                  style="border-color: #dedede; color: #93989e"
76
+                  type="text"
77
+                  ng-model="fileData.inspection.title"
78
+                  placeholder=""
79
+                />
80
+              </div>
81
+            </div>
82
+            <div class="form-group incidentsearch">
83
+              <div class="pull-left" style="padding-top: 4px">巡检范围:</div>
84
+              <div class="pull-right iptSize" style="display: inline">
85
+                <div>
86
+                  <multi-select-tree
87
+                    ng-model="inspecttype.type"
88
+                    data-input-model="my_data"
89
+                    data-output-model="inspectdata.type"
90
+                    theme="bootstrap"
91
+                    multi-select="false"
92
+                    data-default-label=""
93
+                    data-callback="onFilterCallback(item)"
94
+                    data-select-only-leafs="true"
95
+                    reset-search-input="false"
96
+                    data-trans-label="label"
97
+                    data-switch-view="false"
98
+                  ></multi-select-tree>
99
+                </div>
100
+              </div>
101
+            </div>
102
+            <div class="form-group incidentsearch">
103
+              <div class="pull-left" style="padding-top: 4px">执行人:</div>
104
+              <ui-select
105
+                class="pull-right iptSize"
106
+                ng-model="fileData.inspection.executeUser"
107
+                theme="bootstrap"
108
+              >
109
+                <ui-select-match placeholder="">
110
+                  {{$select.selected.name}}
111
+                </ui-select-match>
112
+                <ui-select-choices repeat="item in executeUserData">
113
+                  <div
114
+                    ng-bind-html="item.name | highlight: $select.search"
115
+                  ></div>
116
+                </ui-select-choices>
117
+              </ui-select>
118
+            </div> -->
119
+            <div class="form-group incidentsearch wt_width">
120
+              <div class="">
121
+                <div class="control-label pull-left margin-top-5">
122
+                  登记时间:
123
+                </div>
124
+                <input
125
+                  type="text"
126
+                  class="incidentsearchsize wt_width5"
127
+                  datepicker-popuptime="yyyy-MM-dd"
128
+                  ng-model="fileData.incidentIntegral.startTime"
129
+                  max-date="fileData.incidentIntegral.endTime"
130
+                  is-open="startOpened"
131
+                  hour-time="true"
132
+                  ng-init="startOpened = false"
133
+                  close-text="关闭"
134
+                  ng-click="startOpen($event)"
135
+                  placeholder=""
136
+                />
137
+              </div>
138
+            </div>
139
+            <div class="form-group incidentsearch wt_width">
140
+              <div class="">
141
+                <div class="control-label pull-left margin-top-5">至</div>
142
+                <input
143
+                  type="text"
144
+                  class="selectzise incidentsearchsize wt_width5"
145
+                  datepicker-popuptime="yyyy-MM-dd"
146
+                  ng-model="fileData.incidentIntegral.endTime"
147
+                  hour-time="true"
148
+                  min-date="fileData.incidentIntegral.startTime"
149
+                  is-open="endOpened"
150
+                  ng-init="endOpened = false"
151
+                  close-text="关闭"
152
+                  ng-click="endOpen($event)"
153
+                  placeholder=""
154
+                />
155
+              </div>
156
+            </div>
157
+            <div class="form-group incidentsearch">
158
+              <div class="pull-left" style="padding-top: 4px">审核状态:</div>
159
+              <ui-select
160
+                class="pull-right iptSize"
161
+                ng-model="fileData.incidentIntegral.auditState"
162
+                theme="bootstrap"
163
+              >
164
+                <ui-select-match placeholder="">
165
+                  {{$select.selected.desc}}
166
+                </ui-select-match>
167
+                <ui-select-choices repeat="item in statusData">
168
+                  <div
169
+                    ng-bind-html="item.desc | highlight: $select.search"
170
+                  ></div>
171
+                </ui-select-choices>
172
+              </ui-select>
173
+            </div>
174
+            <div class="form-group incidentsearch" ng-if="isIncidentManager">
175
+              <div class="pull-left" style="padding-top: 4px">处理人:</div>
176
+              <ui-select
177
+                class="pull-right iptSize"
178
+                ng-model="fileData.incidentIntegral.handlerUser"
179
+                theme="bootstrap"
180
+              >
181
+                <ui-select-match placeholder="">
182
+                  {{$select.selected.name}}
183
+                </ui-select-match>
184
+                <ui-select-choices repeat="item in createUserData" refresh="getCreateUser($select.search)">
185
+                  <div
186
+                    ng-bind-html="item.name | highlight: $select.search"
187
+                  ></div>
188
+                </ui-select-choices>
189
+              </ui-select>
190
+            </div>
191
+          </form>
192
+        </div>
193
+        <div class="col-xs-2">
194
+          <div>
195
+            <!-- <div class="centerdiv-one"></div> -->
196
+            <div class="pull-left margin-top-10 searchBtnBox">
197
+              <!-- <div class="form-group"> -->
198
+              <!-- <a class="btn btn-searchbutton steelbutton" ng-click="searchinspe(inspectdata)" type="button">搜索</a> -->
199
+              <div class="btn btn_search" ng-click="searchinspe(inspectdata)">
200
+                <span>搜索</span>
201
+              </div>
202
+              <div class="btn btn_search" ng-click="batchReview()" ng-if="selected.items.length">
203
+                <span>批量审核</span>
204
+              </div>
205
+              <!-- </div> -->
206
+              <!-- <div class="form-group">
207
+                        <button class="blank btn btn-downbutton downbutton" ng-click="export()" ladda="ldloading.zoom_in" data-style="zoom-in"><span translate="sidebar.nav.configuremanagerdb.LISTButton.EXPORT ">Export Data</span></button>
208
+                    </div> -->
209
+              <!-- <button ladda="ldloading.expand_right" type="button" class="btn btn-reashbutton reashbutton" data-style="expand-right" ng-click="reload()">
210
+                        <span translate="list.button.REFRESH">Refresh Data</span>
211
+                    </button> -->
212
+              <!-- <a class="btn btn-searchbutton steelbutton" ng-click="reload()" type="button">重置</a> -->
213
+              <div class="btn btn_clean" ng-click="reload()">重置</div>
214
+              <!-- <a class="btn btn-searchbutton steelbutton" ng-click="refresh()" type="button">刷新</a> -->
215
+              <!-- <button type="button" class="btn btn-addbutton  addbutton" ng-click="addData()">
216
+                            <span translate="list.button.CREATE">Add Data</span>
217
+                        </button> -->
218
+              <!-- <div
219
+                class="btn btn_search"
220
+                ng-click="addData()"
221
+                ng-show="xinzeng"
222
+              >
223
+                <span translate="list.button.CREATE">Add Data</span>
224
+              </div> -->
225
+              <!--<button type="button" id="removeData" class="btn btn-warning" ng-click="removeData()" ng-disabled="selected.items.length==0">-->
226
+              <!-- <button type="button" class="btn btn-downbutton downbutton" ng-click="removeData()" ng-disabled="selected.items.length==0">
227
+                            <span translate=" list.button.REMOVE ">Remove First Row</span>
228
+                        </button> -->
229
+              <!-- <div
230
+                class="btn btn_remove"
231
+                ng-click="removeData()"
232
+                ng-class="isMousedown?'btn_removeMousedown':''"
233
+                ng-mousedown="changeRemoveClass()"
234
+                ng-show="shanchu"
235
+                ng-disabled="selected.items.length==0"
236
+              >
237
+                <span translate="list.button.REMOVE">Remove First Row</span>
238
+              </div> -->
239
+            </div>
240
+          </div>
241
+        </div>
242
+      </div>
243
+    </div>
244
+  </div>
245
+  <div class="tableList" ui-i18n="{{lang}}">
246
+    <!-- <div class="col-xs-2 col-md-2 col-sm-2">
247
+            <h5 class="over-title margin-bottom-15"><i class="fa fa-building-o" /><span class="text-bold">巡检类型</span></h5>
248
+            <div>
249
+                <div class="row">
250
+                    <div class="panel panel-white">
251
+                        <div class="panel-body">
252
+                            <div class="box-tree">
253
+                                <span ng-if="doing_async">...加载中...</span>
254
+                                <abn-tree tree-data="my_data" tree-control="my_tree" on-select="my_tree_handler(branch)" expand-level="2" initial-selection="Granny Smith" icon-leaf="ti-file" icon-expand="ti-plus" icon-collapse="ti-minus"></abn-tree>
255
+                            </div>
256
+                        </div>
257
+                    </div>
258
+                </div>
259
+            </div>
260
+        </div> -->
261
+    <!-- <div class="col-xs-10"> -->
262
+
263
+    <!-- <div class="margin-bottom-10">
264
+            <a ladda="ldloading.expand_right" class="btn btn-primary" data-style="expand-right" ng-click="reload()">
265
+                <span translate="list.button.REFRESH">Refresh Data</span>
266
+                <i class="ti-reload" />
267
+            </a>
268
+            <button type="button" id="addData" class="btn btn-success" ng-click="addData()">
269
+                    <span translate="list.button.CREATE">Add Data</span>
270
+                    <i class="ti-plus"/>
271
+                </button>
272
+            <button type="button" id="removeData" class="btn btn-warning" ng-click="removeData()" ng-disabled="selected.items.length==0">
273
+                    <span translate=" list.button.REMOVE ">Remove First Row</span>
274
+                    <i class="ti-trash "/>
275
+                </button>
276
+        </div> -->
277
+    <div class=" ">
278
+      <div
279
+        id="grid1 "
280
+        ui-grid="gridOptions "
281
+        ui-grid-pagination
282
+        external-scopes="$scope "
283
+        ui-grid-resize-columns
284
+        ui-grid-selection
285
+        ui-grid-auto-resize
286
+        class="grid"
287
+      ></div>
288
+    </div>
289
+  </div>
290
+</div>

+ 24 - 0
assets/views/system/sysconfig.html

@@ -237,6 +237,30 @@
237 237
                         </ul>
238 238
                     </div>
239 239
                 </div>
240
+                <div class="form-group col-sm-6">
241
+                    <label class="col-sm-4 control-label">
242
+                        积分机制:
243
+                    </label>
244
+                    <div class="col-sm-8">
245
+                        <ul class="tab_bdItem_tab">
246
+                            <li class="fl">
247
+                                <i class="tab_bdItem_tabItem iconfont icon-icon_weizuo" ng-click="integralMechanism.valueconfig = 0;"
248
+                                    ng-class="integralMechanism.valueconfig == 0?'active':''"></i>
249
+                                <span>无</span>
250
+                            </li>
251
+                            <li class="fl">
252
+                                <i class="tab_bdItem_tabItem iconfont icon-icon_weizuo" ng-click="integralMechanism.valueconfig = 1;"
253
+                                    ng-class="integralMechanism.valueconfig == 1?'active':''"></i>
254
+                                <span>全体人员</span>
255
+                            </li>
256
+                            <li class="fl">
257
+                                <i class="tab_bdItem_tabItem iconfont icon-icon_weizuo" ng-click="integralMechanism.valueconfig = 2;"
258
+                                    ng-class="integralMechanism.valueconfig == 2?'active':''"></i>
259
+                                <span>公司人员</span>
260
+                            </li>
261
+                        </ul>
262
+                    </div>
263
+                </div>
240 264
             </div>
241 265
             <!-- 保存 -->
242 266
             <div class="form-group margin-bottom-0">