浏览代码

update pc_chat

luke 6 年之前
父节点
当前提交
430687434e
共有 2 个文件被更改,包括 25 次插入17 次删除
  1. 23 15
      pc_chat/src/components/chat.vue
  2. 2 2
      pc_chat/src/components/leaveMsg.vue

+ 23 - 15
pc_chat/src/components/chat.vue

@@ -178,9 +178,10 @@
 								<div v-if="item.type == 'tips'">
 									<div class="promptBox" v-if="item.str == 'resigtermsg'">
 										<div class="prompt help">
-											<span>客服已经关闭会话,如需继续咨询请重新连接客服</span>
+											<span>本次会话已关闭,如需继续咨询请重新连接客服</span>
 										</div>
 									</div>
+
 								</div>
 							</div>
 
@@ -202,11 +203,7 @@
 <!--							</div>-->
 
 
-							<div class="promptBox " v-if="serverNotOnlin">
-								<div class="prompt help">
-									<span>{{serviceNotOnlineText}}</span>
-								</div>
-							</div>
+
 
 							<!-- 排队等待 -->
 							<div class="evaluate" v-if="waitingMsg">
@@ -651,6 +648,7 @@
 				fit:'contain', // 图片样式
 				resigtermsg:false, //提示重连
 				evaluateNum:false,
+				jumps:false,
 			}
 		},
 		filters: {
@@ -777,7 +775,7 @@
 								data: {
 									groups_id: '1',
 									robot_name: this.shieldingKeyword(formatStr),
-									webTime: this.webTime,
+									webTime: this.webTime = this.webTime,
 									robotgroups_id: '1',
 								}
 							}))
@@ -804,7 +802,7 @@
 										img: res.data.data.src,
 										type: 'user'
 									}),
-									webTime: this.webTime,
+									webTime: this.webTime = this.webTime,
 									to_id: this.service.kf_id,
 									to_name: this.service.kf_name,
 									sensitiveNumber: this.sensitiveNumber,
@@ -1296,8 +1294,8 @@
 					this.comtSuccess = false;
 					this.showleaveIcon = false;
 					this.waitingMsg = false;
-					this.selNum = 0;
-					this.tokNum = 0;
+					this.selNum = this.selNum;
+					this.tokNum = this.tokNum;
 					this.service_on = true;
 					this.closeByServer = false;
 					// console.log(redata.data.evaluate_id,"评价数量")
@@ -1375,7 +1373,7 @@
 							this.$set(this.chatCont[num], 'time', '');
 						}
 					} else {
-						this.webTime = redata.data.time;
+						this.webTime = redata.data.time = redata.data.time;
 						this.$set(this.chatCont[num], 'time', redata.data.time);
 					}
 
@@ -1391,6 +1389,7 @@
 				}
 				// 客服关闭会话.
 				if (redata.message_type == 'closeBysever') {
+					this.jumps = false;
 					this.machineAndAtl = 10;
 					this.selNum = 0;
 					this.showleaveIcon = true;
@@ -1398,13 +1397,15 @@
 					// 关闭清除历史信息
 					this.hisSviceChat = [];
 					this.customerSviceChat = [];
+					this.selNum = 0;
+					this.tokNum = 0;
 				}
 				// 客服掉线.
 				if (redata.message_type == 'serviceoffline') {
 					this.serviceNotOnlineText = redata.msg;
 					this.service_on = false;
 					this.serverNotOnlin = true;
-					// this.chatCont.push({type:"tips",str:"serverNotOnlin"})
+					this.chatCont.push({type:"tips",str:"serverNotOnlin"})
 					this.closeByServer = true;
 				}
 				// 客服转接
@@ -1423,6 +1424,7 @@
 				}
 				// 客服等待排队
 				if (redata.message_type == "inqueue") {
+					this.jumps = true;
 					this.waitingMsg = true;
 					this.automaticRolling();
 					this.waitingText = redata.content;
@@ -1460,13 +1462,14 @@
 					}
 				}
 
-				//
+				// 退出排队
 				if(redata.message_type == 'cancelqueueret') {
-					console.log(redata)
+					this.jumps = false;
 				}
 			},
 
 			closedWating() {
+				this.jumps = true;
 				this.waitingMsg = false;
 				let data = {
 					"type": "cancelqueue",
@@ -1594,7 +1597,12 @@
 
 			/*************跳转人工客服***************** */
 			jumpService(id, name) {
-
+				if(this.jumps){
+					this.$alert('请先退出排队,再进行操作。','提示信息',{
+						confirmButtonText: '确定',
+					});
+					return false
+				}
 				this.jumpArtl = true;
 				this.closeByServer = false;
 				this.group = id;

+ 2 - 2
pc_chat/src/components/leaveMsg.vue

@@ -51,8 +51,8 @@
 							<span>您的留言信息</span>
 							<span class="star"> *</span>
 						</label>
-						<el-input type="textarea" @blur="widthCheck($event.target, 100)" placeholder="比赛中遇到作弊怎么办?"
-								  v-model="leaveInfor"></el-input>
+						<el-input maxlength="120"  show-word-limit type="textarea" @blur="widthCheck($event.target, 100)" placeholder="比赛中遇到作弊怎么办?"
+								  v-model.trim="leaveInfor"></el-input>
 					</div>
 					<!-- 上传图片 -->
 					<div class="addPhoto">