浏览代码

修改与调整

seimin 2 年之前
父节点
当前提交
34b31c4d11

文件差异内容过多而无法显示
+ 25 - 0
README.md


+ 63 - 2
assets/js/controllers/customform/customformCtrl.js

@@ -11071,6 +11071,18 @@ appFormly.config(function config(formlyConfigProvider) {
11071 11071
                   selectedItem.place ? selectedItem.place.area.id : null;
11072 11072
                 scope.$parent.$parent.$parent.model.incident.place.id =
11073 11073
                   selectedItem.place ? selectedItem.place.id : null;
11074
+                if(scope.$parent.$parent.$parent.model.incident.area.id){
11075
+                  options.templateOptions.APIService.fetchDataList(
11076
+                    'place',
11077
+                    {"place":{"areaId":scope.$parent.$parent.$parent.model.incident.area.id},"idx":0,"sum":1000}
11078
+                  ).then(function (response1) {
11079
+                      for (var i = 0; i < scope.fields.length; i++) {
11080
+                        if(scope.fields[i].templateOptions.onlyKey == 'place_start'){
11081
+                          scope.fields[i].templateOptions.options = response1.status == 200?response1.list:[];
11082
+                        }
11083
+                      }
11084
+                  })
11085
+                }
11074 11086
                 console.log(scope, 89898998);
11075 11087
                 // console.log(scope.formData,'接单页面');
11076 11088
                 //1,选择报修人后带入区域地点2020年4月23日19:34:17
@@ -14501,8 +14513,56 @@ appFormly.config(function config(formlyConfigProvider) {
14501 14513
       "api_user_data",
14502 14514
       "api_statistic",
14503 14515
       "$stateParams",
14504
-      function ($scope, api_user_data, api_statistic, $stateParams) {
14516
+      "api_bpm_data",
14517
+      function ($scope, api_user_data, api_statistic, $stateParams,api_bpm_data) {
14505 14518
         console.log($stateParams)
14519
+        // 一键复制
14520
+        $scope.quickCopy = function(model){
14521
+          // 姓名,工号,来电电话,地点,详细地址,事件描述 liaomingming
14522
+          console.log(model);
14523
+          var text = '';
14524
+          if(model.place.id){
14525
+            api_bpm_data.fetchData("place", model.place.id)
14526
+                  .then(function (response) {
14527
+                    if (response.status == 200) {
14528
+                      text = `姓名:${model.requester?model.requester.name:''}\r\n工号:${model.requester?model.requester.account:''}\r\n来电电话:${model.contactsInformation||''}\r\n地点:${response.data.place||''}\r\n详细地址:${model.houseNumber||''}\r\n事件描述:${model.description||''}`;
14529
+                      var textarea = document.createElement('textarea');
14530
+                      document.body.appendChild(textarea);
14531
+                      // 隐藏此输入框
14532
+                      textarea.style.position = 'fixed';
14533
+                      textarea.style.clip = 'rect(0 0 0 0)';
14534
+                      textarea.style.top = '10px';
14535
+                      // 赋值
14536
+                      textarea.value = text;
14537
+                      // 选中
14538
+                      textarea.select();
14539
+                      // 复制
14540
+                      document.execCommand('copy', true);
14541
+                      // 移除输入框
14542
+                      document.body.removeChild(textarea);
14543
+                    }
14544
+                  });
14545
+          }else{
14546
+            text = `姓名:${model.contacts||''}\r\n工号:${model.account||''}\r\n来电电话:${model.contactsInformation||''}\r\n地点:${''}\r\n详细地址:${model.houseNumber||''}\r\n事件描述:${model.description||''}`;
14547
+            var textarea = document.createElement('textarea');
14548
+            document.body.appendChild(textarea);
14549
+            // 隐藏此输入框
14550
+            textarea.style.position = 'fixed';
14551
+            textarea.style.clip = 'rect(0 0 0 0)';
14552
+            textarea.style.top = '10px';
14553
+            // 赋值
14554
+            textarea.value = text;
14555
+            // 选中
14556
+            textarea.select();
14557
+            // 复制
14558
+            document.execCommand('copy', true);
14559
+            // 移除输入框
14560
+            document.body.removeChild(textarea);
14561
+          }
14562
+          event.preventDefault();
14563
+          //提示
14564
+          alert('复制成功');
14565
+        }
14506 14566
         if (angular.isDefined($stateParams.model) && $stateParams.model != "") {
14507 14567
           var paramsModel = JSON.parse($stateParams.model)
14508 14568
           //来电-添加报修人
@@ -21995,7 +22055,8 @@ appFormly.controller("CustomformCtrl", [
21995 22055
                                     return;
21996 22056
                                 }
21997 22057
                                 api_wechatfile.getDictionary({"key":"incident_integral_state","type":"list"}).then(function(res){
21998
-                                  var auditState = $scope.complexityConfirm.complexity.value == $scope.complexity?res.find(v=>v.value == 1):res.find(v=>v.value == 0);
22058
+                                  // var auditState = $scope.complexityConfirm.complexity.value == $scope.complexity?res.find(v=>v.value == 1):res.find(v=>v.value == 0);
22059
+                                  var auditState = res.find(v=>v.value == 0);
21999 22060
                                   var postData = { 
22000 22061
                                     incidentIntegral: {
22001 22062
                                       incidentId:incidentData.id,

+ 390 - 10
assets/js/controllers/mainCtrl.js

@@ -4,7 +4,9 @@
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
+    if(localStorage.getItem('version_qd')){
8
+      $rootScope[localStorage.getItem('version_qd')] = true;
9
+    }
8 10
     // 未读消息数量seimin
9 11
     $rootScope.getMsgNum = function (id) {
10 12
       api_msg.msgDataList({ idx: 0, sum: 1, messageStation: { readStatus: 0, userId: id } }).then(function (data) {
@@ -322,7 +324,9 @@ app.controller('AppCtrl', ['$rootScope', '$scope', '$state', '$translate', '$loc
322 324
           if (message == 'changed') {
323 325
             if (changedDoc.eventName) {
324 326
               if (changedDoc.eventName.indexOf('/') > -1) {
325
-                var [mineId, action] = changedDoc.eventName.split('/');
327
+                // var [mineId, action] = changedDoc.eventName.split('/');
328
+                var mineId = changedDoc.eventName.split('/');
329
+                var action = mineId;
326 330
                 if (action == 'notification') {
327 331
                   angular.forEach(changedDoc.args, function (item) {
328 332
                     if ($rootScope.filternotifyuser.indexOf(item.payload.sender._id) > -1) {
@@ -847,10 +851,368 @@ app.controller('AppCtrl', ['$rootScope', '$scope', '$state', '$translate', '$loc
847 851
     // }
848 852
     // // 东经呼叫中心结束
849 853
 
854
+    // 华科呼叫中心 start
855
+    /* status[已签入:1/通话中:3/来电:2],state[示闲:1,示忙:2] */
856
+    $rootScope.statuscall = 0; //话机状态
857
+    $rootScope.statecall = 1; //示忙示闲
858
+    $scope.login = false; //签入签出
859
+    $rootScope.callout = 0; //呼入:1,呼出:2
860
+    $scope.group = 2000;
861
+    $scope.phone = 1500;
862
+    $rootScope.phoneChange = function(phone) {
863
+        if (phone == 1500||phone == 1501||phone == 1502) {
864
+            $scope.group = 2000;
865
+        } else if(phone == 1511) {
866
+            $scope.group = 2001;
867
+        }else if(phone == 1507) {
868
+            $scope.group = 2002;
869
+        }
870
+    }
871
+    $rootScope.start = function(phone) {
872
+        if (phone == 1500||phone == 1501||phone == 1502) {
873
+            $scope.group = 2000;
874
+        } else if(phone == 1511) {
875
+            $scope.group = 2001;
876
+        }else if(phone == 1507) {
877
+            $scope.group = 2002;
878
+        }
879
+        api_text.start(phone, $rootScope.user.id).then(function(data) {
880
+            var token = data.token;
881
+            $rootScope.takes = token;
882
+            api_text.logout($rootScope.takes, $rootScope.user.id).then(function(data) { if (data.errno == 0) {} });
883
+            api_text.login($scope.group, token, $rootScope.user.id).then(function(data) {
884
+                if (data.errno == 0) {
885
+                    $rootScope.setidle();
886
+                    $scope.login = true;
887
+                    $rootScope.statuscall = 1;
888
+                    $rootScope.callout = 0;
889
+
890
+                    // function hello() {
891
+                    //     var ws = new WebSocket('ws://192.168.3.49:28088/events');
892
+                    //     ws.onopen = function() { ws.send(JSON.stringify(register)); };
893
+                    // };
894
+                    // window.setTimeout("hello()", 1000);
895
+                    // var ws = new WebSocket('ws://192.168.77.57:28088/events');
896
+                    function reconnect() {
897
+                        // var ws = new WebSocket('ws://192.168.3.49:28088/events');
898
+                      var ws = new WebSocket('ws://192.168.77.57:8088/IXServer/messagestation/hjzx');
899
+                        var register = { "msgtype": "login", "adn": phone };
900
+                        ws.onopen = function() {
901
+                            heartCheck.start();
902
+                            ws.send(JSON.stringify(register));
903
+                        };
904
+                        ws.onmessage = function(evt) {
905
+                            heartCheck.reset();
906
+                            if (evt.data == "HeartBeat") {
907
+
908
+                            } else {
909
+                                var mydata = JSON.parse(evt.data);
910
+                                $scope.filterData = [];
911
+                                if (mydata.evttype == "callincome" && mydata.uud != "misc:callback") {
912
+                                    $rootScope.$apply(function() {
913
+                                        $rootScope.statuscall = 2;
914
+                                        $rootScope.callout = 1;
915
+                                    });
916
+                                    $rootScope.phone = mydata.ano;
917
+                                    var Notification = window.Notification;
918
+                                    Notification.requestPermission();
919
+                                    var n = new Notification("你有来电", {
920
+                                        body: "来电号码:" + mydata.ano,
921
+                                        icon: '../bower_components/HTML5-Desktop-Notifications/alert.ico',
922
+                                        // onclick: function onNotificationClicked() {
923
+                                        //     console.log('Notification clicked.');
924
+                                        // }
925
+                                    });
926
+                                } else if (mydata.evttype == "callincome" && mydata.uud == "misc:callback") {
927
+                                    $rootScope.callout = 2;
928
+                                } else if (mydata.evttype == "ringstop") {
929
+                                    // $rootScope.status=7;
930
+                                    // $rootScope.$apply(function() {
931
+                                    $rootScope.statuscall = 1;
932
+                                    // });
933
+                                    $rootScope.phone = ""
934
+                                } else if (mydata.evttype == 'hookchanged' && $rootScope.callout == 2) {
935
+                                    if (mydata.status && mydata.status == '1') {
936
+                                        $rootScope.$apply(function() {
937
+                                            $rootScope.statuscall = 1;
938
+                                        });
939
+                                        $rootScope.phone = "";
940
+                                    } else if (mydata.status && mydata.status != '1') {
941
+                                        $rootScope.$apply(function() {
942
+                                            $rootScope.statuscall = 3;
943
+                                        });
944
+                                    }
945
+                                } else if (mydata.evttype == 'hookchanged' && $rootScope.callout == 1) {
946
+                                    if ($rootScope.phone != "") {
947
+                                        if (mydata.status && mydata.status == '1') { //挂机
948
+                                            $rootScope.$apply(function() {
949
+                                                $rootScope.statuscall = 1;
950
+                                                $rootScope.callout = 0;
951
+                                            });
952
+                                            // console.log("挂机");
953
+                                            if ($rootScope.statecall == 1 && !$rootScope.isSetidle) {
954
+                                                $rootScope.setbusy();
955
+                                            }
956
+                                        } else if (mydata.status && mydata.status != '1' && $rootScope.statecall != 2 && $rootScope.callout == 1) { //摘机
957
+                                            $rootScope.status = 6
958
+                                            $rootScope.statuscall = 3;
959
+                                            $rootScope.isSetidle = false;
960
+                                            $rootScope.app.layout.isSidebarClosed = true;
961
+                                            // console.log("摘机");
962
+                                            // console.log(mydata);
963
+                                            api_text.getcdrid($rootScope.takes).then(function(response) {
964
+                                                if (response.cdrid) {
965
+                                                    var cdrid = response.cdrid;
966
+                                                    // var response={cdrid:'219023836'}
967
+                                                    var filterData = { "idx": 0, "sum": 10, "requester": { "mphone": $rootScope.phone, "telephone": $rootScope.phone, "selectType": 1 } }
968
+                                                    api_user_data.fetchDataList('requester', filterData).then(function(data) {
969
+                                                        var myData = Restangular.stripRestangular(data);
970
+                                                        // $rootScope.phone="";
971
+                                                        if (myData.list.length == 0) {
972
+                                                            var modalInstance = $modal.open({
973
+                                                                backdrop: "static",
974
+                                                                templateUrl: 'assets/views/customform/tpl/modal-add-callrequester.html',
975
+                                                                controller: function($scope, $modalInstance, api_user_data, SweetAlert) {
976
+                                                                    $scope.title = "新增报修人";
977
+                                                                    $scope.requester = {};
978
+                                                                    $scope.onChangeadd = function(searchData) {
979
+                                                                        $scope.searchKey = searchData.account;
980
+                                                                        // $scope.searchDataadd = searchData;
981
+                                                                        var requesdata = angular.copy(searchData)
982
+                                                                            // if (requesdata.mphone) {
983
+                                                                            //     delete requesdata.mphone;
984
+                                                                            // }
985
+                                                                        if (requesdata.telephone) {
986
+                                                                            delete requesdata.telephone;
987
+                                                                        }
988
+                                                                        angular.extend($scope.requester, requesdata);
989
+                                                                    }
990
+                                                                    $scope.refreshUseradd = function(searchKey) { //请求人搜索
991
+                                                                        $scope.requester.account = searchKey;
992
+                                                                        $scope.searchData = searchKey;
993
+                                                                        serchdataadd(searchKey);
994
+                                                                    }
995
+                                                                    $scope.getMydata = function(x) {
996
+                                                                        var reqestdatap = JSON.parse(x[0])
997
+                                                                            // if ($scope.requester.mphone) {
998
+                                                                            //     delete reqestdatap.mphone;
999
+                                                                            // }
1000
+                                                                        if ($scope.requester.telephone) {
1001
+                                                                            delete reqestdatap.telephone;
1002
+                                                                        }
1003
+                                                                        $scope.searchField = JSON.parse(x[0]).account;
1004
+                                                                        angular.extend($scope.requester, reqestdatap);
1005
+                                                                        if ($scope.requester.areaDTO && $scope.requester.areaDTO.id && $scope.requester.areaDTO.id != "") {
1006
+                                                                            api_user_data.fetchDataList('place', { place: { areaId: $scope.requester.areaDTO.id }, idx: 0, sum: 1000 }).then(function(response) {
1007
+                                                                                if (response.status == 200) {
1008
+                                                                                    $scope.places = response.list;
1009
+                                                                                }
1010
+                                                                            })
1011
+                                                                        }
1012
+                                                                    }
1013
+                                                                    $scope.getMydataone = function(x) {
1014
+                                                                        $scope.searchField = x;
1015
+                                                                        $scope.requester.account = x;
1016
+                                                                    }
1017
+                                                                    serchdataadd();
1018
+
1019
+                                                                    function serchdataadd(searchKey) {
1020
+                                                                        if (searchKey) {
1021
+                                                                            var filterData = {
1022
+                                                                                'requester': {
1023
+                                                                                    'searchKey': searchKey,
1024
+                                                                                },
1025
+                                                                                idx: 0,
1026
+                                                                                sum: 10
1027
+                                                                            };
1028
+                                                                        } else {
1029
+                                                                            var filterData = {
1030
+                                                                                idx: 0,
1031
+                                                                                sum: 10
1032
+                                                                            };
1033
+                                                                        }
1034
+                                                                        api_user_data.fetchDataList('requester', filterData).then(function(response) {
1035
+                                                                            var myData = response;
1036
+                                                                            $scope.myData = myData.list;
1037
+                                                                        });
1038
+                                                                    }
1039
+                                                                    api_user_data.fetchDataList('area', { idx: 0, sum: 100 }).then(function(response) {
1040
+                                                                            if (response.status == 200) {
1041
+                                                                                $scope.areas = response.list;
1042
+                                                                            }
1043
+                                                                        })
1044
+                                                                        // api_user_data.fetchDataList('place', { idx: 0, sum: 1000 }).then(function(response) {
1045
+                                                                        //         if (response.status == 200) {
1046
+                                                                        //             $scope.places = response.list;
1047
+                                                                        //         }
1048
+                                                                        //     }) //地点
1049
+                                                                    api_user_data.fetchDataList('requesterType', { idx: 0, sum: 100 }).then(function(response) {
1050
+                                                                        if (response.status == 200) {
1051
+                                                                            $scope.networktypes = response.list;
1052
+                                                                        }
1053
+                                                                    })
1054
+                                                                    $scope.requesterAreaid = "";
1055
+                                                                    $scope.onChange = function(item) {
1056
+                                                                            $scope.requesterAreaid = item.id;
1057
+                                                                            $scope.requester.placeDTO = {};
1058
+                                                                            api_user_data.fetchDataList('place', { place: { areaId: item.id }, idx: 0, sum: 1000 }).then(function(response) {
1059
+                                                                                if (response.status == 200) {
1060
+                                                                                    $scope.places = response.list;
1061
+                                                                                }
1062
+                                                                            })
1063
+                                                                        }
1064
+                                                                        //地点搜索
1065
+                                                                    $scope.refresh = function(searchVal) {
1066
+                                                                        var faildata = {};
1067
+                                                                        if ($scope.requesterAreaid) {
1068
+                                                                            faildata = {
1069
+                                                                                'idx': 0,
1070
+                                                                                'sum': 1000,
1071
+                                                                                'place': { 'areaId': $scope.requesterAreaid, 'place': searchVal, 'selectType': 'pinyin_qs' }
1072
+                                                                            }
1073
+                                                                        } else {
1074
+                                                                            faildata = {
1075
+                                                                                'idx': 0,
1076
+                                                                                'sum': 1000,
1077
+                                                                                'place': { 'place': searchVal, 'selectType': 'pinyin_qs' }
1078
+                                                                            }
1079
+                                                                        }
1080
+                                                                        api_user_data.fetchDataList('place', faildata).then(function(response) {
1081
+                                                                            $scope.places = response.list;
1082
+                                                                            delete $scope.requester.placeDTO;
1083
+                                                                        })
1084
+                                                                    }
1085
+                                                                    $scope.requester = { 'telephone': $rootScope.phone };
1086
+                                                                    $scope.ok = function() {
1087
+                                                                        // $modalInstance.close($scope.requester);
1088
+                                                                        if (angular.isUndefined($scope.requester.name) || $scope.requester.name == null || $scope.requester.name == "") {
1089
+                                                                            SweetAlert.swal("报修人姓名未填!", "请填写报修人姓名", "error");
1090
+                                                                        } else if (angular.isUndefined($scope.requester.mphone) || $scope.requester.mphone == null || $scope.requester.mphone == "") {
1091
+                                                                            SweetAlert.swal("报修人电话未填!", "请填写报修人电话", "error");
1092
+                                                                        } else {
1093
+                                                                            $modalInstance.close($scope.requester);
1094
+                                                                        }
1095
+                                                                    };
1096
+
1097
+                                                                    $scope.cancel = function() {
1098
+                                                                        $modalInstance.dismiss('cancel');
1099
+                                                                        $rootScope.setidle();
1100
+                                                                    };
1101
+                                                                },
1102
+                                                            });
1103
+                                                            modalInstance.result.then(function(selectedItem) {
1104
+                                                                if (selectedItem) {
1105
+                                                                    if (selectedItem.telephone && !selectedItem.mphone) {
1106
+                                                                        selectedItem.telephone = angular.copy(selectedItem.mphone);
1107
+                                                                        delete selectedItem.mphone;
1108
+                                                                    }
1109
+                                                                    var data = {
1110
+                                                                        'requester': selectedItem
1111
+                                                                    };
1112
+                                                                    api_user_data.addData('requester', data).then(function(response) {
1113
+                                                                        if (response.status == 200) {
1114
+                                                                            var data = { 'model': { 'requestershow': response.data, 'incident': { 'requester': response.data, 'area': response.data.areaDTO, 'place': response.data.placeDTO, 'houseNumber': response.data.houseNumber, 'contactsInformation': response.data.telephone, 'callID': cdrid, 'source': { 'id': 1 } } } }
1115
+                                                                            $state.go('app.incident.title', { 'model': JSON.stringify(data) });
1116
+                                                                        }
1117
+                                                                    })
1118
+                                                                }
1119
+                                                            });
1120
+                                                        } else if (myData.list.length == 1) {
1121
+                                                            angular.extend(myData.list[0], { 'telephone': $rootScope.phone });
1122
+                                                            var data = { 'model': { 'requestershow': myData.list[0], 'incident': { 'requester': myData.list[0], 'area': myData.list[0].areaDTO, 'place': myData.list[0].placeDTO, 'contactsInformation': myData.list[0].telephone, 'houseNumber': myData.list[0].houseNumber, 'callID': cdrid, 'source': { 'id': 1 } } } }
1123
+                                                            $state.go('app.incident.title', { 'model': JSON.stringify(data) });
1124
+                                                        } else {
1125
+                                                            var modalInstance = $modal.open({
1126
+                                                                templateUrl: 'assets/views/createincident.html',
1127
+                                                                backdrop: "static",
1128
+                                                                controller: function($scope, $modalInstance, api_user_data) {
1129
+                                                                    $scope.title = "请确定报修人";
1130
+                                                                    $scope.requester = myData.list;
1131
+                                                                    $scope.choice = function(requester) {
1132
+                                                                        $modalInstance.dismiss('cancel');
1133
+                                                                        angular.extend(requester, { 'telephone': $rootScope.phone });
1134
+                                                                        var data = { 'model': { 'requestershow': requester, 'incident': { 'requester': requester, 'area': requester.areaDTO, 'place': requester.placeDTO, 'houseNumber': requester.houseNumber, 'contactsInformation': requester.telephone, 'callID': cdrid, 'source': { 'id': 1 } } } }
1135
+                                                                        $state.go('app.incident.title', { 'model': JSON.stringify(data) });
1136
+                                                                    };
1137
+
1138
+                                                                    $scope.cancel = function() {
1139
+                                                                        $modalInstance.dismiss('cancel');
1140
+                                                                        $rootScope.setidle();
1141
+                                                                    };
1142
+                                                                },
1143
+                                                                size: "lg"
1144
+                                                            });
1145
+                                                        }
1146
+
1147
+                                                    });
1148
+                                                }
1149
+                                            })
1150
+                                        }
1151
+                                    }
1152
+                                }
1153
+                            }
1154
+                        };
1155
+                        var heartCheck = {
1156
+                            timeout: 12000, //60ms
1157
+                            timeoutObj: null,
1158
+                            serverTimeoutObj: null,
1159
+                            reset: function() {
1160
+                                clearTimeout(this.timeoutObj);
1161
+                                clearTimeout(this.serverTimeoutObj);    
1162
+                                this.start();
1163
+                            },
1164
+                            start: function() {
1165
+                                var self = this;
1166
+                                this.timeoutObj = setTimeout(function() {
1167
+                                    if ($scope.login) {
1168
+                                        ws.send("HeartBeat");
1169
+                                        self.serverTimeoutObj = setTimeout(function() {
1170
+                                            ws.close(); //如果onclose会执行reconnect,我们执行ws.close()就行了.如果直接执行reconnect 会触发onclose导致重连两次
1171
+                                        }, self.timeout)
1172
+                                    }
1173
+                                }, this.timeout)
1174
+                            },
1175
+                        }
1176
+                        ws.onclose = function(evt) { reconnect(); }
1177
+                        ws.onerror = function(evt) { reconnect(); };
1178
+                    }
1179
+                    reconnect();
1180
+                } else {
1181
+                    var Notification = window.Notification;
1182
+                    Notification.requestPermission();
1183
+                    var n = new Notification("签入失败!", {
1184
+                        body: data.errmsg,
1185
+                        icon: '../bower_components/HTML5-Desktop-Notifications/alert.ico',
1186
+                        // onclick: function onNotificationClicked() {
1187
+                        //     console.log('Notification clicked.');
1188
+                        // }
1189
+                    });
1190
+                }
1191
+            })
1192
+
1193
+        })
1194
+    }
1195
+    setInterval(function() {
1196
+        if ($scope.login && $rootScope.statuscall == 1 && $rootScope.statecall == 1) {
1197
+            $rootScope.setidle();
1198
+        } else if ($scope.login && $rootScope.statuscall != 3 && $rootScope.statecall == 2 && statuscall != 0) {
1199
+            $rootScope.setbusy
1200
+        }
1201
+    }, 3000);
1202
+    // 华科呼叫中心 end
1203
+
850 1204
     //话机呼叫中心--开始
851 1205
     // 1是老的呼叫中心
852 1206
     // 2是2021年12月29日新增的呼叫中心
853
-    $rootScope.seiminHj = 2;
1207
+    console.log($rootScope.isHk,'hk')
1208
+    console.log($rootScope.isZncd,'zncd')
1209
+    if($rootScope.isZncd){
1210
+      $rootScope.seiminHj = 2;
1211
+    }else if($rootScope.isHk){
1212
+      $rootScope.seiminHj = 3;
1213
+    }else{
1214
+      $rootScope.seiminHj = 1;
1215
+    }
854 1216
     $rootScope.getExtnDirect = function () {
855 1217
       $rootScope['getExtnDirect' + $rootScope.seiminHj]();
856 1218
     }
@@ -1954,6 +2316,20 @@ app.controller('AppCtrl', ['$rootScope', '$scope', '$state', '$translate', '$loc
1954 2316
         }
1955 2317
       })
1956 2318
     }
2319
+    $rootScope.getExtnDirect3 = function(){
2320
+      console.log($rootScope.user)
2321
+      var user = $rootScope.user;
2322
+      initImUser(user.email, user.msgUuid);
2323
+      // $rootScope.start(JSON.parse(localStorage.userdata).commonExtension.name);
2324
+      api_wechatfile.getDictionary({ "type": "list", "key": "hjzx_cornet" }).then(function(data) {
2325
+          $scope.runNumber = data;
2326
+          $scope.phone = $scope.runNumber[0].name;
2327
+          $rootScope.phoneChange($scope.phone);
2328
+      })
2329
+      if ($rootScope.userMenus.length == 0) {
2330
+          getMenus();
2331
+      }
2332
+    }
1957 2333
     $rootScope.jry_state = 'weiqianru';
1958 2334
     window.addEventListener('load', function () {
1959 2335
       if ($rootScope.isFuwutai) {
@@ -2548,13 +2924,17 @@ app.controller('AppCtrl', ['$rootScope', '$scope', '$state', '$translate', '$loc
2548 2924
             // $auth.deleteData('auth_headers')
2549 2925
             sessionStorage.clear();
2550 2926
             localStorage.clear();
2551
-            if ($rootScope.isFuwutai) {
2552
-              tlwsa.tlaClose();
2553
-              $.toaster({
2554
-                priority: 'info',
2555
-                title: '操作',
2556
-                message: '呼叫中心断开连接'
2557
-              });
2927
+            console.log($rootScope.isHk,'hk');
2928
+            console.log($rootScope.isZncd,'zncd');
2929
+            if($rootScope.isZncd){
2930
+              if ($rootScope.isFuwutai) {
2931
+                tlwsa.tlaClose();
2932
+                $.toaster({
2933
+                  priority: 'info',
2934
+                  title: '操作',
2935
+                  message: '呼叫中心断开连接'
2936
+                });
2937
+              }
2558 2938
             }
2559 2939
             $state.go("login.signin");
2560 2940
           })

+ 7 - 7
assets/js/controllers/system/hospitalCtrl.js

@@ -81,13 +81,13 @@ app.controller("hospitalCtrl", [
81 81
       },
82 82
       {
83 83
         name: "hosName",
84
-        displayName: "区名称",
84
+        displayName: "区名称",
85 85
         width: "35%",
86 86
         enableFiltering: false,
87 87
       },
88 88
       {
89 89
         name: "hosNo",
90
-        displayName: "区编码",
90
+        displayName: "区编码",
91 91
         width: "35%",
92 92
         enableFiltering: false,
93 93
       },
@@ -142,7 +142,7 @@ app.controller("hospitalCtrl", [
142 142
         controller: function ($scope, scope, $modalInstance, api_user_data) {
143 143
           $scope.hospital = {};
144 144
           $scope.hospital = selectdata;
145
-          $scope.title = "区编辑";
145
+          $scope.title = "区编辑";
146 146
           $scope.cancel = function () {
147 147
             $modalInstance.dismiss("cancel");
148 148
           };
@@ -174,7 +174,7 @@ app.controller("hospitalCtrl", [
174 174
                       SweetAlert.swal(
175 175
                         {
176 176
                           title: "修改失败!",
177
-                          text: "该区已存在",
177
+                          text: "该区已存在",
178 178
                           type: "error",
179 179
                         },
180 180
                         function () {
@@ -230,7 +230,7 @@ app.controller("hospitalCtrl", [
230 230
       var modalInstance = $modal.open({
231 231
         templateUrl: "assets/views/system/tpl/hospitalchange.html",
232 232
         controller: function ($scope, $modalInstance, api_user_data) {
233
-          $scope.title = "区新增";
233
+          $scope.title = "区新增";
234 234
           $scope.cancel = function () {
235 235
             $modalInstance.dismiss("cancel");
236 236
           };
@@ -301,8 +301,8 @@ app.controller("hospitalCtrl", [
301 301
         templateUrl: "assets/views/incident/tpl/acceptTask.tpl.html",
302 302
         controller: function ($scope, scope, $modalInstance, api_bpm_data) {
303 303
           var rmvList = [];
304
-          $scope.title = "区删除";
305
-          $scope.connect = "确定要删除此区?";
304
+          $scope.title = "区删除";
305
+          $scope.connect = "确定要删除此区?";
306 306
           rmvList.push(rmData);
307 307
           $scope.ok = function () {
308 308
             $modalInstance.close(rmvList);

+ 0 - 0
assets/js/directives/ola_api3.js


+ 3 - 2
assets/js/main.js

@@ -1,4 +1,4 @@
1
-console.info('v1.0.1');
1
+console.info('v1.0.2');
2 2
 var app = angular.module('itsmApp', ['itsm-dep']);
3 3
 var domainName = document.domain;//域名
4 4
 var protocolName = document.location.protocol;//http协议
@@ -12,7 +12,8 @@ var protocolName = document.location.protocol;//http协议
12 12
 //线上
13 13
 var serverIp = protocolName + "//" + domainName + "/service";
14 14
 var reportIp = protocolName + "//" + domainName + "/service";
15
-var inspectIp = protocolName + "//" + domainName + "/service";
15
+// var inspectIp = protocolName + "//" + domainName + "/service";
16
+var inspectIp = "http://192.168.77.57";
16 17
 var imgBaseUrl = protocolName + "//" + domainName;
17 18
 var callIp = protocolName + "//" + domainName;
18 19
 // var seiminCallIp = '192.168.3.233';//本地

+ 1 - 2
assets/views/app.html

@@ -23,6 +23,5 @@
23 23
 <!-- footer -->
24 24
 <footer data-ng-include=" 'assets/views/partials/footer.html' " ng-mouseup="returnRemoveClass()"></footer>
25 25
 <!-- / footer -->
26
-<div ng-if="seiminHj === 1" ng-mouseup="returnRemoveClass()" data-ng-include=" 'assets/views/partials/off-sidebar1.html' " id="off-sidebar" class="sidebar" toggleable parent-active-class="app-offsidebar-open"></div>
27
-<div ng-if="seiminHj === 2" ng-mouseup="returnRemoveClass()" data-ng-include=" 'assets/views/partials/off-sidebar2.html' " id="off-sidebar" class="sidebar" toggleable parent-active-class="app-offsidebar-open"></div>
26
+<div ng-mouseup="returnRemoveClass()" data-ng-include=" 'assets/views/partials/off-sidebar'+seiminHj+'.html' " id="off-sidebar" class="sidebar" toggleable parent-active-class="app-offsidebar-open"></div>
28 27
 <!-- <div data-ng-include=" 'assets/views/partials/settings.html' " toggleable class="settings panel panel-default hidden-xs hidden-sm" id="settings"></div> -->

+ 7 - 0
assets/views/customform/tpl/ui-requesterinformation.html

@@ -94,10 +94,17 @@
94 94
                     
95 95
         <button style=" margin: 0;line-height: 10px;" ng-click="options.templateOptions['addRequeter']('lg',options,to.modal,$event);"
96 96
             class="btn btn-addbutton  addbutton col-md-offset-5 col-md-12">添加报修人</button>
97
+        <button style=" margin: 8px 0 0;line-height: 10px;" ng-click="quickCopy(options.model)"
98
+            class="btn btn-addbutton  addbutton col-md-offset-5 col-md-12">一键复制</button>
97 99
         <div style="margin-top: 8px;float: left;"><input type="checkbox" ng-click="selectGradeBox()" ng-checked="saveReqPlace" id="saveAreaPlace" ng-disabled="!(model.place.id&&model.area.id)"><label for="saveAreaPlace" style="user-select: none;font-size: 15px;margin-left:8px;font-weight: bold;cursor: pointer;color: #333;">报修人区域地点保存</label></div>
98 100
         <!-- <button class="btn btn-default default col-md-4 col-md-offset-1" ng-click="options.templateOptions['changeRequeter']('lg',options,to.modal,model)">修改</button> -->
99 101
         <!-- </div> -->
100 102
     </div>
103
+    <div class="col-md-12 col-10 fontcolor-three fontsizes-14 requestconnect padding-bottom-10 border-bottom-left-2 border-bottom-right-2"
104
+        ng-if="!options.templateOptions.onlyshow">
105
+        <button style=" margin: 8px 0 0;line-height: 10px;" ng-click="quickCopy(options.model)"
106
+            class="btn btn-addbutton  addbutton col-md-offset-5 col-md-12">一键复制</button>
107
+    </div>
101 108
     <!-- </div> -->
102 109
 </div>
103 110
 <!-- <input class="form-control pull-right inputcolor" style="width:132px !important;border-color: #dedede;color: #93989e;" type="text" ng-model="searchkeys.contactsInformation" placeholder="" /> -->

+ 11 - 2
assets/views/incident/tpl/toIntegralMechanism.tpl.html

@@ -22,7 +22,7 @@
22 22
             </div>
23 23
         </div>
24 24
     </div>
25
-    <div class="form-group incidentsearch" style="margin:0 auto;width: 300px;" ng-if="flag && complexityConfirm.complexity.value != complexity">
25
+    <div class="form-group incidentsearch" style="margin:0 auto;width: 300px;">
26 26
         <div class="input-group" style="margin:8px 0 0;">
27 27
             <div class="control-label pull-left margin-top-5 margin-right-5">
28 28
                 <label class="demoincident">升级原因<span class="red">*</span></label>:</div>
@@ -31,7 +31,7 @@
31 31
             </div>
32 32
         </div>
33 33
     </div>
34
-    <div class="form-group incidentsearch" style="margin:0 auto;width: 300px;" ng-if="!flag">
34
+    <!-- <div class="form-group incidentsearch" style="margin:0 auto;width: 300px;" ng-if="flag && complexityConfirm.complexity.value != complexity">
35 35
         <div class="input-group" style="margin:8px 0 0;">
36 36
             <div class="control-label pull-left margin-top-5 margin-right-5">
37 37
                 <label class="demoincident">升级原因<span class="red">*</span></label>:</div>
@@ -40,6 +40,15 @@
40 40
             </div>
41 41
         </div>
42 42
     </div>
43
+    <div class="form-group incidentsearch" style="margin:0 auto;width: 300px;" ng-if="!flag">
44
+        <div class="input-group" style="margin:8px 0 0;">
45
+            <div class="control-label pull-left margin-top-5 margin-right-5">
46
+                <label class="demoincident">升级原因<span class="red">*</span></label>:</div>
47
+            <div class="pull-right">
48
+                <textarea placeholder="请输入升级原因" class="pull-left" style="width:220px;height: 100px;resize:none;" ng-model="complexityConfirm.updateReason"></textarea>
49
+            </div>
50
+        </div>
51
+    </div> -->
43 52
 </div>
44 53
 <div class="modal-footer modelfooter-hint pointfont">
45 54
     <div class="hintfooterleft pull-left" ng-click="ok()" style="cursor: pointer;">确定</div>

+ 104 - 0
assets/views/partials/off-sidebar3.html

@@ -0,0 +1,104 @@
1
+<!-- start: OFF RIGHT SIDEBAR TABSET -->
2
+<tabset class="sidebar-wrapper" justified="true">
3
+    <!-- start: TAB FAVORITES  -->
4
+    <tab>
5
+        <tab-heading>
6
+            <!-- <i class="ti-heart"></i> -->
7
+            <i class="fa fa-phone"></i>
8
+        </tab-heading>
9
+        <div class="tab-pane" id="getup">
10
+            <div class="users-list fontsizes-14">
11
+                <!-- <botton href="#" ng-click="setbusy(1)" translate="offsidebar.login.SETBUSY" ng-if="statecall==1&&login">setbusy</botton>
12
+                <botton href="#" ng-click="setidle()" translate="offsidebar.login.SETIDLE" ng-if="statecall==2">setidle</botton> -->
13
+                <!-- <botton href="#" style="float:right" ng-click="end()" translate="offsidebar.login.GETOUT" ng-if="login">getout</botton> -->
14
+                <botton href="#" ng-click="setbusy(1)" translate="offsidebar.login.SETBUSY" class="btn btn-setbusy setbusy" ng-if="statecall==1&&login&&statuscall!=3&&statuscall!=2">setbusy</botton>
15
+                <botton href="#" ng-click="setidle()" translate="offsidebar.login.SETIDLE" class="btn btn-setidle setidle" ng-if="login&&statecall==2&&statuscall!=3&&statuscall!=2">setidle</botton>
16
+                <botton href="#" style="float:right" ng-click="end()" translate="offsidebar.login.GETOUT" class="btn btn-getout getout" ng-if="login">getout</botton>
17
+                <div class="row form-group fontcolor-two" style="margin-top:30px" id="updata" ng-if="!login">
18
+                    <div class="col-xs-12 fontsizes-14">
19
+                        <div class="col-xs-12">
20
+                            <div class="control-label" for="title">
21
+                                绑定分机:
22
+                            </div>
23
+                            <!-- <label class="control-label text-right pull-left" for="range">分机号:</label> -->
24
+                            <!-- <ui-select ng-model="hjzx.phone" theme="bootstrap">
25
+                                <ui-select-match placeholder="选择分机号">
26
+                                    {{$select.selected.name}}
27
+                                </ui-select-match>
28
+                                <ui-select-choices repeat="item in runNumber | filter: $select.search">
29
+                                    <div ng-bind-html="item.name | highlight: $select.search"></div>
30
+                                </ui-select-choices>
31
+                            </ui-select> -->
32
+                            <select class="form-control" ng-model="phone" ng-change="phoneChange(phone)">  
33
+                                        <option ng-repeat="x in runNumber" value="{{x.name}}">{{x.name}}</option>  
34
+                                    </select>
35
+
36
+                            <!-- <select class="cs-select cs-skin-slide" ng-model="hjzx.phone">
37
+                                        <option value=""></option>
38
+                                        <option ng-repeat="row in runNumber" value="{{row.id}}" >{{row.name}}</option>
39
+                                    </select> -->
40
+                            <!-- <div class="">
41
+                                <input id="title" name="title" ng-model="phone" class="form-control" placeholder="分机号" />
42
+                            </div> -->
43
+                        </div>
44
+                        <!-- <div class="col-xs-12">
45
+                            <div class="control-label" for="title" style="padding-right:0px">
46
+                                ACD技能组:
47
+                            </div>
48
+                            <div class="">
49
+                                <select-input class="openaddinput" onChangeadd="onChangeadd()" model={{telephone}} requesdata="telephone" showkeys="phone"></select-input>
50
+                            </div>
51
+                        </div> -->
52
+                        <div class="col-xs-12">
53
+                            <button class="btn btn-addbutton  addbutton pull-right" style="margin-top:20px" ng-click="start(phone)" translate="offsidebar.login.GETIN"></button>
54
+                        </div>
55
+                    </div>
56
+                </div>
57
+                <div class="row form-group fontcolor-two" style="margin-top:30px" id="dialout" ng-if="login&&statuscall!=3">
58
+                    <div class="col-xs-12 fontsizes-14">
59
+                        <!-- <div class="col-xs-12">
60
+                            <div class="control-label" for="title">
61
+                                中继选择:
62
+                            </div>
63
+                            <div class="">
64
+                                <input id="gid" name="gid" ng-model="gid" class="form-control" placeholder="中继选择" />
65
+                            </div>
66
+                        </div> -->
67
+                        <div class="col-xs-12">
68
+                            <div>
69
+                                <div class="control-label" for="title">
70
+                                    目的号码:
71
+                                </div>
72
+                                <div class="">
73
+                                    <input id="teleno" name="teleno" ng-model="teleno" class="form-control" placeholder="目的号码" />
74
+                                </div>
75
+                            </div>
76
+                        </div>
77
+                        <div class="col-xs-12">
78
+                            <button class="btn btn-primary col-md-offset-6" style="margin-top:20px" ng-click="dialout(gid,teleno)" translate="offsidebar.login.DIALOUT"></button>
79
+                        </div>
80
+                    </div>
81
+                </div>
82
+                <div class="row form-group fontcolor-two" style="margin-top:30px" ng-if="login&&statuscall==3">
83
+                    <div class="col-xs-12 fontsizes-14">
84
+                        <div class="col-xs-12">
85
+                            <div class="control-label" for="title" style="padding-right:0px">
86
+                                转接号码:
87
+                            </div>
88
+                            <div class="">
89
+                                <select-input class="openaddinput" onChangeadd="onChangeadd()" model={{telephone}} requesdata="telephone" showkeys="phone"></select-input>
90
+                            </div>
91
+                        </div>
92
+                        <div class="col-xs-12">
93
+                            <button class="btn btn-primary" style="margin-top:20px" ng-click="inittrans(telephone)" translate="offsidebar.login.INITTRANS"></button>
94
+                            <!-- <button class="btn btn-primary" ng-click="comptrans()" style="margin-top:20px" translate="offsidebar.login.COMPTRANS"></button> -->
95
+                        </div>
96
+                    </div>
97
+                </div>
98
+            </div>
99
+        </div>
100
+        <!-- </div> -->
101
+    </tab>
102
+    <!-- end: TAB FAVORITES -->
103
+</tabset>
104
+<!-- end: OFF RIGHT SIDEBAR TABSET -->

+ 2 - 2
assets/views/system/hospital.html

@@ -35,8 +35,8 @@
35 35
   <div class="row">
36 36
     <div class="col-sm-8">
37 37
       <h1 class="mainTitle">
38
-        区设置<i
39
-          tooltip="新增或编辑区。"
38
+        区设置<i
39
+          tooltip="新增或编辑区。"
40 40
           tooltip-placement="right"
41 41
           class="fa ti-help-alt margin-left-10 fontcolor-five pointfont"
42 42
         ></i>

+ 6 - 6
assets/views/system/processdesign/incidentplan/incidentSetUp.html

@@ -572,7 +572,7 @@
572 572
                                 </div>
573 573
                                 <div class="tab-mainDiv-body-lineDiv-50">
574 574
                                     <div class="tab-mainDiv-body-lable">
575
-                                        是否分区处理:
575
+                                        是否分区处理:
576 576
                                     </div>
577 577
                                     <div class="tab-mainDiv-body-content userGroupType">
578 578
                                         <label>
@@ -585,7 +585,7 @@
585 585
                                         </label>
586 586
                                     </div>
587 587
                                 </div>
588
-                                <!-- 分区处理-否 -->
588
+                                <!-- 分区处理-否 -->
589 589
                                 <div class="tab-mainDiv-body-lineDiv-50" ng-if="subdata.branchType == 0">
590 590
                                     <div class="tab-mainDiv-body-lable">运维组/运维人员:</div>
591 591
                                     <div class="userGroupType">
@@ -621,7 +621,7 @@
621 621
                                         </ui-select>
622 622
                                     </div>
623 623
                                 </div>
624
-                                <!-- 分区处理-是 -->
624
+                                <!-- 分区处理-是 -->
625 625
                                 <div class="tab-mainDiv-body-lineDiv-50" ng-if="subdata.branchType == 1" ng-repeat="item in subdata.branchUserGroups">
626 626
                                     <div class="tab-mainDiv-body-lable">{{item.branchName}} - 运维组/运维人员:</div>
627 627
                                     <div class="userGroupType">
@@ -787,7 +787,7 @@
787 787
                                     </div>
788 788
                                     <div class="tab-mainDiv-body-lineDiv-50">
789 789
                                         <div class="tab-mainDiv-body-lable">
790
-                                            是否分区处理:
790
+                                            是否分区处理:
791 791
                                         </div>
792 792
                                         <div class="tab-mainDiv-body-content userGroupType">
793 793
                                             <label>
@@ -800,7 +800,7 @@
800 800
                                             </label>
801 801
                                         </div>
802 802
                                     </div>
803
-                                    <!-- 分区处理-否 -->
803
+                                    <!-- 分区处理-否 -->
804 804
                                     <div class="tab-mainDiv-body-lineDiv-50" ng-if="adddata.branchType == 0">
805 805
                                         <div class="tab-mainDiv-body-lable">运维组/运维人员:</div>
806 806
                                         <div class="userGroupType">
@@ -836,7 +836,7 @@
836 836
                                             </ui-select>
837 837
                                         </div>
838 838
                                     </div>
839
-                                    <!-- 分区处理-是 -->
839
+                                    <!-- 分区处理-是 -->
840 840
                                     <div class="tab-mainDiv-body-lineDiv-50" ng-if="adddata.branchType == 1" ng-repeat="item in adddata.branchUserGroups">
841 841
                                         <div class="tab-mainDiv-body-lable">{{item.branchName}} - 运维组/运维人员:</div>
842 842
                                         <div class="userGroupType">

+ 1 - 1
assets/views/system/tpl/area.html

@@ -11,7 +11,7 @@
11 11
 <div class="modal-body">
12 12
     <div class="well-lg"><br/>
13 13
         <div class="row form-group">
14
-            <label class="col-md-3 col-md-offset-1 control-label">所属区*:</label>
14
+            <label class="col-md-3 col-md-offset-1 control-label">所属区*:</label>
15 15
             <div class="col-md-7">
16 16
                 <ui-select style="width: 100%;" ng-model="search.hospital"
17 17
                     theme="bootstrap">

+ 4 - 4
assets/views/system/tpl/hospitalchange.html

@@ -14,13 +14,13 @@
14 14
         <div
15 15
           class="pull-left openaddlable control-label fontcolor-two fontsizes-14"
16 16
         >
17
-          区名称*:
17
+          区名称*:
18 18
         </div>
19 19
         <div class="pull-right openaddinput">
20 20
           <input
21 21
             class="form-control"
22 22
             ng-model="hospital.hosName"
23
-            placeholder="区名称"
23
+            placeholder="区名称"
24 24
           />
25 25
         </div>
26 26
       </div>
@@ -28,13 +28,13 @@
28 28
         <div
29 29
           class="pull-left openaddlable control-label fontcolor-two fontsizes-14"
30 30
         >
31
-          区编码*:
31
+          区编码*:
32 32
         </div>
33 33
         <div class="pull-right openaddinput">
34 34
           <input
35 35
             class="form-control"
36 36
             ng-model="hospital.hosNo"
37
-            placeholder="区编码"
37
+            placeholder="区编码"
38 38
           />
39 39
         </div>
40 40
       </div>