增加客服加载框

This commit is contained in:
龙运模 2024-11-20 23:06:23 +08:00
parent b306a519f3
commit 77b460b2a2
2 changed files with 8 additions and 30 deletions

View File

@ -67,34 +67,6 @@ export default {
}, },
methods:{ methods:{
getWsResult(res){
if(res.data && (res.data.type == 12)){
this.progressShow = true;
if(this.listProgress.length==0){
this.listProgress.push(res.data);
}
let ids = this.listProgress.map(em=>em.file_unique_id);
if(!ids.includes(res.data.file_unique_id)){
this.listProgress.push(res.data);
}
this.listProgress.forEach(em=>{
if(em.file_unique_id == res.data.file_unique_id){
em.rate = res.data.rate
}
})
let list = this.listProgress.filter(em=> em.rate != 100);
if(list.length==0 && res.data.status == 1){
this.progressShow = false;
}
if(res.data.status == 1){
this.fileList.splice(this.fileList[0],1);
this.params = {};
this.$emit('uploadFileSuccess');
}
}
},
// //
importFile(params){ importFile(params){
this.parentParams = params; this.parentParams = params;

View File

@ -2,7 +2,7 @@
<el-container class="mainNoBack userBox"> <el-container class="mainNoBack userBox">
<el-aside class="userAside" width="220px"> <el-aside class="userAside" width="220px">
<el-container> <el-container>
<el-main class="nopadding"> <el-main class="nopadding" v-loading="contactsLoading" element-loading-text="加载中...">
<el-scrollbar> <el-scrollbar>
<div class="contacts"> <div class="contacts">
<div class="contactsTitle">联系人</div> <div class="contactsTitle">联系人</div>
@ -30,7 +30,7 @@
<el-main class="userMain userMainPadding_0" style="border-top-right-radius: 0;border-bottom-right-radius: 0;padding: 0;"> <el-main class="userMain userMainPadding_0" style="border-top-right-radius: 0;border-bottom-right-radius: 0;padding: 0;">
<div class="mainBody"> <div class="mainBody">
<div class="mainTitle">{{contactsInfo.from_user && contactsInfo.from_user.name?contactsInfo.from_user.name:"匿名"}}</div> <div class="mainTitle">{{contactsInfo.from_user && contactsInfo.from_user.name?contactsInfo.from_user.name:"匿名"}}</div>
<div class="mainView"> <div class="mainView" v-loading="msgDataLoading" element-loading-text="加载中...">
<el-scrollbar ref="scrollbar" @scroll="handleScroll"> <el-scrollbar ref="scrollbar" @scroll="handleScroll">
<div class="msgList"> <div class="msgList">
<div class="msgItem" :class="user_id != item.to_user_id?'msgRightItem':''" v-for="(item,index) in msgList" :key="index"> <div class="msgItem" :class="user_id != item.to_user_id?'msgRightItem':''" v-for="(item,index) in msgList" :key="index">
@ -140,6 +140,8 @@ export default {
return{ return{
contactsList:[], contactsList:[],
contactsInfo:{}, contactsInfo:{},
msgDataLoading:false,
contactsLoading:false,
msgList:[], msgList:[],
user_id:0, user_id:0,
to_user_id:0, to_user_id:0,
@ -249,7 +251,9 @@ export default {
} }
}, },
async getContactList() { async getContactList() {
this.contactsLoading = true;
await this.$API.customer.contactList.post(); await this.$API.customer.contactList.post();
this.contactsLoading = false;
}, },
contactsActive(item){ contactsActive(item){
this.contactsInfo = item; this.contactsInfo = item;
@ -261,6 +265,7 @@ export default {
async getCustomerMsgList(isPage=false) { async getCustomerMsgList(isPage=false) {
let params = {} let params = {}
if(!isPage){ if(!isPage){
this.msgDataLoading = true;
params = { params = {
to_user_id:this.to_user_id, to_user_id:this.to_user_id,
pageSize:30 pageSize:30
@ -273,6 +278,7 @@ export default {
} }
} }
await this.$API.customer.list.post(params); await this.$API.customer.list.post(params);
this.msgDataLoading = false;
}, },
handleKeydown(event){ handleKeydown(event){
if(event.key === 'Enter' && !event.shiftKey){ if(event.key === 'Enter' && !event.shiftKey){