소스 검색

update service

luke 6 년 전
부모
커밋
08f0154cc1

+ 161 - 139
service/src/components/hader.vue

@@ -1,151 +1,173 @@
 <template>
-    <div>
-        <div class="header row allAlignment">
-            <div class="row item-center box_div" style="color:#666;font-size:14px;font-weight:bold;">
-                <img style="width:38px;height:38px;margin: 0 10px;" src="@/assets/img/headerPortrait.png" >
-                你好,<span>{{user_info.user_name}}--{{user_info.group}}</span>
-            </div>
-            <div class="row item-center rightAlignment msg box_div" style="padding: 0 30px;font-size:12px;color:#999">
-                <div>
-                    <el-dropdown @command="handleCommand" >
+	<div>
+		<div class="header row allAlignment">
+			<div class="row item-center box_div" style="color:#666;font-size:14px;font-weight:bold;">
+				<img style="width:38px;height:38px;margin: 0 10px;" src="@/assets/img/headerPortrait.png">
+				你好,<span>{{user_info.user_name}}--{{user_info.group}}</span>
+			</div>
+			<div class="row item-center rightAlignment msg box_div" style="padding: 0 30px;font-size:12px;color:#999">
+				<div>
+					<el-dropdown @command="handleCommand">
                         <span class="el-span-1">
                             <i style="font-size:14px;color:#5399F5;" class="el-icon-user"></i>
                             {{value}}
                         </span>
-                        <el-dropdown-menu slot="dropdown">
-                            <el-dropdown-item command ='0' >在线</el-dropdown-item>
-                            <el-dropdown-item command = 1 >隐身</el-dropdown-item>
-                            <el-dropdown-item command = 2 >休息</el-dropdown-item>
-                        </el-dropdown-menu>
-                    </el-dropdown> 
-                </div>
-
-                <el-button @click="openDrawer" style="margin:0 15px"><i style="font-size:14px; color:#5399F5;" class="el-icon-chat-dot-square"> </i>消息中心</el-button>
-
-                <span  @click="isExit()" class="el-span-1"><i style="font-size:13px; margin-right: 3px; color:#5399F5;" class="el-icon-switch-button"></i>退出</span>
-            </div>
-        </div>
-    </div>
+						<el-dropdown-menu slot="dropdown">
+							<el-dropdown-item command='0'>在线</el-dropdown-item>
+							<el-dropdown-item command=1>隐身</el-dropdown-item>
+							<el-dropdown-item command=2>休息</el-dropdown-item>
+						</el-dropdown-menu>
+					</el-dropdown>
+				</div>
+				<el-badge :value="12" class="item">
+					<el-button @click="openDrawer" style="margin:0 15px"><i style="font-size:14px; color:#5399F5;"
+																			class="el-icon-chat-dot-square"> </i>消息中心
+					</el-button>
+				</el-badge>
+				<span @click="isExit()" class="el-span-1"><i style="font-size:13px; margin-right: 3px; color:#5399F5;"
+															 class="el-icon-switch-button"></i>退出</span>
+			</div>
+		</div>
+	</div>
 </template>
 
 <script>
-    import Vue from 'vue';
-    import '@/css/index.css'
-    export default {
-        name:'hader',
-        data() {
-            return {
-                state:true,//在线状态
-                announcement:true,//公告
-                network:true,
-                HeadPortrait:'',
-                loginTo:false,//登录状态
-                options: ['在线','隐身','休息'],
-                value:'隐身',
-                user_info:'',//
-            }
-        },
-        methods:{
-            openDrawer(){
-                // this.$emit("listenDrawer", true);
-                this.$store.dispatch("SET_DRAWER", true);
-            },
-            /**********************************************/
-            //切换用户状态
-            handleCommand(e){
-                //console.log(e)
-                this.websocketsend(JSON.stringify({
-                    type:'kfOnline',
-                    data:{
-                    uid:'KF'+this.user_info.id,
-                    status:e*1+1,
-                    }
-                }));
-                //Vue.prototype.$stateValue =  this.options[e];
-                this.$store.dispatch("SET_STATEVALUE",this.options[e]);
-                this.value = this.options[e];
-            },
-
-            /************************************************/
-            //退出系统
-            isExit(){
-                this.$store.dispatch("SET_STATEVALUE",'隐身');
-                this.$store.dispatch("SET_SESSION",[]);
-                this.$store.dispatch("SET_OFFLINE",[]);
-                this.$websocket.close();
-                this.$token = '';
-                this.$router.push('/login')
-            },
-
-            /**************************************/
-            //数据发送
-            websocketsend(Data) {
-                this.$websocket.send(Data);
-            },
-        },
-        mounted(){
-            if(this.$store.getters.get_stateValue){
-                this.value  = this.$store.getters.get_stateValue;
-            }
-            this.user_info = this.$store.getters.get_user_info;
-        }
-    }
+	import Vue from 'vue';
+	import '@/css/index.css'
+
+	export default {
+		name: 'hader',
+		data() {
+			return {
+				state: true,//在线状态
+				announcement: true,//公告
+				network: true,
+				HeadPortrait: '',
+				loginTo: false,//登录状态
+				options: ['在线', '隐身', '休息'],
+				value: '隐身',
+				user_info: '',//
+			}
+		},
+		methods: {
+			openDrawer() {
+				// this.$emit("listenDrawer", true);
+				this.$store.dispatch("SET_DRAWER", true);
+			},
+			/**********************************************/
+			//切换用户状态
+			handleCommand(e) {
+				//console.log(e)
+				this.websocketsend(JSON.stringify({
+					type: 'kfOnline',
+					data: {
+						uid: 'KF' + this.user_info.id,
+						status: e * 1 + 1,
+					}
+				}));
+				//Vue.prototype.$stateValue =  this.options[e];
+				this.$store.dispatch("SET_STATEVALUE", this.options[e]);
+				this.value = this.options[e];
+			},
+
+			/************************************************/
+			//退出系统
+			isExit() {
+				this.$store.dispatch("SET_STATEVALUE", '隐身');
+				this.$store.dispatch("SET_SESSION", []);
+				this.$store.dispatch("SET_OFFLINE", []);
+				this.$websocket.close();
+				this.$token = '';
+				this.$router.push('/login')
+			},
+
+			/**************************************/
+			//数据发送
+			websocketsend(Data) {
+				this.$websocket.send(Data);
+			},
+		},
+		mounted() {
+			if (this.$store.getters.get_stateValue) {
+				this.value = this.$store.getters.get_stateValue;
+			}
+			this.user_info = this.$store.getters.get_user_info;
+		}
+	}
 </script>
 
 <style scoped>
-    .header{
-        width: 90vw;
-        height:7vh;
-        border-bottom: 1px solid #D5E5FF;
-    }
-    .box_div{
-        width: 50%;
-        height: 100%;
-        background: #ECF4FF;
-    }
-    .msg p{
-        margin-left:30px;
-        display: flex;
-        align-items: center;
-    }
-    .msg p img{
-        margin-right: 6px;
-    }
-    .el-span-1{
-        margin-left: 6px;
-       font-size:14px;
-       color:#666;
-    }
-    .el-span-1:hover{
-        color: #5399f5;
-        cursor:pointer;
-        font-weight: 400;
-    }
-    button{
-        outline: none;
-        /* border: 1px solid #ECF4FF; */
-    }
-    .el-button{
-        background: #ECF4FF ;
-        font-size: 14px ;
-        color: #666 ;
-    }
-    .el-button:hover{
-        color: #5399f5;
-    }
-    .msg_left{
-        width: 360;
-        height: 400 !important
-    }
-    .msg_right{
-        width: 440;
-       
-        
-    }
-    .el-popover{
-        height: 700 !important;
-    }
-    /* .el-dropdown{
-        border: 1px solid #ECF4FF;
-    } */
+	.header {
+		width: 90vw;
+		height: 7vh;
+		border-bottom: 1px solid #D5E5FF;
+	}
+
+	.box_div {
+		width: 50%;
+		height: 100%;
+		background: #ECF4FF;
+	}
+
+	.msg p {
+		margin-left: 30px;
+		display: flex;
+		align-items: center;
+	}
+
+	.msg p img {
+		margin-right: 6px;
+	}
+
+	.el-span-1 {
+		margin-left: 6px;
+		font-size: 14px;
+		color: #666;
+	}
+
+	.el-span-1:hover {
+		color: #5399f5;
+		cursor: pointer;
+		font-weight: 400;
+	}
+
+	button {
+		outline: none;
+		/* border: 1px solid #ECF4FF; */
+	}
+
+	.el-button {
+		background: #ECF4FF;
+		font-size: 14px;
+		color: #666;
+	}
+
+	.el-button:hover {
+		color: #5399f5;
+	}
+
+	.msg_left {
+		width: 360px;
+		height: 400px !important
+	}
+
+	.msg_right {
+		width: 440px;
+	}
+
+	.el-popover {
+		height: 700px !important;
+	}
+
+	/* .el-dropdown{
+		border: 1px solid #ECF4FF;
+	} */
+</style>
+
+<style>
+	.el-badge__content.is-fixed {
+		position: absolute;
+		top: -2px !important;
+		right: 18px !important;
+	}
 </style>

+ 25 - 21
service/src/components/messageCenter.vue

@@ -1,6 +1,7 @@
 <template>
 	<!-- 消息中心 -->
 	<el-drawer
+			:close-on-press-escape="true"
 			style="margin-top: 50px"
 			:visible.sync="drawer"
 			:modal="false"
@@ -9,18 +10,27 @@
 		<div>
 			<el-col :span="6" class="left-list">
 				<div class="tabs">
-					<a :class="switchMessageType=='all'?'active':''" @click="switchMessage('all')">全部消息</a>
-					<a :class="switchMessageType=='system'?'active':''" @click="switchMessage('system')">系统公告</a>
-					<a :class="switchMessageType=='person'?'active':''" @click="switchMessage('person')">个人消息</a>
+					<el-badge :value="12" class="item">
+						<a :class="switchMessageType=='unread'?'active':''" @click="switchMessage('unread')">未读信息</a>
+					</el-badge>
+
+					<el-badge class="item">
+						<a :class="switchMessageType=='read'?'active':''" @click="switchMessage('read')">已读信息</a>
+					</el-badge>
+
+
 				</div>
-				<ul class="message-list" v-if="switchMessageType == 'all'">
+				<ul class="message-list" v-if="switchMessageType == 'unread'">
 					<li class="list-item">
 						<p class="item-info">
 							<span class="name">GFF_D345</span>
 							<span class="time">11:30:54</span>
 						</p>
-						<p>客服满意度调查</p>
+						<p>我是未读信息</p>
 					</li>
+				</ul>
+
+				<ul class="message-list" v-if="switchMessageType == 'read'">
 					<li class="list-item">
 						<p class="item-info">
 							<span class="name">GFF_D345</span>
@@ -28,26 +38,16 @@
 						</p>
 						<p>客服满意度调查</p>
 					</li>
-				</ul>
-				<ul class="message-list" v-if="switchMessageType == 'system'">
 					<li class="list-item">
 						<p class="item-info">
 							<span class="name">GFF_D345</span>
 							<span class="time">11:30:54</span>
 						</p>
-						<p>我是系统公告</p>
+						<p>客服满意度调查</p>
 					</li>
 				</ul>
 
-				<ul class="message-list" v-if="switchMessageType == 'person'">
-					<li class="list-item">
-						<p class="item-info">
-							<span class="name">GFF_D345</span>
-							<span class="time">11:30:54</span>
-						</p>
-						<p>我是个人消息</p>
-					</li>
-				</ul>
+
 			</el-col>
 			<el-col :span="18">
 				<el-row class="title">
