liuyifan лет назад: 5
Родитель
Сommit
5efdc22c16
4 измененных файлов с 81 добавлено и 111 удалено
  1. 1 25
      WebChart/index.html
  2. 20 0
      WebChart/js/index.js
  3. 0 43
      WebChart/timeLimit.html
  4. 60 43
      WebUI/CallCenterWeb.UI/js/index.js

+ 1 - 25
WebChart/index.html

@@ -99,35 +99,11 @@
99 99
 </div>
100 100
 <script src="js/jquery.min.js"></script>
101 101
 <script src="js/echarts.min.js"></script>
102
+<script src="js/index.js"></script>
102 103
 <script src="js/highcharts.js"></script>
103 104
 <script src="js/gray.js"></script>
104 105
 <script src="js/radialIndicator.js"></script>
105 106
 <script src="js/coment.js"></script>
106 107
 <script src="js/laiyuanqudao.js"></script>
107
-<script>
108
-	$(document).ready(function(){
109
-        loginTimeLimit()
110
-    });
111
-    function loginTimeLimit(){
112
-        $.ajax({
113
-            type:"get",
114
-            url: huayi.config.callcenter_url + "Login/GetAuAuthDate",
115
-            async:false,
116
-            success:function(res){
117
-                var res=$.parseJSON(res)
118
-                if(res.state== "success") {
119
-                } else {
120
-                    layer.confirm(res.message, {
121
-                        icon: 2,
122
-                        btn: ['确定'],
123
-                        yes:function (index, layero){
124
-                            window.location.href = "timeLimit.html";
125
-                        }
126
-                    });
127
-                }
128
-            }
129
-        });
130
-    }
131
-</script>
132 108
 </body>
133 109
 </html>

+ 20 - 0
WebChart/js/index.js

@@ -0,0 +1,20 @@
1
+$(document).ready(function(){
2
+    timeLimit()
3
+});
4
+function timeLimit () {
5
+    $.ajax({
6
+        type: "get",
7
+        url: huayi.config.callcenter_url + "Login/GetAuAuthDate",
8
+        dataType: 'json',
9
+        async: false,
10
+        success: function(data) {
11
+            var contentAuthDate = '授权到期时间:' + data.AuthDate  
12
+            if (parseInt(data.day) < 30) {
13
+                layer.confirm(contentAuthDate, {
14
+                    btn: ['确定'],
15
+                });
16
+            }
17
+        }
18
+    });
19
+}
20
+var timer = setInterval(timeLimit, 1800000);

+ 0 - 43
WebChart/timeLimit.html

@@ -1,43 +0,0 @@
1
-<!DOCTYPE html>
2
-<html>
3
-<head lang="en">
4
-    <meta charset="UTF-8">
5
-    <title>永城大屏首页</title>
6
-     <script src="Script/Common/huayi.load.js"></script>
7
-    <script src="Script/Common/huayi.config.js"></script>
8
-    <link rel="stylesheet" href="css/bootstrap.min.css" />
9
-    <link rel="stylesheet" href="css/index.css"/>
10
-    <style>
11
-    	.qunzhong{
12
-    		width: 1300px;
13
-			margin: 0 auto;
14
-    	}
15
-        .biao-title {
16
-            border: 0;
17
-            text-align: center;
18
-            color: #fff;
19
-        }
20
-    </style>
21
-</head>
22
-<body>
23
-<div class="navcon ">
24
-	<div class="navbox clearfix">
25
-	<p><img src="img/sqLogo.png" class="logo" alt="" />永城12345数据展示</p>
26
-    <ul class="navl clearfix">
27
-        <li><a class="active" href="">来源渠道情况</a></li>
28
-        <li><a href="#">接单部门情况</a></li>
29
-        <li><a href="#">投诉举报情况</a></li>
30
-        <li><a href="#">话务数量情况</a></li>
31
-        <li><a href="#">中心大数据</a></li>
32
-        <!--<li><a href="fuWuZhiShi.html">服务知识</a></li>-->
33
-    </ul>
34
-   </div>
35
-</div>
36
-<div class="qunzhong clearfix container-fluid">
37
-    <div class="col-md-12" >
38
-		<div class="biao-title">授权过期,请联系系统厂家</div>
39
-    </div>
40
-</div>
41
-<script src="js/jquery.min.js"></script>
42
-</body>
43
-</html>

+ 60 - 43
WebUI/CallCenterWeb.UI/js/index.js

