zhaomin 4 lat temu
rodzic
commit
3bd5c3b66a
38 zmienionych plików z 1738 dodań i 171 usunięć
  1. 1 0
      WebUI/CallCenterWeb.UI/Script/Common/huayi.config.js
  2. 5 0
      WebUI/CallCenterWeb.UI/Script/Common/huayi.http.js
  3. 4 4
      WebUI/CallCenterWeb.UI/TelCall/numberHome.html
  4. 99 0
      WebUI/CallCenterWeb.UI/accessManagement/afterDischargeCallDetail.html
  5. 18 3
      WebUI/CallCenterWeb.UI/accessManagement/js/afterDischarge.js
  6. 168 0
      WebUI/CallCenterWeb.UI/accessManagement/js/afterDischargeCallDetail.js
  7. 45 5
      WebUI/CallCenterWeb.UI/css/chat.css
  8. 3 0
      WebUI/CallCenterWeb.UI/equipmentOperationManage/equipmentRepair.html
  9. 108 9
      WebUI/CallCenterWeb.UI/equipmentOperationManage/js/equipmentRepair.js
  10. 55 33
      WebUI/CallCenterWeb.UI/equipmentOperationManage/js/warrantyWorkOrder.js
  11. 20 1
      WebUI/CallCenterWeb.UI/index.html
  12. 208 55
      WebUI/CallCenterWeb.UI/js/chat.js
  13. 42 42
      WebUI/CallCenterWeb.UI/js/index.js
  14. 2 0
      WebUI/CallCenterWeb.UI/js/layer/layer.js
  15. BIN
      WebUI/CallCenterWeb.UI/js/layer/theme/default/icon-ext.png
  16. BIN
      WebUI/CallCenterWeb.UI/js/layer/theme/default/icon.png
  17. 1 0
      WebUI/CallCenterWeb.UI/js/layer/theme/default/layer.css
  18. BIN
      WebUI/CallCenterWeb.UI/js/layer/theme/default/loading-0.gif
  19. BIN
      WebUI/CallCenterWeb.UI/js/layer/theme/default/loading-1.gif
  20. BIN
      WebUI/CallCenterWeb.UI/js/layer/theme/default/loading-2.gif
  21. 15 15
      WebUI/CallCenterWeb.UI/js/main.js
  22. 4 4
      WebUI/CallCenterWeb.UI/login.html
  23. 2 0
      WebUI/CallCenterWeb.UI/phoneClientManage/template/addApplicationUpdate.html
  24. 63 0
      zyChat/chat.html
  25. 482 0
      zyChat/css/chat.css
  26. BIN
      zyChat/img/back.png
  27. BIN
      zyChat/img/kefuTx.png
  28. 15 0
      zyChat/index.html
  29. 341 0
      zyChat/js/chat.js
  30. 6 0
      zyChat/js/jquery.min.js
  31. 2 0
      zyChat/js/layer/layer.js
  32. BIN
      zyChat/js/layer/theme/default/icon-ext.png
  33. BIN
      zyChat/js/layer/theme/default/icon.png
  34. 1 0
      zyChat/js/layer/theme/default/layer.css
  35. BIN
      zyChat/js/layer/theme/default/loading-0.gif
  36. BIN
      zyChat/js/layer/theme/default/loading-1.gif
  37. BIN
      zyChat/js/layer/theme/default/loading-2.gif
  38. 28 0
      zyChat/script/huayi.config.js

+ 1 - 0
WebUI/CallCenterWeb.UI/Script/Common/huayi.config.js