@@ -77,7 +77,7 @@
 		data() {
 			return {
 				drawer: false,
-				switchMessageType: "all",
+				switchMessageType: "unread",
 			}
 		},
 		computed: {
@@ -178,11 +178,9 @@
 	}
 
 	.messageBox {
-		padding: 20px;
-
+		padding: 15px 20px;
 		li {
 			margin: 10px 0;
-
 			p {
 				font-size: 14px;
 				color: #999999;
@@ -199,8 +197,14 @@
 			line-height: 1.8;
 		}
 	}
+
 </style>
 <style>
+	.left-list .el-badge__content.is-fixed {
+		position: absolute;
+		top: 12px !important;
+		right: 10px !important;
+	}
 	.el-drawer__container {
 		outline: none !important;
 	}

+ 702 - 698
service/src/pages/FastReply.vue

@@ -1,726 +1,730 @@
 <template>
-  <div class="row allAlignment" style=" position: relative;">
-    <leftNav />
-    <div>
-      <hader />
-      <div>
-        <el-container class="row">
-          <!-- 私有库列表 -->
-          <el-aside width="400px">
-            <div class="tit">
-              <span>私有库--快捷回复</span>
-            </div>
-            <!-- <div class="row library">
-              <div class="line hover" @click="FastReplyLibrarySwitchClick(1)">
-                <span :class="FastReplyLibrarySwitch==1?'acty':''">公有库</span>
-              </div>
-              <div class="hover" @click="FastReplyLibrarySwitchClick(2)">
-                <span :class="FastReplyLibrarySwitch==2?'acty':''">私有库</span>
-              </div>
-            </div>
-            <div class="search">
-              <el-input placeholder="搜索快捷回复" suffix-icon="el-icon-search" v-model="leftSerch"></el-input>
-            </div>
-            <div class="phrases md20">
-              <i class="el-icon-caret-bottom" style="color:#CCCCCC"></i>
-              <span>常用语</span>
-            </div> -->
-            <div class="phrasesList md20">
-              <!-- <div class="list row" v-for="(item) in ReplyArr" :key="item.id">
-                <div style="width:100%;"  class="row item-center allAlignment">
-                  <div>
-                    <span>#{{item.title}}</span>
-                    <span>{{item.content}}</span>
-                  </div>
-                </div>
-              </div> -->
+	<div class="row allAlignment" style=" position: relative;">
+		<leftNav />
+		<div>
+			<hader />
+			<messageCenter></messageCenter>
+			<div>
+				<el-container class="row">
+					<!-- 私有库列表 -->
+					<el-aside width="400px">
+						<div class="tit">
+							<span>私有库--快捷回复</span>
+						</div>
+						<!-- <div class="row library">
+						  <div class="line hover" @click="FastReplyLibrarySwitchClick(1)">
+							<span :class="FastReplyLibrarySwitch==1?'acty':''">公有库</span>
+						  </div>
+						  <div class="hover" @click="FastReplyLibrarySwitchClick(2)">
+							<span :class="FastReplyLibrarySwitch==2?'acty':''">私有库</span>
+						  </div>
+						</div>
+						<div class="search">
+						  <el-input placeholder="搜索快捷回复" suffix-icon="el-icon-search" v-model="leftSerch"></el-input>
+						</div>
+						<div class="phrases md20">
+						  <i class="el-icon-caret-bottom" style="color:#CCCCCC"></i>
+						  <span>常用语</span>
+						</div> -->
+						<div class="phrasesList md20">
+							<!-- <div class="list row" v-for="(item) in ReplyArr" :key="item.id">
+							  <div style="width:100%;"  class="row item-center allAlignment">
+								<div>
+								  <span>#{{item.title}}</span>
+								  <span>{{item.content}}</span>
+								</div>
+							  </div>
+							</div> -->
 
-              <!-- 私有库列表 -->
-              <div class="list row" v-for="(item) in ReplyArr" :key="item.id">
-                <div style="width:100%;" class="row item-center allAlignment" >
-                  <div class="row">
-                    <span class="ellipsis" style="display:block;max-width:100px;">#{{item.title}}</span>
-                    <span
-                      class="ellipsis"
-                      style="display:block;max-width:150px;margin-left:20px;"
-                    >{{item.content}}</span>
-                  </div>
-                  <div class="fnc">
-                    <i class="el-icon-edit-outline hover" style="margin-right:15px;" @click="popUpChange(item)"></i>
-                    <i class="el-icon-delete hover" @click="clickDel(item.id)"></i>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </el-aside>
+							<!-- 私有库列表 -->
+							<div class="list row" v-for="(item) in ReplyArr" :key="item.id">
+								<div style="width:100%;" class="row item-center allAlignment" >
+									<div class="row">
+										<span class="ellipsis" style="display:block;max-width:100px;">#{{item.title}}</span>
+										<span
+												class="ellipsis"
+												style="display:block;max-width:150px;margin-left:20px;"
+										>{{item.content}}</span>
+									</div>
+									<div class="fnc">
+										<i class="el-icon-edit-outline hover" style="margin-right:15px;" @click="popUpChange(item)"></i>
+										<i class="el-icon-delete hover" @click="clickDel(item.id)"></i>
+									</div>
+								</div>
+							</div>
+						</div>
+					</el-aside>
 
-          <!-- 私有库列表新增删除模块 -->
-          <el-main style="width:35.4%;background:#f6f8ff;border-left:1px solid #D5E5FF;">
-            <div class="mainTitle row rightAlignment">
-              <!-- <div style="height:40px;width:238px;border:1px solid #ddd;">
-                <input
-                  style="width:100%;height:100%;padding-left:10px;"
-                  placeholder="常用语组"
-                  type="text"
-                  v-model="matchingSerch"
-                />
-                <img style="width:16px;height:16px;" src="@/assets/img/serch.png" />
-              </div> -->
-              <div @click="popUpShow = true"  class="row center hover" 
-              style="border-radius:5px;width:120px;margin-left:20px;height:40px;background:linear-gradient(180deg,rgba(245,245,245,1) 0%,rgba(238,238,238,1) 100%);border:1px solid #ddd;font-size:14px;color:#666;"
-              >新增快捷回复</div>
-              <div @click="deleteFastReply" class="row center hover"
-                style="border-radius:5px;width:60px;margin-left:10px;height:40px;background:linear-gradient(180deg,rgba(245,245,245,1) 0%,rgba(238,238,238,1) 100%);border:1px solid #ddd;font-size:14px;color:#666;"
-              >删除</div>
-            </div>
-            <div class="mainBox scroll">
-              <el-form ref="form" label-width="80px">
-                <el-form-item label>
-                  <el-checkbox-group v-model="deleteArr">
-                    <el-checkbox name="type" label="all" disabled>
-                      <!--  -->
-                      <div class="row" style="width:100%;height:100%;background:#E6EBFF;">
-                        <div style="color:#666;font-weight:bold;color:#666;width:100%; position: relative;">
-                          <p style="padding-right:40px;">快捷语</p>
-                          <p class="row item-center"style="color:#666;font-size:14px; position: absolute;left:16%;top:0;">回复内容</p>
-                        </div>
-                      </div>
-                    </el-checkbox>
+					<!-- 私有库列表新增删除模块 -->
+					<el-main style="width:35.4%;background:#f6f8ff;border-left:1px solid #D5E5FF;">
+						<div class="mainTitle row rightAlignment">
+							<!-- <div style="height:40px;width:238px;border:1px solid #ddd;">
+							  <input
+								style="width:100%;height:100%;padding-left:10px;"
+								placeholder="常用语组"
+								type="text"
+								v-model="matchingSerch"
+							  />
+							  <img style="width:16px;height:16px;" src="@/assets/img/serch.png" />
+							</div> -->
+							<div @click="popUpShow = true"  class="row center hover"
+								 style="border-radius:5px;width:120px;margin-left:20px;height:40px;background:linear-gradient(180deg,rgba(245,245,245,1) 0%,rgba(238,238,238,1) 100%);border:1px solid #ddd;font-size:14px;color:#666;"
+							>新增快捷回复</div>
+							<div @click="deleteFastReply" class="row center hover"
+								 style="border-radius:5px;width:60px;margin-left:10px;height:40px;background:linear-gradient(180deg,rgba(245,245,245,1) 0%,rgba(238,238,238,1) 100%);border:1px solid #ddd;font-size:14px;color:#666;"
+							>删除</div>
+						</div>
+						<div class="mainBox scroll">
+							<el-form ref="form" label-width="80px">
+								<el-form-item label>
+									<el-checkbox-group v-model="deleteArr">
+										<el-checkbox name="type" label="all" disabled>
+											<!--  -->
+											<div class="row" style="width:100%;height:100%;background:#E6EBFF;">
+												<div style="color:#666;font-weight:bold;color:#666;width:100%; position: relative;">
+													<p style="padding-right:40px;">快捷语</p>
+													<p class="row item-center"style="color:#666;font-size:14px; position: absolute;left:16%;top:0;">回复内容</p>
+												</div>
+											</div>
+										</el-checkbox>
 
-                    <el-checkbox name="type" :label="item.id"  v-for="(item,index) in ReplyArr" :key="index">
-                      <div class="row" style="width:100%;height:100%;">
-                        <div style="color:#666;color:#666;width:100%; position: relative;">
-                          <!-- style="width:50px;" -->
-                          <p  class="ellipsis">{{item.title}}</p>
-                          <p class="row item-center ellipsis addContent" 
-                          >{{item.content}}</p>
-                        </div>
-                      </div>
-                    </el-checkbox>
-                  </el-checkbox-group>
-                </el-form-item>
-              </el-form>
-            </div>
-          </el-main>
-        </el-container>
-      </div>
-    </div>
+										<el-checkbox name="type" :label="item.id"  v-for="(item,index) in ReplyArr" :key="index">
+											<div class="row" style="width:100%;height:100%;">
+												<div style="color:#666;color:#666;width:100%; position: relative;">
+													<!-- style="width:50px;" -->
+													<p  class="ellipsis">{{item.title}}</p>
+													<p class="row item-center ellipsis addContent"
+													>{{item.content}}</p>
+												</div>
+											</div>
+										</el-checkbox>
+									</el-checkbox-group>
+								</el-form-item>
+							</el-form>
+						</div>
+					</el-main>
+				</el-container>
+			</div>
+		</div>
 
 
-  <!-- 私有库新增模块窗口 -->
-    <div class="popUp" v-if="popUpShow">
-      <div class="popUpBg" @click="popUpEsc"></div>
-      <div class="popUpBox column item-center">
-        <p class="editor">添加新的快捷回复</p>
-        <div class="popUpBoxData row center">
-          <div>
-            <div class="row">
-              <p>类别<span>*</span></p>
-              <!-- v-model="popUp.type" -->
-              <el-select v-model="popUp.type" disabled placeholder="私人库模版" class="often">
-              </el-select>
-            </div>
-            <div  class="row" style="margin-top: 15px;">
-              <p>关键词<span>*</span></p>
-              <input class="oftenTitle" v-model="popUp.title" placeholder="请输入关键词" />
-            </div>
-            <div  class="row" style="margin-top: 15px;">
-              <p>回复内容<span>*</span></p>
-              <textarea class="text" v-model="popUp.content" placeholder="请输入你要回复的内容"></textarea>
-            </div>
-            <div style="height:40px;margin-top:20px;" class="row average">
-              <div @click="popUpEsc" class="row center hover"
-                style="width:80px;height:40px;border:1px solid rgba(221,221,221,1);background:linear-gradient(180deg,rgba(245,245,245,1) 0%,rgba(238,238,238,1) 100%);border-radius:5px;font-size:16px;color:#666;"
-              >取消</div>
-              <div @click="newly()"  class="row center hover"
-                style="width:80px;height:40px;background:rgba(83,153,245,1);color:#FFF;border-radius:5px;font-size:16px;"
-              >确定</div>
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
+		<!-- 私有库新增模块窗口 -->
+		<div class="popUp" v-if="popUpShow">
+			<div class="popUpBg" @click="popUpEsc"></div>
+			<div class="popUpBox column item-center">
+				<p class="editor">添加新的快捷回复</p>
+				<div class="popUpBoxData row center">
+					<div>
+						<div class="row">
+							<p>类别<span>*</span></p>
+							<!-- v-model="popUp.type" -->
+							<el-select v-model="popUp.type" disabled placeholder="私人库模版" class="often">
+							</el-select>
+						</div>
+						<div  class="row" style="margin-top: 15px;">
+							<p>关键词<span>*</span></p>
+							<input class="oftenTitle" v-model="popUp.title" placeholder="请输入关键词" />
+						</div>
+						<div  class="row" style="margin-top: 15px;">
+							<p>回复内容<span>*</span></p>
+							<textarea class="text" v-model="popUp.content" placeholder="请输入你要回复的内容"></textarea>
+						</div>
+						<div style="height:40px;margin-top:20px;" class="row average">
+							<div @click="popUpEsc" class="row center hover"
+								 style="width:80px;height:40px;border:1px solid rgba(221,221,221,1);background:linear-gradient(180deg,rgba(245,245,245,1) 0%,rgba(238,238,238,1) 100%);border-radius:5px;font-size:16px;color:#666;"
+							>取消</div>
+							<div @click="newly()"  class="row center hover"
+								 style="width:80px;height:40px;background:rgba(83,153,245,1);color:#FFF;border-radius:5px;font-size:16px;"
+							>确定</div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
 
-    <!-- 私有库编辑模块窗口 -->
-    <div class="popUp" v-if="popUpChangeShow">
-      <div class="popUpBg" @click="popUpChangeShow = false,changePopUp = ''"></div>
-      <div class="popUpBox column item-center">
-        <p class="editor ">修改您的快捷回复</p>
-        <div class="popUpBoxData row center">
-          <div>
-            <div class="row">
-              <p>类别<span>*</span></p>
-              <el-select disabled v-model="changePopUp.type" placeholder="私人库模版" class="often">
-              </el-select>
+		<!-- 私有库编辑模块窗口 -->
+		<div class="popUp" v-if="popUpChangeShow">
+			<div class="popUpBg" @click="popUpChangeShow = false,changePopUp = ''"></div>
+			<div class="popUpBox column item-center">
+				<p class="editor ">修改您的快捷回复</p>
+				<div class="popUpBoxData row center">
+					<div>
+						<div class="row">
+							<p>类别<span>*</span></p>
+							<el-select disabled v-model="changePopUp.type" placeholder="私人库模版" class="often">
+							</el-select>
 
-            </div>
-            <div class="row" style="margin-top: 15px;">
-              <p>关键词<span>*</span></p>
-              <input class="oftenTitle" v-model="changePopUp.title"  placeholder="请输入关键词" />
-            </div>
-            <div class="row" style="margin-top: 15px;">
-              <p>回复内容<span>*</span></p>
-              <textarea class="text" v-model="changePopUp.content" placeholder="请输入你要回复的内容"></textarea>
-            </div>
+						</div>
+						<div class="row" style="margin-top: 15px;">
+							<p>关键词<span>*</span></p>
+							<input class="oftenTitle" v-model="changePopUp.title"  placeholder="请输入关键词" />
+						</div>
+						<div class="row" style="margin-top: 15px;">
+							<p>回复内容<span>*</span></p>
+							<textarea class="text" v-model="changePopUp.content" placeholder="请输入你要回复的内容"></textarea>
+						</div>
 
-            <div style="height:40px;margin-top:20px;" class="row average ">
-              <div
-                @click="popUpChangeShow = false,changePopUp = ''"
-                class="row center hover"
-                style="width:80px;height:40px;border:1px solid rgba(221,221,221,1);background:linear-gradient(180deg,rgba(245,245,245,1) 0%,rgba(238,238,238,1) 100%);border-radius:5px;font-size:16px;color:#666;"
-              >取消</div>
-              <div
-                @click="changeFastreply()"
-                class="row center hover"
-                style="width:80px;height:40px;background:rgba(83,153,245,1);color:#FFF;border-radius:5px;font-size:16px;"
-              >确定</div>
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
+						<div style="height:40px;margin-top:20px;" class="row average ">
+							<div
+									@click="popUpChangeShow = false,changePopUp = ''"
+									class="row center hover"
+									style="width:80px;height:40px;border:1px solid rgba(221,221,221,1);background:linear-gradient(180deg,rgba(245,245,245,1) 0%,rgba(238,238,238,1) 100%);border-radius:5px;font-size:16px;color:#666;"
+							>取消</div>
+							<div
+									@click="changeFastreply()"
+									class="row center hover"
+									style="width:80px;height:40px;background:rgba(83,153,245,1);color:#FFF;border-radius:5px;font-size:16px;"
+							>确定</div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
 </template>
 
 <script>
-import "@/css/index.css";
-import leftNav from "@/components/leftNav";
-import hader from "@/components/hader";
-export default {
-  name: "FastReply",
-  data() {
-    return {
-      data: {},
-      // FastReplyLibrarySwitch: 1,
-      leftSerch: "", //左侧搜索
-      matchingSerch: "", //右侧匹配搜索
-      popUpShow: false, //添加常用语开关
-      popUpChangeShow:false, // 修改常用语开关
-      deleteArr: [],
-      popUp: {
-        //新增快捷回复
-        status:1,
-        content:'',//回复内容
-        title:''//关键字
-      },
-      changePopUp:{ }, // 修改的快捷语
-      ReplyArr: [], //快捷回复列表
-      // page: 1, //分页
-      // pageSize: 5, //分页大小
-      // total: 25, //分页总条目
-      time:{},
-    };
-  },
-  methods: {
-  
-    /******************删除单条快捷回复*****************/
-    clickDel(e){
-      this.$confirm('您确定要删除该条快捷回复吗?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          this.deleteArr.push(e);
-          this.deleteFastReply()
-        }).catch(() => {
-          this.$message({
-            type: 'info',
-            message: '已取消删除'
-          });          
-        });
-    },
-    
-    /******************显示编辑快捷窗口*******************/
-    popUpChange(e){
-      this.changePopUp = e;
-      this.popUpChangeShow = true
-    },
+	import "@/css/index.css";
+	import leftNav from "@/components/leftNav";
+	import hader from "@/components/hader";
+	import messageCenter from "@/components/messageCenter";
 
-    /***********************提示信息集合*********************/
-    succeed(num) {
-      if (num == 1) {
-        this.$notify({
-          title: "成功",
-          message: "操作成功",
-          type: "success",
-          duration: 1500
-        });
-      } else if (num == 2) {
-        this.$notify({
-          title: "错误",
-          message: "操作失败",
-          type: "error",
-          duration: 1500
-        });
-      } else if (num == 3) {
-        this.$notify({
-          title: "警告",
-          message: "请先核对再提交",
-          type: "warning",
-          duration: 1500
-        });
-      }
-    },
+	export default {
+		name: "FastReply",
+		data() {
+			return {
+				data: {},
+				// FastReplyLibrarySwitch: 1,
+				leftSerch: "", //左侧搜索
+				matchingSerch: "", //右侧匹配搜索
+				popUpShow: false, //添加常用语开关
+				popUpChangeShow:false, // 修改常用语开关
+				deleteArr: [],
+				popUp: {
+					//新增快捷回复
+					status:1,
+					content:'',//回复内容
+					title:''//关键字
+				},
+				changePopUp:{ }, // 修改的快捷语
+				ReplyArr: [], //快捷回复列表
+				// page: 1, //分页
+				// pageSize: 5, //分页大小
+				// total: 25, //分页总条目
+				time:{},
+			};
+		},
+		methods: {
 
-    /********************关闭新增**********************/
-    popUpEsc() {
-      this.popUpShow = false;
-    },
+			/******************删除单条快捷回复*****************/
+			clickDel(e){
+				this.$confirm('您确定要删除该条快捷回复吗?', '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.deleteArr.push(e);
+					this.deleteFastReply()
+				}).catch(() => {
+					this.$message({
+						type: 'info',
+						message: '已取消删除'
+					});
+				});
+			},
 
+			/******************显示编辑快捷窗口*******************/
+			popUpChange(e){
+				this.changePopUp = e;
+				this.popUpChangeShow = true
+			},
 
-    // changePage(val) {
-    //   this.page = val;
-    // },
-    // 
-    
-    /********************新增快捷回复******************/
-    newly() {
-      let obj = {
-        headers: {
-          apiToken: this.$md5("addwords" + "customer-service" + "words" + this.time[0] + "service"),
-          userToken: this.token
-        }
-      };
-      // this.popUp.status =  1;
-      this.post("api"+ this.$ports.FastReply.addWords,this.popUp,obj).then(res => {
-        if (res.data.code == 1) {
-          this.succeed(1);
-          this.ReplyArr.push({id:res.data.data.id,content:this.popUp.content,title:this.popUp.title});
-          this.$set(this.popUp,'content','')
-          this.$set(this.popUp,'title','')
-          this.popUpShow = false;
-        } else {
-          this.succeed(2);
-        }
-      });
-    },
+			/***********************提示信息集合*********************/
+			succeed(num) {
+				if (num == 1) {
+					this.$notify({
+						title: "成功",
+						message: "操作成功",
+						type: "success",
+						duration: 1500
+					});
+				} else if (num == 2) {
+					this.$notify({
+						title: "错误",
+						message: "操作失败",
+						type: "error",
+						duration: 1500
+					});
+				} else if (num == 3) {
+					this.$notify({
+						title: "警告",
+						message: "请先核对再提交",
+						type: "warning",
+						duration: 1500
+					});
+				}
+			},
 
-    /**************查询快捷回复语列表***************/
-    getFastReply() {
-      let obj = {
-        headers: {
-          apiToken: this.$md5("userwords" + "customer-service" + "index" + this.time[0]+ "service"),
-          userToken: this.token
-        }
-      };
-      this.get("api" + this.$ports.FastReply.userWords, obj).then(res => {
-        // console.log(res);
-        if (res.data.code ==1) {
-          //私有库
-          this.ReplyArr = res.data.data.userWords; // res.data.data.sysWords
-        }
-      });
-    },
+			/********************关闭新增**********************/
+			popUpEsc() {
+				this.popUpShow = false;
+			},
 
-    /********************删除快捷回复*****************/
-    deleteFastReply() {
-      let obj = {
-        headers: {
-          apiToken: this.$md5("deletewords" + "customer-service" + "words" + this.time[0] + "service"),
-          userToken: this.token
-        }
-      };
-      // console.log(this.deleteArr);
-      if (this.deleteArr.length > 0) {
-        this.post("api"+this.$ports.FastReply.deleteWords, this.deleteArr, obj).then(
-          res => {
-            if (res.data.code) {
-              this.succeed(1);
-              this.getFastReply();
-              // this.showFastReply()
-            } else {
-              this.succeed(2);
-            }
-          }
-        );
-      } else {
-        this.succeed(3);
-      }
-    },
-    // // 库状态的更改
-    // FastReplyLibrarySwitchClick(num) {
-    //   this.FastReplyLibrarySwitch = num;
-    // },
-    // 获取快捷语 用于展示(可修改)
-    // showFastReply() {
-    //   let str =
-    //     "userwords" + "customer-service" + "index" + this.time + "service";
-    //   // str = str.toLowerCase();
-    //   let obj = {
-    //     headers: {
-    //       // "Content-Type": "application/x-www-form-urlencoded",
-    //       apiToken: this.$md5(str),
-    //       userToken: this.token
-    //     }
-    //   };
-    //   this.get("api/service/index/userWords", obj).then(res => {
-    //     if (res.data.code) {
-    //       this.data = res.data.data;
-    //     }
-    //     console.log(res);
-    //   });
-    // },
 
-    /********************修改快捷语********************/
-    changeFastreply(){
-      let obj = {
-        headers: {
-          apiToken: this.$md5("updatewords" + "customer-service" + "words" + this.time[0] + "service"),
-          userToken: this.token
-        }
-      };
-      this.post('api'+this.$ports.FastReply.updateWords,{
-        id:this.changePopUp.id,
-        content:this.changePopUp.content,
-        status:1,
-        title:this.changePopUp.title
-      },obj).then((res)=>{
-        if(res.data.code == 1){
-          //this.getFastReply();
-          // this.showFastReply();
-          this.popUpChangeShow = false;
-          this.changePopUp = '';
-          this.succeed(1)
-        }else{
-          this.succeed(2)
-        }
-        console.log(res)
-      })
-    }
-  },
-  mounted() {
-    this.token = this.$store.getters.get_user_info.token ;
-    this.time = JSON.parse(sessionStorage.getItem("time"));
-    this.getFastReply();
-    //this.showFastReply();
-  },
-  components: {
-    leftNav,
-    hader
-  }
-};
+			// changePage(val) {
+			//   this.page = val;
+			// },
+			//
+
+			/********************新增快捷回复******************/
+			newly() {
+				let obj = {
+					headers: {
+						apiToken: this.$md5("addwords" + "customer-service" + "words" + this.time[0] + "service"),
+						userToken: this.token
+					}
+				};
+				// this.popUp.status =  1;
+				this.post("api"+ this.$ports.FastReply.addWords,this.popUp,obj).then(res => {
+					if (res.data.code == 1) {
+						this.succeed(1);
+						this.ReplyArr.push({id:res.data.data.id,content:this.popUp.content,title:this.popUp.title});
+						this.$set(this.popUp,'content','')
+						this.$set(this.popUp,'title','')
+						this.popUpShow = false;
+					} else {
+						this.succeed(2);
+					}
+				});
+			},
+
+			/**************查询快捷回复语列表***************/
+			getFastReply() {
+				let obj = {
+					headers: {
+						apiToken: this.$md5("userwords" + "customer-service" + "index" + this.time[0]+ "service"),
+						userToken: this.token
+					}
+				};
+				this.get("api" + this.$ports.FastReply.userWords, obj).then(res => {
+					// console.log(res);
+					if (res.data.code ==1) {
+						//私有库
+						this.ReplyArr = res.data.data.userWords; // res.data.data.sysWords
+					}
+				});
+			},
+
+			/********************删除快捷回复*****************/
+			deleteFastReply() {
+				let obj = {
+					headers: {
+						apiToken: this.$md5("deletewords" + "customer-service" + "words" + this.time[0] + "service"),
+						userToken: this.token
+					}
+				};
+				// console.log(this.deleteArr);
+				if (this.deleteArr.length > 0) {
+					this.post("api"+this.$ports.FastReply.deleteWords, this.deleteArr, obj).then(
+						res => {
+							if (res.data.code) {
+								this.succeed(1);
+								this.getFastReply();
+								// this.showFastReply()
+							} else {
+								this.succeed(2);
+							}
+						}
+					);
+				} else {
+					this.succeed(3);
+				}
+			},
+			// // 库状态的更改
+			// FastReplyLibrarySwitchClick(num) {
+			//   this.FastReplyLibrarySwitch = num;
+			// },
+			// 获取快捷语 用于展示(可修改)
+			// showFastReply() {
+			//   let str =
+			//     "userwords" + "customer-service" + "index" + this.time + "service";
+			//   // str = str.toLowerCase();
+			//   let obj = {
+			//     headers: {
+			//       // "Content-Type": "application/x-www-form-urlencoded",
+			//       apiToken: this.$md5(str),
+			//       userToken: this.token
+			//     }
+			//   };
+			//   this.get("api/service/index/userWords", obj).then(res => {
+			//     if (res.data.code) {
+			//       this.data = res.data.data;
+			//     }
+			//     console.log(res);
+			//   });
+			// },
+
+			/********************修改快捷语********************/
+			changeFastreply(){
+				let obj = {
+					headers: {
+						apiToken: this.$md5("updatewords" + "customer-service" + "words" + this.time[0] + "service"),
+						userToken: this.token
+					}
+				};
+				this.post('api'+this.$ports.FastReply.updateWords,{
+					id:this.changePopUp.id,
+					content:this.changePopUp.content,
+					status:1,
+					title:this.changePopUp.title
+				},obj).then((res)=>{
+					if(res.data.code == 1){
+						//this.getFastReply();
+						// this.showFastReply();
+						this.popUpChangeShow = false;
+						this.changePopUp = '';
+						this.succeed(1)
+					}else{
+						this.succeed(2)
+					}
+					console.log(res)
+				})
+			}
+		},
+		mounted() {
+			this.token = this.$store.getters.get_user_info.token ;
+			this.time = JSON.parse(sessionStorage.getItem("time"));
+			this.getFastReply();
+			//this.showFastReply();
+		},
+		components: {
+			leftNav,
+			hader,
+			messageCenter
+		}
+	};
 </script>
 
 <style>
-.hover:hover{
-  cursor: pointer;
-}
-.editor{
-  color:#666;
-  font-size:16px;
-  font-weight:bold;
-  font-family:PingFang SC;
-  text-align: center;
-  margin-top:20px;
-}
-p {
-  margin: 0;
-}
-.tit {
-  padding-left: 20px;
-  font-size: 14px;
-  color: #666666;
-  height: 50px;
-  line-height: 50px;
-}
-.library {
-  height: 50px;
-  line-height: 50px;
-  border: 1px solid #d5e5ff;
-  border-right: none;
-}
-.library div {
-  width: 50%;
-  text-align: center;
-}
-/* .library div span {
-} */
-.line {
-  position: relative;
-}
-.line::after {
-  content: "";
-  display: inline-block;
-  width: 1px;
-  height: 20px;
-  line-height: 20px;
-  background: #666666;
-  position: absolute;
-  right: 0;
-  top: 15px;
-}
+	.hover:hover{
+		cursor: pointer;
+	}
+	.editor{
+		color:#666;
+		font-size:16px;
+		font-weight:bold;
+		font-family:PingFang SC;
+		text-align: center;
+		margin-top:20px;
+	}
+	p {
+		margin: 0;
+	}
+	.tit {
+		padding-left: 20px;
+		font-size: 14px;
+		color: #666666;
+		height: 50px;
+		line-height: 50px;
+	}
+	.library {
+		height: 50px;
+		line-height: 50px;
+		border: 1px solid #d5e5ff;
+		border-right: none;
+	}
+	.library div {
+		width: 50%;
+		text-align: center;
+	}
+	/* .library div span {
+	} */
+	.line {
+		position: relative;
+	}
+	.line::after {
+		content: "";
+		display: inline-block;
+		width: 1px;
+		height: 20px;
+		line-height: 20px;
+		background: #666666;
+		position: absolute;
+		right: 0;
+		top: 15px;
+	}
 
