ソースを参照

挂断置忙,热点分布,大大屏样式

miaofuhao 6 年 前
コミット
cbb8e1e014
共有5 個のファイルを変更した529 個の追加10 個の削除を含む
  1. 1 2
      WebChartBigNew/css/animation.css
  2. 1 2
      WebChat/html/myTouSu.html
  3. 286 0
      WebUI/CallCenterWeb.UI/Business/spotDist.html
  4. 6 6
      WebUI/CallCenterWeb.UI/js/main.js
  5. 235 0
      WebUI/CallCenterWeb.UI/js/spotDist.js

+ 1 - 2
WebChartBigNew/css/animation.css

@@ -36,9 +36,8 @@
36 36
 .posi_line5{
37 37
 	left: 5970px;  
38 38
 	top: 282px;
39
-	 animation: step2_line 2s linear 8s infinite;
39
+	animation: step2_line 2s linear 8s infinite;
40 40
 }
41
-
42 41
 .step3_line_l {
43 42
     background-image: url(../img/step3_line_l.png);
44 43
     background-repeat: no-repeat;

+ 1 - 2
WebChat/html/myTouSu.html

@@ -62,13 +62,11 @@
62 62
             padding-right: 1px !important;
63 63
             padding-left: 51px !important;
64 64
         }
65
-
66 65
         .ztext {
67 66
             width: 100%;
68 67
             margin: 0;
69 68
             border: 0;
70 69
         }
71
-
72 70
         .action {
73 71
             padding: 11px 15px;
74 72
         }
@@ -236,6 +234,7 @@
236 234
 //      $(document).ready(function () {
237 235
 	 		var townPicker, villagePicker,areaList = [],townList = [],villageList = [],keyList = [];
238 236
             var openid = helper.cookies.get("openid");
237
+            //var openid = "obwtK6JT-bTCeSbtqu4lkw4lIz0o";
239 238
             if (!openid) {
240 239
                 window.location.replace("../html/error.html");
241 240
             }

+ 286 - 0
WebUI/CallCenterWeb.UI/Business/spotDist.html

