Harley 6 سال پیش
والد
کامیت
4d29097de8

+ 3 - 3
service/src/App.vue

@@ -43,7 +43,7 @@
 			/**************************************/
 			//连接成功
 			websocketonopen() {
-				// console.log('已经链接');
+				console.log('已经链接');
 				let user_info = this.$store.getters.get_user_info;
 				if(user_info){
 					this.$websocket.send(JSON.stringify({
@@ -93,7 +93,6 @@
 				let current_session  = getters.get_current;//当前会话
 				let session_name  = getters.get_session_name;//当前用户名
 
-				if(e.data.type == "pong" ) return
 				this.$store.dispatch("SET_SESSION_MESSAGE",JSON.parse(e.data));
 
 				// 用户接入数据
@@ -199,6 +198,7 @@
 						_this.$store.dispatch("SET_SESSION",session);
 					})
 				}
+				// history
 
 				//reLoginErr
 				if(redata.message_type == "reLoginErr"){
@@ -287,7 +287,7 @@
 					time[0] =(new Date( time[0].replace(/-/g,'/')).getTime()) /1000;
 					sessionStorage.setItem("time",JSON.stringify(time));
 					sessionStorage.setItem("logo",res.data.data.logo);
-					this.apiToken = this.$md5('customer-service'+time[0]+window.location.origin)
+					this.apiToken = this.$md5('customer-service'+window.location.origin)
 					this.initWebSocket(this.apiToken);
 				}
 			});

+ 2 - 1
service/src/components/hader.vue

@@ -105,7 +105,8 @@
 				this.$store.dispatch("SET_CURRENT",[]);//当前会话数据
       			this.$store.dispatch("SET_SESSION_NAME",'');//当前会话对象名
 				this.$store.dispatch("SET_SESSION_MESSAGE",{});
-				this.$store.dispatch("SET_SOCKET_OPEN",false);//列表下标  
+				this.$store.dispatch("SET_SOCKET_OPEN",false);//列表下标 
+				this.$store.dispatch("SET_NAVSTATE", 'TheCurrentSession'); 
 				this.$websocket.close();
 				// this.$socket_open = false;
 				

+ 21 - 15
service/src/components/historicalRecord.vue

@@ -13,8 +13,11 @@
                         <div class="u_name">
                             <span>{{user_name}}</span>
                         </div>
-                        <div class="btn_untreated">
-                            <!-- <span>未处理</span> -->
+                        <div v-if="isShowBt"  @click="onShowBt" class="btn_untreated">
+                            <span >加载更多消息</span>
+                        </div>
+                        <div v-else="">
+
                         </div>
                     <!-- </div> -->
                 </div>
