Browse Source

呼叫中心功能开发完成

seimin 3 years ago
parent
commit
1d75b08a9f

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

@@ -2189,7 +2189,8 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
2189 2189
                                 groupdata:{id:groupId},
2190 2190
                                 roledata: { rolecode: "first-line support" },
2191 2191
                                 roledata2: { rolecode: "second-line support" },
2192
-                                selectType: "1"
2192
+                                selectType: "1",
2193
+                                selectDetails:1
2193 2194
                             }
2194 2195
                         }
2195 2196
                     }else{
@@ -2199,7 +2200,8 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
2199 2200
                             user: {
2200 2201
                                 roledata: { rolecode: "first-line support" },
2201 2202
                                 roledata2: { rolecode: "second-line support" },
2202
-                                selectType: "1"
2203
+                                selectType: "1",
2204
+                                selectDetails:1
2203 2205
                             }
2204 2206
                         }
2205 2207
                     }

+ 117 - 345
assets/js/controllers/mainCtrl.js

@@ -4,6 +4,7 @@
4 4
  */
5 5
 app.controller('AppCtrl', ['$rootScope', '$scope', '$state', '$translate', '$localStorage', '$cookieStore', '$window', '$modal', '$document', '$timeout', '$filter', '$auth', 'cfpLoadingBar', 'DDP', 'deskNotification', 'Restangular', 'api_login', 'api_text', 'api_user_data', 'api_wechatfile', 'api_bpm_data', 'api_msg', 'Myservice', '$interval', 'jry_api_bpm',
6 6
   function ($rootScope, $scope, $state, $translate, $localStorage, $cookieStore, $window, $modal, $document, $timeout, $filter, $auth, cfpLoadingBar, DDP, deskNotification, Restangular, api_login, api_text, api_user_data, api_wechatfile, api_bpm_data, api_msg, Myservice, $interval, jry_api_bpm) {
7
+    
7 8
     // 未读消息数量seimin
8 9
     $rootScope.getMsgNum = function (id) {
9 10
       api_msg.msgDataList({ idx: 0, sum: 1, messageStation: { readStatus: 0, userId: id } }).then(function (data) {
@@ -44,6 +45,24 @@ app.controller('AppCtrl', ['$rootScope', '$scope', '$state', '$translate', '$loc
44 45
     // $auth.deleteData('auth_headers')
45 46
     // }
46 47
     $rootScope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams) {
48
+      console.log(event, toState, toParams, fromState, fromParams,'cao')
49
+      if((toState.name == 'app.incident.editor'||toState.name == 'app.incident.editor')&&
50
+      fromState.name){
51
+        $rootScope.phoneNumber = localStorage.getItem('phoneNumber');
52
+        //进入页面强制示忙
53
+        if(tlwsa){
54
+          tlwsa.tlaForceacw($rootScope.phoneNumber);
55
+        }
56
+      }
57
+      if((fromState.name == 'app.incident.editor'||fromState.name == 'app.incident.editor')&&
58
+      toState.name != 'app.incident.editor'&&toState.name != 'app.incident.editor'
59
+      ){
60
+        $rootScope.phoneNumber = localStorage.getItem('phoneNumber');
61
+        //进入页面强制示闲
62
+        if(tlwsa){
63
+          tlwsa.tlaForcewca($rootScope.phoneNumber);
64
+        }
65
+      }
47 66
       if (isEmpty($auth.retrieveData('auth_headers'))) {
48 67
         // if (toState.name != "login.signin" && toState.name != "echart") {
49 68
         //     event.preventDefault();
@@ -1273,330 +1292,17 @@ app.controller('AppCtrl', ['$rootScope', '$scope', '$state', '$translate', '$loc
1273 1292
         $rootScope.jry_extnNumberObj.tel2 = angular.copy(res[0]);//转接坐席对象
1274 1293
         //连接
1275 1294
         tlwsa.tlaOpen(websocket_url);
1276
-        /* callbacks */
1277
-        function onMessage(evt) {
1278
-          var phoneData = JSON.parse(evt.data);
1279
-          if (phoneData.event_type == "agent_state") {
1280
-            console.log(phoneData);
1281
-            if (phoneData.state == "busy") {
1282
-              $('#agent_state').append(" (" + phoneData.private_data + ")");
1283
-              // 来电
1284
-              if (phoneData.private_data == "ring") {
1285
-                console.log(phoneData);
1286
-                $rootScope.jry_state = "laidian";
1287
-                var Notification = window.Notification;
1288
-                Notification.requestPermission();
1289
-                var n = new Notification("你有来电", {
1290
-                  body: "来电号码:" + phoneData.ani,
1291
-                  icon: '../bower_components/HTML5-Desktop-Notifications/alert.ico',
1292
-                });
1293
-                // 摘机
1294
-              } else if (phoneData.private_data == "answered") {
1295
-                $rootScope.jry_state = "tonghuazhong";
1296
-                var jry_findPhone = "";
1297
-                if (phoneData.ani) {
1298
-                  jry_findPhone = phoneData.ani
1299
-                } else if (phoneData.dnis && phoneData.other_answered) {
1300
-                  jry_findPhone = phoneData.dnis
1301
-                }
1302
-                var filterData = {
1303
-                  "idx": 0,
1304
-                  "sum": 100,
1305
-                  "requester": {
1306
-                    "mphone": jry_findPhone,
1307
-                    "telephone": jry_findPhone,
1308
-                    "selectType": 1
1309
-                  }
1310
-                }
1311
-                api_user_data.fetchDataList('requester', filterData).then(function (data) {
1312
-                  var myData = Restangular.stripRestangular(data);
1313
-                  // $rootScope.phone="";
1314
-                  // 新增报修人baba
1315
-                  if (myData.list.length == 0) {
1316
-                    var modalInstance = $modal.open({
1317
-                      templateUrl: 'assets/views/customform/tpl/modal-add-callrequester.html',
1318
-                      controller: function ($scope, $modalInstance, api_user_data, SweetAlert, api_wechatfile) {
1319
-                        $scope.title = "新增报修人";
1320
-                        $scope.requester = {};
1321
-                        $scope.onChangeadd = function (searchData) {
1322
-                          $scope.searchKey = searchData.account;
1323
-                          // $scope.searchDataadd = searchData;
1324
-                          var requesdata = angular.copy(searchData)
1325
-                          // if (requesdata.mphone) {
1326
-                          //     delete requesdata.mphone;
1327
-                          // }
1328
-                          if (requesdata.telephone) {
1329
-                            delete requesdata.telephone;
1330
-                          }
1331
-                          angular.extend($scope.requester, requesdata);
1332
-                        }
1333
-                        $scope.refreshUseradd = function (searchKey) { //请求人搜索
1334
-                          $scope.requester.account = searchKey;
1335
-                          $scope.searchData = searchKey;
1336
-                          serchdataadd(searchKey);
1337
-                        }
1338
-                        $scope.getMydata = function (x) {
1339
-                          var reqestdatap = JSON.parse(x[0])
1340
-                          // if ($scope.requester.mphone) {
1341
-                          //     delete reqestdatap.mphone;
1342
-                          // }
1343
-                          if ($scope.requester.telephone) {
1344
-                            delete reqestdatap.telephone;
1345
-                          }
1346
-                          $scope.searchField = JSON.parse(x[0]).account;
1347
-                          angular.extend($scope.requester, reqestdatap);
1348
-                        }
1349
-                        $scope.getMydataone = function (x) {
1350
-                          $scope.searchField = x;
1351
-                          $scope.requester.account = x;
1352
-                        }
1353
-                        serchdataadd();
1354
-
1355
-                        function serchdataadd(searchKey) {
1356
-                          if (searchKey) {
1357
-                            var filterData = {
1358
-                              'requester': {
1359
-                                'searchKey': searchKey,
1360
-                              },
1361
-                              idx: 0,
1362
-                              sum: 10
1363
-                            };
1364
-                          } else {
1365
-                            var filterData = {
1366
-                              idx: 0,
1367
-                              sum: 10
1368
-                            };
1369
-                          }
1370
-                          api_user_data.fetchDataList('requester', filterData).then(function (response) {
1371
-                            var myData = response;
1372
-                            $scope.myData = myData.list;
1373
-                          });
1374
-                        }
1375
-                        api_user_data.fetchDataList('area', {
1376
-                          idx: 0,
1377
-                          sum: 100
1378
-                        }).then(function (response) {
1379
-                          if (response.status == 200) {
1380
-                            $scope.areas = response.list;
1381
-                          }
1382
-                        })
1383
-                        api_wechatfile.getDictionary({
1384
-                          "key": "requester_type",
1385
-                          "type": "list"
1386
-                        }).then(function (response) {
1387
-                          // if (response.status == 200) {
1388
-                          $scope.networktypes = response;
1389
-                          // }
1390
-                        })
1391
-                        $scope.requesterAreaid = "";
1392
-                        $scope.onChange = function (item) {
1393
-                          $scope.requesterAreaid = item.id;
1394
-                          $scope.requester.placeDTO = {};
1395
-                          api_user_data.fetchDataList('place', {
1396
-                            place: {
1397
-                              areaId: item.id
1398
-                            },
1399
-                            idx: 0,
1400
-                            sum: 1000
1401
-                          }).then(function (response) {
1402
-                            if (response.status == 200) {
1403
-                              $scope.places = response.list;
1404
-                            }
1405
-                          })
1406
-                        }
1407
-                        //地点搜索
1408
-                        $scope.refresh = function (searchVal) {
1409
-                          var faildata = {};
1410
-                          if ($scope.requesterAreaid) {
1411
-                            faildata = {
1412
-                              'idx': 0,
1413
-                              'sum': 1000,
1414
-                              'place': {
1415
-                                'areaId': $scope.requesterAreaid,
1416
-                                'place': searchVal,
1417
-                                'selectType': 'pinyin_qs'
1418
-                              }
1419
-                            }
1420
-                          } else {
1421
-                            faildata = {
1422
-                              'idx': 0,
1423
-                              'sum': 1000,
1424
-                              'place': {
1425
-                                'place': searchVal,
1426
-                                'selectType': 'pinyin_qs'
1427
-                              }
1428
-                            }
1429
-                          }
1430
-                          api_user_data.fetchDataList('place', faildata).then(function (response) {
1431
-                            $scope.places = response.list;
1432
-                            delete $scope.requester.placeDTO;
1433
-                          })
1434
-                        }
1435
-
1436
-
1437
-                        $scope.requester = {
1438
-                          'telephone': jry_findPhone
1439
-                        };
1440
-                        $scope.ok = function () {
1441
-                          var reg1 = /^1[3456789][0-9]{9}$/; //手机号
1442
-                          var reg2 = /^((0\d{2,3})-)*(\d{7,8})(-(\d{3,}))?$/; //座机号
1443
-                          var flag1 = reg1.test($scope.requester.mphone);
1444
-                          var flag2 = reg2.test($scope.requester.mphone);
1445
-                          console.log($scope.requester)
1446
-                          if (angular.isUndefined($scope.requester.name) || $scope.requester.name == null || $scope.requester.name == "") {
1447
-                            SweetAlert.swal("报修人姓名未填!", "请填写报修人姓名", "error");
1448
-                          } else if (angular.isUndefined($scope.requester.requesterType)) {
1449
-                            SweetAlert.swal("人员类型未填!", "请填写人员类型", "error");
1450
-                          } else if (angular.isUndefined($scope.requester.mphone) || $scope.requester.mphone == null || $scope.requester.mphone == "") {
1451
-                            SweetAlert.swal("报修人电话未填!", "请填写报修人电话", "error");
1452
-                          }
1453
-                          else {
1454
-                            $modalInstance.close($scope.requester);
1455
-                          }
1456
-                        };
1457
-
1458
-                        $scope.cancel = function () {
1459
-                          $modalInstance.dismiss('cancel');
1460
-                        };
1461
-                      },
1462
-                    });
1463
-                    modalInstance.result.then(function (selectedItem) {
1464
-                      if (selectedItem) {
1465
-                        if (selectedItem.telephone && !selectedItem.mphone) {
1466
-                          selectedItem.telephone = angular.copy(selectedItem.mphone);
1467
-                          delete selectedItem.mphone;
1468
-                        }
1469
-                        var data = {
1470
-                          'requester': selectedItem
1471
-                        };
1472
-                        api_user_data.addData('requester', data).then(function (response) {
1473
-                          if (response.status == 200) {
1474
-                            var data = {
1475
-                              'model': {
1476
-                                'requestershow': response.data,
1477
-                                'incident': {
1478
-                                  'requester': response.data,
1479
-                                  'area': response.data.areaDTO,
1480
-                                  'place': response.data.placeDTO,
1481
-                                  'houseNumber': response.data.houseNumber,
1482
-                                  // 'callID': cdrid,
1483
-                                  'source': {
1484
-                                    'id': 1547
1485
-                                  }
1486
-                                }
1487
-                              }
1488
-                            }
1489
-                            $state.go('app.incident.title', {
1490
-                              'model': JSON.stringify(data)
1491
-                            });
1492
-                          }
1493
-                        })
1494
-                      }
1495
-                    });
1496
-                  } else if (myData.list.length == 1) {
1497
-                    var data = {
1498
-                      'model': {
1499
-                        'requestershow': myData.list[0],
1500
-                        'incident': {
1501
-                          'requester': myData.list[0],
1502
-                          'area': myData.list[0].areaDTO,
1503
-                          'place': myData.list[0].placeDTO,
1504
-                          'houseNumber': myData.list[0].houseNumber,
1505
-                          // 'callID': cdrid,
1506
-                          'source': {
1507
-                            'id': 1547
1508
-                          }
1509
-                        }
1510
-                      }
1511
-                    }
1512
-                    $state.go('app.incident.title', {
1513
-                      'model': JSON.stringify(data)
1514
-                    });
1515
-                  } else {
1516
-                    var modalInstance = $modal.open({
1517
-                      templateUrl: 'assets/views/createincident.html',
1518
-                      controller: function ($scope, $modalInstance, api_user_data) {
1519
-                        $scope.title = "请确定报修人";
1520
-                        $scope.requester = myData.list;
1521
-                        $scope.choice = function (requester) {
1522
-                          $modalInstance.dismiss('cancel');
1523
-                          var data = {
1524
-                            'model': {
1525
-                              'requestershow': requester,
1526
-                              'incident': {
1527
-                                'requester': requester,
1528
-                                'area': requester.areaDTO,
1529
-                                'place': requester.placeDTO,
1530
-                                'houseNumber': requester.houseNumber,
1531
-                                // 'callID': cdrid,
1532
-                                'source': {
1533
-                                  'id': 1547
1534
-                                }
1535
-                              }
1536
-                            }
1537
-                          }
1538
-                          $state.go('app.incident.title', {
1539
-                            'model': JSON.stringify(data)
1540
-                          });
1541
-                        };
1542
-
1543
-                        $scope.cancel = function () {
1544
-                          $modalInstance.dismiss('cancel');
1545
-                        };
1546
-                      },
1547
-                      size: "lg"
1548
-                    });
1549
-                  }
1550
-
1551
-                });
1552
-              }
1553
-              // 挂机
1554
-            } else if (phoneData.state == "login") {
1555
-              go_ready()
1556
-            } else if (phoneData.state == "logout") {
1557
-              $rootScope.jry_state = "weiqianru";
1558
-            } else if (phoneData.state == "ready") {
1559
-              // 来电挂机
1560
-              if (phoneData.old_state == "busy" && phoneData.private_data == "answered") {
1561
-                go_break()
1562
-              } else {
1563
-                $rootScope.jry_state = "shixian";
1564
-              }
1565
-            }
1566
-            // else if (data.old_state == "busy") {
1567
-
1568
-            // }
1569
-          } else if (phoneData.event_type == "agent_caller_state") {
1570
-            // special feature, never mind
1571
-            if (phoneData.action == "in") {
1572
-
1573
-            } else {
1574
-
1575
-            }
1576
-          } else if (phoneData.event_type == "command/reply") {
1577
-            if (phoneData.phoneData && phoneData.phoneData.state) {
1578
-
1579
-            }
1580
-          }
1581
-        }
1582
-        // $modal.open({
1583
-        //     template:' ',
1584
-        //     controller: function ($scope,$modalInstance,SweetAlert){
1585
-        //         SweetAlert.swal({
1586
-        //             title: "呼叫失败",
1587
-        //             text: "呼叫失败!",
1588
-        //             type: "error"
1589
-        //         },function(){
1590
-        //             $modalInstance.close('cancel')
1591
-        //         })
1592
-        //     }
1593
-        // })
1594 1295
         //连接呼叫中心回调函数
1595 1296
         TLWSA.onOpenreturn = onopenreturn;
1596 1297
         function onopenreturn(err) {
1597 1298
           err = Number(err);
1598 1299
           if (!err) {
1599 1300
             console.log('呼叫中心连接成功-----seimin');
1301
+            $.toaster({
1302
+              priority: 'info',
1303
+              title: '操作',
1304
+              message: '呼叫中心连接成功'
1305
+            });
1600 1306
             //如果设置过话机
1601 1307
             if (localStorage.getItem('phoneNumber')) {
1602 1308
               // 签入并绑定分机
@@ -1615,13 +1321,57 @@ app.controller('AppCtrl', ['$rootScope', '$scope', '$state', '$translate', '$loc
1615 1321
             console.log('绑定分机成功-----seimin');
1616 1322
             $rootScope.jry_state = 'shixian';
1617 1323
             localStorage.setItem('phoneNumber', $rootScope.phoneNumber);
1324
+            if(location.href.includes('app/incident/editor')||location.href.includes('app/incident/chart')){
1325
+              //进入页面,强制示忙
1326
+              tlwsa.tlaForceacw($rootScope.phoneNumber);
1327
+            }
1618 1328
           } else {
1619 1329
             console.log('绑定分机失败-----seimin');
1620 1330
           }
1621 1331
         }
1332
+        //强制示忙回调函数
1333
+        TLWSA.onAcw=onacw;
1334
+        function onacw(err) {
1335
+          err = Number(err);
1336
+          if (!err) {
1337
+            $rootScope.jry_state = 'shimang';
1338
+            console.log('强制示忙成功-----seimin');
1339
+          }else{
1340
+            console.log('强制示忙失败-----seimin');
1341
+          }
1342
+        }
1343
+        //强制示闲回调函数
1344
+        TLWSA.onWca = onwca;
1345
+        function onwca(err) {
1346
+          console.log(err)
1347
+          err = Number(err);
1348
+          if (!err) {
1349
+            $rootScope.jry_state = 'shixian';
1350
+            console.log('强制示闲成功-----seimin');
1351
+          }else{
1352
+            console.log('强制示闲失败-----seimin');
1353
+          }
1354
+        }
1355
+        //与服务器网络连接中断回调函数
1356
+        TLWSA.onClosed=onclosed;
1357
+        function onclosed() {
1358
+          $rootScope.jry_state = 'weiqianru';
1359
+          console.log('与服务器网络连接中断-----seimin');
1360
+          $.toaster({
1361
+            priority: 'info',
1362
+            title: '操作',
1363
+            message: '与服务器网络连接中断,2分钟后重连'
1364
+          });
1365
+          console.log('2分钟后自动重连-----seimin')
1366
+          $timeout(function(){
1367
+            //连接
1368
+            tlwsa.tlaOpen(websocket_url);
1369
+          },120000)
1370
+        }
1622 1371
         //签入回调函数
1623 1372
         TLWSA.onLoginreturn = onloginreturn;
1624 1373
         function onloginreturn(err) {
1374
+          console.log(err)
1625 1375
           err = Number(err);
1626 1376
           if (!err) {
1627 1377
             console.log('签入成功-----seimin');
@@ -1728,36 +1478,35 @@ app.controller('AppCtrl', ['$rootScope', '$scope', '$state', '$translate', '$loc
1728 1478
           if (!err) {
1729 1479
             console.log('呼入摘机应答成功-----seimin');
1730 1480
             $rootScope.jry_state = 'tonghuazhong';
1731
-            //根据电话号码反查报修人
1732
-            var postData = { "idx": 0, "sum": 10, "requester": { hjzxPhone: $rootScope.callInPhoneNumber } };
1481
+            //根据电话号码反查报修人hjzxPhone
1482
+            var postData = { "idx": 0, "sum": 10, "requester": { mphone: $rootScope.callInPhoneNumber } };
1733 1483
             api_user_data.fetchDataList('requester', postData).then(function (result) {
1734 1484
               if (result.status == 200) {
1735 1485
                 console.log(result.list);
1736 1486
                 var requesters = result.list;
1487
+
1737 1488
                 
1738
-                $state.go('app.incident.chart',{
1739
-                  model: JSON.stringify({
1740
-                    model:{
1741
-                      incident:{
1742
-                        requester:{
1743
-                          hjzxPhone:$rootScope.callInPhoneNumber
1744
-                        }
1745
-                      }
1746
-                    }
1747
-                  })
1748
-                });
1749
-                return;
1750 1489
                 if (requesters.length === 0) {
1751 1490
                   //未匹配到报修人,则弹窗添加报修人yeye
1752
-                  
1491
+                  $state.go('app.incident.chart', {
1492
+                    model: JSON.stringify({
1493
+                      model: {
1494
+                        incident: {
1495
+                          requester: {
1496
+                            hjzxPhone: $rootScope.callInPhoneNumber
1497
+                          }
1498
+                        }
1499
+                      }
1500
+                    })
1501
+                  });
1753 1502
                 } else if (requesters.length === 1) {
1754 1503
                   //匹配到一个报修人
1755
-                  $state.go('app.incident.chart',{
1504
+                  $state.go('app.incident.chart', {
1756 1505
                     model: JSON.stringify({
1757
-                      model:{
1506
+                      model: {
1758 1507
                         incident: {
1759 1508
                           requester: requesters[0],
1760
-                          contactsInformation:requesters[0].mphone
1509
+                          contactsInformation: requesters[0].mphone
1761 1510
                         },
1762 1511
                       }
1763 1512
                     })
@@ -1765,17 +1514,39 @@ app.controller('AppCtrl', ['$rootScope', '$scope', '$state', '$translate', '$loc
1765 1514
                 } else {
1766 1515
                   //匹配到多个报修人
1767 1516
                   $modal.open({
1768
-                    template:' ',
1769
-                    controller: function ($scope,$modalInstance,SweetAlert){
1770
-                        SweetAlert.swal({
1771
-                            title: "呼叫失败",
1772
-                            text: "呼叫失败!",
1517
+                    templateUrl: 'assets/views/incident/tpl/tel.html',
1518
+                    controller: function ($scope, $modalInstance,$timeout,SweetAlert) {
1519
+                      $scope.list = requesters;
1520
+                      $scope.selectedItem = 0;
1521
+                      $scope.cancel = function () {
1522
+                        $modalInstance.dismiss('cancel');
1523
+                      };
1524
+                      $scope.changeBxr = function(id){
1525
+                        $scope.selectedItem = id;
1526
+                      }
1527
+                      $scope.save = function () {
1528
+                        var item = $scope.list.find(v => v.id == $scope.selectedItem);
1529
+                        if (item) {
1530
+                          $scope.cancel();
1531
+                          $state.go('app.incident.chart', {
1532
+                            model: JSON.stringify({
1533
+                              model: {
1534
+                                incident: {
1535
+                                  requester: item,
1536
+                                  contactsInformation: item.mphone
1537
+                                },
1538
+                              }
1539
+                            })
1540
+                          });
1541
+                        }else{
1542
+                          SweetAlert.swal({
1543
+                            title: "请选择报修人!",
1773 1544
                             type: "error"
1774
-                        },function(){
1775
-                            $modalInstance.close('cancel')
1776
-                        })
1545
+                          })
1546
+                        }
1547
+                      }
1777 1548
                     }
1778
-                })
1549
+                  });
1779 1550
                 }
1780 1551
               }
1781 1552
             })
@@ -1826,6 +1597,7 @@ app.controller('AppCtrl', ['$rootScope', '$scope', '$state', '$translate', '$loc
1826 1597
             });
1827 1598
           }
1828 1599
         }
1600
+        
1829 1601
         // 签入
1830 1602
         $rootScope.jry_qianru = function () {
1831 1603
           // 签入并绑定分机

+ 21 - 21
assets/js/directives/ola_api2.js

@@ -73,15 +73,15 @@ TLWSA.onConferencechangememberstatereturn=onconferencechangememberstatereturn;
73 73
 //主动事件
74 74
 // TLWSA.onCallin=oncallin;
75 75
 // TLWSA.onCallend=oncallend;
76
-TLWSA.onAcw=onacw;
77
-TLWSA.onWca = onwca;
76
+// TLWSA.onAcw=onacw;
77
+// TLWSA.onWca = onwca;
78 78
 TLWSA.onLogoff = onlogoff; //被强制注销事件
79 79
 // TLWSA.onCallresult=oncallresult;
80 80
 // TLWSA.onTransferresult=ontransferresult;
81 81
 TLWSA.onConsulttransfercalleeanswer=onconsulttransfercalleeanswer;
82 82
 TLWSA.onBlindtransferresult=onblindtransferresult;
83 83
 // TLWSA.onAnswer=onanswer;
84
-TLWSA.onClosed=onclosed;
84
+// TLWSA.onClosed=onclosed;
85 85
 TLWSA.onSlaveserverclosed=onslaveserverclosed; //备用服务器网络中断
86 86
 TLWSA.onHoldcallreleased=onholdcallreleased;
87 87
 TLWSA.onKeepcallreleased=onkeepcallreleased;
@@ -284,14 +284,14 @@ function onconferencechangememberstatereturn(jso)
284 284
 // {
285 285
 // 	console.log('事件:通话结束' + JSON.stringify(jso));
286 286
 // }
287
-function onacw()
288
-{
289
-	console.log('事件:你已经进入离席状态');
290
-}
291
-function onwca()
292
-{
293
-	console.log('事件:你已经进入就绪状态');
294
-}
287
+// function onacw()
288
+// {
289
+// 	console.log('事件:你已经进入离席状态');
290
+// }
291
+// function onwca()
292
+// {
293
+// 	console.log('事件:你已经进入就绪状态');
294
+// }
295 295
 function onlogoff() //被动注销事件(网络中断 / 被踢)
296 296
 {
297 297
     console.log('事件:您已经被注销');
@@ -312,21 +312,21 @@ function onblindtransferresult(err) {
312 312
 // function onanswer(err) {
313 313
 //     console.log('事件:应答'+err);
314 314
 // }
315
-function onclosed(err) {
316
-    log('事件:与服务器的网络连接中断');
317
-}
315
+// function onclosed(err) {
316
+//     console.log('事件:与服务器的网络连接中断');
317
+// }
318 318
 function onslaveserverclosed(err)
319 319
 {
320
-	log('事件:与备用服务器的网络连接中断');
320
+	console.log('事件:与备用服务器的网络连接中断');
321 321
 }
322 322
 function onholdcallreleased(err) {
323
-    log('事件:被保持的对方已挂机');
323
+    console.log('事件:被保持的对方已挂机');
324 324
 }
325 325
 function onkeepcallreleased(err) {
326
-    log('事件:转回ivr并等待的外线已挂机');
326
+    console.log('事件:转回ivr并等待的外线已挂机');
327 327
 }
328 328
 function oncalleealerting(err) {
329
-    log('事件:呼叫的外线已经开始振铃');
329
+    console.log('事件:呼叫的外线已经开始振铃');
330 330
 }
331 331
 function onqueue(crs,caller,callee,data)
332 332
 {
@@ -334,13 +334,13 @@ function onqueue(crs,caller,callee,data)
334 334
 }
335 335
 function onstatechange()
336 336
 {
337
-	log('事件:状态变化----------------------------------------------------');
337
+	console.log('事件:状态变化----------------------------------------------------');
338 338
 	queryAgentState();
339 339
 }
340 340
 function onmystatechange(jso)
341 341
 {
342
-	log('事件:状态变化----------------------------------------------------');
343
-	log(JSON.stringify(jso));
342
+	console.log('事件:状态变化----------------------------------------------------');
343
+	console.log(JSON.stringify(jso));
344 344
 }
345 345
 function onquitqueue(crs)
346 346
 {

+ 1 - 1
assets/views/dashboard/newdash.html

@@ -275,7 +275,7 @@
275 275
                     </div> -->
276 276
                 <!-- </div> -->
277 277
                 <div class="know-text-group clearfix">
278
-                    <div class="know-text-group_block fr">
278
+                    <div class="know-text-group_block fr" style="font-size: 16px;">
279 279
                         <div class="know-text-group_item fl">实时工单情况<strong></strong></div>
280 280
                         <div class="know-text-group_item fl">今日建单数:<strong class="know-text-group_strong" ng-click="goTo('app.incident.list',{tab:'all',date:'today'})">{{managerIndexInfo.createOrders}}</strong></div>
281 281
                         <div class="know-text-group_item fl">所有待接单数:<strong class="know-text-group_strong" ng-click="goTo('app.incident.list',{tab:'all',state:'1543'})">{{managerIndexInfo.waitOrders}}</strong></div>

+ 35 - 0
assets/views/incident/tpl/tel.html

@@ -0,0 +1,35 @@
1
+<style>
2
+    .modal-dialog {
3
+        height: 100vh;
4
+    }
5
+
6
+    .modal-dialog .new_after {
7
+        position: fixed;
8
+    }
9
+    .hj .body .rigt .div{
10
+        height: 100px!important;
11
+    }
12
+</style>
13
+<div class="new new_after hj">
14
+    <div class="head">
15
+        <span>选择报修人</span>
16
+        <span class="jiaocha" ng-click="close()">×</span>
17
+    </div>
18
+    <div class="body">
19
+        <div class="xing">
20
+            <div>*</div>
21
+        </div>
22
+        <form class="rigt">
23
+            <div class="div">
24
+                <div class="tab_bdItem_tab" ng-repeat="item in list">
25
+                    <input type="radio" ng-model="selectedItem" ng-change="changeBxr(item.id)" name="selectedItem" ng-value="item.id" id="{{item.id}}">
26
+                    <label for="{{item.id}}">{{item.name}}</label>
27
+                </div>
28
+            </div>
29
+        </form>
30
+    </div>
31
+    <div class="submi ">
32
+        <input type="button" value="保存" class="preservation btn" ng-click="save()">
33
+        <input type="button" value="取消" class="cancel btn" ng-click="cancel()">
34
+    </div>
35
+</div>

+ 12 - 7
assets/views/incident/tpl/toAssign.tpl.html

@@ -5,12 +5,12 @@
5 5
     </div>
6 6
 </div>
7 7
 <div class="modal-body center">
8
-    <div class="form-group incidentsearch" style="margin:0 auto;">
8
+    <div class="form-group incidentsearch" style="margin:0 auto;width: 380px;">
9 9
         <div class=" input-group" style="margin:8px 0 0;">
10 10
             <div class="control-label pull-left margin-top-5 margin-right-5">
11 11
                 <label class="demoincident">工作组</label>:</div>
12 12
             <div class="pull-right">
13
-                <ui-select class="pull-left" style="width:130px" ng-model="assignGroup" theme="bootstrap" ng-change="onChangeRotateGroup($select.selected)">
13
+                <ui-select class="pull-left" style="width:310px" ng-model="assignGroup" theme="bootstrap" ng-change="onChangeRotateGroup($select.selected)">
14 14
                     <ui-select-match placeholder="">
15 15
                         {{$select.selected.groupName}}
16 16
                     </ui-select-match>
@@ -21,17 +21,17 @@
21 21
             </div>
22 22
         </div>
23 23
     </div>
24
-    <div class="form-group incidentsearch" style="margin:0 auto;">
24
+    <div class="form-group incidentsearch" style="margin:0 auto;width: 380px;">
25 25
         <div class=" input-group" style="margin:8px 0 0;">
26 26
             <div class="control-label pull-left margin-top-5 margin-right-5">
27 27
                 <label class="demoincident">指派对象</label>:</div>
28 28
             <div class="pull-right">
29
-                <ui-select class="pull-left" style="width:130px" ng-model="assignUser" theme="bootstrap" ng-change="onChangeRotateUser($select.selected)">
29
+                <ui-select class="pull-left" style="width:310px" ng-model="assignUser" theme="bootstrap" ng-change="onChangeRotateUser($select.selected)">
30 30
                     <ui-select-match placeholder="">
31
-                        {{$select.selected.name}}
31
+                        {{$select.selected.userTaskCount}}
32 32
                     </ui-select-match>
33 33
                     <ui-select-choices repeat="item in user | filter:{$:$select.search}">
34
-                        <div ng-bind-html="item.name | highlight: $select.search"></div>
34
+                        <div ng-bind-html="item.userTaskCount | highlight: $select.search"></div>
35 35
                     </ui-select-choices>
36 36
                 </ui-select>
37 37
             </div>
@@ -41,4 +41,9 @@
41 41
 <div class="modal-footer modelfooter-hint pointfont">
42 42
     <div class="hintfooterleft pull-left" ng-click="ok()" translate="modal.button.OK ">OK</div>
43 43
     <div class="hintfooterright pull-right" ng-click="cancel() " translate="modal.button.CANCEL ">Cancel</div>
44
-</div>
44
+</div>
45
+<style>
46
+    .modal-dialog{
47
+        width: 450px!important;
48
+    }
49
+</style>