@@ -0,0 +1,286 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<title>工单报表</title>
7
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+		<script src="../Script/Common/huayi.load.js"></script>
9
+		<script src="../Script/Common/huayi.config.js"></script>
10
+		<link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
11
+		<link href="../css/init.css" rel="stylesheet" />
12
+		<script src="../js/laydate/laydate.js"></script>
13
+		<style>
14
+			.Shows {
15
+				display: block !important;
16
+			}
17
+			.complain {
18
+				display: none;
19
+			}
20
+			
21
+			.daoHang {
22
+				margin-bottom: 15px;
23
+			}
24
+			
25
+			#main1,
26
+			#main2 {
27
+				width: 788.8px;
28
+				margin: 0 auto;
29
+				-webkit-box-shadow: 1px 1px 9px 2px #D2D2D2;
30
+				box-shadow: 1px 1px 9px 2px #D2D2D2;
31
+				background-color: #fff;
32
+				padding: 30px 60px 80px 60px;
33
+			}
34
+			
35
+			.alignC {
36
+				text-align: center;
37
+			}
38
+			
39
+			.alignC h2 {
40
+				font-family: "宋体";
41
+				font-weight: bold;
42
+				font-size: 22pt;
43
+				letter-spacing: -1px;
44
+			}
45
+			
46
+			.headerAlign h3 div:nth-of-type(1) {
47
+				font-size: 14pt;
48
+				padding-top: 20px;
49
+				text-align: left;
50
+				font-weight: normal;
51
+				margin-left: 48px;
52
+			}
53
+			
54
+			#main1 table,
55
+			#main2 table {
56
+				margin: 0 auto;
57
+				width: 600px;
58
+				border-collapse: collapse;
59
+				font-size: 13pt;
60
+				font-family: "仿宋";
61
+			}
62
+			
63
+			#main1 table tr,
64
+			#main2 table tr {
65
+				min-height: 49px;
66
+			}
67
+			
68
+			tbody td {
69
+				min-width: 10%;
70
+				padding: 6px 0 6px 0;
71
+			}
72
+			
73
+			.alignC .tableHead {
74
+				text-align: center;
75
+				padding-left: 10px;
76
+				font-weight: 600;
77
+			}
78
+			
79
+			.alignC tr>td>span {
80
+				display: inline-block;
81
+				min-width: 90px;
82
+			}
83
+			
84
+			.btn {
85
+				margin-top: 4px;
86
+				margin-bottom: 4px;
87
+				background: #00a1cb;
88
+				color: #fff;
89
+			}
90
+			
91
+			.time-box {
92
+				display: inline-block;
93
+				position: relative;
94
+			}
95
+			.toolLeft input {
96
+				padding-right: 30px;
97
+				width: 150px;
98
+			}
99
+			.inpBox {
100
+	           border: 1px solid #cccccc;
101
+	    		height: 31px;
102
+	            width: 220px;
103
+	            display: inline-block;
104
+	            position: relative;
105
+	            vertical-align: middle;
106
+	            position: absolute;
107
+	            left: 0px;
108
+	            top: 5px;
109
+	            z-index: 111;
110
+	        }
111
+			.selDpart1{
112
+				position: absolute;
113
+	            left: 0px;
114
+	            top: 30px;
115
+	            z-index: 11111;
116
+	            width: 220px;
117
+	            line-height: 30px;
118
+	            background: #FFFFFF;
119
+	            display: none;
120
+			}
121
+			#sponsor{
122
+				width: 218px;
123
+				border: 1px solid #00a1cb;
124
+				margin: 0;
125
+				padding: 0;
126
+				list-style: none;
127
+				max-height: 212px;
128
+				overflow-x: hidden;
129
+				overflow-y: scroll;
130
+			}
131
+			#sponsor li{
132
+				margin: 0;
133
+				padding-left: 10px;
134
+				width: 220px;
135
+				height: 30px;
136
+				line-height: 30px;
137
+				list-style: none;
138
+			}
139
+			#sponsor li:hover{
140
+				background: #00a1cb;
141
+			}
142
+	        .addTree {
143
+	            background: #fff;
144
+	            position: absolute;
145
+	            width: 100%;
146
+	            border: 1px solid darkgrey;
147
+	            right: 0;
148
+	            top: 29px;
149
+	            display: none;
150
+	            z-index: 222;
151
+	        }
152
+	
153
+	        .xl {
154
+	            display: inline-block;
155
+	            background: url(../../img/dropDown.png) no-repeat;
156
+	            height: 100%;
157
+	            background-position: center center;
158
+	            width: 20px;
159
+	            position: absolute;
160
+	            right: 0;
161
+	            top: 0px;
162
+	            /* background-color: #f7bc8b; */
163
+	            cursor: pointer;
164
+	        }
165
+	
166
+	        .ztree li span {
167
+	            border: none;
168
+	            padding: 0;
169
+	        }
170
+	
171
+	        .inps {
172
+	            width: 217px !important;
173
+	            height: 29px !important;
174
+	            outline: none;
175
+	            border: 0;
176
+	            border-image-width: 0;
177
+	            padding: 0;
178
+	            padding-left: 3px;
179
+	        }
180
+	
181
+	        .xl {
182
+	            display: inline-block;
183
+	            background: url(../img/dropDown.png) no-repeat;
184
+	            height: 100%;
185
+	            background-position: center center;
186
+	            width: 20px;
187
+	            position: absolute;
188
+	            right: 0;
189
+	            top: 0px;
190
+	            /* background-color: #f7bc8b; */
191
+	            cursor: pointer;
192
+	        }
193
+	
194
+	        .Cleans {
195
+	            display: inline-block;
196
+	            width: 20px;
197
+	            position: absolute;
198
+	            right: 21px;
199
+	            top: 8px;
200
+	            display: none;
201
+	        }
202
+		</style>
203
+	</head>
204
+
205
+	<body class="gray-bg">
206
+		<div class="wrapper wrapper-content animated fadeInRight">
207
+			<div class="daoHang clearfix">
208
+				<div class="dhLeft">
209
+					<sapn>
210
+						<i class="syIcon"></i>位置:
211
+						<a href="javaScript:;" id="ReIndex">首页</a>&gt;
212
+						<a href="javaScript:;">业务统计</a>&gt;
213
+						<a class="nowPosition">工单报表</a>
214
+					</sapn>
215
+				</div>
216
+				<div class="dhRight">
217
+					<a href="" title="刷新"><i class="fa fa-refresh"></i></a>
218
+				</div>
219
+			</div>
220
+
221
+			<div class="Content_box">
222
+				<div class="complain Shows">
223
+					<div class="tab-content">
224
+						<div class="tab-pane fade active in" id="import_from_week">
225
+							<div class="toolBar clearfix">
226
+								<div class="toolLeft">
227
+									<table id="sqzx" style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
228
+	                           	 		<tr>
229
+	                           	 			<th>诉求标题:</th>
230
+			                                <td>
231
+			                                    <input type="text" placeholder="输入关键字" id="key" class="Min-width" />
232
+			                                </td>
233
+			                                <th>工单来源:</th>
234
+			                                <td>
235
+			                                    <select class="select_" id="source"></select>
236
+			                                </td>
237
+											<th>区域:</th>
238
+											<td colspan="7">
239
+					                            <select class="select_" id="sourcearea">
240
+					                            </select>
241
+					                        </td>
242
+					                        <th>时间:</th>
243
+			                                <td >
244
+			                                    <input type="text" id="starttime" class="" placeholder="请选择时间" style="height: 32px;" />
245
+			                                </td>
246
+			                                <th>主办单位:</th>
247
+			                                <td style="position: relative; width: 220px;">
248
+			                                    <div class="inpBox">
249
+			                                        <input type="text" class="inps" onkeyup="darptSearch()"/>
250
+			                                        <i class="Cleans  fa fa-close"></i>
251
+			                                        <i class="xl xl_one"></i>
252
+			                                        <div class="addTree xlAdd">
253
+			                                            <ul id="addTreeDemo" class="ztree"></ul>
254
+			                                        </div>
255
+			                                    </div>
256
+			                                    <div class="selDpart1">
257
+			                                    	<ul id="sponsor">
258
+													</ul>
259
+			                                    </div>
260
+			                                </td>
261
+			                                <td style="text-align: right;">
262
+		                            			<botton class="btns Seach">搜索</botton>
263
+		                            		</td>
264
+			                            </tr>
265
+		                           	</table>
266
+								</div>
267
+							</div>
268
+							<div style="width:1000px">
269
+				                <div id="allmap" style="width:100%;height:400px;"></div>
270
+				                <input type="hidden" class="store_Lng" value="115.659773"/>
271
+        						<input type="hidden" class="store_Lat" value="34.395449" />
272
+				            	<input type="hidden" id="PID" />
273
+    							<input type="hidden" id="Dpment" />
274
+							</div>
275
+						</div>
276
+					</div>
277
+				</div>
278
+			</div>
279
+		</div>
280
+		<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=SyRux96r0i0Xue1Qqp0ZPb4uCc8BC6Aw"></script>
281
+		<script src="../js/laydate/laydate.js"></script>
282
+		<script src="../js/zTree/jquery.ztree.core.js"></script>
283
+		<script src="../js/spotDist.js"></script> 
284
+	</body>
285
+
286
+</html>

