浏览代码

查号信息管理

seimin 3 年之前
父节点
当前提交
427490a8c5

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

@@ -163,6 +163,7 @@ app.constant('JS_REQUIRES', {
163 163
         'knowkedgecateCtrl': 'assets/js/controllers/system/processdesign/knowledgedesign/knowledgecateCtrl.js',
164 164
         'prioritymatrixCtrl': 'assets/js/controllers/system/processdesign/incidentplan/prioritymatrixCtrl.js',
165 165
         'placeCtrl': 'assets/js/controllers/system/organizationdesign/placeCtrl.js',
166
+        'phoneListCtrl': 'assets/js/controllers/system/phoneListCtrl.js',
166 167
         'serverslevelCtrl': 'assets/js/controllers/system/organizationdesign/serverslevelCtrl.js',
167 168
         'worktimeCtrl': 'assets/js/controllers/system/organizationdesign/worktimeCtrl.js',
168 169
         'deptCtrl': 'assets/js/controllers/system/organizationdesign/deptCtrl.js',

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

@@ -1518,6 +1518,15 @@ app.config(['$authProvider', '$httpProvider', '$stateProvider', '$urlRouterProvi
1518 1518
                 ncyBreadcrumb: {
1519 1519
                     label: 'User Manager'
1520 1520
                 }
1521
+                // 查号管理
1522
+            }).state('app.system.phoneList', {
1523
+                url: '/phoneList',
1524
+                templateUrl: "assets/views/system/phoneList.html",
1525
+                resolve: loadSequence('jquery-nestable-plugin', 'angularBootstrapNavTree', 'angularFileUpload', 'spin', 'ui.grid', 'xeditable', 'ui.select', 'multi.select.tree', 'touchspin-plugin', 'angularTree', 'angularBootstrapNavTree', 'checklist-model', 'phoneListCtrl'),
1526
+                title: 'Nav Manager',
1527
+                ncyBreadcrumb: {
1528
+                    label: 'User Manager'
1529
+                }
1521 1530
                 // 耗材分类维护
1522 1531
             }).state('app.system.organization.hc_flwh', {
1523 1532
                 url: '/hc_flwh',

+ 673 - 0
assets/js/controllers/system/phoneListCtrl.js

@@ -0,0 +1,673 @@
1
+app.controller('phoneListCtrl', ["$rootScope", "$scope", "$http", "$state", "$timeout", "$interval", "SweetAlert", "$modal", "FileUploader", "i18nService", "uiGridConstants", "uiGridGroupingConstants", "Restangular", "api_user_data", "api_cmdb2", function ($rootScope, $scope, $http, $state, $timeout, $interval, SweetAlert, $modal, FileUploader, i18nService, uiGridConstants, uiGridGroupingConstants, Restangular, api_user_data, api_cmdb2) {
2
+    $scope.langs = i18nService.getAllLangs();
3
+    $scope.lang = 'zh-cn';
4
+    $scope.cancles = true;
5
+    var loginUser = $rootScope.user;
6
+    $scope.xinzeng = false;
7
+    $scope.shanchu = false;
8
+    $scope.bianji = false;
9
+    for (var i = 0; i < loginUser.menu.length; i++) {
10
+        if (loginUser.menu[i].link == "quyudidianguanli_xinzeng") {
11
+            $scope.xinzeng = true
12
+        }
13
+        if (loginUser.menu[i].link == "quyudidianguanli_shanchu") {
14
+            $scope.shanchu = true
15
+        }
16
+        if (loginUser.menu[i].link == "quyudidianguanli_bianji") {
17
+            $scope.bianji = true
18
+        }
19
+    }
20
+    var fildata = {
21
+        "idx": 0,
22
+        "sum": 1000
23
+    };
24
+    $scope.choice = false;
25
+    $scope.backcolor = [];
26
+    $scope.outarea = [];
27
+    $scope.outplace = [];
28
+    $scope.pla = {};
29
+    $scope.areaid = {};
30
+    $scope.areaname = "";
31
+    $scope.area = {};
32
+    $scope.areaplace = true;
33
+    $scope.freshenarea = function () {
34
+        api_user_data.fetchDataList('phoneUnit', fildata).then(function (response) {
35
+            if (response) {
36
+                if (response.status = 200) {
37
+                    if (!$scope.outarea.length&&response.list.length) {
38
+                        $scope.ckickrow(response.list[0]);
39
+                    }
40
+                    $scope.outarea = response.list;
41
+                }
42
+            }
43
+        })
44
+    }
45
+    $scope.freshenarea();
46
+    
47
+    $scope.freshenplace = function (id) {
48
+        if (id) {
49
+            var fildata = {
50
+                "idx": 0,
51
+                "sum": 1000,
52
+                "phoneDirectory": {
53
+                    "unit": {
54
+                        "id": id
55
+                    }
56
+                }
57
+            };
58
+            api_user_data.fetchDataList('phoneDirectory', fildata).then(function (response) {
59
+                if (response) {
60
+                    if (response.status = 200) {
61
+                        $scope.outplace = response.list;
62
+                    }
63
+                }
64
+            })
65
+        }
66
+    }
67
+    
68
+    $scope.ckickrow = function (data) {
69
+        $scope.choice = false;
70
+        $scope.areaid = data.id;
71
+        $scope.areaname = data.unit;
72
+        $scope.areaplace = true;
73
+        $scope.areaData = data;
74
+        if (data.id) {
75
+            $scope.freshenplace(data.id);
76
+            // var  fildata={"idx":0,"sum":1000,"place":{areaId:data.id}};
77
+            // api_user_data.fetchDataList('place',fildata).then(function(response){
78
+            //     if(response){
79
+            //         if(response.status=200){
80
+            //            $scope.outplace= response.list;
81
+            //         }
82
+            //     }
83
+            // }) 
84
+        } else { }
85
+    }
86
+    //  置空单位下的部门
87
+    $scope.clear = function () {
88
+        $scope.areaname = ''
89
+        $scope.outplace = []
90
+    }
91
+
92
+
93
+    $scope.clickplace = function (pla) {
94
+        $scope.areaplace = false;
95
+        $scope.pla = pla
96
+    }
97
+    //  编辑单位
98
+    $scope.editArea = function (data) {
99
+        var modalInstance = $modal.open({
100
+            templateUrl: 'assets/views/system/tpl/company.html',
101
+            controller: function ($scope, scope, $modalInstance, api_user_data) {
102
+                $scope.title = "修改单位";
103
+                $scope.cancel = function () {
104
+                    $modalInstance.dismiss('cancel');
105
+                };
106
+                $scope.areaName = data.unit;
107
+                $scope.ok = function (areaName) {
108
+                    if (areaName != data.unit) {
109
+                        if ($scope.areaName) {
110
+                            $modalInstance.close(areaName);
111
+                        } else {
112
+                            SweetAlert.swal({
113
+                                title: "修改失败!",
114
+                                text: "名称不能为空",
115
+                                type: "error"
116
+                            })
117
+                        }
118
+                    } else {
119
+                        $modalInstance.dismiss('cancel');
120
+                    }
121
+                }
122
+            },
123
+            resolve: {
124
+                scope: function () {
125
+                    return $scope;
126
+                }
127
+            }
128
+        });
129
+        modalInstance.result.then(function (selectedItem) {
130
+            if (selectedItem) {
131
+                var fildata = {
132
+                    "phoneUnit": {
133
+                        "id": data.id,
134
+                        "deleteFlag": 0,
135
+                        "unit": selectedItem
136
+                    }
137
+                }
138
+                api_user_data.addData('phoneUnit', fildata).then(function (response) {
139
+                    if (response) {
140
+                        if (response.data && response.data.id) {
141
+                            SweetAlert.swal({
142
+                                title: "修改成功!",
143
+                                type: "success"
144
+                            }, function () {
145
+                                $scope.freshenarea()
146
+                            })
147
+                        } else {
148
+                            SweetAlert.swal({
149
+                                title: "修改失败!",
150
+                                text: response.msg || '',
151
+                                type: "error"
152
+                            })
153
+                        }
154
+                    }
155
+                })
156
+            }
157
+        })
158
+    }
159
+    //  新增单位
160
+    $scope.addArea = function (state) {
161
+        var modalInstance = $modal.open({
162
+            templateUrl: 'assets/views/system/tpl/company.html',
163
+            controller: function ($scope, scope, $modalInstance, api_user_data) {
164
+                $scope.title = "新增单位";
165
+                $scope.areaName = "";
166
+                $scope.cancel = function () {
167
+                    $modalInstance.dismiss('cancel');
168
+                };
169
+                $scope.ok = function (areaName) {
170
+                    if ($scope.areaName) {
171
+                        $modalInstance.close(areaName);
172
+                    } else {
173
+                        SweetAlert.swal({
174
+                            title: "新增失败!",
175
+                            text: "名称不能为空",
176
+                            type: "error"
177
+                        })
178
+                    }
179
+                }
180
+            },
181
+            resolve: {
182
+                scope: function () {
183
+                    return $scope;
184
+                }
185
+            }
186
+        });
187
+        modalInstance.result.then(function (selectedItem) {
188
+            if (selectedItem) {
189
+                var fildata = {
190
+                    "phoneUnit": {
191
+                        "unit": selectedItem
192
+                    }
193
+                }
194
+                api_user_data.addData('phoneUnit', fildata).then(function (response) {
195
+                    if (response) {
196
+                        if (response.status == 200) {
197
+                            SweetAlert.swal({
198
+                                title: "新增成功!",
199
+                                type: "success"
200
+                            }, function () {
201
+                                $scope.freshenarea()
202
+                            })
203
+                        } else {
204
+                            SweetAlert.swal({
205
+                                title: "新增失败!",
206
+                                text: response.msg || '',
207
+                                type: "error"
208
+                            })
209
+                        }
210
+                    }
211
+                })
212
+            }
213
+        })
214
+    }
215
+    //删除单位
216
+    $scope.closearea = function (index, data) {
217
+        if (!data.id) {
218
+            $scope.cancles = true;
219
+            $scope.outarea.splice(index, 1);
220
+        } else {
221
+            var rmvList = data;
222
+            var modalInstance = $modal.open({
223
+                templateUrl: 'assets/views/delete.html',
224
+                controller: function ($scope, $modalInstance) {
225
+                    $scope.ok = function () {
226
+                        $modalInstance.close(data);
227
+                    };
228
+                    $scope.cancel = function () {
229
+                        $modalInstance.dismiss('cancel');
230
+                    };
231
+                    $scope.title = '单位删除';
232
+                    $scope.connect = '是否删除该单位'
233
+                },
234
+                size: 'sm'
235
+            });
236
+            modalInstance.result.then(function (selectedItem) {
237
+                if (selectedItem) {
238
+                    if (selectedItem.id) {
239
+                        var fildata = [selectedItem.id];
240
+                        api_user_data.rmvData('phoneUnit', fildata).then(function (response) {
241
+                            if (response) {
242
+                                if (response.status == 200) {
243
+                                    $scope.outplace = [];
244
+                                    $scope.areaname = "";
245
+                                    $scope.outarea.splice(index, 1);
246
+                                    SweetAlert.swal({
247
+                                        title: "删除成功!",
248
+                                        type: "success"
249
+                                    })
250
+                                } else {
251
+                                    SweetAlert.swal({
252
+                                        title: "删除失败!",
253
+                                        text: response.msg || '',
254
+                                        type: "error"
255
+                                    })
256
+                                }
257
+                            }
258
+                        })
259
+                    }
260
+                }
261
+            })
262
+        }
263
+    }
264
+    //  编辑部门
265
+    $scope.editPlace = function (data) {
266
+        var modalInstance = $modal.open({
267
+            templateUrl: 'assets/views/system/tpl/department.html',
268
+            controller: function ($scope, scope, $modalInstance, api_user_data) {
269
+                $scope.title = "修改部门";
270
+                $scope.check = {
271
+                    unit: data.unit,
272
+                    dept: data.dept,
273
+                    phone: data.phone,
274
+                    address: data.address
275
+                }
276
+                $scope.outarea = scope.outarea;
277
+                $scope.cancel = function () {
278
+                    $modalInstance.dismiss('cancel');
279
+                };
280
+                $scope.ok = function (check) {
281
+                    if (true) {
282
+                        if (check.dept && check.phone) {
283
+                            $modalInstance.close(check);
284
+                        } else {
285
+                            SweetAlert.swal({
286
+                                title: "编辑失败!",
287
+                                text: "请填写必填项",
288
+                                type: "error"
289
+                            })
290
+                        }
291
+                    } else {
292
+                        $modalInstance.dismiss('cancel');
293
+                    }
294
+                }
295
+            },
296
+            resolve: {
297
+                scope: function () {
298
+                    return $scope;
299
+                }
300
+            }
301
+        });
302
+        modalInstance.result.then(function (check) {
303
+            if (check) {
304
+                var fildata = {
305
+                    "phoneDirectory": {
306
+                        "dept": check.dept,
307
+                        "address": check.address,
308
+                        "phone": check.phone,
309
+                        "unit": {
310
+                            "id": check.unit.id
311
+                        },
312
+                        "deleteFlag": 0,
313
+                        "id": data.id
314
+                    }
315
+                }
316
+                api_user_data.addData('phoneDirectory', fildata).then(function (response) {
317
+                    if (response) {
318
+                        if (response.data && response.data.id) {
319
+                            SweetAlert.swal({
320
+                                title: "修改成功!",
321
+                                type: "success"
322
+                            }, function () {
323
+                                $scope.freshenplace($scope.areaData.id);
324
+                            })
325
+                        } else {
326
+                            SweetAlert.swal({
327
+                                title: "修改失败!",
328
+                                text: response.msg || '',
329
+                                type: "error"
330
+                            })
331
+                        }
332
+                    }
333
+                })
334
+            }
335
+        })
336
+    }
337
+    //  新增部门
338
+    $scope.addplace = function (area) {
339
+        var modalInstance = $modal.open({
340
+            templateUrl: 'assets/views/system/tpl/department.html',
341
+            controller: function ($scope, scope, $modalInstance, api_user_data) {
342
+                $scope.title = "新增部门";
343
+                if (area !== undefined) {
344
+                    $scope.check = { unit: area }
345
+                } else {
346
+                    $scope.check = {}
347
+                }
348
+                $scope.outarea = scope.outarea;
349
+                $scope.cancel = function () {
350
+                    $modalInstance.dismiss('cancel');
351
+                };
352
+                $scope.ok = function (check) {
353
+                    if (check && check.unit && check.dept && check.phone) {
354
+                        console.log(check, 9999)
355
+                        $modalInstance.close(check);
356
+                    } else {
357
+                        SweetAlert.swal({
358
+                            title: "新增失败!",
359
+                            text: "请填写必填项",
360
+                            type: "error"
361
+                        })
362
+                    }
363
+                }
364
+            },
365
+            resolve: {
366
+                scope: function () {
367
+                    return $scope;
368
+                }
369
+            }
370
+        });
371
+        modalInstance.result.then(function (check) {
372
+            if (check) {
373
+                var fildata = {
374
+                    "phoneDirectory": {
375
+                        "dept": check.dept,
376
+                        "phone": check.phone,
377
+                        "address": check.address
378
+                    }
379
+                }
380
+                if (check.unit) {
381
+                    fildata.phoneDirectory.unit = {
382
+                        "id": check.unit.id
383
+                    }
384
+                }
385
+                api_user_data.addData('phoneDirectory', fildata).then(function (response) {
386
+                    if (response) {
387
+                        if (response.status == 200) {
388
+                            SweetAlert.swal({
389
+                                title: "新增成功!",
390
+                                type: "success"
391
+                            }, function () {
392
+                                $scope.freshenplace($scope.areaData.id);
393
+                            })
394
+                        } else {
395
+                            SweetAlert.swal({
396
+                                title: "新增失败!",
397
+                                text: response.msg || '',
398
+                                type: "error"
399
+                            })
400
+                        }
401
+                    }
402
+                })
403
+            }
404
+        })
405
+    }
406
+    //删除部门
407
+    $scope.closeplace = function (index, data) {
408
+        if (!data.id) {
409
+            $scope.cancles = true;
410
+            $scope.outplace.splice(index, 1);
411
+        } else {
412
+
413
+            var rmvList = data;
414
+            var modalInstance = $modal.open({
415
+                templateUrl: 'assets/views/delete.html',
416
+                controller: function ($scope, $modalInstance) {
417
+                    $scope.ok = function () {
418
+                        $modalInstance.close(data);
419
+                    };
420
+                    $scope.cancel = function () {
421
+                        $modalInstance.dismiss('cancel');
422
+                    };
423
+                    $scope.title = '部门删除';
424
+                    $scope.connect = '是否删除该部门'
425
+                },
426
+                size: 'sm'
427
+            });
428
+            modalInstance.result.then(function (selectedItem) {
429
+                if (selectedItem) {
430
+                    if (selectedItem.id) {
431
+                        var fildata = [selectedItem.id];
432
+                        api_user_data.rmvData('phoneDirectory', fildata).then(function (response) {
433
+                            if (response) {
434
+                                if (response.status == 200) {
435
+                                    $scope.outplace.splice(index, 1);
436
+                                    SweetAlert.swal({
437
+                                        title: "删除成功!",
438
+                                        type: "success"
439
+                                    })
440
+                                } else {
441
+                                    SweetAlert.swal({
442
+                                        title: "删除失败!",
443
+                                        type: "error"
444
+                                    })
445
+                                }
446
+                            }
447
+                        })
448
+                    }
449
+                }
450
+            })
451
+        }
452
+    }
453
+
454
+    //导入
455
+
456
+    $scope.importopen = function () { //导入触发事件
457
+        var modalInstance = $modal.open({
458
+            templateUrl: 'assets/views/import.html',
459
+            controller: function ($scope, $modalInstance, FileUploader) {
460
+                var importUploader = $scope.importUploader = new FileUploader({
461
+                    url: api_user_data.importData().getRequestedUrl(),
462
+                });
463
+                importUploader.onWhenAddingFileFailed = function (item /*{File|FileLikeObject}*/, filter, options) {
464
+                    console.info('onWhenAddingFileFailed', item, filter, options);
465
+                };
466
+                importUploader.onAfterAddingFile = function (fileItem) {
467
+                    console.info('onAfterAddingFile', fileItem);
468
+                };
469
+                importUploader.onAfterAddingAll = function (addedFileItems) {
470
+                    console.info('onAfterAddingAll', addedFileItems);
471
+                };
472
+
473
+                importUploader.onProgressItem = function (fileItem, progress) {
474
+                    console.info('onProgressItem', fileItem, progress);
475
+                };
476
+                importUploader.onProgressAll = function (progress) {
477
+                    console.info('onProgressAll', progress);
478
+                };
479
+                importUploader.onSuccessItem = function (fileItem, response, status, headers) {
480
+                    if (response.status == 200) {
481
+                        SweetAlert.swal({
482
+                            title: "导入成功!",
483
+                            confirmButtonColor: "#007AFF",
484
+                            type: "success"
485
+                        }, function () {
486
+                            // $scope.ldloading.contract_overlay = false;
487
+                            $rootScope.isMask = false;
488
+                            $scope.refreshData('expand-right', defaultFilterData);
489
+                        });
490
+                    } else {
491
+                        // $scope.ldloading.contract_overlay = false;
492
+                        $rootScope.isMask = false;
493
+                        SweetAlert.swal({
494
+                            title: "导入失败!",
495
+                            text: response.error,
496
+                            type: "error"
497
+                        })
498
+                    }
499
+
500
+                    console.info('onSuccessItem', fileItem, response, status, headers);
501
+
502
+                };
503
+                importUploader.onErrorItem = function (fileItem, response, status, headers) {
504
+                    console.info('onErrorItem', fileItem, response, status, headers);
505
+                    SweetAlert.swal({
506
+                        title: "系统错误!",
507
+                        text: "系统错误,请稍候重试!",
508
+                        type: "error"
509
+                    });
510
+                };
511
+                importUploader.onCancelItem = function (fileItem, response, status, headers) {
512
+                    console.info('onCancelItem', fileItem, response, status, headers);
513
+                };
514
+                importUploader.onCompleteItem = function (fileItem, response, status, headers) {
515
+                    console.info('onCompleteItem', fileItem, response, status, headers);
516
+                };
517
+                importUploader.onCompleteAll = function () {
518
+                    console.info('onCompleteAll');
519
+                };
520
+                $scope.ldloading = {};
521
+                $rootScope.isMask = false;
522
+                $scope.import = function (style) {
523
+                    // $scope.ldloading[style.replace('-', '_')] = true;
524
+                    $modalInstance.dismiss('cancel');
525
+                    $rootScope.isMask = true;
526
+                    importUploader.onBeforeUploadItem = function (item) {
527
+                        angular.extend(item.headers, $rootScope.getSession());
528
+                        item.formData.push({
529
+                            'filename': item.file.name
530
+                        });
531
+                        item.formData.push({
532
+                            'type': "areaPlace"
533
+                        });
534
+                        console.info('onBeforeUploadItem', item);
535
+                    };
536
+                    importUploader.uploadAll();
537
+                }
538
+                $scope.cancel = function () {
539
+                    $modalInstance.dismiss('cancel');
540
+                };
541
+            },
542
+            size: 'sm',
543
+            resolve: {
544
+                importUploader: function () {
545
+                    return $scope.importUploader;
546
+                }
547
+            }
548
+        });
549
+        modalInstance.result.then(function (selectedItem) {
550
+            if (selectedItem) { }
551
+        })
552
+    }
553
+    //导出
554
+    $scope.openmodel = function () {
555
+        //  var modalInstance = $modal.open({
556
+        //      templateUrl: 'assets/views/system/tpl/getdown.html',
557
+        //      controller: function($scope, $modalInstance) {
558
+        //          $scope.key = {};
559
+        //          $scope.onChange = function(key) {
560
+        //                  $scope.key = key;
561
+        //              }
562
+        //              //  $scope.downmodel = [{ id: 1, name: "EXCEL2003版(xls)" }, { id: 2, name: "EXCEL2007及以上版(xlsx)" }]
563
+        //          $scope.ok = function() {
564
+        //              $modalInstance.close($scope.key);
565
+        //          };
566
+        //          $scope.cancel = function() {
567
+        //              $modalInstance.dismiss('cancel');
568
+        //          };
569
+        //      },
570
+        //      size: 'sm',
571
+        //  });
572
+        //  modalInstance.result.then(function(selectedItem) {
573
+        //  if (selectedItem) {
574
+        //      var selectedItemId = "";
575
+        //      if (selectedItem.id == 2) {
576
+        //          selectedItemId = ".xlsx";
577
+        //      }
578
+        //  var type = "areaPlace";
579
+        //  var month = 0;
580
+        $http({
581
+            url: api_user_data.downDataModel("areaPlace", 0).getRequestedUrl(),
582
+            method: 'GET',
583
+            headers: {
584
+                'Accept': '*/*'
585
+            },
586
+            responseType: 'arraybuffer'
587
+        }).success(function (data, status, headers, config) {
588
+            var file = new Blob([data], {
589
+                // type : 'application/octet-stream'
590
+                type: 'application/vnd.ms-excel'
591
+            });
592
+            //trick to download store a file having its URL
593
+            var fileURL = URL.createObjectURL(file);
594
+            var a = document.createElement('a');
595
+            a.href = fileURL;
596
+            a.target = '_blank';
597
+            a.download = "单位部门.xlsx";
598
+            document.body.appendChild(a);
599
+            a.click();
600
+        }).error(function (data, status, headers, config) {
601
+            console.log(data);
602
+        });
603
+    }
604
+    //      });
605
+    //  }
606
+
607
+    // 2021
608
+    //导入模板
609
+    $scope.importDataTpl = function () {
610
+        var wt_url = api_user_data.importData1('areaPlace').getRequestedUrl();
611
+        var form = new FormData();
612
+        var file = document.getElementById("importTplIpt").files[0];
613
+        form.append('filename', file.name)
614
+        form.append('file', file);
615
+        console.log(document.getElementById("importTplIpt").files)
616
+        $http({
617
+            method: 'POST',
618
+            url: wt_url,
619
+            data: form,
620
+            headers: { 'Content-Type': undefined },
621
+            transformRequest: angular.identity
622
+        }).success(function (data) {
623
+            document.getElementById("importTplIpt").outerHTML = document.getElementById("importTplIpt").outerHTML;
624
+            if (data.status == 200) {
625
+                SweetAlert.swal({
626
+                    title: "导入成功",
627
+                    confirmButtonColor: "#007AFF",
628
+                    type: "success"
629
+                }, function (flag) {
630
+                    $scope.freshenarea();
631
+                    $scope.freshenplace();
632
+                });
633
+            } else {
634
+                SweetAlert.swal({
635
+                    title: "导入失败",
636
+                    text: data.error,
637
+                    type: "error"
638
+                });
639
+            }
640
+        }).error(function (data) {
641
+            document.getElementById("importTplIpt").outerHTML = document.getElementById("importTplIpt").outerHTML;
642
+            SweetAlert.swal({
643
+                title: "导入失败",
644
+                text: data.error,
645
+                type: "error"
646
+            });
647
+        })
648
+    };
649
+    //导出模板
650
+    $scope.exportDataTpl = function () {
651
+        var wt_url = api_cmdb2.exportData1("downDataModels/operationSystem", {}).getRequestedUrl()
652
+        $http({
653
+            url: wt_url,
654
+            method: 'POST',
655
+            headers: {
656
+                'Accept': '*/*'
657
+            },
658
+            responseType: 'arraybuffer'
659
+        }).success(function (data, status, headers, config) {
660
+            var fileName = headers("Content-Disposition").split(";")[1].split("filename=")[1];
661
+            var file = new Blob([data], {
662
+                type: 'application/vnd.ms-excel'
663
+            });
664
+            var fileURL = URL.createObjectURL(file);
665
+            var a = document.createElement('a');
666
+            a.href = fileURL;
667
+            a.target = '_blank';
668
+            a.download = decodeURIComponent(fileName);
669
+            document.body.appendChild(a);
670
+            a.click();
671
+        }).error(function (data, status, headers, config) { });
672
+    };
673
+}]);

+ 359 - 0
assets/views/system/phoneList.html

@@ -0,0 +1,359 @@
1
+<style>
2
+    .per50_pos{
3
+        position: relative;
4
+        height: 100%;
5
+        display: flex;
6
+        justify-content: space-between;
7
+        align-items: center;
8
+    }
9
+
10
+    .per50{
11
+        flex: 1;
12
+        line-height: normal;
13
+        height: 100%;
14
+        display: flex;
15
+        align-items: center;
16
+    }
17
+
18
+    .per500{
19
+        flex: 1;
20
+        line-height: normal;
21
+        height: 100%;
22
+        display: flex;
23
+        flex-direction: column;
24
+    }
25
+
26
+    .per500 .per500_Item{
27
+        display: flex;
28
+    }
29
+
30
+    .per500 .per500_Item em{
31
+        font-style: normal;
32
+        flex: 1;
33
+    }
34
+
35
+    #importTplIpt {
36
+        position: absolute;
37
+        top: 0;
38
+        right: 0;
39
+        left: 0;
40
+        bottom: 0;
41
+        opacity: 0;
42
+    }
43
+
44
+    .mainDiv {
45
+        /* background: red; */
46
+        /* padding: 14px; */
47
+        /* height: 50px; */
48
+        overflow: hidden;
49
+        /* zoom: 1; */
50
+    }
51
+
52
+    .mainDivLeft {
53
+        /* display: inline-block; */
54
+        border-radius: 8px;
55
+        margin-right: 52%;
56
+        border: 1px solid #eeeeee;
57
+    }
58
+
59
+    .mainDivRight {
60
+        /* display: inline-block; */
61
+        width: 48%;
62
+        border-radius: 8px;
63
+        float: right;
64
+        border: 1px solid #eeeeee;
65
+    }
66
+
67
+    .mainDiv-head {
68
+        height: 47px;
69
+        line-height: 47px;
70
+        background: #f5f5f5;
71
+        font-size: 16px;
72
+        color: #606367;
73
+        border-radius: 8px 8px 0 0;
74
+        padding-left: 10px;
75
+        padding-right: 4px;
76
+    }
77
+
78
+    .mainDivLeft-span {
79
+        border: 1px solid;
80
+        /* padding: 15px 0px 15px 0px; */
81
+        padding-left: 15px;
82
+        padding-right: 15px;
83
+        padding-top: 4px;
84
+        padding-bottom: 4px;
85
+        height: 28px;
86
+        line-height: 28px;
87
+        border-radius: 4px;
88
+        margin-right: 10px;
89
+        font-size: 14px;
90
+        position: relative;
91
+    }
92
+
93
+    .mainDiv-head-right {
94
+        display: inline-block;
95
+        float: right;
96
+    }
97
+
98
+    .edit-left {
99
+        display: inline-block;
100
+        /* float: left; */
101
+        margin-left: 10px;
102
+    }
103
+
104
+    .span-1 {
105
+        border-color: #006bc0;
106
+        color: #006bc0;
107
+    }
108
+
109
+    .span-2 {
110
+        border: none;
111
+        color: white;
112
+        background-color: #2edbb8;
113
+    }
114
+
115
+    .span-3 {
116
+        border: none;
117
+        color: white;
118
+        background-color: #006bc0;
119
+    }
120
+
121
+    .mainDiv-body {
122
+        height: 500px;
123
+        border-radius: 8px;
124
+        border: 1px solid #eeeeee;
125
+        margin: 14px;
126
+        overflow-y: auto;
127
+    }
128
+
129
+    .mainDiv-body-1 {
130
+        height: 50px;
131
+        line-height: 50px;
132
+        font-size: 16px;
133
+        color: #606367;
134
+        padding: 0px 14px;
135
+        border-bottom: 1px solid #eeeeee;
136
+    }
137
+
138
+    .mainDiv-body-2 {
139
+        height: 70px;
140
+        line-height: 70px;
141
+        font-size: 14px;
142
+        color: #606367;
143
+        padding: 0px 8px;
144
+        border-bottom: 1px solid #eeeeee;
145
+    }
146
+
147
+    .mainDiv-body-2:last-child {
148
+        border-bottom: none;
149
+    }
150
+
151
+    .fixHeight {
152
+        height: 500px;
153
+        overflow: auto;
154
+    }
155
+
156
+    .mainDiv-body-3 {
157
+        font-size: 14px;
158
+        color: #606367;
159
+        padding: 8px;
160
+        border-bottom: 1px solid #eeeeee;
161
+    }
162
+
163
+    .mainDiv-body-3:last-child {
164
+        border-bottom: none;
165
+    }
166
+
167
+    .mainDiv-body-img {
168
+        height: 90px;
169
+        border-radius: 4px;
170
+        margin: 14px;
171
+        margin-bottom: 0px;
172
+        overflow: hidden;
173
+    }
174
+
175
+    .mainDiv-body-noList {
176
+        height: 110px;
177
+        margin: 50px 0;
178
+        text-align: center;
179
+    }
180
+
181
+    .form-control {
182
+        display: inline-block;
183
+    }
184
+
185
+    .mainDivLeft-span-1 {
186
+        border: 1px solid;
187
+        padding-left: 15px;
188
+        padding-right: 15px;
189
+        /* padding-top: 4px; */
190
+        /* padding-bottom: 4px; */
191
+        height: 28px;
192
+        line-height: 28px;
193
+        border-radius: 4px;
194
+        margin-right: 10px;
195
+        font-size: 14px;
196
+        display: inline-block;
197
+    }
198
+
199
+    .mainDivLeft-span-2 {
200
+        border: 1px solid;
201
+        padding-left: 15px;
202
+        padding-right: 15px;
203
+        /* padding-top: 4px; */
204
+        /* padding-bottom: 4px; */
205
+        height: 28px;
206
+        line-height: 28px;
207
+        border-radius: 4px;
208
+        margin-right: 10px;
209
+        font-size: 14px;
210
+        display: inline-block;
211
+    }
212
+
213
+    .mainDivLeft-span-edit-1 {
214
+        border: 1px solid;
215
+        padding-left: 8px;
216
+        padding-right: 8px;
217
+        /* padding-top: 4px; */
218
+        /* padding-bottom: 4px; */
219
+        height: 22px;
220
+        line-height: 22px;
221
+        border-radius: 2px;
222
+        margin-right: 10px;
223
+        font-size: 12px;
224
+        display: inline-block;
225
+    }
226
+
227
+    .mainDivLeft-span-edit-2 {
228
+        border: 1px solid;
229
+        padding-left: 8px;
230
+        padding-right: 8px;
231
+        /* padding-top: 4px; */
232
+        /* padding-bottom: 4px; */
233
+        height: 22px;
234
+        line-height: 22px;
235
+        border-radius: 2px;
236
+        margin-right: 10px;
237
+        font-size: 12px;
238
+        display: inline-block;
239
+    }
240
+</style>
241
+
242
+<section id="page-title">
243
+    <div class="row">
244
+        <div class="col-sm-8">
245
+            <h1 class="mainTitle">查号信息管理设置
246
+                <i tooltip='查号信息管理设置,对查号信息进行编辑管理' tooltip-placement="right"
247
+                    class="fa ti-help-alt margin-left-10 fontcolor-five pointfont"></i>
248
+            </h1>
249
+        </div>
250
+    </div>
251
+</section>
252
+<div ng-controller="phoneListCtrl">
253
+    <div class="mainDiv">
254
+        <!-- 谁固定谁在前 -->
255
+        <div class="mainDivRight">
256
+            <div class="mainDiv-head">
257
+                <i style="font-size: 18px !important;" class="icon iconfont icon-quyu bluefont"></i>
258
+                <span>{{areaname}} 单位下的部门</span>
259
+                <div class="mainDiv-head-right">
260
+                    <div class="btn btn_search" ng-click="addplace(areaData)" ng-show="xinzeng">新增</div>
261
+                </div>
262
+            </div>
263
+            <div class="mainDiv-body fixHeight">
264
+                <div class="mainDiv-body-noList" ng-if="areaname==''">
265
+                    <img src="./assets/images/place/icon_quesheng.png" alt="">
266
+                    <p class="handlefont">请选择单位</p>
267
+                </div>
268
+                <div class="mainDiv-body-3" style="cursor: pointer;" ng-repeat="area in outplace"
269
+                    ng-click="clickplace(area);">
270
+                    <div class="per50_pos" ng-hide="editShow">
271
+                        <!-- <div class=""> -->
272
+                        <i style="font-size: 18px !important; margin-right: 10px;"
273
+                            class="icon iconfont icon-icon32209"></i>
274
+                        <div class="per500">
275
+                            <div class="per500_Item"><span>部门:</span><em>{{ area.dept }}</em></div>
276
+                            <div class="per500_Item"><span>电话:</span><em>{{ area.phone }}</em></div>
277
+                            <div class="per500_Item"><span>地址:</span><em>{{ area.address }}</em></div>
278
+                        </div>
279
+                        <div class="mainDiv-head-right">
280
+                            <span class="mainDivLeft-span-1 span-1 pointfont bluefont" ng-click="editPlace(area)"
281
+                                ng-show="bianji">
282
+                                <i style="font-size: 14px !important;margin-right: 4px;"
283
+                                    class="icon iconfont icon-xiugai1 bluefont"></i>编辑
284
+                            </span>
285
+                            <span class="mainDivLeft-span-1 span-1 pointfont redfont" ng-click="closeplace($index,area)"
286
+                                ng-show="shanchu">
287
+                                <i style="font-size: 14px !important;margin-right: 0px;"
288
+                                    class="icon iconfont icon-shanchu2 redfont"></i> 删除
289
+                            </span>
290
+                        </div>
291
+                    </div>
292
+                    <div class="" ng-show="editShow">
293
+                        <input type="text" class="editable-has-buttons editable-input form-control"
294
+                            ng-model="$parent.$data" placeholder="请输入新增部门">
295
+                        <div class="edit-left">
296
+                            <span class="mainDivLeft-span-edit-1 span-1 pointfont printfont"
297
+                                ng-click="savedatas($parent.$data);editShow=!editShow">
298
+                                <i style="font-size: 12px !important;margin-right: 4px;"
299
+                                    class="icon iconfont icon-xiugai1 printfont"></i>完成
300
+                            </span>
301
+                            <span class="mainDivLeft-span-edit-2 span-1 pointfont redfont"
302
+                                ng-click="editShow=!editShow">
303
+                                <i style="font-size: 12px !important;margin-right: 0px;"
304
+                                    class="icon iconfont icon-shanchu2 redfont"></i> 取消
305
+                            </span>
306
+                        </div>
307
+                    </div>
308
+                </div>
309
+            </div>
310
+        </div>
311
+        <div class="mainDivLeft">
312
+            <div class="mainDiv-head">
313
+                <i style="font-size: 18px !important;" class="icon iconfont icon-quyu bluefont"></i>
314
+                <span style="cursor: pointer;" ng-click="clear()">单位</span>
315
+                <div class="mainDiv-head-right">
316
+                    <div class="btn btn_search" ng-click="addArea()" ng-show="xinzeng" ng-disabled="!cancles">新增</div>
317
+                </div>
318
+
319
+            </div>
320
+            <div class="mainDiv-body">
321
+                <div class="mainDiv-body-2" style="cursor: pointer;" ng-repeat="area in outarea"
322
+                    ng-click="ckickrow(area)">
323
+                    <div class="per50_pos" ng-hide="editShow">
324
+                        <span class="per50">{{ area.unit }}</span>
325
+                        <div class="mainDiv-head-right">
326
+                            <span class="mainDivLeft-span-1 span-1 pointfont bluefont" ng-click="editArea(area)"
327
+                                ng-show="bianji">
328
+                                <i style="font-size: 14px !important;margin-right: 4px;"
329
+                                    class="icon iconfont icon-xiugai1 bluefont"></i>编辑
330
+                            </span>
331
+                            <span class="mainDivLeft-span-1 span-1 pointfont redfont" ng-click="closearea($index,area)"
332
+                                ng-show="shanchu">
333
+                                <i style="font-size: 14px !important;margin-right: 0px;"
334
+                                    class="icon iconfont icon-shanchu2 redfont"></i> 删除
335
+                            </span>
336
+                        </div>
337
+                    </div>
338
+                    <div class="" ng-show="editShow">
339
+                        <input type="text" class="editable-has-buttons editable-input form-control"
340
+                            ng-model="$parent.$data" placeholder="请输入新增单位">
341
+                        <div class="edit-left">
342
+                            <span class="mainDivLeft-span-edit-1 span-1 pointfont printfont"
343
+                                ng-click="savedatas($parent.$data);editShow=!editShow">
344
+                                <i style="font-size: 12px !important;margin-right: 4px;"
345
+                                    class="icon iconfont icon-xiugai1 printfont"></i>完成
346
+                            </span>
347
+                            <span class="mainDivLeft-span-edit-2 span-1 pointfont redfont"
348
+                                ng-click="editShow=!editShow">
349
+                                <i style="font-size: 12px !important;margin-right: 0px;"
350
+                                    class="icon iconfont icon-shanchu2 redfont"></i> 取消
351
+                            </span>
352
+                        </div>
353
+                    </div>
354
+                </div>
355
+            </div>
356
+        </div>
357
+
358
+    </div>
359
+</div>

+ 47 - 0
assets/views/system/tpl/company.html

@@ -0,0 +1,47 @@
1
+<style>
2
+    .titColor{
3
+        color:black
4
+    }
5
+</style>
6
+<div class="modal-header bg-primary">
7
+    <button type="button" class="close" ng-click="cancel()">×</button>
8
+    <!-- <i class="fa fa-inbox"></i> -->
9
+    <span class="label label-tag titColor">{{title}}</span>
10
+</div>
11
+<div class="modal-body">
12
+    <div class="well-lg"><br/>
13
+        <div class="row form-group">
14
+            <label class="col-md-3 col-md-offset-1 control-label">单位:</label>
15
+            <div class="col-md-7">
16
+                <input class="form-control" ng-model="areaName" placeholder="请输入单位名称" />
17
+            </div>
18
+        </div>
19
+        <!--<div class="row form-group">
20
+            <label class="col-md-3 col-md-offset-1 control-label">角色代码:</label>
21
+            <div class="col-md-7">
22
+                <input class="form-control" ng-model="role.rolecode" placeholder="请输入角色代码..." />
23
+            </div>
24
+        </div>-->
25
+        <div class="panel-footer text-center">
26
+            <a ng-click="ok(areaName)" data-dismiss="modal" class="btn btn-primary">保存</a>
27
+            <button class="btn btn-primary btn-o" ng-click="cancel()" translate="modal.button.CANCEL">取消</button>
28
+        </div>
29
+    </div>
30
+
31
+
32
+    <!--<div class="modal-header bg-primary borderdown">
33
+        <button type="button" class="close" ng-click="cancel()">×</button>
34
+        <i class="fa fa-inbox"></i><span class="label label-tag">工作组设置</span>
35
+    </div>
36
+    <div class="modal-body">
37
+        <div class="row form-group">
38
+            <label class="col-md-3  control-label">工作组:</label>
39
+            <div class="col-md-9">
40
+                <input class="form-control" ng-model="role.role" placeholder="请输入工作组名称..." />
41
+            </div>
42
+        </div>
43
+        <div>
44
+            <button class="btn btn-primary buttonclass" ng-click="ok(key)" translate="modal.button.OK">OK</button>
45
+            <button class="btn btn-primary btn-o buttonclass" ng-click="cancel()" translate="modal.button.CANCEL">Cancel</button>
46
+        </div>
47
+    </div>-->

+ 77 - 0
assets/views/system/tpl/department.html

@@ -0,0 +1,77 @@
1
+<style>
2
+    .titColor {
3
+        color: black
4
+    }
5
+</style>
6
+<div class="modal-header bg-primary">
7
+    <button type="button" class="close" ng-click="cancel()">×</button>
8
+    <!-- <i class="fa fa-inbox"></i> -->
9
+    <span class="label label-tag titColor">{{title}}</span>
10
+</div>
11
+<div class="modal-body">
12
+    <div class="well-lg"><br />
13
+        <div class="row form-group">
14
+            <label class="col-md-3 col-md-offset-1 control-label">单位*:</label>
15
+            <div class="col-md-7" ng-if="title=='新增部门'">
16
+                <ui-select style="width: 100%;" ng-model="check.unit"
17
+                    theme="bootstrap">
18
+                    <ui-select-match placeholder="">
19
+                        {{$select.selected.unit}}
20
+                    </ui-select-match>
21
+                    <ui-select-choices repeat="item in outarea | filter: $select.search">
22
+                        <div ng-bind-html="item.unit | highlight: $select.search"></div>
23
+                    </ui-select-choices>
24
+                </ui-select>
25
+            </div>
26
+            <div class="col-md-7" ng-if="title=='修改部门'">
27
+                <input class="form-control" ng-model="check.unit.unit" ng-disabled="true" />
28
+            </div>
29
+        </div>
30
+        <div class="row form-group">
31
+            <label class="col-md-3 col-md-offset-1 control-label">部门*:</label>
32
+            <div class="col-md-7">
33
+                <input class="form-control" ng-model="check.dept" placeholder="请输入部门名称" />
34
+                
35
+            </div>
36
+        </div>
37
+        <div class="row form-group">
38
+            <label class="col-md-3 col-md-offset-1 control-label">电话*:</label>
39
+            <div class="col-md-7">
40
+                <input class="form-control" ng-model="check.phone" placeholder="请输入电话" />
41
+            </div>
42
+        </div>
43
+        <div class="row form-group">
44
+            <label class="col-md-3 col-md-offset-1 control-label">地址:</label>
45
+            <div class="col-md-7">
46
+                <input class="form-control" ng-model="check.address" placeholder="请输入地址" />
47
+            </div>
48
+        </div>
49
+        <!--<div class="row form-group">
50
+            <label class="col-md-3 col-md-offset-1 control-label">角色代码:</label>
51
+            <div class="col-md-7">
52
+                <input class="form-control" ng-model="role.rolecode" placeholder="请输入角色代码..." />
53
+            </div>
54
+        </div>-->
55
+        <div class="panel-footer text-center">
56
+            <a ng-click="ok(check)" data-dismiss="modal" class="btn btn-primary">保存</a>
57
+            <button class="btn btn-primary btn-o" ng-click="cancel()" translate="modal.button.CANCEL">取消</button>
58
+        </div>
59
+    </div>
60
+
61
+
62
+    <!--<div class="modal-header bg-primary borderdown">
63
+        <button type="button" class="close" ng-click="cancel()">×</button>
64
+        <i class="fa fa-inbox"></i><span class="label label-tag">工作组设置</span>
65
+    </div>
66
+    <div class="modal-body">
67
+        <div class="row form-group">
68
+            <label class="col-md-3  control-label">工作组:</label>
69
+            <div class="col-md-9">
70
+                <input class="form-control" ng-model="role.role" placeholder="请输入工作组名称..." />
71
+            </div>
72
+        </div>
73
+        <div>
74
+            <button class="btn btn-primary buttonclass" ng-click="ok(key)" translate="modal.button.OK">OK</button>
75
+            <button class="btn btn-primary btn-o buttonclass" ng-click="cancel()" translate="modal.button.CANCEL">Cancel</button>
76
+        </div>
77
+    </div>-->