-.tit {
-  padding-left: 20px;
-  font-size: 14px;
-  color: #666666;
-  height: 50px;
-  line-height: 50px;
-  font-weight: bold;
-  border-bottom: 1px solid #d5e5ff;
-}
-.library {
-  height: 50px;
-  line-height: 50px;
-  border: 1px solid #d5e5ff;
-}
-.library div {
-  width: 50%;
-  text-align: center;
-}
-.library div span {
-  color: #666666;
-  font-size: 14px;
-  padding-bottom: 13px;
-}
-div span.acty {
-  color: #5399f5;
-  border-bottom: 2px solid #5399f5;
-}
-.line {
-  position: relative;
-}
-.line::after {
-  content: "";
-  display: inline-block;
-  width: 1px;
-  height: 20px;
-  line-height: 20px;
-  background: #666666;
-  position: absolute;
-  right: 0;
-  top: 15px;
-}
-.search {
-  margin: 20px 20px 22px;
-}
-.md20 {
-  margin-left: 20px;
-  margin-bottom: 20px;
-}
-.phrases span {
-  color: #666666;
-  font-size: 14px;
-}
-.list div span {
-  color: #999999;
-  font-size: 14px;
-}
-.list div span:nth-child(1) {
-  color: #666666;
-  font-weight: 400;
-}
-.list div {
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-}
-.fnc {
-  margin-left: 37px;
-}
-.fnc i {
-  color: #999999;
-  display: inline-block;
-  width: 20px;
-  height: 20px;
-}
+	.tit {
+		padding-left: 20px;
+		font-size: 14px;
+		color: #666666;
+		height: 50px;
+		line-height: 50px;
+		font-weight: bold;
+		border-bottom: 1px solid #d5e5ff;
+	}
+	.library {
+		height: 50px;
+		line-height: 50px;
+		border: 1px solid #d5e5ff;
+	}
+	.library div {
+		width: 50%;
+		text-align: center;
+	}
+	.library div span {
+		color: #666666;
+		font-size: 14px;
+		padding-bottom: 13px;
+	}
+	div span.acty {
+		color: #5399f5;
+		border-bottom: 2px solid #5399f5;
+	}
+	.line {
+		position: relative;
+	}
+	.line::after {
+		content: "";
+		display: inline-block;
+		width: 1px;
+		height: 20px;
+		line-height: 20px;
+		background: #666666;
+		position: absolute;
+		right: 0;
+		top: 15px;
+	}
+	.search {
+		margin: 20px 20px 22px;
+	}
+	.md20 {
+		margin-left: 20px;
+		margin-bottom: 20px;
+	}
+	.phrases span {
+		color: #666666;
+		font-size: 14px;
+	}
+	.list div span {
+		color: #999999;
+		font-size: 14px;
+	}
+	.list div span:nth-child(1) {
+		color: #666666;
+		font-weight: 400;
+	}
+	.list div {
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+	}
+	.fnc {
+		margin-left: 37px;
+	}
+	.fnc i {
+		color: #999999;
+		display: inline-block;
+		width: 20px;
+		height: 20px;
+	}
 
-/* main */
-.mainTitle {
-  height: 60px;
-}
-.mainTitle div {
-  position: relative;
-}
-.mainTitle div img {
-  position: absolute;
-  right: 12px;
-  top: 0;
-  bottom: 0;
-  margin: auto 0;
-}
-.mainTitle div input {
-  color: #ccc;
-}
-.mainTitle div input:focus {
-  outline: none;
-  color: #666;
-}
-.el-checkbox {
-  width: 100%;
-}
-.el-form-item__content {
-  margin-left: 0 !important;
-  line-height: 0;
-  height: 50px;
-}
-.el-checkbox {
-  padding-left: 30px;
-  height: 50px;
-  display: flex;
-  align-items: center;
-}
-/* .is-disabled{
-  background: #E6EBFF;
-} */
+	/* main */
+	.mainTitle {
+		height: 60px;
+	}
+	.mainTitle div {
+		position: relative;
+	}
+	.mainTitle div img {
+		position: absolute;
+		right: 12px;
+		top: 0;
+		bottom: 0;
+		margin: auto 0;
+	}
+	.mainTitle div input {
+		color: #ccc;
+	}
+	.mainTitle div input:focus {
+		outline: none;
+		color: #666;
+	}
+	.el-checkbox {
+		width: 100%;
+	}
+	.el-form-item__content {
+		margin-left: 0 !important;
+		line-height: 0;
+		height: 50px;
+	}
+	.el-checkbox {
+		padding-left: 30px;
+		height: 50px;
+		display: flex;
+		align-items: center;
+	}
+	/* .is-disabled{
+	  background: #E6EBFF;
+	} */
 
-.el-checkbox:nth-child(even) {
-  background: #fff;
-}
-.el-checkbox:nth-child(odd) {
-  background: #eff2fd;
-}
-.el-checkbox:first-child {
-  background: #e6ebff;
-}
-.el-form-item {
-  margin-bottom: 0;
-}
-.el-main {
-  overflow: visible;
-  height: 92.1vh;
-}
-.el-checkbox__label {
-  padding-left: 50px;
-  display: block;
-  width: 100%;
-}
-.mainBox {
-  width: 100%;
-  height: 80%;
-  overflow-x: hidden;
-  overflow-y: auto;
-  margin-right: 0;
-}
-.addContent{
-  color:#666;
-  font-size:14px;
-  position: absolute;
-  left:16%;top:0;
-  width:70%;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-}
+	.el-checkbox:nth-child(even) {
+		background: #fff;
+	}
+	.el-checkbox:nth-child(odd) {
+		background: #eff2fd;
+	}
+	.el-checkbox:first-child {
+		background: #e6ebff;
+	}
+	.el-form-item {
+		margin-bottom: 0;
+	}
+	.el-main {
+		overflow: visible;
+		height: 92.1vh;
+	}
+	.el-checkbox__label {
+		padding-left: 50px;
+		display: block;
+		width: 100%;
+	}
+	.mainBox {
+		width: 100%;
+		height: 80%;
+		overflow-x: hidden;
+		overflow-y: auto;
+		margin-right: 0;
+	}
+	.addContent{
+		color:#666;
+		font-size:14px;
+		position: absolute;
+		left:16%;top:0;
+		width:70%;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+	}
 
-.popUp {
-  width: 100%;
-  height: 100%;
-  position: fixed;
-  left: 0;
-  top: 0;
-  z-index: 99;
-}
-.popUpBg {
-  width: 100%;
-  height: 100%;
-  background: rgba(0, 0, 0, 0.01);
-}
-.popUpBox {
-  position: absolute;
-  left: 0;
-  right: 0;
-  margin: auto auto;
-  top: 0;
-  bottom: 0;
-  width: 380px;
-  height: 400px;
-  background: #fff;
-  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
-}
-.popUpBoxData {
-  margin-top: 30px;
-  /* padding: 0 44px; */
-}
-.popUpBoxData p {
-  /* margin-top: 10px; */
-  color: #666;
-  font-size: 14px;
-  /* height: 30px; */
-  width: 92px;
-  line-height: 40px;
-  /* margin-bottom: 15px; */
-}
-.popUpBoxData p span {
-  color: #f60;
-}
-.often {
-  width: 200px;
-  height: 40px;
-  color: #999;
-  position: relative;
-}
-.el-input__inner {
-  border: 1px solid #ddd;
-  border-radius: 0px;
-  color: #666;
-  padding-left: 7px;
-}
-.el-select-dropdown__item {
-  padding-left: 10px;
-}
-.el-popper[x-placement^="bottom"] .popper__arrow::after {
-  display: none;
-}
-.el-popper[x-placement^="bottom"] .popper__arrow {
-  display: none;
-}
-.el-select .el-input__inner:focus {
-  border-color: #ddd;
-}
-.el-select-dropdown {
-  border-radius: 0;
-}
-.el-select .el-input.is-focus .el-input__inner {
-  border-color: #ddd;
-}
-.el-popper[x-placement^="bottom"] {
-  margin: 0;
-}
-.el-icon-arrow-up:before {
-  content: "\E78F";
-  color: #666;
-}
-.choose {
-  width: 100%;
-  position: absolute;
-  left: 0;
-  bottom: 0;
-  background: #000;
-}
-.oftenTitle {
-  width: 140px;
-  height: 40px;
-  border: 1px solid #ddd;
-  padding-left: 7px;
-  color: #999;
-}
-.oftenTitle:focus {
-  outline: none;
-  color: #666;
-}
-.el-input__inner::-webkit-input-placeholder {
-  /* WebKit browsers */
-  color: #666;
-}
-.text {
-  width: 200px;
-  height: 120px;
-  resize: none;
-  border: 1px solid #ddd;
-  padding: 10px 7px;
-  font-size: 14px;
-  color: #999;
-}
-.list{
-  line-height: 50px;
-}
-.phrasesList{
-  padding-right: 20px;
-}
-.text:focus {
-  outline: none;
+	.popUp {
+		width: 100%;
+		height: 100%;
+		position: fixed;
+		left: 0;
+		top: 0;
+		z-index: 99;
+	}
+	.popUpBg {
+		width: 100%;
+		height: 100%;
+		background: rgba(0, 0, 0, 0.01);
+	}
+	.popUpBox {
+		position: absolute;
+		left: 0;
+		right: 0;
+		margin: auto auto;
+		top: 0;
+		bottom: 0;
+		width: 380px;
+		height: 400px;
+		background: #fff;
+		box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
+	}
+	.popUpBoxData {
+		margin-top: 30px;
+		/* padding: 0 44px; */
+	}
+	.popUpBoxData p {
+		/* margin-top: 10px; */
+		color: #666;
+		font-size: 14px;
+		/* height: 30px; */
+		width: 92px;
+		line-height: 40px;
+		/* margin-bottom: 15px; */
+	}
+	.popUpBoxData p span {
+		color: #f60;
+	}
+	.often {
+		width: 200px;
+		height: 40px;
+		color: #999;
+		position: relative;
+	}
+	.el-input__inner {
+		border: 1px solid #ddd;
+		border-radius: 0px;
+		color: #666;
+		padding-left: 7px;
+	}
+	.el-select-dropdown__item {
+		padding-left: 10px;
+	}
+	.el-popper[x-placement^="bottom"] .popper__arrow::after {
+		display: none;
+	}
+	.el-popper[x-placement^="bottom"] .popper__arrow {
+		display: none;
+	}
+	.el-select .el-input__inner:focus {
+		border-color: #ddd;
+	}
+	.el-select-dropdown {
+		border-radius: 0;
+	}
+	.el-select .el-input.is-focus .el-input__inner {
+		border-color: #ddd;
+	}
+	.el-popper[x-placement^="bottom"] {
+		margin: 0;
+	}
+	.el-icon-arrow-up:before {
+		content: "\E78F";
+		color: #666;
+	}
+	.choose {
+		width: 100%;
+		position: absolute;
+		left: 0;
+		bottom: 0;
+		background: #000;
+	}
+	.oftenTitle {
+		width: 140px;
+		height: 40px;
+		border: 1px solid #ddd;
+		padding-left: 7px;
+		color: #999;
+	}
+	.oftenTitle:focus {
+		outline: none;
+		color: #666;
+	}
+	.el-input__inner::-webkit-input-placeholder {
+		/* WebKit browsers */
+		color: #666;
+	}
+	.text {
+		width: 200px;
+		height: 120px;
+		resize: none;
+		border: 1px solid #ddd;
+		padding: 10px 7px;
+		font-size: 14px;
+		color: #999;
+	}
+	.list{
+		line-height: 50px;
+	}
+	.phrasesList{
+		padding-right: 20px;
+	}
+	.text:focus {
+		outline: none;
 
-  color: #666;
-}
+		color: #666;
+	}
 </style>

+ 255 - 248
service/src/pages/LeaveMessage.vue

@@ -1,262 +1,269 @@
 <template>
-  <div>
-    <div class="row allAlignment">
-      <leftNav />
-      <div>
-        <hader />
-        <div class="column allAlignment box" style="background:#F6F8FF; ">
-          <div style="height:8vh; background:#FFF; " class="row allAlignment">
-            <div class="name_box row center">
-              <span>留言列表</span>
-            </div>
-            <div style=" font-size: 0;" class="row center allAlignment">
-              <el-select v-model="value" size="mini" style="width: 28%;" placeholder="请选择">
-                <el-option
-                  v-for="item in options"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                ></el-option>
-              </el-select>
-              <div style="font-size: 0;padding-right: 20px;">
-                <el-input
-                  placeholder="请输入内容"
-                  size="mini"
-                  v-model="input3"
-                  class="input-with-select"
-                >
-                  <el-button slot="append" icon="el-icon-search"></el-button>
-                </el-input>
-              </div>
-            </div>
-          </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%"
-            >
-              <el-table-column prop="name" label="用户名"></el-table-column>
-              <el-table-column prop="time" label="留言时间" width="180"></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="endTime" label="当前状态">
-                <template slot-scope="scope">
+	<div>
+		<div class="row allAlignment">
+			<leftNav />
+			<div>
+				<hader />
+				<messageCenter></messageCenter>
+				<div class="column allAlignment box" style="background:#F6F8FF; ">
+					<div style="height:8vh; background:#FFF; " class="row allAlignment">
+						<div class="name_box row center">
+							<span>留言列表</span>
+						</div>
+						<div class="row center allAlignment">
+							<el-select v-model="value" size="mini" style="width: 28%;" placeholder="请选择">
+								<el-option
+										v-for="item in options"
+										:key="item.value"
+										:label="item.label"
+										:value="item.value"
+								></el-option>
+							</el-select>
+							<div>
+								<el-input
+										placeholder="请输入内容"
+										size="mini"
+										v-model="input3"
+										class="input-with-select"
+								>
+									<el-button slot="append" icon="el-icon-search"></el-button>
+								</el-input>
+							</div>
+						</div>
+					</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%"
+						>
+							<el-table-column prop="name" label="用户名"></el-table-column>
+							<el-table-column prop="time" label="留言时间" width="180"></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="endTime" label="当前状态">
+								<template slot-scope="scope">
                   <span
-                    style="color:#FF6600"
-                    v-if="scope.row.currentState === '未回复'"
-                  >{{scope.row.currentState}}</span>
-                  <span v-if="scope.row.currentState === '已回复'">{{scope.row.currentState}}</span>
-                </template>
-              </el-table-column>
-              <!-- <el-table-column
-                                prop="currentState"
-                                label="当前状态"
-                                width="100"
-                                :filters="[{ text: '未回复', value: '未回复' }, { text: '已回复', value: '已回复' }]"
-                                :filter-method="filterTag"
-                                filter-placement="bottom-end">
-                                <template slot-scope="scope">
-                                    <el-tag
-                                    :type="scope.row.currentState === '未回复' ? 'primary' : 'success'"
-                                    disable-transitions>{{scope.row.currentState}}</el-tag>
-                                </template>
-              </el-table-column>-->
-              <el-table-column prop="satisfaction" label="处理人"></el-table-column>
-            </el-table>
-          </div>
-          <div v-show="pages >9" style=" padding: 10px;">
-            <el-pagination background layout="prev, pager, next" :total="pages"></el-pagination>
-          </div>
-          <div class="right_box" v-show="isShow">
-            <historicalRecord :show="isShow" :uid="uid" v-on:childValue="childValue" />
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
+						  style="color:#FF6600"
+						  v-if="scope.row.currentState === '未回复'"
+				  >{{scope.row.currentState}}</span>
+									<span v-if="scope.row.currentState === '已回复'">{{scope.row.currentState}}</span>
+								</template>
+							</el-table-column>
+							<!-- <el-table-column
+											  prop="currentState"
+											  label="当前状态"
+											  width="100"
+											  :filters="[{ text: '未回复', value: '未回复' }, { text: '已回复', value: '已回复' }]"
+											  :filter-method="filterTag"
+											  filter-placement="bottom-end">
+											  <template slot-scope="scope">
+												  <el-tag
+												  :type="scope.row.currentState === '未回复' ? 'primary' : 'success'"
+												  disable-transitions>{{scope.row.currentState}}</el-tag>
+											  </template>
+							</el-table-column>-->
+							<el-table-column prop="satisfaction" label="处理人"></el-table-column>
+						</el-table>
+					</div>
+					<div v-show="pages >9" style=" padding: 10px;">
+						<el-pagination background layout="prev, pager, next" :total="pages"></el-pagination>
+					</div>
+					<div class="right_box" v-show="isShow">
+						<historicalRecord :show="isShow" :uid="uid" v-on:childValue="childValue" />
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
 </template>
 
 <script>
-import "@/css/index.css";
-import leftNav from "@/components/leftNav";
-import hader from "@/components/hader";
-import historicalRecord from "@/components/historicalRecord";
-export default {
-  name: "SessionHistory",
-  data() {
-    return {
-      isShow: false,
-      uid: "",
-      pages: 10,
-      tableData: [],
-      options: [
-        {
-          value: "今日",
-          label: "今日"
-        },
-        {
-          value: "最近3天",
-          label: "最近3天"
-        },
-        {
-          value: "最近7天",
-          label: "最近7天"
-        },
-        {
-          value: "最近15天",
-          label: "最近15天"
-        },
-        {
-          value: "最近30天",
-          label: "最近30天"
-        }
-      ],
-      value: "",
-      input3: "",
-      startTime: "", // 请求结果开始时间
-      endTime: "" // 请求结果结束时间
-    };
-  },
-  components: {
-    leftNav,
-    hader,
-    historicalRecord
-  },
-  mounted() {
-    this.value = this.options[2].value;
-  },
-  computed: {
-    // 获取客服查询时间
-    getValueChange() {
-      return this.value;
-    }
-  },
-  watch: {
-    getValueChange(val) {
-      this.getStartEndAjaxTime(val);
-    }
-  },
-  methods: {
-    // 获取请求参数开始和结束时间
-    getStartEndAjaxTime(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天") {
-        time2.setDate(time.getDate()-3)
-      } else if (e == "最近7天") {
-        time2.setDate(time.getDate()-7)
-      } else if (e == "最近15天") {
-        time2.setDate(time.getDate()-15)
-      } else if (e == "最近30天") {
-        time2.setDate(time.getDate()-30)
-      }
-      this.endTime = getDate(time.getFullYear(),time.getMonth(),time.getDate())
-      this.startTime = getDate(time2.getFullYear(),time2.getMonth(),time2.getDate())
-      this.getSessionList()
-    },
-    // 获取列表数据
-    getSessionList() {
-      console.log('start',this.startTime,'end',this.endTime);
-      let str =
-        "index" + "customer-service" + "message" + this.time + "service";
-      let obj = {
-        headers: {
-          "Content-Type": "application/x-www-form-urlencoded",
-          apiToken: this.$md5(str),
-          userToken: this.token
-        }
-      };
-      this.post(
-        "api/service/Message/index",
-        {
-          start_time: this.startTime,
-          end_time: this.endTime
-        },
-        obj
-      ).then(res => {
-        console.log(res)
-        if(res.data.data){
-          this.tableData = res.data.data
-        }
-      });
-    },
-    click_row(row, column, event) {
-      // console.log(this.value);
-      // console.log(row.uid)
-      this.uid = row.uid;
-      this.isShow = true;
-    },
-    childValue(e) {
-      //console.log(e);
-      this.isShow = e;
-    },
+	import "@/css/index.css";
+	import leftNav from "@/components/leftNav";
+	import hader from "@/components/hader";
+	import historicalRecord from "@/components/historicalRecord";
+	import messageCenter from "@/components/messageCenter";
 
-    // resetDateFilter() {
-    //     this.$refs.filterTable.clearFilter('date');
-    // },
-    // clearFilter() {
-    //     this.$refs.filterTable.clearFilter();
-    // },
-    // formatter(row, column) {
-    //     return row.address;
-    // },
-    filterTag(value, row) {
-      return row.tag === value;
-    }
-  }
-};
+	export default {
+		name: "SessionHistory",
+		data() {
+			return {
+				isShow: false,
+				uid: "",
+				pages: 10,
+				tableData: [],
+				options: [
+					{
+						value: "今日",
+						label: "今日"
+					},
+					{
+						value: "最近3天",
+						label: "最近3天"
+					},
+					{
+						value: "最近7天",
+						label: "最近7天"
+					},
+					{
+						value: "最近15天",
+						label: "最近15天"
+					},
+					{
+						value: "最近30天",
+						label: "最近30天"
+					}
+				],
+				value: "",
+				input3: "",
+				startTime: "", // 请求结果开始时间
+				endTime: "" // 请求结果结束时间
+			};
+		},
+		components: {
+			leftNav,
+			hader,
+			historicalRecord,
+			messageCenter
+		},
+		mounted() {
+			this.value = this.options[2].value;
+		},
+		computed: {
+			// 获取客服查询时间
+			getValueChange() {
+				return this.value;
+			}
+		},
+		watch: {
+			getValueChange(val) {
+				this.getStartEndAjaxTime(val);
+			}
+		},
+		methods: {
+			// 获取请求参数开始和结束时间
+			getStartEndAjaxTime(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天") {
+					time2.setDate(time.getDate()-3)
+				} else if (e == "最近7天") {
+					time2.setDate(time.getDate()-7)
+				} else if (e == "最近15天") {
+					time2.setDate(time.getDate()-15)
+				} else if (e == "最近30天") {
+					time2.setDate(time.getDate()-30)
+				}
+				this.endTime = getDate(time.getFullYear(),time.getMonth(),time.getDate())
+				this.startTime = getDate(time2.getFullYear(),time2.getMonth(),time2.getDate())
+				this.getSessionList()
+			},
+			// 获取列表数据
+			getSessionList() {
+				console.log('start',this.startTime,'end',this.endTime);
+				let str =
+					"index" + "customer-service" + "message" + this.time + "service";
+				let obj = {
+					headers: {
+						"Content-Type": "application/x-www-form-urlencoded",
+						apiToken: this.$md5(str),
+						userToken: this.token
+					}
+				};
+				this.post(
+					"api/service/Message/index",
+					{
+						start_time: this.startTime,
+						end_time: this.endTime
+					},
+					obj
+				).then(res => {
+					console.log(res)
+					if(res.data.data){
+						this.tableData = res.data.data
+					}
+				});
+			},
+			click_row(row, column, event) {
+				// console.log(this.value);
+				// console.log(row.uid)
+				this.uid = row.uid;
+				this.isShow = true;
+			},
+			childValue(e) {
+				//console.log(e);
+				this.isShow = e;
+			},
+
+			// resetDateFilter() {
+			//     this.$refs.filterTable.clearFilter('date');
+			// },
+			// clearFilter() {
+			//     this.$refs.filterTable.clearFilter();
+			// },
+			// formatter(row, column) {
+			//     return row.address;
+			// },
+			filterTag(value, row) {
+				return row.tag === value;
+			}
+		}
+	};
 </script>
 
 <style >
