|
|
@@ -354,8 +354,7 @@
|
|
|
lineUp: [],//排队列表
|
|
|
conversationId: '',//会话工单
|
|
|
session_user_info: {},//当前会话用户信息
|
|
|
- img_http: '',//图片路径域
|
|
|
- // img_http: 'http://192.168.2.187:8090',//图片路径域
|
|
|
+ img_http: window.url_https_ajax,//图片路径域
|
|
|
fit: 'scale-down',//图片渲染样式
|
|
|
is_eva_btn: true,//
|
|
|
trigger_condition: 0,//评价触发条件
|
|
|
@@ -536,6 +535,21 @@
|
|
|
/*********************图片发送*********************/
|
|
|
uploadIMG(e) {
|
|
|
//console.log(e);
|
|
|
+ if (this.sessionType == 2) {
|
|
|
+ this.$message({
|
|
|
+ message: '只能给在线用户发送消息哦...',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }else if(this.sessionType == 1 && this.sessionList.length <= 0){
|
|
|
+ this.$message({
|
|
|
+ message: '只能给在线用户发送消息哦...',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
let self = this;
|
|
|
let files = e.target.files || e.dataTransfer.files;
|
|
|
if (!files.length) return;
|
|
|
@@ -569,6 +583,12 @@
|
|
|
upImg(formData) {
|
|
|
let self = this;
|
|
|
// 数据结构请求
|
|
|
+ let loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '图片发送中...',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background:'rgba(0, 0, 0, 0.8)',
|
|
|
+ });
|
|
|
self.$http.uploadPost('/index/upload/uploadImg', formData).then(res => {
|
|
|
//console.log(res.data.data.src)
|
|
|
|
|
|
@@ -609,8 +629,7 @@
|
|
|
sensitiveNumber: 0,//敏感词次数
|
|
|
}
|
|
|
self.websocketsend(JSON.stringify({type, data}))
|
|
|
-
|
|
|
-
|
|
|
+ loading.close()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
@@ -1108,6 +1127,19 @@
|
|
|
|
|
|
/**********************qq截图粘贴---发送截图*****************/
|
|
|
handleClose(done) {
|
|
|
+ if (this.sessionType == 2) {
|
|
|
+ this.$message({
|
|
|
+ message: '只能给在线用户发送消息哦...',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }else if(this.sessionType == 1 && this.sessionList.length <= 0){
|
|
|
+ this.$message({
|
|
|
+ message: '只能给在线用户发送消息哦...',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
this.dialogPaste = false;
|
|
|
let blob = this.$public.dataURItoBlob(this.pasteUrl)
|
|
|
let self = this;
|
|
|
@@ -1300,7 +1332,8 @@
|
|
|
* 挂载前执行
|
|
|
*/
|
|
|
mounted() {
|
|
|
- this.img_http = window.url_https_ajax;
|
|
|
+ // console.log('来了',window.url_https_ajax);
|
|
|
+ // this.img_http = window.url_https_ajax;
|
|
|
//获取vuex里面数据
|
|
|
this.get_vuex_info();
|
|
|
let _this = this;
|