提交图片修改

This commit is contained in:
2025-08-23 13:51:56 +08:00
parent 5a0a86fe4a
commit 9a60d90592
5 changed files with 364 additions and 340 deletions

View File

@@ -73,6 +73,12 @@
},
created() {
this.onRefresh()
},
onShow() {
uni.$once('refreshData', () => {
this.tabLoaded = [false, false]
this.onRefresh()
});
},
methods: {
goBack() {

View File

@@ -142,7 +142,8 @@ export default {
async loadEevetInfo() {
let res = await this.$u.api.getWarnEventInfo({}, this.warnInfo.id);
if (res.code == "200") {
this.realImages = res.data
this.handleDesc = res.data.workReply
this.realImages = res.data.attachments
}
this.loading = false;
},
@@ -182,8 +183,16 @@ export default {
name: 'file',
vm: this
});
this.realImages = result.map(item => item.data?.url || '').filter(url => url !== '');
const allSuccess = result.every(item => item.code == 200);
if (!allSuccess) {
uni.showToast({
title: '上传失败',
icon: 'none'
});
return;
}
this.realImages = result.map(item => item.data?.ossId || '').filter(ossId => ossId !== '');
this.realSubmit();
},

View File

@@ -142,6 +142,7 @@ export default {
},
onShow() {
uni.$once('refreshData', () => {
this.tabLoaded = [false, false]
this.onRefresh()
});
},