Browse Source

绩效积分配置

seimin 2 years ago
parent
commit
ed35f8f306

+ 200 - 68
assets/js/controllers/performance/scoreConfigurationPerformanceCtrl.js

@@ -29,7 +29,7 @@ app.controller('scoreConfigurationPerformanceCtrl', ["$rootScope", "$scope", "$s
29
     }
29
     }
30
     var defaultFilterData = {
30
     var defaultFilterData = {
31
         "idx": 0,
31
         "idx": 0,
32
-        "sum": 9999
32
+        "sum": 10
33
     };
33
     };
34
 
34
 
35
     $scope.gridOptions = {};
35
     $scope.gridOptions = {};
@@ -66,38 +66,35 @@ app.controller('scoreConfigurationPerformanceCtrl', ["$rootScope", "$scope", "$s
66
         },
66
         },
67
         
67
         
68
         {
68
         {
69
-            name: 'incidentCategory.parent.parent.category',
69
+            name: 'parent.parent.category',
70
             displayName: '一级分类',
70
             displayName: '一级分类',
71
             width: '10%',
71
             width: '10%',
72
             enableFiltering: false
72
             enableFiltering: false
73
         },
73
         },
74
         {
74
         {
75
-            name: 'incidentCategory.parent.category',
75
+            name: 'parent.category',
76
             displayName: '二级分类',
76
             displayName: '二级分类',
77
             width: '10%',
77
             width: '10%',
78
             enableFiltering: false
78
             enableFiltering: false
79
         },
79
         },
80
         {
80
         {
81
-            name: 'incidentCategory.category',
81
+            name: 'category',
82
             displayName: '三级分类',
82
             displayName: '三级分类',
83
             width: '10%',
83
             width: '10%',
84
             enableFiltering: false
84
             enableFiltering: false
85
         },
85
         },
86
         {
86
         {
87
-            name: 'incidentCategory.complexity',
87
+            name: 'complexity.value',
88
             displayName: '默认积分',
88
             displayName: '默认积分',
89
             width: '5%',
89
             width: '5%',
90
-            enableFiltering: false,
91
-            cellTemplate: '<div style="line-height:34px;">' +
92
-            '<span>{{row.entity.incidentCategory.complexity?row.entity.incidentCategory.complexity.value:0}}</span>' +
93
-            '</div>'
90
+            enableFiltering: false
94
         },
91
         },
95
         {
92
         {
96
             name: 'five',
93
             name: 'five',
97
             displayName: '积分规则',
94
             displayName: '积分规则',
98
             width: '50%',
95
             width: '50%',
99
             enableFiltering: false,
96
             enableFiltering: false,
100
-            cellTemplate: '<div style="line-height:34px;">' +
97
+            cellTemplate: '<div class="ui-grid-cell-contents">' +
101
             '<span ng-repeat="item in row.entity.rules">【{{item.startCount}}-{{item.endCount}}单】获得积分{{item.score}};</span>' +
98
             '<span ng-repeat="item in row.entity.rules">【{{item.startCount}}-{{item.endCount}}单】获得积分{{item.score}};</span>' +
102
             '</div>'
99
             '</div>'
103
         },
100
         },
