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