|
@@ -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
|
})
|