소스 검색

BUG修复

seimin 6 달 전
부모
커밋
fe2d4aa575

+ 10 - 2
assets/js/controllers/incident/incidentCtrl.js

@@ -1036,10 +1036,14 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
1036 1036
         }
1037 1037
     })
1038 1038
     //报修人
1039
-    var getRequester = function () {
1039
+    var getRequester = function (key='') {
1040 1040
         api_user_data.fetchDataList('requester', {
1041 1041
             idx: 0,
1042
-            sum: 100
1042
+            sum: 10,
1043
+            "requester": {
1044
+                "name": key,
1045
+                'selectTypePys': "pinyin_qs"
1046
+            }
1043 1047
         }).then(function (data) {
1044 1048
             // console.log(data);
1045 1049
             $scope.requester = data.list
@@ -1088,6 +1092,10 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
1088 1092
         }
1089 1093
         getUser(filuser, 2);
1090 1094
     }
1095
+    //报修人过滤
1096
+    $scope.onChangeRequester = function (key) {
1097
+        getRequester(key);
1098
+    }
1091 1099
 
1092 1100
     //报修科室过滤
1093 1101
     $scope.onChangeDept = function (key) {

+ 28 - 32
assets/js/controllers/system/processdesign/incidentplan/incidentSetUpCtrl.js

@@ -75,7 +75,7 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
75 75
     //               $scope.outdata = response.list;
76 76
     //           }
77 77
     //       }
78
-    //   })    
78
+    //   })
79 79
     // }
80 80
     // $scope.refreshListData();
81 81
     $scope.filterTree = function (data,id) {
@@ -117,7 +117,7 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
117 117
         }else{
118 118
             $scope.subdata.hasPlace=false
119 119
         }
120
-        
120
+
121 121
         convertchildToTree(branch,'事件分类');
122 122
         console.log(branch)
123 123
         if(branch.managerUser){
@@ -156,7 +156,7 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
156 156
             //   //Restangular.
157 157
             //    $scope.userdata = response.data;
158 158
             // });
159
-        }        
159
+        }
160 160
 
161 161
     };
162 162
     $scope.thisParent={};//当前点击节点的父节点
@@ -221,9 +221,9 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
221 221
                     postData.typeList.push({ id: data.id });
222 222
                 })
223 223
             }
224
-        }        
224
+        }
225 225
     };
226
-   
226
+
227 227
     $scope.addType = function(element) {
228 228
             $scope.tree_data = $scope.dataSave.length?angular.copy($scope.dataSave):$scope.tree_data;
229 229
             $scope.addcate = true
@@ -232,8 +232,8 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
232 232
                 //     templateUrl: 'assets/views/system/tpl/systemclose.html',
233 233
                 //     controller: function($scope, $modalInstance, api_bpm_data){
234 234
                 //         // api_bpm_data.fetchDataList('closecode',filterData).then(function(data){
235
-                //         // var myData = Restangular.stripRestangular(data);  
236
-                //         // }      
235
+                //         // var myData = Restangular.stripRestangular(data);
236
+                //         // }
237 237
                 //     }
238 238
                 // });
239 239
         }
@@ -434,7 +434,7 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
434 434
     // $scope.parentdata = {};