@@ -5,6 +5,7 @@ huayi.config = {
5 5
 	//测试环境
6 6
 	callcenter_url: "http://192.168.5.46:28000/", // 后端API站IP和端口
7 7
 	call_url:"http://192.168.1.26:8082/",  //话务IP和端口
8
+	img_url:"http://192.168.5.46/",
8 9
 	//callcenter_url: "http://localhost:63651/",
9 10
 	socket_ip: "192.168.8.7", // WebSocket通讯ip192.168.5.41
10 11
 	socket_port: "8081", // WebSocket通讯端口

+ 5 - 0
WebUI/CallCenterWeb.UI/Script/Common/huayi.http.js

@@ -1342,6 +1342,11 @@ helper.init = {
1342 1342
 				layer.close(loadindex);
1343 1343
 			}
1344 1344
 		}).on("ajaxError", function(event, xhr, options, exc) {
1345
+//			layer.confirm(xhr.status+'网络繁忙,请稍后再试...', {
1346
+//				icon: 7,
1347
+//				closeBtn: 0,
1348
+//				btn: ['确定'] //按钮
1349
+//			});
1345 1350
 			if(xhr.status == 401) {
1346 1351
 				top.window.location.href = "./login.html";
1347 1352
 				return;

+ 4 - 4
WebUI/CallCenterWeb.UI/TelCall/numberHome.html

@@ -42,10 +42,10 @@
42 42
 						<tr>
43 43
 							<th data-field="" data-checkbox="true"></th>
44 44
 							<th data-field=""  data-align="center" data-formatter="formatterNum">编号</th>
45
-							<th data-field="mobilenum" data-align="center">号段</th>
46
-							<th data-field="zipcode" data-align="center">区号</th>
47
-							<th data-field="citydes" data-align="center">城市</th>
48
-							<th data-field="carddes" data-align="center">卡类型</th>
45
+							<th data-field="F_MobileNum" data-align="center">号段</th>
46
+							<th data-field="F_ZipCode" data-align="center">区号</th>
47
+							<th data-field="F_CityDes" data-align="center">城市</th>
48
+							<th data-field="F_CardDes" data-align="center">卡类型</th>
49 49
 
50 50
 						</tr>
51 51
 					</thead>

+ 99 - 0
WebUI/CallCenterWeb.UI/accessManagement/afterDischargeCallDetail.html

@@ -0,0 +1,99 @@
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 href="../css/init.css" rel="stylesheet" />
11
+		<link href="../css/Table/table1.css" rel="stylesheet" />
12
+		<style type="text/css">
13
+			.shade_k {
14
+				z-index: 10005;
15
+				width: 50%;
16
+				margin: 10% auto;
17
+				background-color: #fff;
18
+				box-shadow: 1px 1px 50px rgba(0, 0, 0, .3);
19
+				border-radius: 5px;
20
+			}
21
+			
22
+			.shade_title {
23
+				padding: 0 80px 0 20px;
24
+				height: 42px;
25
+				line-height: 42px;
26
+				border-bottom: 1px solid #eee;
27
+				font-size: 16px;
28
+				color: #FFFFFF;
29
+				overflow: hidden;
30
+				background-color: #249fea;
31
+				border-radius: 2px 2px 0 0;
32
+				position: relative;
33
+			}
34
+			
35
+			.shade_content {
36
+				padding: 10px;
37
+			}
38
+			
39
+			.tool_bars a {
40
+				padding-top: 8px;
41
+				padding-bottom: 8px;
42
+			}
43
+		</style>
44
+	</head>
45
+
46
+	<body>
47
+		<div class="daoHang clearfix">
48
+			<div class="dhLeft">
49
+				<sapn><i class="syIcon"></i>位置:
50
+					<a id="ReIndex" href="javaScript:;">首页</a>&gt;
51
+					<a href="javaScript:;">随访管理</a>&gt;
52
+					<a href="javascript:location.reload()" class="now_position">出院患者随访记录</a>
53
+				</sapn>
54
+			</div>
55
+		</div>
56
+		<div class="Content_box">
57
+			<div class="complain Shows">
58
+				<div style="width: 100%;padding: 10px;">
59
+					<table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
60
+						<thead>
61
+							<tr>
62
+								<th data-field="CallNumber" data-align="center" data-formatter="Code">编号</th>
63
+								<th data-field="CallNumber" data-align="center">电话号码</th>
64
+								<th data-field="FilePath" data-formatter="setCode" data-align="center">录音</th>
65
+								<th data-field="CallType" data-formatter="callType" data-align="center">呼叫方向</th>
66
+								<th data-field="CallState" data-formatter="states" data-align="center">呼叫状态</th>
67
+								<th data-field="UserCode" data-align="center">坐席工号</th>
68
+								<th data-field="UserName" data-align="center">坐席姓名</th>
69
+								<th data-field="TalkStartTime" data-align="center">通话开始时间</th>
70
+								<th data-field="TalkEndTime" data-align="center">通话结束时间</th>
71
+								<th data-field="TalkLongTime" data-align="center">通话时长(S)</th>
72
+							</tr>
73
+						</thead>
74
+					</table>
75
+				</div>
76
+			</div>
77
+		</div>
78
+		<!--下载框-->
79
+		<div class="t-shade">
80
+			<div class="shade_k">
81
+				<div class="shade_title">
82
+					<span>录音播放与下载<srong class="cknum"></srong></span>
83
+					<span class="setwin"><a>x</a></span>
84
+				</div>
85
+				<div class="shade_content">
86
+					<div class="Ly_box audiojs">
87
+					</div>
88
+
89
+				</div>
90
+			</div>
91
+		</div>
92
+	</body>
93
+	<script src="../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script>
94
+	<script src="../Script/Common/regexs.js"></script>
95
+	<script src="../js/autosize/autosize.min.js"></script>
96
+	<script src="../js/audiojs/audio.min.js"></script>
97
+	<script src="./js/afterDischargeCallDetail.js" type="text/javascript" charset="utf-8"></script>
98
+
99
+</html>

+ 18 - 3
WebUI/CallCenterWeb.UI/accessManagement/js/afterDischarge.js

@@ -263,13 +263,17 @@ function projectName() {
263 263
 
264 264
 //格式化操作
265 265
 function formatterOperate(val, row) {
266
+	console.log(row.PAT_PHONE)
267
+	
266 268
 	if(f_State == "门诊患者") {
267 269
 		{
268 270
 			var str = '<ul class="tool_downs">' +
269 271
 				'<li><a class="aBtn" authorize="yes" id="HY_discharge_' + row.id + '" onclick="btn_myd(\'' + row.id +
270 272
 				'\')">满意度</a><li>' +
271 273
 				'<li><a class="aBtn" authorize="yes" id="HY_remarks_' + row.id + '" onclick="btn_remark(\'' + row.id +
272
-				'\')">备注</a><li>'
274
+				'\')">备注</a><li>'+
275
+				'<li id="callDetail"><a class="aBtn" authorize="yes" id="HY_callDetail_' + row.id + '" onclick="btn_callDetail(\'' +
276
+				row.PAT_PHONE +'\')">通话详情</a><li>'+
273 277
 			'</ul>';
274 278
 			return str
275 279
 		}
@@ -281,8 +285,11 @@ function formatterOperate(val, row) {
281 285
 				'<li><a class="aBtn" authorize="yes" id="HY_remarks_' + row.id + '" onclick="btn_remark(\'' + row.id +
282 286
 				'\')">备注</a><li>' +
283 287
 				'<li id="detail"><a class="aBtn" authorize="yes" id="HY_detail_' + row.id + '" onclick="btn_detail(\'' +
284
-				row.id +
285
-				'\')">详情</a><li>'
288
+				row.id +'\')">详情</a><li>'+
289
+				'<li id="detail"><a class="aBtn" authorize="yes" id="HY_detail_' + row.id + '" onclick="btn_callDetail(\'' +
290
+				row.PAT_PHONE +'\')">通话详情</a><li>'+
291
+//				'<li id="callDetail"><a class="aBtn" authorize="yes" id="HY_callDetail_' + row.id + '" onclick="btn_callDetail(\'' +
292
+//				row.PAT_PHONE +'\')">通话详情</a><li>'+
286 293
 			'</ul>';
287 294
 			return str
288 295
 		}
@@ -348,6 +355,14 @@ function btn_detail(detail_id) {
348 355
 		area: ['50%', '65%'], //宽高
349 356
 	});
350 357
 }
358
+function btn_callDetail(phone){
359
+	layer.open({
360
+		type: 2,
361
+		content: "./afterDischargeCallDetail.html?detail_phone=" + phone,
362
+		title: '出院患者记录详细信息',
363
+		area: ['50%', '65%'], //宽高
364
+	});
365
+}
351 366
 // 备注
352 367
 function btn_remark(remark_id) {
353 368
 	layer.open({

+ 168 - 0
WebUI/CallCenterWeb.UI/accessManagement/js/afterDischargeCallDetail.js

@@ -0,0 +1,168 @@
1
+var phone = helper.request.queryString("detail_phone");
2
+var seatlist = [];
3
+$(document).ready(function() {
4
+//	$('.tool_bars').authorizeButton();
5
+//	/*获取选中行对象*/
6
+//	$('#list').on("click-row.bs.table", function(e, row, ele) {
7
+//		$('.success').removeClass('success'); //去除之前选中的行的,选中样式
8
+//		$(ele).addClass('success'); //添加当前选中的 success样式用于区别
9
+//	});
10
+	$(".setwin").click(function() {
11
+		$(".t-shade").removeClass("cx");
12
+		$('audio')[0].pause();
13
+	});
14
+//	getSeatList();
15
+//	//搜索
16
+//	$("#sc_btns").click(function() {
17
+//		// if(!regexs.phone.test($.trim($("#tel").val()))) {
18
+//		// 	layer.confirm('请输入有效的电话号码', {
19
+//		// 		icon: 2,
20
+//		// 		btn: ['确定'] //按钮
21
+//		// 	});
22
+//		// 	return;
23
+//		// }
24
+//		initTable();
25
+//	});
26
+//	laydate.render({
27
+//		elem: '#ss_kssj',
28
+//		theme: '#249fea',
29
+//	});
30
+//	laydate.render({
31
+//		elem: '#ss_jssj',
32
+//		theme: '#249fea',
33
+//	});
34
+	initTable();
35
+})
36
+
37
+function initTable() {
38
+	//先销毁表格
39
+	$('#list').bootstrapTable('destroy');
40
+	//初始化表格,动态从服务器加载数据
41
+	$("#list").bootstrapTable({
42
+		method: "get", //使用get请求到服务器获取数据
43
+		url: huayi.config.call_url + "Callrecords/GetoneList", //获取数据的Servlet地址
44
+		async: true,
45
+		striped: true, //表格显示条纹
46
+		pagination: true, //启动分页
47
+		pageSize: 10, //每页显示的记录数
48
+		pageNumber: 1, //当前第几页
49
+		pageList: [10, 20, 50, 100], //记录数可选列表
50
+		search: false, //是否启用查询
51
+		showColumns: false, //显示下拉框勾选要显示的列
52
+		showRefresh: false, //显示刷新按钮
53
+		sidePagination: "server", //表示服务端请求
54
+		//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
55
+		//设置为limit可以获取limit, offset, search, sort, order
56
+		queryParamsType: "undefined",
57
+		queryParams: function queryParams(params) { //设置查询参数
58
+			var param = {
59
+				page: params.pageNumber,
60
+				pagesize: params.pageSize,
61
+				token: window.localStorage.getItem('token')
62
+			};
63
+			param.phone = phone;
64
+			return param;
65
+		},
66
+		onLoadSuccess: function(res) { //加载成功时执行
67
+			console.log(res);
68
+			//layer.msg("加载成功");
69
+		},
70
+		onLoadError: function() { //加载失败时执行
71
+			//layer.msg("加载数据失败", { time: 1500, icon: 2 });
72
+		}
73
+	});
74
+}
75
+
76
+//音频
77
+function setCode(val) {
78
+	if(val) {
79
+		return '<div class="imgs">' +
80
+			'<img src="../img/vice.png" alt="" onclick= ck(this) item="' + val + '" />' +
81
+			'</div>';
82
+	} else {
83
+		return '';
84
+	}
85
+}
86
+//编号
87
+function Code(val, row, index) {
88
+	return index + 1;
89
+}
90
+//方向呼出
91
+function callType(val) {
92
+	if(val == 0) {
93
+		return '<div class="imgs">呼入</div>';
94
+	} else {
95
+		return '<div class="imgs">呼出</div>';
96
+	}
97
+}
98
+
99
+function states(val) {
100
+	if(val == 0) {
101
+		return '<div class="imgs">未接通</div>';
102
+	} else {
103
+		return '<div class="imgs">已接通</div>';
104
+	}
105
+}
106
+//回访
107
+function dealType(val) {
108
+	if(val == 1) {
109
+		return '<div >已回访</div>';
110
+	} else {
111
+		return '';
112
+	}
113
+}
114
+//处理
115
+function isDeal(val) {
116
+	if(val == 0) {
117
+		return '<div >未处理</div>';
118
+	} else {
119
+		return '<div >已处理</div>';
120
+	}
121
+}
122
+//录音
123
+function ck(val) {
124
+	var path = $(val).attr("item");
125
+	$(".t-shade").addClass("cx");
126
+	$(".Ly_box").empty();
127
+	$('<audio  style="width:100%;"class=" " src="' + path + '" loop="loop" controls="controls"></audio>').appendTo(".Ly_box");
128
+}
129
+
130
+////导出
131
+//function btn_export() {
132
+//	dcexcel(this);
133
+//}
134
+//
135
+//function dcexcel(obj) {
136
+//	var a = $("#department").val()
137
+//	if(a) {
138
+//
139
+//	} else {
140
+//		a = '';
141
+//
142
+//	}
143
+//	var url = huayi.config.call_url + "Callrecords/GetListExpt";
144
+//	url += "&usercode=" + $("#seat").val() +
145
+//		"&phone=" + $("#tel").val() +
146
+//		"&callstate=" + $("#ss_hjzt").val() +
147
+//		"&calltype=" + $("#ss_hcfx").val() +
148
+//		"&starttime=" + $("#ss_kssj").val() +
149
+//		"&endtime=" + $("#ss_jssj").val() +
150
+//		"&dept=" + a +
151
+//		"&username=" + $("#ss_zxxm").val();
152
+//	obj.href = url;
153
+//}
154
+//
155
+////获取坐席下拉列表
156
+//function getSeatList() {
157
+//	$.getJSON(huayi.config.call_url + "UserAccount/GetSeatList", {}, function(result) {
158
+//		if(result.state.toLowerCase() == "success") {
159
+//			var seatlist = result.data;
160
+//			$("#seat").empty();
161
+//			$("#seat").append('<option value=" ">请选择坐席工号</option>');
162
+//			$(seatlist).each(function(i, n) {
163
+//				$("#seat").append('<option value="' + n.F_UserCode + '">' + n.F_UserCode + '(' + n.F_UserName + ')' + '</option>');
164
+//			})
165
+//			$('#seat').selectpicker('refresh');
166
+//		}
167
+//	});
168
+//}

+ 45 - 5
WebUI/CallCenterWeb.UI/css/chat.css

@@ -233,7 +233,7 @@ li {
233 233
 	border-radius: 3px;
234 234
 }
235 235
 
236
-.main_message .message_text {
236
+.main_message .message_text ,.message_img{
237 237
 	display: inline-block;
238 238
 	position: relative;
239 239
 	padding: 0 10px;
@@ -246,8 +246,11 @@ li {
246 246
 	background-color: #fafafa;
247 247
 	border-radius: 4px;
248 248
 }
249
+.message_img{
250
+	background-color: rgba(255,255,255,0);
251
+}
249 252
 
250
-.main_message .message_text:before {
253
+.main_message .message_text:before,.message_img:before {
251 254
 	content: " ";
252 255
 	position: absolute;
253 256
 	top: 9px;
@@ -266,14 +269,15 @@ li {
266 269
 }
267 270
 
268 271
 .main_message .self .message_text {
269
-	background-color: #b2e281;
272
+	margin: 10px 0;
273
+	/* background-color: #b2e281; */
270 274
 }
271 275
 
272
-.main_message .self .message_text:before {
276
+.main_message .self .message_text:before,.message_img:before {
273 277
 	right: inherit;
274 278
 	left: 100%;
275 279
 	border-right-color: transparent;
276
-	border-left-color: #b2e281;
280
+	/* border-left-color: #b2e281; */
277 281
 }
278 282
 
279 283
 .main_sendMessage {
@@ -427,3 +431,39 @@ li {
427 431
 .con li:hover{
428 432
 	background-color: rgb(36,159,234);
429 433
 }
434
+#preview{
435
+	position: absolute;
436
+	top: 7px;
437
+	left: 10px;
438
+}
439
+.message_img img{
440
+	width: 135px;
441
+	height: 115px;
442
+	background-size: 100% 100%;
443
+	background-repeat: no-repeat;
444
+	background-position: center;
445
+}
446
+.imgDetial{
447
+	background-color: rgb(72,72,72);
448
+	width: 100%;
449
+	height: 100%;
450
+	position: absolute;
451
+	top: 0;
452
+	left: 0;
453
+	z-index: 1000000;
454
+	display: none;
455
+	text-align: center;
456
+	padding: 50px 0;
457
+	overflow: auto;
458
+	box-sizing: border-box;
459
+	opacity: 0.95;
460
+}
461
+.closeIcon{
462
+	font-size: 50px;
463
+	color: #fff;
464
+	position: absolute;
465
+	top: 25px;
466
+	right: 25px;
467
+	cursor: pointer;
468
+	display: inline-block;
469
+}

+ 3 - 0
WebUI/CallCenterWeb.UI/equipmentOperationManage/equipmentRepair.html

@@ -130,6 +130,9 @@
130 130
 						已转派
131 131
 						<span class="audit_yqxcounts">0</span>
132 132
 					</li>
133
+					<li data-index="9">
134
+						超时工单
135
+					</li>
133 136
 				</ul>
134 137
 			</div>
135 138
 

+ 108 - 9
WebUI/CallCenterWeb.UI/equipmentOperationManage/js/equipmentRepair.js

@@ -2,6 +2,7 @@
2 2
  * 报修平台
3 3
  * */
4 4
 var $storages = window.localStorage;
5
+var $tableLeft;
5 6
 var state = ''; // state tab页的 data-index(工单状态参数);
6 7
 var f_State = ''
7 8
 $(document).ready(function() {
@@ -17,8 +18,12 @@ $(document).ready(function() {
17 18
 	$('#tab_head_left li').click(function() {
18 19
 		$(this).addClass('tab_head_active').siblings().removeClass('tab_head_active');
19 20
 		state = $(this).attr('data-index');
20
-		f_State = state
21
-		initTable1();
21
+		if(state!=9){
22
+			f_State = state;
23
+			initTable1();
24
+		}else{
25
+			initTable();
26
+		}
22 27
 	})
23 28
 	//时间
24 29
 	laydate.render({
@@ -122,8 +127,6 @@ function getdept() {
122 127
 }
123 128
 
124 129
 function initTable1() {
125
-
126
-
127 130
 	//先销毁表格
128 131
 	$('#table1').bootstrapTable('destroy');
129 132
 	//初始化表格,动态从服务器加载数据
@@ -269,7 +272,105 @@ function initTable1() {
269 272
 		}
270 273
 	});
271 274
 }
272
-
275
+function initTable(){
276
+	//先销毁表格
277
+	$tableLeft = $('#table1');
278
+	$tableLeft.bootstrapTable('destroy');
279
+	//初始化表格,动态从服务器加载数据
280
+	$tableLeft.bootstrapTable({
281
+		method: "get", //使用get请求到服务器获取数据
282
+		url: huayi.config.callcenter_url + "equipmentapi/api/worepairbase/getcswocodelist", //获取数据的Servlet地址
283
+		contentType: "application/x-www-form-urlencoded",
284
+		striped: true, //表格显示条纹
285
+		pagination: true, //启动分页
286
+		pageSize: 10, //每页显示的记录数
287
+		pageNumber: 1, //当前第几页
288
+		pageList: [10, 20, 50, 100], //记录数可选列表
289
+		search: false, //是否启用查询
290
+		showColumns: false, //显示下拉框勾选要显示的列
291
+		showRefresh: false, //显示刷新按钮
292
+		sidePagination: "server", //表示服务端请求
293
+	
294
+		//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
295
+		//设置为limit可以获取limit, offset, search, sort, order
296
+		queryParamsType: "undefined",
297
+		queryParams: function queryParams(params) { //设置查询参数
298
+			var param = {
299
+				pageindex: params.pageNumber,
300
+				pagesize: params.pageSize,
301
+				stime: $('#startTime').val() && $('#startTime').val().split(' ~ ')[0], //开始时间
302
+				etime: $('#startTime').val() && $('#startTime').val().split(' ~ ')[1], //结束时间
303
+			};
304
+			return param;
305
+		},
306
+		responseHandler: function(res) {
307
+			//格式化数据
308
+			return {
309
+				"total": res.data && res.data.total, //总页数
310
+				"rows": res.data && res.data.rows, //数据
311
+				"totalcounts": res.data && res.data.totalcounts,
312
+				"wzpcounts": res.data && res.data.wzpcounts,
313
+				"yjdcounts": res.data && res.data.yjdcounts,
314
+				"dpjcounts": res.data && res.data.dpjcounts,
315
+				"ywjcounts": res.data && res.data.ywjcounts,
316
+				"ygqcounts": res.data && res.data.ygqcounts,
317
+				"yqxcounts": res.data && res.data.yqxcounts,
318
+			};
319
+		},
320
+		onPostBody: function() {
321
+			//console.log("行数据渲染完成!");
322
+			var totalPages = $('#table1').bootstrapTable("getOptions").totalPages;
323
+			var pageNumber = $('#table1').bootstrapTable("getOptions").pageNumber;
324
+			var goInputWidth = 45; //输入框默认宽度
325
+			var maxLen = ("" + totalPages).length;
326
+			//根据总页数设定跳转页面输入框宽度
327
+			if (totalPages > 999)
328
+				goInputWidth = maxLen * 10 + 15;
329
+			var $pageGo = $('<span style="padding-left: 5px;">跳转到<input type="number" maxlength="' +
330
+				maxLen + '" min="1" max="' + totalPages +
331
+				'" class="input-box" id="c_jump-to-page" value="' +
332
+				pageNumber + '" style="width: ' + goInputWidth + 'px;" />/' +
333
+				totalPages + '页&nbsp;</span>');
334
+			var $go = $("<a href=\"javascript:;\">Go</a>");
335
+			var $shou = $("<a href=\"javascript:;\">首页</a>")
336
+			var $wei = $("<a href=\"javascript:;\">尾页</a>")
337
+			$pageGo.append($go);
338
+			$pageGo.append($shou);
339
+			$pageGo.append($wei);
340
+			$(".pagination-detail").append($pageGo);
341
+			//页码范围限定(部分浏览器min~max失效时)
342
+			$pageGo.change(function() {
343
+				var goPage = $('#c_jump-to-page').val();
344
+				if (goPage < 1)
345
+					$('#c_jump-to-page').val(1);
346
+				if (goPage > totalPages)
347
+					$('#c_jump-to-page').val(totalPages);
348
+			});
349
+			//跳转到
350
+			$go.click(function() {
351
+				var goPage = parseInt($('#c_jump-to-page').val());
352
+				console.log(totalPages)
353
+				if (goPage != pageNumber)
354
+					$('#table1').bootstrapTable('selectPage', parseInt(goPage));
355
+			});
356
+			$shou.click(function() {
357
+	
358
+				$('#table1').bootstrapTable('selectPage', 1);
359
+			});
360
+			$wei.click(function() {
361
+	
362
+				$('#table1').bootstrapTable('selectPage', totalPages);
363
+			});
364
+		},
365
+		onLoadSuccess: function(res) { //加载成功时执行
366
+			$tableLeft.bootstrapTable('hideColumn', 'projectname'); //隐藏上述variablevalue列
367
+			
368
+		},
369
+		onLoadError: function() { //加载失败时执行
370
+			//layer.msg("加载数据失败", { time: 1500, icon: 2 });
371
+		}
372
+	});
373
+}
273 374
 //操作
274 375
 function formatterOperate(val, row) {
275 376
 	var str = '';
@@ -504,12 +605,11 @@ function timestampToTime(timestamp) {
504 605
 // }
505 606
 // 格式化超时时长
506 607
 function formatterdate(val, row) {
507
-
508
-	console.log(row.tobztimes)
608
+	// debugger
509 609
 	var dateval = ''
510 610
 	var dealdate = ''
511 611
 	var lasttime = ''
512
-	if (row.tobztimes != null && val != null && row.wxtimeleths != null && row.wxtimeid != null) {
612
+	if (row.tobztimes != null && val != null && row.wxtimeleths != null) {
513 613
 		var beginTimes = row.tobztimes.replace(/-/g, '/') //班组时间
514 614
 		var endTimes = val.replace(/-/g, '/') //处理时间
515 615
 		var middletime = row.wxtimeleths //维修时效
@@ -520,7 +620,6 @@ function formatterdate(val, row) {
520 620
         var datethree =new Date(dealdate)  
521 621
 		var b = ( datetwo.getTime()/1000 -  dateone.getTime()/1000) / 3600  //比价的差值
522 622
         console.log(b,middletime)
523
-	
524 623
 			if (b > middletime) {
525 624
 				var cha=b-middletime
526 625
 				dateval = cha.toFixed(2) + '小时'

+ 55 - 33
WebUI/CallCenterWeb.UI/equipmentOperationManage/js/warrantyWorkOrder.js

@@ -25,27 +25,27 @@ $(document).ready(function() {
25 25
 		range: '~',
26 26
 		theme: '#249fea'
27 27
 	});
28
-	if($('#startTime').val() == "") {
29
-		function p(s) {
30
-			return s < 10 ? '0' + s : s;
31
-		}
32
-		var currentYear = new Date().getFullYear();
33
-		var currentMonth = new Date().getMonth() + 1;
34
-		var currentDate = new Date().getDate();
35
-		var prevCurrentYear = 0;
36
-		var prevCurrentMonth = 0;
37
-		if(currentMonth == 1) {
38
-			prevCurrentYear = currentYear - 1;
39
-			prevCurrentMonth = 12;
40
-		} else {
41
-			prevCurrentYear = currentYear;
42
-			prevCurrentMonth = currentMonth - 1;
43
-		}
44
-		var current = currentYear + "-" + p(currentMonth) + "-" + p(currentDate);
45
-		// var lastmonth=prevCurrentYear+"-"+p(prevCurrentMonth)+"-"+p(currentDate)
46
-		$('#startTime').val(getPreDatetime(3600 * 1000 * 24 * 6) + " ~ " + current)
47
-		initTable1();
48
-	}
28
+	// if($('#startTime').val() == "") {
29
+	// 	function p(s) {
30
+	// 		return s < 10 ? '0' + s : s;
31
+	// 	}
32
+	// 	var currentYear = new Date().getFullYear();
33
+	// 	var currentMonth = new Date().getMonth() + 1;
34
+	// 	var currentDate = new Date().getDate();
35
+	// 	var prevCurrentYear = 0;
36
+	// 	var prevCurrentMonth = 0;
37
+	// 	if(currentMonth == 1) {
38
+	// 		prevCurrentYear = currentYear - 1;
39
+	// 		prevCurrentMonth = 12;
40
+	// 	} else {
41
+	// 		prevCurrentYear = currentYear;
42
+	// 		prevCurrentMonth = currentMonth - 1;
43
+	// 	}
44
+	// 	var current = currentYear + "-" + p(currentMonth) + "-" + p(currentDate);
45
+	// 	// var lastmonth=prevCurrentYear+"-"+p(prevCurrentMonth)+"-"+p(currentDate)
46
+	// 	$('#startTime').val(getPreDatetime(3600 * 1000 * 24 * 6) + " ~ " + current)
47
+	// 	initTable1();
48
+	// }
49 49
 });
50 50
 //前一周
51 51
 function getPreDatetime(pdate) {
@@ -71,7 +71,6 @@ function initTable1() {
71 71
 		contentType: "application/x-www-form-urlencoded",
72 72
 		striped: true, //表格显示条纹
73 73
 		smartDisplay: false,
74
-		pagination: false, //启动分页
75 74
 		pageSize: 10, //每页显示的记录数
76 75
 		pageNumber: 1, //当前第几页
77 76
 		// pageList: [10, 20, 50, 100], //记录数可选列表
@@ -103,15 +102,38 @@ function initTable1() {
103 102
 			var jsfinishcount = newData.reduce((sum, e) => sum + parseInt(e.jsfinishcount), 0) //及时完成
104 103
 			var csfinishcount = newData.reduce((sum, e) => sum + parseInt(e.csfinishcount), 0) //超时完成
105 104
 			var nfinishcount = newData.reduce((sum, e) => sum + parseInt(e.nfinishcount), 0) //未完结单量
106
-			var finishlv = newData.reduce((sum, e) => sum + parseInt(e.finishlv), 0) //完成率
107
-			var nofinnishlv = newData.reduce((sum, e) => sum + parseInt(e.nofinnishlv), 0) //未完成率
105
+			var finishlv; //完成率
106
+			var nofinnishlv ;//未完成率
108 107
 			var mywocode = newData.reduce((sum, e) => sum + parseInt(e.mywocode), 0) //满意
109 108
 			var cwocode = newData.reduce((sum, e) => sum + parseInt(e.cwocode), 0) //差
110
-			var mydinfo = newData.reduce((sum, e) => sum + parseFloat(e.mydinfo), 0) //满意度
111
-			var comfrombl = newData.reduce((sum, e) => sum + parseInt(e.comfrombl), 0) //本院量率
109
+			var mydinfo; //满意度
110
+			var comfrombl;//本院量率
112 111
 			var comfroms = newData.reduce((sum, e) => sum + parseInt(e.comfroms), 0) //第三方量
113
-			var comfromsbl = newData.reduce((sum, e) => sum + parseInt(e.comfromsbl), 0) //第三方量率
114
-			console.log(finishlv,nofinnishlv);
112
+			var comfromsbl; //第三方量率
113
+			if(finishcount==0||daycounts==0){
114
+				finishlv=0
115
+			}else{
116
+				finishlv=((finishcount / daycounts)*100).toFixed(2) + '%'
117
+			}
118
+			if(nfinishcount==0||daycounts==0){
119
+				nofinnishlv=0
120
+			}else{
121
+				nofinnishlv=((nfinishcount / daycounts)*100).toFixed(2) + '%'
122
+			}
123
+			if(mywocode==0||daycounts==0){
124
+				mydinfo=0
125
+			}else{
126
+				mydinfo=((mywocode / daycounts)*100).toFixed(2) + '%'
127
+			}
128
+			if(comfrom==0||daycounts==0){
129
+				comfrombl=0
130
+			}else{
131
+				comfrombl=((comfrom / finishcount)*100).toFixed(2) + '%'
132
+			}if(comfroms==0||finishcount==0){
133
+				comfromsbl=0
134
+			}else{
135
+				comfromsbl=((comfroms / finishcount)*100).toFixed(2) + '%'
136
+			}
115 137
 			var newhzdata = [{
116 138
 				deptname: '合计',
117 139
 				daycounts: daycounts, //随访总数
@@ -119,15 +141,15 @@ function initTable1() {
119 141
 				jsfinishcount: jsfinishcount,
120 142
 				csfinishcount: csfinishcount,
121 143
 				nfinishcount: nfinishcount, //满意数
122
-//				finishlv: (finishlv / len).toFixed(2) + '%',
123
-//				nofinnishlv: (nofinnishlv / len).toFixed(2) + '%', 
144
+				finishlv:finishlv ,//完成率
145
+				nofinnishlv: nofinnishlv, 
124 146
 				mywocode: mywocode,
125 147
 				cwocode: cwocode,
126
-//				mydinfo: (mydinfo / len).toFixed(2) + '%', 
148
+				mydinfo: mydinfo, 
127 149
 				comfrom: comfrom,
128
-//				comfrombl: (comfrombl / len).toFixed(2) + '%',
150
+				comfrombl:comfrombl ,
129 151
 				comfroms: comfroms,
130
-//				comfromsbl: (comfromsbl / len).toFixed(2) + '%',
152
+				comfromsbl:comfromsbl,
131 153
 				changecount: changecount
132 154
 			}]
133 155
 			if(newData.length > 0) {

+ 20 - 1
WebUI/CallCenterWeb.UI/index.html

@@ -403,6 +403,9 @@
403 403
 			<p style="margin: 0;">客服</p>
404 404
 		</div>
405 405
 		<!--在线客服开始-->
406
+		<div class="imgDetial">
407
+			
408
+		</div>
406 409
 		<div id="chat">
407 410
 			<span class="close_icon">×</span>
408 411
 			<div class="chat_sidebar">
@@ -432,8 +435,11 @@
432 435
 					<ul class="con">
433 436
 					</ul>
434 437
 					<div class="main_sendMessage ">
435
-						<textarea name=" " rows=" " cols=" " placeholder="按Enter 发送 " class="send_content "></textarea>
438
+						<textarea placeholder="按Enter 发送 " class="send_content "></textarea>
439
+						<div id="preview"></div>
436 440
 						<div class="send_btn ">
441
+							<input class="input" type="file" name="upFile" id="upFile" multiple="multiple" style="display: none;">
442
+							<input class="input btns" type="button" value="发送图片" id="scwj" style="background-color: rgb(36,159,234);"/>
437 443
 							<button class="reply_btn">快捷回复</button>
438 444
 							<button class="sendTo" onclick="sendinfo() ">发送(S)</button>
439 445
 							<span style="color:red; " class="error "></span>
@@ -441,6 +447,19 @@
441 447
 					</div>
442 448
 				</div>
443 449
 			</div>
450
+			<!-- <div class="container">
451
+				<div class="wrap" style="left:-600px;">
452
+					<img src="./img/5.jpg" alt="">
453
+					<img src="./img/1.jpg" alt="">
454
+					<img src="./img/2.jpg" alt="">
455
+					<img src="./img/3.jpg" alt="">
456
+					<img src="./img/4.jpg" alt="">
457
+					<img src="./img/5.jpg" alt="">
458
+					<img src="./img/1.jpg" alt="">
459
+				</div>
460
+				<a href="javascript:;" class="arrow arrow_left">&lt;</a>
461
+				<a href="javascript:;" class="arrow arrow_right">&gt;</a>
462
+			</div> -->
444 463
 		</div>
445 464
 
446 465
 		<script src="./js/laydate/laydate.js"></script>

+ 208 - 55
WebUI/CallCenterWeb.UI/js/chat.js

@@ -7,13 +7,14 @@ var touristCode = window.localStorage.getItem('touristCode')
7 7
 var touserid;
8 8
 var aa;
9 9
 var flag;
10
-var id=parseInt(Math.random()*100000);
11
-if(userCode == null&&touristCode==null) {
12
-	var id=parseInt(Math.random()*100000)
13
-	userCode=id;
10
+var flagAct;
11
+var id = parseInt(Math.random() * 100000);
12
+if (userCode == null && touristCode == null) {
13
+	var id = parseInt(Math.random() * 100000)
14
+	userCode = id;
14 15
 	window.localStorage.setItem('touristCode', id);
15
-}else if(userCode == null&&touristCode!=null){
16
-	userCode=touristCode;
16
+} else if (userCode == null && touristCode != null) {
17
+	userCode = touristCode;
17 18
 }
18 19
 //console.log(document.cookie.getItem('touristCode'))
19 20
 //获取客服工号
@@ -22,7 +23,7 @@ getTouserid();
22 23
 getchatinglist();
23 24
 //};
24 25
 $('.open_chat').click(function() {
25
-	if($('#chat').css('display') == 'block') {
26
+	if ($('#chat').css('display') == 'block') {
26 27
 		$('#chat').hide();
27 28
 	} else {
28 29
 		$('#chat').show();
@@ -42,7 +43,7 @@ $('.open_chat').click(function() {
42 43
 		return false
43 44
 	};
44 45
 	document.onmousemove = function(event) {
45
-		if(!bDrag) return;
46
+		if (!bDrag) return;
46 47
 		var event = event || window.event;
47 48
 		var iL = event.clientX - disX;
48 49
 		var iT = event.clientY - disY;
@@ -63,15 +64,12 @@ $('.open_chat').click(function() {
63 64
 		chart_name.releaseCapture && chart_name.releaseCapture();
64 65
 	};
65 66
 	window.onkeydown = function(e) {
66
-		if(e.keyCode == 13) {
67
+		if (e.keyCode == 13) {
67 68
 			sendinfo();
68 69
 			flag = 0
69 70
 		}
70
-		if($('.send_content').val() == '') {
71
-			e.preventDefault();
72
-		}
73 71
 	}
74
-	if(flag = 0) {
72
+	if (flag = 0) {
75 73
 		$('.chatlist_con').scrollTop($('.chatlist_con')[0].scrollHeight);
76 74
 	}
77 75
 })
@@ -82,46 +80,104 @@ $('.close_icon').click(function() {
82 80
 clearInterval(aa)
83 81
 //列表点击样式
84 82
 $('.sidebar_list').click(function(e) {
85
-	if(e.target.tagName != 'LI') {
83
+	if (e.target.tagName != 'LI') {
86 84
 		return;
87 85
 	}
86
+	flag=0;
87
+	if (flag == 0) {
88
+		$('.chatlist_con').scrollTop($('.chatlist_con')[0].scrollHeight);
89
+	}
88 90
 	$(e.target).addClass('actives');
89 91
 	$(e.target).siblings().removeClass('actives')
90 92
 	touserid = $(e.target).children('p').eq(0).text()
91
-	console.log(touserid)
92 93
 	$('.name').text(touserid);
93 94
 	GetOnlineservicetinfo()
94 95
 })
95 96
 //快捷消息回复模板
96
-$('.reply_btn').click(function(){
97
-	if($('.con').css('display')=='block'){
97
+$('.reply_btn').click(function() {
98
+	if ($('.con').css('display') == 'block') {
98 99
 		$('.con').hide()
99
-	}else{
100
+	} else {
100 101
 		$('.con').show()
101 102
 	}
102 103
 	getMessage();
103 104
 })
104
-$('.con').dblclick(function(e){
105
-	if(e.target.tagName=='UL'){
105
+//发送图片
106
+$("#scwj").click(function() {
107
+	$("#upFile").trigger("click");
108
+})
109
+$("#upFile").change(function() {
110
+	upload();
111
+});
112
+$('.con').click(function(e) {
113
+	if (e.target.tagName == 'UL') {
106 114
 		return false;
107 115
 	}
108
-	let messgaeCont=$(e.target).html();
109
-	const arr=messgaeCont.split('、');
116
+	let messgaeCont = $(e.target).html();
117
+	const arr = messgaeCont.split('、');
110 118
 	$('.send_content').val(arr[1]);
111 119
 	$('.con').hide()
112 120
 })
113
-function getMessage(){
121
+//图片上传预览 IE是用了滤镜。
122
+var file = document.getElementById("upFile");
123
+function upload() {
124
+	flagAct=1;
125
+	var MAXWIDTH = 170;
126
+	var MAXHEIGHT = 120;
127
+	var div = document.getElementById('preview');
128
+	if (file.files && file.files[0]) {
129
+		div.innerHTML = '<img id=imghead>';
130
+		var img = document.getElementById('imghead');
131
+		img.onload = function() {
132
+			var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight);
133
+			img.width = rect.width;
134
+			img.height = rect.height;
135
+			// img.style.marginLeft = rect.left+'px';
136
+			img.style.marginTop = rect.top + 'px';
137
+		}
138
+		var reader = new FileReader();
139
+		reader.onload = function(evt) {
140
+			img.src = evt.target.result;
141
+		}
142
+		reader.readAsDataURL(file.files[0]);
143
+	}
144
+}
145
+function clacImgZoomParam(maxWidth, maxHeight, width, height) {
146
+	var param = {
147
+		top: 0,
148
+		left: 0,
149
+		width: width,
150
+		height: height
151
+	};
152
+	if (width > maxWidth || height > maxHeight) {
153
+		rateWidth = width / maxWidth;
154
+		rateHeight = height / maxHeight;
155
+
156
+		if (rateWidth > rateHeight) {
157
+			param.width = maxWidth;
158
+			param.height = Math.round(height / rateWidth);
159
+		} else {
160
+			param.width = Math.round(width / rateHeight);
161
+			param.height = maxHeight;
162
+		}
163
+	}
164
+
165
+	param.left = Math.round((maxWidth - param.width) / 2);
166
+	param.top = Math.round((maxHeight - param.height) / 2);
167
+	return param;
168
+}
169
+
170
+function getMessage() {
114 171
 	$.ajax({
115 172
 		type: "get",
116 173
 		url: huayi.config.callcenter_url + "testusertypeapi/api/TestUserType/getmassmodellistall",
117 174
 		async: true,
118 175
 		dataType: 'json',
119
-		data: {
120
-		},
176
+		data: {},
121 177
 		success: function(res) {
122 178
 			let messageStr = ''
123 179
 			res.data.forEach(function(v, n) {
124
-				messageStr+='<li>'+(n+1)+'、'+v.massmodelcenter+'</li>'
180
+				messageStr += '<li>' + (n + 1) + '、' + v.massmodelcenter + '</li>'
125 181
 			})
126 182
 			$('.con').html(messageStr);
127 183
 		}
@@ -131,24 +187,55 @@ function getMessage(){
131 187
 //发送消息
132 188
 function sendinfo() {
133 189
 	flag = 0
190
+	console.log(flagAct)
134 191
 	//发送聊天消息
135
-	if($('.send_content').val() == '') {
136
-		return false;
137
-	}
138
-	$.ajax({
139
-		type: "get",
140
-		url: huayi.config.callcenter_url + "testusertypeapi/api/TestUserType/AddOnlineservice",
141
-		async: true,
142
-		dataType: 'json',
143
-		data: {
144
-			Msgcontent: $('.send_content').val(),
145
-			fromuserid: userCode,
146
-			touserid: touserid
147
-		},
148
-		success: function(res) {
149
-			$('.send_content').val('')
192
+	if(flagAct==1){
193
+		if(file.files.length > 0) {
194
+			var formData = new FormData();
195
+			for(var i = 0; i < file.files.length; i++) {
196
+				formData.append('file' + i, file.files[i]);
197
+			}
198
+			formData.append("fromuserid",userCode)
199
+			formData.append("touserid",touserid)
200
+			$.ajax({
201
+				url: huayi.config.callcenter_url +'testusertypeapi/api/TestUserType/addonlineserviceimg',
202
+				type: "POST",
203
+				data: formData,
204
+				/**
205
+				 *必须false才会自动加上正确的Content-Type
206
+				 */
207
+				contentType: false,
208
+				/**
209
+				 * 必须false才会避开jQuery对 formdata 的默认处理
210
+				 * XMLHttpRequest会对 formdata 进行正确的处理
211
+				 */
212
+				processData: false,
213
+				success: function(result) {
214
+					$('#imghead').css('display','none');
215
+					flagAct=0
216
+				}
217
+			});
150 218
 		}
151
-	});
219
+	}else{
220
+		if ($('.send_content').val() == '') {
221
+			return false;
222
+		}
223
+		$.ajax({
224
+			type: "get",
225
+			url: huayi.config.callcenter_url + "testusertypeapi/api/TestUserType/AddOnlineservice",
226
+			async: true,
227
+			dataType: 'json',
228
+			data: {
229
+				Msgcontent: $('.send_content').val(),
230
+				fromuserid: userCode,
231
+				touserid: touserid
232
+			},
233
+			success: function(res) {
234
+				$('.send_content').val('')
235
+			}
236
+		});
237
+	}
238
+	
152 239
 }
153 240
 
154 241
 //获取聊天记录
@@ -165,29 +252,68 @@ function GetOnlineservicetinfo() {
165 252
 		success: function(res) {
166 253
 			let str1 = ''
167 254
 			res.data.forEach(function(v, n) {
168
-				if(v.fromuserid == userCode) {
169
-					str1 += '<li><p class="message_time "><span>' + v.createtime + '</span></p><div class="message_mincon self"><div class="message_text ">' +
170
-						v.Msgcontent + '</div></div></li>'
255
+				if (v.fromuserid == userCode) {
256
+					if(v.imgurlinfo!=null&&v.imgurlinfo!=''){
257
+						str1 += '<li><p class="message_time "><span>' + v.createtime +
258
+							'</span></p><div class="message_mincon self"><div class="message_img "><img  onclick="imgEnlarge()" src="' +huayi.config.img_url+
259
+							v.imgurlinfo  + '"></div></div></li>'
260
+						
261
+					}else{
262
+						str1 += '<li><p class="message_time "><span>' + v.createtime +
263
+							'</span></p><div class="message_mincon self"><div class="message_text ">' +
264
+							v.Msgcontent + '</div></div></li>'
265
+					}
171 266
 				} else {
172
-					str1 += '<li><p class="message_time "><span>' + v.createtime + '</span></p><div class="message_mincon"><div class="message_text ">' +
173
-						v.Msgcontent + '</div></div></li>'
267
+					if(v.imgurlinfo!=null&&v.imgurlinfo!=''){
268
+						str1 += '<li><p class="message_time "><span>' + v.createtime +
269
+							'</span></p><div class="message_mincon"><div class="message_img"><img  onclick="imgEnlarge()" src="' +huayi.config.img_url+
270
+							v.imgurlinfo  + '"></div></div></li>'
271
+					}else{
272
+						str1 += '<li><p class="message_time "><span>' + v.createtime +
273
+							'</span></p><div class="message_mincon"><div class="message_text ">' +
274
+							v.Msgcontent + '</div></div></li>'
275
+					}
276
+					
174 277
 				}
175 278
 			})
176 279
 			$('.chatlist_con').html(str1);
177
-			if(flag == 0) {
280
+			//图片放大
281
+			
282
+			if (flag == 0) {
178 283
 				$('.chatlist_con').scrollTop($('.chatlist_con')[0].scrollHeight);
179 284
 				flag = 1
180 285
 			}
286
+			
181 287
 		}
182 288
 	});
183 289
 }
184
-
290
+function imgEnlarge(str){
291
+	layer.photos({
292
+		photos: '.message_img',
293
+		anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)
294
+	});
295
+	// $('.imgDetial').html('<span class="closeIcon" onclick="closeImg()">×</span><img src="'+huayi.config.img_url+str+'">');
296
+	// $('.imgDetial').css('display','block')
297
+}
298
+// function closeImg(){
299
+// 	$('.imgDetial').css('display','none')
300
+// }
301
+// function imgEnlarge(str){
302
+// 	layer.photos({
303
+// 		photos: '.message_img',
304
+// 		anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)
305
+// 	});
306
+// 	console.log(huayi.config.img_url+str)
307
+// 	// debugger
308
+// 	$('.layui-layer-photos .layui-layer-phimg img').attr('src',huayi.config.img_url+str);
309
+// 	// $('.bigImg').html('<img src="' +huayi.config.img_url+str + '">')
310
+// }
185 311
 //获取客服工号
186 312
 function getTouserid() {
187 313
 	$.ajax({
188 314
 		type: "get",
189 315
 		url: huayi.config.callcenter_url + "testusertypeapi/api/TestUserType/getzxuserinfo",
190
-		async: true,
316
+		async: false,
191 317
 		dataType: 'json',
192 318
 		data: {
193 319
 			fromuserid: userCode
@@ -203,23 +329,50 @@ function getchatinglist() {
203 329
 	$.ajax({
204 330
 		type: "get",
205 331
 		url: huayi.config.callcenter_url + "testusertypeapi/api/TestUserType/getchatinglist",
206
-		async: true,
332
+		async: false,
207 333
 		dataType: 'json',
208 334
 		data: {
209 335
 			usercode: userCode
210 336
 		},
211 337
 		success: function(res) {
212 338
 			let str = '';
339
+			let num;
213 340
 			res.data.forEach(function(v, n) {
214 341
 				str += '<li><p class="chat_name">' + v.usercode + '</p></li>'
215 342
 			})
216 343
 			$('.sidebar_list').html(str);
217
-			$(".sidebar_list li").eq(0).addClass('actives')
344
+			// $(".sidebar_list li").eq(0).addClass('actives')
345
+			let className=document.getElementsByClassName('chat_name');
346
+				console.log(touserid)
347
+			for(let i=0;i<className.length;i++){
348
+				if(className[i].innerText==String(touserid)){
349
+					num=i-1
350
+					console.log(num)
351
+					$(".sidebar_list li").eq(num).addClass('actives');
352
+				}
353
+			}
218 354
 		}
219 355
 	});
220 356
 }
221 357
 
222 358
 //查看更多
223
-function getmore(ele) {
224
-	console.log("你点击了查看更多")
225
-}
359
+// function getmore(ele) {
360
+// 	console.log("你点击了查看更多")
361
+// }
362
+// var wrap = document.querySelector(".wrap");
363
+// var next = document.querySelector(".arrow_right");
364
+// var prev = document.querySelector(".arrow_left");
365
+// next.onclick = function () {
366
+// 	next_pic();
367
+// }
368
+// prev.onclick = function () {
369
+// 	prev_pic();
370
+// }
371
+// function next_pic () {
372
+// 	var newLeft = parseInt(wrap.style.left)-600;
373
+// 	wrap.style.left = newLeft + "px";
374
+// }
375
+// function prev_pic () {
376
+// 	var newLeft = parseInt(wrap.style.left)+600;
377
+// 	wrap.style.left = newLeft + "px";
378
+// }

+ 42 - 42
WebUI/CallCenterWeb.UI/js/index.js

@@ -624,48 +624,48 @@ function getUserInfo() {
624 624
 	}
625 625
 }
626 626
 //签入成功后并且分配有任务的时候  弹出 相关计划任务
627
-function btn_joinTask() {
628
-	var dtd = $.Deferred(); //在函数内部,新建一个Deferred对象
629
-	$.ajax({
630
-		type: "get",
631
-		url: huayi.config.call_url + "callcenterapi/api/autocallouttask/getqrjoinlist",
632
-		dataType: 'json',
633
-		async: true,
634
-		data: {
635
-			//agentid	否	string	坐席工号(不传值默认登录坐席工号)
636
-			//joinflag	否	int	参与标志(不传值获取分配给坐席的全部任务,传值0获取未参与任务,传值1获取参与任务)
637
-		},
638
-		success: function(data) {
639
-			if(data.state.toLowerCase() === "success") {
640
-				data = data.data;
641
-				if(data && data.length > 0) {
642
-					//弹出任务信息(签入时传参数)
643
-					switchingTask(true);
644
-				}
645
-				dtd.resolve(); // 改变Deferred对象的执行状态
646
-			}
647
-		},
648
-		error: function(textStatus) {
649
-			layer.confirm('网络繁忙,请稍后再试...', {
650
-				icon: 7,
651
-				closeBtn: 0,
652
-				btn: ['确定'] //按钮
653
-			});
654
-		},
655
-		complete: function(XMLHttpRequest, textStatus) {
656
-			if(textStatus == 'timeout') {
657
-				var xmlhttp = window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHttp");
658
-				xmlhttp.abort();
659
-				layer.confirm('网络超时,请稍后再试...', {
660
-					icon: 7,
661
-					closeBtn: 0,
662
-					btn: ['确定'] //按钮
663
-				});
664
-			}
665
-		},
666
-	});
667
-	return dtd.promise(); // 返回promise对象
668
-}
627
+//function btn_joinTask() {
628
+//	var dtd = $.Deferred(); //在函数内部,新建一个Deferred对象
629
+//	$.ajax({
630
+//		type: "get",
631
+//		url: huayi.config.call_url + "autocallouttask/getqrjoinlist",
632
+//		dataType: 'json',
633
+//		async: true,
634
+//		data: {
635
+//			//agentid	否	string	坐席工号(不传值默认登录坐席工号)
636
+//			//joinflag	否	int	参与标志(不传值获取分配给坐席的全部任务,传值0获取未参与任务,传值1获取参与任务)
637
+//		},
638
+//		success: function(data) {
639
+//			if(data.state.toLowerCase() === "success") {
640
+//				data = data.data;
641
+//				if(data && data.length > 0) {
642
+//					//弹出任务信息(签入时传参数)
643
+//					switchingTask(true);
644
+//				}
645
+//				dtd.resolve(); // 改变Deferred对象的执行状态
646
+//			}
647
+//		},
648
+//		error: function(textStatus) {
649
+//			layer.confirm('网络繁忙,请稍后再试...', {
650
+//				icon: 7,
651
+//				closeBtn: 0,
652
+//				btn: ['确定'] //按钮
653
+//			});
654
+//		},
655
+//		complete: function(XMLHttpRequest, textStatus) {
656
+//			if(textStatus == 'timeout') {
657
+//				var xmlhttp = window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHttp");
658
+//				xmlhttp.abort();
659
+//				layer.confirm('网络超时,请稍后再试...', {
660
+//					icon: 7,
661
+//					closeBtn: 0,
662
+//					btn: ['确定'] //按钮
663
+//				});
664
+//			}
665
+//		},
666
+//	});
667
+//	return dtd.promise(); // 返回promise对象
668
+//}
669 669
 
670 670
 //签入成功后 显示右上角 当前参与任务信息 
671 671
 function getTaskRealInfo() {

Plik diff jest za duży
+ 2 - 0
WebUI/CallCenterWeb.UI/js/layer/layer.js


BIN
WebUI/CallCenterWeb.UI/js/layer/theme/default/icon-ext.png


BIN
WebUI/CallCenterWeb.UI/js/layer/theme/default/icon.png


Plik diff jest za duży
+ 1 - 0
WebUI/CallCenterWeb.UI/js/layer/theme/default/layer.css


BIN
WebUI/CallCenterWeb.UI/js/layer/theme/default/loading-0.gif


BIN
WebUI/CallCenterWeb.UI/js/layer/theme/default/loading-1.gif


BIN
WebUI/CallCenterWeb.UI/js/layer/theme/default/loading-2.gif


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

@@ -207,21 +207,21 @@ function LoginBack() {
207 207
 	$(".hwzt").text('空闲');
208 208
 
209 209
 	//弹出 相关计划任务
210
-	btn_joinTask().then(function(){
211
-		//签入成功后 显示右上角 当前参与任务信息 
212
-		$('#task_real_info').show();
213
-		//绑定切换按钮
214
-		$(document).off('click', '#btn_switching', switchingTask);
215
-		$(document).on('click', '#btn_switching', switchingTask);
216
-		//获取当前任务信息
217
-		getTaskRealInfo();
218
-		if(taskRealInfoTimer) {
219
-			clearInterval(taskRealInfoTimer); //停止刷新数据
220
-		}
221
-		isTaskTimerOn = true;
222
-		//每间隔  huayi.config.taskRealInfoTime 刷新数据
223
-		refreshTaskRealInfo(huayi.config.taskRealInfoTime);
224
-	});
210
+//	btn_joinTask().then(function(){
211
+//		//签入成功后 显示右上角 当前参与任务信息 
212
+//		$('#task_real_info').show();
213
+//		//绑定切换按钮
214
+//		$(document).off('click', '#btn_switching', switchingTask);
215
+//		$(document).on('click', '#btn_switching', switchingTask);
216
+//		//获取当前任务信息
217
+//		getTaskRealInfo();
218
+//		if(taskRealInfoTimer) {
219
+//			clearInterval(taskRealInfoTimer); //停止刷新数据
220
+//		}
221
+//		isTaskTimerOn = true;
222
+//		//每间隔  huayi.config.taskRealInfoTime 刷新数据
223
+//		refreshTaskRealInfo(huayi.config.taskRealInfoTime);
224
+//	});
225 225
 }
226 226
 
227 227
 //签出

+ 4 - 4
WebUI/CallCenterWeb.UI/login.html

@@ -156,7 +156,7 @@
156 156
 					type: "post",
157 157
 					url: huayi.config.callcenter_url + "signtokenapi/api/token/login",
158 158
 					dataType: 'json',
159
-					async: true,
159
+					async: false,
160 160
 					beforeSend: function() { //触发ajax请求开始时执行
161 161
 						$('.btns').attr("disabled", true);
162 162
 						$('.btns').text('登录中...');
@@ -206,10 +206,10 @@
206 206
 							});
207 207
 						}
208 208
 					},
209
-
210
-					error: function(textStatus) {
209
+					timeout : 50000,
210
+					error: function(xhr, textStatus, errorThrown) {
211 211
 						layer.close(loadIndex);
212
-						layer.confirm('网络繁忙,请稍后再试...', {
212
+						layer.confirm(xhr.status+'网络繁忙,请稍后再试...', {
213 213
 							icon: 7,
214 214
 							closeBtn: 0,
215 215
 							btn: ['确定'] //按钮

+ 2 - 0
WebUI/CallCenterWeb.UI/phoneClientManage/template/addApplicationUpdate.html

@@ -241,10 +241,12 @@
241 241
 				var Files = document.getElementById("upFile").files;
242 242
 				if(Files.length > 0) {
243 243
 					var formData = new FormData();
244
+					console.log(formData)
244 245
 					for(var i = 0; i < Files.length; i++) {
245 246
 						formData.append('file' + i, Files[i]);
246 247
 					}
247 248
 					formData.append("uploadtype", 'App');
249
+					console.log(formData,Files)
248 250
 					$.ajax({
249 251
 						url: huayi.config.callcenter_url + "fileserverapi/Api/Upload",
250 252
 						type: "POST",

+ 63 - 0
zyChat/chat.html

@@ -0,0 +1,63 @@
1
+<!DOCTYPE html>
2
+<html>
3
+	<head>
4
+		<meta charset="utf-8">
5
+		<meta name="renderer" content="webkit">
6
+		<meta http-equiv="X-UA-Compatible" content="IE=edge">
7
+		<meta name="viewport" content="width=device-width, initial-scale=1">
8
+		<meta http-equiv="Cache-Control" content="no-siteapp" />
9
+		<title>聊天</title>
10
+		<script src="script/huayi.config.js"></script>
11
+		<link rel="stylesheet" href="./css/chat.css" />
12
+	</head>
13
+	<body>
14
+		<!--在线客服开始-->
15
+		<div class="imgDetial">
16
+			
17
+		</div>
18
+		<div id="chat">
19
+			<span class="close_icon"><img src="img/back.png" alt="" /></span>
20
+			<div class="chat_sidebar">
21
+				<div class="pic_card">
22
+					<div class="chat_sidebar_head">
23
+						<img class="ver_middle" src="img/kefuTx.png" alt="" width="40" height="40" />
24
+						<p class="chat_name chat_username">Coffce</p>
25
+					</div>
26
+				</div>
27
+				<div class="chat_sidebar_list">
28
+					<ul class="sidebar_list">
29
+					</ul>
30
+				</div>
31
+			</div>
32
+			
33
+			<div class="chat_main">
34
+				<div class="chat_person disnone">
35
+			 		<p class="chat_name">1111</p>
36
+				</div>
37
+				<div class="tabMain">
38
+					<div class="name">111</div>
39
+					<div class="main_message">
40
+						<ul class="chatlist_con">
41
+						</ul>
42
+					</div>
43
+					<ul class="con">
44
+					</ul>
45
+					<div class="main_sendMessage ">
46
+						<textarea name=" " rows=" " cols=" " placeholder="按Enter 发送 " class="send_content "></textarea>
47
+						<div id="preview"></div>
48
+						<div class="send_btn ">
49
+							<input class="input" type="file" name="upFile" id="upFile" multiple="multiple" style="display: none;">
50
+							<input class="input btns" type="button" value="发送图片" id="scwj" style="background-color: rgb(36,159,234);"/>
51
+							<button class="reply_btn">快捷回复</button>
52
+							<button class="sendTo" onclick="sendinfo() ">发送(S)</button>
53
+							<span style="color:red; " class="error "></span>
54
+						</div>
55
+					</div>
56
+				</div>
57
+			</div>
58
+		</div>
59
+	</body>
60
+	<script src="js/jquery.min.js"></script>
61
+	<script src="./js/chat.js"></script>
62
+	<script src="js/layer/layer.js"></script>
63
+</html>

+ 482 - 0
zyChat/css/chat.css

@@ -0,0 +1,482 @@
1
+.open_chat {
2
+	font-size: 14px;
3
+	line-height: 18px;
4
+	text-align: center;
5
+	padding: 6px 5px;
6
+	-webkit-box-sizing: border-box;
7
+	-moz-box-sizing: border-box;
8
+	box-sizing: border-box;
9
+	position: fixed;
10
+	top: 50%;
11
+	right: 26px;
12
+	z-index: 100;
13
+	background: #0489ac;
14
+	color: #fff;
15
+	cursor: pointer;
16
+	display: block;
17
+}
18
+
19
+.open_chat .before {
20
+	position: absolute;
21
+	padding: 5px;
22
+	background: red;
23
+	border-radius: 50%;
24
+	display: none;
25
+	right: -4px;
26
+	top: -4px;
27
+}
28
+
29
+.open_chat .before.show {
30
+	display: block!important;
31
+}
32
+
33
+.open_chat .before.hide {
34
+	display: none!important;
35
+}
36
+
37
+body {
38
+	color: #4d4d4d;
39
+	font: 14px/1.4em 'Helvetica Neue', Helvetica, 'Microsoft Yahei', Arial, sans-serif;
40
+	/*background: #f5f5f5 url(../img/chat_bg.jpg) no-repeat center;*/
41
+	background-size: cover;
42
+}
43
+
44
+ul,
45
+li {
46
+	list-style: none;
47
+	margin: 0;
48
+	padding: 0;
49
+}
50
+
51
+#chat {
52
+	margin: 20px auto;
53
+	width: 900px;
54
+	height: 600px;
55
+	overflow: hidden;
56
+	border-radius: 3px;
57
+	position: absolute;
58
+	z-index: 10000;
59
+	right: 550px;
60
+	top: 15%;
61
+	/*display: none;*/
62
+	box-shadow: 1px 1px 50px rgba(0, 0, 0, .3);
63
+}
64
+
65
+.actives {
66
+	background: #249fea;
67
+	border: 1px solid #249fea !important;
68
+	color: #FFFFFF !important;
69
+}
70
+
71
+.chat_left,
72
+.chat_sidebar {
73
+	float: left;
74
+	s
75
+}
76
+
77
+.chat_left ul li {
78
+	/*padding: 9pt 15px;*/
79
+	padding: 10px 10px;
80
+	border-bottom: 1px solid #292c33;
81
+	cursor: pointer;
82
+	color: #f4f4f4;
83
+}
84
+
85
+.chat_left ul li .chat_name {
86
+	margin: 0;
87
+}
88
+
89
+.chat_sidebar {
90
+	width: 200px;
91
+	color: #f4f4f4;
92
+	background-color: #2e3238;
93
+}
94
+
95
+#chat .chat_left,
96
+#chat .chat_main,
97
+#chat .chat_sidebar,
98
+.message_mincon {
99
+	height: 100%;
100
+}
101
+
102
+#chat .chat_main,
103
+.message_mincon {
104
+	position: relative;
105
+	/*overflow: hidden;*/
106
+	background-color: #eee;
107
+}
108
+
109
+.ver_middle {
110
+	vertical-align: middle;
111
+}
112
+
113
+#chat .chat_left {
114
+	width: 70px;
115
+	background: #2f3339;
116
+	border-right: 1px solid #292c33;
117
+}
118
+
119
+
120
+/*chat_sidebar开始*/
121
+
122
+.pic_card {
123
+	padding: 9pt;
124
+	border-bottom: 1px solid #24272c;
125
+}
126
+
127
+.chat_name {
128
+	display: inline-block;
129
+	margin: 0 0 0 15px;
130
+	font-size: 1pc;
131
+	vertical-align: middle;
132
+	font-size: 14px;
133
+}
134
+
135
+.chat_sidebar_foot {
136
+	margin-top: 10px;
137
+}
138
+
139
+.sidebar_foot_seach {
140
+	padding: 0 10px;
141
+	width: 100%;
142
+	font-size: 9pt;
143
+	color: #fff;
144
+	height: 30px;
145
+	line-height: 30px;
146
+	border: 1px solid #3a3a3a;
147
+	border-radius: 4px;
148
+	outline: 0;
149
+	background-color: #26292e;
150
+}
151
+
152
+.chat_sidebar_list {
153
+	height: 495px;
154
+	overflow-y: auto;
155
+}
156
+
157
+.chat_sidebar_list li {
158
+	/*padding: 9pt 15px;*/
159
+	padding: 4pt 15px;
160
+	border-bottom: 1px solid #292c33;
161
+	cursor: pointer;
162
+	-webkit-transition: background-color .1s;
163
+	transition: background-color .1s;
164
+	position: relative;
165
+}
166
+
167
+.chat_sidebar_list li.activess,
168
+.chat_left li.activess {
169
+	background-color: hsla(0, 0%, 100%, .1);
170
+}
171
+
172
+.chat_sidebar_list li.activess .pieHide,
173
+.chat_sidebar_list li.activess .pieShow {
174
+	display: none!important;
175
+}
176
+
177
+.chat_sidebar_list li .pieShow {
178
+	display: block!important;
179
+}
180
+
181
+.chat_sidebar_list li.activess:hover,
182
+.chat_left li.activess:hover {
183
+	background-color: hsla(0, 0%, 100%, .1);
184
+}
185
+
186
+
187
+/*.chat_sidebar_list li:hover,
188
+.chat_left li:hover {
189
+	background-color: hsla(0, 0%, 100%, .03);
190
+}*/
191
+
192
+
193
+/*chat_sidebar结束*/
194
+
195
+
196
+/*聊天区域开始*/
197
+
198
+.message_count {
199
+	display: inline-block;
200
+	position: absolute;
201
+	right: 0;
202
+	border-radius: 50%;
203
+	background: red;
204
+	color: #fff;
205
+}
206
+
207
+.disnone {
208
+	display: none;
209
+}
210
+
211
+.main_message {
212
+	height: calc(100% - 160px);
213
+	padding: 0 10pxchatlist_con;
214
+}
215
+
216
+.chat_person {
217
+	position: absolute;
218
+	width: 100%;
219
+	top: 0;
220
+	left: 0;
221
+	height: 2pc;
222
+	line-height: 2pc;
223
+	border-bottom: 1px solid #ddd;
224
+	background: #fff;
225
+}
226
+
227
+.main_message li {
228
+	margin-bottom: 15px;
229
+}
230
+
231
+.main_message .message_time {
232
+	margin: 7px 0;
233
+	text-align: center;
234
+}
235
+
236
+.main_message .ver_middle {
237
+	float: left;
238
+	margin: 0 10px 0 0;
239
+	border-radius: 3px;
240
+}
241
+
242
+.main_message .message_text {
243
+	display: inline-block;
244
+	position: relative;
245
+	padding: 0 10px;
246
+	max-width: calc(100% - 40px);
247
+	min-height: 30px;
248
+	line-height: 2.5;
249
+	font-size: 9pt;
250
+	text-align: left;
251
+	word-break: break-all;
252
+	background-color: #fafafa;
253
+	border-radius: 4px;
254
+}
255
+
256
+.main_message .message_text:before {
257
+	content: " ";
258
+	position: absolute;
259
+	top: 9px;
260
+	right: 100%;
261
+	border: 6px solid transparent;
262
+	border-right-color: #fafafa;
263
+}
264
+
265
+.main_message .self {
266
+	text-align: right;
267
+}
268
+
269
+.main_message .self .ver_middle {
270
+	float: right;
271
+	margin: 0 0 0 10px;
272
+}
273
+
274
+.main_message .self .message_text {
275
+	background-color: #b2e281;
276
+}
277
+
278
+.main_message .self .message_text:before {
279
+	right: inherit;
280
+	left: 100%;
281
+	border-right-color: transparent;
282
+	border-left-color: #b2e281;
283
+}
284
+
285
+.main_sendMessage {
286
+	position: absolute;
287
+	width: 100%;
288
+	bottom: 0;
289
+	left: 0;
290
+	height: 10pc;
291
+	border-top: 1px solid #ddd;
292
+	background: #fff;
293
+}
294
+
295
+.main_sendMessage textarea {
296
+	padding: 10px;
297
+	height: 80%;
298
+	width: 100%;
299
+	border: none;
300
+	outline: 0;
301
+	font-family: Micrsofot Yahei;
302
+	resize: none;
303
+}
304
+
305
+.main_sendMessage .send_btn {
306
+	height: 20%;
307
+	text-align: right;
308
+	color: #4d4d4d;
309
+	padding-right: 20px;
310
+	margin-top: -24px;
311
+}
312
+
313
+.main_sendMessage .send_btn button {
314
+	border: 1px solid #ccc;
315
+	background: #fff;
316
+	outline: none;
317
+}
318
+
319
+.main_sendMessage .send_btn button:hover {
320
+	background: #b2e281;
321
+}
322
+
323
+
324
+/*聊天区域结束*/
325
+
326
+
327
+/*后来添加改变的*/
328
+
329
+.more {
330
+	display: block;
331
+	text-align: center;
332
+}
333
+
334
+.more:hover {
335
+	text-decoration: underline;
336
+}
337
+
338
+.tabMain {
339
+	display: block;
340
+	height: 100%;
341
+}
342
+
343
+.tabMain.activess {
344
+	display: block!important;
345
+}
346
+
347
+.notice {
348
+	display: block;
349
+	text-align: center;
350
+	color: red;
351
+}
352
+
353
+.chatlist_con {
354
+	overflow-y: auto;
355
+	width: 100%;
356
+	height: 100%;
357
+	padding: 20px 27px 60px;
358
+	box-sizing: border-box;
359
+}
360
+
361
+.chat_main {
362
+	float: left;
363
+	width: 700px;
364
+}
365
+
366
+.closeds {
367
+	position: absolute;
368
+	right: 10px;
369
+	top: 33%;
370
+	display: none;
371
+}
372
+
373
+.pie {
374
+	position: absolute;
375
+	right: 30px;
376
+	top: 33%;
377
+	display: none;
378
+}
379
+
380
+.sidebar_list li {
381
+	position: relative;
382
+}
383
+
384
+.sidebar_list li:hover .closeds {
385
+	display: block;
386
+}
387
+
388
+.sidebar_list li .closeds:hover {
389
+	color: red;
390
+}
391
+
392
+.close_icon {
393
+	font-size: 27px;
394
+	font-weight: 600;
395
+	position: absolute;
396
+	right: 21px;
397
+	z-index: 40000;
398
+	top: 10px;
399
+	cursor: pointer;
400
+}
401
+.close_icon img{width: 20px;height: 15px;}
402
+.name {
403
+	border-bottom: 1px solid rgb(221, 221, 221);
404
+	text-align: left;
405
+	font-size: 20px;
406
+	padding: 16px 20px;
407
+	color: rgb(0, 0, 0);
408
+	cursor: move;
409
+}
410
+.reply_btn{
411
+	border: 1px solid #ccc;
412
+	background: #fff;
413
+	outline: none;
414
+}
415
+.reply_btn:hover{
416
+	background: #b2e281;
417
+}
418
+.con{
419
+	position: absolute;
420
+	bottom: 55px;
421
+	right: 20px;
422
+	width: 210px;
423
+	max-height: 326px;
424
+	overflow: auto;
425
+	/*padding: 10px 15px;*/
426
+	background-color: #fff;
427
+	z-index: 120;
428
+	font-size: 9pt;
429
+	border: 1px solid rgb(221,221,221);
430
+	display: none;
431
+}
432
+.con li{
433
+	padding: 4px 15px;
434
+}
435
+.con li:hover{
436
+	background-color: rgb(36,159,234);
437
+}
438
+#preview{
439
+	position: absolute;
440
+	top: 7px;
441
+	left: 10px;
442
+}
443
+.message_img img{
444
+	width: 135px;
445
+	height: 115px;
446
+	background-size: 100% 100%;
447
+	background-repeat: no-repeat;
448
+	background-position: center;
449
+}
450
+#scwj{
451
+	border: 1px solid rgb(204,204,204);
452
+	outline: none;
453
+	border-radius: 5px;
454
+}
455
+.imgDetial{
456
+	background-color: rgb(72,72,72);
457
+	width: 100%;
458
+	height: 100%;
459
+	position: absolute;
460
+	top: 0;
461
+	left: 0;
462
+	z-index: 1000000;
463
+	display: none;
464
+	text-align: center;
465
+	padding: 50px 0;
466
+	overflow: auto;
467
+	box-sizing: border-box;
468
+	opacity: 0.95;
469
+}
470
+.closeIcon{
471
+	font-size: 50px;
472
+	color: #fff;
473
+	position: absolute;
474
+	top: 25px;
475
+	right: 25px;
476
+	cursor: pointer;
477
+	display: inline-block;
478
+}
479
+/* .imgDetial img{
480
+	max-width: 1300px;
481
+	height: 800px;
482
+} */

BIN
zyChat/img/back.png


BIN
zyChat/img/kefuTx.png


+ 15 - 0
zyChat/index.html

@@ -0,0 +1,15 @@
1
+<!DOCTYPE html>
2
+<html>
3
+	<head>
4
+		<meta charset="UTF-8">
5
+		<title></title>
6
+	</head>
7
+	<body>
8
+		<button id="chat">11111</button>
9
+	</body>
10
+	<script type="text/javascript">
11
+		chat.onclick=function(){
12
+			location.href='chat.html'
13
+		}
14
+	</script>
15
+</html>

+ 341 - 0
zyChat/js/chat.js

@@ -0,0 +1,341 @@
1
+var bDrag = false;
2
+var disX = disY = 0;
3
+var chat = document.getElementById('chat')
4
+var chart_name = document.getElementsByClassName('name')[0];
5
+var userCode = window.localStorage.getItem('userCode')
6
+var touristCode = window.localStorage.getItem('touristCode')
7
+var touserid;
8
+var aa;
9
+var flag=0;
10
+var flagAct;
11
+var id = parseInt(Math.random() * 100000);
12
+if(userCode == null && touristCode == null) {
13
+	var id = parseInt(Math.random() * 100000)
14
+	userCode = id;
15
+	window.localStorage.setItem('touristCode', id);
16
+} else if(userCode == null && touristCode != null) {
17
+	userCode = touristCode;
18
+}
19
+//获取客服工号
20
+getTouserid();
21
+//获取聊天列表
22
+getchatinglist();
23
+GetOnlineservicetinfo()
24
+aa = setInterval(function() {
25
+	GetOnlineservicetinfo()
26
+}, 500)
27
+//移动拖拽弹框
28
+chart_name.onmousedown = function(event) {
29
+	var event = event || window.event;
30
+	bDrag = true;
31
+	disX = event.clientX - chat.offsetLeft;
32
+	disY = event.clientY - chat.offsetTop;
33
+	this.setCapture && this.setCapture();
34
+	return false
35
+};
36
+document.onmousemove = function(event) {
37
+	if(!bDrag) return;
38
+	var event = event || window.event;
39
+	var iL = event.clientX - disX;
40
+	var iT = event.clientY - disY;
41
+	var maxL = document.documentElement.clientWidth - chat.offsetWidth;
42
+	var maxT = document.documentElement.clientHeight - chat.offsetHeight;
43
+	iL = iL < 0 ? 0 : iL;
44
+	iL = iL > maxL ? maxL : iL;
45
+	iT = iT < 0 ? 0 : iT;
46
+	iT = iT > maxT ? maxT : iT;
47
+
48
+	chat.style.marginTop = chat.style.marginLeft = 0;
49
+	chat.style.left = iL + "px";
50
+	chat.style.top = iT + "px";
51
+	return false
52
+};
53
+document.onmouseup = window.onblur = chart_name.onlosecapture = function() {
54
+	bDrag = false;
55
+	chart_name.releaseCapture && chart_name.releaseCapture();
56
+};
57
+window.onkeydown = function(e) {
58
+	if(e.keyCode == 13) {
59
+		sendinfo();
60
+		flag = 0
61
+	}
62
+}
63
+if (flag = 0) {
64
+	$('.chatlist_con').scrollTop($('.chatlist_con')[0].scrollHeight);
65
+}
66
+
67
+//})
68
+$('.close_icon').click(function() {
69
+	window.location.href = "javascript:history.go(-1)";
70
+	clearInterval(aa)
71
+})
72
+//列表点击样式
73
+$('.sidebar_list').click(function(e) {
74
+	if(e.target.tagName != 'LI') {
75
+		return;
76
+	}
77
+	flag=0;
78
+	if (flag == 0) {
79
+		$('.chatlist_con').scrollTop($('.chatlist_con')[0].scrollHeight);
80
+	}
81
+	$(e.target).addClass('actives');
82
+	$(e.target).siblings().removeClass('actives')
83
+	touserid = $(e.target).children('p').eq(0).text()
84
+	console.log(touserid)
85
+	$('.name').text(touserid);
86
+	GetOnlineservicetinfo()
87
+})
88
+//快捷消息回复模板
89
+$('.reply_btn').click(function() {
90
+	if ($('.con').css('display') == 'block') {
91
+		$('.con').hide()
92
+	} else {
93
+		$('.con').show()
94
+	}
95
+	getMessage();
96
+})
97
+$('.con').click(function(e) {
98
+	if (e.target.tagName == 'UL') {
99
+		return false;
100
+	}
101
+	let messgaeCont = $(e.target).html();
102
+	const arr = messgaeCont.split('、');
103
+	$('.send_content').val(arr[1]);
104
+	$('.con').hide()
105
+})
106
+//发送图片
107
+$("#scwj").click(function() {
108
+	$("#upFile").trigger("click");
109
+})
110
+$("#upFile").change(function() {
111
+	upload();
112
+});
113
+//快捷回复
114
+function getMessage() {
115
+	$.ajax({
116
+		type: "get",
117
+		url: huayi.config.callcenter_url + "testusertypeapi/api/TestUserType/getmassmodellistall",
118
+		async: true,
119
+		dataType: 'json',
120
+		data: {},
121
+		success: function(res) {
122
+			let messageStr = ''
123
+			res.data.forEach(function(v, n) {
124
+				messageStr += '<li>' + (n + 1) + '、' + v.massmodelcenter + '</li>'
125
+			})
126
+			$('.con').html(messageStr);
127
+		}
128
+	});
129
+}
130
+//发送图片
131
+//图片上传预览 IE是用了滤镜。
132
+var file = document.getElementById("upFile");
133
+function upload() {
134
+	flagAct=1;
135
+	var MAXWIDTH = 170;
136
+	var MAXHEIGHT = 120;
137
+	var div = document.getElementById('preview');
138
+	if (file.files && file.files[0]) {
139
+		div.innerHTML = '<img id=imghead>';
140
+		var img = document.getElementById('imghead');
141
+		img.onload = function() {
142
+			var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight);
143
+			img.width = rect.width;
144
+			img.height = rect.height;
145
+			// img.style.marginLeft = rect.left+'px';
146
+			// img.style.marginTop = rect.top + 'px';
147
+		}
148
+		var reader = new FileReader();
149
+		reader.onload = function(evt) {
150
+			img.src = evt.target.result;
151
+		}
152
+		reader.readAsDataURL(file.files[0]);
153
+	}
154
+}
155
+function clacImgZoomParam(maxWidth, maxHeight, width, height) {
156
+	var param = {
157
+		top: 0,
158
+		left: 0,
159
+		width: width,
160
+		height: height
161
+	};
162
+	if (width > maxWidth || height > maxHeight) {
163
+		rateWidth = width / maxWidth;
164
+		rateHeight = height / maxHeight;
165
+
166
+		if (rateWidth > rateHeight) {
167
+			param.width = maxWidth;
168
+			param.height = Math.round(height / rateWidth);
169
+		} else {
170
+			param.width = Math.round(width / rateHeight);
171
+			param.height = maxHeight;
172
+		}
173
+	}
174
+
175
+	param.left = Math.round((maxWidth - param.width) / 2);
176
+	param.top = Math.round((maxHeight - param.height) / 2);
177
+	return param;
178
+}
179
+//发送消息
180
+function sendinfo() {
181
+	flag = 0
182
+	console.log(flagAct)
183
+	//发送聊天消息
184
+	if(flagAct==1){
185
+		if(file.files.length > 0) {
186
+			var formData = new FormData();
187
+			for(var i = 0; i < file.files.length; i++) {
188
+				formData.append('file' + i, file.files[i]);
189
+			}
190
+			formData.append("fromuserid",userCode)
191
+			formData.append("touserid",touserid)
192
+			$.ajax({
193
+				url: 'http://192.168.5.46:28000/testusertypeapi/api/TestUserType/addonlineserviceimg',
194
+				type: "POST",
195
+				data: formData,
196
+				/**
197
+				 *必须false才会自动加上正确的Content-Type
198
+				 */
199
+				contentType: false,
200
+				/**
201
+				 * 必须false才会避开jQuery对 formdata 的默认处理
202
+				 * XMLHttpRequest会对 formdata 进行正确的处理
203
+				 */
204
+				processData: false,
205
+				success: function(result) {
206
+					$('#imghead').css('display','none');
207
+					flagAct=0
208
+				}
209
+			});
210
+		}
211
+	}else{
212
+		if ($('.send_content').val() == '') {
213
+			return false;
214
+		}
215
+		$.ajax({
216
+			type: "get",
217
+			url: huayi.config.callcenter_url + "testusertypeapi/api/TestUserType/AddOnlineservice",
218
+			async: true,
219
+			dataType: 'json',
220
+			data: {
221
+				Msgcontent: $('.send_content').val(),
222
+				fromuserid: userCode,
223
+				touserid: touserid
224
+			},
225
+			success: function(res) {
226
+				$('.send_content').val('')
227
+			}
228
+		});
229
+	}
230
+	
231
+}
232
+
233
+//获取聊天记录
234
+function GetOnlineservicetinfo() {
235
+	$.ajax({
236
+		type: "get",
237
+		url: huayi.config.callcenter_url + "testusertypeapi/api/TestUserType/GetOnlineservicetinfo",
238
+		async: true,
239
+		dataType: 'json',
240
+		data: {
241
+			fromuserid: userCode,
242
+			touserid: touserid
243
+		},
244
+		success: function(res) {
245
+			let str1 = ''
246
+			res.data.forEach(function(v, n) {
247
+				if (v.fromuserid == userCode) {
248
+					if(v.imgurlinfo!=null&&v.imgurlinfo!=''){
249
+						str1 += '<li><p class="message_time "><span>' + v.createtime +
250
+							'</span></p><div class="message_mincon self"><div class="message_img "><img  onclick="imgEnlarge(\'' + v.imgurlinfo+'\')" src="' +huayi.config.img_url+
251
+							v.imgurlinfosl  + '"></div></div></li>'
252
+						
253
+					}else{
254
+						str1 += '<li><p class="message_time "><span>' + v.createtime +
255
+							'</span></p><div class="message_mincon self"><div class="message_text ">' +
256
+							v.Msgcontent + '</div></div></li>'
257
+					}
258
+				} else {
259
+					if(v.imgurlinfo!=null&&v.imgurlinfo!=''){
260
+						str1 += '<li><p class="message_time "><span>' + v.createtime +
261
+							'</span></p><div class="message_mincon"><div class="message_img"><img  onclick="imgEnlarge(\'' + v.imgurlinfo+'\')" src="' +huayi.config.img_url+
262
+							v.imgurlinfosl  + '"></div></div></li>'
263
+					}else{
264
+						str1 += '<li><p class="message_time "><span>' + v.createtime +
265
+							'</span></p><div class="message_mincon"><div class="message_text ">' +
266
+							v.Msgcontent + '</div></div></li>'
267
+					}
268
+					
269
+				}
270
+			})
271
+			$('.chatlist_con').html(str1);
272
+			//图片放大
273
+			if (flag == 0) {
274
+				$('.chatlist_con').scrollTop($('.chatlist_con')[0].scrollHeight);
275
+				flag = 1
276
+			}
277
+			
278
+		}
279
+	});
280
+}
281
+function imgEnlarge(str){
282
+	// layer.photos({
283
+	// 	photos: '.message_img',
284
+	// 	anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)
285
+	// });
286
+	$('.imgDetial').html('<span class="closeIcon" onclick="closeImg()">×</span><img src="'+huayi.config.img_url+str+'">');
287
+	$('.imgDetial').css('display','block')
288
+}
289
+function closeImg(){
290
+	$('.imgDetial').css('display','none')
291
+}
292
+//获取客服工号
293
+function getTouserid() {
294
+	$.ajax({
295
+		type: "get",
296
+		url: huayi.config.callcenter_url + "testusertypeapi/api/TestUserType/getzxuserinfo",
297
+		async: false,
298
+		dataType: 'json',
299
+		data: {
300
+			fromuserid: userCode
301
+		},
302
+		success: function(res) {
303
+			touserid = res.data;
304
+			$('.name').text(touserid)
305
+		}
306
+	});
307
+}
308
+
309
+//获取聊天列表
310
+function getchatinglist() {
311
+	$.ajax({
312
+		type: "get",
313
+		url: huayi.config.callcenter_url + "testusertypeapi/api/TestUserType/getchatinglist",
314
+		async: true,
315
+		dataType: 'json',
316
+		data: {
317
+			usercode: userCode
318
+		},
319
+		success: function(res) {
320
+			let str = '';
321
+			let num;
322
+			res.data.forEach(function(v, n) {
323
+				str += '<li><p class="chat_name">' + v.usercode + '</p></li>'
324
+			})
325
+			$('.sidebar_list').html(str);
326
+			
327
+			let className=document.getElementsByClassName('chat_name');
328
+			for(let i=0;i<className.length;i++){
329
+				if(className[i].innerText==String(touserid)){
330
+					num=i-1
331
+					$(".sidebar_list li").eq(num).addClass('actives');
332
+				}
333
+			}
334
+		}
335
+	});
336
+}
337
+
338
+//查看更多
339
+function getmore(ele) {
340
+	console.log("你点击了查看更多")
341
+}

Plik diff jest za duży
+ 6 - 0
zyChat/js/jquery.min.js


Plik diff jest za duży
+ 2 - 0
zyChat/js/layer/layer.js


BIN
zyChat/js/layer/theme/default/icon-ext.png


BIN
zyChat/js/layer/theme/default/icon.png


Plik diff jest za duży
+ 1 - 0
zyChat/js/layer/theme/default/layer.css


BIN
zyChat/js/layer/theme/default/loading-0.gif


BIN
zyChat/js/layer/theme/default/loading-1.gif


BIN
zyChat/js/layer/theme/default/loading-2.gif


+ 28 - 0
zyChat/script/huayi.config.js

@@ -0,0 +1,28 @@
1
+if(huayi == undefined) {
2
+	var huayi = {};
3
+}
4
+huayi.config = {
5
+	//测试环境
6
+	callcenter_url: "http://192.168.5.46:28000/", // 后端API站IP和端口
7
+	call_url:"http://192.168.1.26:8082/",  //话务IP和端口
8
+	img_url:"http://192.168.5.46/",
9
+	//callcenter_url: "http://localhost:63651/",
10
+	socket_ip: "192.168.8.7", // WebSocket通讯ip192.168.5.41
11
+	socket_port: "8081", // WebSocket通讯端口
12
+	callcenter_acd_url: "http://192.168.5.41:80/", // ACD 对应的监听服务地址 用于这个坐席实时状态HTTP路由
13
+	callcenter_cti_url: "http://192.168.5.41:9001/", // CTI 对应的监听服务地址 坐席通话关联状态HTTP路由
14
+	
15
+	// 正式环境
16
+	// callcenter_url: "http://122.114.231.155:28000/", // 后端API站IP和端口
17
+// 	callcenter_url: "http://122.114.109.238:28000/", // 后端API站IP和端口 之前老地址已经不用
18
+// 	socket_ip: "122.114.109.141", // WebSocket通讯ip
19
+// 	socket_port: "28820", // WebSocket通讯端口
20
+// 	callcenter_acd_url: "http://122.114.109.141:8002/", // ACD 用于这个坐席实时状态HTTP路由
21
+// 	callcenter_cti_url: "http://122.114.109.141:9021/", // CTI 坐席通话关联状态HTTP路由
22
+	
23
+	repairPlatformTime: 10000, //报修平台 数据刷新间隔
24
+	taskRealInfoTime: 10000, //右上角当前任务信息  数据刷新间隔
25
+	monitorPlatformTime: 5000, //自动外呼监控  坐席监控  数据刷新间隔
26
+	menuworktime: 30000,        //菜单工单数量刷新间隔
27
+	indextime: 5000             //首页报表刷新间隔
28
+};