no message

This commit is contained in:
kuaifan 2021-06-24 17:53:17 +08:00
parent e7f2c8fbde
commit 43ff98353d
3 changed files with 13 additions and 4 deletions

View File

@ -22,6 +22,10 @@ import {mapState} from "vuex";
export default {
name: 'DialogUpload',
props: {
dialogId: {
type: Number,
default: 0
},
maxSize: {
type: Number,
default: 204800
@ -36,7 +40,7 @@ export default {
},
computed: {
...mapState(['userToken', 'dialogId']),
...mapState(['userToken']),
headers() {
return {

View File

@ -73,6 +73,7 @@
<DialogUpload
ref="chatUpload"
class="chat-upload"
:dialog-id="dialogId"
@on-progress="chatFile('progress', $event)"
@on-success="chatFile('success', $event)"
@on-error="chatFile('error', $event)"/>
@ -277,11 +278,11 @@ export default {
break;
case 'error':
this.tempMsgs = this.tempMsgs.filter(({id}) => id != tempId)
this.tempMsgs = this.tempMsgs.filter(({id}) => id != file.tempId)
break;
case 'success':
this.tempMsgs = this.tempMsgs.filter(({id}) => id != tempId)
this.tempMsgs = this.tempMsgs.filter(({id}) => id != file.tempId)
this.sendSuccess(file.data)
break;
}

View File

@ -600,7 +600,7 @@ export default {
state[key].push(data);
}
//
if (data.parent_id) {
if (index > -1 && data.parent_id) {
dispatch("getTaskOne", data.parent_id);
}
if (data.is_update_complete) {
@ -866,6 +866,10 @@ export default {
state.taskFiles.push(data)
}
})
dispatch("saveTask", {
id: task_id,
file_num: result.data.length
});
resolve(result)
}).catch(e => {
console.error(e);