435 435
     $scope.try_async_load = function() {
436 436
         $scope.my_data = [];
437
-        
437
+
438 438
         $scope.doing_async = true;
439 439
         var data = { "idx": 0, "sum": 1000 };
440 440
         api_bpm_data.fetchDataList('incidentcategory', data).then(function(response) {
@@ -489,7 +489,7 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
489 489
     };
490 490
     $scope.try_async_1load = function() {
491 491
         $scope.my_1data = [];
492
-        
492
+
493 493
         $scope.doing_async = true;
494 494
         var data = { "idx": 0, "sum": 1000,inspectionType:{deleteFlag:0} };
495 495
         api_bpm_data.fetchDataList('inspectionType', data).then(function(response) {
@@ -532,7 +532,7 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
532 532
         //     formdata.hasArea = 0;
533 533
         //     formdata.hasPlace = 0;
534 534
         // }
535
-        
535
+
536 536
         if (formdata.hasPlace==true) {
537 537
             formdata.hasPlace = 1;
538 538
         } else {
@@ -548,7 +548,7 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
548 548
         //     formdata.parent = { "id": $scope.selectedTreeNode.parent.id };
549 549
         // }
550 550
         // console.log($scope.thisParent)
551
-        
551
+
552 552
          if($scope.selectedChangeCategory){
553 553
             formdata['parentCategory'] ={'id':$scope.selectedChangeCategory.id};
554 554
             delete formdata.parent
@@ -581,7 +581,7 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
581 581
         var filedata = { "incidentcategory": formdata }
582 582
         console.log(filedata,$scope.userGroupChecked);
583 583
         // return;
584
-        api_bpm_data.updData('incidentcategory', filedata).then(function(response) {
584
+        api_user_data.updData('incidentcategory', filedata).then(function(response) {
585 585
             if (response) {
586 586
                 if (response.status == 200) {
587 587
                     $scope.try_async_load()
@@ -594,6 +594,7 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
594 594
                 } else {
595 595
                     SweetAlert.swal({
596 596
                         title: "修改失败!",
597
+                        text: response.msg,
597 598
                         type: "error"
598 599
                     })
599 600
                 }
@@ -707,11 +708,11 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
707 708
             formdata.handleUser={id:$scope.userGroupCheckedAdd.userCheck.id};
708 709
             // delete formdata.group;
709 710
         }
710
-        
711
+
711 712
         var filedata = { "incidentcategory": formdata }
712 713
         console.log(filedata);
713 714
         // return;
714
-        api_bpm_data.addData('incidentcategory', filedata).then(function(response) {
715
+        api_user_data.addData('incidentcategory', filedata).then(function(response) {
715 716
             if (response) {
716 717
                 if (response.status == 200) {
717 718
                     $scope.userdata = [];
@@ -721,15 +722,10 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
721 722
                         title: "增加成功!",
722 723
                         type: "success"
723 724
                     })
724
-                } else if (response.status == 408) {
725
-                    SweetAlert.swal({
726
-                        title: "增加失败!",
727
-                        text: response.error,
728
-                        type: "error"
729
-                    })
730 725
                 } else {
731 726
                     SweetAlert.swal({
732 727
                         title: "增加失败!",
728
+                        text: response.msg,
733 729
                         type: "error"
734 730
                     })
735 731
                 }
@@ -787,7 +783,7 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
787 783
         status: 0,
788 784
         pageIndex: 0,
789 785
         pageSum: 10,
790
-        //treeIds:'[]', 
786
+        //treeIds:'[]',
791 787
         userId: loginUser.id
792 788
     }
793 789
     // 事件分类结束
@@ -1373,7 +1369,7 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
1373 1369
         }
1374 1370
         $timeout(function(){
1375 1371
             $scope.getPrioritymatrix()
1376
-        },2000)   
1372
+        },2000)
1377 1373
     }
1378 1374
     $scope.removePrioritymatrix=function(data){
1379 1375
         SweetAlert.swal({
@@ -1410,16 +1406,16 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
1410 1406
             } else {
1411 1407
                 SweetAlert.swal("操作取消", "数据安全", "error");
1412 1408
             }
1413
-        });      
1414
-    }    
1409
+        });
1410
+    }
1415 1411
     $scope.getPrioritymatrix()
1416 1412
     // 优先级规则结束
1417 1413
 
1418 1414
     // 获取组数据
1419 1415
     $scope.getGroupList=function(){
1420 1416
         var postData={
1421
-            idx: 0, 
1422
-            sum: 1000, 
1417
+            idx: 0,
1418
+            sum: 1000,
1423 1419
             group: {selectType: "nouser"}
1424 1420
         }
1425 1421
         api_user_data.fetchDataList('group',postData).then(res=>{
@@ -1431,10 +1427,10 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
1431 1427
     // 获取人数据
1432 1428
     $scope.getUserList=function(){
1433 1429
         var postData={
1434
-            idx: 0, 
1435
-            sum: 1000, 
1430
+            idx: 0,
1431
+            sum: 1000,
1436 1432
             user: {
1437
-                name:'', 
1433
+                name:'',
1438 1434
                 selectType: "pinyin_qs",
1439 1435
             }
1440 1436
         }
@@ -1446,10 +1442,10 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
1446 1442
     // 获取事件分类人员
1447 1443
     $scope.getUserList1=function(){
1448 1444
         var postData={
1449
-            idx: 0, 
1450
-            sum: 1000, 
1445
+            idx: 0,
1446
+            sum: 1000,
1451 1447
             user: {
1452
-                name:'', 
1448
+                name:'',
1453 1449
                 selectType: "pinyin_qs",
1454 1450
                 roledata:{
1455 1451
                     rolecode:'incident-category-manager'

+ 15 - 21
assets/js/controllers/system/user/adminUserCtrl.js

@@ -1,5 +1,5 @@
1 1
 'use strict';
2
-/** 
2
+/**
3 3
  * controller for User Profile Example
4 4
  */
5 5
 app.controller('adminUserListCtrl', ["$rootScope", "$scope", "$state", "$timeout", "$interval", "$modal", "SweetAlert", "i18nService", "uiGridConstants", "uiGridGroupingConstants", "Restangular", "api_user_data", "api_login", function ($rootScope, $scope, $state, $timeout, $interval, $modal, SweetAlert, i18nService, uiGridConstants, uiGridGroupingConstants, Restangular, api_user_data, api_login) {
@@ -86,8 +86,8 @@ app.controller('adminUserListCtrl', ["$rootScope", "$scope", "$state", "$timeout
86 86
 
87 87
     $scope.gridOptions.columnDefs = [{
88 88
             name: 'item',
89
-            displayName: '序号',
90
-            width: 50,
89
+            displayName: '#',
90
+            width: 30,
91 91
             enableFiltering: false,
92 92
             cellTemplate: '<div>' +
93 93
                 '<div class="ui-grid-cell-contents">{{row.entity.item}}</div>' +
@@ -96,29 +96,25 @@ app.controller('adminUserListCtrl', ["$rootScope", "$scope", "$state", "$timeout
96 96
         {
97 97
             name: 'account',
98 98
             displayName: '账号',
99
-            width: '8%',
100
-            minWidth: '105',
99
+            width: 100,
101 100
             enableFiltering: false
102 101
         },
103 102
         {
104 103
             name: 'name',
105 104
             displayName: '姓名',
106
-            width: '6%',
107
-            minWidth: '100',
105
+            width: 100,
108 106
             enableFiltering: false
109 107
         },
110 108
         {
111 109
             name: 'weixin',
112 110
             displayName: '微信',
113
-            width: '6%',
114
-            minWidth: '120',
111
+            width: 100,
115 112
             enableFiltering: false
116 113
         },
117 114
         {
118 115
             name: 'userType',
119 116
             displayName: '人员类别',
120
-            width: '6%',
121
-            minWidth: '120',
117
+            width: 100,
122 118
             enableFiltering: false,
123 119
             cellTemplate: '<div>' +
124 120
                 '<div class="ui-grid-cell-contents">{{row.entity.userType.value == 2 ?row.entity.company.name:row.entity.userType.name}}</div>' +
@@ -133,53 +129,51 @@ app.controller('adminUserListCtrl', ["$rootScope", "$scope", "$state", "$timeout
133 129
         {
134 130
             name: 'phone',
135 131
             displayName: '联系电话',
136
-            width: '8%',
137
-            minWidth: '115',
132
+            width: 100,
138 133
             enableFiltering: false
139 134
         },
140 135
         {
141 136
             name: 'email',
142 137
             displayName: '邮箱',
143
-            width: '14%',
144
-            minWidth: '150',
138
+            width: 100,
145 139
             enableFiltering: false
146 140
         },
147 141
         {
148 142
             name: 'dept.dept',
149 143
             displayName: '科室',
150
-            width: '12%',
144
+            width: 100,
151 145
             enableFiltering: false
152 146
         },
153 147
         {
154 148
             name: 'dept.phone',
155 149
             displayName: '科室电话',
156
-            width: '11%',
150
+            width: 100,
157 151
             enableFiltering: false
158 152
         },
159 153
         {
160 154
             name: 'extensionNo',
161 155
             displayName: '分机号码',
162
-            width: '11%',
156
+            width: 100,
163 157
             enableFiltering: false
164 158
         },
165 159
         {
166 160
             name: 'group',
167 161
             displayName: '所属工作组',
168
-            width: '15%',
169
-            minWidth: '150',
162
+            width: 150,
170 163
             cellTemplate: '<div class="ui-grid-cell-contents">{{grid.appScope.transfergroup(row.entity.group)}}</div>',
171 164
             enableFiltering: false
172 165
         },
173 166
         {
174 167
             name: 'flag',
175 168
             displayName: '状态',
169
+            width: 100,
176 170
             cellTemplate: '<div class="ui-grid-cell-contents">{{grid.appScope.transferStatus(row.entity.flag)}}</div>',
177 171
             width: '5%',
178 172
             enableFiltering: false
179 173
         },
180 174
         {
181 175
             name: '操作',
182
-            minWidth: '150',
176
+            width: 150,
183 177
             cellTemplate: '<div><div class="cl-effect-1 ui-grid-cell-contents pull-left">' +
184 178
                 // '<a  ng-click="grid.appScope.saveData(row.entity)" tooltip="编辑" tooltip-placement="right">' +
185 179
                 // '<i class="fa fa-pencil-square-o"/></a>' +

+ 2 - 2
assets/views/incident/list.html

@@ -89,7 +89,7 @@
89 89
                                         {{$select.selected.name}}
90 90
                                     </ui-select-match>
91 91
                                     <ui-select-choices repeat="item in requester"
92
-                                        refresh="onChangehandling($select.search)">
92
+                                        refresh="onChangeRequester($select.search)">
93 93
                                         <div ng-bind-html="item.name | highlight: $select.search"></div>
94 94
                                     </ui-select-choices>
95 95
                                 </ui-select>
@@ -418,7 +418,7 @@
418 418
         height: 28px;
419 419
     }
420 420
 
421
-    /* 
421
+    /*
422 422
     .wt_width {
423 423
         width: 20%;
424 424
         margin-right: 1%;