-.el-pagination .btn-next .el-icon{
-  display: none;
-}
-.cell {
-  text-align: center;
-}
-.el-pagination {
-  text-align: center;
-  font-size: 0;
-}
-.el-table::before {
-  z-index: 0 !important;
-}
+	.el-pagination .btn-next .el-icon{
+		display: none;
+	}
+	.cell {
+		text-align: center;
+	}
+	.el-pagination {
+		text-align: center;
+		font-size: 0;
+	}
+	.el-table::before {
+		z-index: 0 !important;
+	}
 
-.input-with-select {
-  width: 100%;
-}
-.name_box {
-  margin-left: 20px;
-  font-size: 14px;
-  font-weight: bold;
-  color: rgba(102, 102, 102, 1);
-}
-.box {
-  width: 100%;
-}
+	.input-with-select {
+		width: 100%;
+	}
+	.name_box {
+		margin-left: 20px;
+		font-size: 14px;
+		font-weight: bold;
+		color: rgba(102, 102, 102, 1);
+	}
+	.box {
+		width: 100%;
+	}
 
-.right_box {
-  position: fixed;
-  top: 33px;
-  right: 0;
-  width: 100%;
-  /* height: 100vh;
-        background: red; */
-  /* //background: rgba(255, 255, 255, 0.315); */
-}
+	.right_box {
+		position: fixed;
+		top: 33px;
+		right: 0;
+		width: 100%;
+		/* height: 100vh;
+			  background: red; */
+		/* //background: rgba(255, 255, 255, 0.315); */
+	}
+	.el-input-group__append {
+		text-align: center;
+	}
 </style>
 <style scoped>
-.el-table td {
-  padding: 8px 0;
-}
+	.el-table td {
+		padding: 8px 0;
+	}
 </style>

+ 4 - 1
service/src/pages/PersonalInformation.vue

@@ -3,6 +3,7 @@
     <leftNav />
     <div>
       <hader />
+      <messageCenter></messageCenter>
       <div class="user_box scroll">
         <div>
           <!-- <div class="headPortrait">
@@ -143,6 +144,7 @@
 import "@/css/index.css";
 import leftNav from "@/components/leftNav";
 import hader from "@/components/hader";
+import messageCenter from "@/components/messageCenter";
 export default {
   name: "PersonalInformation",
   data() {
@@ -242,7 +244,8 @@ export default {
   },
   components: {
     leftNav,
-    hader
+    hader,
+    messageCenter
   }
 };
 </script>

+ 207 - 203
service/src/pages/SessionHistory.vue

@@ -1,218 +1,222 @@
 <template>
-  <div>
-    <div class="row allAlignment">
-      <leftNav />
-      <div>
-        <hader />
-        <div class="column allAlignment div_box" style="background:#F6F8FF; ">
-          <div style="height:8vh; background:#FFF; " class="row allAlignment">
-            <div class="name_box row center">
-              <span>历史会话</span>
-            </div>
-            <div style=" font-size: 0;" class="row center allAlignment">
-              <el-select v-model="value" size="mini" style="width: 28%;" placeholder="请选择">
-                <el-option
-                  v-for="item in options"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                ></el-option>
-              </el-select>
-              <div style="font-size: 0;padding-right: 20px;">
-                <el-input
-                  placeholder="请输入内容"
-                  size="mini"
-                  v-model="input3"
-                  class="input-with-select"
-                >
-                  <el-button slot="append" icon="el-icon-search"></el-button>
-                </el-input>
-              </div>
-            </div>
-          </div>
-          <div style="margin:0 20px;">
-            <el-table 
-              v-loading="loading"
-              element-loading-text="拼命加载中"
-              element-loading-spinner="el-icon-loading"
-              element-loading-background="rgba(0, 0, 0, 0.8)"
-              :header-cell-style="{background:'#eef1f6',color:'#606266'}" :row-style="{background:'#ffffff',color:'#606266'}"
-              :data="tableData" stripe @row-dblclick="click_row"style="width: 100%" >
-              <el-table-column prop="servicelog_id" label="会话ID"  width="80"></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="start_time" label="会话开始时间"></el-table-column>
-              <el-table-column prop="end_time" label="会话结束时间"></el-table-column>
-              <el-table-column prop="evaluate_id" label="满意度"  width="80"></el-table-column>
-            </el-table>
-          </div>
-          <div v-show="pages > 9 " style=" padding: 10px;">
-            <el-pagination background layout="prev, pager, next" prev-text='上一页' next-text='下一页'  
-            @prev-click='upData' @next-click="downData" @current-change="current_page" :total="pages"></el-pagination>
-          </div>
-          <div class="right_box" v-show="isShow">
-            <historicalRecord :show="isShow" :uid="uid" v-on:childValue="childValue" />
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
+	<div>
+		<div class="row allAlignment">
+			<leftNav />
+			<div>
+				<hader />
+				<messageCenter></messageCenter>
+				<div class="column allAlignment div_box" style="background:#F6F8FF; ">
+					<div style="height:8vh; background:#FFF; " class="row allAlignment">
+						<div class="name_box row center">
+							<span>历史会话</span>
+						</div>
+						<div style=" font-size: 0;" class="row center allAlignment">
+							<el-select v-model="value" size="mini" style="width: 28%;" placeholder="请选择">
+								<el-option
+										v-for="item in options"
+										:key="item.value"
+										:label="item.label"
+										:value="item.value"
+								></el-option>
+							</el-select>
+							<div style="font-size: 0;padding-right: 20px;">
+								<el-input
+										placeholder="请输入内容"
+										size="mini"
+										v-model="input3"
+										class="input-with-select"
+								>
+									<el-button slot="append" icon="el-icon-search"></el-button>
+								</el-input>
+							</div>
+						</div>
+					</div>
+					<div style="margin:0 20px;">
+						<el-table
+								v-loading="loading"
+								element-loading-text="拼命加载中"
+								element-loading-spinner="el-icon-loading"
+								element-loading-background="rgba(0, 0, 0, 0.8)"
+								:header-cell-style="{background:'#eef1f6',color:'#606266'}" :row-style="{background:'#ffffff',color:'#606266'}"
+								:data="tableData" stripe @row-dblclick="click_row"style="width: 100%" >
+							<el-table-column prop="servicelog_id" label="会话ID"  width="80"></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="start_time" label="会话开始时间"></el-table-column>
+							<el-table-column prop="end_time" label="会话结束时间"></el-table-column>
+							<el-table-column prop="evaluate_id" label="满意度"  width="80"></el-table-column>
+						</el-table>
+					</div>
+					<div v-show="pages > 9 " style=" padding: 10px;">
+						<el-pagination background layout="prev, pager, next" prev-text='上一页' next-text='下一页'
+									   @prev-click='upData' @next-click="downData" @current-change="current_page" :total="pages"></el-pagination>
+					</div>
+					<div class="right_box" v-show="isShow">
+						<historicalRecord :show="isShow" :uid="uid" v-on:childValue="childValue" />
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
 </template>
 
 <script>
-import "@/css/index.css";
-import leftNav from "@/components/leftNav";
-import hader from "@/components/hader";
-import historicalRecord from "@/components/historicalRecord";
-export default {
-  name: "SessionHistory",
-  data() {
-    return {
-      isShow: false,
-      uid: "",
-      pages: 0,
-      tableData: [],
-      options: [
-        {
-          value: "今日",
-          label: "今日"
-        },
-        {
-          value: "最近3天",
-          label: "最近3天"
-        },
-        {
-          value: "最近7天",
-          label: "最近7天"
-        },
-        {
-          value: "最近15天",
-          label: "最近15天"
-        },
-        {
-          value: "最近30天",
-          label: "最近30天"
-        }
-      ],
-      value: "",
-      input3: "",
-      token: "",
-      time: "",
-      loading: false,//加载条
-    };
-  },
-  components: {
-    leftNav,
-    hader,
-    historicalRecord
-  },
-  mounted() {
-    this.value = this.options[2].value;
-    this.token = this.$store.getters.get_user_info.token;
-    this.time = JSON.parse(sessionStorage.getItem("time"));
-    this.getSessionHistory(1);
-  },
-  methods: {
-    // 获取会话记录
-    getSessionHistory(page,size = 10) {
-      let obj = {
-         headers:{
-          // "Content-Type": "application/json",
-          'apiToken': this.$md5("historylist" + "customer-service" + "history" + this.time[0] + "service"),
-          'userToken': this.token
-        }
-      }    
-      this.loading = true;
-      this.post("api/service/history/historyList",{
-        currentPage: page,
-        pageSize: size
-      },obj).then(res => {
+	import "@/css/index.css";
+	import leftNav from "@/components/leftNav";
+	import hader from "@/components/hader";
+	import historicalRecord from "@/components/historicalRecord";
+	import messageCenter from "@/components/messageCenter";
 
-        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);
-             e.intime = this.$public.customFormatDateTime(e.intime);
-             e.start_time = this.$public.customFormatDateTime(e.start_time);
-          }) 
-          this.pages = res.data.data.total;
-        }
-        this.loading =false;
-      });
-    },
-    /******************************************/
-    //查看详情会话记录
-    click_row(row, column, event) {
-      this.uid = row.servicelog_id;
-      this.isShow = true;
-    },
+	export default {
+		name: "SessionHistory",
+		data() {
+			return {
+				isShow: false,
+				uid: "",
+				pages: 0,
+				tableData: [],
+				options: [
+					{
+						value: "今日",
+						label: "今日"
+					},
+					{
+						value: "最近3天",
+						label: "最近3天"
+					},
+					{
+						value: "最近7天",
+						label: "最近7天"
+					},
+					{
+						value: "最近15天",
+						label: "最近15天"
+					},
+					{
+						value: "最近30天",
+						label: "最近30天"
+					}
+				],
+				value: "",
+				input3: "",
+				token: "",
+				time: "",
+				loading: false,//加载条
+			};
+		},
+		components: {
+			leftNav,
+			hader,
+			historicalRecord,
+			messageCenter
+		},
+		mounted() {
+			this.value = this.options[2].value;
+			this.token = this.$store.getters.get_user_info.token;
+			this.time = JSON.parse(sessionStorage.getItem("time"));
+			this.getSessionHistory(1);
+		},
+		methods: {
+			// 获取会话记录
+			getSessionHistory(page,size = 10) {
+				let obj = {
+					headers:{
+						// "Content-Type": "application/json",
+						'apiToken': this.$md5("historylist" + "customer-service" + "history" + this.time[0] + "service"),
+						'userToken': this.token
+					}
+				}
+				this.loading = true;
+				this.post("api/service/history/historyList",{
+					currentPage: page,
+					pageSize: size
+				},obj).then(res => {
 
-    /******************************************/
-    //关闭会话详情记录
-    childValue(e) {
-      //console.log(e);
-      this.isShow = e;
-    },
+					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);
+							e.intime = this.$public.customFormatDateTime(e.intime);
+							e.start_time = this.$public.customFormatDateTime(e.start_time);
+						})
+						this.pages = res.data.data.total;
+					}
+					this.loading =false;
+				});
+			},
+			/******************************************/
+			//查看详情会话记录
+			click_row(row, column, event) {
+				this.uid = row.servicelog_id;
+				this.isShow = true;
+			},
 
-    /******************上一页*****************/
-    upData(e){
-      this.getSessionHistory(e)
-    },
+			/******************************************/
+			//关闭会话详情记录
+			childValue(e) {
+				//console.log(e);
+				this.isShow = e;
+			},
 
-    /*********************下一页******************/ 
-    downData(e){
-      this.getSessionHistory(e)
-    },
+			/******************上一页*****************/
+			upData(e){
+				this.getSessionHistory(e)
+			},
 
-    /*******************选择页数******************/
-    current_page(e){
-      this.getSessionHistory(e)
-    
-    }
+			/*********************下一页******************/
+			downData(e){
+				this.getSessionHistory(e)
+			},
 
-  }
-};
+			/*******************选择页数******************/
+			current_page(e){
+				this.getSessionHistory(e)
+
+			}
+
+		}
+	};
 </script>
 
 <style scoped>
-.el-pagination .btn-next .el-icon{
-  display: none;
-}
-.cell {
-  text-align: center;
-}
-.el-pagination {
-  text-align: center;
-  font-size: 0;
-}
-.el-table::before {
-  z-index: 0 !important;
-}
-/* .el-table td{
-        padding: 12px 0;
-    } */
+	.el-pagination .btn-next .el-icon{
+		display: none;
+	}
+	.cell {
+		text-align: center;
+	}
+	.el-pagination {
+		text-align: center;
+		font-size: 0;
+	}
+	.el-table::before {
+		z-index: 0 !important;
+	}
+	/* .el-table td{
+			padding: 12px 0;
+		} */
 
-.input-with-select {
-  width: 100%;
-}
-.name_box {
-  margin-left: 20px;
-  font-size: 14px;
-  font-weight: bold;
-  color: rgba(102, 102, 102, 1);
-}
-.div_box {
-  width: 100%;
-}
-.right_box {
-  position: fixed;
-  top: 33px;
-  right: 0;
-  width: 100%;
-  /* height: 100vh;
-        background: red; */
-  /* //background: rgba(255, 255, 255, 0.315); */
-}
+	.input-with-select {
+		width: 100%;
+	}
+	.name_box {
+		margin-left: 20px;
+		font-size: 14px;
+		font-weight: bold;
+		color: rgba(102, 102, 102, 1);
+	}
+	.div_box {
+		width: 100%;
+	}
+	.right_box {
+		position: fixed;
+		top: 33px;
+		right: 0;
+		width: 100%;
+		/* height: 100vh;
+			  background: red; */
+		/* //background: rgba(255, 255, 255, 0.315); */
+	}
 </style>

+ 1310 - 1310
service/src/pages/TheCurrentSession.vue

@@ -1,1318 +1,1318 @@
 <template>
