Harley 6 lat temu
rodzic
commit
8988d4cb0e

+ 58 - 0
service/src/App.vue

@@ -230,6 +230,64 @@
 				receive.play();
 			},
 
+			/*****************获取当前聊天用户信息****************/
+			get_user_info(type) {
+
+				let  getters = this.$store.getters;
+				//获取vuex数据
+				let session = getters.get_session;//会话列表
+				let offline  = getters.get_offline;//离线列表
+				let sessionType  = getters.get_type;//选择状态(会话/离线)
+				let dataIndex  = getters.get_num;//列表下标
+				let current_session  = getters.get_current;//当前会话
+				let session_name  = getters.get_session_name;//当前用户名
+
+
+					// _this.$store.dispatch("SET_CURRENT",list);//当前会话数据
+					// 	_this.$store.dispatch("SET_SESSION_NAME",name);//当前会话对象名
+					// 	_this.$store.dispatch("SET_NUM",index);
+					// 	_this.$store.dispatch("SET_TYPE",type);
+					// 	_this.$store.dispatch("SET_SESSION",session);
+					// 	_this.$store.dispatch("SET_OFFLINE",offline);
+				if (type.length > 0) {
+					// this.session_user_info = {};
+					if (dataIndex <= type.length) {
+
+						let obj = {
+							headers: {
+								"apiToken": this.$md5('accountInfo' + "customer-service" + 'service' + this.time[0] + 'service'),
+								'userToken': this.token
+							},
+							account_id: type[dataIndex].id
+						};
+
+						this.post('api' + this.$ports.userInfo.accountInfo, obj).then(res => {
+							if (res.data.code == 1) {
+								// console.log(res.data.data);
+								// this.session_user_info = res.data.data;
+								this.$store.dispatch("SET_SESSSION_USER",res.data.data)
+								// console.log(this.options);
+								// for (let i = 0; this.options.length > i; i++) {
+								// 	if (this.options[i].id == res.data.data.label_id) {
+								// 		this.value = this.options[i].name;
+								// 	}
+								// 	break;
+								// }
+								//this.value = res.data.data.label_id
+							}
+						})
+
+
+						//this.session_user_info = type[this.dataIndex].id;
+						// console.log(type[this.dataIndex].id);
+						// this.value = this.session_user_info.label;
+					}
+				} else {
+					// this.session_user_info = {};
+					this.$store.dispatch("SET_SESSSION_USER",{})
+				}
+			},
+
 			/***************************************/
 			//socket重连
 			reconnect(){

+ 55 - 0
service/src/api/http.js

@@ -0,0 +1,55 @@
+import axios from 'axios' // 引入axios
+import qs from 'qs'  // 序列化字符串
+
+// 请求超时时间
+axios.defaults.timeout = 10000
+// 线上
+let Base = 'http://kfadmin.bocai186.com'
+// 开发
+//let Base = 'http://sports.5gogo.com'
+function headerUrl (url) {
+  url = Base +  url
+  console.log(url)
+  return url
+}
+// post请求头
+axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
+export default {
+    /**
+     * get方法对应get请求
+     * @param {String}url 请求地址
+     * @param {Object}params 携带参数
+     * @returns {Promise}
+     */
+    get (url, params) {
+
+    return new Promise((resolve, reject) => {
+        axios.get(headerUrl(url), {
+        params
+        })
+        .then(res => {
+            resolve(res)
+        })
+        .catch(err => {
+            reject(err)
+        })
+    })
+    },
+    /**
+     * post方法对应post请求
+     * @param {String} url 请求地址
+     * @param {Object} params 携带参数
+     * @returns {Promise}
+     */
+    post (url, params) {
+    return new Promise((resolve, reject) => {
+        axios.post(headerUrl(url), qs.stringify(params))
+        .then(res => {
+            resolve(res)
+        })
+        .catch(err => {
+            reject(err)
+        })
+    })
+    }
+}

+ 27 - 54
service/src/components/historicalRecord.vue

@@ -13,11 +13,8 @@
                         <div class="u_name">
                             <span>{{user_name}}</span>
                         </div>
-                        <div v-if="getMore" class="btn_untreated" @click="getMoreList" >
-                             <span>更多消息</span>
-                        </div>
-                        <div v-if="!getMore" class="btn_untreated_off">
-                            <span>更多消息</span>
+                        <div class="btn_untreated">
+                            <!-- <span>未处理</span> -->
                         </div>
                     <!-- </div> -->
                 </div>
@@ -94,23 +91,26 @@
             <div style=" padding: 20px;">
                 <ul style="padding-inline-start:0px; margin-block-start: 0;">
                     <li style="font-weight:bold;font-weight:bold; color:#666666;">用户信息</li>
-                    <li>姓名:{{account.account_name ? account.account_name : "暂无"}}</li>
-                    <li>手机:{{account.account_phone ? account.account_phone : "暂无"}}</li>
-                    <li>邮箱:{{account.account_email ? account.account_email : "暂无"}}</li>
-                    <li>地址:{{account.address ?account.address : "暂无"}}</li>
+                    <li> 姓名:麦丽素</li>
+                    <li>手机:1982720473</li>
+                    <li>邮箱:3ds47287@qq.com</li>
+                    <li>地址:地球</li>
                 </ul>
                 <div>
                     <span>访客备注:</span>
                     <div class="margin_t">
-                        <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="account.remark">
+                        <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="textarea">
                         </el-input>
                     </div>
+                    <div class="bt_save margin_t">
+                        <span>保存</span>
+                    </div>
                 </div>
                 <ul style="padding-inline-start:0px; margin-block-start:0; margin-top:40px;">
                     <li style="font-weight:bold;font-weight:bold; color:#666666;">访问信息</li>
                     <li>来源渠道:直接访问</li>
-                    <li>IP地址:{{account.user_ip ?account.user_ip : "暂无"}}</li>
-                    <li>来源终端:{{account.system  +"-"+ account.browse ? account.system +"-"+ account.browse : "暂无"}}</li>
+                    <li>IP地址:118.2.3.45</li>
+                    <li>来源终端:windows10 - chrome</li>
                 </ul>
             </div>
         </div>
@@ -128,15 +128,11 @@ export default {
             stateType:'',
             frce:'',
             inputValse:'',
-            dataList:[],//会话记录
+            dataList:'',//会话记录
             alarm:'',//评价谢谢
 
             // imgsrc:'http://192.168.2.186:8090'
-            imgsrc:'http://kfadmin.bocai186.com',//图片路径域
-
-            account: [],
-            newpage: 1,
-            getMore:true,
+            imgsrc:'http://kfadmin.bocai186.com',//图片路径域 
         }
     },
     mounted() {
@@ -152,10 +148,6 @@ export default {
         },
     },
     methods:{
-        getMoreList(){
-            this.newpage++;
-            this.getRecordList();
-        },
         /*****************************************/
         //关闭会话详情记录
         shutDown(){
@@ -169,7 +161,7 @@ export default {
             this.get("api/service/history/historyInfo",{
             params:{
                 servicelog_id:this.uid,
-                currentPage: this.newpage,
+                currentPage: page,
                 pageSize: size
             },
             headers:{
@@ -180,27 +172,20 @@ export default {
             }).then(res => {
                 if(res.data.code == 1){
                     res.data.data.list = res.data.data.list.reverse();
-                    this.account = res.data.data.account;
+                    //console.log(res.data.data);
                     this.alarm = res.data.data.alarm;
-
                     res.data.data.list.forEach(e => {
+                        //reverse()
                         e.time_line = this.$public.customFormatDateTime(e.time_line);
-                        e.content = JSON.parse(e.content);
+                        e.content =JSON.parse(e.content);
                     });
-                    if(res.data.data.currentPage > res.data.data.countPage){
-                        this.getMore = false;
-                        return false
-                    }else {
-                        let newList =  res.data.data.list;
-                        console.log(res.data.data)
-                        newList.forEach(e=>{
-                            e.content.text = this.turnFace(e.content.text);
-                            //this.turnFace()
-                        })
-                        this.dataList =  newList.concat(this.dataList);
-                    }
-
-
+                    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;
                 }
             });
         },
@@ -232,7 +217,6 @@ export default {
     width: 855px;
     border: 1px solid #d5e5ff;
     z-index: 10 ;
-    margin-top: 18px !important;
 }
 .del{
     /* position:fixed;*/
@@ -282,27 +266,16 @@ export default {
     height: 160px;
     border-top: 1px solid #D5E5FF;
 }
-.btn_untreated_off {
-    width:70px;
-    line-height: 30px;
-    background: rgb(195, 195, 192);
-    border-radius:5px;
-    font-size:12px;
-    font-weight:400;
-    color:rgba(255,255,255,1);
-    text-align: center;
-    cursor: pointer;
-}
 .btn_untreated{
     width:70px;
     line-height: 30px;
-    background: rgb(89, 115, 255);
+    background:rgba(255,102,0,1);
     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;

+ 1 - 3
service/src/components/leftNav.vue

@@ -92,6 +92,7 @@
 
 			this.titleActive = this.$store.getters.get_navState;
 			this.logo = sessionStorage.getItem('logo');
+			console.log(this.logo, '========logo')
 			// // 获取系统时间
 			// this.get('api'+this.$ports.TIME).then(res => {
 			//   if (res.data.data.time) {
@@ -134,7 +135,4 @@
 		color: #eaf3ff;
 		background: #0d1f47;
 	}
-	.nav p {
-		cursor: pointer;
-	}
 </style>

+ 39 - 46
service/src/components/messageCenter.vue

@@ -22,8 +22,7 @@
 
 				</div>
 				<ul class="message-list" v-if="switchMessageType == 'unread'">
-					<li class="list-item" :class="{active:markupCode == index}" v-for="(item,index) in unreadList"
-						:key="item.id" @click="toReading(item,index)">
+					<li class="list-item"  :class="{active:markupCode == index}"  v-for="(item,index) in unreadList" :key="item.id" @click="toReading(item,index)">
 						<p class="item-info">
 							<span class="name">{{item.title}}</span>
 							<span class="time">{{item.sendtime}}</span>
@@ -33,8 +32,7 @@
 				</ul>
 
 				<ul class="message-list" v-if="switchMessageType == 'read'">
-					<li class="list-item" :class="{active:markupCode == index}" v-for="(item,index) in readList"
-						:key="item.id" @click="toReading(item,index)">
+					<li class="list-item" :class="{active:markupCode == index}" v-for="(item,index) in readList" :key="item.id"  @click="toReading(item,index)">
 						<p class="item-info">
 							<span class="name">{{item.title}}</span>
 							<span class="time">{{item.sendtime}}</span>
@@ -48,13 +46,12 @@
 
 			<el-col :span="18">
 				<el-row class="title">
-					<strong v-if="switchMessageType == 'unread'">客服满意度调查!</strong>
-					<strong v-if="switchMessageType == 'read'" v-html="messageBox.title"></strong>
+					<strong>客服满意度调查!</strong>
 					<i @click="handleClose" class="el-icon-close"></i>
 				</el-row>
 				<el-row class="messageBox" v-if="switchMessageType == 'unread'">
 					<div v-if="unreadList.length > 0">
-						<ul>
+						<ul >
 							<li><p>发件人:{{unreadListOne.admin_name}}</p></li>
 							<li><p>收件人:{{userName}}</p></li>
 							<li><p>时 间:{{unreadListOne.sendtime}}</p></li>
@@ -63,7 +60,7 @@
 					</div>
 				</el-row>
 				<el-row class="messageBox" v-if="switchMessageType == 'read'">
-					<div v-if="readList.length > 0">
+					<div  v-if="readList.length > 0">
 						<ul>
 							<li><p>发件人:{{messageBox.admin_name}}</p></li>
 							<li><p>收件人:{{userName}}</p></li>
@@ -86,22 +83,22 @@
 				drawer: false,
 				switchMessageType: "unread",
 
-				nomessage: true,
+				nomessage:true,
 
-				userID: null,
-				userName: null,
+				userID:null,
+				userName:null,
 				//已读列表
-				readList: [],
+				readList:[],
 				//未读列表
-				unreadList: [],
+				unreadList:[],
 				//未读第一个
-				unreadListOne: {},
+				unreadListOne:{},
 				//未读数量
-				unreadNum: null,
+				unreadNum:null,
 				// 详情
-				messageBox: {},
+				messageBox:{},
 				//标记代码
-				markupCode: 0,
+				markupCode:0,
 
 			}
 		},
@@ -117,7 +114,7 @@
 				this.drawer = data;
 				this.userID = this.$store.getters.get_user_info.id;
 				this.userName = this.$store.getters.get_user_info.user_name;
-				if (data) {
+				if(data){
 					this.readnotice();
 					this.unreadnotice();
 				}
@@ -129,15 +126,15 @@
 			},
 			switchMessage(num) {
 				this.switchMessageType = num;
-				this.markupCode = 0;
-				if (this.switchMessageType == 'unread') {
+				this.markupCode = 0 ;
+				if(this.switchMessageType == 'unread'){
 					this.unreadnotice();
-				} else if (this.switchMessageType == 'read') {
-					this.readnotice();
+				}else if(this.switchMessageType=='read'){
+					this.readnotice();	
 				}
 			},
 			// 已读信息
-			readnotice() {
+			readnotice(){
 				let str = "readnotice" + "customer-service" + "index" + this.time + "service";
 				let obj = {
 					headers: {
@@ -149,17 +146,17 @@
 				};
 				this.post("api/service/index/readnotice", obj).then(res => {
 					// console.log(res)
-					if (res.data.code === 1) {
-						console.log("已读", res.data.data)
-						this.readList = res.data.data;
-						if (res.data.data.length > 0) {
+					if(res.data.code === 1){
+						console.log("已读",res.data.data)
+						this.readList =  res.data.data;
+						if(res.data.data.length > 0){
 							this.messageBox = res.data.data[0];
 						}
 					}
 				});
 			},
 			// 未读信息
-			unreadnotice() {
+			unreadnotice(){
 				let str = "unreadnotice" + "customer-service" + "index" + this.time + "service";
 				let obj = {
 					headers: {
@@ -171,12 +168,12 @@
 				};
 				this.post("api/service/index/unreadnotice", obj).then(res => {
 					console.log(res)
-					if (res.data.code === 1) {
-						console.log("未读", res.data.data)
+					if(res.data.code === 1){
+						console.log("未读",res.data.data)
 						this.unreadList = res.data.data;
 						// console.log(this.unreadListOne,'第一个')
-						this.unreadNum = res.data.data.length > 0 ? res.data.data.length - 1 : 0;
-						if (res.data.data.length > 0) {
+						this.unreadNum =res.data.data.length >0 ? res.data.data.length-1 : 0;
+						if(res.data.data.length > 0){
 							this.unreadListOne = res.data.data[0];
 							this.readInfo(res.data.data[0].id)
 						}
@@ -186,7 +183,7 @@
 			},
 
 			//读取信息
-			readInfo(id) {
+			readInfo(id){
 				//this.messageBox.id
 				let str = "updatenotice" + "customer-service" + "index" + this.time + "service";
 				let obj = {
@@ -199,8 +196,8 @@
 				};
 				this.post("api/service/index/updatenotice", obj).then(res => {
 					console.log(res)
-					if (res.data.code === 1) {
-						console.log("已读", res.data.data)
+					if(res.data.code === 1){
+						console.log("已读",res.data.data)
 						// this.unreadList = res.data.data;
 						// this.unreadListOne = res.data.data[0];
 						// // console.log(this.unreadListOne,'第一个')
@@ -209,16 +206,16 @@
 					}
 				});
 			},
-
+			
 
 			// 点击显示当前详细内容
-			toReading(item, index) {
-				// console.log(item,'击显示当前详细内容');
-				if (this.markupCode == index) return
+			toReading(item,index){
+				// console.log(item,index);
+				if( this.markupCode == index) return
 				this.markupCode = index;
 				this.nomessage = false;
 				this.messageBox = item;
-				if (this.switchMessageType == 'unread') {
+				if(this.switchMessageType == 'unread'){
 					this.readInfo(item.id)
 				}
 			}
@@ -261,10 +258,9 @@
 		// .list-item:nth-of-type(even) {
 		// 	background: #fff;
 		// }
-		.active {
+		.active{
 			background: #F6F8FF;
 		}
-
 		.list-item {
 			padding: 10px 20px;
 
@@ -272,7 +268,7 @@
 				color: #666;
 				font-size: 14px;
 				overflow: hidden;
-				text-overflow: ellipsis;
+				text-overflow:ellipsis;
 				white-space: nowrap;
 			}
 		}
@@ -309,10 +305,8 @@
 
 	.messageBox {
 		padding: 15px 20px;
-
 		li {
 			margin: 10px 0;
-
 			p {
 				font-size: 14px;
 				color: #999999;
@@ -337,7 +331,6 @@
 		top: 12px !important;
 		right: 10px !important;
 	}
-
 	.el-drawer__container {
 		outline: none !important;
 	}

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

@@ -220,4 +220,13 @@ body {
 
 #sessionHistory .el-icon-search {
   margin-left: 10px !important;
+}
+
+#user_info_box .el-input__inner {
+  height: 30px !important;
+  line-height: 30px !important;
+}
+#user_info_box .el-input__icon {
+  /* height: 30px !important; */
+  line-height: 30px !important;
 }

+ 5 - 1
service/src/main.js

@@ -6,6 +6,7 @@ import router from './router';
 import store from './store';
 import ElementUI from 'element-ui';
 import frce from '../static/frce';
+import http from './api/http';
 // import publicMethods from '../static/publicMethods';
 import 'element-ui/lib/theme-chalk/index.css';
 import axios from 'axios'; //引入axios
@@ -13,7 +14,9 @@ import ports from './api/ports.js'; //api接口文档
 import publicMethods from '../static/publicMethods.js';
 import md5 from 'js-md5';
 Vue.use(ElementUI);
-axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
+axios.defaults.headers.post['Content-Type'] = 'Content-Type: application/json';
+// post请求头
+axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
 Vue.config.productionTip = false;
 // 注册表情包数组
 Vue.prototype.$frce = frce.frce;
@@ -21,6 +24,7 @@ Vue.prototype.$frce = frce.frce;
 Vue.prototype.$md5 = md5;
 // 公共方法
 Vue.prototype.$ports = ports;
+Vue.prototype.$http = http;
 Vue.prototype.post = axios.post;
 Vue.prototype.get = axios.get;
 Vue.prototype.$public = publicMethods;

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

@@ -59,22 +59,22 @@
 
                   <div>
                     <p class="title_text">姓名</p>
-                    <input readonly="readonly" class="text_input" v-model="user_info.fullname" type="text" />
+                    <input class="text_input" v-model="user_info.fullname" type="text" />
                   </div>
                 </div>
 
                 <div style="margin-left:200px">
                   <div>
                     <p class="title_text">昵称</p>
-                    <input readonly="readonly" class="text_input" v-model="user_info.user_name" type="text" />
+                    <input class="text_input" v-model="user_info.user_name" type="text" />
                   </div>
                   <div>
                     <p class="title_text">手机</p>
-                    <input readonly="readonly" class="text_input" v-model="user_info.phone" type="text" />
+                    <input class="text_input" v-model="user_info.phone" type="text" />
                   </div>
                   <div>
                     <p class="title_text">邮箱</p>
-                    <input readonly="readonly" class="text_input" v-model="user_info.user_email" type="text" />
+                    <input class="text_input" v-model="user_info.user_email" type="text" />
                   </div>
                 </div>
               </div>
@@ -83,17 +83,17 @@
                   <div style="width:84px;">
                    <p class="title_text">个性签名</p>
                   </div>
-                  <input readonly="readonly" style="width:400px;height:40px;" v-model="user_info.signature" type="text"/>
+                  <input style="width:400px;height:40px;" v-model="user_info.signature" type="text"/>
+                </div>
+                <div @click="save_user_info()" class="user_btn">
+                  <span>保存</span>
                 </div>
-<!--                <div @click="save_user_info()" class="user_btn">-->
-<!--                  <span>保存</span>-->
-<!--                </div>-->
               </div>
             </div>
           </div>
 
           <!-- 密码模块 -->
-         <!-- <div class="userInfo">
+          <div class="userInfo">
             <div class="row item-center user_head" >密码设置</div>
             <div class="userInfoBox" >
               <div class="password_style">
@@ -101,7 +101,7 @@
                   <div class="title_text">
                     <span>原密码</span>
                   </div>
-                  &lt;!&ndash; @blur=" " &ndash;&gt;
+                  <!-- @blur=" " -->
                   <div>
                     <input class="text_input"  v-model="originalPwd"   type="password" />
                     <span v-if="errorPwdState == 1" style="margin-left:10px;color:#f60">原密码不能未空</span>
@@ -126,7 +126,7 @@
                       <input class="text_input" v-model="confirmPwd" type="password" />
                       <span v-if="errorPwdState ==2" style="margin-left: 10px;color:#f60">两次输入的新密码不相等,请重新输入</span>
                     </div>
-                    &lt;!&ndash; <span v-if="errorTo.affirmPasswordInfoB" style="color:#f60">请先输入密码再确认</span> &ndash;&gt;
+                    <!-- <span v-if="errorTo.affirmPasswordInfoB" style="color:#f60">请先输入密码再确认</span> -->
                   </div>
                    <div @click="change_password()" class="row center" style="width:80px;height: 40px;background:rgba(83,153,245,1);color: #fff;border-radius:5px;">
                     <span>修改</span>
@@ -134,7 +134,7 @@
                 </div>
               </div>
             </div>
-          </div>-->
+          </div>
         </div>
       </div>
     </div>

+ 14 - 11
service/src/pages/SessionHistory.vue

@@ -128,6 +128,10 @@
 			this.getSessionHistory(1);
 		},
 		methods: {
+			// filterEndTime(row, column){
+			// 	console.log(row)
+			// },
+
 			evaluateId(row, column) {
 				// console.log(row.evaluate_id)
 				if (row.evaluate_id == 0) {
@@ -163,23 +167,23 @@
 				var currentdate = year + seperator1 + month + seperator1 + strDate;
 
 				if (value == 1) {
-					this.endTime = currentdate;
+					this.startTime = currentdate;
 					this.getNewData(currentdate, 0);
 					this.getSessionHistory();
 				} else if (value == 3) {
-					this.endTime = currentdate;
+					this.startTime = currentdate;
 					this.getNewData(currentdate, 2);
 					this.getSessionHistory();
 				} else if(value == 7){
-					this.endTime = currentdate;
+					this.startTime = currentdate;
 					this.getNewData(currentdate, 6);
 					this.getSessionHistory();
 				} else if (value == 15){
-					this.endTime = currentdate;
+					this.startTime = currentdate;
 					this.getNewData(currentdate, 14);
 					this.getSessionHistory();
 				}else {
-					this.endTime = currentdate;
+					this.startTime = currentdate;
 					this.getNewData(currentdate, 29);
 					this.getSessionHistory();
 				}
@@ -188,15 +192,15 @@
 			getNewData(currentdate, days) {
 				var dateTemp = currentdate.split("-");
 				var nDate = new Date(dateTemp[1] + '-' + dateTemp[2] + '-' + dateTemp[0]);
-				var millSeconds = Math.abs(nDate) - (days * 24 * 60 * 60 * 1000);
+				var millSeconds = Math.abs(nDate) + (days * 24 * 60 * 60 * 1000);
 				var rDate = new Date(millSeconds);
 				var year = rDate.getFullYear();
 				var month = rDate.getMonth() + 1;
 				if (month < 10) month = "0" + month;
 				var date = rDate.getDate();
 				if (date < 10) date = "0" + date;
-				this.startTime = (year + "-" + month + "-" + date);
-				// console.log(this.startTime);
+				this.endTime = (year + "-" + month + "-" + date);
+				console.log(this.endTime);
 			},
 
 			// 获取会话记录
@@ -232,8 +236,7 @@
 			/******************************************/
 			//查看详情会话记录
 			click_row(row, column, event) {
-				// console.log(row, "历史记录");
-
+				//console.log('1231',row, column, event);
 				this.user_name = row.user_name;
 				this.uid = row.servicelog_id;
 				this.isShow = true;
@@ -242,7 +245,7 @@
 			/******************************************/
 			//关闭会话详情记录
 			childValue(e) {
-				console.log(e);
+				//console.log(e);
 				this.isShow = e;
 			},
 

+ 104 - 100
service/src/pages/TheCurrentSession.vue

@@ -245,7 +245,7 @@
 					</div>
 
 					<div style="color:#666;font-weight:bold;font-size:14px; margin-top:30px;">用户信息</div>
-					<div style="margin-top:10px;color:#999;font-size:14px;" class="userData wrap">
+					<div id="user_info_box" style="margin-top:10px;color:#999;font-size:14px;" class="userData wrap">
 						<div class="user_info_box">
 							<span>账号:</span>
 							<input class="user_text" style="background: #ECF4FF;"
@@ -253,39 +253,41 @@
 						</div>
 						<div class="user_info_box">
 							<span>标签:</span>
-							<el-select v-model="value" @focus='focusFun' @change='labelChange' placeholder="请选择">
+							<el-select  style="width:70%;"  v-model="value" @focus='focusFun' @change='labelChange' placeholder="请选择">
 								<el-option
-										v-for="item in options"
-										:key="item.id"
-										:label="item.name"
-										:value="item.id">
+									v-for="item in options"
+									:key="item.id"
+									:label="item.name"
+									:value="item.id">
 								</el-option>
 							</el-select>
 						</div>
-						<div class="user_info_box">
+						<div  class="user_info_box">
 							<span>昵称:</span>
-							<el-input style="width:70%" v-model="session_user_info.nick_name"
+							<el-input style="width:70%;" v-model="session_user_info.nick_name"
 									  placeholder="请输入内容"></el-input>
 						</div>
 						<div class="user_info_box">
 							<span>手机:</span>
-							<el-input style="width:70%" v-model="session_user_info.account_phone"
+							<el-input 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 style="width:70%;" v-model="session_user_info.account_email"
 									  placeholder="请输入内容"></el-input>
 						</div>
 						<div class="user_info_box">
 							<span>地址:</span>
-							<el-input style="width:70%" v-model="session_user_info.address"
+							<el-input style="width:70%;" v-model="session_user_info.address"
+									  placeholder="请输入内容"></el-input>
+						</div>
+						<div class="user_info_box">
+							<span>备注:</span>
+							<el-input style="width:70%;" v-model="session_user_info.remark"
 									  placeholder="请输入内容"></el-input>
 						</div>
-						<p>访客备注:</p>
 					</div>
-					<textarea draggable="false" class="userDataInput" v-model="session_user_info.remark"
-							  style="margin-top:10px;color:#999;"></textarea>
 					<div class=" row rightAlignment">
 						<div class="userBtn row center" @click="bt_update()">保存</div>
 					</div>
@@ -405,47 +407,48 @@
 			chatMessage(redata) {
 				//用户离线后会话窗口切换
 				if (redata.message_type == "userClose") {
-					let _this = this;
-					let arr = [
-						redata.data,
-						this.sessionList,
-						this.offlineList,
-						this.sessionType,
-						this.dataIndex,
-						this.sessionName,
-						this.data
-					]
-					_this.$public.userOffline(arr, function (session, offline, type, index, name, list, userInfo) {
-						this.$store.dispatch("SET_CURRENT", list);//当前会话数据
-						_this.$store.dispatch("SET_NUM", index);
-						_this.$store.dispatch("SET_TYPE", type);
-						_this.$store.dispatch("SET_SESSION", session);
-						_this.$store.dispatch("SET_OFFLINE", offline);
-						_this.get_user_info(userInfo);
-					})
+					console.log(redata)
+					// let _this = this;
+					// let arr = [
+					// 	redata.data,
+					// 	this.sessionList,
+					// 	this.offlineList,
+					// 	this.sessionType,
+					// 	this.dataIndex,
+					// 	this.sessionName,
+					// 	this.data
+					// ]
+					// _this.$public.userOffline(arr, function (session, offline, type, index, name, list, userInfo) {
+					// 	this.$store.dispatch("SET_CURRENT", list);//当前会话数据
+					// 	_this.$store.dispatch("SET_NUM", index);
+					// 	_this.$store.dispatch("SET_TYPE", type);
+					// 	_this.$store.dispatch("SET_SESSION", session);
+					// 	_this.$store.dispatch("SET_OFFLINE", offline);
+					// 	_this.get_user_info(userInfo);
+					// })
 				}
 
-				//用户会话结束窗口切换
-				if (redata.message_type == "delUser") {
-					let _this = this;
-					let arr = [
-						redata.data,
-						this.sessionList,
-						this.offlineList,
-						this.sessionType,
-						this.dataIndex,
-						this.sessionName,
-						this.data
-					]
-					_this.$public.sessionEnd(arr, function (session, offline, type, index, name, list, userInfo) {
-						_this.$store.dispatch("SET_CURRENT", list);//当前会话数据
-						_this.$store.dispatch("SET_NUM", index);
-						_this.$store.dispatch("SET_TYPE", type);
-						_this.$store.dispatch("SET_SESSION", session);
-						_this.$store.dispatch("SET_OFFLINE", offline);
-						_this.get_user_info(userInfo);
-					})
-				}
+				// //用户会话结束窗口切换
+				// if (redata.message_type == "delUser") {
+				// 	let _this = this;
+				// 	let arr = [
+				// 		redata.data,
+				// 		this.sessionList,
+				// 		this.offlineList,
+				// 		this.sessionType,
+				// 		this.dataIndex,
+				// 		this.sessionName,
+				// 		this.data
+				// 	]
+				// 	_this.$public.sessionEnd(arr, function (session, offline, type, index, name, list, userInfo) {
+				// 		_this.$store.dispatch("SET_CURRENT", list);//当前会话数据
+				// 		_this.$store.dispatch("SET_NUM", index);
+				// 		_this.$store.dispatch("SET_TYPE", type);
+				// 		_this.$store.dispatch("SET_SESSION", session);
+				// 		_this.$store.dispatch("SET_OFFLINE", offline);
+				// 		_this.get_user_info(userInfo);
+				// 	})
+				// }
 
 
 				//获取标签数据信息
@@ -626,6 +629,9 @@
 					this.session_user_info = this.offlineList[index];
 				}
 				this.$store.dispatch("SET_CURRENT", data);//当前会话数据
+
+				// this.value  = this.session_user_info.label;
+				//console.log(this.session_user_info);
 			},
 
 			/***************关闭当前和用户聊天对话***************/
@@ -823,44 +829,44 @@
 
 			},
 
-			/*****************获取当前聊天用户信息****************/
-			get_user_info(type) {
-				if (type.length > 0) {
-					this.session_user_info = {};
-					if (this.dataIndex <= type.length) {
-
-						let obj = {
-							headers: {
-								"apiToken": this.$md5('accountInfo' + "customer-service" + 'service' + this.time[0] + 'service'),
-								'userToken': this.token
-							},
-							account_id: type[this.dataIndex].id
-						};
-
-						this.post('api' + this.$ports.userInfo.accountInfo, obj).then(res => {
-							if (res.data.code == 1) {
-								// console.log(res.data.data);
-								this.session_user_info = res.data.data;
-								// console.log(this.options);
-								for (let i = 0; this.options.length > i; i++) {
-									if (this.options[i].id == res.data.data.label_id) {
-										this.value = this.options[i].name;
-									}
-									break;
-								}
-								//this.value = res.data.data.label_id
-							}
-						})
-
-
-						// this.session_user_info = type[this.dataIndex].id;
-						// console.log(type[this.dataIndex].id);
-						// this.value = this.session_user_info.label;
-					}
-				} else {
-					this.session_user_info = {};
-				}
-			},
+			// /*****************获取当前聊天用户信息****************/
+			// get_user_info(type) {
+			// 	if (type.length > 0) {
+			// 		this.session_user_info = {};
+			// 		if (this.dataIndex <= type.length) {
+
+			// 			let obj = {
+			// 				headers: {
+			// 					"apiToken": this.$md5('accountInfo' + "customer-service" + 'service' + this.time[0] + 'service'),
+			// 					'userToken': this.token
+			// 				},
+			// 				account_id: type[this.dataIndex].id
+			// 			};
+
+			// 			this.post('api' + this.$ports.userInfo.accountInfo, obj).then(res => {
+			// 				if (res.data.code == 1) {
+			// 					// console.log(res.data.data);
+			// 					this.session_user_info = res.data.data;
+			// 					// console.log(this.options);
+			// 					for (let i = 0; this.options.length > i; i++) {
+			// 						if (this.options[i].id == res.data.data.label_id) {
+			// 							this.value = this.options[i].name;
+			// 						}
+			// 						break;
+			// 					}
+			// 					//this.value = res.data.data.label_id
+			// 				}
+			// 			})
+
+
+			// 			//this.session_user_info = type[this.dataIndex].id;
+			// 			// console.log(type[this.dataIndex].id);
+			// 			// this.value = this.session_user_info.label;
+			// 		}
+			// 	} else {
+			// 		this.session_user_info = {};
+			// 	}
+			// },
 
 			/********************获取配置信息********************/
 			get_config_info() {
@@ -911,19 +917,11 @@
 				let getters = this.$store.getters
 				this.token = getters.get_user_info.token;//token
 				this.user_info = getters.get_user_info;//用户消息
-				console.log(this.user_info,'用户信息');
-				// this.sessionList = getters.get_session;//会话
-				// this.offlineList = getters.get_offline;//离线
-				// this.dataIndex = getters.get_num; //getters.get_num;列表下标
-				// this.sessionType = getters.get_type;//选择类型
-				// this.data = getters.get_current;//当前会话数据
-				// this.sessionName = getters.get_session_name;//会话对象名字
 				this.time = JSON.parse(sessionStorage.getItem("time"));
 			},
 
 			/**********************编辑用户信息**********************/
 			bt_update() {
-
 				if (!this.isTrue) return false;
 				this.isTrue = false;
 				let obj = {
@@ -1082,6 +1080,11 @@
 			get_session_message(e) {
 				this.chatMessage(e)
 			},
+
+			get_session_user(e){
+				console.log(e)
+			},
+			
 			/*****************评价按钮显示隐藏处理*****************/
 			get_is_eva_btn(data) {
 				if (this.sessionType != 2) {
@@ -1116,6 +1119,7 @@
 				offlineList:'get_offline',
 				dataIndex:'get_num',
 				sessionType:'get_type',
+				get_user_info:'get_session_user',
 			}),
 
 			get_session_message() {
@@ -1225,7 +1229,7 @@
 		border: 1px solid #ECF4FF;
 		color: #999;
 		line-height: 30px;
-		width: 80%;
+		width: 70%;
 	}
 
 	.user_text:focus {

+ 23 - 16
service/src/pages/login.vue

@@ -6,8 +6,8 @@
 					<img src="@/assets/img/loginBg.png" />
 				</div>
 				<div class="loginBox">
-					<div class="row center" style="height:48px;margin:30px 0 10px 0;">
-						<img :src="img_http + logo" alt="" style="width: 60px; height: 60px;">
+					<div class="row center" style="height:48px;">
+						<img :src="img_http + logo" alt="" style="width: 30px; height: 30px;">
 					</div>
 					<div class="row center"><span style="font-size:16px;color:#666;">客服系统客服登录</span></div>
 					<div class="box row center">
@@ -64,7 +64,8 @@
 							spinner: 'el-icon-loading',
 							background: 'rgba(0, 0, 0, 0.7)'
 						});
-						this.post('api'+this.$ports.login,{
+						console.log(this.$ports.login)
+						this.$http.post(this.$ports.login,{
 							username:this.account,
 							password:this.password
 						}).then((res)=>{
@@ -109,6 +110,7 @@
 		},
 		mounted(){
 			this.logo = sessionStorage.getItem('logo');
+			//console.log(this.logo, '========logo')
 		}
 	};
 </script>
@@ -139,36 +141,36 @@
 		left: 0px;
 		right: 0px;
 		margin: auto;
-		width:480px;
-		height: 500px;
+		width:300px;
+		height: 280px;
 		background: #fff;
 		border-radius: 2%;
 		box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1);
 	}
 	.box{
-		margin-top: 40px;
-		height: 70px;
+		/* margin-top: 40px; */
+		height: 60px;
 	}
 	.boxData{
-		width: 350px;
-		height: 70px;
+		width: 200px;
+		/* height: 70px; */
 		border: 1px solid #C6DCFF;
 		background: #F6F8FF;
 		position: relative;
 	}
 	.boxData img{
 		position: absolute;
-		left: 20px;
+		left: 6px;
 		top:0;
 		bottom: 0;
 		margin:auto 0;
 	}
 	.boxData input{
 		width: 100%;
-		height: 100%;
+		height: 30px;
 		outline: none;
-		padding-left: 60px;
-		font-size: 18px;
+		padding-left: 30px;
+		font-size: 14px;
 		color: #999;
 	}
 	.boxData input:focus{
@@ -178,13 +180,18 @@
 		border: 1px solid #F60
 	}
 	.btn{
-		width: 350px;
-		height: 70px;
+		width: 240px;
+		height: 40px;
 		background:#5399F5;
-		font-size: 24px;
+		font-size: 18px;
 		color: #fff;
 		border: none;
 	}
+	.btn:hover{
+
+	}
+	
+	
 	.btn:active{
 		background: #1d57dd;
 	}

+ 6 - 0
service/src/store/index.js

@@ -108,6 +108,9 @@ const mutations = {
 	new_drawer(state, val) {
 		state.new_drawer = val;
 	},
+	new_session_user(state, val) {
+		state.session_user_info = val;
+	},
 }
 
 /**
@@ -149,6 +152,9 @@ const actions = {
 	},
 	SET_DRAWER(context, val) {
 		context.commit('new_drawer', val);
+	},
+	SET_SESSSION_USER(context, val) {
+		context.commit('new_session_user', val);
 	}
 }
 const store = new Vuex.Store({