@@ -188,49 +188,36 @@ $(document).ready(function () {
188 188
         "token": $.cookie("token")
189 189
     }, function (result) {
190 190
         if (result.state.toLowerCase() == "success") {
191
-            if (result.data !== null) {
192
-                $("#RoleCode").val(result.data.user.F_RoleCode);
193
-                $("#GroupCode").val(result.data.user.F_GroupCode);
194
-                //console.log($("#RoleCode").val());
195
-                $(".username").text(result.data.user.F_UserName);
196
-                $('.user_code').text(result.data.user.F_UserCode);
197
-                $('.group').text(result.data.user.F_SeartGroup);
198
-                $(".rolename").text(result.data.user.depname);
199
-    //          if (result.data.role) {
200
-    //              $(".rolename").text(result.data.role.F_RoleName);
201
-    //          }
202
-                $(".yhtx").attr("src", huayi.config.callcenter_url.substr(0, huayi.config.callcenter_url.length - 1) + result.data.user.F_See);
203
-    
204
-                obj.AgentID = result.data.user.F_UserCode;
205
-                //obj.AgentExten = result.data.user.F_WorkNumber;
206
-                $('.mgh').val(result.data.user.F_UserCode);
207
-                $('.mn').val(result.data.user.F_UserName);
208
-                if (result.data.user.F_SeatFlag) {
209
-                    Connect();
210
-                    //heartbeat = setInterval(function() {
211
-                    //	Heart()
212
-                    //}, 60000);
213
-                    $("#top-search").show();
214
-                    $(".phoneBZ").show();
215
-                    $(".zts").show();
216
-                    //签入
217
-                    //obj.Type = "Login";
218
-                    //obj.AgentGroup = "364";
219
-                    //obj.AgentType = "0";
220
-                    //Send();
221
-                }
222
-            } else {
223
-                layer.confirm("授权过期,请联系系统厂家", {
224
-                    btn: ['确定'],
225
-                    yes:function (index, layero) {
226
-                        window.location.href = "login.html";
227
-                    },
228
-                    cancel: function(index, layero){
229
-                        window.location.href = "login.html";
230
-                    }
231
-                });
191
+            $("#RoleCode").val(result.data.user.F_RoleCode);
192
+            $("#GroupCode").val(result.data.user.F_GroupCode);
193
+            //console.log($("#RoleCode").val());
194
+            $(".username").text(result.data.user.F_UserName);
195
+            $('.user_code').text(result.data.user.F_UserCode);
196
+            $('.group').text(result.data.user.F_SeartGroup);
197
+            $(".rolename").text(result.data.user.depname);
198
+//          if (result.data.role) {
199
+//              $(".rolename").text(result.data.role.F_RoleName);
200
+//          }
201
+            $(".yhtx").attr("src", huayi.config.callcenter_url.substr(0, huayi.config.callcenter_url.length - 1) + result.data.user.F_See);
202
+
203
+            obj.AgentID = result.data.user.F_UserCode;
204
+            //obj.AgentExten = result.data.user.F_WorkNumber;
205
+            $('.mgh').val(result.data.user.F_UserCode);
206
+            $('.mn').val(result.data.user.F_UserName);
207
+            if (result.data.user.F_SeatFlag) {
208
+                Connect();
209
+                //heartbeat = setInterval(function() {
210
+                //	Heart()
211
+                //}, 60000);
212
+                $("#top-search").show();
213
+                $(".phoneBZ").show();
214
+                $(".zts").show();
215
+                //签入
216
+                //obj.Type = "Login";
217
+                //obj.AgentGroup = "364";
218
+                //obj.AgentType = "0";
219
+                //Send();
232 220
             }
233
-
234 221
         }
235 222
     });
236 223
     $.ajaxSettings.async = false;
@@ -822,6 +809,8 @@ $(document).ready(function () {
822 809
     })
823 810
     rightUp();
824 811
     setInterval(rightUp, 60000);
812
+    //时限
813
+    timeLimit();
825 814
 })
826 815
 
827 816
 function Adds() {
@@ -1859,4 +1848,32 @@ function Read(signid, e) {
1859 1848
 		});
1860 1849
 }
1861 1850
 //获取知识库消息
1862
-setInterval(getnew,15000)
1851
+setInterval(getnew,15000)
1852
+
1853
+function timeLimit () {
1854
+    $.ajax({
1855
+        type: "get",
1856
+        url: huayi.config.callcenter_url + "Login/GetAuAuthDate",
1857
+        dataType: 'json',
1858
+        async: false,
1859
+        data: {
1860
+            token: $.cookie("token")
1861
+        },
1862
+        success: function(data) {
1863
+            var contentAuthDate = '授权到期时间:' + data.AuthDate  
1864
+            if (parseInt(data.day) < 30) {
1865
+                layer.confirm(contentAuthDate, {
1866
+                    btn: ['确定'],
1867
+                    // yes:function (index, layero) {
1868
+                    //     window.location.href = "login.html";
1869
+                    // },
1870
+                    // cancel: function(index, layero){
1871
+                    //     window.location.href = "login.html";
1872
+                    // }
1873
+                });
1874
+            }
1875
+        }
1876
+    });
1877
+}
1878
+
1879
+var timer = setInterval(timeLimit, 1800000);