@@ -131,11 +134,13 @@ export default {
             stateType:'',
             frce:'',
             inputValse:'',
-            dataList:'',//会话记录
+            dataList:[],//会话记录
             alarm:'',//评价谢谢
             account:'',//用户信息
             // imgsrc:'http://192.168.2.186:8090'
             imgsrc:'http://kfadmin.bocai186.com',//图片路径域 
+            isShowBt:false,//显示加载按钮
+            currentPage:'',//当前页数
         }
     },
     mounted() {
@@ -154,13 +159,14 @@ export default {
         /*****************************************/
         //关闭会话详情记录
         shutDown(){
+            this.dataList = [];
             this.$emit('childValue',false);
         },
 
         /*****************************************/
         //获取会话详情列表
         getRecordList(page,size = 10){
-            let str ="historyinfo" + "customer-service" + "history" + this.time[0] + "service";
+            let str ="historyinfo" + "customer-service" + "history" + "service";
             this.get("api/service/history/historyInfo",{
             params:{
                 servicelog_id:this.uid,
@@ -178,22 +184,22 @@ export default {
                     // console.log(res.data.data);
                     this.alarm = res.data.data.alarm;
                     this.account = res.data.data.account;
+                    this.currentPage = res.data.data.currentPage;
+                    this.isShowBt =  res.data.data.countPage > res.data.data.currentPage ? true : false;
                     res.data.data.list.forEach(e => {
-                        //reverse()
                         e.time_line = this.$public.customFormatDateTime(e.time_line);
                         e.content =JSON.parse(e.content);
-                    });
-                    this.dataList = res.data.data.list;
-                    this.dataList.forEach(e=>{
-                        // console.log(e)
                         e.content.text = this.turnFace(e.content.text);
-                        //this.turnFace()
-                    })
-                // this.pages = res.data.data.total;
+                        this.dataList.push(e)
+                    });
                 }
             });
         },
 
+        /****************************/
+        onShowBt(){
+            this.getRecordList( this.currentPage*1 + 1);
+        },
         /******************文字信息转表情******************/
         turnFace(data){
             let str = data.match(/\#\[.*?\]\//g);
@@ -271,15 +277,15 @@ export default {
     border-top: 1px solid #D5E5FF;
 }
 .btn_untreated{
-    width:70px;
+    width:120px;
     line-height: 30px;
-    background:rgba(255,102,0,1);
+    background:#1398e08c;
     border-radius:5px;
     font-size:12px;
     font-weight:400;
     color:rgba(255,255,255,1);
     text-align: center;
-    
+    cursor:pointer;
 }
 .title_time{
     font-size:12px;

+ 12 - 0
service/src/css/index.css

@@ -233,4 +233,16 @@ body {
 
 #leaveMessage .el-drawer__header {
   height: 0!important;
+}
+
+.el-upload--picture-card {
+  width: 100px !important;
+  height: 100px !important;
+  line-height: 100px !important;
+}
+
+.el-upload-list--picture-card .el-upload-list__item {
+  width: 100px !important;
+  height: 100px !important;
+  line-height: 100px !important;
 }

+ 4 - 4
service/src/pages/FastReply.vue

@@ -280,7 +280,7 @@
 			newly() {
 				let obj = {
 					headers: {
-						apiToken: this.$md5("addwords" + "customer-service" + "words" + this.time[0] + "service"),
+						apiToken: this.$md5("addwords" + "customer-service" + "words"  + "service"),
 						userToken: this.token
 					}
 				};
@@ -302,7 +302,7 @@
 			getFastReply() {
 				let obj = {
 					headers: {
-						apiToken: this.$md5("userwords" + "customer-service" + "index" + this.time[0]+ "service"),
+						apiToken: this.$md5("userwords" + "customer-service" + "index"+ "service"),
 						userToken: this.token
 					}
 				};
@@ -319,7 +319,7 @@
 			deleteFastReply() {
 				let obj = {
 					headers: {
-						apiToken: this.$md5("deletewords" + "customer-service" + "words" + this.time[0] + "service"),
+						apiToken: this.$md5("deletewords" + "customer-service" + "words"  + "service"),
 						userToken: this.token
 					}
 				};
@@ -368,7 +368,7 @@
 			changeFastreply(){
 				let obj = {
 					headers: {
-						apiToken: this.$md5("updatewords" + "customer-service" + "words" + this.time[0] + "service"),
+						apiToken: this.$md5("updatewords" + "customer-service" + "words"  + "service"),
 						userToken: this.token
 					}
 				};

+ 133 - 95
service/src/pages/LeaveMessage.vue

@@ -11,7 +11,7 @@
 							<span>留言列表</span>
 						</div>
 						<div class="row center allAlignment">
-							<el-select v-model="value" size="mini" style="width: 28%;" placeholder="请选择">
+							<el-select v-model="value" size="mini" @change="getStartEndAjaxTime(value)"  style="width: 28%;" placeholder="请选择">
 								<el-option
 										v-for="item in options"
 										:key="item.value"
@@ -33,29 +33,38 @@
 					</div>
 					<div style="margin:0 20px;">
 						<el-table
-								:header-cell-style="{background:'#eef1f6',color:'#606266'}"
-								:row-style="{background:'#ffffff',color:'#606266'}"
-								:data="tableData"
-								stripe
-								@row-dblclick="click_row"
-								style="width: 100%;"
+							:header-cell-style="{background:'#eef1f6',color:'#606266'}"
+							:row-style="{background:'#ffffff',color:'#606266'}"
+							:data="tableData"
+							stripe
+							@row-dblclick="click_row"
+							:size="size"
+							style="width: 100%;"
 						>
-							<el-table-column prop="name"  width="140" label="用户名"></el-table-column>
-							<el-table-column prop="add_time" label="留言时间" ></el-table-column>
-							<el-table-column prop="content" label="留言内容"></el-table-column>
-							<el-table-column prop="phone" label="手机"></el-table-column>
-							<el-table-column prop="email" label="邮箱"></el-table-column>
-							<el-table-column prop="message_status"  label="当前状态">
-							<template slot-scope="scope">
-							<span style="color:#FF6600" v-if="scope.row.message_status == '0'"> 未回复</span>
-				  <!-- {{scope.row.currentState}} -->
-									<span v-if="scope.row.message_status == '1'">已回复</span>
+							<el-table-column prop="nick_name"  width="120" label="用户名"></el-table-column>
+							<el-table-column prop="add_time" width="160" label="留言时间" ></el-table-column>
+							<el-table-column prop="content"  label="留言内容">
+								<template slot-scope="scope">
+									<el-popover trigger="hover" placement="top">
+										<p>{{ scope.row.content }}</p>
+										<div slot="reference" class="name-wrapper">
+											<el-tag size="medium">{{ scope.row.content }}</el-tag>
+										</div>
+									</el-popover>
+								</template>
+							</el-table-column>
+							<el-table-column prop="phone" width="160" label="手机"></el-table-column>
+							<el-table-column prop="email" width="240"  label="邮箱"></el-table-column>
+							<el-table-column prop="message_status" width="120"  label="当前状态">
+								<template slot-scope="scope">
+									<span style="color:#FF6600" v-if="scope.row.message_status == '0'"> 未回复</span>
+									<span v-if="scope.row.message_status == '1'">已处理</span>
 								</template>
 							</el-table-column>
-							<el-table-column prop="user_name" label="处理人"></el-table-column>
+							<el-table-column prop="user_name" width="160"label="处理人"></el-table-column>
 						</el-table>
 					</div>
-					<div v-show="pages >9" style=" padding: 10px;">
+					<div  v-show="pages >9" style=" padding: 10px;">
 						<el-pagination background layout="prev, pager, next" prev-text='上一页' next-text='下一页' :total="pages" @prev-click='upData'
 									   @next-click="downData" @current-change="current_page"></el-pagination>
 					</div>
@@ -71,9 +80,8 @@
 					id="leaveMessage"
 					:close-on-press-escape="true"
 					:show-close="false"
-					style="margin-top:50px"
 					:visible.sync="drawer"
-					size="780px">
+					size="1000px">
 				<el-row class="content_box">
 					<el-row class="headers">
 						<el-col :span="12">留言信息</el-col>
@@ -82,13 +90,13 @@
 						<!--						</el-col>-->
 					</el-row>
 					<el-row class="chat_user">
-						<el-col :span="17">
+						<el-col style="	height: 88vh;background:#e6d0d033;overflow-y:auto; padding-bottom: 30px;" :span="16">
 							<div class="chat_box">
 								<!-- 内容展示 -->
 								<el-row id="main">
 									<el-col class="user">
 										<span style="color: #999999;">用户<span style="color:#666;">{{userInfo.account_name}}</span>留言</span>
-										<div class="text">{{getUserItem.content}}</div>
+										<div class="user_text">{{getUserItem.content}}</div>
 										<div class="img block " v-for="item in getUserItem.image">
 											<el-image 
 												style="width: 100px; height: 100px"
@@ -102,7 +110,7 @@
 
 									<div v-if="getUserItem.message_status == 0">
 										<el-col class="serive">
-											<el-input class="text" resize="none" type="textarea"
+											<el-input class="serive_text" resize="none" type="textarea"
 												@blur="widthCheck($event.target, 100)" placeholder="请回复用户留言"
 												v-model="leaveInfor"></el-input>
 										</el-col>
@@ -117,6 +125,7 @@
 													:auto-upload="false"
 													list-type="picture-card"
 													ref="upload"
+													:file-list="fileList"
 													:limit="4"
 													:on-exceed="handleExceed"
 											>
@@ -131,7 +140,7 @@
 									<div v-else>
 										<el-col class="serive">
 											<span style="color: #999999;">客服<span style="color: #5399f5">{{getUserItem.user_name}}</span>回复用户<span style="color:#666;">{{userInfo.account_name}}</span>留言</span>
-											<div class="text">{{getUserItem.reply_content}}</div>
+											<div class="serive_text">{{getUserItem.reply_content}}</div>
 											<div style="padding: 10px 15px;">
 												<div class="img block"  v-for="item in getUserItem.images">
 													<el-image 
@@ -143,17 +152,15 @@
 												</div>
 											</div>
 										</el-col>
-								
 									</div>
-
 								</el-row>
 
-								<el-row v-if="getUserItem.message_status == 0" class="chatting">
+								<div v-if="getUserItem.message_status == 0" class="chatting">
 									<el-button class="send" type="primary" @click="sendMessage">提交</el-button>
-								</el-row>
+								</div>
 							</div>
 						</el-col>
-						<el-col :span="7">
+						<el-col :span="8">
 							<div class="user_box">
 								<ul>
 									<li class="title">用户信息</li>
@@ -231,11 +238,13 @@
 				getUserItem: [],
 				img_http: 'http://kfadmin.bocai186.com',//图片路径域
 				// img_http: 'http://192.168.2.187:8090',//图片路径域
-				uploadImg:[],
+				fileList:[],
 				imgUrl:'',
 				users:[],
 				fit:'contain',
 				isSendMessage:false,//是否提交
+				size:'small',//表单大小
+				isUpImg:false,//是否提交图片片
 			};
 		},
 		components: {
@@ -247,20 +256,14 @@
 		mounted() {
 			this.frceArr = frce.frce;
 			this.value = this.options[2].value;
-			// this.getSessionList(1)
-			this.get_vuex_info();
+			this.users = this.$store.getters.get_user_info
+			this.getStartEndAjaxTime(this.value)
 		},
 		computed: {
 
-			// 获取客服查询时间
-			getValueChange() {
-				return this.value;
-			}
 		},
 		watch: {
-			getValueChange(val) {
-				this.getStartEndAjaxTime(val);
-			}
+		
 		},
 		methods: {
 
@@ -283,15 +286,15 @@
 			// 上传之前
 			beforeAvatarUpload(file) {
 				// console.log(file, '上传之前')
-				const isJPG = file.type == 'image/jpeg' || 'image/jpg' || 'image/png' || 'image/svg';
-				const isLt1M = file.size / 1024 / 1024 < 2;
-				if (!isJPG) {
-					this.$message.error('上传只能是图片格式!');
-				}
-				if (!isLt1M) {
-					this.$message.error('上传文件大小不能超过 2MB!');
-				}
-				return isJPG && isLt1M;
+				// const isJPG = file.type == 'image/jpeg' || 'image/jpg' || 'image/png' || 'image/svg';
+				// const isLt1M = file.size / 1024 / 1024 < 0.5;
+				// if (!isJPG) {
+				// 	this.$message.error('上传只能是图片格式!');
+				// }
+				// if (!isLt1M) {
+				// 	this.$message.error('上传图片大小单张不能超过0.5MB!');
+				// }
+				//return isJPG && isLt1M;
 			},
 			// 上传成功时的回调
 			uploadSuccess(res, file, fileList) {
@@ -307,20 +310,44 @@
 			},
 			//删除回掉
 			handleRemove(file, fileList,) {
-				this.uploadImg = fileList;
+				this.fileList = fileList;
+				// this.uploadImg = fileList;
 			},
 			// 每次改变图片状态返回的回调
 			uploadChange(file, fileList) {
-				// console.log(file, fileList)
-				// this.uploadImg.push(file);
+
+				console.log(file)
+				const isJPG = file.raw.type == 'image/jpeg' || 'image/jpg' || 'image/png' || 'image/svg';
+				const isLt1M = file.size / 1024 / 1024 < 0.5;
+				if (!isJPG) {
+					this.$message.error('上传只能是图片格式!');
+					fileList.pop();
+					this.fileList = fileList;
+					return false
+				}
+				if (!isLt1M) {
+					this.$message.error('上传图片大小单张不能超过0.5MB!');
+					fileList.pop()
+					this.fileList = fileList;
+					return false
+				}
+				this.$refs.upload.clearFiles();
+				if(!this.isUpImg){
+			
+					this.fileList.push(file)
+				}else{
+					this.fileList = fileList
+				}
 			},
 			handleExceed(files, fileList) {
 				this.$message.error(`图片上传数量最多4张`);
 			},
 			//提交留言
 			sendMessage() {
-				if(!this.isSendMessage) return false;
+				// if(!this.isSendMessage) return false;
+				this.isUpImg = true;
 				this.$refs.upload.submit();
+
 				this.isSendMessage  = false;
 				setTimeout(()=>{
 					let parmas = {
@@ -330,10 +357,12 @@
 						"images":this.imgUrl,
 					}
 					this.post('/api/service/Message/dealmessage', parmas).then(res => {
-
 						this.$message.success(res.data.msg);
+						this.leaveInfor = '';
 						this.drawer = false;
-						this.getStartEndAjaxTime(this.value)
+						this.getSessionList(1)
+						this.$refs.upload.clearFiles();
+						this.fileList =[];
 					})
 				},1500)
 			},
@@ -342,7 +371,7 @@
 			get_user(id) {
 				let obj = {
 					headers: {
-						"apiToken": this.$md5('accountInfo' + "customer-service" + 'service' + this.time + 'service'),
+						"apiToken": this.$md5('accountInfo' + "customer-service" + 'service' + 'service'),
 						'userToken': this.token
 					},
 					account_id: id
@@ -355,10 +384,6 @@
 				})
 			},
 
-			get_vuex_info(){
-				this.users = this.$store.getters.get_user_info
-			},
-
 			widthCheck(str, len) {
 				var temp = 0
 				for (var i = 0; i < str.value.length; i++) {
@@ -370,13 +395,13 @@
 
 			// 获取请求参数开始和结束时间
 			getStartEndAjaxTime(e) {
+				console.log(e);
 				let time = new Date();
 				let time2 = new Date(time)
 
 				function getDate(year, month, date) {
 					return year + '-' + ((month + 1) < 10 ? '0' + (month + 1) : month + 1) + '-' + (date < 10 ? '0' + date : date)
 				}
-
 				if (e == "今日") {
 					time2.setDate(time.getDate())
 				} else if (e == "最近3天") {
@@ -395,23 +420,19 @@
 			
 			
 			// 获取列表数据
-			getSessionList(page, size = 10 ) {
+			getSessionList(page, size=10) {
 				let searchText =this.input3
-				let str = "index" + "customer-service" + "Message" + this.time + "service";
-				let obj = {
-					headers: {
-						apiToken: this.$md5(str),
-						userToken: this.token
-					}
-				};
-				this.post("api/service/Message/index", {
+				let str = "index" + "customer-service" + "Message" + "service";
+				this.get("api/service/Message/index", {params:{
 						start_time: this.startTime,
 						end_time: this.endTime,
 						pageSize: size,
-						pageNumber: page,
+						pageNumber:page,
 						searchText:searchText,
-					},
-					obj
+					},headers: {
+						apiToken: this.$md5(str),
+						userToken: this.token
+					}}
 				).then(res => {
 					if (res.data.status == 1) {
 						this.tableData = res.data.data.list;
@@ -424,23 +445,34 @@
 
 			//获取留言列表数据(行)
 			click_row(row, column, event) {
-				// console.log(this.value);
-				console.log(row)
 				this.uid = row.message_id;
 				this.drawer = true;
 				this.isSendMessage = true;
 				this.getUserItem = row;
-				if(this.getUserItem.image.includes(',')){
-					this.getUserItem.image = this.getUserItem.image.split(',');
-				}else{
-					this.getUserItem.image =[this.getUserItem.image]
+				if(this.getUserItem.image){
+					if(this.getUserItem.image.includes(',') && typeof this.getUserItem.image == 'string'){
+						this.getUserItem.image = this.getUserItem.image.split(',');
+					}else{
+						if(typeof this.getUserItem.image == 'string'){
+							this.getUserItem.image =[this.getUserItem.image]
+						}else{
+							this.getUserItem.image =this.getUserItem.image
+						}
+					}
 				}
-				if(this.getUserItem.images.includes(',')){
-					this.getUserItem.images = this.getUserItem.images.split(',');
-				}else{
-					this.getUserItem.images = [this.getUserItem.images]
+				if(this.getUserItem.images){
+					if(this.getUserItem.images.includes(',') && typeof this.getUserItem.images == 'string'){
+						this.getUserItem.images = this.getUserItem.images.split(',');
+					}else{
+						if(typeof this.getUserItem.images == 'string'){
+							this.getUserItem.images = [this.getUserItem.images]
+						}else{
+							this.getUserItem.images = this.getUserItem.images
+						}
+					}
 				}
-				this.get_user(row.message_id)
+				console.log(this.getUserItem.images);
+				this.get_user(row.account_id)
 			},
 			childValue(e) {
 				//console.log(e);
@@ -456,18 +488,24 @@
 </script>
 <style>
 	.el-upload--picture-card {
-		width: 100px;
-		height: 100px;
-		line-height: 100px;
+		width: 100px !important;
+		height: 100px !important;
+		line-height: 100px !important;
 	}
 
 	.el-upload-list--picture-card .el-upload-list__item {
-		width: 100px;
-		height: 100px;
-		line-height: 100px;
+		width: 100px !important;
+		height: 100px !important;
+		line-height: 100px !important;
 	}
 </style>
 <style lang="less" scoped>
+	.name-wrapper{
+		width: 240px;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+	}
 	.chatting {
 		text-align: center;
 	}
@@ -476,15 +514,14 @@
 		padding: 0 10px;
 		text-align: right;
 
-		.text {
+		.serive_text {
+			width: 100%;
 			margin-top: 20px;
 			background: #F5F5F5;
 			border: 1px solid #EEEEEE;
 			padding: 20px;
 			font-size: 14px;
 			color: #666;
-			line-height: 1.8;
-
 			.el-textarea__inner {
 				border: none;
 				resize: none;
@@ -494,14 +531,15 @@
 	}
 
 	.user {
-		.text {
+		.user_text {
+			width: 100%;
 			margin-top: 20px;
 			background: #F5F5F5;
 			border: 1px solid #EEEEEE;
 			padding: 20px;
 			font-size: 14px;
 			color: #666;
-			line-height: 1.8;
+			// line-height: 1.8;
 		}
 
 		.img {

+ 2 - 2
service/src/pages/PersonalInformation.vue

@@ -164,7 +164,7 @@ export default {
     updatepwdAjax() {
       let obj = {
         headers: {
-          apiToken: this.$md5("updatepwd" + "customer-service" + "services" + this.time[0] + "service"),
+          apiToken: this.$md5("updatepwd" + "customer-service" + "services"  + "service"),
           userToken: this.token
         }
       };
@@ -194,7 +194,7 @@ export default {
     userInfoAjax(){
       let obj = {
         headers: {
-          apiToken: this.$md5("updateinfo" + "customer-service" + "services" + this.time[0] + "service"),
+          apiToken: this.$md5("updateinfo" + "customer-service" + "services" + "service"),
           userToken: this.token
         }
       };

+ 13 - 5
service/src/pages/SessionHistory.vue

@@ -44,9 +44,14 @@
 							<el-table-column prop="servicelog_id" label="会话ID" width="100"></el-table-column>
 							<el-table-column prop="intime" label="访客进线时间"></el-table-column>
 							<!-- <el-table-column prop="name" label="接待客服"></el-table-column> -->
-							<el-table-column prop="user_name" label="访客"></el-table-column>
+							<el-table-column prop="user_name" label="访客账号"></el-table-column>
 							<el-table-column prop="start_time" label="会话开始时间"></el-table-column>
-							<el-table-column prop="end_time" label="会话结束时间"></el-table-column>
+							<el-table-column prop="end_time" label="会话结束时间">
+							<!-- <template slot-scope="scope">
+								<span style="color:#FF6600" v-if="scope.row.end_time == '0'"> 未回复</span>
+								<span v-else="scope.row.message_status == '1'">{{scope.row.end_time}}</span>
+							</template> -->
+							</el-table-column>
 							<el-table-column :formatter="evaluateId" prop="evaluate_id" label="满意度" width="80">
 
 							</el-table-column>
@@ -209,7 +214,7 @@
 				let obj = {
 					headers: {
 						// "Content-Type": "application/json",
-						'apiToken': this.$md5("historylist" + "customer-service" + "history" + this.time[0] + "service"),
+						'apiToken': this.$md5("historylist" + "customer-service" + "history" + "service"),
 						'userToken': this.token
 					}
 				}
@@ -222,10 +227,13 @@
 					user_name: this.keyText,
 				}, obj).then(res => {
 					if (res.data.code == 1) {
-						// console.log(res.data.data.list);
 						this.tableData = res.data.data.list;
 						this.tableData.forEach(e => {
-							e.end_time = this.$public.customFormatDateTime(e.end_time);
+							if(e.end_time != '0'){
+								e.end_time = this.$public.customFormatDateTime(e.end_time);
+							}else{
+								e.end_time = '未结束'
+							}
 							e.intime = this.$public.customFormatDateTime(e.intime);
 							e.start_time = this.$public.customFormatDateTime(e.start_time);
 						})

+ 75 - 24
service/src/pages/TheCurrentSession.vue

@@ -46,7 +46,7 @@
 								</div>
 							</div>
 						</el-collapse-item>
-						<el-collapse-item>
+						<!-- <el-collapse-item>
 							<template slot="title">
 								<span>排队中<span>({{lineUp.length}})</span></span>
 							</template>
@@ -56,7 +56,7 @@
 									<span style="color:#999;font-size:12px;">{{item}}</span>
 								</div>
 							</div>
-						</el-collapse-item>
+						</el-collapse-item> -->
 					</el-collapse>
 				</div>
 
@@ -144,16 +144,26 @@
 					<div class="key column allAlignment">
 						<div class="frce row item-center allAlignment">
 							<div class="row ">
-								<img class="hover"
+								<!-- <img class="hover"
 									 :src="isFrce?require('@/assets/img/frcea.png'):require('@/assets/img/frce.png')"
-									 @click="frceClick" style="margin-right:16px;"/>
+									 @click="frceClick" style="margin-right:16px;"/> -->
+
+								<el-popover placement="top-start" width="400" trigger="hover">
+									<ul>
+										<li class="emoticon" v-for="(item,index) in frceArr" :key="item.id">
+											<img class="pointer" :src="require(`@/assets/img/${index}.gif`)"
+												 @click="frceCenterClick(item)" alt="">
+										</li>
+									</ul>
+									<el-button class="expression" slot="reference"></el-button>
+								</el-popover>	 
 								<input type="file" id="file" style="display:none;" @change="uploadIMG"/>
 								<label for="file" class="row item-center" style="height:100%">
 									<img class="hover" src="@/assets/img/img.png"/>
 								</label>
 							</div>
 							<div>
-								<i :class="{disable : is_eva_btn }" @click="evaluation()"
+								<i :class="{disable : is_eva_btn}" @click="evaluation()"
 								   class="el-icon-postcard hover evaluation"></i>
 							</div>
 						</div>
@@ -162,14 +172,6 @@
 						<div class="row rightAlignment" style="width: 100%;">
 							<div @click="sendMessage()" class="msgInputBtn row center">发送</div>
 						</div>
-						<div class="frceBox scroll" v-if="isFrce">
-							<div class="row wrap average">
-								<p class="row center" v-for="(item,index) in frceArr" :key="item.id">
-									<img class="hover" @click="frceCenterClick(item)"
-										 :src="require(`@/assets/img/${index}.gif`)"/>
-								</p>
-							</div>
-						</div>
 					</div>
 					<!-- 发送消息音频提示 -->
 					<!-- <audio id="send" src="@/assets/audio/send.wav"></audio> -->
@@ -276,12 +278,12 @@
 						</div>
 						<div class="user_info_box">
 							<span>手机:</span>
-							<el-input style="width:70%;" v-model="session_user_info.account_phone"
+							<el-input @blur='validation_user_info(1)' style="width:70%;" v-model="session_user_info.account_phone"
 									  placeholder="请输入内容"></el-input>
 						</div>
 						<div class="user_info_box">
 							<span>邮箱:</span>
-							<el-input style="width:70%;" v-model="session_user_info.account_email"
+							<el-input @blur='validation_user_info(2)' style="width:70%;" v-model="session_user_info.account_email"
 									  placeholder="请输入内容"></el-input>
 						</div>
 						<div class="user_info_box">
@@ -374,6 +376,30 @@
 		 *
 		 */
 		methods: {
+
+			/****************************/
+			validation_user_info(type){
+				if(type == 1 && this.session_user_info.account_phone){
+					if(!/^1[34578]\d{9}$/.test(this.session_user_info.account_phone)){
+						this.session_user_info.account_phone = '';
+						this.$message({
+							message: '这不是一个手机号哦!...',
+						type: 'warning'
+					});
+					}
+				}else if(type ==2 && this.session_user_info.account_email ){
+					if(!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.session_user_info.account_email)){
+						this.session_user_info.account_email = ''
+						this.$message({
+							message: '这不是一个邮箱哦!...',
+						type: 'warning'
+					});
+					}
+				}
+				
+
+
+			},
 			/***************图片放大*************** */
 			handlePictureCardPreview(url) {
 				this.dialogImageUrl = url;
@@ -414,6 +440,7 @@
 				//用户离线后会话窗口切换
 				if (redata.message_type == "userClose") {
 					console.log(redata)
+					return false
 				}
 
 				// //用户会话结束窗口切换
@@ -424,6 +451,7 @@
 						this.session_user_info={};
 						this.value = '请选择';
 					}
+					return false
 				}	
 
 
@@ -434,7 +462,7 @@
 						this.options = Object.values(redata.data);
 						// this.value = this.options[0].name;
 					}
-
+					return false
 				}
 
 
@@ -442,6 +470,7 @@
 				if (redata.message_type == "onlinekfs") {
 					this.transferList = [];
 					this.transferList = this.transferList.concat(redata.data);
+					return false
 				}
 
 				//接收会话时间
@@ -449,6 +478,7 @@
 					let data = this.data;
 					data[this.session_marked].time =  redata.data.webTime
 					this.$store.dispatch("SET_CURRENT", data);
+					return false
 				}
 
 				//客服手动转接用户成功
@@ -467,8 +497,11 @@
 						this.$store.dispatch("SET_CURRENT", []);//当前会话数据
 						this.$store.dispatch("SET_SESSION_NAME", '');
 					}
+					return false
+				}
+				if(redata.message_type == 'chatMessage'){
+					this.automaticRolling();
 				}
-				this.automaticRolling();
 			},
 
 
@@ -751,8 +784,7 @@
 					//计算关键词次数
 					this.sensitiveNumber = this.sensitiveNumber + sensitive_data.num;
 				}
-
-
+				
 			},
 
 			/******************开启或关闭表情包******************/
@@ -787,7 +819,7 @@
 			quickReplyInfo() {
 				let obj = {
 					headers: {
-						apiToken: this.$md5("userwords" + "customer-service" + "index" + this.time[0] + "service"),
+						apiToken: this.$md5("userwords" + "customer-service" + "index" + "service"),
 						userToken: this.token
 					}
 				};
@@ -820,7 +852,7 @@
 			get_user(id) {
 				let obj = {
 					headers: {
-						"apiToken": this.$md5('accountInfo' + "customer-service" + 'service' + this.time[0] + 'service'),
+						"apiToken": this.$md5('accountInfo' + "customer-service" + 'service'  + 'service'),
 						'userToken': this.token
 					},
 					account_id: id
@@ -839,7 +871,7 @@
 			get_config_info() {
 				let obj = {
 					headers: {
-						apiToken: this.$md5("minround" + "customer-service" + "evaluate" + this.time[0] + "index"),
+						apiToken: this.$md5("minround" + "customer-service" + "evaluate"  + "index"),
 						userToken: this.token
 					}
 				};
@@ -863,7 +895,7 @@
 			getSensitive() {
 				let obj = {
 					headers: {
-						"apiToken": this.$md5('sensitivewords' + "customer-service" + 'index' + this.time[0] + 'index'),
+						"apiToken": this.$md5('sensitivewords' + "customer-service" + 'index'  + 'index'),
 						'userToken': this.token
 					}
 				};
@@ -893,7 +925,7 @@
 				this.isTrue = false;
 				let obj = {
 					headers: {
-						"apiToken": this.$md5('update' + "customer-service" + 'service' + this.time[0] + 'service'),
+						"apiToken": this.$md5('update' + "customer-service" + 'service' + 'service'),
 						'userToken': this.token
 					},
 					account_id: this.session_user_info.id,
@@ -1156,7 +1188,26 @@
 		content: "\E791";
 		color: #ccc;
 	}
+	
+	.emoticon {
+		width: 30px;
+		height: 30px;
+		display: inline-block;
+	}
+	.expression{
+		display: inline-block;
+		width: 20px;
+		height: 20px;
+		background: url("./../assets/img/frce.png") no-repeat;
+		background-size: 100% 100%;
+		cursor: pointer;
+		margin-right: 10px;
+	}
 
+	.expression:hover {
+		background: url("./../assets/img/frcea.png") no-repeat;
+		background-size: 100% 100%;
+	}
 	.session_choose {
 		background: #F6F8FF;
 	}

+ 1 - 1
service/src/pages/login.vue

@@ -54,7 +54,7 @@
 			loginBtn(){
 				this.time = sessionStorage.getItem('time');
 				if(this.$store.getters.get_socket_open){
-					let apiToken = this.$md5('customer-service'+this.time[0]+window.location.origin)
+					let apiToken = this.$md5('customer-service' + window.location.origin)
 					if(this.account && this.password){
 
 						//进程加载条