|
@@ -149,6 +149,8 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <!-- 发送消息音频提示 -->
|
|
|
|
|
+ <!-- <audio id="send" src="@/assets/audio/send.wav"></audio> -->
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 快捷回复模块 -->
|
|
<!-- 快捷回复模块 -->
|
|
@@ -211,35 +213,56 @@
|
|
|
|
|
|
|
|
<!-- 用户信息模块 -->
|
|
<!-- 用户信息模块 -->
|
|
|
<div class="userinfo">
|
|
<div class="userinfo">
|
|
|
- <div style="color:#666;font-weight:bold;font-size:14px;">用户信息</div>
|
|
|
|
|
|
|
+ <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 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.system}}-{{session_user_info.browse}}</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <div style="color:#666;font-weight:bold;font-size:14px; margin-top:30px;">用户信息</div>
|
|
|
|
|
+ <div style="margin-top:10px;color:#999;font-size:14px;" class="userData wrap">
|
|
|
|
|
+ <div class="user_info_box">
|
|
|
|
|
+ <span>账号:</span>
|
|
|
|
|
+ <input class="user_text" style="background: #ECF4FF;" v-model="session_user_info.name" readonly type="text">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="user_info_box">
|
|
|
|
|
+ <span>级别:</span>
|
|
|
|
|
+ <el-select v-model="value" placeholder="请选择">
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in options"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value">
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
<div class="user_info_box">
|
|
<div class="user_info_box">
|
|
|
<span>昵称:</span>
|
|
<span>昵称:</span>
|
|
|
- <input class="user_text" v-model="session_user_info.nick_name" readonly type="text">
|
|
|
|
|
|
|
+ <el-input style="width:80%" v-model="session_user_info.nick_name" placeholder="请输入内容"></el-input>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="user_info_box">
|
|
<div class="user_info_box">
|
|
|
<span>手机:</span>
|
|
<span>手机:</span>
|
|
|
- <input class="user_text" v-model="session_user_info.account_phone" type="text">
|
|
|
|
|
|
|
+ <el-input style="width:80%" v-model="session_user_info.account_phone" placeholder="请输入内容"></el-input>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="user_info_box">
|
|
<div class="user_info_box">
|
|
|
<span>邮箱:</span>
|
|
<span>邮箱:</span>
|
|
|
- <input class="user_text" v-model="session_user_info.account_email" type="text">
|
|
|
|
|
|
|
+ <el-input style="width:80%" v-model="session_user_info.account_email" placeholder="请输入内容"></el-input>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="user_info_box">
|
|
<div class="user_info_box">
|
|
|
<span>地址:</span>
|
|
<span>地址:</span>
|
|
|
- <input class="user_text" v-model="session_user_info.address" type="text">
|
|
|
|
|
|
|
+ <el-input style="width:80%" v-model="session_user_info.address" placeholder="请输入内容"></el-input>
|
|
|
</div>
|
|
</div>
|
|
|
<p>访客备注:</p>
|
|
<p>访客备注:</p>
|
|
|
</div>
|
|
</div>
|
|
|
<textarea draggable="false" class="userDataInput" v-model="session_user_info.remark" style="margin-top:10px;color:#999;" ></textarea>
|
|
<textarea draggable="false" class="userDataInput" v-model="session_user_info.remark" style="margin-top:10px;color:#999;" ></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 class=" row rightAlignment">
|
|
|
|
|
+ <div class="userBtn row center" @click="bt_update()">保存</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -277,7 +300,7 @@
|
|
|
// sessionName:'',//当前会话用户名字
|
|
// sessionName:'',//当前会话用户名字
|
|
|
session_user_info:{},//当前会话用户信息
|
|
session_user_info:{},//当前会话用户信息
|
|
|
img_http:'http://kfadmin.bocai186.com',//图片路径域
|
|
img_http:'http://kfadmin.bocai186.com',//图片路径域
|
|
|
- //img_http:'http://192.168.2.186:8090',//图片路径域
|
|
|
|
|
|
|
+ //img_http:'http://192.168.2.187:8090',//图片路径域
|
|
|
fit:'scale-down',//图片渲染样式
|
|
fit:'scale-down',//图片渲染样式
|
|
|
is_eva_btn:true,//
|
|
is_eva_btn:true,//
|
|
|
trigger_condition:0,//评价触发条件
|
|
trigger_condition:0,//评价触发条件
|
|
@@ -286,7 +309,22 @@
|
|
|
sensitive:[],//客服敏感词数据
|
|
sensitive:[],//客服敏感词数据
|
|
|
userSensitiveWords:[],//用户敏感词
|
|
userSensitiveWords:[],//用户敏感词
|
|
|
sensitiveNumber:0,//关键词次数
|
|
sensitiveNumber:0,//关键词次数
|
|
|
- };
|
|
|
|
|
|
|
+ isTrue:'',//编辑用户信息按钮开关
|
|
|
|
|
+ options: [{
|
|
|
|
|
+ value: '选项1',
|
|
|
|
|
+ label: '普通会员'
|
|
|
|
|
+ }, {
|
|
|
|
|
+ value: '选项2',
|
|
|
|
|
+ label: '高级会员'
|
|
|
|
|
+ }, {
|
|
|
|
|
+ value: '选项3',
|
|
|
|
|
+ label: 'VIP会员'
|
|
|
|
|
+ }, {
|
|
|
|
|
+ value: '选项4',
|
|
|
|
|
+ label: '贵宾会员'
|
|
|
|
|
+ }],
|
|
|
|
|
+ value: '普通会员'
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
*
|
|
*
|
|
@@ -446,7 +484,7 @@
|
|
|
message: '转接用户成功...',
|
|
message: '转接用户成功...',
|
|
|
type: 'success'
|
|
type: 'success'
|
|
|
});
|
|
});
|
|
|
- if(this.sessionList.length >1 ){
|
|
|
|
|
|
|
+ if(this.sessionList.length > 1 ){
|
|
|
this.dataIndex =0;
|
|
this.dataIndex =0;
|
|
|
this.$store.dispatch("SET_NUM",0);
|
|
this.$store.dispatch("SET_NUM",0);
|
|
|
// this.data = []
|
|
// this.data = []
|
|
@@ -634,6 +672,13 @@
|
|
|
this.automaticRolling();
|
|
this.automaticRolling();
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ // 消息发送声音提示
|
|
|
|
|
+ sendAudio() {
|
|
|
|
|
+ let send = new Audio()
|
|
|
|
|
+ send.src = "../../static/audio/send.wav"
|
|
|
|
|
+ send.play()
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
/*********************发送消息*********************/
|
|
/*********************发送消息*********************/
|
|
|
sendMessage(){
|
|
sendMessage(){
|
|
|
if(!this.inputValue) return
|
|
if(!this.inputValue) return
|
|
@@ -683,13 +728,13 @@
|
|
|
text:this.$public.turnFace(this.inputValue,this.$frce),
|
|
text:this.$public.turnFace(this.inputValue,this.$frce),
|
|
|
img:'',
|
|
img:'',
|
|
|
} ,time:this.time[1]});
|
|
} ,time:this.time[1]});
|
|
|
-
|
|
|
|
|
//this.data = [];
|
|
//this.data = [];
|
|
|
//标记当前会话位置
|
|
//标记当前会话位置
|
|
|
this.session_marked = chatList.data.length -1;
|
|
this.session_marked = chatList.data.length -1;
|
|
|
//this.data = chatList.data;
|
|
//this.data = chatList.data;
|
|
|
this.$store.dispatch("SET_CURRENT",chatList.data);//当前会话数据
|
|
this.$store.dispatch("SET_CURRENT",chatList.data);//当前会话数据
|
|
|
this.websocketsend(JSON.stringify({type:'chatMessage',data}))
|
|
this.websocketsend(JSON.stringify({type:'chatMessage',data}))
|
|
|
|
|
+ this.sendAudio();
|
|
|
this.inputValue = '';
|
|
this.inputValue = '';
|
|
|
this.sensitiveNumber = 0;
|
|
this.sensitiveNumber = 0;
|
|
|
}else{
|
|
}else{
|
|
@@ -769,6 +814,8 @@
|
|
|
this. session_user_info = {};
|
|
this. session_user_info = {};
|
|
|
if(this.dataIndex <= type.length){
|
|
if(this.dataIndex <= type.length){
|
|
|
this.session_user_info = type[this.dataIndex];
|
|
this.session_user_info = type[this.dataIndex];
|
|
|
|
|
+ console.log(this.session_user_info);
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}else{
|
|
}else{
|
|
|
this.session_user_info = {};
|
|
this.session_user_info = {};
|
|
@@ -831,6 +878,37 @@
|
|
|
// this.data = getters.get_current;//当前会话数据
|
|
// this.data = getters.get_current;//当前会话数据
|
|
|
// this.sessionName = getters.get_session_name;//会话对象名字
|
|
// this.sessionName = getters.get_session_name;//会话对象名字
|
|
|
this.time =JSON.parse(sessionStorage.getItem("time"));
|
|
this.time =JSON.parse(sessionStorage.getItem("time"));
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ /**********************编辑用户信息**********************/
|
|
|
|
|
+ bt_update(){
|
|
|
|
|
+
|
|
|
|
|
+ if(!this.isTrue) return false;
|
|
|
|
|
+ let obj = {
|
|
|
|
|
+ headers: {
|
|
|
|
|
+ "apiToken": this.$md5('update' + "customer-service"+'service'+this.time[0]+'service'),
|
|
|
|
|
+ 'userToken': this.token
|
|
|
|
|
+ },
|
|
|
|
|
+ account_id:this.session_user_info.id,
|
|
|
|
|
+ nick_name:this.session_user_info.nick_name,
|
|
|
|
|
+ account_email:this.session_user_info.account_email,
|
|
|
|
|
+ phone:this.session_user_info.account_phone,
|
|
|
|
|
+ address:this.session_user_info.address,
|
|
|
|
|
+ remark:this.session_user_info.remark,
|
|
|
|
|
+
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ this.post('api'+this.$ports.userInfo.update,obj).then(res => {
|
|
|
|
|
+ if(res.data.code == 1){
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: `恭喜你,${res.data.msg}`,
|
|
|
|
|
+ type: 'success'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ this.isTrue = true;
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
@@ -1194,7 +1272,7 @@
|
|
|
.userDataInput {
|
|
.userDataInput {
|
|
|
width: 80%;
|
|
width: 80%;
|
|
|
padding: 10px;
|
|
padding: 10px;
|
|
|
- height: 50px;
|
|
|
|
|
|
|
+ height: 80px;
|
|
|
resize: none;
|
|
resize: none;
|
|
|
border: 1px solid #d5e5ff;
|
|
border: 1px solid #d5e5ff;
|
|
|
background: #fff;
|
|
background: #fff;
|
|
@@ -1215,6 +1293,12 @@
|
|
|
color: #888;
|
|
color: #888;
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
margin-top: 10px;
|
|
margin-top: 10px;
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ .userBtn:hover{
|
|
|
|
|
+ background: #5399f5;
|
|
|
|
|
+ color:#f0f0f0;
|
|
|
|
|
+ cursor:pointer;
|
|
|
}
|
|
}
|
|
|
.chatmin {
|
|
.chatmin {
|
|
|
height: 46.5vh;
|
|
height: 46.5vh;
|