-  <div class="row allAlignment">
-    <leftNav />
-    <div>
-      <hader/>
-      <div class="row">
-       <messageCenter></messageCenter>
-        <!-- 聊天列表模块 -->
-        <div class="sessionList">
-          <el-collapse>
-            <el-collapse-item>
-              <template slot="title">
-                <span>会话中 <span>({{sessionList.length }})</span></span>
-                <!-- <span class="sessionList_span">排队人数(10)</span> -->
-              </template>
-              <div :class="{session_choose:dataIndex ==index &&  sessionType ==1}"  class="user session_style" @click="chooseDialogue(1,index)"  v-for="(item,index) in sessionList">
-                <div class="row allAlignment item-center">
-                  <span style="font-weight:bold;color:#666;font-size:14px;">{{item.name}}</span>
-                  <span style="color:#999;font-size:.12px;">{{item.intime}}</span>
-                </div>
-                <div class="row allAlignment item-center">
-                  <div style="width:90%;font-size:.12px;" class="ellipsis">
-                    <span v-html="item.text" ></span>
-                  </div>
-                  <span v-if="item.num > 0" class="markNumber">{{item.num}}</span>
-                </div>
-              </div>
-            </el-collapse-item>
-            <el-collapse-item>
-              <template slot="title">
-                <span>已离线<span>({{offlineList.length }})</span></span>
-              </template>
-              <div :class="{session_choose:dataIndex ==index &&  sessionType ==2}"   class="user session_style" @click="chooseDialogue(2,index)" v-for="(item,index) in offlineList">
-                <div class="row allAlignment item-center">
-                  <span style="font-weight:bold;color:#999;font-size:14px;">{{item.name}}</span>
-                  <span style="color:#999;font-size:12px;">{{item.intime}}</span>
-                </div>
-                <div class="row allAlignment item-center">
-                  <div style="width:90%;color:#999;font-size:12px;" class="ellipsis">
-                    <span v-html="item.text"></span>
-                  </div>
-                </div>
-              </div>
-            </el-collapse-item>
-            <el-collapse-item>
-              <template slot="title">
-                <span>排队中<span>({{lineUp.length}})</span></span>
-              </template>
-              <div class="user" v-for="item in lineUp">
-                <div class="row allAlignment item-center">
-                  <span style="font-weight:bold;color:#666;font-size:14px;">{{item}}</span>
-                  <span style="color:#999;font-size:12px;">{{item}}</span>
-                </div>
-              </div>
-            </el-collapse-item>
-          </el-collapse>
-        </div>
-
-        <!-- 聊天模块 -->
-        <div class="chat"  >
-          <div class="chatTop row item-center allAlignment" style="padding:0 10px;">
-            <p class="ellipsis"
-              style="width:40%;font-size:14px;font-weight:bold;color:#666;"
-            >{{sessionName}}</p>
-            <div  class="row item-center rightAlignment" style="width:50%;height:100%;color:#999;font-size:12px;">
-              <p class="row item-center" @click="getServiceList()">
-                <!-- 转接 -->
-                <el-popover placement="right" width="400" trigger="click">
-                  <el-table :data="transferList">
-                    <el-table-column width="150" property="groupname" label="组名"></el-table-column>
-                    <el-table-column width="100" property="kfname" label="姓名"></el-table-column>
-                    <el-table-column label="操作">
-                      <template slot-scope="scope">
-                        <el-button size="mini" @click="transfer(scope.$index, scope.row)">转入</el-button>
-                      </template>  
-                    </el-table-column>      
-                  </el-table>
-                  <el-button slot="reference"> <i style="font-size:14px" class="el-icon-refresh"></i> 转接</el-button>
-                </el-popover>
-              </p>
-              <p class="row item-center" style="margin-left:10px;">
-                <el-button size="mini" type="text"  @click="open"><i style="font-size:15px" class="el-icon-close"></i> 结束服务</el-button>
-              </p>
-            </div>
-          </div>
-         
-          <div class="chat-box scroll" id='chat_box' >
-            <div v-for="(item,index) in data" :key="index">
-              <!-- 系统转接 -->
-              <!-- <div class="row center" v-if="item.type == 'system'">
-                <p style="font-size:12px;color:#bbb;">09.30.45 由问答机器人转接</p>
-              </div> -->
-
-              <!-- 用户消息 -->
-              <div style="padding:0 10px;margin-top:20px;" v-if="item.type == 'user'">
-                <div
-                  style="height:37px;font-size:.12px;color:#bbb;"
-                  class="row item-center"
-                >{{item.time}}</div>
-                <div class="row">
-                  <div v-if="item.content.img != ''" >
-                    <!-- :fit="contain "  style="width: 100%; height: 100px"-->
-                    <el-image style="width: 200px; height: 100px" :src="img_http + item.content.img" :fit="fit"  ></el-image>
-                  </div>
-                  <p v-else class="chatMsg user_box" v-html="item.content.text" ></p>
-                </div>
-              </div>
-
-              <!-- 客服消息 -->
-              <div style="padding:0 10px;margin-top:20px;" class="rightAlignment" v-if="item.type == 'service'" >
-                <div style="height:37px;font-size:12px;color:#bbb;" class="row item-center rightAlignment">{{item.time}}</div>
-                <div class="row item-center rightAlignment">
-                  <div v-if="item.content.img !=''" >
-                    <!-- :fit="contain"  style="background:#F5F5F5; border-radius: 10px 0 10px 10px;"-->
-                    <el-image style="width: 200px; height: 100px" :src="img_http + item.content.img" :fit="fit" ></el-image>
-                  </div>
-                  <p v-else class="chatMsg message_box" v-html="item.content.text" ></p>
-                </div>
-              </div>
-            </div>
-          </div>
-
-        
-          
-          <div class="key column allAlignment">
-            <div class="frce row item-center allAlignment">
-              <div class="row ">
-                <img class="hover" :src="isFrce?require('@/assets/img/frcea.png'):require('@/assets/img/frce.png')"
-                  @click="frceClick" style="margin-right:16px;"/>
-                <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()" class="el-icon-postcard hover evaluation"></i>
-              </div>
-            </div>
-            <textarea draggable="false" class="input scroll" id="input" v-model="inputValue"    
-            @keyup.enter="listenEnter($event)"  @keyup.ctrl.enter="lineFeed()"></textarea> 
-            <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>
-        </div>
-
-        <!-- 快捷回复模块 -->
-        <div class="FastReply">
-          <div class="FastReplyHader row item-center">快捷回复</div>
-          <div class="FastReplySwitch row item-center average">
-            <p :class="FastReplySwitch=='one'?'active':''" class="hover"  @click="FastReplySwitchClick('one')">公有库</p>
-            <span style="width:1px;height:18px;background:#ccc;display: block;"></span>
-            <p :class="FastReplySwitch=='tow'?'active':''"
-              class="hover"
-              @click="FastReplySwitchClick('tow')"
-            >私有库</p>
-          </div>
-          <!-- <div class="serch row center">
-            <div class="serchBox">
-              <input placeholder="搜索快捷回复" v-model="serch" type="text" />
-              <img src="@/assets/img/serch.png" />
-            </div>
-          </div> -->
-          <!-- <div> -->
-            <!-- <el-collapse>
-              <el-collapse-item>
-                <template slot="title" name="el-icon-caret-bottom">
-                  <span>常用语</span>
-                </template> -->
-                <div style="padding: 0.4rem 0;">
-                  <!-- <ul class="FastReplyList"> -->
-                    <!-- <li @click="getLanguage(item.content)" class="row cursor_text" v-for="item in FastReply.sysWords" :key="item.id"> -->
-                      <div @click="getLanguage(item.content)" class="row cursor_text item-center" v-for="item in FastReply.sysWords" :key="item.id" v-if="FastReplySwitch == 'one'">
-                        <span class="title_span" style=" width: 30%">#{{item.title}}</span>
-                        <div class="ellipsis" style=" width: 70%">
-
-                          <span class="content_span">{{item.content}}</span>
-                        </div>
-                      </div>
-
-
-                    <!-- </li> -->
-
-                      <div @click="getLanguage(item.content)" class="row cursor_text item-center" v-for="item in FastReply.userWords" :key="item.id" v-if="FastReplySwitch == 'tow'">
-                        <span class="title_span" style=" width: 30%">#{{item.title}}</span>
-                        <div class="ellipsis" style=" width: 70%">
-
-                          <span class="content_span">{{item.content}}</span>
-                        </div>
-                      </div>
-                    <!-- <li class="row cursor_text" v-for="item in FastReply.userWords" :key="item.id">
-                      <div v-if="FastReplySwitch == 'tow'" class="row item-center">
-                      <p style="margin-right:10px;color:#666;font-size:14px;font-weight: bold;"
-                      >#{{item.title}}</p>
-                      <p class="ellipsis" style="width: 60%; color:#999;font-size:14px;">{{item.content}}</p>
-                        </div>
-                    </li> -->
-                  <!-- </ul> -->
-                </div>
-              <!-- </el-collapse-item>
-            </el-collapse> -->
-          <!-- </div> -->
-        </div>
-
-        <!-- 用户信息模块 -->
-        <div class="userinfo">
-          <div style="color:#666;font-weight:bold;font-size:14px;">用户信息</div>
-          <div style="margin-top:10px;color:#999;font-size:14px;" class="userData wrap">
-            <div class="user_info_box">
-              <span>姓名:</span>
-              <input class="user_text" v-model="session_user_info.name" type="text">
-            </div>
-            <div class="user_info_box">
-              <span>手机:</span>
-              <input class="user_text" v-model="session_user_info.phone" type="text">
-            </div>
-            <div class="user_info_box">
-              <span>邮箱:</span>
-              <input class="user_text" v-model="session_user_info.email" type="text">
-            </div>
-            <div class="user_info_box">
-              <span>地址:</span>
-              <input class="user_text" v-model="session_user_info.addres" type="text">
-            </div>
-            <p>访客备注:</p>
-          </div>
-          <textarea draggable="false"  class="userDataInput"  v-model="session_user_info.remark"  style="margin-top:10px;" ></textarea>
-          <div class="userBtn row center">保存</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">
-            <p>来源渠道:{{session_user_info.website}}</p>
-            <p>IP地址:{{session_user_info.ip}}</p>
-            <p>来源终端:{{session_user_info.browse}}</p>
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
+	<div class="row allAlignment">
+		<leftNav />
+		<div>
+			<hader/>
+			<messageCenter></messageCenter>
+			<div class="row">
+				<!-- 聊天列表模块 -->
+				<div class="sessionList">
+					<el-collapse>
+						<el-collapse-item>
+							<template slot="title">
+								<span>会话中 <span>({{sessionList.length }})</span></span>
+								<!-- <span class="sessionList_span">排队人数(10)</span> -->
+							</template>
+							<div :class="{session_choose:dataIndex ==index &&  sessionType ==1}"  class="user session_style" @click="chooseDialogue(1,index)"  v-for="(item,index) in sessionList">
+								<div class="row allAlignment item-center">
+									<span style="font-weight:bold;color:#666;font-size:14px;">{{item.name}}</span>
+									<span style="color:#999;font-size:.12px;">{{item.intime}}</span>
+								</div>
+								<div class="row allAlignment item-center">
+									<div style="width:90%;font-size:.12px;" class="ellipsis">
+										<span v-html="item.text" ></span>
+									</div>
+									<span v-if="item.num > 0" class="markNumber">{{item.num}}</span>
+								</div>
+							</div>
+						</el-collapse-item>
+						<el-collapse-item>
+							<template slot="title">
+								<span>已离线<span>({{offlineList.length }})</span></span>
+							</template>
+							<div :class="{session_choose:dataIndex ==index &&  sessionType ==2}"   class="user session_style" @click="chooseDialogue(2,index)" v-for="(item,index) in offlineList">
+								<div class="row allAlignment item-center">
+									<span style="font-weight:bold;color:#999;font-size:14px;">{{item.name}}</span>
+									<span style="color:#999;font-size:12px;">{{item.intime}}</span>
+								</div>
+								<div class="row allAlignment item-center">
+									<div style="width:90%;color:#999;font-size:12px;" class="ellipsis">
+										<span v-html="item.text"></span>
+									</div>
+								</div>
+							</div>
+						</el-collapse-item>
+						<el-collapse-item>
+							<template slot="title">
+								<span>排队中<span>({{lineUp.length}})</span></span>
+							</template>
+							<div class="user" v-for="item in lineUp">
+								<div class="row allAlignment item-center">
+									<span style="font-weight:bold;color:#666;font-size:14px;">{{item}}</span>
+									<span style="color:#999;font-size:12px;">{{item}}</span>
+								</div>
+							</div>
+						</el-collapse-item>
+					</el-collapse>
+				</div>
+
+				<!-- 聊天模块 -->
+				<div class="chat"  >
+					<div class="chatTop row item-center allAlignment" style="padding:0 10px;">
+						<p class="ellipsis"
+						   style="width:40%;font-size:14px;font-weight:bold;color:#666;"
+						>{{sessionName}}</p>
+						<div  class="row item-center rightAlignment" style="width:50%;height:100%;color:#999;font-size:12px;">
+							<p class="row item-center" @click="getServiceList()">
+								<!-- 转接 -->
+								<el-popover placement="right" width="400" trigger="click">
+									<el-table :data="transferList">
+										<el-table-column width="150" property="groupname" label="组名"></el-table-column>
+										<el-table-column width="100" property="kfname" label="姓名"></el-table-column>
+										<el-table-column label="操作">
+											<template slot-scope="scope">
+												<el-button size="mini" @click="transfer(scope.$index, scope.row)">转入</el-button>
+											</template>
+										</el-table-column>
+									</el-table>
+									<el-button slot="reference"> <i style="font-size:14px" class="el-icon-refresh"></i> 转接</el-button>
+								</el-popover>
+							</p>
+							<p class="row item-center" style="margin-left:10px;">
+								<el-button size="mini" type="text"  @click="open"><i style="font-size:15px" class="el-icon-close"></i> 结束服务</el-button>
+							</p>
+						</div>
+					</div>
+
+					<div class="chat-box scroll" id='chat_box' >
+						<div v-for="(item,index) in data" :key="index">
+							<!-- 系统转接 -->
+							<!-- <div class="row center" v-if="item.type == 'system'">
+							  <p style="font-size:12px;color:#bbb;">09.30.45 由问答机器人转接</p>
+							</div> -->
+
+							<!-- 用户消息 -->
+							<div style="padding:0 10px;margin-top:20px;" v-if="item.type == 'user'">
+								<div
+										style="height:37px;font-size:.12px;color:#bbb;"
+										class="row item-center"
+								>{{item.time}}</div>
+								<div class="row">
+									<div v-if="item.content.img != ''" >
+										<!-- :fit="contain "  style="width: 100%; height: 100px"-->
+										<el-image style="width: 200px; height: 100px" :src="img_http + item.content.img" :fit="fit"  ></el-image>
+									</div>
+									<p v-else class="chatMsg user_box" v-html="item.content.text" ></p>
+								</div>
+							</div>
+
+							<!-- 客服消息 -->
+							<div style="padding:0 10px;margin-top:20px;" class="rightAlignment" v-if="item.type == 'service'" >
+								<div style="height:37px;font-size:12px;color:#bbb;" class="row item-center rightAlignment">{{item.time}}</div>
+								<div class="row item-center rightAlignment">
+									<div v-if="item.content.img !=''" >
+										<!-- :fit="contain"  style="background:#F5F5F5; border-radius: 10px 0 10px 10px;"-->
+										<el-image style="width: 200px; height: 100px" :src="img_http + item.content.img" :fit="fit" ></el-image>
+									</div>
+									<p v-else class="chatMsg message_box" v-html="item.content.text" ></p>
+								</div>
+							</div>
+						</div>
+					</div>
+
+
+
+					<div class="key column allAlignment">
+						<div class="frce row item-center allAlignment">
+							<div class="row ">
+								<img class="hover" :src="isFrce?require('@/assets/img/frcea.png'):require('@/assets/img/frce.png')"
+									 @click="frceClick" style="margin-right:16px;"/>
+								<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()" class="el-icon-postcard hover evaluation"></i>
+							</div>
+						</div>
+						<textarea draggable="false" class="input scroll" id="input" v-model="inputValue"
+								  @keyup.enter="listenEnter($event)"  @keyup.ctrl.enter="lineFeed()"></textarea>
+						<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>
+				</div>
+
+				<!-- 快捷回复模块 -->
+				<div class="FastReply">
+					<div class="FastReplyHader row item-center">快捷回复</div>
+					<div class="FastReplySwitch row item-center average">
+						<p :class="FastReplySwitch=='one'?'active':''" class="hover"  @click="FastReplySwitchClick('one')">公有库</p>
+						<span style="width:1px;height:18px;background:#ccc;display: block;"></span>
+						<p :class="FastReplySwitch=='tow'?'active':''"
+						   class="hover"
+						   @click="FastReplySwitchClick('tow')"
+						>私有库</p>
+					</div>
+					<!-- <div class="serch row center">
+					  <div class="serchBox">
+						<input placeholder="搜索快捷回复" v-model="serch" type="text" />
+						<img src="@/assets/img/serch.png" />
+					  </div>
+					</div> -->
+					<!-- <div> -->
+					<!-- <el-collapse>
+					  <el-collapse-item>
+						<template slot="title" name="el-icon-caret-bottom">
+						  <span>常用语</span>
+						</template> -->
+					<div style="padding: 0.4rem 0;">
+						<!-- <ul class="FastReplyList"> -->
+						<!-- <li @click="getLanguage(item.content)" class="row cursor_text" v-for="item in FastReply.sysWords" :key="item.id"> -->
+						<div @click="getLanguage(item.content)" class="row cursor_text item-center" v-for="item in FastReply.sysWords" :key="item.id" v-if="FastReplySwitch == 'one'">
+							<span class="title_span" style=" width: 30%">#{{item.title}}</span>
+							<div class="ellipsis" style=" width: 70%">
+
+								<span class="content_span">{{item.content}}</span>
+							</div>
+						</div>
+
+
+						<!-- </li> -->
+
+						<div @click="getLanguage(item.content)" class="row cursor_text item-center" v-for="item in FastReply.userWords" :key="item.id" v-if="FastReplySwitch == 'tow'">
+							<span class="title_span" style=" width: 30%">#{{item.title}}</span>
+							<div class="ellipsis" style=" width: 70%">
+
+								<span class="content_span">{{item.content}}</span>
+							</div>
+						</div>
+						<!-- <li class="row cursor_text" v-for="item in FastReply.userWords" :key="item.id">
+						  <div v-if="FastReplySwitch == 'tow'" class="row item-center">
+						  <p style="margin-right:10px;color:#666;font-size:14px;font-weight: bold;"
+						  >#{{item.title}}</p>
+						  <p class="ellipsis" style="width: 60%; color:#999;font-size:14px;">{{item.content}}</p>
+							</div>
+						</li> -->
+						<!-- </ul> -->
+					</div>
+					<!-- </el-collapse-item>
+				  </el-collapse> -->
+					<!-- </div> -->
+				</div>
+
+				<!-- 用户信息模块 -->
+				<div class="userinfo">
+					<div style="color:#666;font-weight:bold;font-size:14px;">用户信息</div>
+					<div style="margin-top:10px;color:#999;font-size:14px;" class="userData wrap">
+						<div class="user_info_box">
+							<span>姓名:</span>
+							<input class="user_text" v-model="session_user_info.name" type="text">
+						</div>
+						<div class="user_info_box">
+							<span>手机:</span>
+							<input class="user_text" v-model="session_user_info.phone" type="text">
+						</div>
+						<div class="user_info_box">
+							<span>邮箱:</span>
+							<input class="user_text" v-model="session_user_info.email" type="text">
+						</div>
+						<div class="user_info_box">
+							<span>地址:</span>
+							<input class="user_text" v-model="session_user_info.addres" type="text">
+						</div>
+						<p>访客备注:</p>
+					</div>
+					<textarea draggable="false"  class="userDataInput"  v-model="session_user_info.remark"  style="margin-top:10px;" ></textarea>
+					<div class="userBtn row center">保存</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">
+						<p>来源渠道:{{session_user_info.website}}</p>
+						<p>IP地址:{{session_user_info.ip}}</p>
+						<p>来源终端:{{session_user_info.browse}}</p>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
 </template>
 
 <script>