@@ -116,6 +113,18 @@ app.controller('scoreConfigurationPerformanceCtrl', ["$rootScope", "$scope", "$s
116
         //导入gridApi对象
113
         //导入gridApi对象
117
         $scope.gridApi = gridApi;
114
         $scope.gridApi = gridApi;
118
 
115
 
116
+        //分页选项
117
+        gridApi.pagination.on.paginationChanged($scope, function (newPage, pageSize) {
118
+            var filtersData = {};
119
+            filtersData.idx = newPage - 1;
120
+            filtersData.sum = pageSize;
121
+            $scope.pageNum = $scope.gridApi.pagination.getPage() - 1;
122
+            $scope.fileData.idx = newPage - 1;
123
+            $scope.fileData.sum = pageSize;
124
+            $scope.refreshData('expand-right', $scope.fileData);
125
+
126
+        });
127
+
119
         //勾选行事件
128
         //勾选行事件
120
         gridApi.selection.on.rowSelectionChanged($scope, function (data) {
129
         gridApi.selection.on.rowSelectionChanged($scope, function (data) {
121
             if (data.isSelected) {
130
             if (data.isSelected) {
@@ -149,43 +158,110 @@ app.controller('scoreConfigurationPerformanceCtrl', ["$rootScope", "$scope", "$s
149
 
158
 
150
     
159
     
151
     // 批量修改积分
160
     // 批量修改积分
152
-    $scope.edits = function (data) {
153
-        console.log(data);
161
+    $scope.edits = function () {
154
         var modalInstance = $modal.open({
162
         var modalInstance = $modal.open({
155
             templateUrl: 'assets/views/scoreConfigurationPerformance-edit.html',
163
             templateUrl: 'assets/views/scoreConfigurationPerformance-edit.html',
156
             size: "sm",
164
             size: "sm",
157
-            controller: function ($scope, $modalInstance) {
165
+            controller: function ($scope, scope, $modalInstance, SweetAlert) {
166
+                console.log(scope.selected.items);
167
+                $scope.incidentComplexity = scope.incidentComplexity;
158
                 $scope.configs = {
168
                 $scope.configs = {
159
-                    defaultScore:0,
160
-                    configs: []
169
+                    defaultScore:null,
170
+                    configs: [],
171
+                    selectedItems: scope.selected.items,
172
+                    refreshData: scope.refreshData,
173
+                    fileData: scope.fileData
161
                 };
174
                 };
162
                 // 增加配置
175
                 // 增加配置
163
                 $scope.addConfig = function(){
176
                 $scope.addConfig = function(){
164
-                    $scope.configs.configs.push({startNum: 0, endNum: 0, score: 0});
177
+                    $scope.configs.configs.push({startCount: 1, endCount: 1, score: 1});
165
                 }
178
                 }
166
                 // 移除配置
179
                 // 移除配置
167
                 $scope.removeConfig = function(index){
180
                 $scope.removeConfig = function(index){
168
                     $scope.configs.configs.splice(index, 1);
181
                     $scope.configs.configs.splice(index, 1);
169
                 }
182
                 }
170
                 $scope.ok = function () {
183
                 $scope.ok = function () {
171
-                    $modalInstance.close(data);
184
+                    // 校验
185
+                    var flag = true;
186
+                    if($scope.configs.configs.length){
187
+                        //是否是大于1的正整数
188
+                        var isNumberReg = /^[1-9][0-9]*$/;
189
+                        $scope.configs.configs.forEach(v => {
190
+                            if(!isNumberReg.test(v.startCount) || !isNumberReg.test(v.endCount) || !isNumberReg.test(v.score)){
191
+                                flag = false;
192
+                            }
193
+                        })
194
+                        //是否起始 < 终值
195
+                        if(flag){
196
+                            $scope.configs.configs.forEach(v => {
197
+                                if(v.startCount > v.endCount){
198
+                                    flag = false;
199
+                                }
200
+                            })
201
+                        }
202
+                        // 是否有区间交叉
203
+                        if(flag){
204
+                            let startArr = $scope.configs.configs.map(v => v.startCount);
205
+                            let endArr = $scope.configs.configs.map(v => v.endCount);
206
+                            for(let i=1;i<startArr.length;i++){
207
+                                if (startArr[i] <= endArr[i-1]){
208
+                                    flag = false;
209
+                                    break;
210
+                                }
211
+                            }
212
+                        }
213
+                    }
214
+                    if(!flag){
215
+                        SweetAlert.swal({
216
+                            title: "提示",
217
+                            text: "请正确填写选项!",
218
+                            type: "error"
219
+                        });
220
+                        return;
221
+                    }
222
+                    $modalInstance.close($scope.configs);
172
                 };
223
                 };
173
 
224
 
174
                 $scope.cancel = function () {
225
                 $scope.cancel = function () {
175
                     $modalInstance.dismiss('cancel');
226
                     $modalInstance.dismiss('cancel');
176
                 };
227
                 };
177
             },
228
             },
229
+            resolve: {
230
+                scope: function(){
231
+                    return $scope;
232
+                }
233
+            }
178
         })
234
         })
179
 
235
 
180
         modalInstance.result.then(function (result) {
236
         modalInstance.result.then(function (result) {
181
             console.log(result);
237
             console.log(result);
238
+            var postData = {
239
+                ids: result.selectedItems.map(v => v.id).toString(),
240
+                removeComplexity: 1,
241
+                removeRules: 1
242
+            }
182
             if (result) {
243
             if (result) {
183
-                api_bpm_data.executeOnce({inspection:data}).then(function (response) {
244
+                api_bpm_data.setScoreRule(postData).then(function (response) {
184
                     if(response.status == 200){
245
                     if(response.status == 200){
185
-                        SweetAlert.swal({
186
-                            title: "操作成功!",
187
-                            type: "success",
188
-                        });
246
+                        var postData = {
247
+                            ids: result.selectedItems.map(v => v.id).toString(),
248
+                            complexity: result.defaultScore?result.defaultScore.id:undefined,
249
+                            rules: result.configs.length?result.configs:undefined
250
+                        }
251
+                        api_bpm_data.setScoreRule(postData).then(function (response) {
252
+                            if(response.status == 200){
253
+                                SweetAlert.swal({
254
+                                    title: "操作成功!",
255
+                                    type: "success",
256
+                                });
257
+                                result.refreshData('expand-right', result.fileData);
258
+                            }else{
259
+                                SweetAlert.swal({
260
+                                    title: "操作失败!",
261
+                                    type: "error",
262
+                                });
263
+                            }
264
+                        })
189
                     }else{
265
                     }else{
190
                         SweetAlert.swal({
266
                         SweetAlert.swal({
191
                             title: "操作失败!",
267
                             title: "操作失败!",
@@ -202,38 +278,106 @@ app.controller('scoreConfigurationPerformanceCtrl', ["$rootScope", "$scope", "$s
202
         var modalInstance = $modal.open({
278
         var modalInstance = $modal.open({
203
             templateUrl: 'assets/views/scoreConfigurationPerformance-edit.html',
279
             templateUrl: 'assets/views/scoreConfigurationPerformance-edit.html',
204
             size: "sm",
280
             size: "sm",
205
-            controller: function ($scope, $modalInstance) {
281
+            controller: function ($scope, scope, $modalInstance, SweetAlert) {
282
+                console.log(scope.selected.items);
283
+                $scope.incidentComplexity = scope.incidentComplexity;
206
                 $scope.configs = {
284
                 $scope.configs = {
207
-                    defaultScore:0,
208
-                    configs: []
285
+                    defaultScore:data.complexity || null,
286
+                    configs: data.rules ? data.rules.map(v=>({startCount:v.startCount,endCount:v.endCount,score:v.score})) : [],
287
+                    selectedItems: [data],
288
+                    refreshData: scope.refreshData,
289
+                    fileData: scope.fileData
209
                 };
290
                 };
210
                 // 增加配置
291
                 // 增加配置
211
                 $scope.addConfig = function(){
292
                 $scope.addConfig = function(){
212
-                    $scope.configs.configs.push({startNum: 0, endNum: 0, score: 0});
293
+                    $scope.configs.configs.push({startCount: 1, endCount: 1, score: 1});
213
                 }
294
                 }
214
                 // 移除配置
295
                 // 移除配置
215
                 $scope.removeConfig = function(index){
296
                 $scope.removeConfig = function(index){
216
                     $scope.configs.configs.splice(index, 1);
297
                     $scope.configs.configs.splice(index, 1);
217
                 }
298
                 }
218
                 $scope.ok = function () {
299
                 $scope.ok = function () {
219
-                    $modalInstance.close(data);
300
+                    // 校验
301
+                    var flag = true;
302
+                    if($scope.configs.configs.length){
303
+                        //是否是大于1的正整数
304
+                        var isNumberReg = /^[1-9][0-9]*$/;
305
+                        $scope.configs.configs.forEach(v => {
306
+                            if(!isNumberReg.test(v.startCount) || !isNumberReg.test(v.endCount) || !isNumberReg.test(v.score)){
307
+                                flag = false;
308
+                            }
309
+                        })
310
+                        //是否起始 < 终值
311
+                        if(flag){
312
+                            $scope.configs.configs.forEach(v => {
313
+                                if(v.startCount > v.endCount){
314
+                                    flag = false;
315
+                                }
316
+                            })
317
+                        }
318
+                        // 是否有区间交叉
319
+                        if(flag){
320
+                            let startArr = $scope.configs.configs.map(v => v.startCount);
321
+                            let endArr = $scope.configs.configs.map(v => v.endCount);
322
+                            for(let i=1;i<startArr.length;i++){
323
+                                if (startArr[i] <= endArr[i-1]){
324
+                                    flag = false;
325
+                                    break;
326
+                                }
327
+                            }
328
+                        }
329
+                    }
330
+                    if(!flag){
331
+                        SweetAlert.swal({
332
+                            title: "提示",
333
+                            text: "请正确填写选项!",
334
+                            type: "error"
335
+                        });
336
+                        return;
337
+                    }
338
+                    $modalInstance.close($scope.configs);
220
                 };
339
                 };
221
 
340
 
222
                 $scope.cancel = function () {
341
                 $scope.cancel = function () {
223
                     $modalInstance.dismiss('cancel');
342
                     $modalInstance.dismiss('cancel');
224
                 };
343
                 };
225
             },
344
             },
345
+            resolve: {
346
+                scope: function(){
347
+                    return $scope;
348
+                }
349
+            }
226
         })
350
         })
227
 
351
 
228
         modalInstance.result.then(function (result) {
352
         modalInstance.result.then(function (result) {
229
             console.log(result);
353
             console.log(result);
354
+            var postData = {
355
+                ids: result.selectedItems.map(v => v.id).toString(),
356
+                removeComplexity: 1,
357
+                removeRules: 1
358
+            }
230
             if (result) {
359
             if (result) {
231
-                api_bpm_data.executeOnce({inspection:data}).then(function (response) {
360
+                api_bpm_data.setScoreRule(postData).then(function (response) {
232
                     if(response.status == 200){
361
                     if(response.status == 200){
233
-                        SweetAlert.swal({
234
-                            title: "操作成功!",
235
-                            type: "success",
236
-                        });
362
+                        var postData = {
363
+                            ids: result.selectedItems.map(v => v.id).toString(),
364
+                            complexity: result.defaultScore?result.defaultScore.id:undefined,
365
+                            rules: result.configs.length?result.configs:undefined
366
+                        }
367
+                        api_bpm_data.setScoreRule(postData).then(function (response) {
368
+                            if(response.status == 200){
369
+                                SweetAlert.swal({
370
+                                    title: "操作成功!",
371
+                                    type: "success",
372
+                                });
373
+                                result.refreshData('expand-right', result.fileData);
374
+                            }else{
375
+                                SweetAlert.swal({
376
+                                    title: "操作失败!",
377
+                                    type: "error",
378
+                                });
379
+                            }
380
+                        })
237
                     }else{
381
                     }else{
238
                         SweetAlert.swal({
382
                         SweetAlert.swal({
239
                             title: "操作失败!",
383
                             title: "操作失败!",
@@ -251,7 +395,6 @@ app.controller('scoreConfigurationPerformanceCtrl', ["$rootScope", "$scope", "$s
251
 
395
 
252
     //重置按钮
396
     //重置按钮
253
     $scope.reload = function () {
397
     $scope.reload = function () {
254
-        this.one_cates = [];
255
         this.two_cates = [];
398
         this.two_cates = [];
256
         delete $scope.fileData.incidentcategory.oneCate;
399
         delete $scope.fileData.incidentcategory.oneCate;
257
         delete $scope.fileData.incidentcategory.twoCate;
400
         delete $scope.fileData.incidentcategory.twoCate;
@@ -270,34 +413,23 @@ app.controller('scoreConfigurationPerformanceCtrl', ["$rootScope", "$scope", "$s
270
 
413
 
271
         var postData = angular.copy(filterData);
414
         var postData = angular.copy(filterData);
272
         if(postData.incidentcategory.twoCate){
415
         if(postData.incidentcategory.twoCate){
273
-            postData.incidentcategory.categoryid = postData.incidentcategory.twoCate.id;
416
+            postData.incidentcategory.id = postData.incidentcategory.twoCate.id;
417
+            postData.incidentcategory.cascade = true;
274
             delete postData.incidentcategory.oneCate;
418
             delete postData.incidentcategory.oneCate;
275
             delete postData.incidentcategory.twoCate;
419
             delete postData.incidentcategory.twoCate;
276
         }else if(postData.incidentcategory.oneCate){
420
         }else if(postData.incidentcategory.oneCate){
277
-            postData.incidentcategory.categoryid = postData.incidentcategory.oneCate.id;
421
+            postData.incidentcategory.id = postData.incidentcategory.oneCate.id;
422
+            postData.incidentcategory.cascade = true;
278
             delete postData.incidentcategory.oneCate;
423
             delete postData.incidentcategory.oneCate;
279
         }
424
         }
425
+        postData.incidentcategory.selectType = 'three';
426
+        postData.incidentcategory.rules = [];
280
 
427
 
281
         api_bpm_data.fetchDataList('incidentcategory', postData).then(function (data) {
428
         api_bpm_data.fetchDataList('incidentcategory', postData).then(function (data) {
282
             var myData = Restangular.stripRestangular(data);
429
             var myData = Restangular.stripRestangular(data);
283
             $scope.gridOptions.totalItems = myData.totalNum;
430
             $scope.gridOptions.totalItems = myData.totalNum;
284
             if (angular.isArray(myData.list)) {
431
             if (angular.isArray(myData.list)) {
285
                 $scope.myData = myData.list;
432
                 $scope.myData = myData.list;
286
-                var arr = [];
287
-                $scope.myData.forEach(v => {
288
-                    // 判断arr数组里是否有该事件分类
289
-                    let index = arr.findIndex(vv => vv.id == v.categoryid);
290
-                    if(index > -1){
291
-                        arr[index].rules.push(v);
292
-                    }else{
293
-                        arr.push({
294
-                            id: v.categoryid,
295
-                            incidentCategory: v.incidentCategory,
296
-                            rules: [v]
297
-                        })
298
-                    }
299
-                })
300
-                $scope.myData = arr;
301
                 for (var i = 0; i < $scope.myData.length; i++) {
433
                 for (var i = 0; i < $scope.myData.length; i++) {
302
                     $scope.myData[i]['item'] = i + 1 + filterData.idx * filterData.sum;
434
                     $scope.myData[i]['item'] = i + 1 + filterData.idx * filterData.sum;
303
                 }
435
                 }
@@ -323,34 +455,23 @@ app.controller('scoreConfigurationPerformanceCtrl', ["$rootScope", "$scope", "$s
323
 
455
 
324
         var postData = angular.copy(filterData);
456
         var postData = angular.copy(filterData);
325
         if(postData.incidentcategory.twoCate){
457
         if(postData.incidentcategory.twoCate){
326
-            postData.incidentcategory.categoryid = postData.incidentcategory.twoCate.id;
458
+            postData.incidentcategory.id = postData.incidentcategory.twoCate.id;
459
+            postData.incidentcategory.cascade = true;
327
             delete postData.incidentcategory.oneCate;
460
             delete postData.incidentcategory.oneCate;
328
             delete postData.incidentcategory.twoCate;
461
             delete postData.incidentcategory.twoCate;
329
         }else if(postData.incidentcategory.oneCate){
462
         }else if(postData.incidentcategory.oneCate){
330
-            postData.incidentcategory.categoryid = postData.incidentcategory.oneCate.id;
463
+            postData.incidentcategory.id = postData.incidentcategory.oneCate.id;
464
+            postData.incidentcategory.cascade = true;
331
             delete postData.incidentcategory.oneCate;
465
             delete postData.incidentcategory.oneCate;
332
         }
466
         }
467
+        postData.incidentcategory.selectType = 'three';
468
+        postData.incidentcategory.rules = [];
333
 
469
 
334
         api_bpm_data.fetchDataList('incidentcategory', postData).then(function (data) {
470
         api_bpm_data.fetchDataList('incidentcategory', postData).then(function (data) {
335
             var myData = Restangular.stripRestangular(data);
471
             var myData = Restangular.stripRestangular(data);
336
             $scope.gridOptions.totalItems = myData.totalNum;
472
             $scope.gridOptions.totalItems = myData.totalNum;
337
             if (angular.isArray(myData.list)) {
473
             if (angular.isArray(myData.list)) {
338
                 $scope.myData = myData.list;
474
                 $scope.myData = myData.list;
339
-                var arr = [];
340
-                $scope.myData.forEach(v => {
341
-                    // 判断arr数组里是否有该事件分类
342
-                    let index = arr.findIndex(vv => vv.id == v.categoryid);
343
-                    if(index > -1){
344
-                        arr[index].rules.push(v);
345
-                    }else{
346
-                        arr.push({
347
-                            id: v.categoryid,
348
-                            incidentCategory: v.incidentCategory,
349
-                            rules: [v]
350
-                        })
351
-                    }
352
-                })
353
-                $scope.myData = arr;
354
                 for (var i = 0; i < $scope.myData.length; i++) {
475
                 for (var i = 0; i < $scope.myData.length; i++) {
355
                     $scope.myData[i]['item'] = i + 1 + filterData.idx * filterData.sum
476
                     $scope.myData[i]['item'] = i + 1 + filterData.idx * filterData.sum
356
                 }
477
                 }
@@ -371,12 +492,23 @@ app.controller('scoreConfigurationPerformanceCtrl', ["$rootScope", "$scope", "$s
371
     $scope.ldloading = {};
492
     $scope.ldloading = {};
372
     $scope.fileData = {
493
     $scope.fileData = {
373
         "idx": 0,
494
         "idx": 0,
374
-        "sum": 9999,
495
+        "sum": 10,
375
         "incidentcategory": {}
496
         "incidentcategory": {}
376
     }
497
     }
377
     $scope.searchinspe = function () {
498
     $scope.searchinspe = function () {
378
         $scope.refreshData('expand-right', $scope.fileData);
499
         $scope.refreshData('expand-right', $scope.fileData);
379
     }
500
     }
501
+    // 获取默认积分
502
+    $scope.incidentComplexity = [];
503
+    $scope.getIncidentComplexity = function () {
504
+        api_wechatfile.getDictionary({
505
+            key: "incident_complexity",
506
+            type: "list"
507
+          }).then(function (res) {
508
+            $scope.incidentComplexity = res;
509
+        })
510
+    }
511
+    $scope.getIncidentComplexity();
380
     // 获取一级分类
512
     // 获取一级分类
381
     $scope.getOneCates = function (keyword='') {
513
     $scope.getOneCates = function (keyword='') {
382
         $scope.one_cates = [];
514
         $scope.one_cates = [];

+ 4 - 0
assets/js/main.js

@@ -947,6 +947,10 @@ app.factory('api_bpm_data', ['BpmRestangular', function (BpmRestangular) {
947
     var inspectionProcessActual = BpmRestangular.all("InspectionProcessActual");
947
     var inspectionProcessActual = BpmRestangular.all("InspectionProcessActual");
948
     var solutionService = BpmRestangular.all("solution");
948
     var solutionService = BpmRestangular.all("solution");
949
     return {
949
     return {
950
+        // 设置服务台积分规则
951
+        setScoreRule: function (data) {
952
+            return dataService.customPOST(data, 'setScoreRule');
953
+        },
950
         // 服务台绩效
954
         // 服务台绩效
951
         serviceCount: function (data) {
955
         serviceCount: function (data) {
952
             return dataService.customPOST(data, 'serviceCount');
956
             return dataService.customPOST(data, 'serviceCount');

+ 1 - 1
assets/views/performance/scoreConfigurationPerformance.html

@@ -71,7 +71,7 @@
71
     </div>
71
     </div>
72
     <div class="tableList" ui-i18n="{{lang}}">
72
     <div class="tableList" ui-i18n="{{lang}}">
73
         <div>
73
         <div>
74
-            <div id="grid1 " ui-grid="gridOptions" external-scopes="$scope" ui-grid-resize-columns ui-grid-selection ui-grid-auto-resize class="grid">
74
+            <div id="grid1 " ui-grid="gridOptions" ui-grid-pagination external-scopes="$scope" ui-grid-resize-columns ui-grid-selection ui-grid-auto-resize class="grid">
75
             </div>
75
             </div>
76
         </div>
76
         </div>
77
     </div>
77
     </div>

+ 12 - 5
assets/views/scoreConfigurationPerformance-edit.html

@@ -6,12 +6,19 @@
6
 </div>
6
 </div>
7
 <div class="modal-body center">
7
 <div class="modal-body center">
8
     <div class="col-xs-12 padding-top-15 padding-bottom-15 padding-left-5 padding-right-5">
8
     <div class="col-xs-12 padding-top-15 padding-bottom-15 padding-left-5 padding-right-5">
9
-        <div class="col-xs-6 no-padding text-left">
9
+        <div class="col-xs-6 no-padding text-left" style="display: flex;align-items:center;">
10
             <div class="col-xs-5 no-padding">
10
             <div class="col-xs-5 no-padding">
11
                 默认积分:
11
                 默认积分:
12
             </div>
12
             </div>
13
             <div class="col-xs-7 no-padding">
13
             <div class="col-xs-7 no-padding">
14
-                <input type="number" min="0" max="999" style="width: 100%;" ng-model="configs.defaultScore">
14
+                <ui-select style="width: 100%;" ng-model="configs.defaultScore" theme="bootstrap">
15
+                    <ui-select-match placeholder="" allow-clear>
16
+                        {{$select.selected.value}}
17
+                    </ui-select-match>
18
+                    <ui-select-choices repeat="item in incidentComplexity">
19
+                        <div ng-bind-html="item.value | highlight: $select.search"></div>
20
+                    </ui-select-choices>
21
+                </ui-select>
15
             </div>
22
             </div>
16
         </div>
23
         </div>
17
         <div class="col-xs-6 no-padding text-right">
24
         <div class="col-xs-6 no-padding text-right">
@@ -24,7 +31,7 @@
24
                 起值:
31
                 起值:
25
             </div>
32
             </div>
26
             <div class="col-xs-7 no-padding">
33
             <div class="col-xs-7 no-padding">
27
-                <input type="number" min="0" max="{{config.endNum}}" style="width: 100%;" ng-model="config.startNum">
34
+                <input type="number" min="1" max="999" step="1" style="width: 100%;" ng-model="config.startCount">
28
             </div>
35
             </div>
29
         </div>
36
         </div>
30
         <div class="col-xs-3 no-padding">
37
         <div class="col-xs-3 no-padding">
@@ -32,7 +39,7 @@
32
                 终值:
39
                 终值:
33
             </div>
40
             </div>
34
             <div class="col-xs-7 no-padding">
41
             <div class="col-xs-7 no-padding">
35
-                <input type="number" min="{{config.startNum}}" max="999" style="width: 100%;" ng-model="config.endNum">
42
+                <input type="number" min="1" max="999" step="1" style="width: 100%;" ng-model="config.endCount">
36
             </div>
43
             </div>
37
         </div>
44
         </div>
38
         <div class="col-xs-3 no-padding">
45
         <div class="col-xs-3 no-padding">
@@ -40,7 +47,7 @@
40
                 积分:
47
                 积分:
41
             </div>
48
             </div>
42
             <div class="col-xs-7 no-padding">
49
             <div class="col-xs-7 no-padding">
43
-                <input type="number" min="0" max="999" style="width: 100%;" ng-model="config.score">
50
+                <input type="number" min="1" max="999" step="1" style="width: 100%;" ng-model="config.score">
44
             </div>
51
             </div>
45
         </div>
52
         </div>
46
         <div class="col-xs-3 no-padding text-right">
53
         <div class="col-xs-3 no-padding text-right">