+ 6 - 6
WebUI/CallCenterWeb.UI/js/main.js

@@ -260,7 +260,6 @@ function IncomingBack(data) {
260 260
     $(".ldtime").text(getNowFormatDate());
261 261
     $(".thsc").text("00:00");
262 262
     $(".hidCallID").val(data.CallID);
263
-	debugger
264 263
     //获取电话所属地
265 264
     $.getJSON(huayi.config.callcenter_url + 'CallInScreen/GetPhoneLocation', {
266 265
         "tel": $(".hidTel").val(),
@@ -312,11 +311,17 @@ function IncomingBack(data) {
312 311
 
313 312
 //挂断
314 313
 function DropCallBack() {
314
+	debugger
315 315
     $("#top-search li i").removeClass("active");
316 316
     $(".Logout").addClass("active");
317 317
     $(".SayBusy").addClass("active");
318 318
     $(".MakeCall").addClass("active");
319 319
     $(".td-call").hide();
320
+    $(".hwzt").text('忙碌');
321
+	$("#isml").val(1);
322
+    SetStateCookie(1);
323
+    obj.Type = "SayBusy";
324
+    Send();
320 325
     //$('.ldtp-con').css("display", 'none');
321 326
 }
322 327
 //线路状态通知
@@ -390,7 +395,6 @@ function LineStateAgentBack(data) {
390 395
         }
391 396
     }
392 397
     if (data.State == '6') {
393
-    	debugger
394 398
         $(".hwzt").text('通话中'); //左下角状态显示
395 399
         $(".fwzt").removeClass("bl").addClass("br");
396 400
         $(".zxzt").removeClass("bl").addClass("br");
@@ -645,13 +649,9 @@ function RecordPathBack(data) {
645 649
     }
646 650
 }
647 651
 
648
-
649
-
650
-
651 652
 //在线坐席信息
652 653
 function GetAgentListBack(data) {
653 654
     console.log(data)
654
-    debugger
655 655
     $.ajax({
656 656
         type: "get",
657 657
         url: huayi.config.callcenter_url + "SeatMonitoring/GetAgentList",

+ 235 - 0
WebUI/CallCenterWeb.UI/js/spotDist.js

@@ -0,0 +1,235 @@
1
+// 百度地图API功能
2
+var map = new BMap.Map("allmap");
3
+var point = new BMap.Point(114.090325, 32.129247);
4
+var pointArray = new Array();
5
+var json_data;
6
+var opts = {
7
+	width: 250, // 信息窗口宽度
8
+	height: 80, // 信息窗口高度
9
+	title: "", // 信息窗口标题
10
+	enableMessage: true //设置允许信息窗发送短息
11
+};
12
+$(document).ready(function () {
13
+     //日期
14
+	laydate.render({
15
+	    elem: '#starttime', //指定元素
16
+	    range:'~'
17
+	});    
18
+	QY();
19
+	LY();
20
+	throungh();
21
+	tree();
22
+	$(".Seach").click(function() {
23
+		throungh();
24
+	})
25
+});
26
+
27
+//搜索开始
28
+//区域
29
+function QY() {
30
+    $("#sourcearea").empty();
31
+    //$("#sourcearea").append('<option selected="selected" value="">请选择</option>');
32
+    $.getJSON(huayi.config.callcenter_url + "Area/GetAreaListById", {
33
+        "token": $.cookie("token"),
34
+    }, function (data) {
35
+        if (data.state.toLowerCase() == "success") {
36
+            var content = data.data;
37
+            $(content).each(function (i, n) {
38
+                if (n.F_AreaName != '商丘市') {
39
+                    $("<option value='" + n.F_AreaId + "'>" + n.F_AreaName + "</option>").appendTo("#sourcearea");
40
+                }
41
+            })
42
+        }
43
+    })
44
+}
45
+//来源
46
+function LY() {
47
+    $("#source").empty();
48
+    $("#source").append('<option selected="selected" value="">请选择</option>');
49
+    $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
50
+        "token": $.cookie("token"),
51
+        id: 1
52
+    }, function (data) {
53
+        if (data.state.toLowerCase() == "success") {
54
+            var content = data.data;
55
+            $(content).each(function (i, n) {
56
+                $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo("#source");
57
+            })
58
+        }
59
+    })
60
+}
61
+//所属分类下拉
62
+$('.inps').focus(function () {
63
+    $('.xlAdd').css('display', 'block')
64
+})
65
+$('.xl').click(function () {
66
+    if ($('.xlAdd').css('display') == 'block') {
67
+        $('.xlAdd').css('display', 'none')
68
+    } else {
69
+        $('.xlAdd').css('display', 'block')
70
+    }
71
+})
72
+$('.addTree').mouseleave(function () {
73
+    $(this).css('display', 'none')
74
+})
75
+//清除
76
+$(".Cleans ").click(function () {
77
+    $('.inps').val("");
78
+    $("#PID").val("");
79
+    $("#Dpment").val("");
80
+})
81
+function tree() {
82
+    $.get(huayi.config.callcenter_url + 'Department/GetDeptList', {
83
+        "token": $.cookie("token"),
84
+        //		"pid": pid
85
+    }, function (result) {
86
+        result = $.parseJSON(result);
87
+        $.fn.zTree.init($("#addTreeDemo"), setting1, result.data); //实例化树形图
88
+    });
89
+}
90
+var setting1 = {
91
+    data: {
92
+        key: {
93
+            name: "F_DeptName"
94
+        },
95
+        simpleData: {
96
+            enable: true,
97
+            idKey: "F_DeptId",
98
+            pIdKey: "F_PartentId",
99
+            rootPId: 0
100
+        }
101
+    },
102
+    callback: {
103
+        onClick: zTreeOnClick
104
+    }
105
+};
106
+function zTreeOnClick(event, treeId, treeNode) {
107
+    if (treeNode.level >= 2) {
108
+        $('.inps').val(treeNode.F_DeptName);
109
+        $("#PID").val(treeNode.F_DeptId);
110
+        $("#Dpment").val(treeNode.F_DeptId);
111
+        $(".Cleans").show();
112
+    }
113
+};
114
+function Close() {
115
+    $(".lyxz").removeClass("cx");
116
+    if ($('audio').length > 0) {
117
+        $('audio')[0].pause();
118
+    }
119
+}
120
+function darptSearch() {
121
+	$('.xlAdd').css('display', 'none');
122
+	$(".selDpart1").css('display', 'block');
123
+	depart();
124
+}
125
+$("#sponsor").on('click', 'li', function() {
126
+	$(".selDpart1").css('display', 'none');
127
+	$(".inps").val($(this).html());
128
+	$("#Dpment").val($(this).attr("index"));
129
+	$(".Cleans").show();
130
+})
131
+///部门
132
+function depart() {
133
+	$("#sponsor").empty();
134
+	$.getJSON(huayi.config.callcenter_url + "Department/GetDeptListByDept", {
135
+		"token": $.cookie("token"),
136
+		dept: $('.inps').val(),
137
+	}, function(data) {
138
+		if(data.state.toLowerCase() == "success") {
139
+			var content = data.data;
140
+			$(content).each(function(i, n) {
141
+				$("<li index='" + n.F_DeptId + "'>" + n.F_DeptName + "</li>").appendTo("#sponsor");
142
+			})
143
+		}
144
+	})
145
+}
146
+
147
+
148
+
149
+function throungh() {
150
+	$.ajax({
151
+		type: "get",
152
+		url: huayi.config.callcenter_url + "WorkOrderReport/GetHotspotMap",
153
+		async: false,
154
+		dataType: 'json',
155
+		data: {
156
+			token: $.cookie("token"),
157
+			start:$('#starttime').val() && $('#starttime').val().split(' ~ ')[0], //=开始时间
158
+			end:$('#starttime').val() && $('#starttime').val().split(' ~ ')[1], //=结束时间
159
+			deptid: $("#Dpment").val(),
160
+			keyid:$("#key").val(),
161
+			sourcearea:$('#sourceAreas').val(),
162
+			source:$("#source").val()
163
+		},
164
+		success: function(result) {
165
+			if(result.state.toLowerCase() == "success") {
166
+				json_data = result.data;
167
+				for(var i = 0; i < json_data.length; i++) {
168
+					var marker = new BMap.Marker(new BMap.Point(json_data[i][0], json_data[i][1])); // 创建点
169
+					map.addOverlay(marker); //增加点
170
+					pointArray[i] = new BMap.Point(json_data[i][0], json_data[i][1]);
171
+					var content = json_data[i][2];
172
+					addClickHandler(content, marker);
173
+					//让所有点在视野范围内
174
+					map.setViewport(pointArray);
175
+				}
176
+				console.log(json_data)
177
+			}
178
+		}
179
+	})
180
+}
181
+function mapLoad(){
182
+	map.centerAndZoom(point, 15);
183
+	map.enableScrollWheelZoom(true); //开启鼠标滚轮缩放
184
+}
185
+$('#sourcearea').change(function(obj) {
186
+	if($('#sourcearea').val() == "") {
187
+		alert("请选择省市区");
188
+		return;
189
+	}
190
+	var address = '河南省商丘' + $('#sourcearea').find("option:selected").text();;
191
+	//var address = '河南省商丘市睢阳区'
192
+	if(address != "") {
193
+		var city = '商丘市';
194
+		// 创建地址解析器实例
195
+		var myGeo = new BMap.Geocoder();
196
+		myGeo.getPoint(address, function(point) {
197
+			if(point) {
198
+				//定位到区 ,级别显示12
199
+				map.centerAndZoom(point, 12);
200
+				//删除选点
201
+				map.clearOverlays();
202
+				for(var i = 0; i < json_data.length; i++) {
203
+					var marker = new BMap.Marker(new BMap.Point(json_data[i][0], json_data[i][1])); // 创建点
204
+					map.addOverlay(marker); //增加点
205
+					pointArray[i] = new BMap.Point(json_data[i][0], json_data[i][1]);
206
+					var content = json_data[i][2];
207
+					addClickHandler(content, marker);
208
+				}
209
+			} else {
210
+				// alert("您选择地址没有解析到结果!");
211
+			}
212
+		}, city);
213
+	}
214
+});
215
+
216
+
217
+
218
+function addClickHandler(content, marker) {
219
+	marker.addEventListener("click", function(e) {
220
+		openInfo(content, e)
221
+	});
222
+}
223
+
224
+function openInfo(content, e) {
225
+	var p = e.target;
226
+	var point = new BMap.Point(p.getPosition().lng, p.getPosition().lat);
227
+	var infoWindow = new BMap.InfoWindow(content, opts); // 创建信息窗口对象 
228
+	map.openInfoWindow(infoWindow, point); //开启信息窗口
229
+}
230
+
231
+//移动到某一坐标点
232
+function to(x, y) {
233
+	map.panTo(new BMap.Point(x, y));
234
+
235
+}