-import "@/css/index.css";
-import leftNav from "@/components/leftNav";
-import hader from "@/components/hader";
-import messageCenter from "@/components/messageCenter";
-
-export default {
-  name: "TheCurrentSession",
-  data() {
-    return {
-      /***********************************/
-      inputValue: "", //输入框内容
-      isFrce: false, //表情包开关
-      frceArr: [], //表情包数组
-      data: [], //当前对话数据
-      dataIndex:0,//定位当前会话,默认是0
-      FastReply: "", //快捷回复
-      FastReplySwitch: "one", //快捷回复开关
-      user_info:'',//用户信息
-      token: "",
-      time: "",
-      sessionList:[],//会话列表
-      offlineList:[],//离线列表
-      transferList:[],//转接列表
-      sessionType:1,//选择列表状态默认未1(1是会话中,2是离线)
-      lineUp:[],//排队列表
-      conversationId:'',//会话工单
-      sessionName:'',//当前会话用户名字
-      session_user_info:{},//当前会话用户信息
-      img_http:'http://kfadmin.bocai186.com',//图片路径域 
-      //img_http:'http://192.168.2.186:8090',//图片路径域 
-      fit:'scale-down',//图片渲染样式
-      is_eva_btn:true,//
-      trigger_condition:0,//评价触发条件
-      webTime:'',//客服会话时间
-      session_marked:'',//客服当前会话标记
-      sensitive:[],//敏感词数据
-    };
-  },
-  /**
-   *
-   */
-  methods: {
-    /************回车提交************/
-    listenEnter(event){
-      if (event.keyCode === 13) {
-      this.inputValue = this.inputValue.replace(/\s/g,'')
-      // this.inputValue = this.inputValue.replace(/\n /g,'')
-        this.sendMessage(); // 发送文本
-      }
-    },
-    
-    /************ctrl+center 换行***********/
-    lineFeed(){
-      this.inputValue = this.inputValue + '\n'
-    },
-    /******************消息数据接收********************/
-    chatMessage(redata){
-      // console.log('列表',this.sessionList)
-      if(redata.type == "pong" ) return
-        console.log('消息',redata)
-      // 用户接入数据
-      if(redata.message_type == "connect"){
-        this.conversationId = redata.data.conversationId;
-        redata.data.user_info.conversationId = redata.data.conversationId;
-        let isTrue = true;
-        //匹配是否是离线用户上线
-        if(this.offlineList.length > 0){
-          for(let i = 0; i < this.offlineList.length ; i++){
-            //匹配离线列表是否有这个用户
-            if(this.offlineList[i].id == redata.data.user_info.id  ){
-              //匹配离线列表是否存会话工单未结束
-              if(this.offlineList[i].conversationId ==  redata.data.conversationId){
-                //工单号未结束的数据处理
-                if(this.sessionType == 2 && i == this.dataIndex){
-                  this.data = [];
-                  this.data = this.offlineList[i].data;
-                }
-                redata.data.user_info.data = this.offlineList[i].data
-              }else{
-                //工单号已结束数据处理
-                if(this.dataIndex == 0 && this.sessionList.length  == 0){
-                  this.sessionName = redata.data.user_info.name;
-                  this.data = [];
-                }
-                redata.data.user_info.data = [];
-              }
-              //将离线状态用户删除
-              this.offlineList.splice(i,1);
-              this.$store.dispatch("SET_OFFLINE",this.offlineList);
-              this.get_user_info(this.offlineList);
-              isTrue = false;
-              break;
-            }
-          }
-        }else{
-          this.sessionType = 1;
-          this.sessionName = '';
-          this.data = [];
-        }
-        if(isTrue){
-          if(this.dataIndex == 0 && this.sessionList.length  == 0){
-            this.sessionName = redata.data.user_info.name;
-            this.data = [];
-          }
-          redata.data.user_info.data = [];
-        }
-        redata.data.user_info.intime = this.time[1];
-        redata.data.user_info.num = 0;
-        this.sessionList.push(redata.data.user_info); 
-        this.get_user_info(this.sessionList);
-        //将数据储存到vuex里面
-        this.$store.dispatch("SET_SESSION",this.sessionList);
-        // this.$store.getters.getLimit  
-      }
-
-      //用户离线后会话窗口切换
-      if(redata.message_type == "userClose"){
-        for(let i = 0 ; i < this.sessionList.length; i++){
-          //匹配会话中离线用户
-          if(this.sessionList[i].id  == redata.data.id ){
-            //把数据添加到离线列表
-            this.offlineList.push(this.sessionList[i]);
-            this.$store.dispatch("SET_OFFLINE",this.offlineList);
-            //用户选中状态会话中处理
-            if(this.sessionType == 1){
-              //判断会话中列表长度
-              if(this.sessionList.length > 1){
-                //删除会话列表离线用户
-                this.sessionList.splice(i,1);
-                this.$store.dispatch("SET_SESSION",this.sessionList);
-                //获取会话中列表第一个会话消息
-                this.dataIndex = 0;
-                this.sessionName = this.sessionList[0].name;
-                this.data = [];
-                this.data = this.sessionList[0].data;
-              }else{
-                this.sessionType = 2;
-                this.dataIndex = 0;
-                // if(this.offlineList.length >0){
-                // }else{}
-                this.sessionName =this.offlineList[0].name;
-                this.data = this.offlineList[0].data;
-                //删除会话列表离线用户 
-                this.sessionList.splice(i,1);
-                this.$store.dispatch("SET_SESSION",this.sessionList);
-              }
-            }else{
-              //删除会话列表离线用户 
-              this.sessionList.splice(i,1);
-              this.$store.dispatch("SET_SESSION",this.sessionList);
-            }
-            break;
-          }
-        }
-        this.get_user_info(this.sessionList);
-      }
-
-      //用户断开链接会话窗口切换
-      if(redata.message_type == "delUser"){
-        let isTrue = true;
-        //会话中列表匹配
-        for(let i = 0 ; i < this.sessionList.length; i++){
-          //判断会话中列表是否结束会话
-          if(this.sessionList[i].id ==  redata.data.id){
-            //删除会话列表断线关闭的用户信息
-            this.sessionList.splice(i,1);
-            this.$store.dispatch("SET_SESSION",this.sessionList);
-            if(this.sessionType == 1){
-              //处理会话显现状态
-              if(this.dataIndex == i){
-                if(this.sessionList.length >1){
-                  this.sessionName = this.sessionList[0].name;
-                  this.data = this.sessionList[0].data;
-                  this.get_user_info(this.sessionList);
-                }else{
-                  this.sessionName = '';
-                  this.data = [];
-                  this.get_user_info(this.offlineList);
-                }
-              }
-            }
-            isTrue = false;
-            break;
-          }
-        }
-        //离线列表匹配
-        if(isTrue){
-          for(let i = 0 ; i < this.offlineList.length; i++){
-            //判断离线列表是否结束会话
-            if(this.offlineList[i].id ==  redata.data.id){
-              console.log('离线列');
-              //删除离线列表中断线关闭的用户信息
-              this.offlineList.splice(i,1);
-              this.$store.dispatch("SET_OFFLINE",this.offlineList);
-              if(this.sessionType == 2){
-                if(this.dataIndex == i){
-                   console.log('别乱动 大于1','来了吗');
-                  if(this.offlineList.length > 1){
-                    this.data = this.offlineList[0].data;
-                    this.sessionName = this.offlineList[0].name;
-                      this.get_user_info(this.offlineList);
-                  }else{
-                    console.log('别乱动 小于1','来了吗');
-                    this.data = [];
-                    this.sessionName = '';
-                    this.get_user_info(this.sessionList);
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-
-      //接收用户消息数据
-      if(redata.message_type == "chatMessage"){
-        let dataIndex = 0;
-        //匹配是那个用户回的消息
-        for(let i = 0 ; i < this.sessionList.length ; i++){
-          if(this.sessionList[i].id == redata.data.id ){
-            dataIndex = i;
-            break;
-          }
-        }
-        //获取当前回复消息对象
-        let chatList = this.sessionList[dataIndex]
-        redata.data.type = 'user';
-        redata.data.content = JSON.parse(redata.data.content);
-        //这个地方转
-       
-        redata.data.content.text = this.turnFace(redata.data.content.text);
-        //更新会话时间
-        this.$set(chatList,'intime',redata.data.time);
-
-        //更新会话列表中最新回复消息
-        if(redata.data.content.text){
-          this.$set(chatList,'text',redata.data.content.text)
-        }
-
-        //将消息添加对应的会话列表中
-        chatList.data.push(redata.data);
-        //判断是否是当前对话信息
-        if(dataIndex == this.dataIndex){
-          this.data =[];
-          this.data = chatList.data;
-        }else{
-          let num = chatList.num;
-          //console.log(chatList.num);
-          this.$set(chatList,'num',num+1)
-        }
-      }
-
-      //接收系统操作信息状态在线客服列表
-      if(redata.message_type == "onlinekfs"){
-        this.transferList = []; 
-        this.transferList = this.transferList.concat(redata.data);
-      }
-      
-      //
-      if(redata.message_type == "webTime"){
-        // this.webTime = redata.data.webTime
-        this.$set(this.data[this.session_marked],'time',redata.data.webTime);
-      }
-      
-      //客服手动转接用户成功
-      if(redata.message_type == "trunconnect"){
-        this.sessionList.splice(this.dataIndex,1);
-        this.$message({
-          message: '转接用户成功...',
-          type: 'success'
-        });
-        if(this.sessionList.length >1 ){
-          this.dataIndex =0;
-          // this.data = []
-
-        }else{
-          this.data = [];
-          this.sessionName ='';
-          // if(this.offlineList.length >0){
-          //   this.data = [];
-          //   this.sessionName ='';
-          // }else{
-          //   this.data = [];
-          //   this.sessionName ='';
-          // }
-        } 
-      }  
-      this.automaticRolling();    
-    },
-    /******************文字信息转表情******************/
-    turnFace(data){
-      let str = data.match(/\#\[.*?\]\//g);
-      let arr =Array.from(new Set(str));
-      arr.forEach(e=>{
-        let imgsrc = '';
-        for(let i = 0 ; i < this.$frce.length ; i++){
-          let expText = e.slice(1,e.length-1);
-          if(expText == this.$frce[i]){
-            imgsrc = '<img class="hover" src="'+require(`@/assets/img/${i}.gif`)+'"/>'
-            break;
-          }
-        }
-        data = data.replace(new RegExp(`\\#\\[${e.substring(2,e.length-2)}\\]\\/`,'g'),imgsrc);
-      })
-      return data;
-    },
-
-    /*********************图片发送*********************/
-    uploadIMG(e) {
-      //console.log(e);
-      let self = this;
-      let files = e.target.files || e.dataTransfer.files;
-      if (!files.length) return;
-      let picavalue = files[0];
-      //console.log(picavalue);
-      if (picavalue.size / 1000 > 20000) {
-        this.$message({
-          message: "图片过大不支持上传",
-          type: "warning"
-        });
-      } else {
-        this.$public.imgPreview(picavalue, function(imgSrc,formData) {
-          // 数据结构请求
-          self.post('api/'+self.$ports.uploadImg,formData).then(res=>{
-            //console.log(res.data.data.src)
-            if(res.data.code == 1){
-              let isFirst = true;
-              //判断客服是否发送的第一句话
-              if(self.data.length >0){
-                for(let i = 0 ; i < self.data.length ; i++ ){
-                  if(self.data[i].type == 'service' ){
-                    isFirst =false;
-                    break;
-                  }
-                }
-              }
-
-              let obj = {
-                text:'',
-                img:res.data.data.src,
-                type:false,
-              };
-              let chatList = self.sessionList[self.dataIndex];
-              chatList.data.push({type:'service', content:obj ,time:self.time[1]});
-              self.data = [];
-              self.data = chatList.data;
-              let type ='chatMessage';
-              let data = {
-                from_name:self.user_info.user_name,//发送者
-                from_avatar:self.user_info.avatar,//发送者头像
-                from_id:"KF"+self.user_info.id,//发送者id
-                content:JSON.stringify(obj),
-                to_id: self.sessionList[self.dataIndex].id,
-                to_name:self.sessionList[self.dataIndex].name,
-                conversationId:self.sessionList[self.dataIndex].conversationId,
-                isFirst:isFirst,//是否是第一句话
-                sensitiveNumber:0,//敏感词次数
-              }
-              self.websocketsend(JSON.stringify({type,data}))
-
-
-            }
-          })
-        });
-      }
-    },
-
-    /*****************转接会话用户确认******************/
-    transfer(e){
-
-      if(this.sessionList.length > 0){
-        this.$confirm('此操作将当前用户转出, 是否继续?', '温馨提示!', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-            let type ="changeOtherhKeFu";
-            let data={
-              conversationId:this.sessionType == 1 ? this.sessionList[this.dataIndex].conversationId : this.offlineList[this.dataIndex].conversationId,
-              togroup:this.transferList[e].groupid,
-              fromgroup:this.user_info.group_id,
-              toukfuid:this.transferList[e].kfuid ,
-              fromkfuid:"KF"+this.user_info.id, 
-              uid:this.sessionType == 1 ? this.sessionList[this.dataIndex].id : this.offlineList[this.dataIndex].id,
-              word:'',
-            }
-            //console.log({type,data});
-            this.websocketsend(JSON.stringify({type,data}))
-        }).catch(() => {
-          
-        })
-      }else{
-        this.$message({
-          message: '亲!您没有和用户会话怎么能转接呢。',
-          type: 'warning'
-        });
-      }
-
-    },
-
-    /******************获取客服人员列表*****************/
-    getServiceList(){
-      //console.log(12313);
-      this.websocketsend(JSON.stringify({"type":"getkfonlines"}))
-    },
-
-    /*****************切换用户会话对象******************/
-    chooseDialogue(type,index){
-      let data =[];
-      this.sessionType = type;
-      this.dataIndex = index;
-      if(type == 1){
-        data = this.sessionList[index].data;
-        this.session_user_info = this.sessionList[index];
-        this.$set(this.sessionList[index],'num',0);
-        this.sessionName = this.sessionList[index].name
-      }else if(type == 2){
-        data = this.offlineList[index].data;
-        this.sessionName = this.offlineList[index].name;
-        this.session_user_info = this.offlineList[index];
-      }
-      this.data = data;
-    },
-
-    /***************关闭当前和用户聊天对话***************/
-    open(){
-      let _this =this;
-      if(this.sessionType == 1){
-        if(this.sessionList.length < 1 )return
-      }else{
-        if(this.offlineList.length < 1)return
-      }
-      this.$confirm('此操作将关闭和当前用户通话, 是否继续?', '温馨提示!', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        let to_id = this.sessionType == 1 ? this.sessionList[this.dataIndex].id :this.offlineList[this.dataIndex].id;
-        let conversationId = this.sessionType == 1 ? this.sessionList[this.dataIndex].conversationId :this.offlineList[this.dataIndex].conversationId;
-        let data = {
-          "type":"kfCloseUser",
-          data:{
-            to_id,
-            kf_id:"KF"+_this.user_info.id,
-            group_id:_this.user_info.group_id,
-            conversationId:conversationId,
-          }
-        }
-        if(this.sessionType  == 1){
-          this.sessionList.splice(this.dataIndex,1);
-          if(this.sessionList.length> 0){
-            this.data = this.sessionList[0];
-            this.sessionName = this.sessionList[0].name;
-          }else{
-            this.data = [];
-            this.sessionName = '';
-          }
-        }else{
-          this.offlineList.splice(this.dataIndex,1);
-          this.data = [];
-          this.sessionName = '';
-        }
-       
-        this.websocketsend(JSON.stringify(data))
-      }).catch(() => {
-          // this.$message({
-          //   type: 'info',
-          //   message: '已取消删除'
-          // });          
-        });
-    },
-
-    /*****************数据发送方法调用******************/
-    websocketsend(Data) {
-      this.$websocket.send(Data);
-      this.automaticRolling();
-    },
-
-    /*********************发送消息*********************/
-    sendMessage(){
-      console.log();
-      if(!this.inputValue) return
-      if(this.sessionList.length == 0) {
-        this.$message({
-          message: '只能给在线用户发送消息哦...',
-          type: 'warning'
-        }); 
-        return false;
-      } 
-      // if(this.offlineList.length <= 0 ) return
-      let isFirst = true,sensitiveNumber=0;
-      this.isFrce = false;
-      //判断客服是否发送的第一句话
-      if(this.data.length >0){
-        for(let i = 0 ; i < this.data.length ; i++ ){
-          if(this.data[i].type == 'service' ){
-            isFirst =false;
-            break;
-          }
-        }
-      }
-      //判断客服敏感词报警次数
-      let obj = {
-            text: this.inputValue,
-            img:'',
-            type:false,
-          }
-      let type ='chatMessage';
-      let data = {
-          from_name:this.user_info.user_name,//发送者
-          from_avatar:this.user_info.avatar,//发送者头像
-          from_id:"KF"+this.user_info.id,//发送者id
-          content:JSON.stringify(obj),
-          to_id: this.sessionList[this.dataIndex].id,
-          to_name:this.sessionList[this.dataIndex].name,
-          conversationId:this.sessionList[this.dataIndex].conversationId,
-          isFirst:isFirst,//是否是第一句话
-          sensitiveNumber:sensitiveNumber,//敏感词次数
-        }
-      let chatList = this.sessionList[this.dataIndex];
-      //检测发送信息是否含有敏感词
-      let  sensitive_data= this.$public.shieldingKeyword(this.turnFace(this.inputValue),this.sensitive);
-
-      //有敏感词提示并且禁止发送
-      if(sensitive_data.num == 0 ){
-        // 本地储存
-        chatList.data.push({type:'service', content:{
-          text:this.turnFace(this.inputValue),
-          img:'',
-          type:false,
-        } ,time:this.time[1]});
-  
-        this.data = [];
-        //标记当前会话位置
-        this.session_marked = chatList.data.length -1;
-        this.data = chatList.data; 
-        this.websocketsend(JSON.stringify({type,data}))
-        this.inputValue = '';
-      }else{
-        this.$message({
-          message: '敏感词'+sensitive_data.text,
-          type: 'warning'
-        }); 
-      }
-      
-
-    },
-
-    /******************开启或关闭表情包******************/
-    frceClick() {
-      this.isFrce = !this.isFrce;
-    },
-
-    /*******************发送评价指令*******************/
-    evaluation(){
-      console.log(this.sessionList[this.dataIndex]);
-      if(!this.is_eva_btn && this.sessionType == 1){
-         this.$message({
-          message: '评价指令已发送',
-          type: 'success'
-        });
-        let type = 'getEvaluate';
-        let data = {
-          conversationId:this.sessionList[this.dataIndex].conversationId,
-          to_id:this.sessionList[this.dataIndex].id,
-        }
-        this.websocketsend(JSON.stringify({type,data}));
-        this.is_eva_btn = true;
-      }else if(this.sessionType == 2){
-        this.$message.error('用户已离线指令无法发送');
-      }else {
-        this.$message.error('评价指令无法发送');
-      }
-    },
-
-    /******************查询快捷数据信息*****************/
-    quickReplyInfo() {
-      let obj = {
-        headers: {
-          apiToken: this.$md5("userwords" + "customer-service" + "index" + this.time[0]+ "service"),
-          userToken: this.token
-        }
-      };
-      this.get("api" + this.$ports.FastReply.userWords, obj).then(res => {
-        if (res.data.code ==1) {
-          this.FastReply = res.data.data;
-        }
-      });
-    },
-
-    /******************获取快捷语文字******************/
-    getLanguage(e){
-      //console.log(e);
-      this.inputValue =this.inputValue  +e;
-    },
-
-    /*****************表情包输入框赋值******************/
-    frceCenterClick(text) {
-      this.inputValue = this.inputValue + "#" + text + "/";
-      //console.log(this.inputValue);
-    },
-
-    /******************* 快捷语库开关 ******************/
-    FastReplySwitchClick(num) {
-      this.FastReplySwitch = num;
-    
-    },
-
-    /*****************获取当前聊天用户信息****************/
-    get_user_info(type){
-      if(type.length > 0 ){
-        this. session_user_info  = {};
-        this.session_user_info = type[this.dataIndex];
-        // console.log(this.session_user_info);
-      }else{
-        this.session_user_info = '';
-      }
-    },
-
-    /********************获取配置信息********************/
-    get_config_info(){
-      let obj = {
-        headers: {
-          apiToken: this.$md5("minround" + "customer-service" + "evaluate" + this.time[0]+ "index"),
-          userToken: this.token
-        }
-      };
-      this.get("api/" + this.$ports.minRound, obj).then(res => {
-        if (res.data.code ==1) {
-          this.trigger_condition = res.data.data.systemconfig_data;
-        }
-      });
-    },
-
-    /***********发送消息或接收消息后自动滚动高度*************/
-    automaticRolling(){
-      this.$nextTick(() => {
-        let msg = document.getElementById('chat_box') // 获取对象
-        msg.scrollTop = msg.scrollHeight // 滚动高度
-        
-      })
-    },
-
-    /**************获取敏感词**************** */
-    getSensitive() {
-      let obj = {
-        headers: {
-          "apiToken": this.$md5('sensitivewords' + "customer-service"+'index'+this.time[0]+'index'),
-          'userToken': this.token
-        }
-      };
-      this.post('api'+this.$ports.sensitiveWords, '', obj).then(res => {
-        if (res.data.code == 1) {
-          res.data.data.serverSensitive.forEach(res => {
-            this.sensitive.push(res.sensitivewords_word)
-          })
-        }
-      })
-    },
-
-  },
-  /**
-   * 挂载前执行
-   */
-  mounted() {
-    //获取vuex数据
-    let  getters = this.$store.getters
-    this.sessionList = getters.get_session ? getters.get_session :[] ;
-    this.offlineList = getters.get_offline ? getters.get_offline :[] ;
-    this.token =getters.get_user_info.token ;
-    this.user_info = getters.get_user_info;
-    this.time =JSON.parse(sessionStorage.getItem("time"));
-    let _this = this;
-    this.get_config_info();
-    if(this.$store.getters.get_is_init){
-      // this.$websocket.onmessage = this.;
-      _this.websocketsend(JSON.stringify({ 
-        type:'init',
-        data:{
-          uid:'KF'+_this.user_info.id,
-          group:_this.user_info.group_id,
-          token: this.token,
-          name:_this.user_info.user_name,
-          avatar:_this.user_info.user_avatar,
-        }
-      }));
-      this.$store.dispatch("SET_IS_INIT",false);
-    }
-    //获取客服快捷语
-    this.quickReplyInfo();
-    //获取敏感词
-    this.getSensitive();
-    this.frceArr = this.$frce;
-  },
-
-  /**
-   * 事件监听
-   */
-  watch:{
-    get_session_message(e){
-      this.chatMessage(e)
-    },
-
-    /*****************评价按钮显示隐藏处理*****************/
-    get_is_eva_btn(data){
-      if(this.sessionType != 2){
-        if(this.data.length > this.trigger_condition){
-          if(!this.data[this.dataIndex].isEva){
-          //   this.is_eva_btn = true;
-          // }else{
-            this.data[this.dataIndex].isEva = true;  
-            this.is_eva_btn = false;
-          }
-        }else{
-          this.is_eva_btn = true;
-        }
-      }else{
-        this.is_eva_btn = true;
-      }
-    }
-  },
-
-  /**
-   * 计算属性
-   */
-  computed:{
-    get_session_message(){
-      return this.$store.getters.get_session_message;
-    },
-    /****************判断是否可以点击评价*****************/
-    get_is_eva_btn(){
-      return this.data;
-    }
-  },
-
-  components: {
-    leftNav,
-    hader,
-    messageCenter
-  }
-};
+	import "@/css/index.css";
+	import leftNav from "@/components/leftNav";
+	import hader from "@/components/hader";
+	import messageCenter from "@/components/messageCenter";
+
+	export default {
+		name: "TheCurrentSession",
+		data() {
+			return {
+				/***********************************/
+				inputValue: "", //输入框内容
+				isFrce: false, //表情包开关
+				frceArr: [], //表情包数组
+				data: [], //当前对话数据
+				dataIndex:0,//定位当前会话,默认是0
+				FastReply: "", //快捷回复
+				FastReplySwitch: "one", //快捷回复开关
+				user_info:'',//用户信息
+				token: "",
+				time: "",
+				sessionList:[],//会话列表
+				offlineList:[],//离线列表
+				transferList:[],//转接列表
+				sessionType:1,//选择列表状态默认未1(1是会话中,2是离线)
+				lineUp:[],//排队列表
+				conversationId:'',//会话工单
+				sessionName:'',//当前会话用户名字
+				session_user_info:{},//当前会话用户信息
+				img_http:'http://kfadmin.bocai186.com',//图片路径域
+				//img_http:'http://192.168.2.186:8090',//图片路径域
+				fit:'scale-down',//图片渲染样式
+				is_eva_btn:true,//
+				trigger_condition:0,//评价触发条件
+				webTime:'',//客服会话时间
+				session_marked:'',//客服当前会话标记
+				sensitive:[],//敏感词数据
+			};
+		},
+		/**
+		 *
+		 */
+		methods: {
+			/************回车提交************/
+			listenEnter(event){
+				if (event.keyCode === 13) {
+					this.inputValue = this.inputValue.replace(/\s/g,'')
+					// this.inputValue = this.inputValue.replace(/\n /g,'')
+					this.sendMessage(); // 发送文本
+				}
+			},
+
+			/************ctrl+center 换行***********/
+			lineFeed(){
+				this.inputValue = this.inputValue + '\n'
+			},
+			/******************消息数据接收********************/
+			chatMessage(redata){
+				// console.log('列表',this.sessionList)
+				if(redata.type == "pong" ) return
+				console.log('消息',redata)
+				// 用户接入数据
+				if(redata.message_type == "connect"){
+					this.conversationId = redata.data.conversationId;
+					redata.data.user_info.conversationId = redata.data.conversationId;
+					let isTrue = true;
+					//匹配是否是离线用户上线
+					if(this.offlineList.length > 0){
+						for(let i = 0; i < this.offlineList.length ; i++){
+							//匹配离线列表是否有这个用户
+							if(this.offlineList[i].id == redata.data.user_info.id  ){
+								//匹配离线列表是否存会话工单未结束
+								if(this.offlineList[i].conversationId ==  redata.data.conversationId){
+									//工单号未结束的数据处理
+									if(this.sessionType == 2 && i == this.dataIndex){
+										this.data = [];
+										this.data = this.offlineList[i].data;
+									}
+									redata.data.user_info.data = this.offlineList[i].data
+								}else{
+									//工单号已结束数据处理
+									if(this.dataIndex == 0 && this.sessionList.length  == 0){
+										this.sessionName = redata.data.user_info.name;
+										this.data = [];
+									}
+									redata.data.user_info.data = [];
+								}
+								//将离线状态用户删除
+								this.offlineList.splice(i,1);
+								this.$store.dispatch("SET_OFFLINE",this.offlineList);
+								this.get_user_info(this.offlineList);
+								isTrue = false;
+								break;
+							}
+						}
+					}else{
+						this.sessionType = 1;
+						this.sessionName = '';
+						this.data = [];
+					}
+					if(isTrue){
+						if(this.dataIndex == 0 && this.sessionList.length  == 0){
+							this.sessionName = redata.data.user_info.name;
+							this.data = [];
+						}
+						redata.data.user_info.data = [];
+					}
+					redata.data.user_info.intime = this.time[1];
+					redata.data.user_info.num = 0;
+					this.sessionList.push(redata.data.user_info);
+					this.get_user_info(this.sessionList);
+					//将数据储存到vuex里面
+					this.$store.dispatch("SET_SESSION",this.sessionList);
+					// this.$store.getters.getLimit
+				}
+
+				//用户离线后会话窗口切换
+				if(redata.message_type == "userClose"){
+					for(let i = 0 ; i < this.sessionList.length; i++){
+						//匹配会话中离线用户
+						if(this.sessionList[i].id  == redata.data.id ){
+							//把数据添加到离线列表
+							this.offlineList.push(this.sessionList[i]);
+							this.$store.dispatch("SET_OFFLINE",this.offlineList);
+							//用户选中状态会话中处理
+							if(this.sessionType == 1){
+								//判断会话中列表长度
+								if(this.sessionList.length > 1){
+									//删除会话列表离线用户
+									this.sessionList.splice(i,1);
+									this.$store.dispatch("SET_SESSION",this.sessionList);
+									//获取会话中列表第一个会话消息
+									this.dataIndex = 0;
+									this.sessionName = this.sessionList[0].name;
+									this.data = [];
+									this.data = this.sessionList[0].data;
+								}else{
+									this.sessionType = 2;
+									this.dataIndex = 0;
+									// if(this.offlineList.length >0){
+									// }else{}
+									this.sessionName =this.offlineList[0].name;
+									this.data = this.offlineList[0].data;
+									//删除会话列表离线用户
+									this.sessionList.splice(i,1);
+									this.$store.dispatch("SET_SESSION",this.sessionList);
+								}
+							}else{
+								//删除会话列表离线用户
+								this.sessionList.splice(i,1);
+								this.$store.dispatch("SET_SESSION",this.sessionList);
+							}
+							break;
+						}
+					}
+					this.get_user_info(this.sessionList);
+				}
+
+				//用户断开链接会话窗口切换
+				if(redata.message_type == "delUser"){
+					let isTrue = true;
+					//会话中列表匹配
+					for(let i = 0 ; i < this.sessionList.length; i++){
+						//判断会话中列表是否结束会话
+						if(this.sessionList[i].id ==  redata.data.id){
+							//删除会话列表断线关闭的用户信息
+							this.sessionList.splice(i,1);
+							this.$store.dispatch("SET_SESSION",this.sessionList);
+							if(this.sessionType == 1){
+								//处理会话显现状态
+								if(this.dataIndex == i){
+									if(this.sessionList.length >1){
+										this.sessionName = this.sessionList[0].name;
+										this.data = this.sessionList[0].data;
+										this.get_user_info(this.sessionList);
+									}else{
+										this.sessionName = '';
+										this.data = [];
+										this.get_user_info(this.offlineList);
+									}
+								}
+							}
+							isTrue = false;
+							break;
+						}
+					}
+					//离线列表匹配
+					if(isTrue){
+						for(let i = 0 ; i < this.offlineList.length; i++){
+							//判断离线列表是否结束会话
+							if(this.offlineList[i].id ==  redata.data.id){
+								console.log('离线列');
+								//删除离线列表中断线关闭的用户信息
+								this.offlineList.splice(i,1);
+								this.$store.dispatch("SET_OFFLINE",this.offlineList);
+								if(this.sessionType == 2){
+									if(this.dataIndex == i){
+										console.log('别乱动 大于1','来了吗');
+										if(this.offlineList.length > 1){
+											this.data = this.offlineList[0].data;
+											this.sessionName = this.offlineList[0].name;
+											this.get_user_info(this.offlineList);
+										}else{
+											console.log('别乱动 小于1','来了吗');
+											this.data = [];
+											this.sessionName = '';
+											this.get_user_info(this.sessionList);
+										}
+									}
+								}
+							}
+						}
+					}
+				}
+
+				//接收用户消息数据
+				if(redata.message_type == "chatMessage"){
+					let dataIndex = 0;
+					//匹配是那个用户回的消息
+					for(let i = 0 ; i < this.sessionList.length ; i++){
+						if(this.sessionList[i].id == redata.data.id ){
+							dataIndex = i;
+							break;
+						}
+					}
+					//获取当前回复消息对象
+					let chatList = this.sessionList[dataIndex]
+					redata.data.type = 'user';
+					redata.data.content = JSON.parse(redata.data.content);
+					//这个地方转
+
+					redata.data.content.text = this.turnFace(redata.data.content.text);
+					//更新会话时间
+					this.$set(chatList,'intime',redata.data.time);
+
+					//更新会话列表中最新回复消息
+					if(redata.data.content.text){
+						this.$set(chatList,'text',redata.data.content.text)
+					}
+
+					//将消息添加对应的会话列表中
+					chatList.data.push(redata.data);
+					//判断是否是当前对话信息
+					if(dataIndex == this.dataIndex){
+						this.data =[];
+						this.data = chatList.data;
+					}else{
+						let num = chatList.num;
+						//console.log(chatList.num);
+						this.$set(chatList,'num',num+1)
+					}
+				}
+
+				//接收系统操作信息状态在线客服列表
+				if(redata.message_type == "onlinekfs"){
+					this.transferList = [];
+					this.transferList = this.transferList.concat(redata.data);
+				}
+
+				//
+				if(redata.message_type == "webTime"){
+					// this.webTime = redata.data.webTime
+					this.$set(this.data[this.session_marked],'time',redata.data.webTime);
+				}
+
+				//客服手动转接用户成功
+				if(redata.message_type == "trunconnect"){
+					this.sessionList.splice(this.dataIndex,1);
+					this.$message({
+						message: '转接用户成功...',
+						type: 'success'
+					});
+					if(this.sessionList.length >1 ){
+						this.dataIndex =0;
+						// this.data = []
+
+					}else{
+						this.data = [];
+						this.sessionName ='';
+						// if(this.offlineList.length >0){
+						//   this.data = [];
+						//   this.sessionName ='';
+						// }else{
+						//   this.data = [];
+						//   this.sessionName ='';
+						// }
+					}
+				}
+				this.automaticRolling();
+			},
+			/******************文字信息转表情******************/
+			turnFace(data){
+				let str = data.match(/\#\[.*?\]\//g);
+				let arr =Array.from(new Set(str));
+				arr.forEach(e=>{
+					let imgsrc = '';
+					for(let i = 0 ; i < this.$frce.length ; i++){
+						let expText = e.slice(1,e.length-1);
+						if(expText == this.$frce[i]){
+							imgsrc = '<img class="hover" src="'+require(`@/assets/img/${i}.gif`)+'"/>'
+							break;
+						}
+					}
+					data = data.replace(new RegExp(`\\#\\[${e.substring(2,e.length-2)}\\]\\/`,'g'),imgsrc);
+				})
+				return data;
+			},
+
+			/*********************图片发送*********************/
+			uploadIMG(e) {
+				//console.log(e);
+				let self = this;
+				let files = e.target.files || e.dataTransfer.files;
+				if (!files.length) return;
+				let picavalue = files[0];
+				//console.log(picavalue);
+				if (picavalue.size / 1000 > 20000) {
+					this.$message({
+						message: "图片过大不支持上传",
+						type: "warning"
+					});
+				} else {
+					this.$public.imgPreview(picavalue, function(imgSrc,formData) {
+						// 数据结构请求
+						self.post('api/'+self.$ports.uploadImg,formData).then(res=>{
+							//console.log(res.data.data.src)
+							if(res.data.code == 1){
+								let isFirst = true;
+								//判断客服是否发送的第一句话
+								if(self.data.length >0){
+									for(let i = 0 ; i < self.data.length ; i++ ){
+										if(self.data[i].type == 'service' ){
+											isFirst =false;
+											break;
+										}
+									}
+								}
+
+								let obj = {
+									text:'',
+									img:res.data.data.src,
+									type:false,
+								};
+								let chatList = self.sessionList[self.dataIndex];
+								chatList.data.push({type:'service', content:obj ,time:self.time[1]});
+								self.data = [];
+								self.data = chatList.data;
+								let type ='chatMessage';
+								let data = {
+									from_name:self.user_info.user_name,//发送者
+									from_avatar:self.user_info.avatar,//发送者头像
+									from_id:"KF"+self.user_info.id,//发送者id
+									content:JSON.stringify(obj),
+									to_id: self.sessionList[self.dataIndex].id,
+									to_name:self.sessionList[self.dataIndex].name,
+									conversationId:self.sessionList[self.dataIndex].conversationId,
+									isFirst:isFirst,//是否是第一句话
+									sensitiveNumber:0,//敏感词次数
+								}
+								self.websocketsend(JSON.stringify({type,data}))
+
+
+							}
+						})
+					});
+				}
+			},
+
+			/*****************转接会话用户确认******************/
+			transfer(e){
+
+				if(this.sessionList.length > 0){
+					this.$confirm('此操作将当前用户转出, 是否继续?', '温馨提示!', {
+						confirmButtonText: '确定',
+						cancelButtonText: '取消',
+						type: 'warning'
+					}).then(() => {
+						let type ="changeOtherhKeFu";
+						let data={
+							conversationId:this.sessionType == 1 ? this.sessionList[this.dataIndex].conversationId : this.offlineList[this.dataIndex].conversationId,
+							togroup:this.transferList[e].groupid,
+							fromgroup:this.user_info.group_id,
+							toukfuid:this.transferList[e].kfuid ,
+							fromkfuid:"KF"+this.user_info.id,
+							uid:this.sessionType == 1 ? this.sessionList[this.dataIndex].id : this.offlineList[this.dataIndex].id,
+							word:'',
+						}
+						//console.log({type,data});
+						this.websocketsend(JSON.stringify({type,data}))
+					}).catch(() => {
+
+					})
+				}else{
+					this.$message({
+						message: '亲!您没有和用户会话怎么能转接呢。',
+						type: 'warning'
+					});
+				}
+
+			},
+
+			/******************获取客服人员列表*****************/
+			getServiceList(){
+				//console.log(12313);
+				this.websocketsend(JSON.stringify({"type":"getkfonlines"}))
+			},
+
+			/*****************切换用户会话对象******************/
+			chooseDialogue(type,index){
+				let data =[];
+				this.sessionType = type;
+				this.dataIndex = index;
+				if(type == 1){
+					data = this.sessionList[index].data;
+					this.session_user_info = this.sessionList[index];
+					this.$set(this.sessionList[index],'num',0);
+					this.sessionName = this.sessionList[index].name
+				}else if(type == 2){
+					data = this.offlineList[index].data;
+					this.sessionName = this.offlineList[index].name;
+					this.session_user_info = this.offlineList[index];
+				}
+				this.data = data;
+			},
+
+			/***************关闭当前和用户聊天对话***************/
+			open(){
+				let _this =this;
+				if(this.sessionType == 1){
+					if(this.sessionList.length < 1 )return
+				}else{
+					if(this.offlineList.length < 1)return
+				}
+				this.$confirm('此操作将关闭和当前用户通话, 是否继续?', '温馨提示!', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					let to_id = this.sessionType == 1 ? this.sessionList[this.dataIndex].id :this.offlineList[this.dataIndex].id;
+					let conversationId = this.sessionType == 1 ? this.sessionList[this.dataIndex].conversationId :this.offlineList[this.dataIndex].conversationId;
+					let data = {
+						"type":"kfCloseUser",
+						data:{
+							to_id,
+							kf_id:"KF"+_this.user_info.id,
+							group_id:_this.user_info.group_id,
+							conversationId:conversationId,
+						}
+					}
+					if(this.sessionType  == 1){
+						this.sessionList.splice(this.dataIndex,1);
+						if(this.sessionList.length> 0){
+							this.data = this.sessionList[0];
+							this.sessionName = this.sessionList[0].name;
+						}else{
+							this.data = [];
+							this.sessionName = '';
+						}
+					}else{
+						this.offlineList.splice(this.dataIndex,1);
+						this.data = [];
+						this.sessionName = '';
+					}
+
+					this.websocketsend(JSON.stringify(data))
+				}).catch(() => {
+					// this.$message({
+					//   type: 'info',
+					//   message: '已取消删除'
+					// });
+				});
+			},
+
+			/*****************数据发送方法调用******************/
+			websocketsend(Data) {
+				this.$websocket.send(Data);
+				this.automaticRolling();
+			},
+
+			/*********************发送消息*********************/
+			sendMessage(){
+				console.log();
+				if(!this.inputValue) return
+				if(this.sessionList.length == 0) {
+					this.$message({
+						message: '只能给在线用户发送消息哦...',
+						type: 'warning'
+					});
+					return false;
+				}
+				// if(this.offlineList.length <= 0 ) return
+				let isFirst = true,sensitiveNumber=0;
+				this.isFrce = false;
+				//判断客服是否发送的第一句话
+				if(this.data.length >0){
+					for(let i = 0 ; i < this.data.length ; i++ ){
+						if(this.data[i].type == 'service' ){
+							isFirst =false;
+							break;
+						}
+					}
+				}
+				//判断客服敏感词报警次数
+				let obj = {
+					text: this.inputValue,
+					img:'',
+					type:false,
+				}
+				let type ='chatMessage';
+				let data = {
+					from_name:this.user_info.user_name,//发送者
+					from_avatar:this.user_info.avatar,//发送者头像
+					from_id:"KF"+this.user_info.id,//发送者id
+					content:JSON.stringify(obj),
+					to_id: this.sessionList[this.dataIndex].id,
+					to_name:this.sessionList[this.dataIndex].name,
+					conversationId:this.sessionList[this.dataIndex].conversationId,
+					isFirst:isFirst,//是否是第一句话
+					sensitiveNumber:sensitiveNumber,//敏感词次数
+				}
+				let chatList = this.sessionList[this.dataIndex];
+				//检测发送信息是否含有敏感词
+				let  sensitive_data= this.$public.shieldingKeyword(this.turnFace(this.inputValue),this.sensitive);
+
+				//有敏感词提示并且禁止发送
+				if(sensitive_data.num == 0 ){
+					// 本地储存
+					chatList.data.push({type:'service', content:{
+							text:this.turnFace(this.inputValue),
+							img:'',
+							type:false,
+						} ,time:this.time[1]});
+
+					this.data = [];
+					//标记当前会话位置
+					this.session_marked = chatList.data.length -1;
+					this.data = chatList.data;
+					this.websocketsend(JSON.stringify({type,data}))
+					this.inputValue = '';
+				}else{
+					this.$message({
+						message: '敏感词'+sensitive_data.text,
+						type: 'warning'
+					});
+				}
+
+
+			},
+
+			/******************开启或关闭表情包******************/
+			frceClick() {
+				this.isFrce = !this.isFrce;
+			},
+
+			/*******************发送评价指令*******************/
+			evaluation(){
+				console.log(this.sessionList[this.dataIndex]);
+				if(!this.is_eva_btn && this.sessionType == 1){
+					this.$message({
+						message: '评价指令已发送',
+						type: 'success'
+					});
+					let type = 'getEvaluate';
+					let data = {
+						conversationId:this.sessionList[this.dataIndex].conversationId,
+						to_id:this.sessionList[this.dataIndex].id,
+					}
+					this.websocketsend(JSON.stringify({type,data}));
+					this.is_eva_btn = true;
+				}else if(this.sessionType == 2){
+					this.$message.error('用户已离线指令无法发送');
+				}else {
+					this.$message.error('评价指令无法发送');
+				}
+			},
+
+			/******************查询快捷数据信息*****************/
+			quickReplyInfo() {
+				let obj = {
+					headers: {
+						apiToken: this.$md5("userwords" + "customer-service" + "index" + this.time[0]+ "service"),
+						userToken: this.token
+					}
+				};
+				this.get("api" + this.$ports.FastReply.userWords, obj).then(res => {
+					if (res.data.code ==1) {
+						this.FastReply = res.data.data;
+					}
+				});
+			},
+
+			/******************获取快捷语文字******************/
+			getLanguage(e){
+				//console.log(e);
+				this.inputValue =this.inputValue  +e;
+			},
+
+			/*****************表情包输入框赋值******************/
+			frceCenterClick(text) {
+				this.inputValue = this.inputValue + "#" + text + "/";
+				//console.log(this.inputValue);
+			},
+
+			/******************* 快捷语库开关 ******************/
+			FastReplySwitchClick(num) {
+				this.FastReplySwitch = num;
+
+			},
+
+			/*****************获取当前聊天用户信息****************/
+			get_user_info(type){
+				if(type.length > 0 ){
+					this. session_user_info  = {};
+					this.session_user_info = type[this.dataIndex];
+					// console.log(this.session_user_info);
+				}else{
+					this.session_user_info = '';
+				}
+			},
+
+			/********************获取配置信息********************/
+			get_config_info(){
+				let obj = {
+					headers: {
+						apiToken: this.$md5("minround" + "customer-service" + "evaluate" + this.time[0]+ "index"),
+						userToken: this.token
+					}
+				};
+				this.get("api/" + this.$ports.minRound, obj).then(res => {
+					if (res.data.code ==1) {
+						this.trigger_condition = res.data.data.systemconfig_data;
+					}
+				});
+			},
+
+			/***********发送消息或接收消息后自动滚动高度*************/
+			automaticRolling(){
+				this.$nextTick(() => {
+					let msg = document.getElementById('chat_box') // 获取对象
+					msg.scrollTop = msg.scrollHeight // 滚动高度
+
+				})
+			},
+
+			/**************获取敏感词**************** */
+			getSensitive() {
+				let obj = {
+					headers: {
+						"apiToken": this.$md5('sensitivewords' + "customer-service"+'index'+this.time[0]+'index'),
+						'userToken': this.token
+					}
+				};
+				this.post('api'+this.$ports.sensitiveWords, '', obj).then(res => {
+					if (res.data.code == 1) {
+						res.data.data.serverSensitive.forEach(res => {
+							this.sensitive.push(res.sensitivewords_word)
+						})
+					}
+				})
+			},
+
+		},
+		/**
+		 * 挂载前执行
+		 */
+		mounted() {
+			//获取vuex数据
+			let  getters = this.$store.getters
+			this.sessionList = getters.get_session ? getters.get_session :[] ;
+			this.offlineList = getters.get_offline ? getters.get_offline :[] ;
+			this.token =getters.get_user_info.token ;
+			this.user_info = getters.get_user_info;
+			this.time =JSON.parse(sessionStorage.getItem("time"));
+			let _this = this;
+			this.get_config_info();
+			if(this.$store.getters.get_is_init){
+				// this.$websocket.onmessage = this.;
+				_this.websocketsend(JSON.stringify({
+					type:'init',
+					data:{
+						uid:'KF'+_this.user_info.id,
+						group:_this.user_info.group_id,
+						token: this.token,
+						name:_this.user_info.user_name,
+						avatar:_this.user_info.user_avatar,
+					}
+				}));
+				this.$store.dispatch("SET_IS_INIT",false);
+			}
+			//获取客服快捷语
+			this.quickReplyInfo();
+			//获取敏感词
+			this.getSensitive();
+			this.frceArr = this.$frce;
+		},
+
+		/**
+		 * 事件监听
+		 */
+		watch:{
+			get_session_message(e){
+				this.chatMessage(e)
+			},
+
+			/*****************评价按钮显示隐藏处理*****************/
+			get_is_eva_btn(data){
+				if(this.sessionType != 2){
+					if(this.data.length > this.trigger_condition){
+						if(!this.data[this.dataIndex].isEva){
+							//   this.is_eva_btn = true;
+							// }else{
+							this.data[this.dataIndex].isEva = true;
+							this.is_eva_btn = false;
+						}
+					}else{
+						this.is_eva_btn = true;
+					}
+				}else{
+					this.is_eva_btn = true;
+				}
+			}
+		},
+
+		/**
+		 * 计算属性
+		 */
+		computed:{
+			get_session_message(){
+				return this.$store.getters.get_session_message;
+			},
+			/****************判断是否可以点击评价*****************/
+			get_is_eva_btn(){
+				return this.data;
+			}
+		},
+
+		components: {
+			leftNav,
+			hader,
+			messageCenter
+		}
+	};
 </script>
 
 <style>
-.el-icon-arrow-right:before {
-  content: "\E791";
-  color: #ccc;
-}
-.session_choose{
-   background:#F6F8FF;
-}
-.session_style:hover {
-  /* background:#F6F8FF; */
-  background:#ECF4FF ;
-  cursor:pointer;
-}
-.sessionList {
-  width: 21vw;
-  background: #fff;
-}
-.markNumber{
-  display: inline-block;
-  width:20px;
-  height:20px;
-  border-radius: 50%;
-  background:#f60;
-  font-size:12px;
-  color:#fff;
-  text-align: center;
-  line-height: 20px;
-}
-.el-collapse-item__header {
-  position: relative;
-  font-size: 14px;
-  font-weight:bold;
-  color:#666;
-  font-family:PingFang SC;
-  padding-left: 32px;
-  height: 49px;
-  justify-content: space-between;
-  padding-right: 10px;
-}
-.el-collapse-item__header.is-active {
-  border-bottom: 1px solid #d5e5ff;
-}
-.el-collapse-item__header {
-  border-bottom: 1px solid #d5e5ff;
-}
-.el-icon-arrow-right {
-  position: absolute;
-  left: 10px;
-  top: auto;
-}
-.sessionList_span {
-  color: #999;
-}
-.user {
-  padding: 10px;
-}
-.evaluation{
-  font-size: 24px;
-  color: #969696;
-}
-.el-collapse-item__content {
-  padding-bottom: 0;
-}
-.chat {
-  width: 29vw;
-  height: 93vh;
-  border: 1px solid #d5e5ff;
-  border-top: none;
-  background: #fff;
-}
-.user_text{
-  border: 1px solid #ECF4FF;
-  color:#999;
-  line-height: 30px;
-  width: 80%;
-}
-.user_text:focus {
-  outline: none;
-}
-.chatTop {
-  height: 50px;
-  border-bottom: 1px solid #d5e5ff;
-}
-.chat-box {
-  height: 62vh;
-  /* background: red; */
-  /* padding: 40px 0; */
-  border-bottom: 1px solid #d5e5ff;
-  overflow-x: hidden;
-  overflow-y: auto;
-}
-.chatMsg {
-  display: inline-block;
-  padding: 10px;
-  font-size: 14px;
-  max-width: 85%;
-  word-wrap: break-word;
-}
-p {
-  margin-block-start: 0em;
-  margin-block-end: 0em;
-  margin-inline-start: 0px;
-  margin-inline-end: 0px;
-}
-.frce {
-  height: 0.38rem;
-  width: 100%;
-  padding: 16px 10px;
-}
-.input {
-  height: 100px;
-  background: #fff;
-  resize: none;
-  font-size: 14px;
-  margin: 0 10px;
-  border: none;
-  /* border: 1px solid #d5e5ff; */
-}
-.input:focus {
-  outline: none;
-  border: none;
-}
-.user_info_box{
-  margin: 10px 0 ;
-}
-.title_span{
-  color:#666;
-  font-size:14px;
-  font-weight: bold;
-}
-.content_span{
-  color:#999;
-  font-size:14px;
-}
-.key {
-  /* width: 27.8vw; */
-  /* position: absolute; */
-  bottom: 22px;
-  height: 23vh;
-  /* background: #409EFF; */
-}
-.msgInputBtn {
-  right: 10px;
-  bottom: 10px;
-  width: 60px;
-  height: 30px;
-  /* background:#ECF4FF; */
-  background:#5399f5;
-  margin-right: 10px;
-  border-radius: 5px;
-  font-size: 14px;
-  color: #fff;
-  cursor:pointer;
-}
-
-/* .msgInputBtn:hover{
-  background:#5399f5;
-} */
-.frceBox {
-  position: absolute;
-  /* top: 25vw; */
-  bottom: 25vh;
-  left: 31.5vw;
-  width: 28vw;
-  height: 25vh;
-  background: #fff;
-  border: 1px solid #d5e5ff;
-  overflow-x: hidden;
-  overflow-y: auto;
-  z-index: 999999;
-}
-.frceBox p {
-  width: 50px;
-  height: 50px;
-}
-.FastReply {
-  width: 19vw;
-  height: 92vh;
-  border-right: 1px solid #d5e5ff;
-  background: #fff;
-}
-.FastReplyHader {
-  height: 50px;
-  border-bottom: 1px solid #d5e5ff;
-  padding: 0 10px;
-  font-size: 14px;
-  color: #666;
-  font-weight: bold;
-}
-.FastReplySwitch {
-  height: 50px;
-  border-bottom: 1px solid #d5e5ff;
-  color: #666;
-  font-size: 14px;
-  padding: 0 40px;
-}
-.FastReplySwitch p.active {
-  position: relative;
-  color:#5399f5;
-}
-.FastReplySwitch p.active::after {
-  content: "";
-  display: inline-block;
-  position: absolute;
-  width: 42px;
-  height: 2px;
-  left: 1px;
-  bottom: -15px;
-  background: #5399f5;
-}
-ul{
-  margin-block-start: 0.4em;
-  margin-block-end: 0.4em;
-}
-.cursor_text{
-  cursor:pointer;
-  margin:  10px 20px;
-}
-.cursor_text:hover{
-  color: #d5e5ff;
-  background: #f6f8ff;
-}
-.serch {
-  padding: 20px 10px;
-}
-.disable{
-  color: #f0f0f0 !important;
-}
-.serchBox {
-  width: 200px;
-  height: 40px;
-  border: 1px solid #eee;
-  position: relative;
-}
-.serchBox img {
-  position: absolute;
-  right: 10px;
-  top: 12px;
-}
-.serchBox input {
-  width: 100%;
-  height: 100%;
-  background: #f5f5f5;
-  border: none;
-  color: #999;
-  padding: 0 10px;
-}
-.serchBox input:focus {
-  outline: none;
-  color: #666;
-}
-.FastReplyList {
-  width: 100%;
-}
-.userinfo {
-  width: 21vw;
-  padding: 20px;
-  background: #ECF4FF;
-}
-.userData p {
-  line-height: 30px;
-  display: block;
-  width: 100%;
-}
-.message_box{
-  background:#F5F5F5;
-  border-radius: 10px 0 10px 10px;
-}
-.user_box{
-  background:#DFF0FF;
-  border-radius: 0 10px 10px 10px;
-}
-
-.userDataInput {
-  width: 80%;
-  padding: 10px;
-  height: 50px;
-  resize: none;
-  border: 1px solid #d5e5ff;
-  background: #fff;
-}
-.userDataInput:focus {
-  outline: none;
-}
-.userBtn {
-  width: 60px;
-  height: 34px;
-  border: 1px solid rgba(221, 221, 221, 1);
-  background: linear-gradient(
-    180deg,
-    rgba(245, 245, 245, 1) 0%,
-    rgba(238, 238, 238, 1) 100%
-  );
-  border-radius: 5px;
-  color: #888;
-  font-size: 14px;
-  margin-top: 10px;
-}
-.chatmin {
-  height: 46.5vh;
-}
-
-.el-button--primary{
-  background:#409EFF !important;
-  /* color:#fff  !important; */
-  border:1px solid #DCDFE6;
-  line-height: 1;
-  padding: 4px 8px;
-}
-.cell button{
-  line-height: 1;
-  -webkit-transition: .1s;
-  border-radius: 4px;
-  border: 1px solid #DCDFE6;
-   padding: 4px 8px;
-}
-.el-button{
-  line-height: 0 ;
-  /* width: 0; */
-  border:none ;
-  padding: 0 ;
-  color: #999 ;
-  font-size: 12px ;
-  font-weight:400 ;
-}
+	.el-icon-arrow-right:before {
+		content: "\E791";
+		color: #ccc;
+	}
+	.session_choose{
+		background:#F6F8FF;
+	}
+	.session_style:hover {
+		/* background:#F6F8FF; */
+		background:#ECF4FF ;
+		cursor:pointer;
+	}
+	.sessionList {
+		width: 21vw;
+		background: #fff;
+	}
+	.markNumber{
+		display: inline-block;
+		width:20px;
+		height:20px;
+		border-radius: 50%;
+		background:#f60;
+		font-size:12px;
+		color:#fff;
+		text-align: center;
+		line-height: 20px;
+	}
+	.el-collapse-item__header {
+		position: relative;
+		font-size: 14px;
+		font-weight:bold;
+		color:#666;
+		font-family:PingFang SC;
+		padding-left: 32px;
+		height: 49px;
+		justify-content: space-between;
+		padding-right: 10px;
+	}
+	.el-collapse-item__header.is-active {
+		border-bottom: 1px solid #d5e5ff;
+	}
+	.el-collapse-item__header {
+		border-bottom: 1px solid #d5e5ff;
+	}
+	.el-icon-arrow-right {
+		position: absolute;
+		left: 10px;
+		top: auto;
+	}
+	.sessionList_span {
+		color: #999;
+	}
+	.user {
+		padding: 10px;
+	}
+	.evaluation{
+		font-size: 24px;
+		color: #969696;
+	}
+	.el-collapse-item__content {
+		padding-bottom: 0;
+	}
+	.chat {
+		width: 29vw;
+		height: 93vh;
+		border: 1px solid #d5e5ff;
+		border-top: none;
+		background: #fff;
+	}
+	.user_text{
+		border: 1px solid #ECF4FF;
+		color:#999;
+		line-height: 30px;
+		width: 80%;
+	}
+	.user_text:focus {
+		outline: none;
+	}
+	.chatTop {
+		height: 50px;
+		border-bottom: 1px solid #d5e5ff;
+	}
+	.chat-box {
+		height: 62vh;
+		/* background: red; */
+		/* padding: 40px 0; */
+		border-bottom: 1px solid #d5e5ff;
+		overflow-x: hidden;
+		overflow-y: auto;
+	}
+	.chatMsg {
+		display: inline-block;
+		padding: 10px;
+		font-size: 14px;
+		max-width: 85%;
+		word-wrap: break-word;
+	}
+	p {
+		margin-block-start: 0em;
+		margin-block-end: 0em;
+		margin-inline-start: 0px;
+		margin-inline-end: 0px;
+	}
+	.frce {
+		height: 0.38rem;
+		width: 100%;
+		padding: 16px 10px;
+	}
+	.input {
+		height: 100px;
+		background: #fff;
+		resize: none;
+		font-size: 14px;
+		margin: 0 10px;
+		border: none;
+		/* border: 1px solid #d5e5ff; */
+	}
+	.input:focus {
+		outline: none;
+		border: none;
+	}
+	.user_info_box{
+		margin: 10px 0 ;
+	}
+	.title_span{
+		color:#666;
+		font-size:14px;
+		font-weight: bold;
+	}
+	.content_span{
+		color:#999;
+		font-size:14px;
+	}
+	.key {
+		/* width: 27.8vw; */
+		/* position: absolute; */
+		bottom: 22px;
+		height: 23vh;
+		/* background: #409EFF; */
+	}
+	.msgInputBtn {
+		right: 10px;
+		bottom: 10px;
+		width: 60px;
+		height: 30px;
+		/* background:#ECF4FF; */
+		background:#5399f5;
+		margin-right: 10px;
+		border-radius: 5px;
+		font-size: 14px;
+		color: #fff;
+		cursor:pointer;
+	}
+
+	/* .msgInputBtn:hover{
+	  background:#5399f5;
+	} */
+	.frceBox {
+		position: absolute;
+		/* top: 25vw; */
+		bottom: 25vh;
+		left: 31.5vw;
+		width: 28vw;
+		height: 25vh;
+		background: #fff;
+		border: 1px solid #d5e5ff;
+		overflow-x: hidden;
+		overflow-y: auto;
+		z-index: 999999;
+	}
+	.frceBox p {
+		width: 50px;
+		height: 50px;
+	}
+	.FastReply {
+		width: 19vw;
+		height: 92vh;
+		border-right: 1px solid #d5e5ff;
+		background: #fff;
+	}
+	.FastReplyHader {
+		height: 50px;
+		border-bottom: 1px solid #d5e5ff;
+		padding: 0 10px;
+		font-size: 14px;
+		color: #666;
+		font-weight: bold;
+	}
+	.FastReplySwitch {
+		height: 50px;
+		border-bottom: 1px solid #d5e5ff;
+		color: #666;
+		font-size: 14px;
+		padding: 0 40px;
+	}
+	.FastReplySwitch p.active {
+		position: relative;
+		color:#5399f5;
+	}
+	.FastReplySwitch p.active::after {
+		content: "";
+		display: inline-block;
+		position: absolute;
+		width: 42px;
+		height: 2px;
+		left: 1px;
+		bottom: -15px;
+		background: #5399f5;
+	}
+	ul{
+		margin-block-start: 0.4em;
+		margin-block-end: 0.4em;
+	}
+	.cursor_text{
+		cursor:pointer;
+		margin:  10px 20px;
+	}
+	.cursor_text:hover{
+		color: #d5e5ff;
+		background: #f6f8ff;
+	}
+	.serch {
+		padding: 20px 10px;
+	}
+	.disable{
+		color: #f0f0f0 !important;
+	}
+	.serchBox {
+		width: 200px;
+		height: 40px;
+		border: 1px solid #eee;
+		position: relative;
+	}
+	.serchBox img {
+		position: absolute;
+		right: 10px;
+		top: 12px;
+	}
+	.serchBox input {
+		width: 100%;
+		height: 100%;
+		background: #f5f5f5;
+		border: none;
+		color: #999;
+		padding: 0 10px;
+	}
+	.serchBox input:focus {
+		outline: none;
+		color: #666;
+	}
+	.FastReplyList {
+		width: 100%;
+	}
+	.userinfo {
+		width: 21vw;
+		padding: 20px;
+		background: #ECF4FF;
+	}
+	.userData p {
+		line-height: 30px;
+		display: block;
+		width: 100%;
+	}
+	.message_box{
+		background:#F5F5F5;
+		border-radius: 10px 0 10px 10px;
+	}
+	.user_box{
+		background:#DFF0FF;
+		border-radius: 0 10px 10px 10px;
+	}
+
+	.userDataInput {
+		width: 80%;
+		padding: 10px;
+		height: 50px;
+		resize: none;
+		border: 1px solid #d5e5ff;
+		background: #fff;
+	}
+	.userDataInput:focus {
+		outline: none;
+	}
+	.userBtn {
+		width: 60px;
+		height: 34px;
+		border: 1px solid rgba(221, 221, 221, 1);
+		background: linear-gradient(
+				180deg,
+				rgba(245, 245, 245, 1) 0%,
+				rgba(238, 238, 238, 1) 100%
+		);
+		border-radius: 5px;
+		color: #888;
+		font-size: 14px;
+		margin-top: 10px;
+	}
+	.chatmin {
+		height: 46.5vh;
+	}
+
+	.el-button--primary{
+		background:#409EFF !important;
+		/* color:#fff  !important; */
+		border:1px solid #DCDFE6;
+		line-height: 1;
+		padding: 4px 8px;
+	}
+	.cell button{
+		line-height: 1;
+		-webkit-transition: .1s;
+		border-radius: 4px;
+		border: 1px solid #DCDFE6;
+		padding: 4px 8px;
+	}
+	.el-button{
+		line-height: 0 ;
+		/* width: 0; */
+		border:none ;
+		padding: 0 ;
+		color: #999 ;
+		font-size: 12px ;
+		font-weight:400 ;
+	}
 </style>

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

@@ -1,187 +1,187 @@
 <template>
-  <div >
-    <form action="">
-       <div class="login">
-      <div class="loginBg">
-        <img src="@/assets/img/loginBg.png" />
-      </div>
-      <div class="loginBox">
-        <div class="row center" style="height:48px;margin-top:40px;">
-          <p style="font-size:48px;font-weight:bold;"><span style="color:#F60">HX<b style="color:#666;">668</b></span></p>
-        </div>
-        <div class="row center"><span style="font-size:16px;color:#666;">客服系统客服登录</span></div>
-        <div class="box row center">
-          <div class="boxData" :class="0?'errBd':''">
-            <input type="text" v-model="account" placeholder="账号">
-            <img src="@/assets/img/account.png">
-             <p v-if="0" style="color:#f60;font-size:14px;margin-top:5px;margin-left:3px;">账号不存在</p>
-          </div>
-        </div>
-        <div class="box row center">
-          <div class="boxData" :class="0?'errBd':''">
-            <input @keyup.enter="loginBtn()" type="password" v-model="password" placeholder="密码">
-            <img src="@/assets/img/password.png">
-            <p v-if="0" style="color:#f60;font-size:14px;margin-top:5px;margin-left:3px;">密码错误,请重新输入</p>
-          </div>
-        </div>
-        <div class="box row center">
-          <div class="btn row center" @click="loginBtn()">登录</div>
-        </div>
-      </div>
-    </div>
-    </form>
-   
-  </div>
+	<div >
+		<form action="">
+			<div class="login">
+				<div class="loginBg">
+					<img src="@/assets/img/loginBg.png" />
+				</div>
+				<div class="loginBox">
+					<div class="row center" style="height:48px;margin-top:40px;">
+						<p style="font-size:48px;font-weight:bold;"><span style="color:#F60">HX<b style="color:#666;">668</b></span></p>
+					</div>
+					<div class="row center"><span style="font-size:16px;color:#666;">客服系统客服登录</span></div>
+					<div class="box row center">
+						<div class="boxData" :class="0?'errBd':''">
+							<input type="text" v-model="account" placeholder="账号">
+							<img src="@/assets/img/account.png">
+							<p v-if="0" style="color:#f60;font-size:14px;margin-top:5px;margin-left:3px;">账号不存在</p>
+						</div>
+					</div>
+					<div class="box row center">
+						<div class="boxData" :class="0?'errBd':''">
+							<input @keyup.enter="loginBtn()" type="password" v-model="password" placeholder="密码">
+							<img src="@/assets/img/password.png">
+							<p v-if="0" style="color:#f60;font-size:14px;margin-top:5px;margin-left:3px;">密码错误,请重新输入</p>
+						</div>
+					</div>
+					<div class="box row center">
+						<div class="btn row center" @click="loginBtn()">登录</div>
+					</div>
+				</div>
+			</div>
+		</form>
+
+	</div>
 </template>
 
 <script>
-import "@/css/index.css";
-import Vue from 'vue';
-export default {
-  name: "login",
-  data() {
-    return {
-      account:'',//账号
-      password:'',//密码
-      time:'',
-      loading:false,
-    }
-  },
-  methods:{
-    loginBtn(){
-      if(this.$socket_open != undefined ){
-        let apiToken = this.$md5('customer-service'+this.time[0]+window.location.origin)
-        if(this.account && this.password){
+	import "@/css/index.css";
+	import Vue from 'vue';
+	export default {
+		name: "login",
+		data() {
+			return {
+				account:'',//账号
+				password:'',//密码
+				time:'',
+				loading:false,
+			}
+		},
+		methods:{
+			loginBtn(){
+				if(this.$socket_open != undefined ){
+					let apiToken = this.$md5('customer-service'+this.time[0]+window.location.origin)
+					if(this.account && this.password){
 
-          //进程加载条
-          const loading = this.$loading({
-            lock: true,
-            text: 'Loading',
-            spinner: 'el-icon-loading',
-            background: 'rgba(0, 0, 0, 0.7)'
-          });
-          this.post('api'+this.$ports.login,{
-            username:this.account,
-            password:this.password
-          }).then((res)=>{
-            if(res.data.code == 1){
-              this.$store.dispatch("SET_USER",res.data.data.user);
-              this.$store.dispatch("SET_IS_INIT",true);
-              Vue.prototype.$token = res.data.data.user.token;
-              this.$router.push('/')
-            }else{
-              this.$notify({  
-                title: "错误",
-                message: res.data.msg,
-                type: "error",
-                duration: 2000
-              });
-            }
-            loading.close();
-          })
-        }else{
-          this.$notify({  
-            title: "错误提示!",
-            message: '请输入您的账号和密码',
-            type: "error",
-            duration: 2000
-          });
-        }
-      }else{
-        this.$notify({  
-          title: "错误提示!",
-          message: '网路链接错误',
-          type: "error",
-          duration: 2000
-        });
-      }
-    },
-    /**************************************/
-    //连接建立
-    websocketonopen() {
-      this.$websocket.onopen();
-      //console.log('已经链接')
-    },
-  },
-  mounted(){
-    this.time = sessionStorage.getItem('time')
-  }
-};
+						//进程加载条
+						const loading = this.$loading({
+							lock: true,
+							text: 'Loading',
+							spinner: 'el-icon-loading',
+							background: 'rgba(0, 0, 0, 0.7)'
+						});
+						this.post('api'+this.$ports.login,{
+							username:this.account,
+							password:this.password
+						}).then((res)=>{
+							if(res.data.code == 1){
+								this.$store.dispatch("SET_USER",res.data.data.user);
+								this.$store.dispatch("SET_IS_INIT",true);
+								Vue.prototype.$token = res.data.data.user.token;
+								this.$router.push('/')
+							}else{
+								this.$notify({
+									title: "错误",
+									message: res.data.msg,
+									type: "error",
+									duration: 2000
+								});
+							}
+							loading.close();
+						})
+					}else{
+						this.$notify({
+							title: "错误提示!",
+							message: '请输入您的账号和密码',
+							type: "error",
+							duration: 2000
+						});
+					}
+				}else{
+					this.$notify({
+						title: "错误提示!",
+						message: '网路链接错误',
+						type: "error",
+						duration: 2000
+					});
+				}
+			},
+			/**************************************/
+			//连接建立
+			websocketonopen() {
+				this.$websocket.onopen();
+				//console.log('已经链接')
+			},
+		},
+		mounted(){
+			this.time = sessionStorage.getItem('time')
+		}
+	};
 </script>
 
-<style>
-p {
-    display: inline;
-    margin-block-start: 0;
-    margin-block-end:0;
-    margin-inline-start: 0;
-    margin-inline-end:0;
-}
+<style scoped>
+	p {
+		display: inline;
+		margin-block-start: 0;
+		margin-block-end:0;
+		margin-inline-start: 0;
+		margin-inline-end:0;
+	}
 
-.login {
-  width: 100%;
-  height: 100%;
-}
-.loginBg {
-  height: 50%;
-}
-.loginBg img {
-  width: 100%;
-  height: 100%;
-}
-.loginBox {
-  position: fixed;
-  top: 27%;
-  left: 0px;
-  right: 0px;
-  margin: auto;
-  width:480px;
-  height: 500px;
-  background: #fff;
-  border-radius: 2%;
-  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1);
-}
-.box{
-  margin-top: 40px;
-  height: 70px;
-}
-.boxData{
-  width: 350px;
-  height: 70px;
-  border: 1px solid #C6DCFF;
-  background: #F6F8FF;
-  position: relative;
-}
-.boxData img{
-  position: absolute;
-  left: 20px;
-  top:0;
-  bottom: 0;
-  margin:auto 0;
-}
-.boxData input{
-  width: 100%;
-  height: 100%;
-  outline: none;
-  padding-left: 60px;
-  font-size: 18px;
-  color: #999;
-}
-.boxData input:focus{
-  color: #666;
-}
-.errBd{
-  border: 1px solid #F60
-}
-.btn{
-  width: 350px;
-  height: 70px;
-  background:#5399F5;
-  font-size: 24px;
-  color: #fff;
-  border: none;
-}
-.btn:active{
-  background: #1d57dd;
-}
+	.login {
+		width: 100%;
+		height: 100%;
+	}
+	.loginBg {
+		height: 50%;
+	}
+	.loginBg img {
+		width: 100%;
+		height: 100%;
+	}
+	.loginBox {
+		position: fixed;
+		top: 27%;
+		left: 0px;
+		right: 0px;
+		margin: auto;
+		width:480px;
+		height: 500px;
+		background: #fff;
+		border-radius: 2%;
+		box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1);
+	}
+	.box{
+		margin-top: 40px;
+		height: 70px;
+	}
+	.boxData{
+		width: 350px;
+		height: 70px;
+		border: 1px solid #C6DCFF;
+		background: #F6F8FF;
+		position: relative;
+	}
+	.boxData img{
+		position: absolute;
+		left: 20px;
+		top:0;
+		bottom: 0;
+		margin:auto 0;
+	}
+	.boxData input{
+		width: 100%;
+		height: 100%;
+		outline: none;
+		padding-left: 60px;
+		font-size: 18px;
+		color: #999;
+	}
+	.boxData input:focus{
+		color: #666;
+	}
+	.errBd{
+		border: 1px solid #F60
+	}
+	.btn{
+		width: 350px;
+		height: 70px;
+		background:#5399F5;
+		font-size: 24px;
+		color: #fff;
+		border: none;
+	}
+	.btn:active{
+		background: #1d57dd;
+	}
 </style>